akeyless 5.0.17 → 5.0.18
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 +5 -1
- data/docs/AccountGeneralSettings.md +2 -0
- data/docs/ItemUSCSyncAssociation.md +2 -0
- data/docs/ListItems.md +2 -0
- data/docs/RotatedSecretCreateOpenAI.md +56 -0
- data/docs/RotatedSecretCreateSsh.md +1 -1
- data/docs/RotatedSecretDeleteSync.md +2 -0
- data/docs/RotatedSecretSync.md +2 -0
- data/docs/RotatedSecretUpdateOpenAI.md +58 -0
- data/docs/RotatedSecretUpdateSsh.md +1 -1
- data/docs/StaticSecretDeleteSync.md +2 -0
- data/docs/StaticSecretSync.md +2 -0
- data/docs/UscSyncInfo.md +2 -0
- data/docs/V2Api.md +126 -0
- data/lib/akeyless/api/v2_api.rb +128 -0
- data/lib/akeyless/models/account_general_settings.rb +10 -1
- data/lib/akeyless/models/item_usc_sync_association.rb +10 -1
- data/lib/akeyless/models/list_items.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_open_ai.rb +437 -0
- data/lib/akeyless/models/rotated_secret_create_ssh.rb +1 -1
- data/lib/akeyless/models/rotated_secret_delete_sync.rb +13 -1
- data/lib/akeyless/models/rotated_secret_sync.rb +11 -1
- data/lib/akeyless/models/rotated_secret_update_open_ai.rb +437 -0
- data/lib/akeyless/models/rotated_secret_update_ssh.rb +1 -1
- data/lib/akeyless/models/static_secret_delete_sync.rb +13 -1
- data/lib/akeyless/models/static_secret_sync.rb +11 -1
- data/lib/akeyless/models/usc_sync_info.rb +10 -1
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +2 -0
- data/spec/models/rotated_secret_create_open_ai_spec.rb +150 -0
- data/spec/models/rotated_secret_update_open_ai_spec.rb +156 -0
- metadata +9 -1
|
@@ -24,6 +24,8 @@ module Akeyless
|
|
|
24
24
|
|
|
25
25
|
attr_accessor :ai_insights
|
|
26
26
|
|
|
27
|
+
attr_accessor :allow_auto_fill
|
|
28
|
+
|
|
27
29
|
attr_accessor :allowed_client_types
|
|
28
30
|
|
|
29
31
|
attr_accessor :allowed_clients_ips
|
|
@@ -72,6 +74,7 @@ module Akeyless
|
|
|
72
74
|
:'account_default_key_item_id' => :'account_default_key_item_id',
|
|
73
75
|
:'account_default_key_name' => :'account_default_key_name',
|
|
74
76
|
:'ai_insights' => :'ai_insights',
|
|
77
|
+
:'allow_auto_fill' => :'allow_auto_fill',
|
|
75
78
|
:'allowed_client_types' => :'allowed_client_types',
|
|
76
79
|
:'allowed_clients_ips' => :'allowed_clients_ips',
|
|
77
80
|
:'allowed_gateways_ips' => :'allowed_gateways_ips',
|
|
@@ -106,6 +109,7 @@ module Akeyless
|
|
|
106
109
|
:'account_default_key_item_id' => :'Integer',
|
|
107
110
|
:'account_default_key_name' => :'String',
|
|
108
111
|
:'ai_insights' => :'AiInsightsSetting',
|
|
112
|
+
:'allow_auto_fill' => :'Boolean',
|
|
109
113
|
:'allowed_client_types' => :'AllowedClientType',
|
|
110
114
|
:'allowed_clients_ips' => :'AllowedIpSettings',
|
|
111
115
|
:'allowed_gateways_ips' => :'AllowedIpSettings',
|
|
@@ -162,6 +166,10 @@ module Akeyless
|
|
|
162
166
|
self.ai_insights = attributes[:'ai_insights']
|
|
163
167
|
end
|
|
164
168
|
|
|
169
|
+
if attributes.key?(:'allow_auto_fill')
|
|
170
|
+
self.allow_auto_fill = attributes[:'allow_auto_fill']
|
|
171
|
+
end
|
|
172
|
+
|
|
165
173
|
if attributes.key?(:'allowed_client_types')
|
|
166
174
|
self.allowed_client_types = attributes[:'allowed_client_types']
|
|
167
175
|
end
|
|
@@ -266,6 +274,7 @@ module Akeyless
|
|
|
266
274
|
account_default_key_item_id == o.account_default_key_item_id &&
|
|
267
275
|
account_default_key_name == o.account_default_key_name &&
|
|
268
276
|
ai_insights == o.ai_insights &&
|
|
277
|
+
allow_auto_fill == o.allow_auto_fill &&
|
|
269
278
|
allowed_client_types == o.allowed_client_types &&
|
|
270
279
|
allowed_clients_ips == o.allowed_clients_ips &&
|
|
271
280
|
allowed_gateways_ips == o.allowed_gateways_ips &&
|
|
@@ -297,7 +306,7 @@ module Akeyless
|
|
|
297
306
|
# Calculates hash code according to all attributes.
|
|
298
307
|
# @return [Integer] Hash code
|
|
299
308
|
def hash
|
|
300
|
-
[account_default_key_item_id, account_default_key_name, ai_insights, allowed_client_types, allowed_clients_ips, allowed_gateways_ips, auth_usage_event, certificate_expiration_events, data_protection_section, default_home_page, dynamic_secret_max_ttl, enable_request_for_access, hide_personal_folder, hide_static_password, invalid_characters, item_usage_event, lock_default_key, password_expiration_info, password_policy, password_score, protect_items_by_default, rotation_secret_max_interval, sharing_policy].hash
|
|
309
|
+
[account_default_key_item_id, account_default_key_name, ai_insights, allow_auto_fill, allowed_client_types, allowed_clients_ips, allowed_gateways_ips, auth_usage_event, certificate_expiration_events, data_protection_section, default_home_page, dynamic_secret_max_ttl, enable_request_for_access, hide_personal_folder, hide_static_password, invalid_characters, item_usage_event, lock_default_key, password_expiration_info, password_policy, password_score, protect_items_by_default, rotation_secret_max_interval, sharing_policy].hash
|
|
301
310
|
end
|
|
302
311
|
|
|
303
312
|
# Builds the object from hash
|
|
@@ -20,6 +20,8 @@ module Akeyless
|
|
|
20
20
|
|
|
21
21
|
attr_accessor :attributes
|
|
22
22
|
|
|
23
|
+
attr_accessor :delete_remote
|
|
24
|
+
|
|
23
25
|
attr_accessor :item_id
|
|
24
26
|
|
|
25
27
|
attr_accessor :item_name
|
|
@@ -31,6 +33,7 @@ module Akeyless
|
|
|
31
33
|
{
|
|
32
34
|
:'assoc_id' => :'assoc_id',
|
|
33
35
|
:'attributes' => :'attributes',
|
|
36
|
+
:'delete_remote' => :'delete_remote',
|
|
34
37
|
:'item_id' => :'item_id',
|
|
35
38
|
:'item_name' => :'item_name',
|
|
36
39
|
:'item_type' => :'item_type'
|
|
@@ -47,6 +50,7 @@ module Akeyless
|
|
|
47
50
|
{
|
|
48
51
|
:'assoc_id' => :'String',
|
|
49
52
|
:'attributes' => :'UscSyncInfo',
|
|
53
|
+
:'delete_remote' => :'Boolean',
|
|
50
54
|
:'item_id' => :'Integer',
|
|
51
55
|
:'item_name' => :'String',
|
|
52
56
|
:'item_type' => :'String'
|
|
@@ -82,6 +86,10 @@ module Akeyless
|
|
|
82
86
|
self.attributes = attributes[:'attributes']
|
|
83
87
|
end
|
|
84
88
|
|
|
89
|
+
if attributes.key?(:'delete_remote')
|
|
90
|
+
self.delete_remote = attributes[:'delete_remote']
|
|
91
|
+
end
|
|
92
|
+
|
|
85
93
|
if attributes.key?(:'item_id')
|
|
86
94
|
self.item_id = attributes[:'item_id']
|
|
87
95
|
end
|
|
@@ -117,6 +125,7 @@ module Akeyless
|
|
|
117
125
|
self.class == o.class &&
|
|
118
126
|
assoc_id == o.assoc_id &&
|
|
119
127
|
attributes == o.attributes &&
|
|
128
|
+
delete_remote == o.delete_remote &&
|
|
120
129
|
item_id == o.item_id &&
|
|
121
130
|
item_name == o.item_name &&
|
|
122
131
|
item_type == o.item_type
|
|
@@ -131,7 +140,7 @@ module Akeyless
|
|
|
131
140
|
# Calculates hash code according to all attributes.
|
|
132
141
|
# @return [Integer] Hash code
|
|
133
142
|
def hash
|
|
134
|
-
[assoc_id, attributes, item_id, item_name, item_type].hash
|
|
143
|
+
[assoc_id, attributes, delete_remote, item_id, item_name, item_type].hash
|
|
135
144
|
end
|
|
136
145
|
|
|
137
146
|
# Builds the object from hash
|
|
@@ -24,6 +24,9 @@ module Akeyless
|
|
|
24
24
|
# Retrieve all items using pagination, when disabled retrieving only first 1000 items
|
|
25
25
|
attr_accessor :auto_pagination
|
|
26
26
|
|
|
27
|
+
# List only items in the current folder (excludes subfolders)
|
|
28
|
+
attr_accessor :current_folder
|
|
29
|
+
|
|
27
30
|
# Filter by item name or part of it
|
|
28
31
|
attr_accessor :filter
|
|
29
32
|
|
|
@@ -65,6 +68,7 @@ module Akeyless
|
|
|
65
68
|
:'accessibility' => :'accessibility',
|
|
66
69
|
:'advanced_filter' => :'advanced-filter',
|
|
67
70
|
:'auto_pagination' => :'auto-pagination',
|
|
71
|
+
:'current_folder' => :'current-folder',
|
|
68
72
|
:'filter' => :'filter',
|
|
69
73
|
:'json' => :'json',
|
|
70
74
|
:'minimal_view' => :'minimal-view',
|
|
@@ -91,6 +95,7 @@ module Akeyless
|
|
|
91
95
|
:'accessibility' => :'String',
|
|
92
96
|
:'advanced_filter' => :'String',
|
|
93
97
|
:'auto_pagination' => :'String',
|
|
98
|
+
:'current_folder' => :'Boolean',
|
|
94
99
|
:'filter' => :'String',
|
|
95
100
|
:'json' => :'Boolean',
|
|
96
101
|
:'minimal_view' => :'Boolean',
|
|
@@ -143,6 +148,12 @@ module Akeyless
|
|
|
143
148
|
self.auto_pagination = 'enabled'
|
|
144
149
|
end
|
|
145
150
|
|
|
151
|
+
if attributes.key?(:'current_folder')
|
|
152
|
+
self.current_folder = attributes[:'current_folder']
|
|
153
|
+
else
|
|
154
|
+
self.current_folder = false
|
|
155
|
+
end
|
|
156
|
+
|
|
146
157
|
if attributes.key?(:'filter')
|
|
147
158
|
self.filter = attributes[:'filter']
|
|
148
159
|
end
|
|
@@ -223,6 +234,7 @@ module Akeyless
|
|
|
223
234
|
accessibility == o.accessibility &&
|
|
224
235
|
advanced_filter == o.advanced_filter &&
|
|
225
236
|
auto_pagination == o.auto_pagination &&
|
|
237
|
+
current_folder == o.current_folder &&
|
|
226
238
|
filter == o.filter &&
|
|
227
239
|
json == o.json &&
|
|
228
240
|
minimal_view == o.minimal_view &&
|
|
@@ -246,7 +258,7 @@ module Akeyless
|
|
|
246
258
|
# Calculates hash code according to all attributes.
|
|
247
259
|
# @return [Integer] Hash code
|
|
248
260
|
def hash
|
|
249
|
-
[accessibility, advanced_filter, auto_pagination, filter, json, minimal_view, modified_after, pagination_token, path, sra_only, sub_types, tag, token, type, uid_token].hash
|
|
261
|
+
[accessibility, advanced_filter, auto_pagination, current_folder, filter, json, minimal_view, modified_after, pagination_token, path, sra_only, sub_types, tag, token, type, uid_token].hash
|
|
250
262
|
end
|
|
251
263
|
|
|
252
264
|
# Builds the object from hash
|
|
@@ -0,0 +1,437 @@
|
|
|
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: 3.0
|
|
7
|
+
Contact: support@akeyless.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Akeyless
|
|
17
|
+
# rotatedSecretCreateOpenAI is a command that creates a rotated secret for an OpenAI target by rotating the admin API key configured on the target.
|
|
18
|
+
class RotatedSecretCreateOpenAI
|
|
19
|
+
# Admin API key value to rotate (relevant only for rotator-type=api-key)
|
|
20
|
+
attr_accessor :api_key
|
|
21
|
+
|
|
22
|
+
# Admin API key ID to rotate (relevant only for rotator-type=api-key)
|
|
23
|
+
attr_accessor :api_key_id
|
|
24
|
+
|
|
25
|
+
# The credentials to connect with use-user-creds/use-target-creds
|
|
26
|
+
attr_accessor :authentication_credentials
|
|
27
|
+
|
|
28
|
+
# Whether to automatically rotate every --rotation-interval days, or disable existing automatic rotation [true/false]
|
|
29
|
+
attr_accessor :auto_rotate
|
|
30
|
+
|
|
31
|
+
# Protection from accidental deletion of this object [true/false]
|
|
32
|
+
attr_accessor :delete_protection
|
|
33
|
+
|
|
34
|
+
# Description of the object
|
|
35
|
+
attr_accessor :description
|
|
36
|
+
|
|
37
|
+
# Additional custom fields to associate with the item
|
|
38
|
+
attr_accessor :item_custom_fields
|
|
39
|
+
|
|
40
|
+
# Set output format to JSON
|
|
41
|
+
attr_accessor :json
|
|
42
|
+
|
|
43
|
+
# The name of a key that used to encrypt the secret value (if empty, the account default protectionKey key will be used)
|
|
44
|
+
attr_accessor :key
|
|
45
|
+
|
|
46
|
+
# Set the maximum number of versions, limited by the account settings defaults.
|
|
47
|
+
attr_accessor :max_versions
|
|
48
|
+
|
|
49
|
+
# Rotated secret name
|
|
50
|
+
attr_accessor :name
|
|
51
|
+
|
|
52
|
+
# The length of the password to be generated
|
|
53
|
+
attr_accessor :password_length
|
|
54
|
+
|
|
55
|
+
# How many days before the rotation of the item would you like to be notified
|
|
56
|
+
attr_accessor :rotation_event_in
|
|
57
|
+
|
|
58
|
+
# The Hour of the rotation in UTC
|
|
59
|
+
attr_accessor :rotation_hour
|
|
60
|
+
|
|
61
|
+
# The number of days to wait between every automatic key rotation (1-365)
|
|
62
|
+
attr_accessor :rotation_interval
|
|
63
|
+
|
|
64
|
+
# The rotator type. options: [target/api-key]
|
|
65
|
+
attr_accessor :rotator_type
|
|
66
|
+
|
|
67
|
+
# Add tags attached to this object
|
|
68
|
+
attr_accessor :tags
|
|
69
|
+
|
|
70
|
+
# Target name
|
|
71
|
+
attr_accessor :target_name
|
|
72
|
+
|
|
73
|
+
# Authentication token (see `/auth` and `/configure`)
|
|
74
|
+
attr_accessor :token
|
|
75
|
+
|
|
76
|
+
# The universal identity token, Required only for universal_identity authentication
|
|
77
|
+
attr_accessor :uid_token
|
|
78
|
+
|
|
79
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
80
|
+
def self.attribute_map
|
|
81
|
+
{
|
|
82
|
+
:'api_key' => :'api-key',
|
|
83
|
+
:'api_key_id' => :'api-key-id',
|
|
84
|
+
:'authentication_credentials' => :'authentication-credentials',
|
|
85
|
+
:'auto_rotate' => :'auto-rotate',
|
|
86
|
+
:'delete_protection' => :'delete_protection',
|
|
87
|
+
:'description' => :'description',
|
|
88
|
+
:'item_custom_fields' => :'item-custom-fields',
|
|
89
|
+
:'json' => :'json',
|
|
90
|
+
:'key' => :'key',
|
|
91
|
+
:'max_versions' => :'max-versions',
|
|
92
|
+
:'name' => :'name',
|
|
93
|
+
:'password_length' => :'password-length',
|
|
94
|
+
:'rotation_event_in' => :'rotation-event-in',
|
|
95
|
+
:'rotation_hour' => :'rotation-hour',
|
|
96
|
+
:'rotation_interval' => :'rotation-interval',
|
|
97
|
+
:'rotator_type' => :'rotator-type',
|
|
98
|
+
:'tags' => :'tags',
|
|
99
|
+
:'target_name' => :'target-name',
|
|
100
|
+
:'token' => :'token',
|
|
101
|
+
:'uid_token' => :'uid-token'
|
|
102
|
+
}
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Returns all the JSON keys this model knows about
|
|
106
|
+
def self.acceptable_attributes
|
|
107
|
+
attribute_map.values
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Attribute type mapping.
|
|
111
|
+
def self.openapi_types
|
|
112
|
+
{
|
|
113
|
+
:'api_key' => :'String',
|
|
114
|
+
:'api_key_id' => :'String',
|
|
115
|
+
:'authentication_credentials' => :'String',
|
|
116
|
+
:'auto_rotate' => :'String',
|
|
117
|
+
:'delete_protection' => :'String',
|
|
118
|
+
:'description' => :'String',
|
|
119
|
+
:'item_custom_fields' => :'Hash<String, String>',
|
|
120
|
+
:'json' => :'Boolean',
|
|
121
|
+
:'key' => :'String',
|
|
122
|
+
:'max_versions' => :'String',
|
|
123
|
+
:'name' => :'String',
|
|
124
|
+
:'password_length' => :'String',
|
|
125
|
+
:'rotation_event_in' => :'Array<String>',
|
|
126
|
+
:'rotation_hour' => :'Integer',
|
|
127
|
+
:'rotation_interval' => :'String',
|
|
128
|
+
:'rotator_type' => :'String',
|
|
129
|
+
:'tags' => :'Array<String>',
|
|
130
|
+
:'target_name' => :'String',
|
|
131
|
+
:'token' => :'String',
|
|
132
|
+
:'uid_token' => :'String'
|
|
133
|
+
}
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# List of attributes with nullable: true
|
|
137
|
+
def self.openapi_nullable
|
|
138
|
+
Set.new([
|
|
139
|
+
])
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Initializes the object
|
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
144
|
+
def initialize(attributes = {})
|
|
145
|
+
if (!attributes.is_a?(Hash))
|
|
146
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::RotatedSecretCreateOpenAI` initialize method"
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
150
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
151
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
152
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::RotatedSecretCreateOpenAI`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
153
|
+
end
|
|
154
|
+
h[k.to_sym] = v
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'api_key')
|
|
158
|
+
self.api_key = attributes[:'api_key']
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'api_key_id')
|
|
162
|
+
self.api_key_id = attributes[:'api_key_id']
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'authentication_credentials')
|
|
166
|
+
self.authentication_credentials = attributes[:'authentication_credentials']
|
|
167
|
+
else
|
|
168
|
+
self.authentication_credentials = 'use-user-creds'
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'auto_rotate')
|
|
172
|
+
self.auto_rotate = attributes[:'auto_rotate']
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if attributes.key?(:'delete_protection')
|
|
176
|
+
self.delete_protection = attributes[:'delete_protection']
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'description')
|
|
180
|
+
self.description = attributes[:'description']
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'item_custom_fields')
|
|
184
|
+
if (value = attributes[:'item_custom_fields']).is_a?(Hash)
|
|
185
|
+
self.item_custom_fields = value
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if attributes.key?(:'json')
|
|
190
|
+
self.json = attributes[:'json']
|
|
191
|
+
else
|
|
192
|
+
self.json = false
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'key')
|
|
196
|
+
self.key = attributes[:'key']
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'max_versions')
|
|
200
|
+
self.max_versions = attributes[:'max_versions']
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if attributes.key?(:'name')
|
|
204
|
+
self.name = attributes[:'name']
|
|
205
|
+
else
|
|
206
|
+
self.name = nil
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
if attributes.key?(:'password_length')
|
|
210
|
+
self.password_length = attributes[:'password_length']
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
if attributes.key?(:'rotation_event_in')
|
|
214
|
+
if (value = attributes[:'rotation_event_in']).is_a?(Array)
|
|
215
|
+
self.rotation_event_in = value
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if attributes.key?(:'rotation_hour')
|
|
220
|
+
self.rotation_hour = attributes[:'rotation_hour']
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.key?(:'rotation_interval')
|
|
224
|
+
self.rotation_interval = attributes[:'rotation_interval']
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if attributes.key?(:'rotator_type')
|
|
228
|
+
self.rotator_type = attributes[:'rotator_type']
|
|
229
|
+
else
|
|
230
|
+
self.rotator_type = nil
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if attributes.key?(:'tags')
|
|
234
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
|
235
|
+
self.tags = value
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if attributes.key?(:'target_name')
|
|
240
|
+
self.target_name = attributes[:'target_name']
|
|
241
|
+
else
|
|
242
|
+
self.target_name = nil
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
if attributes.key?(:'token')
|
|
246
|
+
self.token = attributes[:'token']
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
if attributes.key?(:'uid_token')
|
|
250
|
+
self.uid_token = attributes[:'uid_token']
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
255
|
+
# @return Array for valid properties with the reasons
|
|
256
|
+
def list_invalid_properties
|
|
257
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
258
|
+
invalid_properties = Array.new
|
|
259
|
+
if @name.nil?
|
|
260
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
if @rotator_type.nil?
|
|
264
|
+
invalid_properties.push('invalid value for "rotator_type", rotator_type cannot be nil.')
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if @target_name.nil?
|
|
268
|
+
invalid_properties.push('invalid value for "target_name", target_name cannot be nil.')
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
invalid_properties
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# Check to see if the all the properties in the model are valid
|
|
275
|
+
# @return true if the model is valid
|
|
276
|
+
def valid?
|
|
277
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
278
|
+
return false if @name.nil?
|
|
279
|
+
return false if @rotator_type.nil?
|
|
280
|
+
return false if @target_name.nil?
|
|
281
|
+
true
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# Checks equality by comparing each attribute.
|
|
285
|
+
# @param [Object] Object to be compared
|
|
286
|
+
def ==(o)
|
|
287
|
+
return true if self.equal?(o)
|
|
288
|
+
self.class == o.class &&
|
|
289
|
+
api_key == o.api_key &&
|
|
290
|
+
api_key_id == o.api_key_id &&
|
|
291
|
+
authentication_credentials == o.authentication_credentials &&
|
|
292
|
+
auto_rotate == o.auto_rotate &&
|
|
293
|
+
delete_protection == o.delete_protection &&
|
|
294
|
+
description == o.description &&
|
|
295
|
+
item_custom_fields == o.item_custom_fields &&
|
|
296
|
+
json == o.json &&
|
|
297
|
+
key == o.key &&
|
|
298
|
+
max_versions == o.max_versions &&
|
|
299
|
+
name == o.name &&
|
|
300
|
+
password_length == o.password_length &&
|
|
301
|
+
rotation_event_in == o.rotation_event_in &&
|
|
302
|
+
rotation_hour == o.rotation_hour &&
|
|
303
|
+
rotation_interval == o.rotation_interval &&
|
|
304
|
+
rotator_type == o.rotator_type &&
|
|
305
|
+
tags == o.tags &&
|
|
306
|
+
target_name == o.target_name &&
|
|
307
|
+
token == o.token &&
|
|
308
|
+
uid_token == o.uid_token
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
# @see the `==` method
|
|
312
|
+
# @param [Object] Object to be compared
|
|
313
|
+
def eql?(o)
|
|
314
|
+
self == o
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# Calculates hash code according to all attributes.
|
|
318
|
+
# @return [Integer] Hash code
|
|
319
|
+
def hash
|
|
320
|
+
[api_key, api_key_id, authentication_credentials, auto_rotate, delete_protection, description, item_custom_fields, json, key, max_versions, name, password_length, rotation_event_in, rotation_hour, rotation_interval, rotator_type, tags, target_name, token, uid_token].hash
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Builds the object from hash
|
|
324
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
325
|
+
# @return [Object] Returns the model itself
|
|
326
|
+
def self.build_from_hash(attributes)
|
|
327
|
+
return nil unless attributes.is_a?(Hash)
|
|
328
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
329
|
+
transformed_hash = {}
|
|
330
|
+
openapi_types.each_pair do |key, type|
|
|
331
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
332
|
+
transformed_hash["#{key}"] = nil
|
|
333
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
334
|
+
# check to ensure the input is an array given that the attribute
|
|
335
|
+
# is documented as an array but the input is not
|
|
336
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
337
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
338
|
+
end
|
|
339
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
340
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
341
|
+
end
|
|
342
|
+
end
|
|
343
|
+
new(transformed_hash)
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# Deserializes the data based on type
|
|
347
|
+
# @param string type Data type
|
|
348
|
+
# @param string value Value to be deserialized
|
|
349
|
+
# @return [Object] Deserialized data
|
|
350
|
+
def self._deserialize(type, value)
|
|
351
|
+
case type.to_sym
|
|
352
|
+
when :Time
|
|
353
|
+
Time.parse(value)
|
|
354
|
+
when :Date
|
|
355
|
+
Date.parse(value)
|
|
356
|
+
when :String
|
|
357
|
+
value.to_s
|
|
358
|
+
when :Integer
|
|
359
|
+
value.to_i
|
|
360
|
+
when :Float
|
|
361
|
+
value.to_f
|
|
362
|
+
when :Boolean
|
|
363
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
364
|
+
true
|
|
365
|
+
else
|
|
366
|
+
false
|
|
367
|
+
end
|
|
368
|
+
when :Object
|
|
369
|
+
# generic object (usually a Hash), return directly
|
|
370
|
+
value
|
|
371
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
372
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
373
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
374
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
375
|
+
k_type = Regexp.last_match[:k_type]
|
|
376
|
+
v_type = Regexp.last_match[:v_type]
|
|
377
|
+
{}.tap do |hash|
|
|
378
|
+
value.each do |k, v|
|
|
379
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
380
|
+
end
|
|
381
|
+
end
|
|
382
|
+
else # model
|
|
383
|
+
# models (e.g. Pet) or oneOf
|
|
384
|
+
klass = Akeyless.const_get(type)
|
|
385
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
386
|
+
end
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
# Returns the string representation of the object
|
|
390
|
+
# @return [String] String presentation of the object
|
|
391
|
+
def to_s
|
|
392
|
+
to_hash.to_s
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
396
|
+
# @return [Hash] Returns the object in the form of hash
|
|
397
|
+
def to_body
|
|
398
|
+
to_hash
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# Returns the object in the form of hash
|
|
402
|
+
# @return [Hash] Returns the object in the form of hash
|
|
403
|
+
def to_hash
|
|
404
|
+
hash = {}
|
|
405
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
406
|
+
value = self.send(attr)
|
|
407
|
+
if value.nil?
|
|
408
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
409
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
hash[param] = _to_hash(value)
|
|
413
|
+
end
|
|
414
|
+
hash
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
# Outputs non-array value in the form of hash
|
|
418
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
419
|
+
# @param [Object] value Any valid value
|
|
420
|
+
# @return [Hash] Returns the value in the form of hash
|
|
421
|
+
def _to_hash(value)
|
|
422
|
+
if value.is_a?(Array)
|
|
423
|
+
value.compact.map { |v| _to_hash(v) }
|
|
424
|
+
elsif value.is_a?(Hash)
|
|
425
|
+
{}.tap do |hash|
|
|
426
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
427
|
+
end
|
|
428
|
+
elsif value.respond_to? :to_hash
|
|
429
|
+
value.to_hash
|
|
430
|
+
else
|
|
431
|
+
value
|
|
432
|
+
end
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
end
|
|
@@ -72,7 +72,7 @@ module Akeyless
|
|
|
72
72
|
# Custom rotation command
|
|
73
73
|
attr_accessor :rotator_custom_cmd
|
|
74
74
|
|
|
75
|
-
# The rotator type. options: [target/password]
|
|
75
|
+
# The rotator type. options: [target/password/key]
|
|
76
76
|
attr_accessor :rotator_type
|
|
77
77
|
|
|
78
78
|
# Rotate same password for each host from the Linked Target (relevant only for Linked Target)
|
|
@@ -15,6 +15,9 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Akeyless
|
|
17
17
|
class RotatedSecretDeleteSync
|
|
18
|
+
# Delete the secret from the remote target USC as well
|
|
19
|
+
attr_accessor :delete_from_usc
|
|
20
|
+
|
|
18
21
|
# Set output format to JSON
|
|
19
22
|
attr_accessor :json
|
|
20
23
|
|
|
@@ -36,6 +39,7 @@ module Akeyless
|
|
|
36
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
40
|
def self.attribute_map
|
|
38
41
|
{
|
|
42
|
+
:'delete_from_usc' => :'delete-from-usc',
|
|
39
43
|
:'json' => :'json',
|
|
40
44
|
:'name' => :'name',
|
|
41
45
|
:'remote_secret_name' => :'remote-secret-name',
|
|
@@ -53,6 +57,7 @@ module Akeyless
|
|
|
53
57
|
# Attribute type mapping.
|
|
54
58
|
def self.openapi_types
|
|
55
59
|
{
|
|
60
|
+
:'delete_from_usc' => :'Boolean',
|
|
56
61
|
:'json' => :'Boolean',
|
|
57
62
|
:'name' => :'String',
|
|
58
63
|
:'remote_secret_name' => :'String',
|
|
@@ -83,6 +88,12 @@ module Akeyless
|
|
|
83
88
|
h[k.to_sym] = v
|
|
84
89
|
}
|
|
85
90
|
|
|
91
|
+
if attributes.key?(:'delete_from_usc')
|
|
92
|
+
self.delete_from_usc = attributes[:'delete_from_usc']
|
|
93
|
+
else
|
|
94
|
+
self.delete_from_usc = false
|
|
95
|
+
end
|
|
96
|
+
|
|
86
97
|
if attributes.key?(:'json')
|
|
87
98
|
self.json = attributes[:'json']
|
|
88
99
|
else
|
|
@@ -144,6 +155,7 @@ module Akeyless
|
|
|
144
155
|
def ==(o)
|
|
145
156
|
return true if self.equal?(o)
|
|
146
157
|
self.class == o.class &&
|
|
158
|
+
delete_from_usc == o.delete_from_usc &&
|
|
147
159
|
json == o.json &&
|
|
148
160
|
name == o.name &&
|
|
149
161
|
remote_secret_name == o.remote_secret_name &&
|
|
@@ -161,7 +173,7 @@ module Akeyless
|
|
|
161
173
|
# Calculates hash code according to all attributes.
|
|
162
174
|
# @return [Integer] Hash code
|
|
163
175
|
def hash
|
|
164
|
-
[json, name, remote_secret_name, token, uid_token, usc_name].hash
|
|
176
|
+
[delete_from_usc, json, name, remote_secret_name, token, uid_token, usc_name].hash
|
|
165
177
|
end
|
|
166
178
|
|
|
167
179
|
# Builds the object from hash
|