insights-rbac-api-client 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +49 -22
- data/client-meta.json +1 -1
- data/docs/Access.md +10 -9
- data/docs/AccessApi.md +39 -19
- data/docs/AccessPagination.md +12 -11
- data/docs/AddRoleToGroup200Response.md +18 -0
- data/docs/AdditionalGroup.md +12 -11
- data/docs/CrossAccountRequest.md +30 -0
- data/docs/CrossAccountRequestApi.md +386 -0
- data/docs/CrossAccountRequestByAccount.md +36 -0
- data/docs/CrossAccountRequestByUserId.md +32 -0
- data/docs/CrossAccountRequestDetail.md +49 -0
- data/docs/CrossAccountRequestDetailByAccount.md +38 -0
- data/docs/CrossAccountRequestDetailByUseId.md +34 -0
- data/docs/CrossAccountRequestIn.md +26 -0
- data/docs/CrossAccountRequestOut.md +34 -0
- data/docs/CrossAccountRequestPagination.md +22 -0
- data/docs/CrossAccountRequestPaginationAllOfDataInner.md +49 -0
- data/docs/CrossAccountRequestPatch.md +24 -0
- data/docs/CrossAccountRequestUpdateIn.md +22 -0
- data/docs/CrossAccountRequestWithRoles.md +32 -0
- data/docs/CrossAccountRequestWithRolesRolesInner.md +22 -0
- data/docs/Error.md +8 -7
- data/docs/Error403.md +8 -7
- data/docs/Error403ErrorsInner.md +22 -0
- data/docs/ErrorErrorsInner.md +20 -0
- data/docs/ErrorNotFound.md +18 -0
- data/docs/ErrorNotFoundErrorsInner.md +22 -0
- data/docs/Group.md +10 -9
- data/docs/GroupApi.md +369 -163
- data/docs/GroupOut.md +26 -23
- data/docs/GroupPagination.md +12 -11
- data/docs/GroupPrincipalIn.md +8 -7
- data/docs/GroupRoleIn.md +8 -7
- data/docs/GroupRolesPagination.md +12 -11
- data/docs/GroupWithPrincipals.md +18 -17
- data/docs/GroupWithPrincipalsAndRoles.md +20 -19
- data/docs/ListPagination.md +10 -9
- data/docs/PaginationLinks.md +14 -13
- data/docs/PaginationMeta.md +8 -7
- data/docs/Permission.md +26 -0
- data/docs/PermissionApi.md +185 -0
- data/docs/PermissionOptionsPagination.md +22 -0
- data/docs/PermissionPagination.md +22 -0
- data/docs/Policy.md +10 -9
- data/docs/PolicyApi.md +153 -69
- data/docs/PolicyExtended.md +20 -19
- data/docs/PolicyIn.md +14 -13
- data/docs/PolicyPagination.md +12 -11
- data/docs/Principal.md +20 -15
- data/docs/PrincipalApi.md +49 -23
- data/docs/PrincipalExternalSourceId.md +49 -0
- data/docs/PrincipalIn.md +8 -7
- data/docs/PrincipalMinimal.md +18 -0
- data/docs/PrincipalOut.md +22 -17
- data/docs/PrincipalPagination.md +12 -11
- data/docs/PrincipalPaginationAllOfDataInner.md +49 -0
- data/docs/ResourceDefinition.md +8 -7
- data/docs/ResourceDefinitionFilter.md +12 -11
- data/docs/ResourceDefinitionFilterValue.md +49 -0
- data/docs/ResourceDefinitionFilterValueOneOfInner.md +47 -0
- data/docs/Role.md +12 -9
- data/docs/RoleApi.md +279 -89
- data/docs/RoleIn.md +14 -11
- data/docs/RoleOut.md +34 -25
- data/docs/RoleOutDynamic.md +40 -29
- data/docs/RolePagination.md +12 -11
- data/docs/RolePaginationDynamic.md +12 -11
- data/docs/RolePatch.md +22 -0
- data/docs/RoleWithAccess.md +36 -27
- data/docs/Status.md +10 -17
- data/docs/StatusApi.md +27 -10
- data/docs/Timestamped.md +10 -9
- data/docs/UUID.md +8 -7
- data/git_push.sh +3 -4
- data/insights-rbac-api-client.gemspec +3 -4
- data/lib/insights-rbac-api-client/api/access_api.rb +21 -6
- data/lib/insights-rbac-api-client/api/cross_account_request_api.rb +423 -0
- data/lib/insights-rbac-api-client/api/group_api.rb +120 -55
- data/lib/insights-rbac-api-client/api/permission_api.rb +243 -0
- data/lib/insights-rbac-api-client/api/policy_api.rb +38 -23
- data/lib/insights-rbac-api-client/api/principal_api.rb +44 -12
- data/lib/insights-rbac-api-client/api/role_api.rb +154 -41
- data/lib/insights-rbac-api-client/api/status_api.rb +5 -4
- data/lib/insights-rbac-api-client/api_client.rb +57 -51
- data/lib/insights-rbac-api-client/api_error.rb +2 -1
- data/lib/insights-rbac-api-client/configuration.rb +62 -13
- data/lib/insights-rbac-api-client/models/access.rb +34 -22
- data/lib/insights-rbac-api-client/models/access_pagination.rb +32 -23
- data/lib/insights-rbac-api-client/models/{inline_response200.rb → add_role_to_group200_response.rb} +35 -25
- data/lib/insights-rbac-api-client/models/additional_group.rb +30 -22
- data/lib/insights-rbac-api-client/models/cross_account_request.rb +270 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_by_account.rb +304 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_by_user_id.rb +286 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_detail.rb +105 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_detail_by_account.rb +316 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_detail_by_use_id.rb +296 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_in.rb +280 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_out.rb +295 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_pagination.rb +248 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_pagination_all_of_data_inner.rb +105 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_patch.rb +277 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_update_in.rb +255 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_with_roles.rb +279 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_with_roles_roles_inner.rb +234 -0
- data/lib/insights-rbac-api-client/models/error.rb +33 -23
- data/lib/insights-rbac-api-client/models/error403.rb +33 -23
- data/lib/insights-rbac-api-client/models/{policy_extended_all_of.rb → error403_errors_inner.rb} +55 -50
- data/lib/insights-rbac-api-client/models/{group_with_principals_all_of.rb → error_errors_inner.rb} +49 -39
- data/lib/insights-rbac-api-client/models/{policy_in_all_of.rb → error_not_found.rb} +47 -50
- data/lib/insights-rbac-api-client/models/{principal_pagination_all_of.rb → error_not_found_errors_inner.rb} +61 -39
- data/lib/insights-rbac-api-client/models/group.rb +32 -22
- data/lib/insights-rbac-api-client/models/group_out.rb +65 -30
- data/lib/insights-rbac-api-client/models/group_pagination.rb +32 -23
- data/lib/insights-rbac-api-client/models/group_principal_in.rb +32 -22
- data/lib/insights-rbac-api-client/models/group_role_in.rb +32 -22
- data/lib/insights-rbac-api-client/models/group_roles_pagination.rb +32 -23
- data/lib/insights-rbac-api-client/models/group_with_principals.rb +42 -25
- data/lib/insights-rbac-api-client/models/group_with_principals_and_roles.rb +44 -25
- data/lib/insights-rbac-api-client/models/list_pagination.rb +30 -22
- data/lib/insights-rbac-api-client/models/pagination_links.rb +30 -22
- data/lib/insights-rbac-api-client/models/pagination_meta.rb +30 -22
- data/lib/insights-rbac-api-client/models/permission.rb +250 -0
- data/lib/insights-rbac-api-client/models/{policy_pagination_all_of.rb → permission_options_pagination.rb} +62 -27
- data/lib/insights-rbac-api-client/models/{group_pagination_all_of.rb → permission_pagination.rb} +62 -27
- data/lib/insights-rbac-api-client/models/policy.rb +32 -22
- data/lib/insights-rbac-api-client/models/policy_extended.rb +44 -25
- data/lib/insights-rbac-api-client/models/policy_in.rb +37 -24
- data/lib/insights-rbac-api-client/models/policy_pagination.rb +33 -24
- data/lib/insights-rbac-api-client/models/principal.rb +56 -26
- data/lib/insights-rbac-api-client/models/principal_external_source_id.rb +105 -0
- data/lib/insights-rbac-api-client/models/principal_in.rb +32 -22
- data/lib/insights-rbac-api-client/models/{access_pagination_all_of.rb → principal_minimal.rb} +45 -37
- data/lib/insights-rbac-api-client/models/principal_out.rb +55 -23
- data/lib/insights-rbac-api-client/models/principal_pagination.rb +34 -25
- data/lib/insights-rbac-api-client/models/principal_pagination_all_of_data_inner.rb +105 -0
- data/lib/insights-rbac-api-client/models/resource_definition.rb +32 -22
- data/lib/insights-rbac-api-client/models/resource_definition_filter.rb +37 -23
- data/lib/insights-rbac-api-client/models/resource_definition_filter_value.rb +105 -0
- data/lib/insights-rbac-api-client/models/resource_definition_filter_value_one_of_inner.rb +104 -0
- data/lib/insights-rbac-api-client/models/role.rb +42 -23
- data/lib/insights-rbac-api-client/models/role_in.rb +45 -25
- data/lib/insights-rbac-api-client/models/role_out.rb +92 -30
- data/lib/insights-rbac-api-client/models/role_out_dynamic.rb +109 -30
- data/lib/insights-rbac-api-client/models/role_pagination.rb +32 -23
- data/lib/insights-rbac-api-client/models/role_pagination_dynamic.rb +33 -24
- data/lib/insights-rbac-api-client/models/{group_with_principals_and_roles_all_of.rb → role_patch.rb} +55 -52
- data/lib/insights-rbac-api-client/models/role_with_access.rb +91 -28
- data/lib/insights-rbac-api-client/models/status.rb +36 -62
- data/lib/insights-rbac-api-client/models/timestamped.rb +36 -24
- data/lib/insights-rbac-api-client/models/uuid.rb +32 -22
- data/lib/insights-rbac-api-client/version.rb +2 -2
- data/lib/insights-rbac-api-client.rb +31 -13
- data/openapi.json +1741 -162
- data/spec/api/access_api_spec.rb +4 -2
- data/spec/api/cross_account_request_api_spec.rb +105 -0
- data/spec/api/group_api_spec.rb +26 -16
- data/spec/api/permission_api_spec.rb +75 -0
- data/spec/api/policy_api_spec.rb +7 -7
- data/spec/api/principal_api_spec.rb +10 -5
- data/spec/api/role_api_spec.rb +32 -13
- data/spec/api/status_api_spec.rb +2 -2
- data/spec/api_client_spec.rb +6 -4
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/access_pagination_spec.rb +9 -14
- data/spec/models/access_spec.rb +8 -13
- data/spec/models/add_role_to_group200_response_spec.rb +36 -0
- data/spec/models/additional_group_spec.rb +9 -14
- data/spec/models/cross_account_request_by_account_spec.rb +90 -0
- data/spec/models/cross_account_request_by_user_id_spec.rb +78 -0
- data/spec/models/cross_account_request_detail_by_account_spec.rb +96 -0
- data/spec/models/cross_account_request_detail_by_use_id_spec.rb +84 -0
- data/spec/models/cross_account_request_detail_spec.rb +32 -0
- data/spec/models/cross_account_request_in_spec.rb +60 -0
- data/spec/models/cross_account_request_out_spec.rb +84 -0
- data/spec/models/cross_account_request_pagination_all_of_data_inner_spec.rb +32 -0
- data/spec/models/cross_account_request_pagination_spec.rb +48 -0
- data/spec/models/cross_account_request_patch_spec.rb +58 -0
- data/spec/models/cross_account_request_spec.rb +72 -0
- data/spec/models/cross_account_request_update_in_spec.rb +48 -0
- data/spec/models/cross_account_request_with_roles_roles_inner_spec.rb +48 -0
- data/spec/models/cross_account_request_with_roles_spec.rb +78 -0
- data/spec/models/error403_errors_inner_spec.rb +48 -0
- data/spec/models/error403_spec.rb +7 -12
- data/spec/models/error_errors_inner_spec.rb +42 -0
- data/spec/models/error_not_found_errors_inner_spec.rb +48 -0
- data/spec/models/error_not_found_spec.rb +36 -0
- data/spec/models/error_spec.rb +7 -12
- data/spec/models/group_out_spec.rb +21 -20
- data/spec/models/group_pagination_spec.rb +9 -14
- data/spec/models/group_principal_in_spec.rb +7 -12
- data/spec/models/group_role_in_spec.rb +7 -12
- data/spec/models/group_roles_pagination_spec.rb +9 -14
- data/spec/models/group_spec.rb +8 -13
- data/spec/models/group_with_principals_and_roles_spec.rb +13 -18
- data/spec/models/group_with_principals_spec.rb +12 -17
- data/spec/models/list_pagination_spec.rb +8 -13
- data/spec/models/pagination_links_spec.rb +10 -15
- data/spec/models/pagination_meta_spec.rb +7 -12
- data/spec/models/permission_options_pagination_spec.rb +48 -0
- data/spec/models/permission_pagination_spec.rb +48 -0
- data/spec/models/permission_spec.rb +60 -0
- data/spec/models/policy_extended_spec.rb +13 -18
- data/spec/models/policy_in_spec.rb +10 -15
- data/spec/models/policy_pagination_spec.rb +9 -14
- data/spec/models/policy_spec.rb +8 -13
- data/spec/models/principal_external_source_id_spec.rb +32 -0
- data/spec/models/principal_in_spec.rb +7 -12
- data/spec/models/principal_minimal_spec.rb +36 -0
- data/spec/models/principal_out_spec.rb +24 -17
- data/spec/models/principal_pagination_all_of_data_inner_spec.rb +32 -0
- data/spec/models/principal_pagination_spec.rb +9 -14
- data/spec/models/principal_spec.rb +23 -16
- data/spec/models/resource_definition_filter_spec.rb +10 -15
- data/spec/models/resource_definition_filter_value_one_of_inner_spec.rb +32 -0
- data/spec/models/resource_definition_filter_value_spec.rb +32 -0
- data/spec/models/resource_definition_spec.rb +7 -12
- data/spec/models/role_in_spec.rb +15 -14
- data/spec/models/role_out_dynamic_spec.rb +48 -23
- data/spec/models/role_out_spec.rb +40 -21
- data/spec/models/role_pagination_dynamic_spec.rb +9 -14
- data/spec/models/role_pagination_spec.rb +9 -14
- data/spec/models/role_patch_spec.rb +48 -0
- data/spec/models/role_spec.rb +14 -13
- data/spec/models/role_with_access_spec.rb +41 -22
- data/spec/models/status_spec.rb +8 -37
- data/spec/models/timestamped_spec.rb +8 -13
- data/spec/models/uuid_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- metadata +161 -109
- data/docs/AccessPaginationAllOf.md +0 -17
- data/docs/GroupPaginationAllOf.md +0 -17
- data/docs/GroupWithPrincipalsAllOf.md +0 -17
- data/docs/GroupWithPrincipalsAndRolesAllOf.md +0 -19
- data/docs/InlineResponse200.md +0 -17
- data/docs/PolicyExtendedAllOf.md +0 -19
- data/docs/PolicyInAllOf.md +0 -19
- data/docs/PolicyPaginationAllOf.md +0 -17
- data/docs/PrincipalPaginationAllOf.md +0 -17
- data/docs/RoleInAllOf.md +0 -17
- data/docs/RoleOutDynamicAllOf.md +0 -29
- data/docs/RolePaginationDynamicAllOf.md +0 -17
- data/lib/insights-rbac-api-client/models/role_in_all_of.rb +0 -213
- data/lib/insights-rbac-api-client/models/role_out_dynamic_all_of.rb +0 -346
- data/lib/insights-rbac-api-client/models/role_pagination_dynamic_all_of.rb +0 -213
- data/spec/models/access_pagination_all_of_spec.rb +0 -41
- data/spec/models/group_pagination_all_of_spec.rb +0 -41
- data/spec/models/group_with_principals_all_of_spec.rb +0 -41
- data/spec/models/group_with_principals_and_roles_all_of_spec.rb +0 -47
- data/spec/models/inline_response200_spec.rb +0 -41
- data/spec/models/policy_extended_all_of_spec.rb +0 -47
- data/spec/models/policy_in_all_of_spec.rb +0 -47
- data/spec/models/policy_pagination_all_of_spec.rb +0 -41
- data/spec/models/principal_pagination_all_of_spec.rb +0 -41
- data/spec/models/role_in_all_of_spec.rb +0 -41
- data/spec/models/role_out_dynamic_all_of_spec.rb +0 -77
- data/spec/models/role_pagination_dynamic_all_of_spec.rb +0 -41
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module RBACApiClient
|
16
17
|
class GroupRolesPagination
|
@@ -29,6 +30,11 @@ module RBACApiClient
|
|
29
30
|
}
|
30
31
|
end
|
31
32
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
32
38
|
# Attribute type mapping.
|
33
39
|
def self.openapi_types
|
34
40
|
{
|
@@ -47,7 +53,6 @@ module RBACApiClient
|
|
47
53
|
# List of class defined in allOf (OpenAPI v3)
|
48
54
|
def self.openapi_all_of
|
49
55
|
[
|
50
|
-
:'InlineResponse200',
|
51
56
|
:'ListPagination'
|
52
57
|
]
|
53
58
|
end
|
@@ -79,12 +84,15 @@ module RBACApiClient
|
|
79
84
|
if (value = attributes[:'data']).is_a?(Array)
|
80
85
|
self.data = value
|
81
86
|
end
|
87
|
+
else
|
88
|
+
self.data = nil
|
82
89
|
end
|
83
90
|
end
|
84
91
|
|
85
92
|
# Show invalid properties with the reasons. Usually used together with valid?
|
86
93
|
# @return Array for valid properties with the reasons
|
87
94
|
def list_invalid_properties
|
95
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
88
96
|
invalid_properties = Array.new
|
89
97
|
if @data.nil?
|
90
98
|
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
@@ -96,6 +104,7 @@ module RBACApiClient
|
|
96
104
|
# Check to see if the all the properties in the model are valid
|
97
105
|
# @return true if the model is valid
|
98
106
|
def valid?
|
107
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
99
108
|
return false if @data.nil?
|
100
109
|
true
|
101
110
|
end
|
@@ -126,37 +135,33 @@ module RBACApiClient
|
|
126
135
|
# @param [Hash] attributes Model attributes in the form of hash
|
127
136
|
# @return [Object] Returns the model itself
|
128
137
|
def self.build_from_hash(attributes)
|
129
|
-
new.build_from_hash(attributes)
|
130
|
-
end
|
131
|
-
|
132
|
-
# Builds the object from hash
|
133
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
-
# @return [Object] Returns the model itself
|
135
|
-
def build_from_hash(attributes)
|
136
138
|
return nil unless attributes.is_a?(Hash)
|
137
|
-
|
138
|
-
|
139
|
+
attributes = attributes.transform_keys(&:to_sym)
|
140
|
+
transformed_hash = {}
|
141
|
+
openapi_types.each_pair do |key, type|
|
142
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
143
|
+
transformed_hash["#{key}"] = nil
|
144
|
+
elsif type =~ /\AArray<(.*)>/i
|
139
145
|
# check to ensure the input is an array given that the attribute
|
140
146
|
# is documented as an array but the input is not
|
141
|
-
if attributes[
|
142
|
-
|
147
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
148
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
143
149
|
end
|
144
|
-
elsif !attributes[
|
145
|
-
|
146
|
-
end
|
150
|
+
elsif !attributes[attribute_map[key]].nil?
|
151
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
152
|
+
end
|
147
153
|
end
|
148
|
-
|
149
|
-
self
|
154
|
+
new(transformed_hash)
|
150
155
|
end
|
151
156
|
|
152
157
|
# Deserializes the data based on type
|
153
158
|
# @param string type Data type
|
154
159
|
# @param string value Value to be deserialized
|
155
160
|
# @return [Object] Deserialized data
|
156
|
-
def _deserialize(type, value)
|
161
|
+
def self._deserialize(type, value)
|
157
162
|
case type.to_sym
|
158
|
-
when :
|
159
|
-
|
163
|
+
when :Time
|
164
|
+
Time.parse(value)
|
160
165
|
when :Date
|
161
166
|
Date.parse(value)
|
162
167
|
when :String
|
@@ -186,7 +191,9 @@ module RBACApiClient
|
|
186
191
|
end
|
187
192
|
end
|
188
193
|
else # model
|
189
|
-
|
194
|
+
# models (e.g. Pet) or oneOf
|
195
|
+
klass = RBACApiClient.const_get(type)
|
196
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
190
197
|
end
|
191
198
|
end
|
192
199
|
|
@@ -212,7 +219,7 @@ module RBACApiClient
|
|
212
219
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
213
220
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
214
221
|
end
|
215
|
-
|
222
|
+
|
216
223
|
hash[param] = _to_hash(value)
|
217
224
|
end
|
218
225
|
hash
|
@@ -235,5 +242,7 @@ module RBACApiClient
|
|
235
242
|
value
|
236
243
|
end
|
237
244
|
end
|
245
|
+
|
238
246
|
end
|
247
|
+
|
239
248
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module RBACApiClient
|
16
17
|
class GroupWithPrincipals
|
@@ -38,14 +39,19 @@ module RBACApiClient
|
|
38
39
|
}
|
39
40
|
end
|
40
41
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
43
|
+
def self.acceptable_attributes
|
44
|
+
attribute_map.values
|
45
|
+
end
|
46
|
+
|
41
47
|
# Attribute type mapping.
|
42
48
|
def self.openapi_types
|
43
49
|
{
|
44
50
|
:'name' => :'String',
|
45
51
|
:'description' => :'String',
|
46
52
|
:'uuid' => :'String',
|
47
|
-
:'created' => :'
|
48
|
-
:'modified' => :'
|
53
|
+
:'created' => :'Time',
|
54
|
+
:'modified' => :'Time',
|
49
55
|
:'principals' => :'Array<Principal>'
|
50
56
|
}
|
51
57
|
end
|
@@ -60,7 +66,6 @@ module RBACApiClient
|
|
60
66
|
def self.openapi_all_of
|
61
67
|
[
|
62
68
|
:'Group',
|
63
|
-
:'GroupWithPrincipalsAllOf',
|
64
69
|
:'Timestamped',
|
65
70
|
:'UUID'
|
66
71
|
]
|
@@ -83,6 +88,8 @@ module RBACApiClient
|
|
83
88
|
|
84
89
|
if attributes.key?(:'name')
|
85
90
|
self.name = attributes[:'name']
|
91
|
+
else
|
92
|
+
self.name = nil
|
86
93
|
end
|
87
94
|
|
88
95
|
if attributes.key?(:'description')
|
@@ -91,26 +98,35 @@ module RBACApiClient
|
|
91
98
|
|
92
99
|
if attributes.key?(:'uuid')
|
93
100
|
self.uuid = attributes[:'uuid']
|
101
|
+
else
|
102
|
+
self.uuid = nil
|
94
103
|
end
|
95
104
|
|
96
105
|
if attributes.key?(:'created')
|
97
106
|
self.created = attributes[:'created']
|
107
|
+
else
|
108
|
+
self.created = nil
|
98
109
|
end
|
99
110
|
|
100
111
|
if attributes.key?(:'modified')
|
101
112
|
self.modified = attributes[:'modified']
|
113
|
+
else
|
114
|
+
self.modified = nil
|
102
115
|
end
|
103
116
|
|
104
117
|
if attributes.key?(:'principals')
|
105
118
|
if (value = attributes[:'principals']).is_a?(Array)
|
106
119
|
self.principals = value
|
107
120
|
end
|
121
|
+
else
|
122
|
+
self.principals = nil
|
108
123
|
end
|
109
124
|
end
|
110
125
|
|
111
126
|
# Show invalid properties with the reasons. Usually used together with valid?
|
112
127
|
# @return Array for valid properties with the reasons
|
113
128
|
def list_invalid_properties
|
129
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
114
130
|
invalid_properties = Array.new
|
115
131
|
if @name.nil?
|
116
132
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -138,6 +154,7 @@ module RBACApiClient
|
|
138
154
|
# Check to see if the all the properties in the model are valid
|
139
155
|
# @return true if the model is valid
|
140
156
|
def valid?
|
157
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
141
158
|
return false if @name.nil?
|
142
159
|
return false if @uuid.nil?
|
143
160
|
return false if @created.nil?
|
@@ -175,37 +192,33 @@ module RBACApiClient
|
|
175
192
|
# @param [Hash] attributes Model attributes in the form of hash
|
176
193
|
# @return [Object] Returns the model itself
|
177
194
|
def self.build_from_hash(attributes)
|
178
|
-
new.build_from_hash(attributes)
|
179
|
-
end
|
180
|
-
|
181
|
-
# Builds the object from hash
|
182
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
183
|
-
# @return [Object] Returns the model itself
|
184
|
-
def build_from_hash(attributes)
|
185
195
|
return nil unless attributes.is_a?(Hash)
|
186
|
-
|
187
|
-
|
196
|
+
attributes = attributes.transform_keys(&:to_sym)
|
197
|
+
transformed_hash = {}
|
198
|
+
openapi_types.each_pair do |key, type|
|
199
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
200
|
+
transformed_hash["#{key}"] = nil
|
201
|
+
elsif type =~ /\AArray<(.*)>/i
|
188
202
|
# check to ensure the input is an array given that the attribute
|
189
203
|
# is documented as an array but the input is not
|
190
|
-
if attributes[
|
191
|
-
|
204
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
205
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
192
206
|
end
|
193
|
-
elsif !attributes[
|
194
|
-
|
195
|
-
end
|
207
|
+
elsif !attributes[attribute_map[key]].nil?
|
208
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
209
|
+
end
|
196
210
|
end
|
197
|
-
|
198
|
-
self
|
211
|
+
new(transformed_hash)
|
199
212
|
end
|
200
213
|
|
201
214
|
# Deserializes the data based on type
|
202
215
|
# @param string type Data type
|
203
216
|
# @param string value Value to be deserialized
|
204
217
|
# @return [Object] Deserialized data
|
205
|
-
def _deserialize(type, value)
|
218
|
+
def self._deserialize(type, value)
|
206
219
|
case type.to_sym
|
207
|
-
when :
|
208
|
-
|
220
|
+
when :Time
|
221
|
+
Time.parse(value)
|
209
222
|
when :Date
|
210
223
|
Date.parse(value)
|
211
224
|
when :String
|
@@ -235,7 +248,9 @@ module RBACApiClient
|
|
235
248
|
end
|
236
249
|
end
|
237
250
|
else # model
|
238
|
-
|
251
|
+
# models (e.g. Pet) or oneOf
|
252
|
+
klass = RBACApiClient.const_get(type)
|
253
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
239
254
|
end
|
240
255
|
end
|
241
256
|
|
@@ -261,7 +276,7 @@ module RBACApiClient
|
|
261
276
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
262
277
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
263
278
|
end
|
264
|
-
|
279
|
+
|
265
280
|
hash[param] = _to_hash(value)
|
266
281
|
end
|
267
282
|
hash
|
@@ -284,5 +299,7 @@ module RBACApiClient
|
|
284
299
|
value
|
285
300
|
end
|
286
301
|
end
|
302
|
+
|
287
303
|
end
|
304
|
+
|
288
305
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module RBACApiClient
|
16
17
|
class GroupWithPrincipalsAndRoles
|
@@ -41,14 +42,19 @@ module RBACApiClient
|
|
41
42
|
}
|
42
43
|
end
|
43
44
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
46
|
+
def self.acceptable_attributes
|
47
|
+
attribute_map.values
|
48
|
+
end
|
49
|
+
|
44
50
|
# Attribute type mapping.
|
45
51
|
def self.openapi_types
|
46
52
|
{
|
47
53
|
:'name' => :'String',
|
48
54
|
:'description' => :'String',
|
49
55
|
:'uuid' => :'String',
|
50
|
-
:'created' => :'
|
51
|
-
:'modified' => :'
|
56
|
+
:'created' => :'Time',
|
57
|
+
:'modified' => :'Time',
|
52
58
|
:'principals' => :'Array<Principal>',
|
53
59
|
:'roles' => :'Array<RoleOut>'
|
54
60
|
}
|
@@ -64,7 +70,6 @@ module RBACApiClient
|
|
64
70
|
def self.openapi_all_of
|
65
71
|
[
|
66
72
|
:'Group',
|
67
|
-
:'GroupWithPrincipalsAndRolesAllOf',
|
68
73
|
:'Timestamped',
|
69
74
|
:'UUID'
|
70
75
|
]
|
@@ -87,6 +92,8 @@ module RBACApiClient
|
|
87
92
|
|
88
93
|
if attributes.key?(:'name')
|
89
94
|
self.name = attributes[:'name']
|
95
|
+
else
|
96
|
+
self.name = nil
|
90
97
|
end
|
91
98
|
|
92
99
|
if attributes.key?(:'description')
|
@@ -95,32 +102,43 @@ module RBACApiClient
|
|
95
102
|
|
96
103
|
if attributes.key?(:'uuid')
|
97
104
|
self.uuid = attributes[:'uuid']
|
105
|
+
else
|
106
|
+
self.uuid = nil
|
98
107
|
end
|
99
108
|
|
100
109
|
if attributes.key?(:'created')
|
101
110
|
self.created = attributes[:'created']
|
111
|
+
else
|
112
|
+
self.created = nil
|
102
113
|
end
|
103
114
|
|
104
115
|
if attributes.key?(:'modified')
|
105
116
|
self.modified = attributes[:'modified']
|
117
|
+
else
|
118
|
+
self.modified = nil
|
106
119
|
end
|
107
120
|
|
108
121
|
if attributes.key?(:'principals')
|
109
122
|
if (value = attributes[:'principals']).is_a?(Array)
|
110
123
|
self.principals = value
|
111
124
|
end
|
125
|
+
else
|
126
|
+
self.principals = nil
|
112
127
|
end
|
113
128
|
|
114
129
|
if attributes.key?(:'roles')
|
115
130
|
if (value = attributes[:'roles']).is_a?(Array)
|
116
131
|
self.roles = value
|
117
132
|
end
|
133
|
+
else
|
134
|
+
self.roles = nil
|
118
135
|
end
|
119
136
|
end
|
120
137
|
|
121
138
|
# Show invalid properties with the reasons. Usually used together with valid?
|
122
139
|
# @return Array for valid properties with the reasons
|
123
140
|
def list_invalid_properties
|
141
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
124
142
|
invalid_properties = Array.new
|
125
143
|
if @name.nil?
|
126
144
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -152,6 +170,7 @@ module RBACApiClient
|
|
152
170
|
# Check to see if the all the properties in the model are valid
|
153
171
|
# @return true if the model is valid
|
154
172
|
def valid?
|
173
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
155
174
|
return false if @name.nil?
|
156
175
|
return false if @uuid.nil?
|
157
176
|
return false if @created.nil?
|
@@ -191,37 +210,33 @@ module RBACApiClient
|
|
191
210
|
# @param [Hash] attributes Model attributes in the form of hash
|
192
211
|
# @return [Object] Returns the model itself
|
193
212
|
def self.build_from_hash(attributes)
|
194
|
-
new.build_from_hash(attributes)
|
195
|
-
end
|
196
|
-
|
197
|
-
# Builds the object from hash
|
198
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
199
|
-
# @return [Object] Returns the model itself
|
200
|
-
def build_from_hash(attributes)
|
201
213
|
return nil unless attributes.is_a?(Hash)
|
202
|
-
|
203
|
-
|
214
|
+
attributes = attributes.transform_keys(&:to_sym)
|
215
|
+
transformed_hash = {}
|
216
|
+
openapi_types.each_pair do |key, type|
|
217
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
218
|
+
transformed_hash["#{key}"] = nil
|
219
|
+
elsif type =~ /\AArray<(.*)>/i
|
204
220
|
# check to ensure the input is an array given that the attribute
|
205
221
|
# is documented as an array but the input is not
|
206
|
-
if attributes[
|
207
|
-
|
222
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
223
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
208
224
|
end
|
209
|
-
elsif !attributes[
|
210
|
-
|
211
|
-
end
|
225
|
+
elsif !attributes[attribute_map[key]].nil?
|
226
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
227
|
+
end
|
212
228
|
end
|
213
|
-
|
214
|
-
self
|
229
|
+
new(transformed_hash)
|
215
230
|
end
|
216
231
|
|
217
232
|
# Deserializes the data based on type
|
218
233
|
# @param string type Data type
|
219
234
|
# @param string value Value to be deserialized
|
220
235
|
# @return [Object] Deserialized data
|
221
|
-
def _deserialize(type, value)
|
236
|
+
def self._deserialize(type, value)
|
222
237
|
case type.to_sym
|
223
|
-
when :
|
224
|
-
|
238
|
+
when :Time
|
239
|
+
Time.parse(value)
|
225
240
|
when :Date
|
226
241
|
Date.parse(value)
|
227
242
|
when :String
|
@@ -251,7 +266,9 @@ module RBACApiClient
|
|
251
266
|
end
|
252
267
|
end
|
253
268
|
else # model
|
254
|
-
|
269
|
+
# models (e.g. Pet) or oneOf
|
270
|
+
klass = RBACApiClient.const_get(type)
|
271
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
255
272
|
end
|
256
273
|
end
|
257
274
|
|
@@ -277,7 +294,7 @@ module RBACApiClient
|
|
277
294
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
278
295
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
279
296
|
end
|
280
|
-
|
297
|
+
|
281
298
|
hash[param] = _to_hash(value)
|
282
299
|
end
|
283
300
|
hash
|
@@ -300,5 +317,7 @@ module RBACApiClient
|
|
300
317
|
value
|
301
318
|
end
|
302
319
|
end
|
320
|
+
|
303
321
|
end
|
322
|
+
|
304
323
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module RBACApiClient
|
16
17
|
class ListPagination
|
@@ -26,6 +27,11 @@ module RBACApiClient
|
|
26
27
|
}
|
27
28
|
end
|
28
29
|
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
29
35
|
# Attribute type mapping.
|
30
36
|
def self.openapi_types
|
31
37
|
{
|
@@ -67,6 +73,7 @@ module RBACApiClient
|
|
67
73
|
# Show invalid properties with the reasons. Usually used together with valid?
|
68
74
|
# @return Array for valid properties with the reasons
|
69
75
|
def list_invalid_properties
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
70
77
|
invalid_properties = Array.new
|
71
78
|
invalid_properties
|
72
79
|
end
|
@@ -74,6 +81,7 @@ module RBACApiClient
|
|
74
81
|
# Check to see if the all the properties in the model are valid
|
75
82
|
# @return true if the model is valid
|
76
83
|
def valid?
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
77
85
|
true
|
78
86
|
end
|
79
87
|
|
@@ -102,37 +110,33 @@ module RBACApiClient
|
|
102
110
|
# @param [Hash] attributes Model attributes in the form of hash
|
103
111
|
# @return [Object] Returns the model itself
|
104
112
|
def self.build_from_hash(attributes)
|
105
|
-
new.build_from_hash(attributes)
|
106
|
-
end
|
107
|
-
|
108
|
-
# Builds the object from hash
|
109
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
-
# @return [Object] Returns the model itself
|
111
|
-
def build_from_hash(attributes)
|
112
113
|
return nil unless attributes.is_a?(Hash)
|
113
|
-
|
114
|
-
|
114
|
+
attributes = attributes.transform_keys(&:to_sym)
|
115
|
+
transformed_hash = {}
|
116
|
+
openapi_types.each_pair do |key, type|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = nil
|
119
|
+
elsif type =~ /\AArray<(.*)>/i
|
115
120
|
# check to ensure the input is an array given that the attribute
|
116
121
|
# is documented as an array but the input is not
|
117
|
-
if attributes[
|
118
|
-
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
119
124
|
end
|
120
|
-
elsif !attributes[
|
121
|
-
|
122
|
-
end
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
127
|
+
end
|
123
128
|
end
|
124
|
-
|
125
|
-
self
|
129
|
+
new(transformed_hash)
|
126
130
|
end
|
127
131
|
|
128
132
|
# Deserializes the data based on type
|
129
133
|
# @param string type Data type
|
130
134
|
# @param string value Value to be deserialized
|
131
135
|
# @return [Object] Deserialized data
|
132
|
-
def _deserialize(type, value)
|
136
|
+
def self._deserialize(type, value)
|
133
137
|
case type.to_sym
|
134
|
-
when :
|
135
|
-
|
138
|
+
when :Time
|
139
|
+
Time.parse(value)
|
136
140
|
when :Date
|
137
141
|
Date.parse(value)
|
138
142
|
when :String
|
@@ -162,7 +166,9 @@ module RBACApiClient
|
|
162
166
|
end
|
163
167
|
end
|
164
168
|
else # model
|
165
|
-
|
169
|
+
# models (e.g. Pet) or oneOf
|
170
|
+
klass = RBACApiClient.const_get(type)
|
171
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
166
172
|
end
|
167
173
|
end
|
168
174
|
|
@@ -188,7 +194,7 @@ module RBACApiClient
|
|
188
194
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
189
195
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
190
196
|
end
|
191
|
-
|
197
|
+
|
192
198
|
hash[param] = _to_hash(value)
|
193
199
|
end
|
194
200
|
hash
|
@@ -211,5 +217,7 @@ module RBACApiClient
|
|
211
217
|
value
|
212
218
|
end
|
213
219
|
end
|
220
|
+
|
214
221
|
end
|
222
|
+
|
215
223
|
end
|