akeyless 5.0.39 → 5.0.40

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.
Files changed (177) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +190 -0
  3. data/README.md +15 -1
  4. data/akeyless.gemspec +1 -1
  5. data/docs/AccountGeneralSettings.md +2 -0
  6. data/docs/AliCloudTargetDetails.md +28 -0
  7. data/docs/AssocTargetItem.md +12 -0
  8. data/docs/AuthMethodAccessInfo.md +2 -0
  9. data/docs/AuthMethodCreateOIDC.md +8 -0
  10. data/docs/AuthMethodCreateOutput.md +3 -1
  11. data/docs/AuthMethodCreateSAML.md +8 -0
  12. data/docs/AuthMethodUpdateOIDC.md +8 -0
  13. data/docs/AuthMethodUpdateOutput.md +3 -1
  14. data/docs/AuthMethodUpdateSAML.md +8 -0
  15. data/docs/CreateUSC.md +2 -0
  16. data/docs/DynamicSecretCreateEks.md +3 -1
  17. data/docs/DynamicSecretCreateGke.md +3 -1
  18. data/docs/DynamicSecretCreateK8s.md +3 -1
  19. data/docs/DynamicSecretUpdateEks.md +3 -1
  20. data/docs/DynamicSecretUpdateGke.md +3 -1
  21. data/docs/DynamicSecretUpdateK8s.md +3 -1
  22. data/docs/EventForwarderCreateEmail.md +1 -1
  23. data/docs/EventForwarderUpdateEmail.md +1 -1
  24. data/docs/GatewayCreateMigration.md +2 -0
  25. data/docs/GatewayCreateProducerEks.md +3 -1
  26. data/docs/GatewayCreateProducerGke.md +3 -1
  27. data/docs/GatewayCreateProducerNativeK8S.md +3 -1
  28. data/docs/GatewayUpdateMigration.md +2 -0
  29. data/docs/GatewayUpdateProducerEks.md +3 -1
  30. data/docs/GatewayUpdateProducerGke.md +3 -1
  31. data/docs/GatewayUpdateProducerNativeK8S.md +3 -1
  32. data/docs/GetGroupOutput.md +13 -1
  33. data/docs/GetScimStatus.md +24 -0
  34. data/docs/GrantedRole.md +20 -0
  35. data/docs/Group.md +13 -1
  36. data/docs/ListTargets.md +1 -1
  37. data/docs/RotatedSecretCreateAliCloud.md +90 -0
  38. data/docs/RotatedSecretCreateAzure.md +1 -1
  39. data/docs/RotatedSecretUpdateAliCloud.md +92 -0
  40. data/docs/RotatedSecretUpdateAzure.md +1 -1
  41. data/docs/ScimSettings.md +30 -0
  42. data/docs/ScimStatus.md +42 -0
  43. data/docs/TargetCreateAliCloud.md +52 -0
  44. data/docs/TargetList.md +1 -1
  45. data/docs/TargetTypeDetailsInput.md +2 -0
  46. data/docs/TargetUpdateAliCloud.md +56 -0
  47. data/docs/UpdateItem.md +3 -1
  48. data/docs/UpdateRotatedSecret.md +3 -1
  49. data/docs/UscCreate.md +3 -1
  50. data/docs/UscDelete.md +4 -0
  51. data/docs/UscGet.md +4 -0
  52. data/docs/UscList.md +4 -0
  53. data/docs/UscUpdate.md +4 -0
  54. data/docs/V2Api.md +322 -6
  55. data/lib/akeyless/api/v2_api.rb +325 -5
  56. data/lib/akeyless/models/account_general_settings.rb +13 -1
  57. data/lib/akeyless/models/ali_cloud_target_details.rb +259 -0
  58. data/lib/akeyless/models/assoc_target_item.rb +63 -1
  59. data/lib/akeyless/models/attribute_type_and_value.rb +1 -1
  60. data/lib/akeyless/models/auth_method_access_info.rb +10 -1
  61. data/lib/akeyless/models/auth_method_create_oidc.rb +41 -1
  62. data/lib/akeyless/models/auth_method_create_output.rb +14 -4
  63. data/lib/akeyless/models/auth_method_create_saml.rb +41 -1
  64. data/lib/akeyless/models/auth_method_update_oidc.rb +41 -1
  65. data/lib/akeyless/models/auth_method_update_output.rb +14 -4
  66. data/lib/akeyless/models/auth_method_update_saml.rb +41 -1
  67. data/lib/akeyless/models/create_mcp_secret_bearer_token.rb +3 -0
  68. data/lib/akeyless/models/create_mcp_secret_o_auth_auth_code.rb +3 -0
  69. data/lib/akeyless/models/create_mcp_secret_o_auth_client_creds.rb +3 -0
  70. data/lib/akeyless/models/create_secret.rb +3 -0
  71. data/lib/akeyless/models/create_usc.rb +11 -1
  72. data/lib/akeyless/models/dynamic_secret_create_eks.rb +12 -2
  73. data/lib/akeyless/models/dynamic_secret_create_gke.rb +12 -2
  74. data/lib/akeyless/models/dynamic_secret_create_k8s.rb +12 -2
  75. data/lib/akeyless/models/dynamic_secret_update_eks.rb +12 -2
  76. data/lib/akeyless/models/dynamic_secret_update_gke.rb +12 -2
  77. data/lib/akeyless/models/dynamic_secret_update_k8s.rb +12 -2
  78. data/lib/akeyless/models/event_forwarder_create_email.rb +1 -1
  79. data/lib/akeyless/models/event_forwarder_update_email.rb +1 -1
  80. data/lib/akeyless/models/gateway_create_migration.rb +12 -1
  81. data/lib/akeyless/models/gateway_create_producer_artifactory.rb +4 -0
  82. data/lib/akeyless/models/gateway_create_producer_aws.rb +4 -0
  83. data/lib/akeyless/models/gateway_create_producer_azure.rb +4 -0
  84. data/lib/akeyless/models/gateway_create_producer_cassandra.rb +4 -0
  85. data/lib/akeyless/models/gateway_create_producer_chef.rb +4 -0
  86. data/lib/akeyless/models/gateway_create_producer_custom.rb +4 -0
  87. data/lib/akeyless/models/gateway_create_producer_dockerhub.rb +4 -0
  88. data/lib/akeyless/models/gateway_create_producer_eks.rb +16 -2
  89. data/lib/akeyless/models/gateway_create_producer_gcp.rb +4 -0
  90. data/lib/akeyless/models/gateway_create_producer_github.rb +4 -0
  91. data/lib/akeyless/models/gateway_create_producer_gke.rb +16 -2
  92. data/lib/akeyless/models/gateway_create_producer_hana_db.rb +4 -0
  93. data/lib/akeyless/models/gateway_create_producer_ldap.rb +4 -0
  94. data/lib/akeyless/models/gateway_create_producer_mongo.rb +4 -0
  95. data/lib/akeyless/models/gateway_create_producer_mssql.rb +4 -0
  96. data/lib/akeyless/models/gateway_create_producer_my_sql.rb +4 -0
  97. data/lib/akeyless/models/gateway_create_producer_native_k8_s.rb +16 -2
  98. data/lib/akeyless/models/gateway_create_producer_oracle_db.rb +4 -0
  99. data/lib/akeyless/models/gateway_create_producer_ping.rb +4 -0
  100. data/lib/akeyless/models/gateway_create_producer_postgre_sql.rb +4 -0
  101. data/lib/akeyless/models/gateway_create_producer_rabbit_mq.rb +4 -0
  102. data/lib/akeyless/models/gateway_create_producer_rdp.rb +4 -0
  103. data/lib/akeyless/models/gateway_create_producer_redis.rb +4 -0
  104. data/lib/akeyless/models/gateway_create_producer_redshift.rb +4 -0
  105. data/lib/akeyless/models/gateway_create_producer_snowflake.rb +4 -0
  106. data/lib/akeyless/models/gateway_create_producer_venafi.rb +4 -0
  107. data/lib/akeyless/models/gateway_delete_producer.rb +4 -0
  108. data/lib/akeyless/models/gateway_get_producer.rb +4 -0
  109. data/lib/akeyless/models/gateway_get_tmp_users.rb +4 -0
  110. data/lib/akeyless/models/gateway_revoke_tmp_users.rb +4 -0
  111. data/lib/akeyless/models/gateway_start_producer.rb +4 -0
  112. data/lib/akeyless/models/gateway_stop_producer.rb +4 -0
  113. data/lib/akeyless/models/gateway_update_migration.rb +12 -1
  114. data/lib/akeyless/models/gateway_update_producer_artifactory.rb +4 -0
  115. data/lib/akeyless/models/gateway_update_producer_aws.rb +4 -0
  116. data/lib/akeyless/models/gateway_update_producer_azure.rb +4 -0
  117. data/lib/akeyless/models/gateway_update_producer_cassandra.rb +4 -0
  118. data/lib/akeyless/models/gateway_update_producer_chef.rb +4 -0
  119. data/lib/akeyless/models/gateway_update_producer_custom.rb +4 -0
  120. data/lib/akeyless/models/gateway_update_producer_dockerhub.rb +4 -0
  121. data/lib/akeyless/models/gateway_update_producer_eks.rb +16 -2
  122. data/lib/akeyless/models/gateway_update_producer_gcp.rb +4 -0
  123. data/lib/akeyless/models/gateway_update_producer_github.rb +4 -0
  124. data/lib/akeyless/models/gateway_update_producer_gke.rb +16 -2
  125. data/lib/akeyless/models/gateway_update_producer_hana_db.rb +4 -0
  126. data/lib/akeyless/models/gateway_update_producer_ldap.rb +4 -0
  127. data/lib/akeyless/models/gateway_update_producer_mongo.rb +4 -0
  128. data/lib/akeyless/models/gateway_update_producer_mssql.rb +4 -0
  129. data/lib/akeyless/models/gateway_update_producer_my_sql.rb +4 -0
  130. data/lib/akeyless/models/gateway_update_producer_native_k8_s.rb +16 -2
  131. data/lib/akeyless/models/gateway_update_producer_oracle_db.rb +4 -0
  132. data/lib/akeyless/models/gateway_update_producer_ping.rb +4 -0
  133. data/lib/akeyless/models/gateway_update_producer_postgre_sql.rb +4 -0
  134. data/lib/akeyless/models/gateway_update_producer_rabbit_mq.rb +4 -0
  135. data/lib/akeyless/models/gateway_update_producer_rdp.rb +4 -0
  136. data/lib/akeyless/models/gateway_update_producer_redis.rb +4 -0
  137. data/lib/akeyless/models/gateway_update_producer_redshift.rb +4 -0
  138. data/lib/akeyless/models/gateway_update_producer_snowflake.rb +4 -0
  139. data/lib/akeyless/models/gateway_update_producer_venafi.rb +4 -0
  140. data/lib/akeyless/models/gateway_update_tmp_users.rb +4 -0
  141. data/lib/akeyless/models/get_group_output.rb +63 -4
  142. data/lib/akeyless/models/get_scim_status.rb +254 -0
  143. data/lib/akeyless/models/granted_role.rb +224 -0
  144. data/lib/akeyless/models/group.rb +63 -4
  145. data/lib/akeyless/models/list_targets.rb +1 -1
  146. data/lib/akeyless/models/rotated_secret_create_ali_cloud.rb +605 -0
  147. data/lib/akeyless/models/rotated_secret_create_azure.rb +1 -1
  148. data/lib/akeyless/models/rotated_secret_update_ali_cloud.rb +605 -0
  149. data/lib/akeyless/models/rotated_secret_update_azure.rb +1 -1
  150. data/lib/akeyless/models/scim_settings.rb +271 -0
  151. data/lib/akeyless/models/scim_status.rb +323 -0
  152. data/lib/akeyless/models/target_create_ali_cloud.rb +394 -0
  153. data/lib/akeyless/models/target_list.rb +1 -1
  154. data/lib/akeyless/models/target_type_details_input.rb +10 -1
  155. data/lib/akeyless/models/target_update_ali_cloud.rb +414 -0
  156. data/lib/akeyless/models/update_item.rb +23 -2
  157. data/lib/akeyless/models/update_mcp_secret_bearer_token.rb +3 -0
  158. data/lib/akeyless/models/update_mcp_secret_o_auth_auth_code.rb +3 -0
  159. data/lib/akeyless/models/update_mcp_secret_o_auth_client_creds.rb +3 -0
  160. data/lib/akeyless/models/update_rotated_secret.rb +20 -2
  161. data/lib/akeyless/models/usc_create.rb +12 -2
  162. data/lib/akeyless/models/usc_delete.rb +21 -1
  163. data/lib/akeyless/models/usc_get.rb +21 -1
  164. data/lib/akeyless/models/usc_list.rb +21 -1
  165. data/lib/akeyless/models/usc_update.rb +21 -1
  166. data/lib/akeyless/version.rb +1 -1
  167. data/lib/akeyless.rb +9 -0
  168. data/spec/models/ali_cloud_target_details_spec.rb +66 -0
  169. data/spec/models/get_scim_status_spec.rb +54 -0
  170. data/spec/models/granted_role_spec.rb +42 -0
  171. data/spec/models/rotated_secret_create_ali_cloud_spec.rb +252 -0
  172. data/spec/models/rotated_secret_update_ali_cloud_spec.rb +258 -0
  173. data/spec/models/scim_settings_spec.rb +72 -0
  174. data/spec/models/scim_status_spec.rb +108 -0
  175. data/spec/models/target_create_ali_cloud_spec.rb +138 -0
  176. data/spec/models/target_update_ali_cloud_spec.rb +150 -0
  177. metadata +54 -17
