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
@@ -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: 4.2.2
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 Status
@@ -18,35 +19,24 @@ module RBACApiClient
18
19
 
19
20
  attr_accessor :commit
20
21
 
21
- attr_accessor :server_address
22
-
23
- attr_accessor :platform_info
24
-
25
- attr_accessor :python_version
26
-
27
- attr_accessor :modules
28
-
29
22
  # Attribute mapping from ruby-style variable name to JSON key.
30
23
  def self.attribute_map
31
24
  {
32
25
  :'api_version' => :'api_version',
33
- :'commit' => :'commit',
34
- :'server_address' => :'server_address',
35
- :'platform_info' => :'platform_info',
36
- :'python_version' => :'python_version',
37
- :'modules' => :'modules'
26
+ :'commit' => :'commit'
38
27
  }
39
28
  end
40
29
 
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
41
35
  # Attribute type mapping.
42
36
  def self.openapi_types
43
37
  {
44
38
  :'api_version' => :'Integer',
45
- :'commit' => :'String',
46
- :'server_address' => :'String',
47
- :'platform_info' => :'Object',
48
- :'python_version' => :'String',
49
- :'modules' => :'Object'
39
+ :'commit' => :'String'
50
40
  }
51
41
  end
52
42
 
@@ -73,32 +63,19 @@ module RBACApiClient
73
63
 
74
64
  if attributes.key?(:'api_version')
75
65
  self.api_version = attributes[:'api_version']
66
+ else
67
+ self.api_version = nil
76
68
  end
77
69
 
78
70
  if attributes.key?(:'commit')
79
71
  self.commit = attributes[:'commit']
80
72
  end
81
-
82
- if attributes.key?(:'server_address')
83
- self.server_address = attributes[:'server_address']
84
- end
85
-
86
- if attributes.key?(:'platform_info')
87
- self.platform_info = attributes[:'platform_info']
88
- end
89
-
90
- if attributes.key?(:'python_version')
91
- self.python_version = attributes[:'python_version']
92
- end
93
-
94
- if attributes.key?(:'modules')
95
- self.modules = attributes[:'modules']
96
- end
97
73
  end
98
74
 
99
75
  # Show invalid properties with the reasons. Usually used together with valid?
100
76
  # @return Array for valid properties with the reasons
101
77
  def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
102
79
  invalid_properties = Array.new
103
80
  if @api_version.nil?
104
81
  invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
@@ -110,6 +87,7 @@ module RBACApiClient
110
87
  # Check to see if the all the properties in the model are valid
111
88
  # @return true if the model is valid
112
89
  def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
91
  return false if @api_version.nil?
114
92
  true
115
93
  end
@@ -120,11 +98,7 @@ module RBACApiClient
120
98
  return true if self.equal?(o)
121
99
  self.class == o.class &&
122
100
  api_version == o.api_version &&
123
- commit == o.commit &&
124
- server_address == o.server_address &&
125
- platform_info == o.platform_info &&
126
- python_version == o.python_version &&
127
- modules == o.modules
101
+ commit == o.commit
128
102
  end
129
103
 
130
104
  # @see the `==` method
@@ -136,44 +110,40 @@ module RBACApiClient
136
110
  # Calculates hash code according to all attributes.
137
111
  # @return [Integer] Hash code
138
112
  def hash
139
- [api_version, commit, server_address, platform_info, python_version, modules].hash
113
+ [api_version, commit].hash
140
114
  end
141
115
 
142
116
  # Builds the object from hash
143
117
  # @param [Hash] attributes Model attributes in the form of hash
144
118
  # @return [Object] Returns the model itself
145
119
  def self.build_from_hash(attributes)
146
- new.build_from_hash(attributes)
147
- end
148
-
149
- # Builds the object from hash
150
- # @param [Hash] attributes Model attributes in the form of hash
151
- # @return [Object] Returns the model itself
152
- def build_from_hash(attributes)
153
120
  return nil unless attributes.is_a?(Hash)
