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

#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.



83
84
85
86
87
88
89
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 83

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

#[]=(key, value) ⇒ Object

Sets metadata for the given key.



92
93
94
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 92

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

#locationString?

Returns:

  • (String, nil)


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

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

#location=(location) ⇒ Object



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

def location= location
  @location = location
end

#location_nameString?

Returns:

  • (String, nil)


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

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

#location_name=(location_name) ⇒ Object



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

def location_name= location_name
  @location_name = location_name
end