Class: Verizon::DtoNotificationGroupResponseEntity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::DtoNotificationGroupResponseEntity
- Defined in:
- lib/verizon/models/dto_notification_group_response_entity.rb
Overview
DtoNotificationGroupResponseEntity Model.
Instance Attribute Summary collapse
-
#createdon ⇒ DateTime
Timestamp of the record.
-
#description ⇒ String
a short description.
-
#foreignid ⇒ String
UUID of the ECPD account the user belongs to.
-
#groupemail ⇒ String
Contact email for the group.
-
#id ⇒ String
UUID of the user record, assigned at creation.
-
#lastupdated ⇒ DateTime
Timestamp of the record.
-
#name ⇒ String
User defined name of the record.
-
#users ⇒ Array[DtoUserDto]
User defined name of the record.
-
#version ⇒ String
The resource version.
-
#versionid ⇒ String
The UUID of the resource version.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(createdon: SKIP, description: SKIP, foreignid: SKIP, groupemail: SKIP, id: SKIP, lastupdated: SKIP, name: SKIP, users: SKIP, version: SKIP, versionid: SKIP) ⇒ DtoNotificationGroupResponseEntity
constructor
A new instance of DtoNotificationGroupResponseEntity.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_createdon ⇒ Object
- #to_custom_lastupdated ⇒ Object
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(createdon: SKIP, description: SKIP, foreignid: SKIP, groupemail: SKIP, id: SKIP, lastupdated: SKIP, name: SKIP, users: SKIP, version: SKIP, versionid: SKIP) ⇒ DtoNotificationGroupResponseEntity
Returns a new instance of DtoNotificationGroupResponseEntity.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 90 def initialize(createdon: SKIP, description: SKIP, foreignid: SKIP, groupemail: SKIP, id: SKIP, lastupdated: SKIP, name: SKIP, users: SKIP, version: SKIP, versionid: SKIP) @createdon = createdon unless createdon == SKIP @description = description unless description == SKIP @foreignid = foreignid unless foreignid == SKIP @groupemail = groupemail unless groupemail == SKIP @id = id unless id == SKIP @lastupdated = lastupdated unless lastupdated == SKIP @name = name unless name == SKIP @users = users unless users == SKIP @version = version unless version == SKIP @versionid = versionid unless versionid == SKIP end |
Instance Attribute Details
#createdon ⇒ DateTime
Timestamp of the record
15 16 17 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 15 def createdon @createdon end |
#description ⇒ String
a short description
19 20 21 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 19 def description @description end |
#foreignid ⇒ String
UUID of the ECPD account the user belongs to
23 24 25 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 23 def foreignid @foreignid end |
#groupemail ⇒ String
Contact email for the group
27 28 29 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 27 def groupemail @groupemail end |
#id ⇒ String
UUID of the user record, assigned at creation
31 32 33 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 31 def id @id end |
#lastupdated ⇒ DateTime
Timestamp of the record
35 36 37 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 35 def lastupdated @lastupdated end |
#name ⇒ String
User defined name of the record
39 40 41 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 39 def name @name end |
#users ⇒ Array[DtoUserDto]
User defined name of the record
43 44 45 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 43 def users @users end |
#version ⇒ String
The resource version
47 48 49 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 47 def version @version end |
#versionid ⇒ String
The UUID of the resource version
51 52 53 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 51 def versionid @versionid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 106 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. createdon = if hash.key?('createdon') (DateTimeHelper.from_rfc3339(hash['createdon']) if hash['createdon']) else SKIP end description = hash.key?('description') ? hash['description'] : SKIP foreignid = hash.key?('foreignid') ? hash['foreignid'] : SKIP groupemail = hash.key?('groupemail') ? hash['groupemail'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP lastupdated = if hash.key?('lastupdated') (DateTimeHelper.from_rfc3339(hash['lastupdated']) if hash['lastupdated']) else SKIP end name = hash.key?('name') ? hash['name'] : SKIP # Parameter is an array, so we need to iterate through it users = nil unless hash['users'].nil? users = [] hash['users'].each do |structure| users << (DtoUserDto.from_hash(structure) if structure) end end users = SKIP unless hash.key?('users') version = hash.key?('version') ? hash['version'] : SKIP versionid = hash.key?('versionid') ? hash['versionid'] : SKIP # Create object from extracted values. DtoNotificationGroupResponseEntity.new(createdon: createdon, description: description, foreignid: foreignid, groupemail: groupemail, id: id, lastupdated: lastupdated, name: name, users: users, version: version, versionid: versionid) end |
.names ⇒ Object
A mapping from model property names to API property names.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 54 def self.names @_hash = {} if @_hash.nil? @_hash['createdon'] = 'createdon' @_hash['description'] = 'description' @_hash['foreignid'] = 'foreignid' @_hash['groupemail'] = 'groupemail' @_hash['id'] = 'id' @_hash['lastupdated'] = 'lastupdated' @_hash['name'] = 'name' @_hash['users'] = 'users' @_hash['version'] = 'version' @_hash['versionid'] = 'versionid' @_hash end |
.nullables ⇒ Object
An array for nullable fields
86 87 88 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 86 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 70 def self.optionals %w[ createdon description foreignid groupemail id lastupdated name users version versionid ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
168 169 170 171 172 173 174 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 168 def inspect class_name = self.class.name.split('::').last "<#{class_name} createdon: #{@createdon.inspect}, description: #{@description.inspect},"\ " foreignid: #{@foreignid.inspect}, groupemail: #{@groupemail.inspect}, id: #{@id.inspect},"\ " lastupdated: #{@lastupdated.inspect}, name: #{@name.inspect}, users: #{@users.inspect},"\ " version: #{@version.inspect}, versionid: #{@versionid.inspect}>" end |
#to_custom_createdon ⇒ Object
151 152 153 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 151 def to_custom_createdon DateTimeHelper.to_rfc3339(createdon) end |
#to_custom_lastupdated ⇒ Object
155 156 157 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 155 def to_custom_lastupdated DateTimeHelper.to_rfc3339(lastupdated) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
160 161 162 163 164 165 |
# File 'lib/verizon/models/dto_notification_group_response_entity.rb', line 160 def to_s class_name = self.class.name.split('::').last "<#{class_name} createdon: #{@createdon}, description: #{@description}, foreignid:"\ " #{@foreignid}, groupemail: #{@groupemail}, id: #{@id}, lastupdated: #{@lastupdated}, name:"\ " #{@name}, users: #{@users}, version: #{@version}, versionid: #{@versionid}>" end |