@@ -194,6 +194,10 @@ module Akeyless
194
194
  # List of attributes with nullable: true
195
195
  def self.openapi_nullable
196
196
  Set.new([
197
+ :'ara_enabled',
198
+ :'enable_agentic_runtime_authority',
199
+ :'enable_ai_quorum',
200
+ :'skip_dry_run',
197
201
  ])
198
202
  end
199
203
 
@@ -201,6 +201,10 @@ module Akeyless
201
201
  # List of attributes with nullable: true
202
202
  def self.openapi_nullable
203
203
  Set.new([
204
+ :'ara_enabled',
205
+ :'enable_agentic_runtime_authority',
206
+ :'enable_ai_quorum',
207
+ :'skip_dry_run',
204
208
  ])
205
209
  end
206
210
 
@@ -101,6 +101,10 @@ module Akeyless
101
101
  # List of attributes with nullable: true
102
102
  def self.openapi_nullable
103
103
  Set.new([
104
+ :'ara_enabled',
105
+ :'enable_agentic_runtime_authority',
106
+ :'enable_ai_quorum',
107
+ :'skip_dry_run',
104
108
  ])
105
109
  end
106
110
 
@@ -21,6 +21,12 @@ module Akeyless
21
21
 
22
22
  attr_accessor :description
23
23
 
