akeyless 3.2.6 → 3.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -1
  3. data/docs/CertAccessRules.md +2 -0
  4. data/docs/CreateAuthMethodCert.md +2 -0
  5. data/docs/CreateCertificate.md +1 -1
  6. data/docs/CreateClassicKey.md +1 -1
  7. data/docs/CreateDynamicSecret.md +1 -1
  8. data/docs/CreateLinkedTarget.md +1 -3
  9. data/docs/CreateRotatedSecret.md +1 -1
  10. data/docs/CreateSecret.md +1 -1
  11. data/docs/CreateWindowsTarget.md +2 -4
  12. data/docs/DecryptFile.md +6 -0
  13. data/docs/DescribeAssoc.md +24 -0
  14. data/docs/EncryptFile.md +0 -2
  15. data/docs/GatewayCreateProducerArtifactory.md +1 -1
  16. data/docs/GatewayCreateProducerAws.md +1 -1
  17. data/docs/GatewayCreateProducerAzure.md +1 -1
  18. data/docs/GatewayCreateProducerCassandra.md +1 -1
  19. data/docs/GatewayCreateProducerCertificateAutomation.md +1 -1
  20. data/docs/GatewayCreateProducerChef.md +1 -1
  21. data/docs/GatewayCreateProducerCustom.md +1 -1
  22. data/docs/GatewayCreateProducerDockerhub.md +1 -1
  23. data/docs/GatewayCreateProducerEks.md +1 -1
  24. data/docs/GatewayCreateProducerGcp.md +1 -1
  25. data/docs/GatewayCreateProducerGke.md +1 -1
  26. data/docs/GatewayCreateProducerHanaDb.md +1 -1
  27. data/docs/GatewayCreateProducerLdap.md +1 -1
  28. data/docs/GatewayCreateProducerMSSQL.md +1 -1
  29. data/docs/GatewayCreateProducerMongo.md +1 -1
  30. data/docs/GatewayCreateProducerMySQL.md +1 -1
  31. data/docs/GatewayCreateProducerNativeK8S.md +1 -1
  32. data/docs/GatewayCreateProducerOracleDb.md +1 -1
  33. data/docs/GatewayCreateProducerPing.md +1 -1
  34. data/docs/GatewayCreateProducerPostgreSQL.md +1 -1
  35. data/docs/GatewayCreateProducerRabbitMQ.md +1 -1
  36. data/docs/GatewayCreateProducerRdp.md +1 -1
  37. data/docs/GatewayCreateProducerRedshift.md +1 -1
  38. data/docs/GatewayCreateProducerSnowflake.md +1 -1
  39. data/docs/GatewayDownloadCustomerFragments.md +22 -0
  40. data/docs/GatewayDownloadCustomerFragmentsOutput.md +18 -0
  41. data/docs/GatewayUpdateProducerArtifactory.md +1 -1
  42. data/docs/GatewayUpdateProducerAws.md +1 -1
  43. data/docs/GatewayUpdateProducerAzure.md +1 -1
  44. data/docs/GatewayUpdateProducerCassandra.md +1 -1
  45. data/docs/GatewayUpdateProducerCertificateAutomation.md +1 -1
  46. data/docs/GatewayUpdateProducerChef.md +1 -1
  47. data/docs/GatewayUpdateProducerCustom.md +1 -1
  48. data/docs/GatewayUpdateProducerDockerhub.md +1 -1
  49. data/docs/GatewayUpdateProducerEks.md +1 -1
  50. data/docs/GatewayUpdateProducerGcp.md +1 -1
  51. data/docs/GatewayUpdateProducerGke.md +1 -1
  52. data/docs/GatewayUpdateProducerHanaDb.md +1 -1
  53. data/docs/GatewayUpdateProducerLdap.md +1 -1
  54. data/docs/GatewayUpdateProducerMSSQL.md +1 -1
  55. data/docs/GatewayUpdateProducerMongo.md +1 -1
  56. data/docs/GatewayUpdateProducerMySQL.md +1 -1
  57. data/docs/GatewayUpdateProducerNativeK8S.md +1 -1
  58. data/docs/GatewayUpdateProducerOracleDb.md +1 -1
  59. data/docs/GatewayUpdateProducerPing.md +1 -1
  60. data/docs/GatewayUpdateProducerPostgreSQL.md +1 -1
  61. data/docs/GatewayUpdateProducerRabbitMQ.md +1 -1
  62. data/docs/GatewayUpdateProducerRdp.md +1 -1
  63. data/docs/GatewayUpdateProducerRedshift.md +1 -1
  64. data/docs/GatewayUpdateProducerSnowflake.md +1 -1
  65. data/docs/GeneralConfigPart.md +2 -0
  66. data/docs/ImportPasswords.md +32 -0
  67. data/docs/ImportPasswordsOutput.md +22 -0
  68. data/docs/Item.md +2 -0
  69. data/docs/LinkedDetails.md +18 -0
  70. data/docs/RoleAssociationDetails.md +26 -0
  71. data/docs/TargetTypeDetailsInput.md +1 -3
  72. data/docs/UpdateAuthMethodCert.md +2 -0
  73. data/docs/UpdateLinkedTarget.md +2 -4
  74. data/docs/UpdateWindowsTarget.md +2 -4
  75. data/docs/V2Api.md +191 -2
  76. data/lib/akeyless/api/v2_api.rb +192 -0
  77. data/lib/akeyless/models/cert_access_rules.rb +13 -1
  78. data/lib/akeyless/models/create_auth_method_cert.rb +11 -1
  79. data/lib/akeyless/models/create_certificate.rb +1 -1
  80. data/lib/akeyless/models/create_classic_key.rb +1 -1
  81. data/lib/akeyless/models/create_dynamic_secret.rb +1 -1
  82. data/lib/akeyless/models/create_linked_target.rb +2 -17
  83. data/lib/akeyless/models/create_rotated_secret.rb +1 -1
  84. data/lib/akeyless/models/create_secret.rb +1 -1
  85. data/lib/akeyless/models/create_windows_target.rb +9 -19
  86. data/lib/akeyless/models/decrypt_file.rb +35 -1
  87. data/lib/akeyless/models/describe_assoc.rb +257 -0
  88. data/lib/akeyless/models/encrypt_file.rb +1 -13
  89. data/lib/akeyless/models/gateway_create_producer_artifactory.rb +1 -1
  90. data/lib/akeyless/models/gateway_create_producer_aws.rb +1 -1
  91. data/lib/akeyless/models/gateway_create_producer_azure.rb +1 -1
  92. data/lib/akeyless/models/gateway_create_producer_cassandra.rb +1 -1
  93. data/lib/akeyless/models/gateway_create_producer_certificate_automation.rb +1 -1
  94. data/lib/akeyless/models/gateway_create_producer_chef.rb +1 -1
  95. data/lib/akeyless/models/gateway_create_producer_custom.rb +1 -1
  96. data/lib/akeyless/models/gateway_create_producer_dockerhub.rb +1 -1
  97. data/lib/akeyless/models/gateway_create_producer_eks.rb +1 -1
  98. data/lib/akeyless/models/gateway_create_producer_gcp.rb +1 -1
  99. data/lib/akeyless/models/gateway_create_producer_gke.rb +1 -1
  100. data/lib/akeyless/models/gateway_create_producer_hana_db.rb +1 -1
  101. data/lib/akeyless/models/gateway_create_producer_ldap.rb +1 -1
  102. data/lib/akeyless/models/gateway_create_producer_mongo.rb +1 -1
  103. data/lib/akeyless/models/gateway_create_producer_mssql.rb +1 -1
  104. data/lib/akeyless/models/gateway_create_producer_my_sql.rb +1 -1
  105. data/lib/akeyless/models/gateway_create_producer_native_k8_s.rb +1 -1
  106. data/lib/akeyless/models/gateway_create_producer_oracle_db.rb +1 -1
  107. data/lib/akeyless/models/gateway_create_producer_ping.rb +1 -1
  108. data/lib/akeyless/models/gateway_create_producer_postgre_sql.rb +1 -1
  109. data/lib/akeyless/models/gateway_create_producer_rabbit_mq.rb +1 -1
  110. data/lib/akeyless/models/gateway_create_producer_rdp.rb +1 -1
  111. data/lib/akeyless/models/gateway_create_producer_redshift.rb +1 -1
  112. data/lib/akeyless/models/gateway_create_producer_snowflake.rb +1 -1
  113. data/lib/akeyless/models/gateway_download_customer_fragments.rb +243 -0
  114. data/lib/akeyless/models/gateway_download_customer_fragments_output.rb +221 -0
  115. data/lib/akeyless/models/gateway_update_producer_artifactory.rb +1 -1
  116. data/lib/akeyless/models/gateway_update_producer_aws.rb +1 -1
  117. data/lib/akeyless/models/gateway_update_producer_azure.rb +1 -1
  118. data/lib/akeyless/models/gateway_update_producer_cassandra.rb +1 -1
  119. data/lib/akeyless/models/gateway_update_producer_certificate_automation.rb +1 -1
  120. data/lib/akeyless/models/gateway_update_producer_chef.rb +1 -1
  121. data/lib/akeyless/models/gateway_update_producer_custom.rb +1 -1
  122. data/lib/akeyless/models/gateway_update_producer_dockerhub.rb +1 -1
  123. data/lib/akeyless/models/gateway_update_producer_eks.rb +1 -1
  124. data/lib/akeyless/models/gateway_update_producer_gcp.rb +1 -1
  125. data/lib/akeyless/models/gateway_update_producer_gke.rb +1 -1
  126. data/lib/akeyless/models/gateway_update_producer_hana_db.rb +1 -1
  127. data/lib/akeyless/models/gateway_update_producer_ldap.rb +1 -1
  128. data/lib/akeyless/models/gateway_update_producer_mongo.rb +1 -1
  129. data/lib/akeyless/models/gateway_update_producer_mssql.rb +1 -1
  130. data/lib/akeyless/models/gateway_update_producer_my_sql.rb +1 -1
  131. data/lib/akeyless/models/gateway_update_producer_native_k8_s.rb +1 -1
  132. data/lib/akeyless/models/gateway_update_producer_oracle_db.rb +1 -1
  133. data/lib/akeyless/models/gateway_update_producer_ping.rb +1 -1
  134. data/lib/akeyless/models/gateway_update_producer_postgre_sql.rb +1 -1
  135. data/lib/akeyless/models/gateway_update_producer_rabbit_mq.rb +1 -1
  136. data/lib/akeyless/models/gateway_update_producer_rdp.rb +1 -1
  137. data/lib/akeyless/models/gateway_update_producer_redshift.rb +1 -1
  138. data/lib/akeyless/models/gateway_update_producer_snowflake.rb +1 -1
  139. data/lib/akeyless/models/general_config_part.rb +10 -1
  140. data/lib/akeyless/models/import_passwords.rb +304 -0
  141. data/lib/akeyless/models/import_passwords_output.rb +237 -0
  142. data/lib/akeyless/models/item.rb +10 -1
  143. data/lib/akeyless/models/linked_details.rb +221 -0
  144. data/lib/akeyless/models/role_association_details.rb +258 -0
  145. data/lib/akeyless/models/target_type_details_input.rb +3 -12
  146. data/lib/akeyless/models/update_auth_method_cert.rb +11 -1
  147. data/lib/akeyless/models/update_linked_target.rb +3 -18
  148. data/lib/akeyless/models/update_windows_target.rb +9 -19
  149. data/lib/akeyless/version.rb +1 -1
  150. data/lib/akeyless.rb +7 -0
  151. data/spec/models/describe_assoc_spec.rb +52 -0
  152. data/spec/models/gateway_download_customer_fragments_output_spec.rb +34 -0
  153. data/spec/models/gateway_download_customer_fragments_spec.rb +46 -0
  154. data/spec/models/import_passwords_output_spec.rb +46 -0
  155. data/spec/models/import_passwords_spec.rb +76 -0
  156. data/spec/models/linked_details_spec.rb +34 -0
  157. data/spec/models/role_association_details_spec.rb +58 -0
  158. metadata +30 -2
