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

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

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#attr_value, #characters, #end_element_namespace, #initialize, #start_element_namespace, #value

Constructor Details

This class inherits a constructor from Fog::Parsers::Base

Instance Method Details

#end_element(name) ⇒ Object



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

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



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

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)


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

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

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



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

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