24
+ # GrantedRoles are the roles a member of this group gets at login, through the group's akeyless_groups claim. Read-only, and filled only for the SCIM bearer that owns the group: a group name on its own says nothing about the access it carries, which is what a reviewer certifying the entitlement has to judge.
25
+ attr_accessor :granted_roles
26
+
27
+ # GrantedRolesKnown is set when GrantedRoles was computed, so an empty list means \"grants no role\" rather than \"not computed\" (another caller, or an older UAM).
28
+ attr_accessor :granted_roles_known
29
+
24
30
  attr_accessor :group_alias
25
31
 
26
32
  attr_accessor :group_id
@@ -31,20 +37,35 @@ module Akeyless
31
37
 
32
38
  attr_accessor :modification_date
33
39
 
40
+ attr_accessor :scim_external_id
41
+
42
+ attr_accessor :scim_managed
43
+
44
+ attr_accessor :scim_provisioned_access_id
45
+
34
46
  attr_accessor :user_assignments
35
47
 
48
+ # Version identifies the member assignments this group was read with. Pass it back as UpdateGroupInput.ExpectedVersion to make the update conditional.
49
+ attr_accessor :version
50
+
36
51
  # Attribute mapping from ruby-style variable name to JSON key.
37
52
  def self.attribute_map
