You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

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



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

def initialize(options = {})
  @metadata = {}
  @required = false
  @deprecated = false
  @event = false
  @eventstream = false
  @eventpayload = false
  @eventpayload_type = ''
  @eventheader = false
  @eventheader_type = ''
  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)


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

def deprecated
  @deprecated
end

#documentationString?

Returns:

  • (String, nil)


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

def documentation
  @documentation
end

#eventBoolean

Returns:

  • (Boolean)


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

def event
  @event
end

#eventheaderBoolean

Returns:

  • (Boolean)


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

def eventheader
  @eventheader
end

#eventheader_typeBoolean

Returns:

  • (Boolean)


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

def eventheader_type
  @eventheader_type
end

#eventpayloadBoolean

Returns:

  • (Boolean)


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

def eventpayload
  @eventpayload
end

#eventpayload_typeString

Returns:

  • (String)


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

def eventpayload_type
  @eventpayload_type
end

#eventstreamBoolean

Returns:

  • (Boolean)


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

def eventstream
  @eventstream
end

#requiredBoolean

Returns:

  • (Boolean)


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

def required
  @required
end

#shapeShape

Returns:



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

def shape
  @shape
end

Instance Method Details

#[](key) ⇒ Object

Gets metadata for the given key.



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

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.



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

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

#locationString?

Returns:

  • (String, nil)


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

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

#location=(location) ⇒ Object



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

def location= location
  @location = location
end

#location_nameString?

Returns:

  • (String, nil)


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

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

#location_name=(location_name) ⇒ Object



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

def location_name= location_name
  @location_name = location_name
end