akeyless 3.5.1 → 3.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +3 -1
 - data/docs/ActiveDirectoryPayload.md +5 -1
 - data/docs/CertificateTemplateInfo.md +2 -0
 - data/docs/CreateClassicKey.md +2 -0
 - data/docs/CreateDFCKey.md +2 -0
 - data/docs/CreateKey.md +2 -0
 - data/docs/CreateRotatedSecret.md +4 -0
 - data/docs/DSProducerDetails.md +2 -0
 - data/docs/GatewayCreateMigration.md +5 -1
 - data/docs/GatewayUpdateItem.md +4 -0
 - data/docs/GatewayUpdateMigration.md +5 -1
 - data/docs/GcpTargetDetails.md +3 -1
 - data/docs/GenerateCsr.md +4 -0
 - data/docs/UpdateClassicKeyCertificate.md +26 -0
 - data/docs/V2Api.md +64 -1
 - data/lib/akeyless/api/v2_api.rb +64 -0
 - data/lib/akeyless/api_client.rb +10 -8
 - data/lib/akeyless/models/active_directory_payload.rb +22 -1
 - data/lib/akeyless/models/certificate_template_info.rb +10 -1
 - data/lib/akeyless/models/create_classic_key.rb +11 -1
 - data/lib/akeyless/models/create_dfc_key.rb +11 -1
 - data/lib/akeyless/models/create_key.rb +11 -1
 - data/lib/akeyless/models/create_rotated_secret.rb +21 -1
 - data/lib/akeyless/models/ds_producer_details.rb +10 -1
 - data/lib/akeyless/models/gateway_create_migration.rb +24 -2
 - data/lib/akeyless/models/gateway_update_item.rb +21 -1
 - data/lib/akeyless/models/gateway_update_migration.rb +24 -2
 - data/lib/akeyless/models/gcp_target_details.rb +10 -2
 - data/lib/akeyless/models/generate_csr.rb +30 -1
 - data/lib/akeyless/models/update_classic_key_certificate.rb +265 -0
 - data/lib/akeyless/version.rb +1 -1
 - data/lib/akeyless.rb +1 -0
 - data/spec/models/update_classic_key_certificate_spec.rb +60 -0
 - metadata +699 -695
 
| 
         @@ -50,12 +50,18 @@ module Akeyless 
     | 
|
| 
       50 
50 
     | 
    
         
             
                # Set output format to JSON
         
     | 
| 
       51 
51 
     | 
    
         
             
                attr_accessor :json
         
     | 
| 
       52 
52 
     | 
    
         | 
| 
      
 53 
     | 
    
         
            +
                # The type of the key to generate (classic-key/dfc)
         
     | 
| 
      
 54 
     | 
    
         
            +
                attr_accessor :key_type
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
       53 
56 
     | 
    
         
             
                # The classic key name
         
     | 
| 
       54 
57 
     | 
    
         
             
                attr_accessor :name
         
     | 
| 
       55 
58 
     | 
    
         | 
| 
       56 
59 
     | 
    
         
             
                # The organization to be included in the CSR certificate
         
     | 
| 
       57 
60 
     | 
    
         
             
                attr_accessor :org
         
     | 
| 
       58 
61 
     | 
    
         | 
| 
      
 62 
     | 
    
         
            +
                # The number of fragments that the item will be split into (not includes customer fragment)
         
     | 
| 
      
 63 
     | 
    
         
            +
                attr_accessor :split_level
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
       59 
65 
     | 
    
         
             
                # The state to be included in the CSR certificate
         
     | 
| 
       60 
66 
     | 
    
         
             
                attr_accessor :state
         
     | 
| 
       61 
67 
     | 
    
         | 
| 
         @@ -83,8 +89,10 @@ module Akeyless 
     | 
|
| 
       83 
89 
     | 
    
         
             
                    :'generate_key' => :'generate-key',
         
     | 
| 
       84 
90 
     | 
    
         
             
                    :'ip_addresses' => :'ip-addresses',
         
     | 
| 
       85 
91 
     | 
    
         
             
                    :'json' => :'json',
         
     | 
| 
      
 92 
     | 
    
         
            +
                    :'key_type' => :'key-type',
         
     | 
| 
       86 
93 
     | 
    
         
             
                    :'name' => :'name',
         
     | 
| 
       87 
94 
     | 
    
         
             
                    :'org' => :'org',
         
     | 
| 
      
 95 
     | 
    
         
            +
                    :'split_level' => :'split-level',
         
     | 
| 
       88 
96 
     | 
    
         
             
                    :'state' => :'state',
         
     | 
| 
       89 
97 
     | 
    
         
             
                    :'token' => :'token',
         
     | 
| 
       90 
