Class: HealthVault::WCData::Thing::Thing

Inherits:
ComplexType show all
Defined in:
lib/wc_data/thing.rb,
lib/wc_data/generated/thing/thing.rb

Constant Summary collapse

@@class_hash =
Hash.new

Instance Attribute Summary

Attributes inherited from ComplexType

#tag_name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ComplexType

#add_new_to_children, #element, #method_missing, #optional_elements, #parse_element, #query_elements, #required_elements, #to_s, #valid?

Constructor Details

#initializeThing

Returns a new instance of Thing.



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/wc_data/generated/thing/thing.rb', line 155

def initialize
  super
  self.tag_name = 'thing'

  
  @children['thing-id'] = {:name => 'thing-id', :class => HealthVault::WCData::Thing::ThingKey, :value => nil, :min => 0, :max => 1, :order => 1, :place => :element, :choice => 0 }
    
  

  
  @children['type-id'] = {:name => 'type-id', :class => HealthVault::WCData::Thing::ThingType, :value => nil, :min => 0, :max => 1, :order => 2, :place => :element, :choice => 0 }
    
  

  
  @children['thing-state'] = {:name => 'thing-state', :class => HealthVault::WCData::Thing::ThingState, :value => nil, :min => 0, :max => 1, :order => 3, :place => :element, :choice => 0 }
    
  

  
  @children['flags'] = {:name => 'flags', :class => String, :value => nil, :min => 0, :max => 1, :order => 4, :place => :element, :choice => 0 }
    
  

  
  @children['eff-date'] = {:name => 'eff-date', :class => String, :value => nil, :min => 0, :max => 1, :order => 5, :place => :element, :choice => 0 }
    
  

  
  @children['updated'] = {:name => 'updated', :class => HealthVault::WCData::Thing::Audit, :value => nil, :min => 0, :max => 1, :order => 6, :place => :element, :choice => 0 }
    
  

  
  @children['data-xml'] = {:name => 'data-xml', :class => HealthVault::WCData::Thing::DataXml, :value => Array.new, :min => 0, :max => 999999, :order => 7, :place => :element, :choice => 0 }
  

  
  @children['data-other'] = {:name => 'data-other', :class => HealthVault::WCData::Thing::DataOther, :value => nil, :min => 0, :max => 1, :order => 8, :place => :element, :choice => 0 }
    
  

  
  @children['eff-permissions'] = {:name => 'eff-permissions', :class => HealthVault::WCData::Thing::EffectivePermissions, :value => nil, :min => 0, :max => 1, :order => 9, :place => :element, :choice => 0 }
    
  

  
  @children['tags'] = {:name => 'tags', :class => HealthVault::WCData::Types::String512, :value => nil, :min => 0, :max => 1, :order => 10, :place => :element, :choice => 0 }
    
  

end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class HealthVault::WCData::ComplexType

Class Method Details

.guid_to_class(guid) ⇒ Object



72
73
74
# File 'lib/wc_data/thing.rb', line 72

def self.guid_to_class(guid)
  return @@class_hash[guid]
end

Instance Method Details

#add_data_xml(value) ⇒ Object

value is a HealthVault::WCData::Thing::DataXml



98
99
100
# File 'lib/wc_data/generated/thing/thing.rb', line 98

def add_data_xml(value)
  @children['data-xml'][:value] << value
end

#data_otherObject

returns: a HealthVault::WCData::Thing::DataOther



122
123
124
# File 'lib/wc_data/generated/thing/thing.rb', line 122

def data_other
  return @children['data-other'][:value]
end

#data_other=(value) ⇒ Object

value is a HealthVault::WCData::Thing::DataOther



117
118
119
# File 'lib/wc_data/generated/thing/thing.rb', line 117

def data_other=(value)
  @children['data-other'][:value] = value
end

#data_xmlObject

returns: a HealthVault::WCData::Thing::DataXml Array



109
110
111
# File 'lib/wc_data/generated/thing/thing.rb', line 109

