lib/google/devtools/artifactregistry/v1/repository_pb.rb in google-cloud-artifact_registry-v1-0.8.0 vs lib/google/devtools/artifactregistry/v1/repository_pb.rb in google-cloud-artifact_registry-v1-0.9.0

- old
+ new

@@ -1,71 +1,42 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/devtools/artifactregistry/v1/repository.proto require 'google/protobuf' require 'google/api/field_behavior_pb' require 'google/api/resource_pb' require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("google/devtools/artifactregistry/v1/repository.proto", :syntax => :proto3) do - add_message "google.devtools.artifactregistry.v1.Repository" do - optional :name, :string, 1 - optional :format, :enum, 2, "google.devtools.artifactregistry.v1.Repository.Format" - optional :description, :string, 3 - map :labels, :string, :string, 4 - optional :create_time, :message, 5, "google.protobuf.Timestamp" - optional :update_time, :message, 6, "google.protobuf.Timestamp" - optional :kms_key_name, :string, 8 - oneof :format_config do - optional :maven_config, :message, 9, "google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig" - end + +descriptor_data = "\n4google/devtools/artifactregistry/v1/repository.proto\x12#google.devtools.artifactregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa5\x07\n\nRepository\x12]\n\x0cmaven_config\x18\t \x01(\x0b\x32\x45.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x46\n\x06\x66ormat\x18\x02 \x01(\x0e\x32\x36.google.devtools.artifactregistry.v1.Repository.Format\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12K\n\x06labels\x18\x04 \x03(\x0b\x32;.google.devtools.artifactregistry.v1.Repository.LabelsEntry\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0ckms_key_name\x18\x08 \x01(\t\x1a\xf3\x01\n\x15MavenRepositoryConfig\x12!\n\x19\x61llow_snapshot_overwrites\x18\x01 \x01(\x08\x12k\n\x0eversion_policy\x18\x02 \x01(\x0e\x32S.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy\"J\n\rVersionPolicy\x12\x1e\n\x1aVERSION_POLICY_UNSPECIFIED\x10\x00\x12\x0b\n\x07RELEASE\x10\x01\x12\x0c\n\x08SNAPSHOT\x10\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"^\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\n\n\x06\x44OCKER\x10\x01\x12\t\n\x05MAVEN\x10\x02\x12\x07\n\x03NPM\x10\x03\x12\x07\n\x03\x41PT\x10\x05\x12\x07\n\x03YUM\x10\x06\x12\n\n\x06PYTHON\x10\x08:r\xea\x41o\n*artifactregistry.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}B\x0f\n\rformat_config\"\x84\x01\n\x17ListRepositoriesRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"z\n\x18ListRepositoriesResponse\x12\x45\n\x0crepositories\x18\x01 \x03(\x0b\x32/.google.devtools.artifactregistry.v1.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x14GetRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/Repository\"\xb9\x01\n\x17\x43reateRepositoryRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*artifactregistry.googleapis.com/Repository\x12\x15\n\rrepository_id\x18\x02 \x01(\t\x12\x43\n\nrepository\x18\x03 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.Repository\"\x8f\x01\n\x17UpdateRepositoryRequest\x12\x43\n\nrepository\x18\x01 \x01(\x0b\x32/.google.devtools.artifactregistry.v1.Repository\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"[\n\x17\x44\x65leteRepositoryRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*artifactregistry.googleapis.com/RepositoryB\xfa\x01\n\'com.google.devtools.artifactregistry.v1B\x0fRepositoryProtoP\x01ZPcloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb\xaa\x02 Google.Cloud.ArtifactRegistry.V1\xca\x02 Google\\Cloud\\ArtifactRegistry\\V1\xea\x02#Google::Cloud::ArtifactRegistry::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end - add_message "google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig" do - optional :allow_snapshot_overwrites, :bool, 1 - optional :version_policy, :enum, 2, "google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy" - end - add_enum "google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy" do - value :VERSION_POLICY_UNSPECIFIED, 0 - value :RELEASE, 1 - value :SNAPSHOT, 2 - end - add_enum "google.devtools.artifactregistry.v1.Repository.Format" do - value :FORMAT_UNSPECIFIED, 0 - value :DOCKER, 1 - value :MAVEN, 2 - value :NPM, 3 - value :APT, 5 - value :YUM, 6 - value :PYTHON, 8 - end - add_message "google.devtools.artifactregistry.v1.ListRepositoriesRequest" do - optional :parent, :string, 1 - optional :page_size, :int32, 2 - optional :page_token, :string, 3 - end - add_message "google.devtools.artifactregistry.v1.ListRepositoriesResponse" do - repeated :repositories, :message, 1, "google.devtools.artifactregistry.v1.Repository" - optional :next_page_token, :string, 2 - end - add_message "google.devtools.artifactregistry.v1.GetRepositoryRequest" do - optional :name, :string, 1 - end - add_message "google.devtools.artifactregistry.v1.CreateRepositoryRequest" do - optional :parent, :string, 1 - optional :repository_id, :string, 2 - optional :repository, :message, 3, "google.devtools.artifactregistry.v1.Repository" - end - add_message "google.devtools.artifactregistry.v1.UpdateRepositoryRequest" do - optional :repository, :message, 1, "google.devtools.artifactregistry.v1.Repository" - optional :update_mask, :message, 2, "google.protobuf.FieldMask" - end - add_message "google.devtools.artifactregistry.v1.DeleteRepositoryRequest" do - optional :name, :string, 1 - end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Google module Cloud module ArtifactRegistry