Class: Google::Apis::DiscoveryV1::RestMethod
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryV1::RestMethod
- Defined in:
- lib/google/apis/generator/model.rb
Instance Attribute Summary collapse
-
#generated_name ⇒ Object
Returns the value of attribute generated_name.
-
#parent ⇒ Object
Returns the value of attribute parent.
Instance Method Summary collapse
- #optional_query_parameters ⇒ Object
- #parameters ⇒ Object
- #path_parameters ⇒ Object
- #query_parameters ⇒ Object
- #required_parameters ⇒ Object
Instance Attribute Details
#generated_name ⇒ Object
Returns the value of attribute generated_name.
74 75 76 |
# File 'lib/google/apis/generator/model.rb', line 74 def generated_name @generated_name end |
#parent ⇒ Object
Returns the value of attribute parent.
75 76 77 |
# File 'lib/google/apis/generator/model.rb', line 75 def parent @parent end |
Instance Method Details
#optional_query_parameters ⇒ Object
96 97 98 |
# File 'lib/google/apis/generator/model.rb', line 96 def optional_query_parameters query_parameters.select { |param| param.required != true } end |
#parameters ⇒ Object
77 78 79 |
# File 'lib/google/apis/generator/model.rb', line 77 def parameters Hash[(@parameters || {}).sort] end |
#path_parameters ⇒ Object
81 82 83 84 |
# File 'lib/google/apis/generator/model.rb', line 81 def path_parameters return [] if parameter_order.nil? || parameters.nil? parameter_order.map { |name| parameters[name] }.select { |param| param.location == 'path' } end |
#query_parameters ⇒ Object
86 87 88 89 |
# File 'lib/google/apis/generator/model.rb', line 86 def query_parameters return [] if parameters.nil? parameters.values.select { |param| param.location == 'query' } end |
#required_parameters ⇒ Object
91 92 93 94 |
# File 'lib/google/apis/generator/model.rb', line 91 def required_parameters return [] if parameter_order.nil? || parameters.nil? parameter_order.map { |name| parameters[name] }.select { |param| param.location == 'path' || param.required } end |