Class: Mudbase::OrgVerifyCustomDomainDnsSuccessResponse

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ OrgVerifyCustomDomainDnsSuccessResponse

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
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
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 120

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Mudbase::OrgVerifyCustomDomainDnsSuccessResponse` 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 `Mudbase::OrgVerifyCustomDomainDnsSuccessResponse`. 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?(:'success')
    self.success = attributes[:'success']
  else
    self.success = nil
  end

  if attributes.key?(:'hostname')
    self.hostname = attributes[:'hostname']
  else
    self.hostname = nil
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  else
    self.status = nil
  end

  if attributes.key?(:'verification_token')
    self.verification_token = attributes[:'verification_token']
  else
    self.verification_token = nil
  end

  if attributes.key?(:'challenge_host')
    self.challenge_host = attributes[:'challenge_host']
  else
    self.challenge_host = nil
  end

  if attributes.key?(:'expected_txt')
    self.expected_txt = attributes[:'expected_txt']
  else
    self.expected_txt = nil
  end

  if attributes.key?(:'dns_txt_host')
    self.dns_txt_host = attributes[:'dns_txt_host']
  else
    self.dns_txt_host = nil
  end

  if attributes.key?(:'dns_txt_value')
    self.dns_txt_value = attributes[:'dns_txt_value']
  else
    self.dns_txt_value = nil
  end

  if attributes.key?(:'cloudflare')
    self.cloudflare = attributes[:'cloudflare']
  end

  if attributes.key?(:'dns_records')
    if (value = attributes[:'dns_records']).is_a?(Array)
      self.dns_records = value
    end
  end

  if attributes.key?(:'fly_certificate_status')
    self.fly_certificate_status = attributes[:'fly_certificate_status']
  end

  if attributes.key?(:'fly_acme_enabled')
    self.fly_acme_enabled = attributes[:'fly_acme_enabled']
  end

  if attributes.key?(:'fly_acme_disabled_reason')
    self.fly_acme_disabled_reason = attributes[:'fly_acme_disabled_reason']
  end

  if attributes.key?(:'fly_provision_error')
    self.fly_provision_error = attributes[:'fly_provision_error']
  end

  if attributes.key?(:'fly_legacy_staff_pipeline')
    self.fly_legacy_staff_pipeline = attributes[:'fly_legacy_staff_pipeline']
  end
end

Instance Attribute Details

#challenge_hostObject

Same as dnsTxtHost (_mudbase-verify.)



28
29
30
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 28

def challenge_host
  @challenge_host
end

#cloudflareObject

Returns the value of attribute cloudflare.



37
38
39
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 37

def cloudflare
  @cloudflare
end

#dns_recordsObject

Same shape as OrgDomainEntryWithDns.dnsRecords when Fly ACME ran after this successful verify; omit or empty when Fly ACME is disabled or not provisioned.



40
41
42
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 40

def dns_records
  @dns_records
end

#dns_txt_hostObject

Returns the value of attribute dns_txt_host.



33
34
35
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 33

def dns_txt_host
  @dns_txt_host
end

#dns_txt_valueObject

Returns the value of attribute dns_txt_value.



35
36
37
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 35

def dns_txt_value
  @dns_txt_value
end

#expected_txtObject

Same as dnsTxtValue



31
32
33
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 31

def expected_txt
  @expected_txt
end

#fly_acme_disabled_reasonObject

When flyAcmeEnabled is false, why Fly ACME did not run (ops misconfiguration hint).



49
50
51
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 49

def fly_acme_disabled_reason
  @fly_acme_disabled_reason
end

#fly_acme_enabledObject

True when Fly ACME would call the Certificates API (token, app, CUSTOM_DOMAIN_FLY_ACME_ENABLED).



46
47
48
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 46

def fly_acme_enabled
  @fly_acme_enabled
end

#fly_certificate_statusObject

Fly certificate status after verify when Fly ACME is active; null otherwise



43
44
45
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 43

def fly_certificate_status
  @fly_certificate_status
end

#fly_legacy_staff_pipelineObject

When true, CUSTOM_DOMAIN_FLY_LEGACY_STAFF_PIPELINE is on — status may stay cname_pending_staff and staff approve-cname is required even if Fly provision succeeds.



55
56
57
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 55

def fly_legacy_staff_pipeline
  @fly_legacy_staff_pipeline
end

#fly_provision_errorObject

When Fly ACME is enabled but POST acme failed, Fly API error message for support; null on success.



52
53
54
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 52

def fly_provision_error
  @fly_provision_error
end

#hostnameObject

Returns the value of attribute hostname.



20
21
22
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 20

def hostname
  @hostname
end

#statusObject

Domain row status after check (typically cname_pending_staff after first TXT success from pending/failed; legacy dns_verified possible)



23
24
25
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 23

def status
  @status
end

#successObject

Returns the value of attribute success.



18
19
20
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 18

def success
  @success
end

#verification_tokenObject

Returns the value of attribute verification_token.



25
26
27
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 25

def verification_token
  @verification_token
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



79
80
81
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 79

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



84
85
86
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 84

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 58

def self.attribute_map
  {
    :'success' => :'success',
    :'hostname' => :'hostname',
    :'status' => :'status',
    :'verification_token' => :'verificationToken',
    :'challenge_host' => :'challengeHost',
    :'expected_txt' => :'expectedTxt',
    :'dns_txt_host' => :'dnsTxtHost',
    :'dns_txt_value' => :'dnsTxtValue',
    :'cloudflare' => :'cloudflare',
    :'dns_records' => :'dnsRecords',
    :'fly_certificate_status' => :'flyCertificateStatus',
    :'fly_acme_enabled' => :'flyAcmeEnabled',
    :'fly_acme_disabled_reason' => :'flyAcmeDisabledReason',
    :'fly_provision_error' => :'flyProvisionError',
    :'fly_legacy_staff_pipeline' => :'flyLegacyStaffPipeline'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 385

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_nullableObject

List of attributes with nullable: true



110
111
112
113
114
115
116
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 110

def self.openapi_nullable
  Set.new([
    :'fly_certificate_status',
    :'fly_acme_disabled_reason',
    :'fly_provision_error',
  ])
end

.openapi_typesObject

Attribute type mapping.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 89

def self.openapi_types
  {
    :'success' => :'Boolean',
    :'hostname' => :'String',
    :'status' => :'String',
    :'verification_token' => :'String',
    :'challenge_host' => :'String',
    :'expected_txt' => :'String',
    :'dns_txt_host' => :'String',
    :'dns_txt_value' => :'String',
    :'cloudflare' => :'OrgCloudflareEdgeHints',
    :'dns_records' => :'Array<OrgDnsRecord>',
    :'fly_certificate_status' => :'String',
    :'fly_acme_enabled' => :'Boolean',
    :'fly_acme_disabled_reason' => :'String',
    :'fly_provision_error' => :'String',
    :'fly_legacy_staff_pipeline' => :'Boolean'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 350

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      success == o.success &&
      hostname == o.hostname &&
      status == o.status &&
      verification_token == o.verification_token &&
      challenge_host == o.challenge_host &&
      expected_txt == o.expected_txt &&
      dns_txt_host == o.dns_txt_host &&
      dns_txt_value == o.dns_txt_value &&
      cloudflare == o.cloudflare &&
      dns_records == o.dns_records &&
      fly_certificate_status == o.fly_certificate_status &&
      fly_acme_enabled == o.fly_acme_enabled &&
      fly_acme_disabled_reason == o.fly_acme_disabled_reason &&
      fly_provision_error == o.fly_provision_error &&
      fly_legacy_staff_pipeline == o.fly_legacy_staff_pipeline
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


372
373
374
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 372

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



378
379
380
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 378

def hash
  [success, hostname, status, verification_token, challenge_host, expected_txt, dns_txt_host, dns_txt_value, cloudflare, dns_records, fly_certificate_status, fly_acme_enabled, fly_acme_disabled_reason, fly_provision_error, fly_legacy_staff_pipeline].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



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
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 215

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @success.nil?
    invalid_properties.push('invalid value for "success", success cannot be nil.')
  end

  if @hostname.nil?
    invalid_properties.push('invalid value for "hostname", hostname cannot be nil.')
  end

  if @status.nil?
    invalid_properties.push('invalid value for "status", status cannot be nil.')
  end

  if @verification_token.nil?
    invalid_properties.push('invalid value for "verification_token", verification_token cannot be nil.')
  end

  if @challenge_host.nil?
    invalid_properties.push('invalid value for "challenge_host", challenge_host cannot be nil.')
  end

  if @expected_txt.nil?
    invalid_properties.push('invalid value for "expected_txt", expected_txt cannot be nil.')
  end

  if @dns_txt_host.nil?
    invalid_properties.push('invalid value for "dns_txt_host", dns_txt_host cannot be nil.')
  end

  if @dns_txt_value.nil?
    invalid_properties.push('invalid value for "dns_txt_value", dns_txt_value cannot be nil.')
  end

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



407
408
409
410
411
412
413
414
415
416
417
418
419
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 407

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

Returns:

  • (Boolean)

    true if the model is valid



255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/mudbase/models/org_verify_custom_domain_dns_success_response.rb', line 255

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @success.nil?
  return false if @hostname.nil?
  return false if @status.nil?
  return false if @verification_token.nil?
  return false if @challenge_host.nil?
  return false if @expected_txt.nil?
  return false if @dns_txt_host.nil?
  return false if @dns_txt_value.nil?
  true
end