@@ -15,9 +15,6 @@ require 'time'
15
15
 
16
16
  module Akeyless
17
17
  class CreateWindowsTarget
18
- # Deprecated - use description
19
- attr_accessor :comment
20
-
21
18
  # Description of the object
22
19
  attr_accessor :description
23
20
 
@@ -36,8 +33,8 @@ module Akeyless
36
33
  # The privileged user password
37
34
  attr_accessor :password
38
35
 
39
- # Server port for RDP (Remote Desktop Protocol)
40
- attr_accessor :rdp_port
36
+ # Server WinRM HTTPS port
37
+ attr_accessor :port
41
38
 
42
39
  # Authentication token (see `/auth` and `/configure`)
43
40
  attr_accessor :token
@@ -51,14 +48,13 @@ module Akeyless
51
48
  # Attribute mapping from ruby-style variable name to JSON key.
52
49
  def self.attribute_map
53
50
  {
54
- :'comment' => :'comment',
55
51
  :'description' => :'description',
56
52
  :'hostname' => :'hostname',
57
53
  :'json' => :'json',
58
54
  :'key' => :'key',
59
55
  :'name' => :'name',
60
56
  :'password' => :'password',
61
- :'rdp_port' => :'rdp-port',
57
+ :'port' => :'port',
62
58
  :'token' => :'token',
63
59
  :'uid_token' => :'uid-token',
64
60
  :'username' => :'username'
@@ -73,14 +69,13 @@ module Akeyless
73
69
  # Attribute type mapping.
74
70
  def self.openapi_types
75
71
  {
76
- :'comment' => :'String',
77
72
  :'description' => :'String',
78
73
  :'hostname' => :'String',
79
74
  :'json' => :'Boolean',
80
75
  :'key' => :'String',
81
76
  :'name' => :'String',
82
77
  :'password' => :'String',
83
- :'rdp_port' => :'String',
78
+ :'port' => :'String',
84
79
  :'token' => :'String',
85
80
  :'uid_token' => :'String',
86
81
  :'username' => :'String'
@@ -108,10 +103,6 @@ module Akeyless
108
103
  h[k.to_sym] = v
109
104
  }
110
105
 
111
- if attributes.key?(:'comment')
112
- self.comment = attributes[:'comment']
113
- end
114
-
115
106
  if attributes.key?(:'description')
116
107
  self.description = attributes[:'description']
117
108
  end
@@ -138,10 +129,10 @@ module Akeyless
138
129
  self.password = attributes[:'password']
139
130
  end
140
131
 
141
- if attributes.key?(:'rdp_port')
142
- self.rdp_port = attributes[:'rdp_port']
132
+ if attributes.key?(:'port')
133
+ self.port = attributes[:'port']
143
134
  else
144
- self.rdp_port = '3389'
135
+ self.port = '5986'
145
136
  end
146
137
 
147
138
  if attributes.key?(:'token')
@@ -180,14 +171,13 @@ module Akeyless
180
171
  def ==(o)
181
172
  return true if self.equal?(o)
182
173
  self.class == o.class &&
183
- comment == o.comment &&
184
174
  description == o.description &&
185
175
  hostname == o.hostname &&
186
176
  json == o.json &&
187
177
  key == o.key &&
188
178
  name == o.name &&
189
179
  password == o.password &&
190
- rdp_port == o.rdp_port &&
180
+ port == o.port &&
191
181
  token == o.token &&
192
182
  uid_token == o.uid_token &&
193
183
  username == o.username
@@ -202,7 +192,7 @@ module Akeyless
202
192
  # Calculates hash code according to all attributes.
203
193
  # @return [Integer] Hash code
204
194
  def hash
205
- [comment, description, hostname, json, key, name, password, rdp_port, token, uid_token, username].hash
195
+ [description, hostname, json, key, name, password, port, token, uid_token, username].hash
206
196
  end
207
197
 
208
198
  # Builds the object from hash
@@ -15,9 +15,14 @@ require 'time'
15
15
 
16
16
  module Akeyless
17
17
  class DecryptFile
18
+ attr_accessor :cyphertext_header
19
+
18
20
  # The display id of the key to use in the decryption process
19
21
  attr_accessor :display_id
20
22
 
23
+ # Path to the file to be decrypted. If not provided, the content will be taken from stdin
24
+ attr_accessor :_in
25
+
21
26
  # The item id of the key to use in the decryption process
22
27
  attr_accessor :item_id
23
28
 
@@ -27,6 +32,9 @@ module Akeyless
27
32
  # The name of the key to use in the decryption process
28
33
  attr_accessor :key_name
29
34
 
35
+ # Path to the output file. If not provided, the output will be sent to stdout
36
+ attr_accessor :out
37
+
30
38
  # Authentication token (see `/auth` and `/configure`)
31
39
  attr_accessor :token
32
40
 
@@ -36,10 +44,13 @@ module Akeyless
36
44
  # Attribute mapping from ruby-style variable name to JSON key.
37
45
  def self.attribute_map
38
46
  {
47
+ :'cyphertext_header' => :'cyphertext-header',
39
48
  :'display_id' => :'display-id',
49
+ :'_in' => :'in',
40
50
  :'item_id' => :'item-id',
41
51
  :'json' => :'json',
42
52
  :'key_name' => :'key-name',
53
+ :'out' => :'out',
43
54
  :'token' => :'token',
44
55
  :'uid_token' => :'uid-token'
45
56
  }
@@ -53,10 +64,13 @@ module Akeyless
53
64
  # Attribute type mapping.
54
65
  def self.openapi_types
55
66
  {
67
+ :'cyphertext_header' => :'String',
56
68
  :'display_id' => :'String',
69
+ :'_in' => :'String',
57
70
  :'item_id' => :'Integer',
58
71
  :'json' => :'Boolean',
59
72
  :'key_name' => :'String',
73
+ :'out' => :'String',
60
74
  :'token' => :'String',
61
75
  :'uid_token' => :'String'
62
76
  }
@@ -83,10 +97,18 @@ module Akeyless
83
97
  h[k.to_sym] = v
84
98
  }
