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.
Files changed (259) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +49 -22
  4. data/client-meta.json +1 -1
  5. data/docs/Access.md +10 -9
  6. data/docs/AccessApi.md +39 -19
  7. data/docs/AccessPagination.md +12 -11
  8. data/docs/AddRoleToGroup200Response.md +18 -0
  9. data/docs/AdditionalGroup.md +12 -11
  10. data/docs/CrossAccountRequest.md +30 -0
  11. data/docs/CrossAccountRequestApi.md +386 -0
  12. data/docs/CrossAccountRequestByAccount.md +36 -0
  13. data/docs/CrossAccountRequestByUserId.md +32 -0
  14. data/docs/CrossAccountRequestDetail.md +49 -0
  15. data/docs/CrossAccountRequestDetailByAccount.md +38 -0
  16. data/docs/CrossAccountRequestDetailByUseId.md +34 -0
  17. data/docs/CrossAccountRequestIn.md +26 -0
  18. data/docs/CrossAccountRequestOut.md +34 -0
  19. data/docs/CrossAccountRequestPagination.md +22 -0
  20. data/docs/CrossAccountRequestPaginationAllOfDataInner.md +49 -0
  21. data/docs/CrossAccountRequestPatch.md +24 -0
  22. data/docs/CrossAccountRequestUpdateIn.md +22 -0
  23. data/docs/CrossAccountRequestWithRoles.md +32 -0
  24. data/docs/CrossAccountRequestWithRolesRolesInner.md +22 -0
  25. data/docs/Error.md +8 -7
  26. data/docs/Error403.md +8 -7
  27. data/docs/Error403ErrorsInner.md +22 -0
  28. data/docs/ErrorErrorsInner.md +20 -0
  29. data/docs/ErrorNotFound.md +18 -0
  30. data/docs/ErrorNotFoundErrorsInner.md +22 -0
  31. data/docs/Group.md +10 -9
  32. data/docs/GroupApi.md +369 -163
  33. data/docs/GroupOut.md +26 -23
  34. data/docs/GroupPagination.md +12 -11
  35. data/docs/GroupPrincipalIn.md +8 -7
  36. data/docs/GroupRoleIn.md +8 -7
  37. data/docs/GroupRolesPagination.md +12 -11
  38. data/docs/GroupWithPrincipals.md +18 -17
  39. data/docs/GroupWithPrincipalsAndRoles.md +20 -19
  40. data/docs/ListPagination.md +10 -9
  41. data/docs/PaginationLinks.md +14 -13
  42. data/docs/PaginationMeta.md +8 -7
  43. data/docs/Permission.md +26 -0
  44. data/docs/PermissionApi.md +185 -0
  45. data/docs/PermissionOptionsPagination.md +22 -0
  46. data/docs/PermissionPagination.md +22 -0
  47. data/docs/Policy.md +10 -9
  48. data/docs/PolicyApi.md +153 -69
  49. data/docs/PolicyExtended.md +20 -19
  50. data/docs/PolicyIn.md +14 -13
  51. data/docs/PolicyPagination.md +12 -11
  52. data/docs/Principal.md +20 -15
  53. data/docs/PrincipalApi.md +49 -23
  54. data/docs/PrincipalExternalSourceId.md +49 -0
  55. data/docs/PrincipalIn.md +8 -7
  56. data/docs/PrincipalMinimal.md +18 -0
  57. data/docs/PrincipalOut.md +22 -17
  58. data/docs/PrincipalPagination.md +12 -11
  59. data/docs/PrincipalPaginationAllOfDataInner.md +49 -0
  60. data/docs/ResourceDefinition.md +8 -7
  61. data/docs/ResourceDefinitionFilter.md +12 -11
  62. data/docs/ResourceDefinitionFilterValue.md +49 -0
  63. data/docs/ResourceDefinitionFilterValueOneOfInner.md +47 -0
  64. data/docs/Role.md +12 -9
  65. data/docs/RoleApi.md +279 -89
  66. data/docs/RoleIn.md +14 -11
  67. data/docs/RoleOut.md +34 -25
  68. data/docs/RoleOutDynamic.md +40 -29
  69. data/docs/RolePagination.md +12 -11
  70. data/docs/RolePaginationDynamic.md +12 -11
  71. data/docs/RolePatch.md +22 -0
  72. data/docs/RoleWithAccess.md +36 -27
  73. data/docs/Status.md +10 -17
  74. data/docs/StatusApi.md +27 -10
  75. data/docs/Timestamped.md +10 -9
  76. data/docs/UUID.md +8 -7
  77. data/git_push.sh +3 -4
  78. data/insights-rbac-api-client.gemspec +3 -4
  79. data/lib/insights-rbac-api-client/api/access_api.rb +21 -6
  80. data/lib/insights-rbac-api-client/api/cross_account_request_api.rb +423 -0
  81. data/lib/insights-rbac-api-client/api/group_api.rb +120 -55
  82. data/lib/insights-rbac-api-client/api/permission_api.rb +243 -0
  83. data/lib/insights-rbac-api-client/api/policy_api.rb +38 -23
  84. data/lib/insights-rbac-api-client/api/principal_api.rb +44 -12
  85. data/lib/insights-rbac-api-client/api/role_api.rb +154 -41
  86. data/lib/insights-rbac-api-client/api/status_api.rb +5 -4
  87. data/lib/insights-rbac-api-client/api_client.rb +57 -51
  88. data/lib/insights-rbac-api-client/api_error.rb +2 -1
  89. data/lib/insights-rbac-api-client/configuration.rb +62 -13
  90. data/lib/insights-rbac-api-client/models/access.rb +34 -22
  91. data/lib/insights-rbac-api-client/models/access_pagination.rb +32 -23
  92. data/lib/insights-rbac-api-client/models/{inline_response200.rb → add_role_to_group200_response.rb} +35 -25
  93. data/lib/insights-rbac-api-client/models/additional_group.rb +30 -22
  94. data/lib/insights-rbac-api-client/models/cross_account_request.rb +270 -0
  95. data/lib/insights-rbac-api-client/models/cross_account_request_by_account.rb +304 -0
  96. data/lib/insights-rbac-api-client/models/cross_account_request_by_user_id.rb +286 -0
  97. data/lib/insights-rbac-api-client/models/cross_account_request_detail.rb +105 -0
  98. data/lib/insights-rbac-api-client/models/cross_account_request_detail_by_account.rb +316 -0
  99. data/lib/insights-rbac-api-client/models/cross_account_request_detail_by_use_id.rb +296 -0
  100. data/lib/insights-rbac-api-client/models/cross_account_request_in.rb +280 -0
  101. data/lib/insights-rbac-api-client/models/cross_account_request_out.rb +295 -0
  102. data/lib/insights-rbac-api-client/models/cross_account_request_pagination.rb +248 -0
  103. data/lib/insights-rbac-api-client/models/cross_account_request_pagination_all_of_data_inner.rb +105 -0
  104. data/lib/insights-rbac-api-client/models/cross_account_request_patch.rb +277 -0
  105. data/lib/insights-rbac-api-client/models/cross_account_request_update_in.rb +255 -0
  106. data/lib/insights-rbac-api-client/models/cross_account_request_with_roles.rb +279 -0
  107. data/lib/insights-rbac-api-client/models/cross_account_request_with_roles_roles_inner.rb +234 -0
  108. data/lib/insights-rbac-api-client/models/error.rb +33 -23
  109. data/lib/insights-rbac-api-client/models/error403.rb +33 -23
  110. data/lib/insights-rbac-api-client/models/{policy_extended_all_of.rb → error403_errors_inner.rb} +55 -50
  111. data/lib/insights-rbac-api-client/models/{group_with_principals_all_of.rb → error_errors_inner.rb} +49 -39
  112. data/lib/insights-rbac-api-client/models/{policy_in_all_of.rb → error_not_found.rb} +47 -50
  113. data/lib/insights-rbac-api-client/models/{principal_pagination_all_of.rb → error_not_found_errors_inner.rb} +61 -39
  114. data/lib/insights-rbac-api-client/models/group.rb +32 -22
  115. data/lib/insights-rbac-api-client/models/group_out.rb +65 -30
  116. data/lib/insights-rbac-api-client/models/group_pagination.rb +32 -23
  117. data/lib/insights-rbac-api-client/models/group_principal_in.rb +32 -22
  118. data/lib/insights-rbac-api-client/models/group_role_in.rb +32 -22
  119. data/lib/insights-rbac-api-client/models/group_roles_pagination.rb +32 -23
  120. data/lib/insights-rbac-api-client/models/group_with_principals.rb +42 -25
  121. data/lib/insights-rbac-api-client/models/group_with_principals_and_roles.rb +44 -25
  122. data/lib/insights-rbac-api-client/models/list_pagination.rb +30 -22
  123. data/lib/insights-rbac-api-client/models/pagination_links.rb +30 -22
  124. data/lib/insights-rbac-api-client/models/pagination_meta.rb +30 -22
  125. data/lib/insights-rbac-api-client/models/permission.rb +250 -0
  126. data/lib/insights-rbac-api-client/models/{policy_pagination_all_of.rb → permission_options_pagination.rb} +62 -27
  127. data/lib/insights-rbac-api-client/models/{group_pagination_all_of.rb → permission_pagination.rb} +62 -27
  128. data/lib/insights-rbac-api-client/models/policy.rb +32 -22
  129. data/lib/insights-rbac-api-client/models/policy_extended.rb +44 -25
  130. data/lib/insights-rbac-api-client/models/policy_in.rb +37 -24
  131. data/lib/insights-rbac-api-client/models/policy_pagination.rb +33 -24
  132. data/lib/insights-rbac-api-client/models/principal.rb +56 -26
  133. data/lib/insights-rbac-api-client/models/principal_external_source_id.rb +105 -0
  134. data/lib/insights-rbac-api-client/models/principal_in.rb +32 -22
  135. data/lib/insights-rbac-api-client/models/{access_pagination_all_of.rb → principal_minimal.rb} +45 -37
  136. data/lib/insights-rbac-api-client/models/principal_out.rb +55 -23
  137. data/lib/insights-rbac-api-client/models/principal_pagination.rb +34 -25
  138. data/lib/insights-rbac-api-client/models/principal_pagination_all_of_data_inner.rb +105 -0
  139. data/lib/insights-rbac-api-client/models/resource_definition.rb +32 -22
  140. data/lib/insights-rbac-api-client/models/resource_definition_filter.rb +37 -23
  141. data/lib/insights-rbac-api-client/models/resource_definition_filter_value.rb +105 -0
  142. data/lib/insights-rbac-api-client/models/resource_definition_filter_value_one_of_inner.rb +104 -0
  143. data/lib/insights-rbac-api-client/models/role.rb +42 -23
  144. data/lib/insights-rbac-api-client/models/role_in.rb +45 -25
  145. data/lib/insights-rbac-api-client/models/role_out.rb +92 -30
  146. data/lib/insights-rbac-api-client/models/role_out_dynamic.rb +109 -30
  147. data/lib/insights-rbac-api-client/models/role_pagination.rb +32 -23
  148. data/lib/insights-rbac-api-client/models/role_pagination_dynamic.rb +33 -24
  149. data/lib/insights-rbac-api-client/models/{group_with_principals_and_roles_all_of.rb → role_patch.rb} +55 -52
  150. data/lib/insights-rbac-api-client/models/role_with_access.rb +91 -28
  151. data/lib/insights-rbac-api-client/models/status.rb +36 -62
  152. data/lib/insights-rbac-api-client/models/timestamped.rb +36 -24
  153. data/lib/insights-rbac-api-client/models/uuid.rb +32 -22
  154. data/lib/insights-rbac-api-client/version.rb +2 -2
  155. data/lib/insights-rbac-api-client.rb +31 -13
  156. data/openapi.json +1741 -162
  157. data/spec/api/access_api_spec.rb +4 -2
  158. data/spec/api/cross_account_request_api_spec.rb +105 -0
  159. data/spec/api/group_api_spec.rb +26 -16
  160. data/spec/api/permission_api_spec.rb +75 -0
  161. data/spec/api/policy_api_spec.rb +7 -7
  162. data/spec/api/principal_api_spec.rb +10 -5
  163. data/spec/api/role_api_spec.rb +32 -13
  164. data/spec/api/status_api_spec.rb +2 -2
  165. data/spec/api_client_spec.rb +6 -4
  166. data/spec/configuration_spec.rb +4 -4
  167. data/spec/models/access_pagination_spec.rb +9 -14
  168. data/spec/models/access_spec.rb +8 -13
  169. data/spec/models/add_role_to_group200_response_spec.rb +36 -0
  170. data/spec/models/additional_group_spec.rb +9 -14
  171. data/spec/models/cross_account_request_by_account_spec.rb +90 -0
  172. data/spec/models/cross_account_request_by_user_id_spec.rb +78 -0
  173. data/spec/models/cross_account_request_detail_by_account_spec.rb +96 -0
  174. data/spec/models/cross_account_request_detail_by_use_id_spec.rb +84 -0
  175. data/spec/models/cross_account_request_detail_spec.rb +32 -0
  176. data/spec/models/cross_account_request_in_spec.rb +60 -0
  177. data/spec/models/cross_account_request_out_spec.rb +84 -0
  178. data/spec/models/cross_account_request_pagination_all_of_data_inner_spec.rb +32 -0
  179. data/spec/models/cross_account_request_pagination_spec.rb +48 -0
  180. data/spec/models/cross_account_request_patch_spec.rb +58 -0
  181. data/spec/models/cross_account_request_spec.rb +72 -0
  182. data/spec/models/cross_account_request_update_in_spec.rb +48 -0
  183. data/spec/models/cross_account_request_with_roles_roles_inner_spec.rb +48 -0
  184. data/spec/models/cross_account_request_with_roles_spec.rb +78 -0
  185. data/spec/models/error403_errors_inner_spec.rb +48 -0
  186. data/spec/models/error403_spec.rb +7 -12
  187. data/spec/models/error_errors_inner_spec.rb +42 -0
  188. data/spec/models/error_not_found_errors_inner_spec.rb +48 -0
  189. data/spec/models/error_not_found_spec.rb +36 -0
  190. data/spec/models/error_spec.rb +7 -12
  191. data/spec/models/group_out_spec.rb +21 -20
  192. data/spec/models/group_pagination_spec.rb +9 -14
  193. data/spec/models/group_principal_in_spec.rb +7 -12
  194. data/spec/models/group_role_in_spec.rb +7 -12
  195. data/spec/models/group_roles_pagination_spec.rb +9 -14
  196. data/spec/models/group_spec.rb +8 -13
  197. data/spec/models/group_with_principals_and_roles_spec.rb +13 -18
  198. data/spec/models/group_with_principals_spec.rb +12 -17
  199. data/spec/models/list_pagination_spec.rb +8 -13
  200. data/spec/models/pagination_links_spec.rb +10 -15
  201. data/spec/models/pagination_meta_spec.rb +7 -12
  202. data/spec/models/permission_options_pagination_spec.rb +48 -0
  203. data/spec/models/permission_pagination_spec.rb +48 -0
  204. data/spec/models/permission_spec.rb +60 -0
  205. data/spec/models/policy_extended_spec.rb +13 -18
  206. data/spec/models/policy_in_spec.rb +10 -15
  207. data/spec/models/policy_pagination_spec.rb +9 -14
  208. data/spec/models/policy_spec.rb +8 -13
  209. data/spec/models/principal_external_source_id_spec.rb +32 -0
  210. data/spec/models/principal_in_spec.rb +7 -12
  211. data/spec/models/principal_minimal_spec.rb +36 -0
  212. data/spec/models/principal_out_spec.rb +24 -17
  213. data/spec/models/principal_pagination_all_of_data_inner_spec.rb +32 -0
  214. data/spec/models/principal_pagination_spec.rb +9 -14
  215. data/spec/models/principal_spec.rb +23 -16
  216. data/spec/models/resource_definition_filter_spec.rb +10 -15
  217. data/spec/models/resource_definition_filter_value_one_of_inner_spec.rb +32 -0
  218. data/spec/models/resource_definition_filter_value_spec.rb +32 -0
  219. data/spec/models/resource_definition_spec.rb +7 -12
  220. data/spec/models/role_in_spec.rb +15 -14
  221. data/spec/models/role_out_dynamic_spec.rb +48 -23
  222. data/spec/models/role_out_spec.rb +40 -21
  223. data/spec/models/role_pagination_dynamic_spec.rb +9 -14
  224. data/spec/models/role_pagination_spec.rb +9 -14
  225. data/spec/models/role_patch_spec.rb +48 -0
  226. data/spec/models/role_spec.rb +14 -13
  227. data/spec/models/role_with_access_spec.rb +41 -22
  228. data/spec/models/status_spec.rb +8 -37
  229. data/spec/models/timestamped_spec.rb +8 -13
  230. data/spec/models/uuid_spec.rb +7 -12
  231. data/spec/spec_helper.rb +1 -1
  232. metadata +161 -109
  233. data/docs/AccessPaginationAllOf.md +0 -17
  234. data/docs/GroupPaginationAllOf.md +0 -17
  235. data/docs/GroupWithPrincipalsAllOf.md +0 -17
  236. data/docs/GroupWithPrincipalsAndRolesAllOf.md +0 -19
  237. data/docs/InlineResponse200.md +0 -17
  238. data/docs/PolicyExtendedAllOf.md +0 -19
  239. data/docs/PolicyInAllOf.md +0 -19
  240. data/docs/PolicyPaginationAllOf.md +0 -17
  241. data/docs/PrincipalPaginationAllOf.md +0 -17
  242. data/docs/RoleInAllOf.md +0 -17
  243. data/docs/RoleOutDynamicAllOf.md +0 -29
  244. data/docs/RolePaginationDynamicAllOf.md +0 -17
  245. data/lib/insights-rbac-api-client/models/role_in_all_of.rb +0 -213
  246. data/lib/insights-rbac-api-client/models/role_out_dynamic_all_of.rb +0 -346
  247. data/lib/insights-rbac-api-client/models/role_pagination_dynamic_all_of.rb +0 -213
  248. data/spec/models/access_pagination_all_of_spec.rb +0 -41
  249. data/spec/models/group_pagination_all_of_spec.rb +0 -41
  250. data/spec/models/group_with_principals_all_of_spec.rb +0 -41
  251. data/spec/models/group_with_principals_and_roles_all_of_spec.rb +0 -47
  252. data/spec/models/inline_response200_spec.rb +0 -41
  253. data/spec/models/policy_extended_all_of_spec.rb +0 -47
  254. data/spec/models/policy_in_all_of_spec.rb +0 -47
  255. data/spec/models/policy_pagination_all_of_spec.rb +0 -41
  256. data/spec/models/principal_pagination_all_of_spec.rb +0 -41
  257. data/spec/models/role_in_all_of_spec.rb +0 -41
  258. data/spec/models/role_out_dynamic_all_of_spec.rb +0 -77
  259. data/spec/models/role_pagination_dynamic_all_of_spec.rb +0 -41
