zitadel-client 1.5.0 → 1.6.0

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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/lib/zitadel/client/api/action_service_api.rb +670 -0
  3. data/lib/zitadel/client/api/settings_service_api.rb +125 -0
  4. data/lib/zitadel/client/api/web_key_service_api.rb +273 -0
  5. data/lib/zitadel/client/models/action_service_beta_condition.rb +257 -0
  6. data/lib/zitadel/client/models/action_service_beta_create_target_response.rb +251 -0
  7. data/lib/zitadel/client/models/action_service_beta_delete_target_response.rb +231 -0
  8. data/lib/zitadel/client/models/action_service_beta_event_execution.rb +307 -0
  9. data/lib/zitadel/client/models/action_service_beta_execution.rb +262 -0
  10. data/lib/zitadel/client/models/action_service_beta_execution_target_type.rb +240 -0
  11. data/lib/zitadel/client/models/action_service_beta_function_execution.rb +230 -0
  12. data/lib/zitadel/client/models/action_service_beta_get_target_response.rb +230 -0
  13. data/lib/zitadel/client/models/action_service_beta_in_target_i_ds_filter.rb +233 -0
  14. data/lib/zitadel/client/models/action_service_beta_list_execution_functions_response.rb +232 -0
  15. data/lib/zitadel/client/models/action_service_beta_list_execution_methods_response.rb +232 -0
  16. data/lib/zitadel/client/models/action_service_beta_list_execution_services_response.rb +232 -0
  17. data/lib/zitadel/client/models/action_service_beta_list_executions_response.rb +241 -0
  18. data/lib/zitadel/client/models/action_service_beta_list_targets_response.rb +241 -0
  19. data/lib/zitadel/client/models/action_service_beta_pagination_request.rb +251 -0
  20. data/lib/zitadel/client/models/action_service_beta_pagination_response.rb +241 -0
  21. data/lib/zitadel/client/models/action_service_beta_r_e_s_t_call.rb +231 -0
  22. data/lib/zitadel/client/models/action_service_beta_r_e_s_t_webhook.rb +231 -0
  23. data/lib/zitadel/client/models/action_service_beta_request_execution.rb +307 -0
  24. data/lib/zitadel/client/models/action_service_beta_response_execution.rb +307 -0
  25. data/lib/zitadel/client/models/action_service_beta_set_execution_response.rb +231 -0
  26. data/lib/zitadel/client/models/action_service_beta_target.rb +315 -0
  27. data/lib/zitadel/client/models/action_service_beta_target_field_name.rb +48 -0
  28. data/lib/zitadel/client/models/action_service_beta_target_name_filter.rb +283 -0
  29. data/lib/zitadel/client/models/action_service_beta_target_search_filter.rb +239 -0
  30. data/lib/zitadel/client/models/action_service_beta_text_filter_method.rb +47 -0
  31. data/lib/zitadel/client/models/action_service_beta_update_target_response.rb +241 -0
  32. data/lib/zitadel/client/models/action_service_create_target_request.rb +332 -0
  33. data/lib/zitadel/client/models/action_service_list_targets_request.rb +275 -0
  34. data/lib/zitadel/client/models/action_service_protobuf_any.rb +230 -0
  35. data/lib/zitadel/client/models/action_service_rpc_status.rb +250 -0
  36. data/lib/zitadel/client/models/action_service_set_execution_request.rb +242 -0
  37. data/lib/zitadel/client/models/action_service_update_target_request.rb +342 -0
  38. data/lib/zitadel/client/models/web_key_service_beta_activate_web_key_response.rb +231 -0
  39. data/lib/zitadel/client/models/web_key_service_beta_create_web_key_response.rb +241 -0
  40. data/lib/zitadel/client/models/web_key_service_beta_delete_web_key_response.rb +231 -0
  41. data/lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a.rb +254 -0
  42. data/lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a_curve.rb +43 -0
  43. data/lib/zitadel/client/models/web_key_service_beta_list_web_keys_response.rb +232 -0
  44. data/lib/zitadel/client/models/web_key_service_beta_r_s_a.rb +265 -0
  45. data/lib/zitadel/client/models/web_key_service_beta_r_s_a_bits.rb +43 -0
  46. data/lib/zitadel/client/models/web_key_service_beta_r_s_a_hasher.rb +43 -0
  47. data/lib/zitadel/client/models/web_key_service_beta_state.rb +44 -0
  48. data/lib/zitadel/client/models/web_key_service_beta_web_key.rb +289 -0
  49. data/lib/zitadel/client/models/web_key_service_create_web_key_request.rb +248 -0
  50. data/lib/zitadel/client/models/web_key_service_protobuf_any.rb +230 -0
  51. data/lib/zitadel/client/models/web_key_service_rpc_status.rb +250 -0
  52. data/lib/zitadel/client/version.rb +1 -1
  53. data/lib/zitadel/client/zitadel.rb +9 -5
  54. data/sig/lib.rbs +2 -0
  55. metadata +51 -3
  56. data/lib/zitadel/client/api/settings_api.rb +0 -147