85
99
 
100
+ if attributes.key?(:'cyphertext_header')
101
+ self.cyphertext_header = attributes[:'cyphertext_header']
102
+ end
103
+
86
104
  if attributes.key?(:'display_id')
87
105
  self.display_id = attributes[:'display_id']
88
106
  end
89
107
 
108
+ if attributes.key?(:'_in')
109
+ self._in = attributes[:'_in']
110
+ end
111
+
90
112
  if attributes.key?(:'item_id')
91
113
  self.item_id = attributes[:'item_id']
92
114
  end
@@ -101,6 +123,10 @@ module Akeyless
101
123
  self.key_name = attributes[:'key_name']
102
124
  end
103
125
 
126
+ if attributes.key?(:'out')
127
+ self.out = attributes[:'out']
128
+ end
129
+
104
130
  if attributes.key?(:'token')
105
131
  self.token = attributes[:'token']
106
132
  end
@@ -114,6 +140,10 @@ module Akeyless
114
140
  # @return Array for valid properties with the reasons
115
141
  def list_invalid_properties
116
142
  invalid_properties = Array.new
143
+ if @_in.nil?
144
+ invalid_properties.push('invalid value for "_in", _in cannot be nil.')
145
+ end
146
+
117
147
  if @key_name.nil?
118
148
  invalid_properties.push('invalid value for "key_name", key_name cannot be nil.')