38
53
  {
39
54
  :'account_id' => :'account_id',
40
55
  :'creation_date' => :'creation_date',
41
56
  :'description' => :'description',
57
+ :'granted_roles' => :'granted_roles',
58
+ :'granted_roles_known' => :'granted_roles_known',
42
59
  :'group_alias' => :'group_alias',
43
60
  :'group_id' => :'group_id',
44
61
  :'group_name' => :'group_name',
45
62
  :'is_subclaims_with_operator' => :'is_subclaims_with_operator',
46
63
  :'modification_date' => :'modification_date',
47
- :'user_assignments' => :'user_assignments'
64
+ :'scim_external_id' => :'scim_external_id',
65
+ :'scim_managed' => :'scim_managed',
66
+ :'scim_provisioned_access_id' => :'scim_provisioned_access_id',
67
+ :'user_assignments' => :'user_assignments',
68
+ :'version' => :'version'
48
69
  }
49
70
  end
50
71
 
@@ -59,12 +80,18 @@ module Akeyless
59
80
  :'account_id' => :'String',
60
81
  :'creation_date' => :'Time',
61
82
  :'description' => :'String',
83
+ :'granted_roles' => :'Array<GrantedRole>',
84
+ :'granted_roles_known' => :'Boolean',
62
85
  :'group_alias' => :'String',