@@ -0,0 +1,231 @@
1
+ =begin
2
+ #Zitadel SDK
3
+
4
+ #The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zitadel::Client::Models
17
+ class ActionServiceBetaSetExecutionResponse
18
+ # The timestamp of the execution set.
19
+ attr_accessor :set_date
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'set_date' => :'setDate'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'set_date' => :'Time'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Models attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ # MODIFIED: Updated class name in error message
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaSetExecutionResponse` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!acceptable_attribute_map.key?(k.to_sym))
63
+ # MODIFIED: Updated class name in error message
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaSetExecutionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'set_date')
70
+ self.set_date = attributes[:'set_date']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ warn '[DEPRECATED] the `valid?` method is obsolete'
86
+ true
87
+ end
88
+
89
+ # Checks equality by comparing each attribute.
90
+ # @param [Object] Object to be compared
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ set_date == o.set_date
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [set_date].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Models attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ attributes = attributes.transform_keys(&:to_sym)
115
+ transformed_hash = {}
116
+ openapi_types.each_pair do |key, type|
117
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = nil
119
+ elsif type =~ /\AArray<(.*)>/i
120
+ # check to ensure the input is an array given that the attribute
121
+ # is documented as an array but the input is not
122
+ if attributes[attribute_map[key]].is_a?(Array)
123
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
124
+ end
125
+ elsif !attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
127
+ end
128
+ end
129
+ new(transformed_hash) # `new` will call the initialize method of the specific model class.
130
+ end
131
+
132
+ # Deserializes the data based on type
133
+ # @param string type Data type
134
+ # @param string value Value to be deserialized
135
+ # @return [Object] Deserialized data
136
+ def self._deserialize(type, value)
137
+ case type.to_sym
138
+ when :Time
139
+ Time.parse(value)
140
+ when :Date
141
+ Date.parse(value)
142
+ when :String
143
+ value.to_s
144
+ when :Integer
145
+ value.to_i
146
+ when :Float
147
+ value.to_f
148
+ when :Boolean
149
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
150
+ true
151
+ else
152
+ false
153
+ end
154
+ when :Object
155
+ # generic object (usually a Hash), return directly
156
+ value
157
+ when /\AArray<(?<inner_type>.+)>\z/
158
+ inner_type = Regexp.last_match[:inner_type]
159
+ value.map { |v| _deserialize(inner_type, v) }
160
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
161
+ k_type = Regexp.last_match[:k_type]
162
+ v_type = Regexp.last_match[:v_type]
163
+ {}.tap do |hash|
164
+ value.each do |k, v|
165
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
166
+ end
167
+ end
168
+ else # model
169
+ # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name
170
+ # MODIFIED: Ensure model is looked up in the Models namespace
171
+ # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails")
172
+ klass = Zitadel::Client::Models.const_get(type)
173
+ # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache)
174
+ # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself)
175
+ if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf)
176
+ klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method
177
+ else
178
+ klass.build_from_hash(value) # For regular models
179
+ end
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {} # Calls super.to_hash if parent exists
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ if value.nil?
202
+ is_nullable = self.class.openapi_nullable.include?(attr)
203
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
204
+ end
205
+
206
+ hash[param] = _to_hash(value)
207
+ end
208
+ hash
209
+ end
210
+
211
+ # Outputs non-array value in the form of hash
212
+ # For object, use to_hash. Otherwise, just return the value
213
+ # @param [Object] value Any valid value
214
+ # @return [Hash] Returns the value in the form of hash
215
+ def _to_hash(value)
216
+ if value.is_a?(Array)
217
+ value.compact.map { |v| _to_hash(v) }
218
+ elsif value.is_a?(Hash)
219
+ {}.tap do |hash|
220
+ value.each { |k, v| hash[k] = _to_hash(v) }
221
+ end
222
+ elsif value.respond_to? :to_hash
223
+ value.to_hash
224
+ else
225
+ value
226
+ end
227
+ end
228
+
229
+ end
230
+
231
+ end
@@ -0,0 +1,315 @@
1
+ =begin
2
+ #Zitadel SDK
3
+
4
+ #The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zitadel::Client::Models
17
+ class ActionServiceBetaTarget
18
+ # The unique identifier of the target.
19
+ attr_accessor :id
20
+
21
+ # The timestamp of the target creation.
22
+ attr_accessor :creation_date
23
+
24
+ # The timestamp of the last change to the target (e.g. creation, activation, deactivation).
25
+ attr_accessor :change_date
26
+
27
+ attr_accessor :name
28
+
29
+ attr_accessor :rest_webhook
30
+
31
+ attr_accessor :rest_call
32
+
33
+ attr_accessor :rest_async
34
+
35
+ # Timeout defines the duration until ZITADEL cancels the execution. If the target doesn't respond before this timeout expires, the the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.
36
+ attr_accessor :timeout
37
+
38
+ attr_accessor :endpoint
39
+
40
+ attr_accessor :signing_key
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ def self.attribute_map
44
+ {
45
+ :'id' => :'id',
46
+ :'creation_date' => :'creationDate',
47
+ :'change_date' => :'changeDate',
48
+ :'name' => :'name',
49
+ :'rest_webhook' => :'restWebhook',
50
+ :'rest_call' => :'restCall',
51
+ :'rest_async' => :'restAsync',
52
+ :'timeout' => :'timeout',
53
+ :'endpoint' => :'endpoint',
54
+ :'signing_key' => :'signingKey'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'id' => :'String',
72
+ :'creation_date' => :'Time',
73
+ :'change_date' => :'Time',
74
+ :'name' => :'String',
75
+ :'rest_webhook' => :'ActionServiceBetaRESTWebhook',
76
+ :'rest_call' => :'ActionServiceBetaRESTCall',
77
+ :'rest_async' => :'Object',
78
+ :'timeout' => :'String',
79
+ :'endpoint' => :'String',
80
+ :'signing_key' => :'String'
81
+ }
82
+ end
83
+
84
+ # List of attributes with nullable: true
85
+ def self.openapi_nullable
86
+ Set.new([
87
+ ])
88
+ end
89
+
90
+ # Initializes the object
91
+ # @param [Hash] attributes Models attributes in the form of hash
92
+ def initialize(attributes = {})
93
+ if (!attributes.is_a?(Hash))
94
+ # MODIFIED: Updated class name in error message
95
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaTarget` initialize method"
96
+ end
97
+
98
+ # check to see if the attribute exists and convert string to symbol for hash key
99
+ acceptable_attribute_map = self.class.acceptable_attribute_map
100
+ attributes = attributes.each_with_object({}) { |(k, v), h|
101
+ if (!acceptable_attribute_map.key?(k.to_sym))
102
+ # MODIFIED: Updated class name in error message
103
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaTarget`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
104
+ end
105
+ h[k.to_sym] = v
106
+ }
107
+
108
+ if attributes.key?(:'id')
109
+ self.id = attributes[:'id']
110
+ end
111
+
112
+ if attributes.key?(:'creation_date')
113
+ self.creation_date = attributes[:'creation_date']
114
+ end
115
+
116
+ if attributes.key?(:'change_date')
117
+ self.change_date = attributes[:'change_date']
118
+ end
119
+
120
+ if attributes.key?(:'name')
121
+ self.name = attributes[:'name']
122
+ end
123
+
124
+ if attributes.key?(:'rest_webhook')
125
+ self.rest_webhook = attributes[:'rest_webhook']
126
+ end
127
+
128
+ if attributes.key?(:'rest_call')
129
+ self.rest_call = attributes[:'rest_call']
130
+ end
131
+
132
+ if attributes.key?(:'rest_async')
133
+ self.rest_async = attributes[:'rest_async']
134
+ end
135
+
136
+ if attributes.key?(:'timeout')
137
+ self.timeout = attributes[:'timeout']
138
+ end
139
+
140
+ if attributes.key?(:'endpoint')
141
+ self.endpoint = attributes[:'endpoint']
142
+ end
143
+
144
+ if attributes.key?(:'signing_key')
145
+ self.signing_key = attributes[:'signing_key']
146
+ end
147
+ end
148
+
149
+ # Show invalid properties with the reasons. Usually used together with valid?
150
+ # @return Array for valid properties with the reasons
151
+ def list_invalid_properties
152
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
153
+ invalid_properties = Array.new
154
+ invalid_properties
155
+ end
156
+
157
+ # Check to see if the all the properties in the model are valid
158
+ # @return true if the model is valid
159
+ def valid?
160
+ warn '[DEPRECATED] the `valid?` method is obsolete'
161
+ true
162
+ end
163
+
164
+ # Checks equality by comparing each attribute.
165
+ # @param [Object] Object to be compared
166
+ def ==(o)
167
+ return true if self.equal?(o)
168
+ self.class == o.class &&
169
+ id == o.id &&
170
+ creation_date == o.creation_date &&
171
+ change_date == o.change_date &&
172
+ name == o.name &&
173
+ rest_webhook == o.rest_webhook &&
174
+ rest_call == o.rest_call &&
175
+ rest_async == o.rest_async &&
176
+ timeout == o.timeout &&
177
+ endpoint == o.endpoint &&
178
+ signing_key == o.signing_key
179
+ end
180
+
181
+ # @see the `==` method
182
+ # @param [Object] Object to be compared
183
+ def eql?(o)
184
+ self == o
185
+ end
186
+
187
+ # Calculates hash code according to all attributes.
188
+ # @return [Integer] Hash code
189
+ def hash
190
+ [id, creation_date, change_date, name, rest_webhook, rest_call, rest_async, timeout, endpoint, signing_key].hash
191
+ end
192
+
193
+ # Builds the object from hash
194
+ # @param [Hash] attributes Models attributes in the form of hash
195
+ # @return [Object] Returns the model itself
196
+ def self.build_from_hash(attributes)
197
+ return nil unless attributes.is_a?(Hash)
198
+ attributes = attributes.transform_keys(&:to_sym)
199
+ transformed_hash = {}
200
+ openapi_types.each_pair do |key, type|
201
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
202
+ transformed_hash["#{key}"] = nil
203
+ elsif type =~ /\AArray<(.*)>/i
204
+ # check to ensure the input is an array given that the attribute
205
+ # is documented as an array but the input is not
206
+ if attributes[attribute_map[key]].is_a?(Array)
207
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
208
+ end
209
+ elsif !attributes[attribute_map[key]].nil?
210
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
211
+ end
212
+ end
213
+ new(transformed_hash) # `new` will call the initialize method of the specific model class.
214
+ end
215
+
216
+ # Deserializes the data based on type
217
+ # @param string type Data type
218
+ # @param string value Value to be deserialized
219
+ # @return [Object] Deserialized data
220
+ def self._deserialize(type, value)
221
+ case type.to_sym
222
+ when :Time
223
+ Time.parse(value)
224
+ when :Date
225
+ Date.parse(value)
226
+ when :String
227
+ value.to_s
228
+ when :Integer
229
+ value.to_i
230
+ when :Float
231
+ value.to_f
232
+ when :Boolean
233
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
234
+ true
235
+ else
236
+ false
237
+ end
238
+ when :Object
239
+ # generic object (usually a Hash), return directly
240
+ value
241
+ when /\AArray<(?<inner_type>.+)>\z/
242
+ inner_type = Regexp.last_match[:inner_type]
243
+ value.map { |v| _deserialize(inner_type, v) }
244
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
245
+ k_type = Regexp.last_match[:k_type]
246
+ v_type = Regexp.last_match[:v_type]
247
+ {}.tap do |hash|
248
+ value.each do |k, v|
249
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
250
+ end
251
+ end
252
+ else # model
253
+ # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name
254
+ # MODIFIED: Ensure model is looked up in the Models namespace
255
+ # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails")
256
+ klass = Zitadel::Client::Models.const_get(type)
257
+ # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache)
258
+ # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself)
259
+ if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf)
260
+ klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method
261
+ else
262
+ klass.build_from_hash(value) # For regular models
263
+ end
264
+ end
265
+ end
266
+
267
+ # Returns the string representation of the object
268
+ # @return [String] String presentation of the object
269
+ def to_s
270
+ to_hash.to_s
271
+ end
272
+
273
+ # to_body is an alias to to_hash (backward compatibility)
274
+ # @return [Hash] Returns the object in the form of hash
275
+ def to_body
276
+ to_hash
277
+ end
278
+
279
+ # Returns the object in the form of hash
280
+ # @return [Hash] Returns the object in the form of hash
281
+ def to_hash
282
+ hash = {} # Calls super.to_hash if parent exists
283
+ self.class.attribute_map.each_pair do |attr, param|
284
+ value = self.send(attr)
285
+ if value.nil?
286
+ is_nullable = self.class.openapi_nullable.include?(attr)
287
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
288
+ end
289
+
290
+ hash[param] = _to_hash(value)
291
+ end
292
+ hash
293
+ end
294
+
295
+ # Outputs non-array value in the form of hash
296
+ # For object, use to_hash. Otherwise, just return the value
297
+ # @param [Object] value Any valid value
298
+ # @return [Hash] Returns the value in the form of hash
299
+ def _to_hash(value)
300
+ if value.is_a?(Array)
301
+ value.compact.map { |v| _to_hash(v) }
302
+ elsif value.is_a?(Hash)
303
+ {}.tap do |hash|
304
+ value.each { |k, v| hash[k] = _to_hash(v) }
305
+ end
306
+ elsif value.respond_to? :to_hash
307
+ value.to_hash
308
+ else
309
+ value
310
+ end
311
+ end
312
+
313
+ end
314
+
315
+ end
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #Zitadel SDK
3
+
4
+ #The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zitadel::Client::Models
17
+ class ActionServiceBetaTargetFieldName
18
+ TARGET_FIELD_NAME_UNSPECIFIED = "TARGET_FIELD_NAME_UNSPECIFIED".freeze
19
+ TARGET_FIELD_NAME_ID = "TARGET_FIELD_NAME_ID".freeze
20
+ TARGET_FIELD_NAME_CREATED_DATE = "TARGET_FIELD_NAME_CREATED_DATE".freeze
21
+ TARGET_FIELD_NAME_CHANGED_DATE = "TARGET_FIELD_NAME_CHANGED_DATE".freeze
22
+ TARGET_FIELD_NAME_NAME = "TARGET_FIELD_NAME_NAME".freeze
23
+ TARGET_FIELD_NAME_TARGET_TYPE = "TARGET_FIELD_NAME_TARGET_TYPE".freeze
24
+ TARGET_FIELD_NAME_URL = "TARGET_FIELD_NAME_URL".freeze
25
+ TARGET_FIELD_NAME_TIMEOUT = "TARGET_FIELD_NAME_TIMEOUT".freeze
26
+ TARGET_FIELD_NAME_INTERRUPT_ON_ERROR = "TARGET_FIELD_NAME_INTERRUPT_ON_ERROR".freeze
27
+
28
+ def self.all_vars
29
+ @all_vars ||= [TARGET_FIELD_NAME_UNSPECIFIED, TARGET_FIELD_NAME_ID, TARGET_FIELD_NAME_CREATED_DATE, TARGET_FIELD_NAME_CHANGED_DATE, TARGET_FIELD_NAME_NAME, TARGET_FIELD_NAME_TARGET_TYPE, TARGET_FIELD_NAME_URL, TARGET_FIELD_NAME_TIMEOUT, TARGET_FIELD_NAME_INTERRUPT_ON_ERROR].freeze
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def self.build_from_hash(value)
36
+ new.build_from_hash(value)
37
+ end
38
+
39
+ # Builds the enum from string
40
+ # @param [String] The enum value in the form of the string
41
+ # @return [String] The enum value
42
+ def build_from_hash(value)
43
+ return value if ActionServiceBetaTargetFieldName.all_vars.include?(value)
44
+ raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::ActionServiceBetaTargetFieldName"
45
+ end
46
+ end
47
+
48
+ end