119
149
  end
@@ -124,6 +154,7 @@ module Akeyless
124
154
  # Check to see if the all the properties in the model are valid
125
155
  # @return true if the model is valid
126
156
  def valid?
157
+ return false if @_in.nil?
127
158
  return false if @key_name.nil?
128
159
  true
129
160
  end
@@ -133,10 +164,13 @@ module Akeyless
133
164
  def ==(o)
134
165
  return true if self.equal?(o)
135
166
  self.class == o.class &&
167
+ cyphertext_header == o.cyphertext_header &&
136
168
  display_id == o.display_id &&
169
+ _in == o._in &&
137
170
  item_id == o.item_id &&
138
171
  json == o.json &&
139
172
  key_name == o.key_name &&
173
+ out == o.out &&
140
174
  token == o.token &&
141
175
  uid_token == o.uid_token
142
176
  end
@@ -150,7 +184,7 @@ module Akeyless
150
184
  # Calculates hash code according to all attributes.
151
185
  # @return [Integer] Hash code
152
186
  def hash
153
- [display_id, item_id, json, key_name, token, uid_token].hash
187
+ [cyphertext_header, display_id, _in, item_id, json, key_name, out, token, uid_token].hash
154
188
  end
155
189
 
156
190
  # Builds the object from hash
@@ -0,0 +1,257 @@
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: 6.5.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class DescribeAssoc
18
+ # The association id
19
+ attr_accessor :assoc_id
20
+
21
+ # Set output format to JSON
22
+ attr_accessor :json
23
+
24
+ # Authentication token (see `/auth` and `/configure`)
25
+ attr_accessor :token
26
+
27
+ # The universal identity token, Required only for universal_identity authentication
28
+ attr_accessor :uid_token
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'assoc_id' => :'assoc-id',
34
+ :'json' => :'json',
35
+ :'token' => :'token',
36
+ :'uid_token' => :'uid-token'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'assoc_id' => :'String',
49
+ :'json' => :'Boolean',
50
+ :'token' => :'String',
51
+ :'uid_token' => :'String'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::DescribeAssoc` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::DescribeAssoc`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'assoc_id')
77
+ self.assoc_id = attributes[:'assoc_id']
78
+ end
79
+
80
+ if attributes.key?(:'json')
81
+ self.json = attributes[:'json']
82
+ else
83
+ self.json = false
84
+ end
85
+
86
+ if attributes.key?(:'token')
87
+ self.token = attributes[:'token']
88
+ end
89
+
90
+ if attributes.key?(:'uid_token')
91
+ self.uid_token = attributes[:'uid_token']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ if @assoc_id.nil?
100
+ invalid_properties.push('invalid value for "assoc_id", assoc_id cannot be nil.')
101
+ end
102
+
103
+ invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ return false if @assoc_id.nil?
110
+ true
111
+ end
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param [Object] Object to be compared
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ assoc_id == o.assoc_id &&
119
+ json == o.json &&
120
+ token == o.token &&
121
+ uid_token == o.uid_token
122
+ end
123
+
124
+ # @see the `==` method
125
+ # @param [Object] Object to be compared
126
+ def eql?(o)
127
+ self == o
128
+ end
129
+
130
+ # Calculates hash code according to all attributes.
131
+ # @return [Integer] Hash code
132
+ def hash
133
+ [assoc_id, json, token, uid_token].hash
134
+ end
135
+
136
+ # Builds the object from hash
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ # @return [Object] Returns the model itself
139
+ def self.build_from_hash(attributes)
140
+ new.build_from_hash(attributes)
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def build_from_hash(attributes)
147
+ return nil unless attributes.is_a?(Hash)
148
+ attributes = attributes.transform_keys(&:to_sym)
149
+ self.class.openapi_types.each_pair do |key, type|
150
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
151
+ self.send("#{key}=", nil)
152
+ elsif type =~ /\AArray<(.*)>/i
153
+ # check to ensure the input is an array given that the attribute
154
+ # is documented as an array but the input is not
155
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
156
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
157
+ end
158
+ elsif !attributes[self.class.attribute_map[key]].nil?
159
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
160
+ end
161
+ end
162
+
163
+ self
164
+ end
165
+
166
+ # Deserializes the data based on type
167
+ # @param string type Data type
168
+ # @param string value Value to be deserialized
169
+ # @return [Object] Deserialized data
170
+ def _deserialize(type, value)
171
+ case type.to_sym
172
+ when :Time
173
+ Time.parse(value)
174
+ when :Date
175
+ Date.parse(value)
176
+ when :String
177
+ value.to_s
178
+ when :Integer
179
+ value.to_i
180
+ when :Float
181
+ value.to_f
182
+ when :Boolean
183
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
184
+ true
185
+ else
186
+ false
187
+ end
188
+ when :Object
189
+ # generic object (usually a Hash), return directly
190
+ value
191
+ when /\AArray<(?<inner_type>.+)>\z/
192
+ inner_type = Regexp.last_match[:inner_type]
193
+ value.map { |v| _deserialize(inner_type, v) }
194
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
195
+ k_type = Regexp.last_match[:k_type]
196
+ v_type = Regexp.last_match[:v_type]
197
+ {}.tap do |hash|
198
+ value.each do |k, v|
199
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
200
+ end
201
+ end
202
+ else # model
203
+ # models (e.g. Pet) or oneOf
204
+ klass = Akeyless.const_get(type)
205
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
206
+ end
207
+ end
208
+
209
+ # Returns the string representation of the object
210
+ # @return [String] String presentation of the object
211
+ def to_s
212
+ to_hash.to_s
213
+ end
214
+
215
+ # to_body is an alias to to_hash (backward compatibility)
216
+ # @return [Hash] Returns the object in the form of hash
217
+ def to_body
218
+ to_hash
219
+ end
220
+
221
+ # Returns the object in the form of hash
222
+ # @return [Hash] Returns the object in the form of hash
223
+ def to_hash
224
+ hash = {}
225
+ self.class.attribute_map.each_pair do |attr, param|
226
+ value = self.send(attr)
227
+ if value.nil?
228
+ is_nullable = self.class.openapi_nullable.include?(attr)
229
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
230
+ end
231
+
232
+ hash[param] = _to_hash(value)
233
+ end
234
+ hash
235
+ end
236
+
237
+ # Outputs non-array value in the form of hash
238
+ # For object, use to_hash. Otherwise, just return the value
239
+ # @param [Object] value Any valid value
240
+ # @return [Hash] Returns the value in the form of hash
241
+ def _to_hash(value)
242
+ if value.is_a?(Array)
243
+ value.compact.map { |v| _to_hash(v) }
244
+ elsif value.is_a?(Hash)
245
+ {}.tap do |hash|
246
+ value.each { |k, v| hash[k] = _to_hash(v) }
247
+ end
248
+ elsif value.respond_to? :to_hash
249
+ value.to_hash
250
+ else
251
+ value
252
+ end
253
+ end
254
+
255
+ end
256
+
257
+ end
@@ -18,9 +18,6 @@ module Akeyless
18
18
  # The display id of the key to use in the encryption process
