Class: Shipeasy::Admin::Generated::PublishI18nProfileResponse
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Shipeasy::Admin::Generated::PublishI18nProfileResponse
- Defined in:
- lib/shipeasy_admin/models/publish_i18n_profile_response.rb
Overview
Result of a profile-wide publish.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#changed ⇒ Object
Whether the snapshot's contents actually changed since the last publish.
-
#key_count ⇒ Object
Number of keys in the published snapshot.
-
#kv_verified ⇒ Object
Whether a KV read-back confirmed the new version persisted.
-
#ok ⇒ Object
Always
trueon success. -
#profile_id ⇒ Object
Profile that was published.
-
#published_at ⇒ Object
ISO-8601 timestamp of the publish.
-
#purged ⇒ Object
CDN purge outcome:
purgedok,skipped(no creds), orfailed(edge still stale). -
#version ⇒ Object
New KV snapshot version that was shipped.
-
#warning ⇒ Object
Human-readable caveat when the publish landed but is not fully live.
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 = {}) ⇒ PublishI18nProfileResponse
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 = {}) ⇒ PublishI18nProfileResponse
Initializes the object
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 173 174 175 176 177 178 179 180 181 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 116 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::PublishI18nProfileResponse` 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 `Shipeasy::Admin::Generated::PublishI18nProfileResponse`. 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?(:'ok') self.ok = attributes[:'ok'] else self.ok = nil end if attributes.key?(:'profile_id') self.profile_id = attributes[:'profile_id'] else self.profile_id = nil end if attributes.key?(:'published_at') self.published_at = attributes[:'published_at'] else self.published_at = nil end if attributes.key?(:'version') self.version = attributes[:'version'] else self.version = nil end if attributes.key?(:'key_count') self.key_count = attributes[:'key_count'] else self.key_count = nil end if attributes.key?(:'changed') self.changed = attributes[:'changed'] else self.changed = nil end if attributes.key?(:'purged') self.purged = attributes[:'purged'] else self.purged = nil end if attributes.key?(:'kv_verified') self.kv_verified = attributes[:'kv_verified'] else self.kv_verified = nil end if attributes.key?(:'warning') self.warning = attributes[:'warning'] end end |
Instance Attribute Details
#changed ⇒ Object
Whether the snapshot's contents actually changed since the last publish.
35 36 37 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 35 def changed @changed end |
#key_count ⇒ Object
Number of keys in the published snapshot.
32 33 34 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 32 def key_count @key_count end |
#kv_verified ⇒ Object
Whether a KV read-back confirmed the new version persisted.
41 42 43 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 41 def kv_verified @kv_verified end |
#ok ⇒ Object
Always true on success.
20 21 22 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 20 def ok @ok end |
#profile_id ⇒ Object
Profile that was published.
23 24 25 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 23 def profile_id @profile_id end |
#published_at ⇒ Object
ISO-8601 timestamp of the publish.
26 27 28 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 26 def published_at @published_at end |
#purged ⇒ Object
CDN purge outcome: purged ok, skipped (no creds), or failed (edge still stale).
38 39 40 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 38 def purged @purged end |
#version ⇒ Object
New KV snapshot version that was shipped.
29 30 31 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 29 def version @version end |
#warning ⇒ Object
Human-readable caveat when the publish landed but is not fully live.
44 45 46 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 44 def warning @warning end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
84 85 86 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 84 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
89 90 91 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 89 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 69 def self.attribute_map { :'ok' => :'ok', :'profile_id' => :'profile_id', :'published_at' => :'published_at', :'version' => :'version', :'key_count' => :'key_count', :'changed' => :'changed', :'purged' => :'purged', :'kv_verified' => :'kv_verified', :'warning' => :'warning' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 353 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
109 110 111 112 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 109 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 94 def self.openapi_types { :'ok' => :'Boolean', :'profile_id' => :'String', :'published_at' => :'String', :'version' => :'String', :'key_count' => :'Float', :'changed' => :'Boolean', :'purged' => :'String', :'kv_verified' => :'Boolean', :'warning' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 324 def ==(o) return true if self.equal?(o) self.class == o.class && ok == o.ok && profile_id == o.profile_id && published_at == o.published_at && version == o.version && key_count == o.key_count && changed == o.changed && purged == o.purged && kv_verified == o.kv_verified && warning == o.warning end |
#eql?(o) ⇒ Boolean
340 341 342 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 340 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
346 347 348 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 346 def hash [ok, profile_id, published_at, version, key_count, changed, purged, kv_verified, warning].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 185 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @ok.nil? invalid_properties.push('invalid value for "ok", ok cannot be nil.') end if @profile_id.nil? invalid_properties.push('invalid value for "profile_id", profile_id cannot be nil.') end if @published_at.nil? invalid_properties.push('invalid value for "published_at", published_at cannot be nil.') end if @version.nil? invalid_properties.push('invalid value for "version", version cannot be nil.') end if @key_count.nil? invalid_properties.push('invalid value for "key_count", key_count cannot be nil.') end if @changed.nil? invalid_properties.push('invalid value for "changed", changed cannot be nil.') end if @purged.nil? invalid_properties.push('invalid value for "purged", purged cannot be nil.') end if @kv_verified.nil? invalid_properties.push('invalid value for "kv_verified", kv_verified cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
375 376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 375 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
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/shipeasy_admin/models/publish_i18n_profile_response.rb', line 225 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @ok.nil? ok_validator = EnumAttributeValidator.new('Boolean', ["true"]) return false unless ok_validator.valid?(@ok) return false if @profile_id.nil? return false if @published_at.nil? return false if @version.nil? return false if @key_count.nil? return false if @changed.nil? return false if @purged.nil? purged_validator = EnumAttributeValidator.new('String', ["purged", "skipped", "failed"]) return false unless purged_validator.valid?(@purged) return false if @kv_verified.nil? true end |