98 
     | 
    
         
             
                    :'uid_token' => :'uid-token',
         
     | 
| 
         @@ -112,8 +120,10 @@ module Akeyless 
     | 
|
| 
       112 
120 
     | 
    
         
             
                    :'generate_key' => :'Boolean',
         
     | 
| 
       113 
121 
     | 
    
         
             
                    :'ip_addresses' => :'String',
         
     | 
| 
       114 
122 
     | 
    
         
             
                    :'json' => :'Boolean',
         
     | 
| 
      
 123 
     | 
    
         
            +
                    :'key_type' => :'String',
         
     | 
| 
       115 
124 
     | 
    
         
             
                    :'name' => :'String',
         
     | 
| 
       116 
125 
     | 
    
         
             
                    :'org' => :'String',
         
     | 
| 
      
 126 
     | 
    
         
            +
                    :'split_level' => :'Integer',
         
     | 
| 
       117 
127 
     | 
    
         
             
                    :'state' => :'String',
         
     | 
| 
       118 
128 
     | 
    
         
             
                    :'token' => :'String',
         
     | 
| 
       119 
129 
     | 
    
         
             
                    :'uid_token' => :'String',
         
     | 
| 
         @@ -194,6 +204,12 @@ module Akeyless 
     | 
|
| 
       194 
204 
     | 
    
         
             
                    self.json = false
         
     | 
| 
       195 
205 
     | 
    
         
             
                  end
         
     | 
| 
       196 
206 
     | 
    
         | 
| 
      
 207 
     | 
    
         
            +
                  if attributes.key?(:'key_type')
         
     | 
| 
      
 208 
     | 
    
         
            +
                    self.key_type = attributes[:'key_type']
         
     | 
| 
      
 209 
     | 
    
         
            +
                  else
         
     | 
| 
      
 210 
     | 
    
         
            +
                    self.key_type = 'classic-key'
         
     | 
| 
      
 211 
     | 
    
         
            +
                  end
         
     | 
| 
      
 212 
     | 
    
         
            +
             
     | 
| 
       197 
213 
     | 
    
         
             
                  if attributes.key?(:'name')
         
     | 
| 
       198 
214 
     | 
    
         
             
                    self.name = attributes[:'name']
         
     | 
| 
       199 
215 
     | 
    
         
             
                  else
         
     | 
| 
         @@ -204,6 +220,12 @@ module Akeyless 
     | 
|
| 
       204 
220 
     | 
    
         
             
                    self.org = attributes[:'org']
         
     | 
| 
       205 
221 
     | 
    
         
             
                  end
         
     | 
| 
       206 
222 
     | 
    
         | 
| 
      
 223 
     | 
    
         
            +
                  if attributes.key?(:'split_level')
         
     | 
| 
      
 224 
     | 
    
         
            +
                    self.split_level = attributes[:'split_level']
         
     | 
| 
      
 225 
     | 
    
         
            +
                  else
         
     | 
| 
      
 226 
     | 
    
         
            +
                    self.split_level = 3
         
     | 
| 
      
 227 
     | 
    
         
            +
                  end
         
     | 
| 
      
 228 
     | 
    
         
            +
             
     | 
| 
       207 
229 
     | 
    
         
             
                  if attributes.key?(:'state')
         
     | 
| 
       208 
230 
     | 
    
         
             
                    self.state = attributes[:'state']
         
     | 
| 
       209 
231 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -230,6 +252,10 @@ module Akeyless 
     | 
|
| 
       230 
252 
     | 
    
         
             
                    invalid_properties.push('invalid value for "common_name", common_name cannot be nil.')
         
     | 
| 
       231 
253 
     | 
    
         
             
                  end
         
     | 
| 
       232 
254 
     | 
    
         | 
| 
      
 255 
     | 
    
         
            +
                  if @key_type.nil?
         
     | 
| 
      
 256 
     | 
    
         
            +
                    invalid_properties.push('invalid value for "key_type", key_type cannot be nil.')
         
     | 
| 
      
 257 
     | 
    
         
            +
                  end
         
     | 
| 
      
 258 
     | 
    
         
            +
             
     | 
| 
       233 
259 
     | 
    
         
             
                  if @name.nil?
         
     | 
| 
       234 
260 
     | 
    
         
             
                    invalid_properties.push('invalid value for "name", name cannot be nil.')
         
     | 
| 
       235 
261 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -242,6 +268,7 @@ module Akeyless 
     | 
|
| 
       242 
268 
     | 
    
         
             
                def valid?
         
     | 
| 
       243 
269 
     | 
    
         
             
                  warn '[DEPRECATED] the `valid?` method is obsolete'
         
     | 
| 
       244 
270 
     | 
    
         
             
                  return false if @common_name.nil?
         
     | 