@@ -1,17 +0,0 @@
1
- # RBACApiClient::RolePaginationDynamicAllOf
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **data** | [**Array<RoleOutDynamic>**](RoleOutDynamic.md) | |
8
-
9
- ## Code Sample
10
-
11
- ```ruby
12
- require 'RBACApiClient'
13
-
14
- instance = RBACApiClient::RolePaginationDynamicAllOf.new(data: null)
15
- ```
16
-
17
-
@@ -1,213 +0,0 @@
1
- =begin
2
- #Role Based Access Control
3
-
4
- #The API for Role Based Access Control.
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module RBACApiClient
16
- class RoleInAllOf
17
- attr_accessor :access
18
-
19
- # Attribute mapping from ruby-style variable name to JSON key.
20
- def self.attribute_map
21
- {
22
- :'access' => :'access'
23
- }
24
- end
25
-
26
- # Attribute type mapping.
27
- def self.openapi_types
28
- {
29
- :'access' => :'Array<Access>'
30
- }
31
- end
32
-
33
- # List of attributes with nullable: true
34
- def self.openapi_nullable
35
- Set.new([
36
- ])
37
- end
38
-
39
- # Initializes the object
40
- # @param [Hash] attributes Model attributes in the form of hash
41
- def initialize(attributes = {})
42
- if (!attributes.is_a?(Hash))
43
- fail ArgumentError, "The input argument (attributes) must be a hash in `RBACApiClient::RoleInAllOf` initialize method"
44
- end
45
-
46
- # check to see if the attribute exists and convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}) { |(k, v), h|
48
- if (!self.class.attribute_map.key?(k.to_sym))
49
- fail ArgumentError, "`#{k}` is not a valid attribute in `RBACApiClient::RoleInAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
- end
51
- h[k.to_sym] = v
52
- }
53
-
54
- if attributes.key?(:'access')
55
- if (value = attributes[:'access']).is_a?(Array)
56
- self.access = value
57
- end
58
- end
59
- end
60
-
61
- # Show invalid properties with the reasons. Usually used together with valid?
62
- # @return Array for valid properties with the reasons
63
- def list_invalid_properties
64
- invalid_properties = Array.new
65
- if @access.nil?
66
- invalid_properties.push('invalid value for "access", access cannot be nil.')
67
- end
68
-
69
- invalid_properties
70
- end
71
-
72
- # Check to see if the all the properties in the model are valid
73
- # @return true if the model is valid
74
- def valid?
75
- return false if @access.nil?
76
- true
77
- end
78
-
79
- # Checks equality by comparing each attribute.
80
- # @param [Object] Object to be compared
81
- def ==(o)
82
- return true if self.equal?(o)
83
- self.class == o.class &&
84
- access == o.access
85
- end
86
-
87
- # @see the `==` method
88
- # @param [Object] Object to be compared
89
- def eql?(o)
90
- self == o
91
- end
92
-
93
- # Calculates hash code according to all attributes.
94
- # @return [Integer] Hash code
95
- def hash
96
- [access].hash
97
- end
98
-
99
- # Builds the object from hash
100
- # @param [Hash] attributes Model attributes in the form of hash
101
- # @return [Object] Returns the model itself
102
- def self.build_from_hash(attributes)
103
- new.build_from_hash(attributes)
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def build_from_hash(attributes)
110
- return nil unless attributes.is_a?(Hash)
111
- self.class.openapi_types.each_pair do |key, type|
112
- if type =~ /\AArray<(.*)>/i
113
- # check to ensure the input is an array given that the attribute
114
- # is documented as an array but the input is not
115
- if attributes[self.class.attribute_map[key]].is_a?(Array)
116
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
- end
118
- elsif !attributes[self.class.attribute_map[key]].nil?
119
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
- end # or else data not found in attributes(hash), not an issue as the data can be optional
121
- end
122
-
123
- self
124
- end
125
-
126
- # Deserializes the data based on type
127
- # @param string type Data type
128
- # @param string value Value to be deserialized
129
- # @return [Object] Deserialized data
130
- def _deserialize(type, value)
131
- case type.to_sym
132
- when :DateTime
133
- DateTime.parse(value)
134
- when :Date
135
- Date.parse(value)
136
- when :String
137
- value.to_s
138
- when :Integer
139
- value.to_i
140
- when :Float
141
- value.to_f
142
- when :Boolean
143
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
- true
145
- else
146
- false
147
- end
148
- when :Object
149
- # generic object (usually a Hash), return directly
150
- value
151
- when /\AArray<(?<inner_type>.+)>\z/
152
- inner_type = Regexp.last_match[:inner_type]
153
- value.map { |v| _deserialize(inner_type, v) }
154
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
- k_type = Regexp.last_match[:k_type]
156
- v_type = Regexp.last_match[:v_type]
157
- {}.tap do |hash|
158
- value.each do |k, v|
159
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
- end
161
- end
162
- else # model
163
- RBACApiClient.const_get(type).build_from_hash(value)
164
- end
165
- end
166
-
167
- # Returns the string representation of the object
168
- # @return [String] String presentation of the object
169
- def to_s
170
- to_hash.to_s
171
- end
172
-
173
- # to_body is an alias to to_hash (backward compatibility)
174
- # @return [Hash] Returns the object in the form of hash
175
- def to_body
176
- to_hash
177
- end
178
-
179
- # Returns the object in the form of hash
180
- # @return [Hash] Returns the object in the form of hash
181
- def to_hash
182
- hash = {}
183
- self.class.attribute_map.each_pair do |attr, param|
184
- value = self.send(attr)
185
- if value.nil?
186
- is_nullable = self.class.openapi_nullable.include?(attr)
187
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
188
- end
189
-
190
- hash[param] = _to_hash(value)
191
- end
192
- hash
193
- end
194
-
195
- # Outputs non-array value in the form of hash
196
- # For object, use to_hash. Otherwise, just return the value
197
- # @param [Object] value Any valid value
198
- # @return [Hash] Returns the value in the form of hash
199
- def _to_hash(value)
200
- if value.is_a?(Array)
201
- value.compact.map { |v| _to_hash(v) }
202
- elsif value.is_a?(Hash)
203
- {}.tap do |hash|
204
- value.each { |k, v| hash[k] = _to_hash(v) }
205
- end
206
- elsif value.respond_to? :to_hash
207
- value.to_hash
208
- else
209
- value
210
- end
211
- end
212
- end
213
- end
@@ -1,346 +0,0 @@
1
- =begin
2
- #Role Based Access Control
3
-
4
- #The API for Role Based Access Control.
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module RBACApiClient
16
- class RoleOutDynamicAllOf
17
- attr_accessor :policy_count
18
-
19
- attr_accessor :access_count
20
-
21
- attr_accessor :applications
22
-
23
- attr_accessor :system
24
-
25
- attr_accessor :platform_default
26
-
27
- attr_accessor :groups_in_count
28
-
29
- attr_accessor :groups_in
30
-
31
- # Attribute mapping from ruby-style variable name to JSON key.
32
- def self.attribute_map
33
- {
34
- :'policy_count' => :'policyCount',
35
- :'access_count' => :'accessCount',
36
- :'applications' => :'applications',
37
- :'system' => :'system',
38
- :'platform_default' => :'platform_default',
39
- :'groups_in_count' => :'groups_in_count',
40
- :'groups_in' => :'groups_in'
41
- }
42
- end
43
-
44
- # Attribute type mapping.
45
- def self.openapi_types
46
- {
47
- :'policy_count' => :'Integer',
48
- :'access_count' => :'Integer',
49
- :'applications' => :'Array<String>',
50
- :'system' => :'Boolean',
51
- :'platform_default' => :'Boolean',
52
- :'groups_in_count' => :'Integer',
53
- :'groups_in' => :'Array<AdditionalGroup>'
54
- }
55
- end
56
-
57
- # List of attributes with nullable: true
58
- def self.openapi_nullable
59
- Set.new([
60
- ])
61
- end
62
-
63
- # Initializes the object
64
- # @param [Hash] attributes Model attributes in the form of hash
65
- def initialize(attributes = {})
66
- if (!attributes.is_a?(Hash))
67
- fail ArgumentError, "The input argument (attributes) must be a hash in `RBACApiClient::RoleOutDynamicAllOf` initialize method"
68
- end
69
-
70
- # check to see if the attribute exists and convert string to symbol for hash key
71
- attributes = attributes.each_with_object({}) { |(k, v), h|
72
- if (!self.class.attribute_map.key?(k.to_sym))
73
- fail ArgumentError, "`#{k}` is not a valid attribute in `RBACApiClient::RoleOutDynamicAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
- end
75
- h[k.to_sym] = v
76
- }
77
-
78
- if attributes.key?(:'policy_count')
79
- self.policy_count = attributes[:'policy_count']
80
- end
81
-
82
- if attributes.key?(:'access_count')
83
- self.access_count = attributes[:'access_count']
84
- end
85
-
86
- if attributes.key?(:'applications')
87
- if (value = attributes[:'applications']).is_a?(Array)
88
- self.applications = value
89
- end
90
- end
91
-
92
- if attributes.key?(:'system')
93
- self.system = attributes[:'system']
94
- else
95
- self.system = false
96
- end
97
-
98
- if attributes.key?(:'platform_default')
99
- self.platform_default = attributes[:'platform_default']
100
- else
101
- self.platform_default = false
102
- end
103
-
104
- if attributes.key?(:'groups_in_count')
105
- self.groups_in_count = attributes[:'groups_in_count']
106
- end
107
-
108
- if attributes.key?(:'groups_in')
109
- if (value = attributes[:'groups_in']).is_a?(Array)
110
- self.groups_in = value
111
- end
112
- end
113
- end
114
-
115
- # Show invalid properties with the reasons. Usually used together with valid?
116
- # @return Array for valid properties with the reasons
117
- def list_invalid_properties
118
- invalid_properties = Array.new
119
- if @policy_count.nil?
120
- invalid_properties.push('invalid value for "policy_count", policy_count cannot be nil.')
121
- end
122
-
123
- if @policy_count < 0
124
- invalid_properties.push('invalid value for "policy_count", must be greater than or equal to 0.')
125
- end
126
-
127
- if @access_count.nil?
128
- invalid_properties.push('invalid value for "access_count", access_count cannot be nil.')
129
- end
130
-
131
- if @access_count < 0
132
- invalid_properties.push('invalid value for "access_count", must be greater than or equal to 0.')
133
- end
134
-
135
- if @applications.nil?
136
- invalid_properties.push('invalid value for "applications", applications cannot be nil.')
137
- end
138
-
139
- if @system.nil?
140
- invalid_properties.push('invalid value for "system", system cannot be nil.')
141
- end
142
-
143
- if @platform_default.nil?
144
- invalid_properties.push('invalid value for "platform_default", platform_default cannot be nil.')
145
- end
146
-
147
- if !@groups_in_count.nil? && @groups_in_count < 0
148
- invalid_properties.push('invalid value for "groups_in_count", must be greater than or equal to 0.')
149
- end
150
-
151
- invalid_properties
152
- end
153
-
154
- # Check to see if the all the properties in the model are valid
155
- # @return true if the model is valid
156
- def valid?
157
- return false if @policy_count.nil?
158
- return false if @policy_count < 0
159
- return false if @access_count.nil?
160
- return false if @access_count < 0
161
- return false if @applications.nil?
162
- return false if @system.nil?
163
- return false if @platform_default.nil?
164
- return false if !@groups_in_count.nil? && @groups_in_count < 0
165
- true
166
- end
167
-
168
- # Custom attribute writer method with validation
169
- # @param [Object] policy_count Value to be assigned
170
- def policy_count=(policy_count)
171
- if policy_count.nil?
172
- fail ArgumentError, 'policy_count cannot be nil'
173
- end
174
-
175
- if policy_count < 0
176
- fail ArgumentError, 'invalid value for "policy_count", must be greater than or equal to 0.'
177
- end
178
-
179
- @policy_count = policy_count
180
- end
181
-
182
- # Custom attribute writer method with validation
183
- # @param [Object] access_count Value to be assigned
184
- def access_count=(access_count)
185
- if access_count.nil?
186
- fail ArgumentError, 'access_count cannot be nil'
187
- end
188
-
189
- if access_count < 0
190
- fail ArgumentError, 'invalid value for "access_count", must be greater than or equal to 0.'
191
- end
192
-
193
- @access_count = access_count
194
- end
195
-
196
- # Custom attribute writer method with validation
197
- # @param [Object] groups_in_count Value to be assigned
198
- def groups_in_count=(groups_in_count)
199
- if !groups_in_count.nil? && groups_in_count < 0
200
- fail ArgumentError, 'invalid value for "groups_in_count", must be greater than or equal to 0.'
201
- end
202
-
203
- @groups_in_count = groups_in_count
204
- end
205
-
206
- # Checks equality by comparing each attribute.
207
- # @param [Object] Object to be compared
208
- def ==(o)
209
- return true if self.equal?(o)
210
- self.class == o.class &&
211
- policy_count == o.policy_count &&
212
- access_count == o.access_count &&
213
- applications == o.applications &&
214
- system == o.system &&
215
- platform_default == o.platform_default &&
216
- groups_in_count == o.groups_in_count &&
217
- groups_in == o.groups_in
218
- end
219
-
220
- # @see the `==` method
221
- # @param [Object] Object to be compared
222
- def eql?(o)
223
- self == o
224
- end
225
-
226
- # Calculates hash code according to all attributes.
227
- # @return [Integer] Hash code
228
- def hash
229
- [policy_count, access_count, applications, system, platform_default, groups_in_count, groups_in].hash
230
- end
231
-
232
- # Builds the object from hash
233
- # @param [Hash] attributes Model attributes in the form of hash
234
- # @return [Object] Returns the model itself
235
- def self.build_from_hash(attributes)
236
- new.build_from_hash(attributes)
237
- end
238
-
239
- # Builds the object from hash
240
- # @param [Hash] attributes Model attributes in the form of hash
241
- # @return [Object] Returns the model itself
242
- def build_from_hash(attributes)
243
- return nil unless attributes.is_a?(Hash)
244
- self.class.openapi_types.each_pair do |key, type|
245
- if type =~ /\AArray<(.*)>/i
246
- # check to ensure the input is an array given that the attribute
247
- # is documented as an array but the input is not
248
- if attributes[self.class.attribute_map[key]].is_a?(Array)
249
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
250
- end
251
- elsif !attributes[self.class.attribute_map[key]].nil?
252
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
253
- end # or else data not found in attributes(hash), not an issue as the data can be optional
254
- end
255
-
256
- self
257
- end
258
-
259
- # Deserializes the data based on type
260
- # @param string type Data type
261
- # @param string value Value to be deserialized
262
- # @return [Object] Deserialized data
263
- def _deserialize(type, value)
264
- case type.to_sym
265
- when :DateTime
266
- DateTime.parse(value)
267
- when :Date
268
- Date.parse(value)
269
- when :String
270
- value.to_s
271
- when :Integer
272
- value.to_i
273
- when :Float
274
- value.to_f
275
- when :Boolean
276
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
277
- true
278
- else
279
- false
280
- end
281
- when :Object
282
- # generic object (usually a Hash), return directly
283
- value
284
- when /\AArray<(?<inner_type>.+)>\z/
285
- inner_type = Regexp.last_match[:inner_type]
286
- value.map { |v| _deserialize(inner_type, v) }
287
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
288
- k_type = Regexp.last_match[:k_type]
289
- v_type = Regexp.last_match[:v_type]
290
- {}.tap do |hash|
291
- value.each do |k, v|
292
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
293
- end
294
- end
295
- else # model
296
- RBACApiClient.const_get(type).build_from_hash(value)
297
- end
298
- end
299
-
300
- # Returns the string representation of the object
301
- # @return [String] String presentation of the object
302
- def to_s
303
- to_hash.to_s
304
- end
305
-
306
- # to_body is an alias to to_hash (backward compatibility)
307
- # @return [Hash] Returns the object in the form of hash
308
- def to_body
309
- to_hash
310
- end
311
-
312
- # Returns the object in the form of hash
313
- # @return [Hash] Returns the object in the form of hash
314
- def to_hash
315
- hash = {}
316
- self.class.attribute_map.each_pair do |attr, param|
317
- value = self.send(attr)
318
- if value.nil?
319
- is_nullable = self.class.openapi_nullable.include?(attr)
320
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
321
- end
322
-
323
- hash[param] = _to_hash(value)
324
- end
325
- hash
326
- end
327
-
328
- # Outputs non-array value in the form of hash
329
- # For object, use to_hash. Otherwise, just return the value
330
- # @param [Object] value Any valid value
331
- # @return [Hash] Returns the value in the form of hash
332
- def _to_hash(value)
333
- if value.is_a?(Array)
334
- value.compact.map { |v| _to_hash(v) }
335
- elsif value.is_a?(Hash)
336
- {}.tap do |hash|
337
- value.each { |k, v| hash[k] = _to_hash(v) }
338
- end
339
- elsif value.respond_to? :to_hash
340
- value.to_hash
341
- else
342
- value
343
- end
344
- end
345
- end
346
- end