63
86
  :'group_id' => :'String',
64
87
  :'group_name' => :'String',
65
88
  :'is_subclaims_with_operator' => :'Boolean',
66
89
  :'modification_date' => :'Time',
67
- :'user_assignments' => :'Array<AccessPermissionAssignment>'
90
+ :'scim_external_id' => :'String',
91
+ :'scim_managed' => :'Boolean',
92
+ :'scim_provisioned_access_id' => :'String',
93
+ :'user_assignments' => :'Array<AccessPermissionAssignment>',
94
+ :'version' => :'String'
68
95
  }
69
96
  end
70
97
 
@@ -101,6 +128,16 @@ module Akeyless
101
128
  self.description = attributes[:'description']
102
129
  end
103
130
 
131
+ if attributes.key?(:'granted_roles')
132
+ if (value = attributes[:'granted_roles']).is_a?(Array)
133
+ self.granted_roles = value
134
+ end
135
+ end
136
+
137
+ if attributes.key?(:'granted_roles_known')
138
+ self.granted_roles_known = attributes[:'granted_roles_known']
139
+ end
140
+
104
141
  if attributes.key?(:'group_alias')
105
142
  self.group_alias = attributes[:'group_alias']
106
143
  end
@@ -121,11 +158,27 @@ module Akeyless
121
158
  self.modification_date = attributes[:'modification_date']
122
159
  end
123
160
 
161
+ if attributes.key?(:'scim_external_id')
162
+ self.scim_external_id = attributes[:'scim_external_id']
163
+ end
164
+
165
+ if attributes.key?(:'scim_managed')
166
+ self.scim_managed = attributes[:'scim_managed']
167
+ end
168
+
169
+ if attributes.key?(:'scim_provisioned_access_id')
170
+ self.scim_provisioned_access_id = attributes[:'scim_provisioned_access_id']
171
+ end
172
+
124
173
  if attributes.key?(:'user_assignments')
125
174
  if (value = attributes[:'user_assignments']).is_a?(Array)
126
175
  self.user_assignments = value
127
176
  end
128
177
  end
178
+
179
+ if attributes.key?(:'version')
180
+ self.version = attributes[:'version']
181
+ end
129
182
  end
130
183
 
131
184
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -151,12 +204,18 @@ module Akeyless
151
204
  account_id == o.account_id &&
152
205
  creation_date == o.creation_date &&
153
206
  description == o.description &&
207
+ granted_roles == o.granted_roles &&
208
+ granted_roles_known == o.granted_roles_known &&
154
209
  group_alias == o.group_alias &&
155
210
  group_id == o.group_id &&
156
211
  group_name == o.group_name &&
157
212
  is_subclaims_with_operator == o.is_subclaims_with_operator &&
158
213
  modification_date == o.modification_date &&
159
- user_assignments == o.user_assignments
214
+ scim_external_id == o.scim_external_id &&
215
+ scim_managed == o.scim_managed &&
216
+ scim_provisioned_access_id == o.scim_provisioned_access_id &&
217
+ user_assignments == o.user_assignments &&
218
+ version == o.version
160
219
  end
161
220
 
162
221
  # @see the `==` method
@@ -168,7 +227,7 @@ module Akeyless
168
227
  # Calculates hash code according to all attributes.
169
228
  # @return [Integer] Hash code
170
229
  def hash
