Class: Seahorse::Model::Operation

Inherits:
Object
  • Object
show all
Defined in:
aws-sdk-core/lib/seahorse/model/operation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(definition = {}, options = {}) ⇒ Operation

Returns a new instance of Operation

Options Hash (options):

  • :shape_map (ShapeMap)

7
8
9
10
11
12
13
14
15
16
# File 'aws-sdk-core/lib/seahorse/model/operation.rb', line 7

def initialize(definition = {}, options = {})
  @definition = definition
  @shape_map = options[:shape_map] || ShapeMap.new
  @name = definition['name']
  @input = shape_for(definition['input']) if definition['input']
  @output = shape_for(definition['output']) if definition['output']
  @deprecated = !!definition['deprecated']
  @documentation = definition['documentation']
  @paging = definition['paging'] || {}
end

Instance Attribute Details

#definitionHash (readonly)


40
41
42
# File 'aws-sdk-core/lib/seahorse/model/operation.rb', line 40

def definition
  @definition
end

#documentationString<HTML>? (readonly)


28
29
30
# File 'aws-sdk-core/lib/seahorse/model/operation.rb', line 28

def documentation
  @documentation
end

#http_methodString (readonly)


22
23
24
# File 'aws-sdk-core/lib/seahorse/model/operation.rb', line 22

def http_method
  @http_method
end

#http_request_uriString (readonly)


25
26
27
# File 'aws-sdk-core/lib/seahorse/model/operation.rb', line 25

def http_request_uri
  @http_request_uri
end

#inputShape? (readonly)


31
32
33
# File 'aws-sdk-core/lib/seahorse/model/operation.rb', line 31

def input
  @input
end

#nameString (readonly)


19
20
21
# File 'aws-sdk-core/lib/seahorse/model/operation.rb', line 19

def name
  @name
end

#outputShape? (readonly)


34
35
36
# File 'aws-sdk-core/lib/seahorse/model/operation.rb', line 34

def output
  @output
end

#pagingHash (readonly)


37
38
39
# File 'aws-sdk-core/lib/seahorse/model/operation.rb', line 37

def paging
  @paging
end

Instance Method Details

#deprecated?Boolean


53
54
55
# File 'aws-sdk-core/lib/seahorse/model/operation.rb', line 53

def deprecated?
  !!@definition['deprecated']
end

#errorsEnumerator


59
60
61
62
63
# File 'aws-sdk-core/lib/seahorse/model/operation.rb', line 59

def errors
  errors = (definition['errors'] || [])
  errors = errors.map { |error| shape_for(error) }
  errors.enum_for(:each)
end