154
- self.class.openapi_types.each_pair do |key, type|
155
- if type =~ /\AArray<(.*)>/i
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ transformed_hash = {}
123
+ openapi_types.each_pair do |key, type|
124
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = nil
126
+ elsif type =~ /\AArray<(.*)>/i
156
127
  # check to ensure the input is an array given that the attribute
157
128
  # is documented as an array but the input is not
158
- if attributes[self.class.attribute_map[key]].is_a?(Array)
159
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
+ if attributes[attribute_map[key]].is_a?(Array)
130
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
160
131
  end
161
- elsif !attributes[self.class.attribute_map[key]].nil?
162
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
- end # or else data not found in attributes(hash), not an issue as the data can be optional
132
+ elsif !attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
134
+ end
164
135
  end
165
-
166
- self
136
+ new(transformed_hash)
167
137
  end
168
138
 
169
139
  # Deserializes the data based on type
170
140
  # @param string type Data type
171
141
  # @param string value Value to be deserialized
172
142
  # @return [Object] Deserialized data
173
- def _deserialize(type, value)
143
+ def self._deserialize(type, value)
174
144
  case type.to_sym
175
- when :DateTime
176
- DateTime.parse(value)
145
+ when :Time
146
+ Time.parse(value)
177
147
  when :Date
178
148
  Date.parse(value)
179
149
  when :String
@@ -203,7 +173,9 @@ module RBACApiClient
203
173
  end
204
174
  end
205
175
  else # model
206
- RBACApiClient.const_get(type).build_from_hash(value)
176
+ # models (e.g. Pet) or oneOf
177
+ klass = RBACApiClient.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
207
179
  end
208
180
  end
209
181
 
@@ -229,7 +201,7 @@ module RBACApiClient
229
201
  is_nullable = self.class.openapi_nullable.include?(attr)
230
202
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
231
203
  end
232
-
204
+
233
205
  hash[param] = _to_hash(value)
234
206
  end
235
207
  hash
@@ -252,5 +224,7 @@ module RBACApiClient
252
224
  value
253
225
  end
254
226
  end
227
+
255
228
  end
229
+
256
230
  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: 4.2.2
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 Timestamped
@@ -26,11 +27,16 @@ 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
  {
32
- :'created' => :'DateTime',
33
- :'modified' => :'DateTime'
38
+ :'created' => :'Time',
39
+ :'modified' => :'Time'
34
40
  }
35
41
  end
36
42
 
@@ -57,16 +63,21 @@ module RBACApiClient
57
63
 
58
64
  if attributes.key?(:'created')
59
65
  self.created = attributes[:'created']
66
+ else
67
+ self.created = nil
60
68
  end
61
69
 
62
70
  if attributes.key?(:'modified')
63
71
  self.modified = attributes[:'modified']
72
+ else
73
+ self.modified = nil
64
74
  end
65
75
  end
66
76
 
67
77
  # Show invalid properties with the reasons. Usually used together with valid?
68
78
  # @return Array for valid properties with the reasons
69
79
  def list_invalid_properties
80
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
70
81
  invalid_properties = Array.new
71
82
  if @created.nil?
72
83
  invalid_properties.push('invalid value for "created", created cannot be nil.')
@@ -82,6 +93,7 @@ module RBACApiClient
82
93
  # Check to see if the all the properties in the model are valid
83
94
  # @return true if the model is valid
84
95
  def valid?
96
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
97
  return false if @created.nil?
86
98
  return false if @modified.nil?
87
99
  true
@@ -112,37 +124,33 @@ module RBACApiClient
112
124
  # @param [Hash] attributes Model attributes in the form of hash
113
125
  # @return [Object] Returns the model itself
114
126
  def self.build_from_hash(attributes)
115
- new.build_from_hash(attributes)
116
- end
117
-
118
- # Builds the object from hash
119
- # @param [Hash] attributes Model attributes in the form of hash
120
- # @return [Object] Returns the model itself
121
- def build_from_hash(attributes)
122
127
  return nil unless attributes.is_a?(Hash)
123
- self.class.openapi_types.each_pair do |key, type|
124
- if type =~ /\AArray<(.*)>/i
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
125
134
  # check to ensure the input is an array given that the attribute
