Class: Comet::Office365MixedVirtualAccount
- Inherits:
-
Object
- Object
- Comet::Office365MixedVirtualAccount
- Defined in:
- lib/comet/models/office_365mixed_virtual_account.rb
Overview
Office365MixedVirtualAccount is a typed class wrapper around the underlying Comet Server API data structure.
Instance Attribute Summary collapse
-
#default_drive_id ⇒ Object
Returns the value of attribute default_drive_id.
-
#disabled ⇒ Object
Returns the value of attribute disabled.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#enabled_service_option ⇒ Object
Returns the value of attribute enabled_service_option.
-
#has_license ⇒ Object
Returns the value of attribute has_license.
-
#id ⇒ Object
Returns the value of attribute id.
-
#job_title ⇒ Object
Returns the value of attribute job_title.
-
#mail ⇒ Object
Returns the value of attribute mail.
-
#member_service_options ⇒ Object
Returns the value of attribute member_service_options.
-
#members ⇒ Object
Returns the value of attribute members.
-
#service_options ⇒ Object
Returns the value of attribute service_options.
-
#site_id ⇒ Object
Returns the value of attribute site_id.
-
#type ⇒ Object
Returns the value of attribute type.
-
#unknown_json_fields ⇒ Object
Returns the value of attribute unknown_json_fields.
-
#user_principal_name ⇒ Object
Returns the value of attribute user_principal_name.
-
#web_id ⇒ Object
Returns the value of attribute web_id.
-
#web_url ⇒ Object
Returns the value of attribute web_url.
Instance Method Summary collapse
- #clear ⇒ Object
- #from_hash(obj) ⇒ Object
- #from_json(json_string) ⇒ Object
-
#initialize ⇒ Office365MixedVirtualAccount
constructor
A new instance of Office365MixedVirtualAccount.
-
#to_h ⇒ Hash
The complete object as a Ruby hash.
-
#to_hash ⇒ Hash
The complete object as a Ruby hash.
-
#to_json(options = {}) ⇒ String
The complete object as a JSON string.
Constructor Details
#initialize ⇒ Office365MixedVirtualAccount
Returns a new instance of Office365MixedVirtualAccount.
66 67 68 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 66 def initialize clear end |
Instance Attribute Details
#default_drive_id ⇒ Object
Returns the value of attribute default_drive_id.
16 17 18 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 16 def default_drive_id @default_drive_id end |
#disabled ⇒ Object
Returns the value of attribute disabled.
19 20 21 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 19 def disabled @disabled end |
#display_name ⇒ Object
Returns the value of attribute display_name.
22 23 24 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 22 def display_name @display_name end |
#enabled_service_option ⇒ Object
Returns the value of attribute enabled_service_option.
25 26 27 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 25 def enabled_service_option @enabled_service_option end |
#has_license ⇒ Object
Returns the value of attribute has_license.
61 62 63 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 61 def has_license @has_license end |
#id ⇒ Object
Returns the value of attribute id.
28 29 30 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 28 def id @id end |
#job_title ⇒ Object
Returns the value of attribute job_title.
31 32 33 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 31 def job_title @job_title end |
#mail ⇒ Object
Returns the value of attribute mail.
34 35 36 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 34 def mail @mail end |
#member_service_options ⇒ Object
Returns the value of attribute member_service_options.
58 59 60 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 58 def @member_service_options end |
#members ⇒ Object
Returns the value of attribute members.
52 53 54 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 52 def members @members end |
#service_options ⇒ Object
Returns the value of attribute service_options.
55 56 57 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 55 def @service_options end |
#site_id ⇒ Object
Returns the value of attribute site_id.
37 38 39 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 37 def site_id @site_id end |
#type ⇒ Object
Returns the value of attribute type.
40 41 42 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 40 def type @type end |
#unknown_json_fields ⇒ Object
Returns the value of attribute unknown_json_fields.
64 65 66 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 64 def unknown_json_fields @unknown_json_fields end |
#user_principal_name ⇒ Object
Returns the value of attribute user_principal_name.
43 44 45 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 43 def user_principal_name @user_principal_name end |
#web_id ⇒ Object
Returns the value of attribute web_id.
46 47 48 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 46 def web_id @web_id end |
#web_url ⇒ Object
Returns the value of attribute web_url.
49 50 51 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 49 def web_url @web_url end |
Instance Method Details
#clear ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 70 def clear @default_drive_id = '' @display_name = '' @enabled_service_option = 0 @id = '' @job_title = '' @mail = '' @site_id = '' @type = 0 @user_principal_name = '' @web_id = '' @web_url = '' @members = [] @service_options = 0 @member_service_options = 0 @unknown_json_fields = {} end |
#from_hash(obj) ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 96 def from_hash(obj) raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash obj.each do |k, v| case k when 'DefaultDriveID' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @default_drive_id = v when 'Disabled' @disabled = v when 'DisplayName' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @display_name = v when 'EnabledServiceOption' raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric @enabled_service_option = v when 'id' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @id = v when 'JobTitle' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @job_title = v when 'Mail' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @mail = v when 'SiteID' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @site_id = v when 'Type' raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric @type = v when 'UserPrincipalName' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @user_principal_name = v when 'WebID' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @web_id = v when 'WebURL' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @web_url = v when 'Members' if v.nil? @members = [] else @members = Array.new(v.length) v.each_with_index do |v1, i1| raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String @members[i1] = v1 end end when 'ServiceOptions' raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric @service_options = v when 'MemberServiceOptions' raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric @member_service_options = v when 'hasLicense' @has_license = v else @unknown_json_fields[k] = v end end end |
#from_json(json_string) ⇒ Object
89 90 91 92 93 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 89 def from_json(json_string) raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String from_hash(JSON.parse(json_string)) end |
#to_h ⇒ Hash
Returns The complete object as a Ruby hash.
230 231 232 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 230 def to_h to_hash end |
#to_hash ⇒ Hash
Returns The complete object as a Ruby hash.
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 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 175 def to_hash ret = {} unless @default_drive_id.nil? ret['DefaultDriveID'] = @default_drive_id end unless @disabled.nil? ret['Disabled'] = @disabled end unless @display_name.nil? ret['DisplayName'] = @display_name end unless @enabled_service_option.nil? ret['EnabledServiceOption'] = @enabled_service_option end ret['id'] = @id unless @job_title.nil? ret['JobTitle'] = @job_title end unless @mail.nil? ret['Mail'] = @mail end unless @site_id.nil? ret['SiteID'] = @site_id end unless @type.nil? ret['Type'] = @type end unless @user_principal_name.nil? ret['UserPrincipalName'] = @user_principal_name end unless @web_id.nil? ret['WebID'] = @web_id end unless @web_url.nil? ret['WebURL'] = @web_url end unless @members.nil? ret['Members'] = @members end unless @service_options.nil? ret['ServiceOptions'] = @service_options end unless @member_service_options.nil? ret['MemberServiceOptions'] = @member_service_options end unless @has_license.nil? ret['hasLicense'] = @has_license end @unknown_json_fields.each do |k, v| ret[k] = v end ret end |
#to_json(options = {}) ⇒ String
Returns The complete object as a JSON string.
235 236 237 |
# File 'lib/comet/models/office_365mixed_virtual_account.rb', line 235 def to_json( = {}) to_hash.to_json() end |