Class: Fog::Parsers::Redshift::AWS::DescribeOrderableClusterOptions

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/aws/parsers/redshift/describe_orderable_cluster_options.rb

Instance Method Summary collapse

Instance Method Details

#end_element(name) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/fog/aws/parsers/redshift/describe_orderable_cluster_options.rb', line 32

def end_element(name)
  super
  case name
  when 'Marker'
    @response[name] = value
  when 'ClusterVersion', 'ClusterType', 'NodeType'
    @orderable_cluster_option[name] = value
  when 'Name'
    @availability_zone[name] = value
  when 'AvailabilityZone'
    @orderable_cluster_option['AvailabilityZones'] << {name => @availability_zone}
    @availability_zone = {}
  when 'OrderableClusterOption'
    @response['OrderableClusterOptions'] << {name => @orderable_cluster_option}
    @orderable_cluster_option = fresh_orderable_cluster_option
  end
end

#fresh_orderable_cluster_optionObject



18
19
20
# File 'lib/fog/aws/parsers/redshift/describe_orderable_cluster_options.rb', line 18

def fresh_orderable_cluster_option
 {'AvailabilityZones' => []}
end

#resetObject

:marker - (String) :orderable_cluster_options - (Array)

:cluster_version - (String)
:cluster_type - (String)
:node_type - (String)
:availability_zones - (Array)
  :name - (String)


14
15
16
# File 'lib/fog/aws/parsers/redshift/describe_orderable_cluster_options.rb', line 14

def reset
  @response = { 'OrderableClusterOptions' => [] }
end

#start_element(name, attrs = []) ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'lib/fog/aws/parsers/redshift/describe_orderable_cluster_options.rb', line 22

def start_element(name, attrs = [])
  super
  case name
  when 'OrderableClusterOptions'
    @orderable_cluster_option = fresh_orderable_cluster_option
  when 'AvailabilityZones'
    @availability_zone = {}
  end
end