19
19
  attr_accessor :display_id
20
20
 
21
- # name-value pair that specifies the encryption context to be used for authenticated encryption. If used here, the same value must be supplied to the decrypt command or decryption will fail
22
- attr_accessor :encryption_context
23
-
24
21
  # Path to the file to be encrypted. If not provided, the content will be taken from stdin
25
22
  attr_accessor :_in
26
23
 
@@ -46,7 +43,6 @@ module Akeyless
46
43
  def self.attribute_map
47
44
  {
48
45
  :'display_id' => :'display-id',
49
- :'encryption_context' => :'encryption-context',
50
46
  :'_in' => :'in',
51
47
  :'item_id' => :'item-id',
52
48
  :'json' => :'json',
@@ -66,7 +62,6 @@ module Akeyless
66
62
  def self.openapi_types
67
63
  {
68
64
  :'display_id' => :'String',
69
- :'encryption_context' => :'Hash<String, String>',
70
65
  :'_in' => :'String',
71
66
  :'item_id' => :'Integer',
72
67
  :'json' => :'Boolean',
@@ -102,12 +97,6 @@ module Akeyless
102
97
  self.display_id = attributes[:'display_id']
103
98
  end
104
99
 
105
- if attributes.key?(:'encryption_context')
106
- if (value = attributes[:'encryption_context']).is_a?(Hash)
107
- self.encryption_context = value
108
- end
109
- end
110
-
111
100
  if attributes.key?(:'_in')
112
101
  self._in = attributes[:'_in']
113
102
  end
@@ -168,7 +157,6 @@ module Akeyless
168
157
  return true if self.equal?(o)
169
158
  self.class == o.class &&
170
159
  display_id == o.display_id &&
171
- encryption_context == o.encryption_context &&
172
160
  _in == o._in &&
173
161
  item_id == o.item_id &&
174
162
  json == o.json &&
@@ -187,7 +175,7 @@ module Akeyless
187
175
  # Calculates hash code according to all attributes.
188
176
  # @return [Integer] Hash code
189
177
  def hash
190
- [display_id, encryption_context, _in, item_id, json, key_name, out, token, uid_token].hash
178
+ [display_id, _in, item_id, json, key_name, out, token, uid_token].hash
191
179
  end
192
180
 
193
181
  # Builds the object from hash
@@ -43,7 +43,7 @@ module Akeyless
43
43
  # Dynamic producer encryption key
44
44
  attr_accessor :producer_encryption_key_name
45
45
 
46
- # List of the tags attached to this secret
46
+ # Add tags attached to this object
47
47
  attr_accessor :tags
48
48
 
49
49
  # Target name
@@ -81,7 +81,7 @@ module Akeyless
81
81
  # Web-Proxy via Akeyless Web Access Bastion
82
82
  attr_accessor :secure_access_web_proxy
83
83
 
84
- # List of the tags attached to this secret
84
+ # Add tags attached to this object
85
85
  attr_accessor :tags
86
86
 
87
87
  # Target name
@@ -58,7 +58,7 @@ module Akeyless
58
58
  # Web-Proxy via Akeyless Web Access Bastion
59
59
  attr_accessor :secure_access_web_proxy
60
60
 
61
- # List of the tags attached to this secret
61
+ # Add tags attached to this object
62
62
  attr_accessor :tags
63
63
 
64
64
  # Target name
@@ -43,7 +43,7 @@ module Akeyless
43
43
  # Dynamic producer encryption key
44
44
  attr_accessor :producer_encryption_key_name
45
45
 
46
- # List of the tags attached to this secret
46
+ # Add tags attached to this object
47
47
  attr_accessor :tags
48
48
 
49
49
  # Target name
@@ -55,7 +55,7 @@ module Akeyless
55
55
  # Store private key
56
56
  attr_accessor :store_private_key
57
57
 
58
- # List of the tags attached to this secret
58
+ # Add tags attached to this object
59
59
  attr_accessor :tags
60
60
 
61
61
  # Target name
@@ -43,7 +43,7 @@ module Akeyless
43
43
  # Skip SSL
44
44
  attr_accessor :skip_ssl
45
45
 
46
- # List of the tags attached to this secret
46
+ # Add tags attached to this object
47
47
  attr_accessor :tags
48
48
 
49
49
  # Target name
@@ -45,7 +45,7 @@ module Akeyless
45
45
  # URL of an endpoint that implements /sync/rotate method, for example https://webhook.example.com/sync/rotate
46
46
  attr_accessor :rotate_sync_url
47
47
 
48
- # List of the tags attached to this secret
48
+ # Add tags attached to this object
49
49
  attr_accessor :tags
50
50
 
51
51
  # Maximum allowed time in seconds for the webhook to return the results
@@ -37,7 +37,7 @@ module Akeyless
37
37
  # Dynamic producer encryption key
38
38
  attr_accessor :producer_encryption_key_name
39
39
 
40
- # List of the tags attached to this secret
40
+ # Add tags attached to this object
41
41
  attr_accessor :tags
42
42
 
43
43
  # Target name
@@ -64,7 +64,7 @@ module Akeyless
64
64
  # Enable Web Secure Remote Access
65
65
  attr_accessor :secure_access_web
66
66
 
67
- # List of the tags attached to this secret
67
+ # Add tags attached to this object
68
68
  attr_accessor :tags
69
69
 
70
70
  # Target name
@@ -48,7 +48,7 @@ module Akeyless
48
48
  # The type of the gcp dynamic secret. Options[fixed, dynamic]
49
49
  attr_accessor :service_account_type
50
50
 
51
- # List of the tags attached to this secret
51
+ # Add tags attached to this object
52
52
  attr_accessor :tags
53
53
 
54
54
  # Target name
@@ -58,7 +58,7 @@ module Akeyless
58
58
  # Enable Web Secure Remote Access
59
59
  attr_accessor :secure_access_web
60
60
 
61
- # List of the tags attached to this secret
61
+ # Add tags attached to this object
62
62
  attr_accessor :tags
63
63
 
64
64
  # Target name
@@ -64,7 +64,7 @@ module Akeyless
64
64
  # Enable Web Secure Remote Access
65
65
  attr_accessor :secure_access_web
66
66
 
67
- # List of the tags attached to this secret
67
+ # Add tags attached to this object
68
68
  attr_accessor :tags
69
69
 
70
70
  # Target name
@@ -43,7 +43,7 @@ module Akeyless
43
43
  # Dynamic producer encryption key
44
44
  attr_accessor :producer_encryption_key_name
45
45
 
46
- # List of the tags attached to this secret
46
+ # Add tags attached to this object
47
47
  attr_accessor :tags
48
48
 
49
49
  # Target name
@@ -76,7 +76,7 @@ module Akeyless
76
76
  # Enable Web Secure Remote Access
77
77
  attr_accessor :secure_access_web
78
78
 
79
- # List of the tags attached to this secret
79
+ # Add tags attached to this object
80
80
  attr_accessor :tags
81
81
 
82
82
  # Target name
@@ -64,7 +64,7 @@ module Akeyless
64
64
  # Enable Web Secure Remote Access
65
65
  attr_accessor :secure_access_web
66
66
 
67
- # List of the tags attached to this secret
67
+ # Add tags attached to this object
68
68
  attr_accessor :tags
69
69
 
70
70
  # Target name