def data_xml
  return @children['data-xml'][:value]
end

#eff_dateObject

returns: a String



78
79
80
# File 'lib/wc_data/generated/thing/thing.rb', line 78

def eff_date
  return @children['eff-date'][:value]
end

#eff_date=(value) ⇒ Object

value is a String



73
74
75
# File 'lib/wc_data/generated/thing/thing.rb', line 73

def eff_date=(value)
  @children['eff-date'][:value] = value
end

#eff_permissionsObject

returns: a HealthVault::WCData::Thing::EffectivePermissions



135
136
137
# File 'lib/wc_data/generated/thing/thing.rb', line 135

def eff_permissions
  return @children['eff-permissions'][:value]
end

#eff_permissions=(value) ⇒ Object

value is a HealthVault::WCData::Thing::EffectivePermissions



130
131
132
# File 'lib/wc_data/generated/thing/thing.rb', line 130

def eff_permissions=(value)
  @children['eff-permissions'][:value] = value
end

#flagsObject

returns: a String



65
66
67
# File 'lib/wc_data/generated/thing/thing.rb', line 65

def flags
  return @children['flags'][:value]
end

#flags=(value) ⇒ Object

remarks: Currently supported flags: 0x1 (Personal) - the thing is accessible only by custodians. value is a String



60
61
62
# File 'lib/wc_data/generated/thing/thing.rb', line 60

def flags=(value)
  @children['flags'][:value] = value
end

#remove_data_xml(value) ⇒ Object

value is a #HealthVault::WCData::Thing::DataXml



103
104
105
# File 'lib/wc_data/generated/thing/thing.rb', line 103

def remove_data_xml(value)
    @children['data-xml'][:value].delete(value)
end

#tagsObject

returns: a HealthVault::WCData::Types::String512



149
150
151
# File 'lib/wc_data/generated/thing/thing.rb', line 149

def tags
  return @children['tags'][:value]
end

#tags=(value) ⇒ Object

value is a HealthVault::WCData::Types::String512



144
145
146
# File 'lib/wc_data/generated/thing/thing.rb', line 144

def tags=(value)
  @children['tags'][:value] = value
end

#thing_idObject

returns: a HealthVault::WCData::Thing::ThingKey



24
25
26
# File 'lib/wc_data/generated/thing/thing.rb', line 24

def thing_id
  return @children['thing-id'][:value]
end

#thing_id=(value) ⇒ Object

value is a HealthVault::WCData::Thing::ThingKey



19
20
21
# File 'lib/wc_data/generated/thing/thing.rb', line 19

def thing_id=(value)
  @children['thing-id'][:value] = value
end

#thing_stateObject

returns: a HealthVault::WCData::Thing::ThingState



50
51
52
# File 'lib/wc_data/generated/thing/thing.rb', line 50

def thing_state
  return @children['thing-state'][:value]
end

#thing_state=(value) ⇒ Object

value is a HealthVault::WCData::Thing::ThingState



45
46
47
# File 'lib/wc_data/generated/thing/thing.rb', line 45

def thing_state=(value)
  @children['thing-state'][:value] = value
end

#type_idObject

returns: a HealthVault::WCData::Thing::ThingType



37
38
39
# File 'lib/wc_data/generated/thing/thing.rb', line 37

def type_id
  return @children['type-id'][:value]
end

#type_id=(value) ⇒ Object

value is a HealthVault::WCData::Thing::ThingType



32
33
34
# File 'lib/wc_data/generated/thing/thing.rb', line 32

def type_id=(value)
  @children['type-id'][:value] = value
end

#updatedObject

returns: a HealthVault::WCData::Thing::Audit



91
92
93
# File 'lib/wc_data/generated/thing/thing.rb', line 91

def updated
  return @children['updated'][:value]
end

#updated=(value) ⇒ Object

value is a HealthVault::WCData::Thing::Audit



86
87
88
# File 'lib/wc_data/generated/thing/thing.rb', line 86

def updated=(value)
  @children['updated'][:value] = value
end