Class: Gapic::Model::Method::NonStandardLro
- Inherits:
-
Object
- Object
- Gapic::Model::Method::NonStandardLro
- Defined in:
- lib/gapic/model/method/lro.rb
Overview
Nonstandard (AIP-151 nonconforming) long-running operation method-level model
Instance Attribute Summary collapse
- #operation_request_fields ⇒ Map<String, String> readonly
- #service_full_name ⇒ String readonly
Instance Method Summary collapse
-
#aip_lro? ⇒ Boolean
Whether this is a model for the AIP-151 LRO.
-
#initialize(method, service_full_name) ⇒ NonStandardLro
constructor
A new instance of NonStandardLro.
-
#nonstandard_lro? ⇒ Boolean
Whether this is a model for the nonstandard LRO.
Constructor Details
#initialize(method, service_full_name) ⇒ NonStandardLro
51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/gapic/model/method/lro.rb', line 51 def initialize method, service_full_name @service_full_name = service_full_name # optionally, there might be things to copy from this method's input object # to the LRO service's input object (`operation_request_field` annotation) ops_request_fields = method.input.fields.find_all do |f| !f.operation_request_field.nil? && !f.operation_request_field.empty? end @operation_request_fields = ops_request_fields.to_h do |field| [field.name, field.operation_request_field] end end |
Instance Attribute Details
#operation_request_fields ⇒ Map<String, String> (readonly)
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/gapic/model/method/lro.rb', line 42 class NonStandardLro # @return [String] attr_reader :service_full_name # @return [Map<String, String>] attr_reader :operation_request_fields ## # @param method [Gapic::Schema::Method] # @param service_full_name [String] Full grpc name of the provider service for this method's LRO def initialize method, service_full_name @service_full_name = service_full_name # optionally, there might be things to copy from this method's input object # to the LRO service's input object (`operation_request_field` annotation) ops_request_fields = method.input.fields.find_all do |f| !f.operation_request_field.nil? && !f.operation_request_field.empty? end @operation_request_fields = ops_request_fields.to_h do |field| [field.name, field.operation_request_field] end end ## # @return [Boolean] Whether this is a model for the nonstandard LRO # def nonstandard_lro? true end ## # @return [Boolean] Whether this is a model for the AIP-151 LRO # def aip_lro? false end end |
#service_full_name ⇒ String (readonly)
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/gapic/model/method/lro.rb', line 42 class NonStandardLro # @return [String] attr_reader :service_full_name # @return [Map<String, String>] attr_reader :operation_request_fields ## # @param method [Gapic::Schema::Method] # @param service_full_name [String] Full grpc name of the provider service for this method's LRO def initialize method, service_full_name @service_full_name = service_full_name # optionally, there might be things to copy from this method's input object # to the LRO service's input object (`operation_request_field` annotation) ops_request_fields = method.input.fields.find_all do |f| !f.operation_request_field.nil? && !f.operation_request_field.empty? end @operation_request_fields = ops_request_fields.to_h do |field| [field.name, field.operation_request_field] end end ## # @return [Boolean] Whether this is a model for the nonstandard LRO # def nonstandard_lro? true end ## # @return [Boolean] Whether this is a model for the AIP-151 LRO # def aip_lro? false end end |
Instance Method Details
#aip_lro? ⇒ Boolean
75 76 77 |
# File 'lib/gapic/model/method/lro.rb', line 75 def aip_lro? false end |
#nonstandard_lro? ⇒ Boolean
68 69 70 |
# File 'lib/gapic/model/method/lro.rb', line 68 def nonstandard_lro? true end |