171
- [account_id, creation_date, description, group_alias, group_id, group_name, is_subclaims_with_operator, modification_date, user_assignments].hash
230
+ [account_id, creation_date, description, granted_roles, granted_roles_known, group_alias, group_id, group_name, is_subclaims_with_operator, modification_date, scim_external_id, scim_managed, scim_provisioned_access_id, user_assignments, version].hash
172
231
  end
173
232
 
174
233
  # Builds the object from hash
@@ -0,0 +1,254 @@
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
+ class GetScimStatus
18
+ # Set output format to JSON
19
+ attr_accessor :json
20
+
21
+ # SAML or OIDC auth method name
22
+ attr_accessor :name
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
+ :'json' => :'json',
34
+ :'name' => :'name',
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
+ :'json' => :'Boolean',
49
+ :'name' => :'String',
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::GetScimStatus` 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::GetScimStatus`. 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?(:'json')
77
+ self.json = attributes[:'json']
78
+ else
79
+ self.json = false
80
+ end
81
+
82
+ if attributes.key?(:'name')
83
+ self.name = attributes[:'name']
84
+ else
85
+ self.name = nil
86
+ end
87
+
88
+ if attributes.key?(:'token')
89
+ self.token = attributes[:'token']
90
+ end
91
+
92
+ if attributes.key?(:'uid_token')
93
+ self.uid_token = attributes[:'uid_token']
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ if @name.nil?
103
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
104
+ end
105
+
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
+ return false if @name.nil?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ json == o.json &&
123
+ name == o.name &&
124
+ token == o.token &&
125
+ uid_token == o.uid_token
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Integer] Hash code
136
+ def hash
137
+ [json, name, token, uid_token].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def self.build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ attributes = attributes.transform_keys(&:to_sym)
146
+ transformed_hash = {}
147
+ openapi_types.each_pair do |key, type|
148
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = nil
150
+ elsif type =~ /\AArray<(.*)>/i
151
+ # check to ensure the input is an array given that the attribute
152
+ # is documented as an array but the input is not
153
+ if attributes[attribute_map[key]].is_a?(Array)
154
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
155
+ end
156
+ elsif !attributes[attribute_map[key]].nil?
157
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
158
+ end
159
+ end
160
+ new(transformed_hash)
161
+ end
162
+
163
+ # Deserializes the data based on type
164
+ # @param string type Data type
165
+ # @param string value Value to be deserialized
166
+ # @return [Object] Deserialized data
167
+ def self._deserialize(type, value)
168
+ case type.to_sym
169
+ when :Time
170
+ Time.parse(value)
171
+ when :Date
172
+ Date.parse(value)
173
+ when :String
174
+ value.to_s
175
+ when :Integer
176
+ value.to_i
177
+ when :Float
178
+ value.to_f
179
+ when :Boolean
180
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
181
+ true
182
+ else
183
+ false
184
+ end
185
+ when :Object
186
+ # generic object (usually a Hash), return directly
187
+ value
188
+ when /\AArray<(?<inner_type>.+)>\z/
189
+ inner_type = Regexp.last_match[:inner_type]
190
+ value.map { |v| _deserialize(inner_type, v) }
191
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
192
+ k_type = Regexp.last_match[:k_type]
193
+ v_type = Regexp.last_match[:v_type]
194
+ {}.tap do |hash|
195
+ value.each do |k, v|
196
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
+ end
198
+ end
199
+ else # model
200
+ # models (e.g. Pet) or oneOf
201
+ klass = Akeyless.const_get(type)
202
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
203
+ end
204
+ end
205
+
206
+ # Returns the string representation of the object
207
+ # @return [String] String presentation of the object
208
+ def to_s
209
+ to_hash.to_s
210
+ end
211
+
212
+ # to_body is an alias to to_hash (backward compatibility)
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_body
215
+ to_hash
216
+ end
217
+
218
+ # Returns the object in the form of hash
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_hash
221
+ hash = {}
222
+ self.class.attribute_map.each_pair do |attr, param|
223
+ value = self.send(attr)
224
+ if value.nil?
225
+ is_nullable = self.class.openapi_nullable.include?(attr)
226
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
227
+ end
228
+
229
+ hash[param] = _to_hash(value)
230
+ end
231
+ hash
232
+ end
233
+
234
+ # Outputs non-array value in the form of hash
235
+ # For object, use to_hash. Otherwise, just return the value
236
+ # @param [Object] value Any valid value
237
+ # @return [Hash] Returns the value in the form of hash
238
+ def _to_hash(value)
239
+ if value.is_a?(Array)
240
+ value.compact.map { |v| _to_hash(v) }
241
+ elsif value.is_a?(Hash)
242
+ {}.tap do |hash|
243
+ value.each { |k, v| hash[k] = _to_hash(v) }
244
+ end
245
+ elsif value.respond_to? :to_hash
246
+ value.to_hash
247
+ else
248
+ value
249
+ end
250
+ end
251
+
252
+ end
253
+
254
+ end
@@ -0,0 +1,224 @@
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
+ class GrantedRole
18
+ # Conditional is set when the role association also needs something besides this group: another claim, or membership in another group (\" AND \").
19
+ attr_accessor :conditional
20
+
21
+ attr_accessor :name
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'conditional' => :'conditional',
27
+ :'name' => :'name'
28
+ }
29
+ end
30
+
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'conditional' => :'Boolean',
40
+ :'name' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::GrantedRole` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::GrantedRole`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'conditional')
66
+ self.conditional = attributes[:'conditional']
67
+ end
68
+
69
+ if attributes.key?(:'name')
70
+ self.name = attributes[:'name']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ warn '[DEPRECATED] the `valid?` method is obsolete'
86
+ true
87
+ end
88
+
89
+ # Checks equality by comparing each attribute.
90
+ # @param [Object] Object to be compared
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ conditional == o.conditional &&
95
+ name == o.name
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Integer] Hash code
106
+ def hash
107
+ [conditional, name].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def self.build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+ attributes = attributes.transform_keys(&:to_sym)
116
+ transformed_hash = {}
117
+ openapi_types.each_pair do |key, type|
118
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
119
+ transformed_hash["#{key}"] = nil
120
+ elsif type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[attribute_map[key]].is_a?(Array)
124
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
125
+ end
126
+ elsif !attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
128
+ end
129
+ end
130
+ new(transformed_hash)
131
+ end
132
+
133
+ # Deserializes the data based on type
134
+ # @param string type Data type
135
+ # @param string value Value to be deserialized
136
+ # @return [Object] Deserialized data
137
+ def self._deserialize(type, value)
138
+ case type.to_sym
139
+ when :Time
140
+ Time.parse(value)
141
+ when :Date
142
+ Date.parse(value)
143
+ when :String
144
+ value.to_s
145
+ when :Integer
146
+ value.to_i
147
+ when :Float
148
+ value.to_f
149
+ when :Boolean
150
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
151
+ true
152
+ else
153
+ false
154
+ end
155
+ when :Object
156
+ # generic object (usually a Hash), return directly
157
+ value
158
+ when /\AArray<(?<inner_type>.+)>\z/
159
+ inner_type = Regexp.last_match[:inner_type]
160
+ value.map { |v| _deserialize(inner_type, v) }
161
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
162
+ k_type = Regexp.last_match[:k_type]
163
+ v_type = Regexp.last_match[:v_type]
164
+ {}.tap do |hash|
165
+ value.each do |k, v|
166
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
167
+ end
168
+ end
169
+ else # model
170
+ # models (e.g. Pet) or oneOf
171
+ klass = Akeyless.const_get(type)
172
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ if value.nil?
195
+ is_nullable = self.class.openapi_nullable.include?(attr)
196
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
197
+ end
198
+
199
+ hash[param] = _to_hash(value)
200
+ end
201
+ hash
202
+ end
203
+
204
+ # Outputs non-array value in the form of hash
205
+ # For object, use to_hash. Otherwise, just return the value
206
+ # @param [Object] value Any valid value
207
+ # @return [Hash] Returns the value in the form of hash
208
+ def _to_hash(value)
209
+ if value.is_a?(Array)
210
+ value.compact.map { |v| _to_hash(v) }
211
+ elsif value.is_a?(Hash)
212
+ {}.tap do |hash|
213
+ value.each { |k, v| hash[k] = _to_hash(v) }
214
+ end
215
+ elsif value.respond_to? :to_hash
216
+ value.to_hash
217
+ else
218
+ value
219
+ end
220
+ end
221
+
222
+ end
223
+
224
+ end