Class: Akeyless::PKICertificateIssueDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/akeyless/models/pki_certificate_issue_details.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ PKICertificateIssueDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 156

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::PKICertificateIssueDetails` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::PKICertificateIssueDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#allow_any_nameObject

Returns the value of attribute allow_any_name.



18
19
20
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 18

def allow_any_name
  @allow_any_name
end

#allow_subdomainsObject

Returns the value of attribute allow_subdomains.



20
21
22
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 20

def allow_subdomains
  @allow_subdomains
end

#allowed_domains_listObject

Returns the value of attribute allowed_domains_list.



22
23
24
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 22

def allowed_domains_list
  @allowed_domains_list
end

#allowed_uri_sansObject

Returns the value of attribute allowed_uri_sans.



24
25
26
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 24

def allowed_uri_sans
  @allowed_uri_sans
end

#basic_constraints_valid_for_non_caObject

Returns the value of attribute basic_constraints_valid_for_non_ca.



26
27
28
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 26

def basic_constraints_valid_for_non_ca
  @basic_constraints_valid_for_non_ca
end

#certificate_authority_modeObject

Returns the value of attribute certificate_authority_mode.



28
29
30
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 28

def certificate_authority_mode
  @certificate_authority_mode
end

#client_flagObject

Returns the value of attribute client_flag.



30
31
32
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 30

def client_flag
  @client_flag
end

#code_signing_flagObject

Returns the value of attribute code_signing_flag.



32
33
34
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 32

def code_signing_flag
  @code_signing_flag
end

#countryObject

Returns the value of attribute country.



34
35
36
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 34

def country
  @country
end

#destination_pathObject

DestinationPath is the destination to save generated certificates



37
38
39
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 37

def destination_path
  @destination_path
end

#enforce_hostnamesObject

Returns the value of attribute enforce_hostnames.



39
40
41
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 39

def enforce_hostnames
  @enforce_hostnames
end

#expiration_eventsObject

ExpirationNotification holds a list of expiration notices that should be sent in case a certificate is about to expire, this value is being propagated to the Certificate resources that are created



42
43
44
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 42

def expiration_events
  @expiration_events
end

#gw_cluster_urlObject

GWClusterURL is required when CAMode is "public" and it defines the cluster URL the PKI should be issued from. The GW cluster must have permissions to read associated target’s details



45
46
47
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 45

def gw_cluster_url
  @gw_cluster_url
end

#is_caObject

Returns the value of attribute is_ca.



47
48
49
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 47

def is_ca
  @is_ca
end

#key_bitsObject

Returns the value of attribute key_bits.



49
50
51
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 49

def key_bits
  @key_bits
end

#key_typeObject

Returns the value of attribute key_type.



51
52
53
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 51

def key_type
  @key_type
end

#key_usage_listObject

Returns the value of attribute key_usage_list.



53
54
55
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 53

def key_usage_list
  @key_usage_list
end

#localityObject

Returns the value of attribute locality.



55
56
57
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 55

def locality
  @locality
end

#not_before_durationObject

A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.



58
59
60
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 58

def not_before_duration
  @not_before_duration
end

#organization_listObject

Returns the value of attribute organization_list.



60
61
62
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 60

def organization_list
  @organization_list
end

#organization_unit_listObject

Returns the value of attribute organization_unit_list.



62
63
64
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 62

def organization_unit_list
  @organization_unit_list
end

#postal_codeObject

Returns the value of attribute postal_code.



64
65
66
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 64

def postal_code
  @postal_code
end

#protect_generated_certificatesObject

ProtectGeneratedCertificates dictates whether the created certificates should be protected from deletion



67
68
69
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 67

def protect_generated_certificates
  @protect_generated_certificates
end

#provinceObject

Returns the value of attribute province.



69
70
71
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 69

def province
  @province
end

#require_cnObject

Returns the value of attribute require_cn.



71
72
73
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 71

def require_cn
  @require_cn
end

#server_flagObject

Returns the value of attribute server_flag.



73
74
75
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 73

def server_flag
  @server_flag
end

#street_addressObject

Returns the value of attribute street_address.



75
76
77
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 75

def street_address
  @street_address
end

Class Method Details

._deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 388

def self._deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = Akeyless.const_get(type)
    klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



111
112
113
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 111

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 78

def self.attribute_map
  {
    :'allow_any_name' => :'allow_any_name',
    :'allow_subdomains' => :'allow_subdomains',
    :'allowed_domains_list' => :'allowed_domains_list',
    :'allowed_uri_sans' => :'allowed_uri_sans',
    :'basic_constraints_valid_for_non_ca' => :'basic_constraints_valid_for_non_ca',
    :'certificate_authority_mode' => :'certificate_authority_mode',
    :'client_flag' => :'client_flag',
    :'code_signing_flag' => :'code_signing_flag',
    :'country' => :'country',
    :'destination_path' => :'destination_path',
    :'enforce_hostnames' => :'enforce_hostnames',
    :'expiration_events' => :'expiration_events',
    :'gw_cluster_url' => :'gw_cluster_url',
    :'is_ca' => :'is_ca',
    :'key_bits' => :'key_bits',
    :'key_type' => :'key_type',
    :'key_usage_list' => :'key_usage_list',
    :'locality' => :'locality',
    :'not_before_duration' => :'not_before_duration',
    :'organization_list' => :'organization_list',
    :'organization_unit_list' => :'organization_unit_list',
    :'postal_code' => :'postal_code',
    :'protect_generated_certificates' => :'protect_generated_certificates',
    :'province' => :'province',
    :'require_cn' => :'require_cn',
    :'server_flag' => :'server_flag',
    :'street_address' => :'street_address'
  }
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



364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 364

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



149
150
151
152
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 149

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 116

def self.openapi_types
  {
    :'allow_any_name' => :'Boolean',
    :'allow_subdomains' => :'Boolean',
    :'allowed_domains_list' => :'Array<String>',
    :'allowed_uri_sans' => :'Array<String>',
    :'basic_constraints_valid_for_non_ca' => :'Boolean',
    :'certificate_authority_mode' => :'String',
    :'client_flag' => :'Boolean',
    :'code_signing_flag' => :'Boolean',
    :'country' => :'Array<String>',
    :'destination_path' => :'String',
    :'enforce_hostnames' => :'Boolean',
    :'expiration_events' => :'Array<CertificateExpirationEvent>',
    :'gw_cluster_url' => :'String',
    :'is_ca' => :'Boolean',
    :'key_bits' => :'Integer',
    :'key_type' => :'String',
    :'key_usage_list' => :'Array<String>',
    :'locality' => :'Array<String>',
    :'not_before_duration' => :'Integer',
    :'organization_list' => :'Array<String>',
    :'organization_unit_list' => :'Array<String>',
    :'postal_code' => :'Array<String>',
    :'protect_generated_certificates' => :'Boolean',
    :'province' => :'Array<String>',
    :'require_cn' => :'Boolean',
    :'server_flag' => :'Boolean',
    :'street_address' => :'Array<String>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 317

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      allow_any_name == o.allow_any_name &&
      allow_subdomains == o.allow_subdomains &&
      allowed_domains_list == o.allowed_domains_list &&
      allowed_uri_sans == o.allowed_uri_sans &&
      basic_constraints_valid_for_non_ca == o.basic_constraints_valid_for_non_ca &&
      certificate_authority_mode == o.certificate_authority_mode &&
      client_flag == o.client_flag &&
      code_signing_flag == o.code_signing_flag &&
      country == o.country &&
      destination_path == o.destination_path &&
      enforce_hostnames == o.enforce_hostnames &&
      expiration_events == o.expiration_events &&
      gw_cluster_url == o.gw_cluster_url &&
      is_ca == o.is_ca &&
      key_bits == o.key_bits &&
      key_type == o.key_type &&
      key_usage_list == o.key_usage_list &&
      locality == o.locality &&
      not_before_duration == o.not_before_duration &&
      organization_list == o.organization_list &&
      organization_unit_list == o.organization_unit_list &&
      postal_code == o.postal_code &&
      protect_generated_certificates == o.protect_generated_certificates &&
      province == o.province &&
      require_cn == o.require_cn &&
      server_flag == o.server_flag &&
      street_address == o.street_address
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



459
460
461
462
463
464
465
466
467
468
469
470
471
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 459

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


351
352
353
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 351

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



357
358
359
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 357

def hash
  [allow_any_name, allow_subdomains, allowed_domains_list, allowed_uri_sans, basic_constraints_valid_for_non_ca, certificate_authority_mode, client_flag, code_signing_flag, country, destination_path, enforce_hostnames, expiration_events, gw_cluster_url, is_ca, key_bits, key_type, key_usage_list, locality, not_before_duration, organization_list, organization_unit_list, postal_code, protect_generated_certificates, province, require_cn, server_flag, street_address].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



302
303
304
305
306
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 302

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



435
436
437
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 435

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



441
442
443
444
445
446
447
448
449
450
451
452
453
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 441

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

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



429
430
431
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 429

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



310
311
312
313
# File 'lib/akeyless/models/pki_certificate_issue_details.rb', line 310

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  true
end