smplkit 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/actions_api.rb +159 -0
  3. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/functions_api.rb +90 -0
  4. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/resource_types_api.rb +159 -0
  5. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_attributes.rb +192 -0
  6. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_list_links.rb +148 -0
  7. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_list_meta.rb +164 -0
  8. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_list_response.rb +202 -0
  9. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_resource.rb +202 -0
  10. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_attributes.rb +192 -0
  11. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_links.rb +148 -0
  12. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_meta.rb +164 -0
  13. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_response.rb +202 -0
  14. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_resource.rb +202 -0
  15. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/wipe_response.rb +201 -0
  16. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/wipe_tables_summary.rb +348 -0
  17. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client.rb +15 -0
  18. data/lib/smplkit/_generated/audit/spec/api/actions_api_spec.rb +62 -0
  19. data/lib/smplkit/_generated/audit/spec/api/functions_api_spec.rb +47 -0
  20. data/lib/smplkit/_generated/audit/spec/api/resource_types_api_spec.rb +62 -0
  21. data/lib/smplkit/_generated/audit/spec/models/action_attributes_spec.rb +42 -0
  22. data/lib/smplkit/_generated/audit/spec/models/action_list_links_spec.rb +36 -0
  23. data/lib/smplkit/_generated/audit/spec/models/action_list_meta_spec.rb +36 -0
  24. data/lib/smplkit/_generated/audit/spec/models/action_list_response_spec.rb +48 -0
  25. data/lib/smplkit/_generated/audit/spec/models/action_resource_spec.rb +48 -0
  26. data/lib/smplkit/_generated/audit/spec/models/resource_type_attributes_spec.rb +42 -0
  27. data/lib/smplkit/_generated/audit/spec/models/resource_type_list_links_spec.rb +36 -0
  28. data/lib/smplkit/_generated/audit/spec/models/resource_type_list_meta_spec.rb +36 -0
  29. data/lib/smplkit/_generated/audit/spec/models/resource_type_list_response_spec.rb +48 -0
  30. data/lib/smplkit/_generated/audit/spec/models/resource_type_resource_spec.rb +48 -0
  31. data/lib/smplkit/_generated/audit/spec/models/wipe_response_spec.rb +48 -0
  32. data/lib/smplkit/_generated/audit/spec/models/wipe_tables_summary_spec.rb +66 -0
  33. metadata +31 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11737e77b9c137965fcfb0f98d42cca4180131afd974aaa4d7b7107813dbc709
4
- data.tar.gz: bf468bfdf381a811581a9a7dabd03aaec863bf37e77a13e7788128179987d430
3
+ metadata.gz: 37f89bbbf4d544df95f7b3c0627f390d7058df143f8947f0d644dfdf3063dc2a
4
+ data.tar.gz: 21cec172a86a75e978c9b05658d19616aa72d66ab463983ed1ab972e1eaa9776
5
5
  SHA512:
6
- metadata.gz: 4956121ef13bc54257048233a7adcb8a35b7d7d8bcfd82e86eecf4776334c33dcfb30cd12dc486d9df0165d493863a4eaa61df0123a6f926d3f2018dff80fe5c
7
- data.tar.gz: b6522291313374b8315de8d9883db6af3cdbf1a6d31dee45f2f49aea9c6c7d03b74e309481ffe1adf5f85fdd0cec8244d4c7114ff188ff70be8c3ea7a5f38d66
6
+ metadata.gz: 9fa118d9d00735b57d5dd452cd1d2a53310afad9ab5aa1de1c1e3f9dceeec7e208b4e72cf8c46a839617a59a833d4c82f5c5412cd5981ce5400cee0380bd514a
7
+ data.tar.gz: df5a7875bfb5e5bfaa2aa403ad54cae7ffe477660275ec62f567e53f92f939693a7762b0adfba56495185cc960be59b1bd29f4d77a9ed98e945e8bed996d5778
@@ -0,0 +1,159 @@
1
+ =begin
2
+ #smplkit Audit API
3
+
4
+ #Append-only change-history substrate for smpl.* resources and customer-application events. ADR-047.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module SmplkitGeneratedClient::Audit
16
+ class ActionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List Actions
23
+ # List the distinct ``action`` slugs seen in the account. Without ``filter[resource_type]``, returns one row per distinct action — the same action may have been recorded with multiple resource types and the unfiltered dropdown shows it once. With ``filter[resource_type]``, returns the actions seen with that specific resource type, powering the Activity tab's cascading filter behavior.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :filter_resource_type
26
+ # @option opts [Integer] :page_size
27
+ # @option opts [String] :page_after
28
+ # @return [ActionListResponse]
29
+ def list_actions(opts = {})
30
+ data, _status_code, _headers = list_actions_with_http_info(opts)
31
+ data
32
+ end
33
+
34
+ # List Actions
35
+ # List the distinct ``action`` slugs seen in the account. Without ``filter[resource_type]``, returns one row per distinct action — the same action may have been recorded with multiple resource types and the unfiltered dropdown shows it once. With ``filter[resource_type]``, returns the actions seen with that specific resource type, powering the Activity tab's cascading filter behavior.
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :filter_resource_type
38
+ # @option opts [Integer] :page_size
39
+ # @option opts [String] :page_after
40
+ # @return [Array<(ActionListResponse, Integer, Hash)>] ActionListResponse data, response status code and response headers
41
+ def list_actions_with_http_info(opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: ActionsApi.list_actions ...'
44
+ end
45
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
46
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ActionsApi.list_actions, must be greater than or equal to 1.'
47
+ end
48
+
49
+ # resource path
50
+ local_var_path = '/api/v1/actions'
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+ query_params[:'filter[resource_type]'] = opts[:'filter_resource_type'] if !opts[:'filter_resource_type'].nil?
55
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
56
+ query_params[:'page[after]'] = opts[:'page_after'] if !opts[:'page_after'].nil?
57
+
58
+ # header parameters
59
+ header_params = opts[:header_params] || {}
60
+ # HTTP header 'Accept' (if needed)
61
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
62
+
63
+ # form parameters
64
+ form_params = opts[:form_params] || {}
65
+
66
+ # http body (model)
67
+ post_body = opts[:debug_body]
68
+
69
+ # return_type
70
+ return_type = opts[:debug_return_type] || 'ActionListResponse'
71
+
72
+ # auth_names
73
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
74
+
75
+ new_options = opts.merge(
76
+ :operation => :"ActionsApi.list_actions",
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type
83
+ )
84
+
85
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: ActionsApi#list_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ # List Resource Types
93
+ # List the distinct ``resource_type`` slugs seen in the account. Each row's ``id`` is the slug itself, mirroring the smplkit convention of using customer-provided identifiers as the public-facing resource id (ADR-014).
94
+ # @param [Hash] opts the optional parameters
95
+ # @option opts [Integer] :page_size
96
+ # @option opts [String] :page_after
97
+ # @return [ResourceTypeListResponse]
98
+ def list_resource_types(opts = {})
99
+ data, _status_code, _headers = list_resource_types_with_http_info(opts)
100
+ data
101
+ end
102
+
103
+ # List Resource Types
104
+ # List the distinct &#x60;&#x60;resource_type&#x60;&#x60; slugs seen in the account. Each row&#39;s &#x60;&#x60;id&#x60;&#x60; is the slug itself, mirroring the smplkit convention of using customer-provided identifiers as the public-facing resource id (ADR-014).
105
+ # @param [Hash] opts the optional parameters
106
+ # @option opts [Integer] :page_size
107
+ # @option opts [String] :page_after
108
+ # @return [Array<(ResourceTypeListResponse, Integer, Hash)>] ResourceTypeListResponse data, response status code and response headers
109
+ def list_resource_types_with_http_info(opts = {})
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug 'Calling API: ActionsApi.list_resource_types ...'
112
+ end
113
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
114
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ActionsApi.list_resource_types, must be greater than or equal to 1.'
115
+ end
116
+
117
+ # resource path
118
+ local_var_path = '/api/v1/resource_types'
119
+
120
+ # query parameters
121
+ query_params = opts[:query_params] || {}
122
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
123
+ query_params[:'page[after]'] = opts[:'page_after'] if !opts[:'page_after'].nil?
124
+
125
+ # header parameters
126
+ header_params = opts[:header_params] || {}
127
+ # HTTP header 'Accept' (if needed)
128
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
129
+
130
+ # form parameters
131
+ form_params = opts[:form_params] || {}
132
+
133
+ # http body (model)
134
+ post_body = opts[:debug_body]
135
+
136
+ # return_type
137
+ return_type = opts[:debug_return_type] || 'ResourceTypeListResponse'
138
+
139
+ # auth_names
140
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
141
+
142
+ new_options = opts.merge(
143
+ :operation => :"ActionsApi.list_resource_types",
144
+ :header_params => header_params,
145
+ :query_params => query_params,
146
+ :form_params => form_params,
147
+ :body => post_body,
148
+ :auth_names => auth_names,
149
+ :return_type => return_type
150
+ )
151
+
152
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
153
+ if @api_client.config.debugging
154
+ @api_client.config.logger.debug "API called: ActionsApi#list_resource_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
155
+ end
156
+ return data, status_code, headers
157
+ end
158
+ end
159
+ end
@@ -0,0 +1,90 @@
1
+ =begin
2
+ #smplkit Audit API
3
+
4
+ #Append-only change-history substrate for smpl.* resources and customer-application events. ADR-047.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module SmplkitGeneratedClient::Audit
16
+ class FunctionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Execute Wipe
23
+ # Delete every audit-database row scoped to the authenticated account. Returns the per-table row counts that were deleted along with the completion timestamp. The action is atomic within the audit database — either every account-scoped row is gone, or none is. The body is required to be ``{}``; no parameters are accepted.
24
+ # @param body [Object]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [WipeResponse]
27
+ def execute_wipe(body, opts = {})
28
+ data, _status_code, _headers = execute_wipe_with_http_info(body, opts)
29
+ data
30
+ end
31
+
32
+ # Execute Wipe
33
+ # Delete every audit-database row scoped to the authenticated account. Returns the per-table row counts that were deleted along with the completion timestamp. The action is atomic within the audit database — either every account-scoped row is gone, or none is. The body is required to be &#x60;&#x60;{}&#x60;&#x60;; no parameters are accepted.
34
+ # @param body [Object]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(WipeResponse, Integer, Hash)>] WipeResponse data, response status code and response headers
37
+ def execute_wipe_with_http_info(body, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: FunctionsApi.execute_wipe ...'
40
+ end
41
+ # verify the required parameter 'body' is set
42
+ if @api_client.config.client_side_validation && body.nil?
43
+ fail ArgumentError, "Missing the required parameter 'body' when calling FunctionsApi.execute_wipe"
44
+ end
45
+ # resource path
46
+ local_var_path = '/api/v1/functions/wipe/actions/execute'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'WipeResponse'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"FunctionsApi.execute_wipe",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: FunctionsApi#execute_wipe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,159 @@
1
+ =begin
2
+ #smplkit Audit API
3
+
4
+ #Append-only change-history substrate for smpl.* resources and customer-application events. ADR-047.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module SmplkitGeneratedClient::Audit
16
+ class ResourceTypesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List Actions
23
+ # List the distinct ``action`` slugs seen in the account. Without ``filter[resource_type]``, returns one row per distinct action — the same action may have been recorded with multiple resource types and the unfiltered dropdown shows it once. With ``filter[resource_type]``, returns the actions seen with that specific resource type, powering the Activity tab's cascading filter behavior.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :filter_resource_type
26
+ # @option opts [Integer] :page_size
27
+ # @option opts [String] :page_after
28
+ # @return [ActionListResponse]
29
+ def list_actions(opts = {})
30
+ data, _status_code, _headers = list_actions_with_http_info(opts)
31
+ data
32
+ end
33
+
34
+ # List Actions
35
+ # List the distinct &#x60;&#x60;action&#x60;&#x60; slugs seen in the account. Without &#x60;&#x60;filter[resource_type]&#x60;&#x60;, returns one row per distinct action — the same action may have been recorded with multiple resource types and the unfiltered dropdown shows it once. With &#x60;&#x60;filter[resource_type]&#x60;&#x60;, returns the actions seen with that specific resource type, powering the Activity tab&#39;s cascading filter behavior.
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :filter_resource_type
38
+ # @option opts [Integer] :page_size
39
+ # @option opts [String] :page_after
40
+ # @return [Array<(ActionListResponse, Integer, Hash)>] ActionListResponse data, response status code and response headers
41
+ def list_actions_with_http_info(opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: ResourceTypesApi.list_actions ...'
44
+ end
45
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
46
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ResourceTypesApi.list_actions, must be greater than or equal to 1.'
47
+ end
48
+
49
+ # resource path
50
+ local_var_path = '/api/v1/actions'
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+ query_params[:'filter[resource_type]'] = opts[:'filter_resource_type'] if !opts[:'filter_resource_type'].nil?
55
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
56
+ query_params[:'page[after]'] = opts[:'page_after'] if !opts[:'page_after'].nil?
57
+
58
+ # header parameters
59
+ header_params = opts[:header_params] || {}
60
+ # HTTP header 'Accept' (if needed)
61
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
62
+
63
+ # form parameters
64
+ form_params = opts[:form_params] || {}
65
+
66
+ # http body (model)
67
+ post_body = opts[:debug_body]
68
+
69
+ # return_type
70
+ return_type = opts[:debug_return_type] || 'ActionListResponse'
71
+
72
+ # auth_names
73
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
74
+
75
+ new_options = opts.merge(
76
+ :operation => :"ResourceTypesApi.list_actions",
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type
83
+ )
84
+
85
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: ResourceTypesApi#list_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ # List Resource Types
93
+ # List the distinct ``resource_type`` slugs seen in the account. Each row's ``id`` is the slug itself, mirroring the smplkit convention of using customer-provided identifiers as the public-facing resource id (ADR-014).
94
+ # @param [Hash] opts the optional parameters
95
+ # @option opts [Integer] :page_size
96
+ # @option opts [String] :page_after
97
+ # @return [ResourceTypeListResponse]
98
+ def list_resource_types(opts = {})
99
+ data, _status_code, _headers = list_resource_types_with_http_info(opts)
100
+ data
101
+ end
102
+
103
+ # List Resource Types
104
+ # List the distinct &#x60;&#x60;resource_type&#x60;&#x60; slugs seen in the account. Each row&#39;s &#x60;&#x60;id&#x60;&#x60; is the slug itself, mirroring the smplkit convention of using customer-provided identifiers as the public-facing resource id (ADR-014).
105
+ # @param [Hash] opts the optional parameters
106
+ # @option opts [Integer] :page_size
107
+ # @option opts [String] :page_after
108
+ # @return [Array<(ResourceTypeListResponse, Integer, Hash)>] ResourceTypeListResponse data, response status code and response headers
109
+ def list_resource_types_with_http_info(opts = {})
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug 'Calling API: ResourceTypesApi.list_resource_types ...'
112
+ end
113
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
114
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ResourceTypesApi.list_resource_types, must be greater than or equal to 1.'
115
+ end
116
+
117
+ # resource path
118
+ local_var_path = '/api/v1/resource_types'
119
+
120
+ # query parameters
121
+ query_params = opts[:query_params] || {}
122
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
123
+ query_params[:'page[after]'] = opts[:'page_after'] if !opts[:'page_after'].nil?
124
+
125
+ # header parameters
126
+ header_params = opts[:header_params] || {}
127
+ # HTTP header 'Accept' (if needed)
128
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
129
+
130
+ # form parameters
131
+ form_params = opts[:form_params] || {}
132
+
133
+ # http body (model)
134
+ post_body = opts[:debug_body]
135
+
136
+ # return_type
137
+ return_type = opts[:debug_return_type] || 'ResourceTypeListResponse'
138
+
139
+ # auth_names
140
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
141
+
142
+ new_options = opts.merge(
143
+ :operation => :"ResourceTypesApi.list_resource_types",
144
+ :header_params => header_params,
145
+ :query_params => query_params,
146
+ :form_params => form_params,
147
+ :body => post_body,
148
+ :auth_names => auth_names,
149
+ :return_type => return_type
150
+ )
151
+
152
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
153
+ if @api_client.config.debugging
154
+ @api_client.config.logger.debug "API called: ResourceTypesApi#list_resource_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
155
+ end
156
+ return data, status_code, headers
157
+ end
158
+ end
159
+ end
@@ -0,0 +1,192 @@
1
+ =begin
2
+ #smplkit Audit API
3
+
4
+ #Append-only change-history substrate for smpl.* resources and customer-application events. ADR-047.
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module SmplkitGeneratedClient::Audit
17
+ class ActionAttributes < ApiModelBase
18
+ # The action slug. Same as the JSON:API ``id``.
19
+ attr_accessor :action
20
+
21
+ # First sighting of this action for the account. When the request includes ``filter[resource_type]``, this is the first sighting of the (action, resource_type) triple rather than the action overall.
22
+ attr_accessor :created_at
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'action' => :'action',
28
+ :'created_at' => :'created_at'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'action' => :'String',
46
+ :'created_at' => :'Time'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::ActionAttributes` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::ActionAttributes`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'action')
73
+ self.action = attributes[:'action']
74
+ else
75
+ self.action = nil
76
+ end
77
+
78
+ if attributes.key?(:'created_at')
79
+ self.created_at = attributes[:'created_at']
80
+ else
81
+ self.created_at = nil
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
+ invalid_properties = Array.new
90
+ if @action.nil?
91
+ invalid_properties.push('invalid value for "action", action cannot be nil.')
92
+ end
93
+
94
+ if @created_at.nil?
95
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ return false if @action.nil?
106
+ return false if @created_at.nil?
107
+ true
108
+ end
109
+
110
+ # Custom attribute writer method with validation
111
+ # @param [Object] action Value to be assigned
112
+ def action=(action)
113
+ if action.nil?
114
+ fail ArgumentError, 'action cannot be nil'
115
+ end
116
+
117
+ @action = action
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] created_at Value to be assigned
122
+ def created_at=(created_at)
123
+ if created_at.nil?
124
+ fail ArgumentError, 'created_at cannot be nil'
125
+ end
126
+
127
+ @created_at = created_at
128
+ end
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param [Object] Object to be compared
132
+ def ==(o)
133
+ return true if self.equal?(o)
134
+ self.class == o.class &&
135
+ action == o.action &&
136
+ created_at == o.created_at
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [action, created_at].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ end
191
+
192
+ end