| 
      
 271 
     | 
    
         
            +
                  return false if @key_type.nil?
         
     | 
| 
       245 
272 
     | 
    
         
             
                  return false if @name.nil?
         
     | 
| 
       246 
273 
     | 
    
         
             
                  true
         
     | 
| 
       247 
274 
     | 
    
         
             
                end
         
     | 
| 
         @@ -263,8 +290,10 @@ module Akeyless 
     | 
|
| 
       263 
290 
     | 
    
         
             
                      generate_key == o.generate_key &&
         
     | 
| 
       264 
291 
     | 
    
         
             
                      ip_addresses == o.ip_addresses &&
         
     | 
| 
       265 
292 
     | 
    
         
             
                      json == o.json &&
         
     | 
| 
      
 293 
     | 
    
         
            +
                      key_type == o.key_type &&
         
     | 
| 
       266 
294 
     | 
    
         
             
                      name == o.name &&
         
     | 
| 
       267 
295 
     | 
    
         
             
                      org == o.org &&
         
     | 
| 
      
 296 
     | 
    
         
            +
                      split_level == o.split_level &&
         
     | 
| 
       268 
297 
     | 
    
         
             
                      state == o.state &&
         
     | 
| 
       269 
298 
     | 
    
         
             
                      token == o.token &&
         
     | 
| 
       270 
299 
     | 
    
         
             
                      uid_token == o.uid_token &&
         
     | 
| 
         @@ -280,7 +309,7 @@ module Akeyless 
     | 
|
| 
       280 
309 
     | 
    
         
             
                # Calculates hash code according to all attributes.
         
     | 
| 
       281 
310 
     | 
    
         
             
                # @return [Integer] Hash code
         
     | 
| 
       282 
311 
     | 
    
         
             
                def hash
         
     | 
| 
       283 
     | 
    
         
            -
                  [alg, alt_names, certificate_type, city, common_name, country, critical, dep, email_addresses, generate_key, ip_addresses, json, name, org, state, token, uid_token, uri_sans].hash
         
     | 
| 
      
 312 
     | 
    
         
            +
                  [alg, alt_names, certificate_type, city, common_name, country, critical, dep, email_addresses, generate_key, ip_addresses, json, key_type, name, org, split_level, state, token, uid_token, uri_sans].hash
         
     | 
| 
       284 
313 
     | 
    
         
             
                end
         
     | 
| 
       285 
314 
     | 
    
         | 
| 
       286 
315 
     | 
    
         
             
                # Builds the object from hash
         
     | 
| 
         @@ -0,0 +1,265 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            =begin
         
     | 
| 
      
 2 
     | 
    
         
            +
            #Akeyless API
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            #The purpose of this application is to provide access to Akeyless API.
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            The version of the OpenAPI document: 2.0
         
     | 
| 
      
 7 
     | 
    
         
            +
            Contact: support@akeyless.io
         
     | 
| 
      
 8 
     | 
    
         
            +
            Generated by: https://openapi-generator.tech
         
     | 
| 
      
 9 
     | 
    
         
            +
            OpenAPI Generator version: 7.2.0-SNAPSHOT
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            =end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 14 
     | 
    
         
            +
            require 'time'
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            module Akeyless
         
     | 
| 
      
 17 
     | 
    
         
            +
              # UpdateClassicKeyCertificate is a command that updates the certificate for a classic key
         
     | 
| 
      
 18 
     | 
    
         
            +
              class UpdateClassicKeyCertificate
         
     | 
| 
      
 19 
     | 
    
         
            +
                # PEM Certificate in a Base64 format. Used for updating RSA keys' certificates.
         
     | 
| 
      
 20 
     | 
    
         
            +
                attr_accessor :cert_file_data
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                # Set output format to JSON
         
     | 
| 
      
 23 
     | 
    
         
            +
                attr_accessor :json
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                # ClassicKey name
         
     | 
| 
      
 26 
     | 
    
         
            +
                attr_accessor :name
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                # Authentication token (see `/auth` and `/configure`)
         
     | 
| 
      
 29 
     | 
    
         
            +
                attr_accessor :token
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                # The universal identity token, Required only for universal_identity authentication
         
     | 
| 
      
 32 
     | 
    
         
            +
                attr_accessor :uid_token
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
      
 35 
     | 
    
         
            +
                def self.attribute_map
         
     | 
| 
      
 36 
     | 
    
         
            +
                  {
         
     | 
| 
      
 37 
     | 
    
         
            +
                    :'cert_file_data' => :'cert-file-data',
         
     | 
| 
      
 38 
     | 
    
         
            +
                    :'json' => :'json',
         
     | 
| 
      
 39 
     | 
    
         
            +
                    :'name' => :'name',
         
     | 
| 
      
 40 
     | 
    
         
            +
                    :'token' => :'token',
         
     | 
| 
      
 41 
     | 
    
         
            +
                    :'uid_token' => :'uid-token'
         
     | 
| 
      
 42 
     | 
    
         
            +
                  }
         
     | 
