Class: Verizon::Subscription
- Defined in:
- lib/verizon/models/subscription.rb
Overview
Subscription resource definition.
Instance Attribute Summary collapse
-
#configurationfailures ⇒ Integer
The number of streaming failures due to faulty configuration.
-
#createdon ⇒ String
The number of streaming failures due to faulty configuration.
-
#delegateid ⇒ String
Not currently used.
-
#description ⇒ String
Description of the subscription.
-
#disabled ⇒ TrueClass | FalseClass
Whether the subscription is currently sending data.
-
#email ⇒ String
The address to which any error reports should be delivered.
-
#filter ⇒ String
Filter for events.
-
#id ⇒ String
ThingSpace unique ID for the subscription that was created.
-
#kind ⇒ String
Identifies the resource kind.
-
#laststreamingstatus ⇒ String
Possible values: success or fail.
-
#laststreamingtime ⇒ String
The date and time that the last stream send was attempted.
-
#lastupdated ⇒ String
The date the resource was last updated.
-
#name ⇒ String
Name of the subscription.
-
#networkfailures ⇒ Integer
The number of failures due to network problems.
-
#streamfailures ⇒ Integer
The number of failures due to network problems.
-
#streamkind ⇒ String
The event type that will be sent in the data stream.
-
#targetid ⇒ String
Target to be used for dispatching events.
-
#targettype ⇒ String
Target to be used for dispatching events.
-
#version ⇒ String
Version of the underlying schema resource.
-
#versionid ⇒ String
The version of the resource.
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
Methods inherited from BaseModel
Constructor Details
#initialize(configurationfailures = SKIP, createdon = SKIP, delegateid = SKIP, description = SKIP, disabled = SKIP, email = SKIP, filter = SKIP, id = SKIP, kind = SKIP, laststreamingstatus = SKIP, laststreamingtime = SKIP, lastupdated = SKIP, name = SKIP, networkfailures = SKIP, streamfailures = SKIP, streamkind = SKIP, targetid = SKIP, targettype = SKIP, version = SKIP, versionid = SKIP) ⇒ Subscription
Returns a new instance of Subscription.
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/verizon/models/subscription.rb', line 149 def initialize(configurationfailures = SKIP, createdon = SKIP, delegateid = SKIP, description = SKIP, disabled = SKIP, email = SKIP, filter = SKIP, id = SKIP, kind = SKIP, laststreamingstatus = SKIP, laststreamingtime = SKIP, lastupdated = SKIP, name = SKIP, networkfailures = SKIP, streamfailures = SKIP, streamkind = SKIP, targetid = SKIP, targettype = SKIP, version = SKIP, versionid = SKIP) @configurationfailures = configurationfailures unless configurationfailures == SKIP @createdon = createdon unless createdon == SKIP @delegateid = delegateid unless delegateid == SKIP @description = description unless description == SKIP @disabled = disabled unless disabled == SKIP @email = email unless email == SKIP @filter = filter unless filter == SKIP @id = id unless id == SKIP @kind = kind unless kind == SKIP @laststreamingstatus = laststreamingstatus unless laststreamingstatus == SKIP @laststreamingtime = laststreamingtime unless laststreamingtime == SKIP @lastupdated = lastupdated unless lastupdated == SKIP @name = name unless name == SKIP @networkfailures = networkfailures unless networkfailures == SKIP @streamfailures = streamfailures unless streamfailures == SKIP @streamkind = streamkind unless streamkind == SKIP @targetid = targetid unless targetid == SKIP @targettype = targettype unless targettype == SKIP @version = version unless version == SKIP @versionid = versionid unless versionid == SKIP end |
Instance Attribute Details
#configurationfailures ⇒ Integer
The number of streaming failures due to faulty configuration.
14 15 16 |
# File 'lib/verizon/models/subscription.rb', line 14 def configurationfailures @configurationfailures end |
#createdon ⇒ String
The number of streaming failures due to faulty configuration.
18 19 20 |
# File 'lib/verizon/models/subscription.rb', line 18 def createdon @createdon end |
#delegateid ⇒ String
Not currently used.
22 23 24 |
# File 'lib/verizon/models/subscription.rb', line 22 def delegateid @delegateid end |
#description ⇒ String
Description of the subscription.
26 27 28 |
# File 'lib/verizon/models/subscription.rb', line 26 def description @description end |
#disabled ⇒ TrueClass | FalseClass
Whether the subscription is currently sending data.
30 31 32 |
# File 'lib/verizon/models/subscription.rb', line 30 def disabled @disabled end |
#email ⇒ String
The address to which any error reports should be delivered.
34 35 36 |
# File 'lib/verizon/models/subscription.rb', line 34 def email @email end |
#filter ⇒ String
Filter for events.
38 39 40 |
# File 'lib/verizon/models/subscription.rb', line 38 def filter @filter end |
#id ⇒ String
ThingSpace unique ID for the subscription that was created.
42 43 44 |
# File 'lib/verizon/models/subscription.rb', line 42 def id @id end |
#kind ⇒ String
Identifies the resource kind.
46 47 48 |
# File 'lib/verizon/models/subscription.rb', line 46 def kind @kind end |
#laststreamingstatus ⇒ String
Possible values: success or fail.
50 51 52 |
# File 'lib/verizon/models/subscription.rb', line 50 def laststreamingstatus @laststreamingstatus end |
#laststreamingtime ⇒ String
The date and time that the last stream send was attempted.
54 55 56 |
# File 'lib/verizon/models/subscription.rb', line 54 def laststreamingtime @laststreamingtime end |
#lastupdated ⇒ String
The date the resource was last updated.
58 59 60 |
# File 'lib/verizon/models/subscription.rb', line 58 def lastupdated @lastupdated end |
#name ⇒ String
Name of the subscription.
62 63 64 |
# File 'lib/verizon/models/subscription.rb', line 62 def name @name end |
#networkfailures ⇒ Integer
The number of failures due to network problems.
66 67 68 |
# File 'lib/verizon/models/subscription.rb', line 66 def networkfailures @networkfailures end |
#streamfailures ⇒ Integer
The number of failures due to network problems.
70 71 72 |
# File 'lib/verizon/models/subscription.rb', line 70 def streamfailures @streamfailures end |
#streamkind ⇒ String
The event type that will be sent in the data stream.
74 75 76 |
# File 'lib/verizon/models/subscription.rb', line 74 def streamkind @streamkind end |
#targetid ⇒ String
Target to be used for dispatching events.
78 79 80 |
# File 'lib/verizon/models/subscription.rb', line 78 def targetid @targetid end |
#targettype ⇒ String
Target to be used for dispatching events.
82 83 84 |
# File 'lib/verizon/models/subscription.rb', line 82 def targettype @targettype end |
#version ⇒ String
Version of the underlying schema resource.
86 87 88 |
# File 'lib/verizon/models/subscription.rb', line 86 def version @version end |
#versionid ⇒ String
The version of the resource.
90 91 92 |
# File 'lib/verizon/models/subscription.rb', line 90 def versionid @versionid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 228 229 230 |
# File 'lib/verizon/models/subscription.rb', line 179 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. configurationfailures = hash.key?('configurationfailures') ? hash['configurationfailures'] : SKIP createdon = hash.key?('createdon') ? hash['createdon'] : SKIP delegateid = hash.key?('delegateid') ? hash['delegateid'] : SKIP description = hash.key?('description') ? hash['description'] : SKIP disabled = hash.key?('disabled') ? hash['disabled'] : SKIP email = hash.key?('email') ? hash['email'] : SKIP filter = hash.key?('filter') ? hash['filter'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP kind = hash.key?('kind') ? hash['kind'] : SKIP laststreamingstatus = hash.key?('laststreamingstatus') ? hash['laststreamingstatus'] : SKIP laststreamingtime = hash.key?('laststreamingtime') ? hash['laststreamingtime'] : SKIP lastupdated = hash.key?('lastupdated') ? hash['lastupdated'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP networkfailures = hash.key?('networkfailures') ? hash['networkfailures'] : SKIP streamfailures = hash.key?('streamfailures') ? hash['streamfailures'] : SKIP streamkind = hash.key?('streamkind') ? hash['streamkind'] : SKIP targetid = hash.key?('targetid') ? hash['targetid'] : SKIP targettype = hash.key?('targettype') ? hash['targettype'] : SKIP version = hash.key?('version') ? hash['version'] : SKIP versionid = hash.key?('versionid') ? hash['versionid'] : SKIP # Create object from extracted values. Subscription.new(configurationfailures, createdon, delegateid, description, disabled, email, filter, id, kind, laststreamingstatus, laststreamingtime, lastupdated, name, networkfailures, streamfailures, streamkind, targetid, targettype, version, versionid) end |
.names ⇒ Object
A mapping from model property names to API property names.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/verizon/models/subscription.rb', line 93 def self.names @_hash = {} if @_hash.nil? @_hash['configurationfailures'] = 'configurationfailures' @_hash['createdon'] = 'createdon' @_hash['delegateid'] = 'delegateid' @_hash['description'] = 'description' @_hash['disabled'] = 'disabled' @_hash['email'] = 'email' @_hash['filter'] = 'filter' @_hash['id'] = 'id' @_hash['kind'] = 'kind' @_hash['laststreamingstatus'] = 'laststreamingstatus' @_hash['laststreamingtime'] = 'laststreamingtime' @_hash['lastupdated'] = 'lastupdated' @_hash['name'] = 'name' @_hash['networkfailures'] = 'networkfailures' @_hash['streamfailures'] = 'streamfailures' @_hash['streamkind'] = 'streamkind' @_hash['targetid'] = 'targetid' @_hash['targettype'] = 'targettype' @_hash['version'] = 'version' @_hash['versionid'] = 'versionid' @_hash end |
.nullables ⇒ Object
An array for nullable fields
145 146 147 |
# File 'lib/verizon/models/subscription.rb', line 145 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/verizon/models/subscription.rb', line 119 def self.optionals %w[ configurationfailures createdon delegateid description disabled email filter id kind laststreamingstatus laststreamingtime lastupdated name networkfailures streamfailures streamkind targetid targettype version versionid ] end |