126
135
  # is documented as an array but the input is not
127
- if attributes[self.class.attribute_map[key]].is_a?(Array)
128
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
129
138
  end
130
- elsif !attributes[self.class.attribute_map[key]].nil?
131
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
- end # or else data not found in attributes(hash), not an issue as the data can be optional
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
133
142
  end
134
-
135
- self
143
+ new(transformed_hash)
136
144
  end
137
145
 
138
146
  # Deserializes the data based on type
139
147
  # @param string type Data type
140
148
  # @param string value Value to be deserialized
141
149
  # @return [Object] Deserialized data
142
- def _deserialize(type, value)
150
+ def self._deserialize(type, value)
143
151
  case type.to_sym
144
- when :DateTime
145
- DateTime.parse(value)
152
+ when :Time
153
+ Time.parse(value)
146
154
  when :Date
147
155
  Date.parse(value)
148
156
  when :String
@@ -172,7 +180,9 @@ module RBACApiClient
172
180
  end
173
181
  end
174
182
  else # model
175
- RBACApiClient.const_get(type).build_from_hash(value)
183
+ # models (e.g. Pet) or oneOf
184
+ klass = RBACApiClient.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
176
186
  end
177
187
  end
178
188
 
@@ -198,7 +208,7 @@ module RBACApiClient
198
208
  is_nullable = self.class.openapi_nullable.include?(attr)
199
209
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
200
210
  end
201
-
211
+
202
212
  hash[param] = _to_hash(value)
203
213
  end
204
214
  hash
@@ -221,5 +231,7 @@ module RBACApiClient
221
231
  value
222
232
  end
223
233
  end
234
+
224
235
  end
236
+
225
237
  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: 4.2.2
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 UUID
@@ -23,6 +24,11 @@ module RBACApiClient
23
24
  }
24
25
  end
25
26
 
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
26
32
  # Attribute type mapping.
27
33
  def self.openapi_types
