Class: Verizon::Target
- Defined in:
- lib/verizon/models/target.rb
Overview
Target resource definition.
Instance Attribute Summary collapse
-
#address ⇒ String
The endpoint for data streams.
-
#addressscheme ⇒ String
The transport format.
-
#billingaccountid ⇒ String
The billing account ID.
-
#createdon ⇒ String
The date the resource was created.
-
#description ⇒ String
Description of the target.
-
#externalid ⇒ String
Security identification string.
-
#id ⇒ String
ThingSpace unique ID for the target that was created.
-
#kind ⇒ String
Identifies the resource kind.
-
#lastupdated ⇒ String
The date the resource was last updated.
-
#name ⇒ String
Name of the target.
-
#region ⇒ String
AWS region value.
-
#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
-
#initialize(address = SKIP, addressscheme = SKIP, billingaccountid = SKIP, createdon = SKIP, externalid = SKIP, id = SKIP, kind = SKIP, lastupdated = SKIP, name = SKIP, region = SKIP, version = SKIP, versionid = SKIP, description = SKIP) ⇒ Target
constructor
A new instance of Target.
Methods inherited from BaseModel
Constructor Details
#initialize(address = SKIP, addressscheme = SKIP, billingaccountid = SKIP, createdon = SKIP, externalid = SKIP, id = SKIP, kind = SKIP, lastupdated = SKIP, name = SKIP, region = SKIP, version = SKIP, versionid = SKIP, description = SKIP) ⇒ Target
Returns a new instance of Target.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/verizon/models/target.rb', line 107 def initialize(address = SKIP, addressscheme = SKIP, billingaccountid = SKIP, createdon = SKIP, externalid = SKIP, id = SKIP, kind = SKIP, lastupdated = SKIP, name = SKIP, region = SKIP, version = SKIP, versionid = SKIP, description = SKIP) @address = address unless address == SKIP @addressscheme = addressscheme unless addressscheme == SKIP @billingaccountid = billingaccountid unless billingaccountid == SKIP @createdon = createdon unless createdon == SKIP @externalid = externalid unless externalid == SKIP @id = id unless id == SKIP @kind = kind unless kind == SKIP @lastupdated = lastupdated unless lastupdated == SKIP @name = name unless name == SKIP @region = region unless region == SKIP @version = version unless version == SKIP @versionid = versionid unless versionid == SKIP @description = description unless description == SKIP end |
Instance Attribute Details
#address ⇒ String
The endpoint for data streams.
14 15 16 |
# File 'lib/verizon/models/target.rb', line 14 def address @address end |
#addressscheme ⇒ String
The transport format.
18 19 20 |
# File 'lib/verizon/models/target.rb', line 18 def addressscheme @addressscheme end |
#billingaccountid ⇒ String
The billing account ID.
22 23 24 |
# File 'lib/verizon/models/target.rb', line 22 def billingaccountid @billingaccountid end |
#createdon ⇒ String
The date the resource was created.
26 27 28 |
# File 'lib/verizon/models/target.rb', line 26 def createdon @createdon end |
#description ⇒ String
Description of the target.
62 63 64 |
# File 'lib/verizon/models/target.rb', line 62 def description @description end |
#externalid ⇒ String
Security identification string.
30 31 32 |
# File 'lib/verizon/models/target.rb', line 30 def externalid @externalid end |
#id ⇒ String
ThingSpace unique ID for the target that was created.
34 35 36 |
# File 'lib/verizon/models/target.rb', line 34 def id @id end |
#kind ⇒ String
Identifies the resource kind. Targets are ts.target.
38 39 40 |
# File 'lib/verizon/models/target.rb', line 38 def kind @kind end |
#lastupdated ⇒ String
The date the resource was last updated.
42 43 44 |
# File 'lib/verizon/models/target.rb', line 42 def lastupdated @lastupdated end |
#name ⇒ String
Name of the target.
46 47 48 |
# File 'lib/verizon/models/target.rb', line 46 def name @name end |
#region ⇒ String
AWS region value.
50 51 52 |
# File 'lib/verizon/models/target.rb', line 50 def region @region end |
#version ⇒ String
Version of the underlying schema resource.
54 55 56 |
# File 'lib/verizon/models/target.rb', line 54 def version @version end |
#versionid ⇒ String
The version of the resource.
58 59 60 |
# File 'lib/verizon/models/target.rb', line 58 def versionid @versionid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/verizon/models/target.rb', line 128 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. address = hash.key?('address') ? hash['address'] : SKIP addressscheme = hash.key?('addressscheme') ? hash['addressscheme'] : SKIP billingaccountid = hash.key?('billingaccountid') ? hash['billingaccountid'] : SKIP createdon = hash.key?('createdon') ? hash['createdon'] : SKIP externalid = hash.key?('externalid') ? hash['externalid'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP kind = hash.key?('kind') ? hash['kind'] : SKIP lastupdated = hash.key?('lastupdated') ? hash['lastupdated'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP region = hash.key?('region') ? hash['region'] : SKIP version = hash.key?('version') ? hash['version'] : SKIP versionid = hash.key?('versionid') ? hash['versionid'] : SKIP description = hash.key?('description') ? hash['description'] : SKIP # Create object from extracted values. Target.new(address, addressscheme, billingaccountid, createdon, externalid, id, kind, lastupdated, name, region, version, versionid, description) end |
.names ⇒ Object
A mapping from model property names to API property names.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/verizon/models/target.rb', line 65 def self.names @_hash = {} if @_hash.nil? @_hash['address'] = 'address' @_hash['addressscheme'] = 'addressscheme' @_hash['billingaccountid'] = 'billingaccountid' @_hash['createdon'] = 'createdon' @_hash['externalid'] = 'externalid' @_hash['id'] = 'id' @_hash['kind'] = 'kind' @_hash['lastupdated'] = 'lastupdated' @_hash['name'] = 'name' @_hash['region'] = 'region' @_hash['version'] = 'version' @_hash['versionid'] = 'versionid' @_hash['description'] = 'description' @_hash end |
.nullables ⇒ Object
An array for nullable fields
103 104 105 |
# File 'lib/verizon/models/target.rb', line 103 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/verizon/models/target.rb', line 84 def self.optionals %w[ address addressscheme billingaccountid createdon externalid id kind lastupdated name region version versionid description ] end |