Class: LaunchDarklyApi::View
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- LaunchDarklyApi::View
- Defined in:
- lib/launchdarkly_api/models/view.rb
Instance Attribute Summary collapse
-
#_access ⇒ Object
Returns the value of attribute _access.
-
#_affects_sdk_payload ⇒ Object
Whether this view is used to filter SDK payloads.
-
#_links ⇒ Object
Returns the value of attribute _links.
-
#account_id ⇒ Object
ID of the account that owns this view.
-
#ai_configs_expanded ⇒ Object
Returns the value of attribute ai_configs_expanded.
-
#ai_configs_summary ⇒ Object
Returns the value of attribute ai_configs_summary.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#deleted ⇒ Object
Whether this view is deleted.
-
#deleted_at ⇒ Object
Returns the value of attribute deleted_at.
-
#description ⇒ Object
Optional detailed description of the view.
-
#flags_expanded ⇒ Object
Returns the value of attribute flags_expanded.
-
#flags_summary ⇒ Object
Returns the value of attribute flags_summary.
-
#generate_sdk_keys ⇒ Object
Deprecated compatibility field.
-
#id ⇒ Object
Unique ID of this view.
-
#key ⇒ Object
Unique key for the view within the account/project.
-
#maintainer ⇒ Object
Returns the value of attribute maintainer.
-
#metrics_expanded ⇒ Object
Returns the value of attribute metrics_expanded.
-
#metrics_summary ⇒ Object
Returns the value of attribute metrics_summary.
-
#name ⇒ Object
Human-readable name for the view.
-
#project_id ⇒ Object
ID of the project this view belongs to.
-
#project_key ⇒ Object
Key of the project this view belongs to.
-
#resource_summary ⇒ Object
Returns the value of attribute resource_summary.
-
#resources_expanded ⇒ Object
Returns the value of attribute resources_expanded.
-
#segments_expanded ⇒ Object
Returns the value of attribute segments_expanded.
-
#segments_summary ⇒ Object
Returns the value of attribute segments_summary.
-
#tags ⇒ Object
Tags associated with this view.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#version ⇒ Object
Version number for tracking changes.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ View
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ View
Initializes the object
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 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/launchdarkly_api/models/view.rb', line 172 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::View` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::View`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'_access') self._access = attributes[:'_access'] end if attributes.key?(:'_links') self._links = attributes[:'_links'] end if attributes.key?(:'id') self.id = attributes[:'id'] else self.id = nil end if attributes.key?(:'account_id') self.account_id = attributes[:'account_id'] else self.account_id = nil end if attributes.key?(:'project_id') self.project_id = attributes[:'project_id'] else self.project_id = nil end if attributes.key?(:'project_key') self.project_key = attributes[:'project_key'] else self.project_key = nil end if attributes.key?(:'key') self.key = attributes[:'key'] else self.key = nil end if attributes.key?(:'name') self.name = attributes[:'name'] else self.name = nil end if attributes.key?(:'description') self.description = attributes[:'description'] else self.description = nil end if attributes.key?(:'_affects_sdk_payload') self._affects_sdk_payload = attributes[:'_affects_sdk_payload'] else self._affects_sdk_payload = nil end if attributes.key?(:'generate_sdk_keys') self.generate_sdk_keys = attributes[:'generate_sdk_keys'] end if attributes.key?(:'version') self.version = attributes[:'version'] else self.version = nil end if attributes.key?(:'tags') if (value = attributes[:'tags']).is_a?(Array) self. = value end else self. = nil end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] else self.created_at = nil end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] else self.updated_at = nil end if attributes.key?(:'deleted_at') self.deleted_at = attributes[:'deleted_at'] end if attributes.key?(:'deleted') self.deleted = attributes[:'deleted'] else self.deleted = false end if attributes.key?(:'maintainer') self.maintainer = attributes[:'maintainer'] end if attributes.key?(:'flags_summary') self.flags_summary = attributes[:'flags_summary'] end if attributes.key?(:'segments_summary') self.segments_summary = attributes[:'segments_summary'] end if attributes.key?(:'metrics_summary') self.metrics_summary = attributes[:'metrics_summary'] end if attributes.key?(:'ai_configs_summary') self.ai_configs_summary = attributes[:'ai_configs_summary'] end if attributes.key?(:'resource_summary') self.resource_summary = attributes[:'resource_summary'] end if attributes.key?(:'flags_expanded') self. = attributes[:'flags_expanded'] end if attributes.key?(:'segments_expanded') self. = attributes[:'segments_expanded'] end if attributes.key?(:'metrics_expanded') self. = attributes[:'metrics_expanded'] end if attributes.key?(:'ai_configs_expanded') self. = attributes[:'ai_configs_expanded'] end if attributes.key?(:'resources_expanded') self. = attributes[:'resources_expanded'] end end |
Instance Attribute Details
#_access ⇒ Object
Returns the value of attribute _access.
18 19 20 |
# File 'lib/launchdarkly_api/models/view.rb', line 18 def _access @_access end |
#_affects_sdk_payload ⇒ Object
Whether this view is used to filter SDK payloads
44 45 46 |
# File 'lib/launchdarkly_api/models/view.rb', line 44 def _affects_sdk_payload @_affects_sdk_payload end |
#_links ⇒ Object
Returns the value of attribute _links.
20 21 22 |
# File 'lib/launchdarkly_api/models/view.rb', line 20 def _links @_links end |
#account_id ⇒ Object
ID of the account that owns this view
26 27 28 |
# File 'lib/launchdarkly_api/models/view.rb', line 26 def account_id @account_id end |
#ai_configs_expanded ⇒ Object
Returns the value of attribute ai_configs_expanded.
82 83 84 |
# File 'lib/launchdarkly_api/models/view.rb', line 82 def @ai_configs_expanded end |
#ai_configs_summary ⇒ Object
Returns the value of attribute ai_configs_summary.
72 73 74 |
# File 'lib/launchdarkly_api/models/view.rb', line 72 def ai_configs_summary @ai_configs_summary end |
#created_at ⇒ Object
Returns the value of attribute created_at.
55 56 57 |
# File 'lib/launchdarkly_api/models/view.rb', line 55 def created_at @created_at end |
#deleted ⇒ Object
Whether this view is deleted
62 63 64 |
# File 'lib/launchdarkly_api/models/view.rb', line 62 def deleted @deleted end |
#deleted_at ⇒ Object
Returns the value of attribute deleted_at.
59 60 61 |
# File 'lib/launchdarkly_api/models/view.rb', line 59 def deleted_at @deleted_at end |
#description ⇒ Object
Optional detailed description of the view
41 42 43 |
# File 'lib/launchdarkly_api/models/view.rb', line 41 def description @description end |
#flags_expanded ⇒ Object
Returns the value of attribute flags_expanded.
76 77 78 |
# File 'lib/launchdarkly_api/models/view.rb', line 76 def @flags_expanded end |
#flags_summary ⇒ Object
Returns the value of attribute flags_summary.
66 67 68 |
# File 'lib/launchdarkly_api/models/view.rb', line 66 def flags_summary @flags_summary end |
#generate_sdk_keys ⇒ Object
Deprecated compatibility field. Mirrors _affectsSdkPayload during rollout.
47 48 49 |
# File 'lib/launchdarkly_api/models/view.rb', line 47 def generate_sdk_keys @generate_sdk_keys end |
#id ⇒ Object
Unique ID of this view
23 24 25 |
# File 'lib/launchdarkly_api/models/view.rb', line 23 def id @id end |
#key ⇒ Object
Unique key for the view within the account/project
35 36 37 |
# File 'lib/launchdarkly_api/models/view.rb', line 35 def key @key end |
#maintainer ⇒ Object
Returns the value of attribute maintainer.
64 65 66 |
# File 'lib/launchdarkly_api/models/view.rb', line 64 def maintainer @maintainer end |
#metrics_expanded ⇒ Object
Returns the value of attribute metrics_expanded.
80 81 82 |
# File 'lib/launchdarkly_api/models/view.rb', line 80 def @metrics_expanded end |
#metrics_summary ⇒ Object
Returns the value of attribute metrics_summary.
70 71 72 |
# File 'lib/launchdarkly_api/models/view.rb', line 70 def metrics_summary @metrics_summary end |
#name ⇒ Object
Human-readable name for the view
38 39 40 |
# File 'lib/launchdarkly_api/models/view.rb', line 38 def name @name end |
#project_id ⇒ Object
ID of the project this view belongs to
29 30 31 |
# File 'lib/launchdarkly_api/models/view.rb', line 29 def project_id @project_id end |
#project_key ⇒ Object
Key of the project this view belongs to
32 33 34 |
# File 'lib/launchdarkly_api/models/view.rb', line 32 def project_key @project_key end |
#resource_summary ⇒ Object
Returns the value of attribute resource_summary.
74 75 76 |
# File 'lib/launchdarkly_api/models/view.rb', line 74 def resource_summary @resource_summary end |
#resources_expanded ⇒ Object
Returns the value of attribute resources_expanded.
84 85 86 |
# File 'lib/launchdarkly_api/models/view.rb', line 84 def @resources_expanded end |
#segments_expanded ⇒ Object
Returns the value of attribute segments_expanded.
78 79 80 |
# File 'lib/launchdarkly_api/models/view.rb', line 78 def @segments_expanded end |
#segments_summary ⇒ Object
Returns the value of attribute segments_summary.
68 69 70 |
# File 'lib/launchdarkly_api/models/view.rb', line 68 def segments_summary @segments_summary end |
#tags ⇒ Object
Tags associated with this view
53 54 55 |
# File 'lib/launchdarkly_api/models/view.rb', line 53 def @tags end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
57 58 59 |
# File 'lib/launchdarkly_api/models/view.rb', line 57 def updated_at @updated_at end |
#version ⇒ Object
Version number for tracking changes
50 51 52 |
# File 'lib/launchdarkly_api/models/view.rb', line 50 def version @version end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
121 122 123 |
# File 'lib/launchdarkly_api/models/view.rb', line 121 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
126 127 128 |
# File 'lib/launchdarkly_api/models/view.rb', line 126 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/launchdarkly_api/models/view.rb', line 87 def self.attribute_map { :'_access' => :'_access', :'_links' => :'_links', :'id' => :'id', :'account_id' => :'accountId', :'project_id' => :'projectId', :'project_key' => :'projectKey', :'key' => :'key', :'name' => :'name', :'description' => :'description', :'_affects_sdk_payload' => :'_affectsSdkPayload', :'generate_sdk_keys' => :'generateSdkKeys', :'version' => :'version', :'tags' => :'tags', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', :'deleted_at' => :'deletedAt', :'deleted' => :'deleted', :'maintainer' => :'maintainer', :'flags_summary' => :'flagsSummary', :'segments_summary' => :'segmentsSummary', :'metrics_summary' => :'metricsSummary', :'ai_configs_summary' => :'aiConfigsSummary', :'resource_summary' => :'resourceSummary', :'flags_expanded' => :'flagsExpanded', :'segments_expanded' => :'segmentsExpanded', :'metrics_expanded' => :'metricsExpanded', :'ai_configs_expanded' => :'aiConfigsExpanded', :'resources_expanded' => :'resourcesExpanded' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 |
# File 'lib/launchdarkly_api/models/view.rb', line 587 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
165 166 167 168 |
# File 'lib/launchdarkly_api/models/view.rb', line 165 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/launchdarkly_api/models/view.rb', line 131 def self.openapi_types { :'_access' => :'ViewsAccessRep', :'_links' => :'ParentAndSelfLinks', :'id' => :'String', :'account_id' => :'String', :'project_id' => :'String', :'project_key' => :'String', :'key' => :'String', :'name' => :'String', :'description' => :'String', :'_affects_sdk_payload' => :'Boolean', :'generate_sdk_keys' => :'Boolean', :'version' => :'Integer', :'tags' => :'Array<String>', :'created_at' => :'Integer', :'updated_at' => :'Integer', :'deleted_at' => :'Integer', :'deleted' => :'Boolean', :'maintainer' => :'Maintainer', :'flags_summary' => :'FlagsSummary', :'segments_summary' => :'SegmentsSummary', :'metrics_summary' => :'MetricsSummary', :'ai_configs_summary' => :'AIConfigsSummary', :'resource_summary' => :'ResourceSummary', :'flags_expanded' => :'ExpandedLinkedFlags', :'segments_expanded' => :'ExpandedLinkedSegments', :'metrics_expanded' => :'ExpandedLinkedMetrics', :'ai_configs_expanded' => :'ExpandedLinkedAIConfigs', :'resources_expanded' => :'ExpandedLinkedResources' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 |
# File 'lib/launchdarkly_api/models/view.rb', line 539 def ==(o) return true if self.equal?(o) self.class == o.class && _access == o._access && _links == o._links && id == o.id && account_id == o.account_id && project_id == o.project_id && project_key == o.project_key && key == o.key && name == o.name && description == o.description && _affects_sdk_payload == o._affects_sdk_payload && generate_sdk_keys == o.generate_sdk_keys && version == o.version && == o. && created_at == o.created_at && updated_at == o.updated_at && deleted_at == o.deleted_at && deleted == o.deleted && maintainer == o.maintainer && flags_summary == o.flags_summary && segments_summary == o.segments_summary && metrics_summary == o.metrics_summary && ai_configs_summary == o.ai_configs_summary && resource_summary == o.resource_summary && == o. && == o. && == o. && == o. && == o. end |
#eql?(o) ⇒ Boolean
574 575 576 |
# File 'lib/launchdarkly_api/models/view.rb', line 574 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
580 581 582 |
# File 'lib/launchdarkly_api/models/view.rb', line 580 def hash [_access, _links, id, account_id, project_id, project_key, key, name, description, _affects_sdk_payload, generate_sdk_keys, version, , created_at, updated_at, deleted_at, deleted, maintainer, flags_summary, segments_summary, metrics_summary, ai_configs_summary, resource_summary, , , , , ].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'lib/launchdarkly_api/models/view.rb', line 329 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @account_id.nil? invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') end if @project_id.nil? invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') end if @project_key.nil? invalid_properties.push('invalid value for "project_key", project_key cannot be nil.') end if @key.nil? invalid_properties.push('invalid value for "key", key cannot be nil.') end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @description.nil? invalid_properties.push('invalid value for "description", description cannot be nil.') end if @_affects_sdk_payload.nil? invalid_properties.push('invalid value for "_affects_sdk_payload", _affects_sdk_payload cannot be nil.') end if @version.nil? invalid_properties.push('invalid value for "version", version cannot be nil.') end if @tags.nil? invalid_properties.push('invalid value for "tags", tags cannot be nil.') end if @created_at.nil? invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end if @updated_at.nil? invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') end if @deleted.nil? invalid_properties.push('invalid value for "deleted", deleted cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
609 610 611 612 613 614 615 616 617 618 619 620 621 |
# File 'lib/launchdarkly_api/models/view.rb', line 609 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
# File 'lib/launchdarkly_api/models/view.rb', line 389 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @id.nil? return false if @account_id.nil? return false if @project_id.nil? return false if @project_key.nil? return false if @key.nil? return false if @name.nil? return false if @description.nil? return false if @_affects_sdk_payload.nil? return false if @version.nil? return false if @tags.nil? return false if @created_at.nil? return false if @updated_at.nil? return false if @deleted.nil? true end |