lib/google/cloud/retail/v2/control_service_pb.rb in google-cloud-retail-v2-0.15.0 vs lib/google/cloud/retail/v2/control_service_pb.rb in google-cloud-retail-v2-0.16.0
- old
+ new
@@ -1,5 +1,6 @@
+# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/retail/v2/control_service.proto
require 'google/protobuf'
@@ -9,37 +10,36 @@
require 'google/api/resource_pb'
require 'google/cloud/retail/v2/control_pb'
require 'google/protobuf/empty_pb'
require 'google/protobuf/field_mask_pb'
-Google::Protobuf::DescriptorPool.generated_pool.build do
- add_file("google/cloud/retail/v2/control_service.proto", :syntax => :proto3) do
- add_message "google.cloud.retail.v2.CreateControlRequest" do
- optional :parent, :string, 1
- optional :control, :message, 2, "google.cloud.retail.v2.Control"
- optional :control_id, :string, 3
+
+descriptor_data = "\n,google/cloud/retail/v2/control_service.proto\x12\x16google.cloud.retail.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/retail/v2/control.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x9d\x01\n\x14\x43reateControlRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Catalog\x12\x35\n\x07\x63ontrol\x18\x02 \x01(\x0b\x32\x1f.google.cloud.retail.v2.ControlB\x03\xe0\x41\x02\x12\x17\n\ncontrol_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"~\n\x14UpdateControlRequest\x12\x35\n\x07\x63ontrol\x18\x01 \x01(\x0b\x32\x1f.google.cloud.retail.v2.ControlB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14\x44\x65leteControlRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Control\"H\n\x11GetControlRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Control\"\x92\x01\n\x13ListControlsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Catalog\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"b\n\x14ListControlsResponse\x12\x31\n\x08\x63ontrols\x18\x01 \x03(\x0b\x32\x1f.google.cloud.retail.v2.Control\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe4\x07\n\x0e\x43ontrolService\x12\xc4\x01\n\rCreateControl\x12,.google.cloud.retail.v2.CreateControlRequest\x1a\x1f.google.cloud.retail.v2.Control\"d\x82\xd3\xe4\x93\x02\x42\"7/v2/{parent=projects/*/locations/*/catalogs/*}/controls:\x07\x63ontrol\xda\x41\x19parent,control,control_id\x12\x9d\x01\n\rDeleteControl\x12,.google.cloud.retail.v2.DeleteControlRequest\x1a\x16.google.protobuf.Empty\"F\x82\xd3\xe4\x93\x02\x39*7/v2/{name=projects/*/locations/*/catalogs/*/controls/*}\xda\x41\x04name\x12\xc6\x01\n\rUpdateControl\x12,.google.cloud.retail.v2.UpdateControlRequest\x1a\x1f.google.cloud.retail.v2.Control\"f\x82\xd3\xe4\x93\x02J2?/v2/{control.name=projects/*/locations/*/catalogs/*/controls/*}:\x07\x63ontrol\xda\x41\x13\x63ontrol,update_mask\x12\xa0\x01\n\nGetControl\x12).google.cloud.retail.v2.GetControlRequest\x1a\x1f.google.cloud.retail.v2.Control\"F\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{name=projects/*/locations/*/catalogs/*/controls/*}\xda\x41\x04name\x12\xb3\x01\n\x0cListControls\x12+.google.cloud.retail.v2.ListControlsRequest\x1a,.google.cloud.retail.v2.ListControlsResponse\"H\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{parent=projects/*/locations/*/catalogs/*}/controls\xda\x41\x06parent\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbe\x01\n\x1a\x63om.google.cloud.retail.v2B\x13\x43ontrolServiceProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2b\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.cloud.retail.v2.Control", "google/cloud/retail/v2/control.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.cloud.retail.v2.UpdateControlRequest" do
- optional :control, :message, 1, "google.cloud.retail.v2.Control"
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
- end
- add_message "google.cloud.retail.v2.DeleteControlRequest" do
- optional :name, :string, 1
- end
- add_message "google.cloud.retail.v2.GetControlRequest" do
- optional :name, :string, 1
- end
- add_message "google.cloud.retail.v2.ListControlsRequest" do
- optional :parent, :string, 1
- optional :page_size, :int32, 2
- optional :page_token, :string, 3
- optional :filter, :string, 4
- end
- add_message "google.cloud.retail.v2.ListControlsResponse" do
- repeated :controls, :message, 1, "google.cloud.retail.v2.Control"
- optional :next_page_token, :string, 2
- 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 Retail