Class: Seahorse::Model::Shapes::ShapeRef

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ShapeRef

Returns a new instance of ShapeRef.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 11

def initialize(options = {})
  @metadata = {}
  @required = false
  @deprecated = false
  @location = nil
  @location_name = nil
  @event = false
  @eventstream = false
  @eventpayload = false
  @eventpayload_type = ''.freeze
  @eventheader = false
  @eventheader_type = ''.freeze
  options.each do |key, value|
    if key == :metadata
      value.each do |k,v|
        self[k] = v
      end
    else
      send("#{key}=", value)
    end
  end
end

Instance Attribute Details

#deprecatedBoolean

Returns:

  • (Boolean)


44
45
46
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 44

def deprecated
  @deprecated
end

#documentBoolean

Returns:

  • (Boolean)


65
66
67
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 65

def document
  @document
end

#documentationString?

Returns:

  • (String, nil)


41
42
43
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 41

def documentation
  @documentation
end

#eventBoolean

Returns:

  • (Boolean)


47
48
49
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 47

def event
  @event
end

#eventheaderBoolean

Returns:

  • (Boolean)


56
57
58
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 56

def eventheader
  @eventheader
end

#eventheader_typeBoolean

Returns:

  • (Boolean)


62
63
64
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 62

def eventheader_type
  @eventheader_type
end

#eventpayloadBoolean

Returns:

  • (Boolean)


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

def eventpayload
  @eventpayload
end

#eventpayload_typeString

Returns:

  • (String)


59
60
61
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 59

def eventpayload_type
  @eventpayload_type
end

#eventstreamBoolean

Returns:

  • (Boolean)


50
51
52
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 50

def eventstream
  @eventstream
end

#requiredBoolean

Returns:

  • (Boolean)


38
39
40
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 38

def required
  @required
end

#shapeShape

Returns:



35
36
37
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 35

def shape
  @shape
end

Instance Method Details

#[](key) ⇒ Object

Gets metadata for the given key.



86
87
88
89
90
91
92
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 86

def [](key)
  if @metadata.key?(key.to_s)
    @metadata[key.to_s]
  elsif @shape
    @shape[key.to_s]
  end
end

#[]=(key, value) ⇒ Object

Sets metadata for the given key.



95
96
97
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 95

def []=(key, value)
  @metadata[key.to_s] = value
end

#locationString?

Returns:

  • (String, nil)


68
69
70
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 68

def location
  @location || (shape && shape[:location])
end

#location=(location) ⇒ Object



72
73
74
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 72

def location= location
  @location = location
end

#location_nameString?

Returns:

  • (String, nil)


77
78
79
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 77

def location_name
  @location_name || (shape && shape['locationName'])
end

#location_name=(location_name) ⇒ Object



81
82
83
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 81

def location_name= location_name
  @location_name = location_name
end