google-cloud-retail-v2 0.8.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/lib/google/cloud/retail/v2/catalog_pb.rb +55 -0
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +718 -0
- data/lib/google/cloud/retail/v2/catalog_service/paths.rb +38 -0
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +34 -0
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +38 -0
- data/lib/google/cloud/retail/v2/common_pb.rb +86 -0
- data/lib/google/cloud/retail/v2/completion_service/client.rb +7 -3
- data/lib/google/cloud/retail/v2/completion_service/operations.rb +3 -0
- data/lib/google/cloud/retail/v2/control_pb.rb +33 -0
- data/lib/google/cloud/retail/v2/control_service/client.rb +807 -0
- data/lib/google/cloud/retail/v2/control_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/control_service/paths.rb +73 -0
- data/lib/google/cloud/retail/v2/control_service.rb +49 -0
- data/lib/google/cloud/retail/v2/control_service_pb.rb +57 -0
- data/lib/google/cloud/retail/v2/control_service_services_pb.rb +65 -0
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +28 -13
- data/lib/google/cloud/retail/v2/product_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/product_service/client.rb +87 -42
- data/lib/google/cloud/retail/v2/product_service/operations.rb +3 -0
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +67 -23
- data/lib/google/cloud/retail/v2/search_service/client.rb +15 -2
- data/lib/google/cloud/retail/v2/search_service_pb.rb +5 -0
- data/lib/google/cloud/retail/v2/serving_config_pb.rb +44 -0
- data/lib/google/cloud/retail/v2/serving_config_service/client.rb +998 -0
- data/lib/google/cloud/retail/v2/serving_config_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/serving_config_service/paths.rb +73 -0
- data/lib/google/cloud/retail/v2/serving_config_service.rb +49 -0
- data/lib/google/cloud/retail/v2/serving_config_service_pb.rb +66 -0
- data/lib/google/cloud/retail/v2/serving_config_service_services_pb.rb +74 -0
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +2 -2
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +3 -0
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/lib/google/cloud/retail/v2.rb +2 -0
- data/proto_docs/google/cloud/retail/v2/catalog.rb +233 -0
- data/proto_docs/google/cloud/retail/v2/catalog_service.rb +133 -0
- data/proto_docs/google/cloud/retail/v2/common.rb +314 -4
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +9 -4
- data/proto_docs/google/cloud/retail/v2/control.rb +76 -0
- data/proto_docs/google/cloud/retail/v2/control_service.rb +122 -0
- data/proto_docs/google/cloud/retail/v2/import_config.rb +20 -35
- data/proto_docs/google/cloud/retail/v2/prediction_service.rb +27 -12
- data/proto_docs/google/cloud/retail/v2/product.rb +7 -1
- data/proto_docs/google/cloud/retail/v2/product_service.rb +49 -21
- data/proto_docs/google/cloud/retail/v2/search_service.rb +72 -13
- data/proto_docs/google/cloud/retail/v2/serving_config.rb +238 -0
- data/proto_docs/google/cloud/retail/v2/serving_config_service.rb +143 -0
- data/proto_docs/google/protobuf/empty.rb +0 -2
- metadata +29 -11
|
@@ -588,6 +588,675 @@ module Google
|
|
|
588
588
|
raise ::Google::Cloud::Error.from_error(e)
|
|
589
589
|
end
|
|
590
590
|
|
|
591
|
+
##
|
|
592
|
+
# Gets a {::Google::Cloud::Retail::V2::CompletionConfig CompletionConfig}.
|
|
593
|
+
#
|
|
594
|
+
# @overload get_completion_config(request, options = nil)
|
|
595
|
+
# Pass arguments to `get_completion_config` via a request object, either of type
|
|
596
|
+
# {::Google::Cloud::Retail::V2::GetCompletionConfigRequest} or an equivalent Hash.
|
|
597
|
+
#
|
|
598
|
+
# @param request [::Google::Cloud::Retail::V2::GetCompletionConfigRequest, ::Hash]
|
|
599
|
+
# A request object representing the call parameters. Required. To specify no
|
|
600
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
601
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
602
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
603
|
+
#
|
|
604
|
+
# @overload get_completion_config(name: nil)
|
|
605
|
+
# Pass arguments to `get_completion_config` via keyword arguments. Note that at
|
|
606
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
607
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
608
|
+
#
|
|
609
|
+
# @param name [::String]
|
|
610
|
+
# Required. Full CompletionConfig resource name. Format:
|
|
611
|
+
# projects/\\{project_number}/locations/\\{location_id}/catalogs/\\{catalog_id}/completionConfig
|
|
612
|
+
#
|
|
613
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
614
|
+
# @yieldparam response [::Google::Cloud::Retail::V2::CompletionConfig]
|
|
615
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
616
|
+
#
|
|
617
|
+
# @return [::Google::Cloud::Retail::V2::CompletionConfig]
|
|
618
|
+
#
|
|
619
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
620
|
+
#
|
|
621
|
+
# @example Basic example
|
|
622
|
+
# require "google/cloud/retail/v2"
|
|
623
|
+
#
|
|
624
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
625
|
+
# client = Google::Cloud::Retail::V2::CatalogService::Client.new
|
|
626
|
+
#
|
|
627
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
628
|
+
# request = Google::Cloud::Retail::V2::GetCompletionConfigRequest.new
|
|
629
|
+
#
|
|
630
|
+
# # Call the get_completion_config method.
|
|
631
|
+
# result = client.get_completion_config request
|
|
632
|
+
#
|
|
633
|
+
# # The returned object is of type Google::Cloud::Retail::V2::CompletionConfig.
|
|
634
|
+
# p result
|
|
635
|
+
#
|
|
636
|
+
def get_completion_config request, options = nil
|
|
637
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
638
|
+
|
|
639
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Retail::V2::GetCompletionConfigRequest
|
|
640
|
+
|
|
641
|
+
# Converts hash and nil to an options object
|
|
642
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
643
|
+
|
|
644
|
+
# Customize the options with defaults
|
|
645
|
+
metadata = @config.rpcs.get_completion_config.metadata.to_h
|
|
646
|
+
|
|
647
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
648
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
649
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
650
|
+
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
|
651
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
652
|
+
|
|
653
|
+
header_params = {}
|
|
654
|
+
if request.name
|
|
655
|
+
header_params["name"] = request.name
|
|
656
|
+
end
|
|
657
|
+
|
|
658
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
659
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
660
|
+
|
|
661
|
+
options.apply_defaults timeout: @config.rpcs.get_completion_config.timeout,
|
|
662
|
+
metadata: metadata,
|
|
663
|
+
retry_policy: @config.rpcs.get_completion_config.retry_policy
|
|
664
|
+
|
|
665
|
+
options.apply_defaults timeout: @config.timeout,
|
|
666
|
+
metadata: @config.metadata,
|
|
667
|
+
retry_policy: @config.retry_policy
|
|
668
|
+
|
|
669
|
+
@catalog_service_stub.call_rpc :get_completion_config, request, options: options do |response, operation|
|
|
670
|
+
yield response, operation if block_given?
|
|
671
|
+
return response
|
|
672
|
+
end
|
|
673
|
+
rescue ::GRPC::BadStatus => e
|
|
674
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
675
|
+
end
|
|
676
|
+
|
|
677
|
+
##
|
|
678
|
+
# Updates the {::Google::Cloud::Retail::V2::CompletionConfig CompletionConfig}s.
|
|
679
|
+
#
|
|
680
|
+
# @overload update_completion_config(request, options = nil)
|
|
681
|
+
# Pass arguments to `update_completion_config` via a request object, either of type
|
|
682
|
+
# {::Google::Cloud::Retail::V2::UpdateCompletionConfigRequest} or an equivalent Hash.
|
|
683
|
+
#
|
|
684
|
+
# @param request [::Google::Cloud::Retail::V2::UpdateCompletionConfigRequest, ::Hash]
|
|
685
|
+
# A request object representing the call parameters. Required. To specify no
|
|
686
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
687
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
688
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
689
|
+
#
|
|
690
|
+
# @overload update_completion_config(completion_config: nil, update_mask: nil)
|
|
691
|
+
# Pass arguments to `update_completion_config` via keyword arguments. Note that at
|
|
692
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
693
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
694
|
+
#
|
|
695
|
+
# @param completion_config [::Google::Cloud::Retail::V2::CompletionConfig, ::Hash]
|
|
696
|
+
# Required. The {::Google::Cloud::Retail::V2::CompletionConfig CompletionConfig}
|
|
697
|
+
# to update.
|
|
698
|
+
#
|
|
699
|
+
# If the caller does not have permission to update the
|
|
700
|
+
# {::Google::Cloud::Retail::V2::CompletionConfig CompletionConfig}, then a
|
|
701
|
+
# PERMISSION_DENIED error is returned.
|
|
702
|
+
#
|
|
703
|
+
# If the {::Google::Cloud::Retail::V2::CompletionConfig CompletionConfig} to
|
|
704
|
+
# update does not exist, a NOT_FOUND error is returned.
|
|
705
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
706
|
+
# Indicates which fields in the provided
|
|
707
|
+
# {::Google::Cloud::Retail::V2::CompletionConfig CompletionConfig} to update. The
|
|
708
|
+
# following are the only supported fields:
|
|
709
|
+
#
|
|
710
|
+
# * {::Google::Cloud::Retail::V2::CompletionConfig#matching_order CompletionConfig.matching_order}
|
|
711
|
+
# * {::Google::Cloud::Retail::V2::CompletionConfig#max_suggestions CompletionConfig.max_suggestions}
|
|
712
|
+
# * {::Google::Cloud::Retail::V2::CompletionConfig#min_prefix_length CompletionConfig.min_prefix_length}
|
|
713
|
+
# * {::Google::Cloud::Retail::V2::CompletionConfig#auto_learning CompletionConfig.auto_learning}
|
|
714
|
+
#
|
|
715
|
+
# If not set, all supported fields are updated.
|
|
716
|
+
#
|
|
717
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
718
|
+
# @yieldparam response [::Google::Cloud::Retail::V2::CompletionConfig]
|
|
719
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
720
|
+
#
|
|
721
|
+
# @return [::Google::Cloud::Retail::V2::CompletionConfig]
|
|
722
|
+
#
|
|
723
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
724
|
+
#
|
|
725
|
+
# @example Basic example
|
|
726
|
+
# require "google/cloud/retail/v2"
|
|
727
|
+
#
|
|
728
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
729
|
+
# client = Google::Cloud::Retail::V2::CatalogService::Client.new
|
|
730
|
+
#
|
|
731
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
732
|
+
# request = Google::Cloud::Retail::V2::UpdateCompletionConfigRequest.new
|
|
733
|
+
#
|
|
734
|
+
# # Call the update_completion_config method.
|
|
735
|
+
# result = client.update_completion_config request
|
|
736
|
+
#
|
|
737
|
+
# # The returned object is of type Google::Cloud::Retail::V2::CompletionConfig.
|
|
738
|
+
# p result
|
|
739
|
+
#
|
|
740
|
+
def update_completion_config request, options = nil
|
|
741
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
742
|
+
|
|
743
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Retail::V2::UpdateCompletionConfigRequest
|
|
744
|
+
|
|
745
|
+
# Converts hash and nil to an options object
|
|
746
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
747
|
+
|
|
748
|
+
# Customize the options with defaults
|
|
749
|
+
metadata = @config.rpcs.update_completion_config.metadata.to_h
|
|
750
|
+
|
|
751
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
752
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
753
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
754
|
+
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
|
755
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
756
|
+
|
|
757
|
+
header_params = {}
|
|
758
|
+
if request.completion_config&.name
|
|
759
|
+
header_params["completion_config.name"] = request.completion_config.name
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
763
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
764
|
+
|
|
765
|
+
options.apply_defaults timeout: @config.rpcs.update_completion_config.timeout,
|
|
766
|
+
metadata: metadata,
|
|
767
|
+
retry_policy: @config.rpcs.update_completion_config.retry_policy
|
|
768
|
+
|
|
769
|
+
options.apply_defaults timeout: @config.timeout,
|
|
770
|
+
metadata: @config.metadata,
|
|
771
|
+
retry_policy: @config.retry_policy
|
|
772
|
+
|
|
773
|
+
@catalog_service_stub.call_rpc :update_completion_config, request, options: options do |response, operation|
|
|
774
|
+
yield response, operation if block_given?
|
|
775
|
+
return response
|
|
776
|
+
end
|
|
777
|
+
rescue ::GRPC::BadStatus => e
|
|
778
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
779
|
+
end
|
|
780
|
+
|
|
781
|
+
##
|
|
782
|
+
# Gets an {::Google::Cloud::Retail::V2::AttributesConfig AttributesConfig}.
|
|
783
|
+
#
|
|
784
|
+
# @overload get_attributes_config(request, options = nil)
|
|
785
|
+
# Pass arguments to `get_attributes_config` via a request object, either of type
|
|
786
|
+
# {::Google::Cloud::Retail::V2::GetAttributesConfigRequest} or an equivalent Hash.
|
|
787
|
+
#
|
|
788
|
+
# @param request [::Google::Cloud::Retail::V2::GetAttributesConfigRequest, ::Hash]
|
|
789
|
+
# A request object representing the call parameters. Required. To specify no
|
|
790
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
791
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
792
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
793
|
+
#
|
|
794
|
+
# @overload get_attributes_config(name: nil)
|
|
795
|
+
# Pass arguments to `get_attributes_config` via keyword arguments. Note that at
|
|
796
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
797
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
798
|
+
#
|
|
799
|
+
# @param name [::String]
|
|
800
|
+
# Required. Full AttributesConfig resource name. Format:
|
|
801
|
+
# `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
|
|
802
|
+
#
|
|
803
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
804
|
+
# @yieldparam response [::Google::Cloud::Retail::V2::AttributesConfig]
|
|
805
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
806
|
+
#
|
|
807
|
+
# @return [::Google::Cloud::Retail::V2::AttributesConfig]
|
|
808
|
+
#
|
|
809
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
810
|
+
#
|
|
811
|
+
# @example Basic example
|
|
812
|
+
# require "google/cloud/retail/v2"
|
|
813
|
+
#
|
|
814
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
815
|
+
# client = Google::Cloud::Retail::V2::CatalogService::Client.new
|
|
816
|
+
#
|
|
817
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
818
|
+
# request = Google::Cloud::Retail::V2::GetAttributesConfigRequest.new
|
|
819
|
+
#
|
|
820
|
+
# # Call the get_attributes_config method.
|
|
821
|
+
# result = client.get_attributes_config request
|
|
822
|
+
#
|
|
823
|
+
# # The returned object is of type Google::Cloud::Retail::V2::AttributesConfig.
|
|
824
|
+
# p result
|
|
825
|
+
#
|
|
826
|
+
def get_attributes_config request, options = nil
|
|
827
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
828
|
+
|
|
829
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Retail::V2::GetAttributesConfigRequest
|
|
830
|
+
|
|
831
|
+
# Converts hash and nil to an options object
|
|
832
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
833
|
+
|
|
834
|
+
# Customize the options with defaults
|
|
835
|
+
metadata = @config.rpcs.get_attributes_config.metadata.to_h
|
|
836
|
+
|
|
837
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
838
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
839
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
840
|
+
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
|
841
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
842
|
+
|
|
843
|
+
header_params = {}
|
|
844
|
+
if request.name
|
|
845
|
+
header_params["name"] = request.name
|
|
846
|
+
end
|
|
847
|
+
|
|
848
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
849
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
850
|
+
|
|
851
|
+
options.apply_defaults timeout: @config.rpcs.get_attributes_config.timeout,
|
|
852
|
+
metadata: metadata,
|
|
853
|
+
retry_policy: @config.rpcs.get_attributes_config.retry_policy
|
|
854
|
+
|
|
855
|
+
options.apply_defaults timeout: @config.timeout,
|
|
856
|
+
metadata: @config.metadata,
|
|
857
|
+
retry_policy: @config.retry_policy
|
|
858
|
+
|
|
859
|
+
@catalog_service_stub.call_rpc :get_attributes_config, request, options: options do |response, operation|
|
|
860
|
+
yield response, operation if block_given?
|
|
861
|
+
return response
|
|
862
|
+
end
|
|
863
|
+
rescue ::GRPC::BadStatus => e
|
|
864
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
865
|
+
end
|
|
866
|
+
|
|
867
|
+
##
|
|
868
|
+
# Updates the {::Google::Cloud::Retail::V2::AttributesConfig AttributesConfig}.
|
|
869
|
+
#
|
|
870
|
+
# The catalog attributes in the request will be updated in the catalog, or
|
|
871
|
+
# inserted if they do not exist. Existing catalog attributes not included in
|
|
872
|
+
# the request will remain unchanged. Attributes that are assigned to
|
|
873
|
+
# products, but do not exist at the catalog level, are always included in the
|
|
874
|
+
# response. The product attribute is assigned default values for missing
|
|
875
|
+
# catalog attribute fields, e.g., searchable and dynamic facetable options.
|
|
876
|
+
#
|
|
877
|
+
# @overload update_attributes_config(request, options = nil)
|
|
878
|
+
# Pass arguments to `update_attributes_config` via a request object, either of type
|
|
879
|
+
# {::Google::Cloud::Retail::V2::UpdateAttributesConfigRequest} or an equivalent Hash.
|
|
880
|
+
#
|
|
881
|
+
# @param request [::Google::Cloud::Retail::V2::UpdateAttributesConfigRequest, ::Hash]
|
|
882
|
+
# A request object representing the call parameters. Required. To specify no
|
|
883
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
884
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
885
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
886
|
+
#
|
|
887
|
+
# @overload update_attributes_config(attributes_config: nil, update_mask: nil)
|
|
888
|
+
# Pass arguments to `update_attributes_config` via keyword arguments. Note that at
|
|
889
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
890
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
891
|
+
#
|
|
892
|
+
# @param attributes_config [::Google::Cloud::Retail::V2::AttributesConfig, ::Hash]
|
|
893
|
+
# Required. The {::Google::Cloud::Retail::V2::AttributesConfig AttributesConfig}
|
|
894
|
+
# to update.
|
|
895
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
896
|
+
# Indicates which fields in the provided
|
|
897
|
+
# {::Google::Cloud::Retail::V2::AttributesConfig AttributesConfig} to update. The
|
|
898
|
+
# following is the only supported field:
|
|
899
|
+
#
|
|
900
|
+
# * {::Google::Cloud::Retail::V2::AttributesConfig#catalog_attributes AttributesConfig.catalog_attributes}
|
|
901
|
+
#
|
|
902
|
+
# If not set, all supported fields are updated.
|
|
903
|
+
#
|
|
904
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
905
|
+
# @yieldparam response [::Google::Cloud::Retail::V2::AttributesConfig]
|
|
906
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
907
|
+
#
|
|
908
|
+
# @return [::Google::Cloud::Retail::V2::AttributesConfig]
|
|
909
|
+
#
|
|
910
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
911
|
+
#
|
|
912
|
+
# @example Basic example
|
|
913
|
+
# require "google/cloud/retail/v2"
|
|
914
|
+
#
|
|
915
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
916
|
+
# client = Google::Cloud::Retail::V2::CatalogService::Client.new
|
|
917
|
+
#
|
|
918
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
919
|
+
# request = Google::Cloud::Retail::V2::UpdateAttributesConfigRequest.new
|
|
920
|
+
#
|
|
921
|
+
# # Call the update_attributes_config method.
|
|
922
|
+
# result = client.update_attributes_config request
|
|
923
|
+
#
|
|
924
|
+
# # The returned object is of type Google::Cloud::Retail::V2::AttributesConfig.
|
|
925
|
+
# p result
|
|
926
|
+
#
|
|
927
|
+
def update_attributes_config request, options = nil
|
|
928
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
929
|
+
|
|
930
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Retail::V2::UpdateAttributesConfigRequest
|
|
931
|
+
|
|
932
|
+
# Converts hash and nil to an options object
|
|
933
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
934
|
+
|
|
935
|
+
# Customize the options with defaults
|
|
936
|
+
metadata = @config.rpcs.update_attributes_config.metadata.to_h
|
|
937
|
+
|
|
938
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
939
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
940
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
941
|
+
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
|
942
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
943
|
+
|
|
944
|
+
header_params = {}
|
|
945
|
+
if request.attributes_config&.name
|
|
946
|
+
header_params["attributes_config.name"] = request.attributes_config.name
|
|
947
|
+
end
|
|
948
|
+
|
|
949
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
950
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
951
|
+
|
|
952
|
+
options.apply_defaults timeout: @config.rpcs.update_attributes_config.timeout,
|
|
953
|
+
metadata: metadata,
|
|
954
|
+
retry_policy: @config.rpcs.update_attributes_config.retry_policy
|
|
955
|
+
|
|
956
|
+
options.apply_defaults timeout: @config.timeout,
|
|
957
|
+
metadata: @config.metadata,
|
|
958
|
+
retry_policy: @config.retry_policy
|
|
959
|
+
|
|
960
|
+
@catalog_service_stub.call_rpc :update_attributes_config, request, options: options do |response, operation|
|
|
961
|
+
yield response, operation if block_given?
|
|
962
|
+
return response
|
|
963
|
+
end
|
|
964
|
+
rescue ::GRPC::BadStatus => e
|
|
965
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
966
|
+
end
|
|
967
|
+
|
|
968
|
+
##
|
|
969
|
+
# Adds the specified
|
|
970
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} to the
|
|
971
|
+
# {::Google::Cloud::Retail::V2::AttributesConfig AttributesConfig}.
|
|
972
|
+
#
|
|
973
|
+
# If the {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} to add
|
|
974
|
+
# already exists, an ALREADY_EXISTS error is returned.
|
|
975
|
+
#
|
|
976
|
+
# @overload add_catalog_attribute(request, options = nil)
|
|
977
|
+
# Pass arguments to `add_catalog_attribute` via a request object, either of type
|
|
978
|
+
# {::Google::Cloud::Retail::V2::AddCatalogAttributeRequest} or an equivalent Hash.
|
|
979
|
+
#
|
|
980
|
+
# @param request [::Google::Cloud::Retail::V2::AddCatalogAttributeRequest, ::Hash]
|
|
981
|
+
# A request object representing the call parameters. Required. To specify no
|
|
982
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
983
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
984
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
985
|
+
#
|
|
986
|
+
# @overload add_catalog_attribute(attributes_config: nil, catalog_attribute: nil)
|
|
987
|
+
# Pass arguments to `add_catalog_attribute` via keyword arguments. Note that at
|
|
988
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
989
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
990
|
+
#
|
|
991
|
+
# @param attributes_config [::String]
|
|
992
|
+
# Required. Full AttributesConfig resource name. Format:
|
|
993
|
+
# `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
|
|
994
|
+
# @param catalog_attribute [::Google::Cloud::Retail::V2::CatalogAttribute, ::Hash]
|
|
995
|
+
# Required. The {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}
|
|
996
|
+
# to add.
|
|
997
|
+
#
|
|
998
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
999
|
+
# @yieldparam response [::Google::Cloud::Retail::V2::AttributesConfig]
|
|
1000
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1001
|
+
#
|
|
1002
|
+
# @return [::Google::Cloud::Retail::V2::AttributesConfig]
|
|
1003
|
+
#
|
|
1004
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1005
|
+
#
|
|
1006
|
+
# @example Basic example
|
|
1007
|
+
# require "google/cloud/retail/v2"
|
|
1008
|
+
#
|
|
1009
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1010
|
+
# client = Google::Cloud::Retail::V2::CatalogService::Client.new
|
|
1011
|
+
#
|
|
1012
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1013
|
+
# request = Google::Cloud::Retail::V2::AddCatalogAttributeRequest.new
|
|
1014
|
+
#
|
|
1015
|
+
# # Call the add_catalog_attribute method.
|
|
1016
|
+
# result = client.add_catalog_attribute request
|
|
1017
|
+
#
|
|
1018
|
+
# # The returned object is of type Google::Cloud::Retail::V2::AttributesConfig.
|
|
1019
|
+
# p result
|
|
1020
|
+
#
|
|
1021
|
+
def add_catalog_attribute request, options = nil
|
|
1022
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1023
|
+
|
|
1024
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Retail::V2::AddCatalogAttributeRequest
|
|
1025
|
+
|
|
1026
|
+
# Converts hash and nil to an options object
|
|
1027
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1028
|
+
|
|
1029
|
+
# Customize the options with defaults
|
|
1030
|
+
metadata = @config.rpcs.add_catalog_attribute.metadata.to_h
|
|
1031
|
+
|
|
1032
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
1033
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1034
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1035
|
+
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
|
1036
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1037
|
+
|
|
1038
|
+
header_params = {}
|
|
1039
|
+
if request.attributes_config
|
|
1040
|
+
header_params["attributes_config"] = request.attributes_config
|
|
1041
|
+
end
|
|
1042
|
+
|
|
1043
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1044
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1045
|
+
|
|
1046
|
+
options.apply_defaults timeout: @config.rpcs.add_catalog_attribute.timeout,
|
|
1047
|
+
metadata: metadata,
|
|
1048
|
+
retry_policy: @config.rpcs.add_catalog_attribute.retry_policy
|
|
1049
|
+
|
|
1050
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1051
|
+
metadata: @config.metadata,
|
|
1052
|
+
retry_policy: @config.retry_policy
|
|
1053
|
+
|
|
1054
|
+
@catalog_service_stub.call_rpc :add_catalog_attribute, request, options: options do |response, operation|
|
|
1055
|
+
yield response, operation if block_given?
|
|
1056
|
+
return response
|
|
1057
|
+
end
|
|
1058
|
+
rescue ::GRPC::BadStatus => e
|
|
1059
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1060
|
+
end
|
|
1061
|
+
|
|
1062
|
+
##
|
|
1063
|
+
# Removes the specified
|
|
1064
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} from the
|
|
1065
|
+
# {::Google::Cloud::Retail::V2::AttributesConfig AttributesConfig}.
|
|
1066
|
+
#
|
|
1067
|
+
# If the {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} to
|
|
1068
|
+
# remove does not exist, a NOT_FOUND error is returned.
|
|
1069
|
+
#
|
|
1070
|
+
# @overload remove_catalog_attribute(request, options = nil)
|
|
1071
|
+
# Pass arguments to `remove_catalog_attribute` via a request object, either of type
|
|
1072
|
+
# {::Google::Cloud::Retail::V2::RemoveCatalogAttributeRequest} or an equivalent Hash.
|
|
1073
|
+
#
|
|
1074
|
+
# @param request [::Google::Cloud::Retail::V2::RemoveCatalogAttributeRequest, ::Hash]
|
|
1075
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1076
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1077
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1078
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1079
|
+
#
|
|
1080
|
+
# @overload remove_catalog_attribute(attributes_config: nil, key: nil)
|
|
1081
|
+
# Pass arguments to `remove_catalog_attribute` via keyword arguments. Note that at
|
|
1082
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1083
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1084
|
+
#
|
|
1085
|
+
# @param attributes_config [::String]
|
|
1086
|
+
# Required. Full AttributesConfig resource name. Format:
|
|
1087
|
+
# `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
|
|
1088
|
+
# @param key [::String]
|
|
1089
|
+
# Required. The attribute name key of the
|
|
1090
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} to remove.
|
|
1091
|
+
#
|
|
1092
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1093
|
+
# @yieldparam response [::Google::Cloud::Retail::V2::AttributesConfig]
|
|
1094
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1095
|
+
#
|
|
1096
|
+
# @return [::Google::Cloud::Retail::V2::AttributesConfig]
|
|
1097
|
+
#
|
|
1098
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1099
|
+
#
|
|
1100
|
+
# @example Basic example
|
|
1101
|
+
# require "google/cloud/retail/v2"
|
|
1102
|
+
#
|
|
1103
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1104
|
+
# client = Google::Cloud::Retail::V2::CatalogService::Client.new
|
|
1105
|
+
#
|
|
1106
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1107
|
+
# request = Google::Cloud::Retail::V2::RemoveCatalogAttributeRequest.new
|
|
1108
|
+
#
|
|
1109
|
+
# # Call the remove_catalog_attribute method.
|
|
1110
|
+
# result = client.remove_catalog_attribute request
|
|
1111
|
+
#
|
|
1112
|
+
# # The returned object is of type Google::Cloud::Retail::V2::AttributesConfig.
|
|
1113
|
+
# p result
|
|
1114
|
+
#
|
|
1115
|
+
def remove_catalog_attribute request, options = nil
|
|
1116
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1117
|
+
|
|
1118
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Retail::V2::RemoveCatalogAttributeRequest
|
|
1119
|
+
|
|
1120
|
+
# Converts hash and nil to an options object
|
|
1121
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1122
|
+
|
|
1123
|
+
# Customize the options with defaults
|
|
1124
|
+
metadata = @config.rpcs.remove_catalog_attribute.metadata.to_h
|
|
1125
|
+
|
|
1126
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
1127
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1128
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1129
|
+
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
|
1130
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1131
|
+
|
|
1132
|
+
header_params = {}
|
|
1133
|
+
if request.attributes_config
|
|
1134
|
+
header_params["attributes_config"] = request.attributes_config
|
|
1135
|
+
end
|
|
1136
|
+
|
|
1137
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1138
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1139
|
+
|
|
1140
|
+
options.apply_defaults timeout: @config.rpcs.remove_catalog_attribute.timeout,
|
|
1141
|
+
metadata: metadata,
|
|
1142
|
+
retry_policy: @config.rpcs.remove_catalog_attribute.retry_policy
|
|
1143
|
+
|
|
1144
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1145
|
+
metadata: @config.metadata,
|
|
1146
|
+
retry_policy: @config.retry_policy
|
|
1147
|
+
|
|
1148
|
+
@catalog_service_stub.call_rpc :remove_catalog_attribute, request, options: options do |response, operation|
|
|
1149
|
+
yield response, operation if block_given?
|
|
1150
|
+
return response
|
|
1151
|
+
end
|
|
1152
|
+
rescue ::GRPC::BadStatus => e
|
|
1153
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1154
|
+
end
|
|
1155
|
+
|
|
1156
|
+
##
|
|
1157
|
+
# Replaces the specified
|
|
1158
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} in the
|
|
1159
|
+
# {::Google::Cloud::Retail::V2::AttributesConfig AttributesConfig} by updating the
|
|
1160
|
+
# catalog attribute with the same
|
|
1161
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute#key CatalogAttribute.key}.
|
|
1162
|
+
#
|
|
1163
|
+
# If the {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} to
|
|
1164
|
+
# replace does not exist, a NOT_FOUND error is returned.
|
|
1165
|
+
#
|
|
1166
|
+
# @overload replace_catalog_attribute(request, options = nil)
|
|
1167
|
+
# Pass arguments to `replace_catalog_attribute` via a request object, either of type
|
|
1168
|
+
# {::Google::Cloud::Retail::V2::ReplaceCatalogAttributeRequest} or an equivalent Hash.
|
|
1169
|
+
#
|
|
1170
|
+
# @param request [::Google::Cloud::Retail::V2::ReplaceCatalogAttributeRequest, ::Hash]
|
|
1171
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1172
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1173
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1174
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1175
|
+
#
|
|
1176
|
+
# @overload replace_catalog_attribute(attributes_config: nil, catalog_attribute: nil, update_mask: nil)
|
|
1177
|
+
# Pass arguments to `replace_catalog_attribute` via keyword arguments. Note that at
|
|
1178
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1179
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1180
|
+
#
|
|
1181
|
+
# @param attributes_config [::String]
|
|
1182
|
+
# Required. Full AttributesConfig resource name. Format:
|
|
1183
|
+
# `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
|
|
1184
|
+
# @param catalog_attribute [::Google::Cloud::Retail::V2::CatalogAttribute, ::Hash]
|
|
1185
|
+
# Required. The updated
|
|
1186
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}.
|
|
1187
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
1188
|
+
# Indicates which fields in the provided
|
|
1189
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} to update. The
|
|
1190
|
+
# following are NOT supported:
|
|
1191
|
+
#
|
|
1192
|
+
# * {::Google::Cloud::Retail::V2::CatalogAttribute#key CatalogAttribute.key}
|
|
1193
|
+
#
|
|
1194
|
+
# If not set, all supported fields are updated.
|
|
1195
|
+
#
|
|
1196
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1197
|
+
# @yieldparam response [::Google::Cloud::Retail::V2::AttributesConfig]
|
|
1198
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1199
|
+
#
|
|
1200
|
+
# @return [::Google::Cloud::Retail::V2::AttributesConfig]
|
|
1201
|
+
#
|
|
1202
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1203
|
+
#
|
|
1204
|
+
# @example Basic example
|
|
1205
|
+
# require "google/cloud/retail/v2"
|
|
1206
|
+
#
|
|
1207
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1208
|
+
# client = Google::Cloud::Retail::V2::CatalogService::Client.new
|
|
1209
|
+
#
|
|
1210
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1211
|
+
# request = Google::Cloud::Retail::V2::ReplaceCatalogAttributeRequest.new
|
|
1212
|
+
#
|
|
1213
|
+
# # Call the replace_catalog_attribute method.
|
|
1214
|
+
# result = client.replace_catalog_attribute request
|
|
1215
|
+
#
|
|
1216
|
+
# # The returned object is of type Google::Cloud::Retail::V2::AttributesConfig.
|
|
1217
|
+
# p result
|
|
1218
|
+
#
|
|
1219
|
+
def replace_catalog_attribute request, options = nil
|
|
1220
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1221
|
+
|
|
1222
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Retail::V2::ReplaceCatalogAttributeRequest
|
|
1223
|
+
|
|
1224
|
+
# Converts hash and nil to an options object
|
|
1225
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1226
|
+
|
|
1227
|
+
# Customize the options with defaults
|
|
1228
|
+
metadata = @config.rpcs.replace_catalog_attribute.metadata.to_h
|
|
1229
|
+
|
|
1230
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
1231
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1232
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1233
|
+
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
|
1234
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1235
|
+
|
|
1236
|
+
header_params = {}
|
|
1237
|
+
if request.attributes_config
|
|
1238
|
+
header_params["attributes_config"] = request.attributes_config
|
|
1239
|
+
end
|
|
1240
|
+
|
|
1241
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1242
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1243
|
+
|
|
1244
|
+
options.apply_defaults timeout: @config.rpcs.replace_catalog_attribute.timeout,
|
|
1245
|
+
metadata: metadata,
|
|
1246
|
+
retry_policy: @config.rpcs.replace_catalog_attribute.retry_policy
|
|
1247
|
+
|
|
1248
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1249
|
+
metadata: @config.metadata,
|
|
1250
|
+
retry_policy: @config.retry_policy
|
|
1251
|
+
|
|
1252
|
+
@catalog_service_stub.call_rpc :replace_catalog_attribute, request, options: options do |response, operation|
|
|
1253
|
+
yield response, operation if block_given?
|
|
1254
|
+
return response
|
|
1255
|
+
end
|
|
1256
|
+
rescue ::GRPC::BadStatus => e
|
|
1257
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1258
|
+
end
|
|
1259
|
+
|
|
591
1260
|
##
|
|
592
1261
|
# Configuration class for the CatalogService API.
|
|
593
1262
|
#
|
|
@@ -743,6 +1412,41 @@ module Google
|
|
|
743
1412
|
# @return [::Gapic::Config::Method]
|
|
744
1413
|
#
|
|
745
1414
|
attr_reader :get_default_branch
|
|
1415
|
+
##
|
|
1416
|
+
# RPC-specific configuration for `get_completion_config`
|
|
1417
|
+
# @return [::Gapic::Config::Method]
|
|
1418
|
+
#
|
|
1419
|
+
attr_reader :get_completion_config
|
|
1420
|
+
##
|
|
1421
|
+
# RPC-specific configuration for `update_completion_config`
|
|
1422
|
+
# @return [::Gapic::Config::Method]
|
|
1423
|
+
#
|
|
1424
|
+
attr_reader :update_completion_config
|
|
1425
|
+
##
|
|
1426
|
+
# RPC-specific configuration for `get_attributes_config`
|
|
1427
|
+
# @return [::Gapic::Config::Method]
|
|
1428
|
+
#
|
|
1429
|
+
attr_reader :get_attributes_config
|
|
1430
|
+
##
|
|
1431
|
+
# RPC-specific configuration for `update_attributes_config`
|
|
1432
|
+
# @return [::Gapic::Config::Method]
|
|
1433
|
+
#
|
|
1434
|
+
attr_reader :update_attributes_config
|
|
1435
|
+
##
|
|
1436
|
+
# RPC-specific configuration for `add_catalog_attribute`
|
|
1437
|
+
# @return [::Gapic::Config::Method]
|
|
1438
|
+
#
|
|
1439
|
+
attr_reader :add_catalog_attribute
|
|
1440
|
+
##
|
|
1441
|
+
# RPC-specific configuration for `remove_catalog_attribute`
|
|
1442
|
+
# @return [::Gapic::Config::Method]
|
|
1443
|
+
#
|
|
1444
|
+
attr_reader :remove_catalog_attribute
|
|
1445
|
+
##
|
|
1446
|
+
# RPC-specific configuration for `replace_catalog_attribute`
|
|
1447
|
+
# @return [::Gapic::Config::Method]
|
|
1448
|
+
#
|
|
1449
|
+
attr_reader :replace_catalog_attribute
|
|
746
1450
|
|
|
747
1451
|
# @private
|
|
748
1452
|
def initialize parent_rpcs = nil
|
|
@@ -754,6 +1458,20 @@ module Google
|
|
|
754
1458
|
@set_default_branch = ::Gapic::Config::Method.new set_default_branch_config
|
|
755
1459
|
get_default_branch_config = parent_rpcs.get_default_branch if parent_rpcs.respond_to? :get_default_branch
|
|
756
1460
|
@get_default_branch = ::Gapic::Config::Method.new get_default_branch_config
|
|
1461
|
+
get_completion_config_config = parent_rpcs.get_completion_config if parent_rpcs.respond_to? :get_completion_config
|
|
1462
|
+
@get_completion_config = ::Gapic::Config::Method.new get_completion_config_config
|
|
1463
|
+
update_completion_config_config = parent_rpcs.update_completion_config if parent_rpcs.respond_to? :update_completion_config
|
|
1464
|
+
@update_completion_config = ::Gapic::Config::Method.new update_completion_config_config
|
|
1465
|
+
get_attributes_config_config = parent_rpcs.get_attributes_config if parent_rpcs.respond_to? :get_attributes_config
|
|
1466
|
+
@get_attributes_config = ::Gapic::Config::Method.new get_attributes_config_config
|
|
1467
|
+
update_attributes_config_config = parent_rpcs.update_attributes_config if parent_rpcs.respond_to? :update_attributes_config
|
|
1468
|
+
@update_attributes_config = ::Gapic::Config::Method.new update_attributes_config_config
|
|
1469
|
+
add_catalog_attribute_config = parent_rpcs.add_catalog_attribute if parent_rpcs.respond_to? :add_catalog_attribute
|
|
1470
|
+
@add_catalog_attribute = ::Gapic::Config::Method.new add_catalog_attribute_config
|
|
1471
|
+
remove_catalog_attribute_config = parent_rpcs.remove_catalog_attribute if parent_rpcs.respond_to? :remove_catalog_attribute
|
|
1472
|
+
@remove_catalog_attribute = ::Gapic::Config::Method.new remove_catalog_attribute_config
|
|
1473
|
+
replace_catalog_attribute_config = parent_rpcs.replace_catalog_attribute if parent_rpcs.respond_to? :replace_catalog_attribute
|
|
1474
|
+
@replace_catalog_attribute = ::Gapic::Config::Method.new replace_catalog_attribute_config
|
|
757
1475
|
|
|
758
1476
|
yield self if block_given?
|
|
759
1477
|
end
|