28
34
  {
@@ -53,12 +59,15 @@ module RBACApiClient
53
59
 
54
60
  if attributes.key?(:'uuid')
55
61
  self.uuid = attributes[:'uuid']
62
+ else
63
+ self.uuid = nil
56
64
  end
57
65
  end
58
66
 
59
67
  # Show invalid properties with the reasons. Usually used together with valid?
60
68
  # @return Array for valid properties with the reasons
61
69
  def list_invalid_properties
70
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
62
71
  invalid_properties = Array.new
63
72
  if @uuid.nil?
64
73
  invalid_properties.push('invalid value for "uuid", uuid cannot be nil.')
@@ -70,6 +79,7 @@ module RBACApiClient
70
79
  # Check to see if the all the properties in the model are valid
71
80
  # @return true if the model is valid
72
81
  def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
73
83
  return false if @uuid.nil?
74
84
  true
75
85
  end
@@ -98,37 +108,33 @@ module RBACApiClient
98
108
  # @param [Hash] attributes Model attributes in the form of hash
99
109
  # @return [Object] Returns the model itself
100
110
  def self.build_from_hash(attributes)
101
- new.build_from_hash(attributes)
102
- end
103
-
104
- # Builds the object from hash
105
- # @param [Hash] attributes Model attributes in the form of hash
106
- # @return [Object] Returns the model itself
107
- def build_from_hash(attributes)
108
111
  return nil unless attributes.is_a?(Hash)
109
- self.class.openapi_types.each_pair do |key, type|
110
- if type =~ /\AArray<(.*)>/i
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ transformed_hash = {}
114
+ openapi_types.each_pair do |key, type|
115
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
+ transformed_hash["#{key}"] = nil
117
+ elsif type =~ /\AArray<(.*)>/i
111
118
  # check to ensure the input is an array given that the attribute
112
119
  # is documented as an array but the input is not
113
- if attributes[self.class.attribute_map[key]].is_a?(Array)
114
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ if attributes[attribute_map[key]].is_a?(Array)
121
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
115
122
  end
116
- elsif !attributes[self.class.attribute_map[key]].nil?
117
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
- end # or else data not found in attributes(hash), not an issue as the data can be optional
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
125
+ end
119
126
  end
120
-
121
- self
127
+ new(transformed_hash)
122
128
  end
123
129
 
124
130
  # Deserializes the data based on type
125
131
  # @param string type Data type
126
132
  # @param string value Value to be deserialized
127
133
  # @return [Object] Deserialized data
128
- def _deserialize(type, value)
134
+ def self._deserialize(type, value)
129
135
  case type.to_sym
130
- when :DateTime
131
- DateTime.parse(value)
136
+ when :Time
137
+ Time.parse(value)
132
138
  when :Date
133
139
  Date.parse(value)
134
140
  when :String
@@ -158,7 +164,9 @@ module RBACApiClient
158
164
  end
159
165
  end
160
166
  else # model
161
- RBACApiClient.const_get(type).build_from_hash(value)
167
+ # models (e.g. Pet) or oneOf
168
+ klass = RBACApiClient.const_get(type)
169
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
162
170
  end
163
171
  end
164
172
 
@@ -184,7 +192,7 @@ module RBACApiClient
184
192
  is_nullable = self.class.openapi_nullable.include?(attr)
185
193
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
186
194
  end
187
-
195
+
188
196
  hash[param] = _to_hash(value)
189
197
  end
190
198
  hash
@@ -207,5 +215,7 @@ module RBACApiClient
207
215
  value
208
216
  end
209
217
  end
218
+
210
219
  end
220
+
211
221
  end
@@ -6,10 +6,10 @@
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: 4.2.2
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  module RBACApiClient
14
- VERSION = '1.0.1'
14
+ VERSION = '2.0.0'
15
15
  end
@@ -6,7 +6,7 @@
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: 4.2.2
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -19,48 +19,64 @@ require 'insights-rbac-api-client/configuration'
19
19
  # Models
20
20
  require 'insights-rbac-api-client/models/access'
21
21
  require 'insights-rbac-api-client/models/access_pagination'
22
- require 'insights-rbac-api-client/models/access_pagination_all_of'
22
+ require 'insights-rbac-api-client/models/add_role_to_group200_response'
23
23
  require 'insights-rbac-api-client/models/additional_group'
24
+ require 'insights-rbac-api-client/models/cross_account_request'
25
+ require 'insights-rbac-api-client/models/cross_account_request_by_account'
26
+ require 'insights-rbac-api-client/models/cross_account_request_by_user_id'
27
+ require 'insights-rbac-api-client/models/cross_account_request_detail'
28
+ require 'insights-rbac-api-client/models/cross_account_request_detail_by_account'
29
+ require 'insights-rbac-api-client/models/cross_account_request_detail_by_use_id'
30
+ require 'insights-rbac-api-client/models/cross_account_request_in'
31
+ require 'insights-rbac-api-client/models/cross_account_request_out'
32
+ require 'insights-rbac-api-client/models/cross_account_request_pagination'
33
+ require 'insights-rbac-api-client/models/cross_account_request_pagination_all_of_data_inner'
34
+ require 'insights-rbac-api-client/models/cross_account_request_patch'
35
+ require 'insights-rbac-api-client/models/cross_account_request_update_in'
36
+ require 'insights-rbac-api-client/models/cross_account_request_with_roles'
37
+ require 'insights-rbac-api-client/models/cross_account_request_with_roles_roles_inner'
24
38
  require 'insights-rbac-api-client/models/error'
25
39
  require 'insights-rbac-api-client/models/error403'
40
+ require 'insights-rbac-api-client/models/error403_errors_inner'
41
+ require 'insights-rbac-api-client/models/error_errors_inner'
42
+ require 'insights-rbac-api-client/models/error_not_found'
43
+ require 'insights-rbac-api-client/models/error_not_found_errors_inner'
26
44
  require 'insights-rbac-api-client/models/group'
27
45
  require 'insights-rbac-api-client/models/group_out'
28
46
  require 'insights-rbac-api-client/models/group_pagination'
29
- require 'insights-rbac-api-client/models/group_pagination_all_of'
30
47
  require 'insights-rbac-api-client/models/group_principal_in'
31
48
  require 'insights-rbac-api-client/models/group_role_in'
32
49
  require 'insights-rbac-api-client/models/group_roles_pagination'
33
50
  require 'insights-rbac-api-client/models/group_with_principals'
34
- require 'insights-rbac-api-client/models/group_with_principals_all_of'
35
51
  require 'insights-rbac-api-client/models/group_with_principals_and_roles'
36
- require 'insights-rbac-api-client/models/group_with_principals_and_roles_all_of'
37
- require 'insights-rbac-api-client/models/inline_response200'
38
52
  require 'insights-rbac-api-client/models/list_pagination'
39
53
  require 'insights-rbac-api-client/models/pagination_links'
40
54
  require 'insights-rbac-api-client/models/pagination_meta'
55
+ require 'insights-rbac-api-client/models/permission'
56
+ require 'insights-rbac-api-client/models/permission_options_pagination'
57
+ require 'insights-rbac-api-client/models/permission_pagination'
41
58
  require 'insights-rbac-api-client/models/policy'
42
59
  require 'insights-rbac-api-client/models/policy_extended'
43
- require 'insights-rbac-api-client/models/policy_extended_all_of'
44
60
  require 'insights-rbac-api-client/models/policy_in'
45
- require 'insights-rbac-api-client/models/policy_in_all_of'
46
61
  require 'insights-rbac-api-client/models/policy_pagination'
47
- require 'insights-rbac-api-client/models/policy_pagination_all_of'
48
62
  require 'insights-rbac-api-client/models/principal'
63
+ require 'insights-rbac-api-client/models/principal_external_source_id'
49
64
  require 'insights-rbac-api-client/models/principal_in'
65
+ require 'insights-rbac-api-client/models/principal_minimal'
50
66
  require 'insights-rbac-api-client/models/principal_out'
51
67
  require 'insights-rbac-api-client/models/principal_pagination'
52
- require 'insights-rbac-api-client/models/principal_pagination_all_of'
68
+ require 'insights-rbac-api-client/models/principal_pagination_all_of_data_inner'
53
69
  require 'insights-rbac-api-client/models/resource_definition'
54
70
  require 'insights-rbac-api-client/models/resource_definition_filter'
71
+ require 'insights-rbac-api-client/models/resource_definition_filter_value'
72
+ require 'insights-rbac-api-client/models/resource_definition_filter_value_one_of_inner'
55
73
  require 'insights-rbac-api-client/models/role'
56
74
  require 'insights-rbac-api-client/models/role_in'
57
- require 'insights-rbac-api-client/models/role_in_all_of'
58
75
  require 'insights-rbac-api-client/models/role_out'
59
76
  require 'insights-rbac-api-client/models/role_out_dynamic'
60
- require 'insights-rbac-api-client/models/role_out_dynamic_all_of'
61
77
  require 'insights-rbac-api-client/models/role_pagination'
62
78
  require 'insights-rbac-api-client/models/role_pagination_dynamic'
63
- require 'insights-rbac-api-client/models/role_pagination_dynamic_all_of'
79
+ require 'insights-rbac-api-client/models/role_patch'
64
80
  require 'insights-rbac-api-client/models/role_with_access'
65
81
  require 'insights-rbac-api-client/models/status'
66
82
  require 'insights-rbac-api-client/models/timestamped'
@@ -68,7 +84,9 @@ require 'insights-rbac-api-client/models/uuid'
68
84
 
69
85
  # APIs
70
86
  require 'insights-rbac-api-client/api/access_api'
87
+ require 'insights-rbac-api-client/api/cross_account_request_api'
71
88
  require 'insights-rbac-api-client/api/group_api'
89
+ require 'insights-rbac-api-client/api/permission_api'
72
90
  require 'insights-rbac-api-client/api/policy_api'
73
91
  require 'insights-rbac-api-client/api/principal_api'
74
92
  require 'insights-rbac-api-client/api/role_api'