| 
      
 43 
     | 
    
         
            +
                end
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                # Returns all the JSON keys this model knows about
         
     | 
| 
      
 46 
     | 
    
         
            +
                def self.acceptable_attributes
         
     | 
| 
      
 47 
     | 
    
         
            +
                  attribute_map.values
         
     | 
| 
      
 48 
     | 
    
         
            +
                end
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
                # Attribute type mapping.
         
     | 
| 
      
 51 
     | 
    
         
            +
                def self.openapi_types
         
     | 
| 
      
 52 
     | 
    
         
            +
                  {
         
     | 
| 
      
 53 
     | 
    
         
            +
                    :'cert_file_data' => :'String',
         
     | 
| 
      
 54 
     | 
    
         
            +
                    :'json' => :'Boolean',
         
     | 
| 
      
 55 
     | 
    
         
            +
                    :'name' => :'String',
         
     | 
| 
      
 56 
     | 
    
         
            +
                    :'token' => :'String',
         
     | 
| 
      
 57 
     | 
    
         
            +
                    :'uid_token' => :'String'
         
     | 
| 
      
 58 
     | 
    
         
            +
                  }
         
     | 
| 
      
 59 
     | 
    
         
            +
                end
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
                # List of attributes with nullable: true
         
     | 
| 
      
 62 
     | 
    
         
            +
                def self.openapi_nullable
         
     | 
| 
      
 63 
     | 
    
         
            +
                  Set.new([
         
     | 
| 
      
 64 
     | 
    
         
            +
                  ])
         
     | 
| 
      
 65 
     | 
    
         
            +
                end
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
                # Initializes the object
         
     | 
| 
      
 68 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 69 
     | 
    
         
            +
                def initialize(attributes = {})
         
     | 
| 
      
 70 
     | 
    
         
            +
                  if (!attributes.is_a?(Hash))
         
     | 
| 
      
 71 
     | 
    
         
            +
                    fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::UpdateClassicKeyCertificate` initialize method"
         
     | 
| 
      
 72 
     | 
    
         
            +
                  end
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
                  # check to see if the attribute exists and convert string to symbol for hash key
         
     | 
| 
      
 75 
     | 
    
         
            +
                  attributes = attributes.each_with_object({}) { |(k, v), h|
         
     | 
| 
      
 76 
     | 
    
         
            +
                    if (!self.class.attribute_map.key?(k.to_sym))
         
     | 
| 
      
 77 
     | 
    
         
            +
                      fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::UpdateClassicKeyCertificate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
         
     | 
| 
      
 78 
     | 
    
         
            +
                    end
         
     | 
| 
      
 79 
     | 
    
         
            +
                    h[k.to_sym] = v
         
     | 
| 
      
 80 
     | 
    
         
            +
                  }
         
     | 
| 
      
 81 
     | 
    
         
            +
             
     | 
| 
      
 82 
     | 
    
         
            +
                  if attributes.key?(:'cert_file_data')
         
     | 
| 
      
 83 
     | 
    
         
            +
                    self.cert_file_data = attributes[:'cert_file_data']
         
     | 
| 
      
 84 
     | 
    
         
            +
                  end
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
                  if attributes.key?(:'json')
         
     | 
| 
      
 87 
     | 
    
         
            +
                    self.json = attributes[:'json']
         
     | 
| 
      
 88 
     | 
    
         
            +
                  else
         
     | 
| 
      
 89 
     | 
    
         
            +
                    self.json = false
         
     | 
| 
      
 90 
     | 
    
         
            +
                  end
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
                  if attributes.key?(:'name')
         
     | 
| 
      
 93 
     | 
    
         
            +
                    self.name = attributes[:'name']
         
     | 
| 
      
 94 
     | 
    
         
            +
                  else
         
     | 
| 
      
 95 
     | 
    
         
            +
                    self.name = nil
         
     | 
| 
      
 96 
     | 
    
         
            +
                  end
         
     | 
| 
      
 97 
     | 
    
         
            +
             
     | 
| 
      
 98 
     | 
    
         
            +
                  if attributes.key?(:'token')
         
     | 
| 
      
 99 
     | 
    
         
            +
                    self.token = attributes[:'token']
         
     | 
| 
      
 100 
     | 
    
         
            +
                  end
         
     | 
| 
      
 101 
     | 
    
         
            +
             
     | 
| 
      
 102 
     | 
    
         
            +
                  if attributes.key?(:'uid_token')
         
     | 
| 
      
 103 
     | 
    
         
            +
                    self.uid_token = attributes[:'uid_token']
         
     | 
| 
      
 104 
     | 
    
         
            +
                  end
         
     | 
| 
      
 105 
     | 
    
         
            +
                end
         
     | 
| 
      
 106 
     | 
    
         
            +
             
     | 
| 
      
 107 
     | 
    
         
            +
                # Show invalid properties with the reasons. Usually used together with valid?
         
     | 
| 
      
 108 
     | 
    
         
            +
                # @return Array for valid properties with the reasons
         
     | 
| 
      
 109 
     | 
    
         
            +
                def list_invalid_properties
         
     | 
| 
      
 110 
     | 
    
         
            +
                  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
         
     | 
| 
      
 111 
     | 
    
         
            +
                  invalid_properties = Array.new
         
     | 
| 
      
 112 
     | 
    
         
            +
                  if @name.nil?
         
     | 
| 
      
 113 
     | 
    
         
            +
                    invalid_properties.push('invalid value for "name", name cannot be nil.')
         
     | 
| 
      
 114 
     | 
    
         
            +
                  end
         
     | 
| 
      
 115 
     | 
    
         
            +
             
     | 
| 
      
 116 
     | 
    
         
            +
                  invalid_properties
         
     | 
| 
      
 117 
     | 
    
         
            +
                end
         
     | 
| 
      
 118 
     | 
    
         
            +
             
     | 
| 
      
 119 
     | 
    
         
            +
                # Check to see if the all the properties in the model are valid
         
     | 
| 
      
 120 
     | 
    
         
            +
                # @return true if the model is valid
         
     | 
| 
      
 121 
     | 
    
         
            +
                def valid?
         
     | 
| 
      
 122 
     | 
    
         
            +
                  warn '[DEPRECATED] the `valid?` method is obsolete'
         
     | 
| 
      
 123 
     | 
    
         
            +
                  return false if @name.nil?
         
     | 
| 
      
 124 
     | 
    
         
            +
                  true
         
     | 
| 
      
 125 
     | 
    
         
            +
                end
         
     | 
| 
      
 126 
     | 
    
         
            +
             
     | 
| 
      
 127 
     | 
    
         
            +
                # Checks equality by comparing each attribute.
         
     | 
| 
      
 128 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 129 
     | 
    
         
            +
                def ==(o)
         
     | 
| 
      
 130 
     | 
    
         
            +
                  return true if self.equal?(o)
         
     | 
| 
      
 131 
     | 
    
         
            +
                  self.class == o.class &&
         
     | 
| 
      
 132 
     | 
    
         
            +
                      cert_file_data == o.cert_file_data &&
         
     | 
| 
      
 133 
     | 
    
         
            +
                      json == o.json &&
         
     | 
| 
      
 134 
     | 
    
         
            +
                      name == o.name &&
         
     | 
| 
      
 135 
     | 
    
         
            +
                      token == o.token &&
         
     | 
| 
      
 136 
     | 
    
         
            +
                      uid_token == o.uid_token
         
     | 
| 
      
 137 
     | 
    
         
            +
                end
         
     | 
| 
      
 138 
     | 
    
         
            +
             
     | 
| 
      
 139 
     | 
    
         
            +
                # @see the `==` method
         
     | 
| 
      
 140 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 141 
     | 
    
         
            +
                def eql?(o)
         
     | 
| 
      
 142 
     | 
    
         
            +
                  self == o
         
     | 
| 
      
 143 
     | 
    
         
            +
                end
         
     | 
| 
      
 144 
     | 
    
         
            +
             
     | 
| 
      
 145 
     | 
    
         
            +
                # Calculates hash code according to all attributes.
         
     | 
| 
      
 146 
     | 
    
         
            +
                # @return [Integer] Hash code
         
     | 
| 
      
 147 
     | 
    
         
            +
                def hash
         
     | 
| 
      
 148 
     | 
    
         
            +
                  [cert_file_data, json, name, token, uid_token].hash
         
     | 
| 
      
 149 
     | 
    
         
            +
                end
         
     | 
| 
      
 150 
     | 
    
         
            +
             
     | 
| 
      
 151 
     | 
    
         
            +
                # Builds the object from hash
         
     | 
| 
      
 152 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 153 
     | 
    
         
            +
                # @return [Object] Returns the model itself
         
     | 
| 
      
 154 
     | 
    
         
            +
                def self.build_from_hash(attributes)
         
     | 
| 
      
 155 
     | 
    
         
            +
                  return nil unless attributes.is_a?(Hash)
         
     | 
| 
      
 156 
     | 
    
         
            +
                  attributes = attributes.transform_keys(&:to_sym)
         
     | 
| 
      
 157 
     | 
    
         
            +
                  transformed_hash = {}
         
     | 
| 
      
 158 
     | 
    
         
            +
                  openapi_types.each_pair do |key, type|
         
     | 
| 
      
 159 
     | 
    
         
            +
                    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
         
     | 
| 
      
 160 
     | 
    
         
            +
                      transformed_hash["#{key}"] = nil
         
     | 
| 
      
 161 
     | 
    
         
            +
                    elsif type =~ /\AArray<(.*)>/i
         
     | 
| 
      
 162 
     | 
    
         
            +
                      # check to ensure the input is an array given that the attribute
         
     | 
| 
      
 163 
     | 
    
         
            +
                      # is documented as an array but the input is not
         
     | 
| 
      
 164 
     | 
    
         
            +
                      if attributes[attribute_map[key]].is_a?(Array)
         
     | 
| 
      
 165 
     | 
    
         
            +
                        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
         
     | 
| 
      
 166 
     | 
    
         
            +
                      end
         
     | 
| 
      
 167 
     | 
    
         
            +
                    elsif !attributes[attribute_map[key]].nil?
         
     | 
| 
      
 168 
     | 
    
         
            +
                      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
         
     | 
| 
      
 169 
     | 
    
         
            +
                    end
         
     | 
| 
      
 170 
     | 
    
         
            +
                  end
         
     | 
| 
      
 171 
     | 
    
         
            +
                  new(transformed_hash)
         
     | 
| 
      
 172 
     | 
    
         
            +
                end
         
     | 
| 
      
 173 
     | 
    
         
            +
             
     | 
| 
      
 174 
     | 
    
         
            +
                # Deserializes the data based on type
         
     | 
| 
      
 175 
     | 
    
         
            +
                # @param string type Data type
         
     | 
| 
      
 176 
     | 
    
         
            +
                # @param string value Value to be deserialized
         
     | 
| 
      
 177 
     | 
    
         
            +
                # @return [Object] Deserialized data
         
     | 
| 
      
 178 
     | 
    
         
            +
                def self._deserialize(type, value)
         
     | 
| 
      
 179 
     | 
    
         
            +
                  case type.to_sym
         
     | 
| 
      
 180 
     | 
    
         
            +
                  when :Time
         
     | 
| 
      
 181 
     | 
    
         
            +
                    Time.parse(value)
         
     | 
| 
      
 182 
     | 
    
         
            +
                  when :Date
         
     | 
| 
      
 183 
     | 
    
         
            +
                    Date.parse(value)
         
     | 
| 
      
 184 
     | 
    
         
            +
                  when :String
         
     | 
| 
      
 185 
     | 
    
         
            +
                    value.to_s
         
     | 
| 
      
 186 
     | 
    
         
            +
                  when :Integer
         
     | 
| 
      
 187 
     | 
    
         
            +
                    value.to_i
         
     | 
| 
      
 188 
     | 
    
         
            +
                  when :Float
         
     | 
| 
      
 189 
     | 
    
         
            +
                    value.to_f
         
     | 
| 
      
 190 
     | 
    
         
            +
                  when :Boolean
         
     | 
| 
      
 191 
     | 
    
         
            +
                    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
         
     | 
| 
      
 192 
     | 
    
         
            +
                      true
         
     | 
| 
      
 193 
     | 
    
         
            +
                    else
         
     | 
| 
      
 194 
     | 
    
         
            +
                      false
         
     | 
| 
      
 195 
     | 
    
         
            +
                    end
         
     | 
| 
      
 196 
     | 
    
         
            +
                  when :Object
         
     | 
| 
      
 197 
     | 
    
         
            +
                    # generic object (usually a Hash), return directly
         
     | 
| 
      
 198 
     | 
    
         
            +
                    value
         
     | 
| 
      
 199 
     | 
    
         
            +
                  when /\AArray<(?<inner_type>.+)>\z/
         
     | 
| 
      
 200 
     | 
    
         
            +
                    inner_type = Regexp.last_match[:inner_type]
         
     | 
| 
      
 201 
     | 
    
         
            +
                    value.map { |v| _deserialize(inner_type, v) }
         
     | 
| 
      
 202 
     | 
    
         
            +
                  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
         
     | 
| 
      
 203 
     | 
    
         
            +
                    k_type = Regexp.last_match[:k_type]
         
     | 
| 
      
 204 
     | 
    
         
            +
                    v_type = Regexp.last_match[:v_type]
         
     | 
| 
      
 205 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 206 
     | 
    
         
            +
                      value.each do |k, v|
         
     | 
| 
      
 207 
     | 
    
         
            +
                        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
         
     | 
| 
      
 208 
     | 
    
         
            +
                      end
         
     | 
| 
      
 209 
     | 
    
         
            +
                    end
         
     | 
| 
      
 210 
     | 
    
         
            +
                  else # model
         
     | 
| 
      
 211 
     | 
    
         
            +
                    # models (e.g. Pet) or oneOf
         
     | 
| 
      
 212 
     | 
    
         
            +
                    klass = Akeyless.const_get(type)
         
     | 
| 
      
 213 
     | 
    
         
            +
                    klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
         
     | 
| 
      
 214 
     | 
    
         
            +
                  end
         
     | 
| 
      
 215 
     | 
    
         
            +
                end
         
     | 
| 
      
 216 
     | 
    
         
            +
             
     | 
| 
      
 217 
     | 
    
         
            +
                # Returns the string representation of the object
         
     | 
| 
      
 218 
     | 
    
         
            +
                # @return [String] String presentation of the object
         
     | 
| 
      
 219 
     | 
    
         
            +
                def to_s
         
     | 
| 
      
 220 
     | 
    
         
            +
                  to_hash.to_s
         
     | 
| 
      
 221 
     | 
    
         
            +
                end
         
     | 
| 
      
 222 
     | 
    
         
            +
             
     | 
| 
      
 223 
     | 
    
         
            +
                # to_body is an alias to to_hash (backward compatibility)
         
     | 
| 
      
 224 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 225 
     | 
    
         
            +
                def to_body
         
     | 
| 
      
 226 
     | 
    
         
            +
                  to_hash
         
     | 
| 
      
 227 
     | 
    
         
            +
                end
         
     | 
| 
      
 228 
     | 
    
         
            +
             
     | 
| 
      
 229 
     | 
    
         
            +
                # Returns the object in the form of hash
         
     | 
| 
      
 230 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 231 
     | 
    
         
            +
                def to_hash
         
     | 
| 
      
 232 
     | 
    
         
            +
                  hash = {}
         
     | 
| 
      
 233 
     | 
    
         
            +
                  self.class.attribute_map.each_pair do |attr, param|
         
     | 
| 
      
 234 
     | 
    
         
            +
                    value = self.send(attr)
         
     | 
| 
      
 235 
     | 
    
         
            +
                    if value.nil?
         
     | 
| 
      
 236 
     | 
    
         
            +
                      is_nullable = self.class.openapi_nullable.include?(attr)
         
     | 
| 
      
 237 
     | 
    
         
            +
                      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
         
     | 
| 
      
 238 
     | 
    
         
            +
                    end
         
     | 
| 
      
 239 
     | 
    
         
            +
             
     | 
| 
      
 240 
     | 
    
         
            +
                    hash[param] = _to_hash(value)
         
     | 
| 
      
 241 
     | 
    
         
            +
                  end
         
     | 
| 
      
 242 
     | 
    
         
            +
                  hash
         
     | 
| 
      
 243 
     | 
    
         
            +
                end
         
     | 
| 
      
 244 
     | 
    
         
            +
             
     | 
| 
      
 245 
     | 
    
         
            +
                # Outputs non-array value in the form of hash
         
     | 
| 
      
 246 
     | 
    
         
            +
                # For object, use to_hash. Otherwise, just return the value
         
     | 
| 
      
 247 
     | 
    
         
            +
                # @param [Object] value Any valid value
         
     | 
| 
      
 248 
     | 
    
         
            +
                # @return [Hash] Returns the value in the form of hash
         
     | 
| 
      
 249 
     | 
    
         
            +
                def _to_hash(value)
         
     | 
| 
      
 250 
     | 
    
         
            +
                  if value.is_a?(Array)
         
     | 
| 
      
 251 
     | 
    
         
            +
                    value.compact.map { |v| _to_hash(v) }
         
     | 
| 
      
 252 
     | 
    
         
            +
                  elsif value.is_a?(Hash)
         
     | 
| 
      
 253 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 254 
     | 
    
         
            +
                      value.each { |k, v| hash[k] = _to_hash(v) }
         
     | 
| 
      
 255 
     | 
    
         
            +
                    end
         
     | 
| 
      
 256 
     | 
    
         
            +
                  elsif value.respond_to? :to_hash
         
     | 
| 
      
 257 
     | 
    
         
            +
                    value.to_hash
         
     | 
| 
      
 258 
     | 
    
         
            +
                  else
         
     | 
| 
      
 259 
     | 
    
         
            +
                    value
         
     | 
| 
      
 260 
     | 
    
         
            +
                  end
         
     | 
| 
      
 261 
     | 
    
         
            +
                end
         
     | 
| 
      
 262 
     | 
    
         
            +
             
     | 
| 
      
 263 
     | 
    
         
            +
              end
         
     | 
| 
      
 264 
     | 
    
         
            +
             
     | 
| 
      
 265 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/akeyless/version.rb
    CHANGED
    
    
    
        data/lib/akeyless.rb
    CHANGED
    
    | 
         @@ -660,6 +660,7 @@ require 'akeyless/models/update_azure_target' 
     | 
|
| 
       660 
660 
     | 
    
         
             
            require 'akeyless/models/update_azure_target_output'
         
     | 
| 
       661 
661 
     | 
    
         
             
            require 'akeyless/models/update_certificate_output'
         
     | 
| 
       662 
662 
     | 
    
         
             
            require 'akeyless/models/update_certificate_value'
         
     | 
| 
      
 663 
     | 
    
         
            +
            require 'akeyless/models/update_classic_key_certificate'
         
     | 
| 
       663 
664 
     | 
    
         
             
            require 'akeyless/models/update_db_target'
         
     | 
| 
       664 
665 
     | 
    
         
             
            require 'akeyless/models/update_db_target_details'
         
     | 
| 
       665 
666 
     | 
    
         
             
            require 'akeyless/models/update_db_target_output'
         
     | 
| 
         @@ -0,0 +1,60 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            =begin
         
     | 
| 
      
 2 
     | 
    
         
            +
            #Akeyless API
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            #The purpose of this application is to provide access to Akeyless API.
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            The version of the OpenAPI document: 2.0
         
     | 
| 
      
 7 
     | 
    
         
            +
            Contact: support@akeyless.io
         
     | 
| 
      
 8 
     | 
    
         
            +
            Generated by: https://openapi-generator.tech
         
     | 
| 
      
 9 
     | 
    
         
            +
            OpenAPI Generator version: 7.2.0-SNAPSHOT
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            =end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require 'spec_helper'
         
     | 
| 
      
 14 
     | 
    
         
            +
            require 'json'
         
     | 
| 
      
 15 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            # Unit tests for Akeyless::UpdateClassicKeyCertificate
         
     | 
| 
      
 18 
     | 
    
         
            +
            # Automatically generated by openapi-generator (https://openapi-generator.tech)
         
     | 
| 
      
 19 
     | 
    
         
            +
            # Please update as you see appropriate
         
     | 
| 
      
 20 
     | 
    
         
            +
            describe Akeyless::UpdateClassicKeyCertificate do
         
     | 
| 
      
 21 
     | 
    
         
            +
              let(:instance) { Akeyless::UpdateClassicKeyCertificate.new }
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
              describe 'test an instance of UpdateClassicKeyCertificate' do
         
     | 
| 
      
 24 
     | 
    
         
            +
                it 'should create an instance of UpdateClassicKeyCertificate' do
         
     | 
| 
      
 25 
     | 
    
         
            +
                  # uncomment below to test the instance creation
         
     | 
| 
      
 26 
     | 
    
         
            +
                  #expect(instance).to be_instance_of(Akeyless::UpdateClassicKeyCertificate)
         
     | 
| 
      
 27 
     | 
    
         
            +
                end
         
     | 
| 
      
 28 
     | 
    
         
            +
              end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
              describe 'test attribute "cert_file_data"' do
         
     | 
| 
      
 31 
     | 
    
         
            +
                it 'should work' do
         
     | 
| 
      
 32 
     | 
    
         
            +
                  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
         
     | 
| 
      
 33 
     | 
    
         
            +
                end
         
     | 
| 
      
 34 
     | 
    
         
            +
              end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
              describe 'test attribute "json"' do
         
     | 
| 
      
 37 
     | 
    
         
            +
                it 'should work' do
         
     | 
| 
      
 38 
     | 
    
         
            +
                  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
         
     | 
| 
      
 39 
     | 
    
         
            +
                end
         
     | 
| 
      
 40 
     | 
    
         
            +
              end
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
              describe 'test attribute "name"' do
         
     | 
| 
      
 43 
     | 
    
         
            +
                it 'should work' do
         
     | 
| 
      
 44 
     | 
    
         
            +
                  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
         
     | 
| 
      
 45 
     | 
    
         
            +
                end
         
     | 
| 
      
 46 
     | 
    
         
            +
              end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
              describe 'test attribute "token"' do
         
     | 
| 
      
 49 
     | 
    
         
            +
                it 'should work' do
         
     | 
| 
      
 50 
     | 
    
         
            +
                  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
         
     | 
| 
      
 51 
     | 
    
         
            +
                end
         
     | 
| 
      
 52 
     | 
    
         
            +
              end
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
              describe 'test attribute "uid_token"' do
         
     | 
| 
      
 55 
     | 
    
         
            +
                it 'should work' do
         
     | 
| 
      
 56 
     | 
    
         
            +
                  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
         
     | 
| 
      
 57 
     | 
    
         
            +
                end
         
     | 
| 
      
 58 
     | 
    
         
            +
              end
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
            end
         
     |