docusign_maestro 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +35 -0
- data/README.md +230 -0
- data/docusign_maestro.gemspec +48 -0
- data/lib/docusign_maestro/api/workflow_instance_management_api.rb +248 -0
- data/lib/docusign_maestro/api/workflow_management_api.rb +440 -0
- data/lib/docusign_maestro/api/workflow_trigger_api.rb +95 -0
- data/lib/docusign_maestro/client/api_client.rb +600 -0
- data/lib/docusign_maestro/client/api_error.rb +37 -0
- data/lib/docusign_maestro/client/auth/oauth.rb +1061 -0
- data/lib/docusign_maestro/configuration.rb +203 -0
- data/lib/docusign_maestro/models/access_token_response.rb +204 -0
- data/lib/docusign_maestro/models/access_token_token_types.rb +30 -0
- data/lib/docusign_maestro/models/account_id.rb +175 -0
- data/lib/docusign_maestro/models/aow_uuid.rb +174 -0
- data/lib/docusign_maestro/models/aow_uuid_string.rb +174 -0
- data/lib/docusign_maestro/models/cancel_response.rb +197 -0
- data/lib/docusign_maestro/models/create_or_update_workflow_definition_request_body.rb +184 -0
- data/lib/docusign_maestro/models/deploy_request.rb +188 -0
- data/lib/docusign_maestro/models/deploy_response.rb +220 -0
- data/lib/docusign_maestro/models/deploy_status.rb +30 -0
- data/lib/docusign_maestro/models/deployment_status.rb +33 -0
- data/lib/docusign_maestro/models/ds_do_until_step.rb +247 -0
- data/lib/docusign_maestro/models/ds_doc_gen_step.rb +261 -0
- data/lib/docusign_maestro/models/ds_doc_gen_step_input.rb +246 -0
- data/lib/docusign_maestro/models/ds_idv_step.rb +261 -0
- data/lib/docusign_maestro/models/ds_idv_step_input.rb +234 -0
- data/lib/docusign_maestro/models/ds_if_else_step.rb +264 -0
- data/lib/docusign_maestro/models/ds_loop_step.rb +247 -0
- data/lib/docusign_maestro/models/ds_parallel_step.rb +246 -0
- data/lib/docusign_maestro/models/ds_service_step.rb +175 -0
- data/lib/docusign_maestro/models/ds_sign_step.rb +261 -0
- data/lib/docusign_maestro/models/ds_sign_step_input.rb +241 -0
- data/lib/docusign_maestro/models/ds_step_id.rb +175 -0
- data/lib/docusign_maestro/models/ds_transformation_step.rb +279 -0
- data/lib/docusign_maestro/models/ds_web_forms_step.rb +265 -0
- data/lib/docusign_maestro/models/ds_web_forms_step_config.rb +188 -0
- data/lib/docusign_maestro/models/ds_workflow_boolean_expression.rb +219 -0
- data/lib/docusign_maestro/models/ds_workflow_comparison_expression.rb +232 -0
- data/lib/docusign_maestro/models/ds_workflow_comparison_operator_types.rb +39 -0
- data/lib/docusign_maestro/models/ds_workflow_concat_expression.rb +200 -0
- data/lib/docusign_maestro/models/ds_workflow_doc_gen_doc_output_format.rb +29 -0
- data/lib/docusign_maestro/models/ds_workflow_expression_types_boolean_expression.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_expression_types_comparison_expression.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_expression_types_parallel_expression.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_index_of_expression.rb +218 -0
- data/lib/docusign_maestro/models/ds_workflow_lane.rb +205 -0
- data/lib/docusign_maestro/models/ds_workflow_lanes_record.rb +174 -0
- data/lib/docusign_maestro/models/ds_workflow_last_index_of_expression.rb +218 -0
- data/lib/docusign_maestro/models/ds_workflow_logical_operator_types.rb +29 -0
- data/lib/docusign_maestro/models/ds_workflow_parallel_expression.rb +204 -0
- data/lib/docusign_maestro/models/ds_workflow_participant_record.rb +175 -0
- data/lib/docusign_maestro/models/ds_workflow_replace_expression.rb +233 -0
- data/lib/docusign_maestro/models/ds_workflow_step.rb +175 -0
- data/lib/docusign_maestro/models/ds_workflow_step_types_do_until.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_step_types_ds_doc_gen.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_step_types_ds_idv.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_step_types_ds_if_else.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_step_types_ds_sign.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_step_types_ds_transformation.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_step_types_ds_web_forms.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_step_types_loop.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_step_types_parallel.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_substring_expression.rb +228 -0
- data/lib/docusign_maestro/models/ds_workflow_to_lower_expression.rb +203 -0
- data/lib/docusign_maestro/models/ds_workflow_to_upper_expression.rb +203 -0
- data/lib/docusign_maestro/models/ds_workflow_transformation_expression.rb +175 -0
- data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_concat_expression.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_index_of_expression.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_last_index_of_expression.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_replace_expression.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_substring_expression.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_to_lower_expression.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_to_upper_expression.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_trigger.rb +274 -0
- data/lib/docusign_maestro/models/ds_workflow_trigger_types.rb +29 -0
- data/lib/docusign_maestro/models/ds_workflow_variable.rb +175 -0
- data/lib/docusign_maestro/models/ds_workflow_variable_from_participant.rb +217 -0
- data/lib/docusign_maestro/models/ds_workflow_variable_from_step.rb +231 -0
- data/lib/docusign_maestro/models/ds_workflow_variable_from_variable.rb +231 -0
- data/lib/docusign_maestro/models/ds_workflow_variable_record.rb +175 -0
- data/lib/docusign_maestro/models/ds_workflow_variable_source_types_participant.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_variable_source_types_step.rb +28 -0
- data/lib/docusign_maestro/models/ds_workflow_variable_source_types_variable.rb +28 -0
- data/lib/docusign_maestro/models/e_sign_document_from_e_sign_template.rb +231 -0
- data/lib/docusign_maestro/models/e_sign_document_from_previous_step.rb +232 -0
- data/lib/docusign_maestro/models/e_sign_document_types_from_ds_template.rb +28 -0
- data/lib/docusign_maestro/models/e_sign_document_types_from_previous_step.rb +28 -0
- data/lib/docusign_maestro/models/e_sign_documents.rb +175 -0
- data/lib/docusign_maestro/models/e_sign_locale_policy.rb +174 -0
- data/lib/docusign_maestro/models/e_sign_signer.rb +247 -0
- data/lib/docusign_maestro/models/e_sign_tabs.rb +416 -0
- data/lib/docusign_maestro/models/e_sign_tabs_record.rb +251 -0
- data/lib/docusign_maestro/models/error_codes.rb +44 -0
- data/lib/docusign_maestro/models/error_response.rb +193 -0
- data/lib/docusign_maestro/models/event_types.rb +31 -0
- data/lib/docusign_maestro/models/get_configuration_instance_response.rb +201 -0
- data/lib/docusign_maestro/models/get_configuration_instances_response.rb +203 -0
- data/lib/docusign_maestro/models/get_configuration_instances_response_config_instances.rb +192 -0
- data/lib/docusign_maestro/models/http_types.rb +31 -0
- data/lib/docusign_maestro/models/invalid_workflow_response.rb +204 -0
- data/lib/docusign_maestro/models/last_deployed_id.rb +174 -0
- data/lib/docusign_maestro/models/new_or_updated_workflow_definition_response.rb +232 -0
- data/lib/docusign_maestro/models/number_or_variable.rb +175 -0
- data/lib/docusign_maestro/models/participant.rb +231 -0
- data/lib/docusign_maestro/models/participant_keys.rb +30 -0
- data/lib/docusign_maestro/models/progress_instance.rb +205 -0
- data/lib/docusign_maestro/models/record_string_boolean.rb +174 -0
- data/lib/docusign_maestro/models/record_string_or_variable_or_transformation.rb +175 -0
- data/lib/docusign_maestro/models/record_to_never.rb +174 -0
- data/lib/docusign_maestro/models/replication_status.rb +37 -0
- data/lib/docusign_maestro/models/started_by_instance.rb +237 -0
- data/lib/docusign_maestro/models/string_or_variable_or_transformation.rb +175 -0
- data/lib/docusign_maestro/models/success_message_response.rb +184 -0
- data/lib/docusign_maestro/models/template_id.rb +175 -0
- data/lib/docusign_maestro/models/trigger_payload.rb +211 -0
- data/lib/docusign_maestro/models/trigger_workflow_via_post_response.rb +194 -0
- data/lib/docusign_maestro/models/user_id.rb +175 -0
- data/lib/docusign_maestro/models/validation_errors.rb +202 -0
- data/lib/docusign_maestro/models/version_string.rb +174 -0
- data/lib/docusign_maestro/models/workflow_creator_id.rb +175 -0
- data/lib/docusign_maestro/models/workflow_date_time.rb +174 -0
- data/lib/docusign_maestro/models/workflow_definition.rb +315 -0
- data/lib/docusign_maestro/models/workflow_definition_list.rb +197 -0
- data/lib/docusign_maestro/models/workflow_definition_metadata.rb +272 -0
- data/lib/docusign_maestro/models/workflow_definition_with_id.rb +292 -0
- data/lib/docusign_maestro/models/workflow_delete_response.rb +202 -0
- data/lib/docusign_maestro/models/workflow_instance.rb +304 -0
- data/lib/docusign_maestro/models/workflow_instance_id.rb +175 -0
- data/lib/docusign_maestro/models/workflow_instance_map.rb +174 -0
- data/lib/docusign_maestro/models/workflow_instance_state.rb +30 -0
- data/lib/docusign_maestro/models/workflow_instances_list.rb +175 -0
- data/lib/docusign_maestro/models/workflow_metadata_status.rb +33 -0
- data/lib/docusign_maestro/models/workflow_step_error.rb +224 -0
- data/lib/docusign_maestro/models/workflow_step_error_error.rb +194 -0
- data/lib/docusign_maestro/models/workflow_step_history.rb +298 -0
- data/lib/docusign_maestro/models/workflow_step_history_list.rb +175 -0
- data/lib/docusign_maestro/models/workflow_step_history_state.rb +30 -0
- data/lib/docusign_maestro/version.rb +14 -0
- data/lib/docusign_maestro.rb +160 -0
- data/runLinter.sh +1 -0
- metadata +446 -0
@@ -0,0 +1,279 @@
|
|
1
|
+
=begin
|
2
|
+
#Maestro API
|
3
|
+
|
4
|
+
#Maestro authors and executes experiences that allow non-coders the ability to define Simple Business Process without having to write code and to deploy them seamlessly without having to have development expertise
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module DocuSign_Maestro
|
15
|
+
class DSTransformationStep
|
16
|
+
attr_accessor :config
|
17
|
+
|
18
|
+
# Reference of #/definitions/DSWorkflowTransformationExpression. Transformation Expression object. This object should be any of the following object models: [#/definitions/DSWorkflowReplaceExpression, #/definitions/DSWorkflowToLowerExpression, #/definitions/DSWorkflowToUpperExpression, #/components/schemas/DSWorkflowLastIndexOfExpression, #/components/schemas/DSWorkflowIndexOfExpression, #/components/schemas/DSWorkflowSubstringExpression, #/components/schemas/DSWorkflowConcatExpression]
|
19
|
+
attr_accessor :expression
|
20
|
+
|
21
|
+
attr_accessor :id
|
22
|
+
|
23
|
+
# A Record of strings to Strings, Variables, or Transformation Expressions
|
24
|
+
attr_accessor :input
|
25
|
+
|
26
|
+
attr_accessor :name
|
27
|
+
|
28
|
+
# A Record of strings to Strings, Variables, or Transformation Expressions
|
29
|
+
attr_accessor :output
|
30
|
+
|
31
|
+
attr_accessor :type
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'config' => :'config',
|
37
|
+
:'expression' => :'expression',
|
38
|
+
:'id' => :'id',
|
39
|
+
:'input' => :'input',
|
40
|
+
:'name' => :'name',
|
41
|
+
:'output' => :'output',
|
42
|
+
:'type' => :'type'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.swagger_types
|
48
|
+
{
|
49
|
+
:'config' => :'RecordToNever',
|
50
|
+
:'expression' => :'Object',
|
51
|
+
:'id' => :'String',
|
52
|
+
:'input' => :'Hash<String, Object>',
|
53
|
+
:'name' => :'String',
|
54
|
+
:'output' => :'Hash<String, Object>',
|
55
|
+
:'type' => :'DSWorkflowStepTypesDSTransformation'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Initializes the object
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
61
|
+
def initialize(attributes = {})
|
62
|
+
return unless attributes.is_a?(Hash)
|
63
|
+
|
64
|
+
# convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
66
|
+
|
67
|
+
if attributes.has_key?(:'config')
|
68
|
+
self.config = attributes[:'config']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'expression')
|
72
|
+
self.expression = attributes[:'expression']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'id')
|
76
|
+
self.id = attributes[:'id']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.has_key?(:'input')
|
80
|
+
if (value = attributes[:'input']).is_a?(Hash)
|
81
|
+
self.input = value
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'name')
|
86
|
+
self.name = attributes[:'name']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'output')
|
90
|
+
if (value = attributes[:'output']).is_a?(Hash)
|
91
|
+
self.output = value
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.has_key?(:'type')
|
96
|
+
self.type = attributes[:'type']
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
101
|
+
# @return Array for valid properties with the reasons
|
102
|
+
def list_invalid_properties
|
103
|
+
invalid_properties = Array.new
|
104
|
+
if @config.nil?
|
105
|
+
invalid_properties.push('invalid value for "config", config cannot be nil.')
|
106
|
+
end
|
107
|
+
|
108
|
+
if @expression.nil?
|
109
|
+
invalid_properties.push('invalid value for "expression", expression cannot be nil.')
|
110
|
+
end
|
111
|
+
|
112
|
+
if @id.nil?
|
113
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
114
|
+
end
|
115
|
+
|
116
|
+
if @input.nil?
|
117
|
+
invalid_properties.push('invalid value for "input", input cannot be nil.')
|
118
|
+
end
|
119
|
+
|
120
|
+
if @name.nil?
|
121
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
122
|
+
end
|
123
|
+
|
124
|
+
if @output.nil?
|
125
|
+
invalid_properties.push('invalid value for "output", output cannot be nil.')
|
126
|
+
end
|
127
|
+
|
128
|
+
if @type.nil?
|
129
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
130
|
+
end
|
131
|
+
|
132
|
+
invalid_properties
|
133
|
+
end
|
134
|
+
|
135
|
+
# Check to see if the all the properties in the model are valid
|
136
|
+
# @return true if the model is valid
|
137
|
+
def valid?
|
138
|
+
return false if @config.nil?
|
139
|
+
return false if @expression.nil?
|
140
|
+
return false if @id.nil?
|
141
|
+
return false if @input.nil?
|
142
|
+
return false if @name.nil?
|
143
|
+
return false if @output.nil?
|
144
|
+
return false if @type.nil?
|
145
|
+
true
|
146
|
+
end
|
147
|
+
|
148
|
+
# Checks equality by comparing each attribute.
|
149
|
+
# @param [Object] Object to be compared
|
150
|
+
def ==(o)
|
151
|
+
return true if self.equal?(o)
|
152
|
+
self.class == o.class &&
|
153
|
+
config == o.config &&
|
154
|
+
expression == o.expression &&
|
155
|
+
id == o.id &&
|
156
|
+
input == o.input &&
|
157
|
+
name == o.name &&
|
158
|
+
output == o.output &&
|
159
|
+
type == o.type
|
160
|
+
end
|
161
|
+
|
162
|
+
# @see the `==` method
|
163
|
+
# @param [Object] Object to be compared
|
164
|
+
def eql?(o)
|
165
|
+
self == o
|
166
|
+
end
|
167
|
+
|
168
|
+
# Calculates hash code according to all attributes.
|
169
|
+
# @return [Fixnum] Hash code
|
170
|
+
def hash
|
171
|
+
[config, expression, id, input, name, output, type].hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Builds the object from hash
|
175
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
176
|
+
# @return [Object] Returns the model itself
|
177
|
+
def build_from_hash(attributes)
|
178
|
+
return nil unless attributes.is_a?(Hash)
|
179
|
+
self.class.swagger_types.each_pair do |key, type|
|
180
|
+
if type =~ /\AArray<(.*)>/i
|
181
|
+
# check to ensure the input is an array given that the attribute
|
182
|
+
# is documented as an array but the input is not
|
183
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
184
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
185
|
+
end
|
186
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
187
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
188
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
189
|
+
end
|
190
|
+
|
191
|
+
self
|
192
|
+
end
|
193
|
+
|
194
|
+
# Deserializes the data based on type
|
195
|
+
# @param string type Data type
|
196
|
+
# @param string value Value to be deserialized
|
197
|
+
# @return [Object] Deserialized data
|
198
|
+
def _deserialize(type, value)
|
199
|
+
case type.to_sym
|
200
|
+
when :DateTime
|
201
|
+
DateTime.parse(value)
|
202
|
+
when :Date
|
203
|
+
Date.parse(value)
|
204
|
+
when :String
|
205
|
+
value.to_s
|
206
|
+
when :Integer
|
207
|
+
value.to_i
|
208
|
+
when :Float
|
209
|
+
value.to_f
|
210
|
+
when :BOOLEAN
|
211
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
212
|
+
true
|
213
|
+
else
|
214
|
+
false
|
215
|
+
end
|
216
|
+
when :Object
|
217
|
+
# generic object (usually a Hash), return directly
|
218
|
+
value
|
219
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
220
|
+
inner_type = Regexp.last_match[:inner_type]
|
221
|
+
value.map { |v| _deserialize(inner_type, v) }
|
222
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
223
|
+
k_type = Regexp.last_match[:k_type]
|
224
|
+
v_type = Regexp.last_match[:v_type]
|
225
|
+
{}.tap do |hash|
|
226
|
+
value.each do |k, v|
|
227
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
228
|
+
end
|
229
|
+
end
|
230
|
+
else # model
|
231
|
+
temp_model = DocuSign_Maestro.const_get(type).new
|
232
|
+
temp_model.build_from_hash(value)
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
# Returns the string representation of the object
|
237
|
+
# @return [String] String presentation of the object
|
238
|
+
def to_s
|
239
|
+
to_hash.to_s
|
240
|
+
end
|
241
|
+
|
242
|
+
# to_body is an alias to to_hash (backward compatibility)
|
243
|
+
# @return [Hash] Returns the object in the form of hash
|
244
|
+
def to_body
|
245
|
+
to_hash
|
246
|
+
end
|
247
|
+
|
248
|
+
# Returns the object in the form of hash
|
249
|
+
# @return [Hash] Returns the object in the form of hash
|
250
|
+
def to_hash
|
251
|
+
hash = {}
|
252
|
+
self.class.attribute_map.each_pair do |attr, param|
|
253
|
+
value = self.send(attr)
|
254
|
+
next if value.nil?
|
255
|
+
hash[param] = _to_hash(value)
|
256
|
+
end
|
257
|
+
hash
|
258
|
+
end
|
259
|
+
|
260
|
+
# Outputs non-array value in the form of hash
|
261
|
+
# For object, use to_hash. Otherwise, just return the value
|
262
|
+
# @param [Object] value Any valid value
|
263
|
+
# @return [Hash] Returns the value in the form of hash
|
264
|
+
def _to_hash(value)
|
265
|
+
if value.is_a?(Array)
|
266
|
+
value.compact.map { |v| _to_hash(v) }
|
267
|
+
elsif value.is_a?(Hash)
|
268
|
+
{}.tap do |hash|
|
269
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
270
|
+
end
|
271
|
+
elsif value.respond_to? :to_hash
|
272
|
+
value.to_hash
|
273
|
+
else
|
274
|
+
value
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
end
|
279
|
+
end
|
@@ -0,0 +1,265 @@
|
|
1
|
+
=begin
|
2
|
+
#Maestro API
|
3
|
+
|
4
|
+
#Maestro authors and executes experiences that allow non-coders the ability to define Simple Business Process without having to write code and to deploy them seamlessly without having to have development expertise
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module DocuSign_Maestro
|
15
|
+
# A DS Workflow WebForms Step
|
16
|
+
class DSWebFormsStep
|
17
|
+
attr_accessor :config
|
18
|
+
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# A Record of strings to Strings, Variables, or Transformation Expressions
|
22
|
+
attr_accessor :input
|
23
|
+
|
24
|
+
attr_accessor :name
|
25
|
+
|
26
|
+
# A Record of strings to Strings, Variables, or Transformation Expressions
|
27
|
+
attr_accessor :output
|
28
|
+
|
29
|
+
attr_accessor :type
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'config' => :'config',
|
35
|
+
:'id' => :'id',
|
36
|
+
:'input' => :'input',
|
37
|
+
:'name' => :'name',
|
38
|
+
:'output' => :'output',
|
39
|
+
:'type' => :'type'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
def self.swagger_types
|
45
|
+
{
|
46
|
+
:'config' => :'DSWebFormsStepConfig',
|
47
|
+
:'id' => :'String',
|
48
|
+
:'input' => :'Hash<String, Object>',
|
49
|
+
:'name' => :'String',
|
50
|
+
:'output' => :'Hash<String, Object>',
|
51
|
+
:'type' => :'DSWorkflowStepTypesDSWebForms'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
return unless attributes.is_a?(Hash)
|
59
|
+
|
60
|
+
# convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
62
|
+
|
63
|
+
if attributes.has_key?(:'config')
|
64
|
+
self.config = attributes[:'config']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'id')
|
68
|
+
self.id = attributes[:'id']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'input')
|
72
|
+
if (value = attributes[:'input']).is_a?(Hash)
|
73
|
+
self.input = value
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'name')
|
78
|
+
self.name = attributes[:'name']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'output')
|
82
|
+
if (value = attributes[:'output']).is_a?(Hash)
|
83
|
+
self.output = value
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.has_key?(:'type')
|
88
|
+
self.type = attributes[:'type']
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
93
|
+
# @return Array for valid properties with the reasons
|
94
|
+
def list_invalid_properties
|
95
|
+
invalid_properties = Array.new
|
96
|
+
if @config.nil?
|
97
|
+
invalid_properties.push('invalid value for "config", config cannot be nil.')
|
98
|
+
end
|
99
|
+
|
100
|
+
if @id.nil?
|
101
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
102
|
+
end
|
103
|
+
|
104
|
+
if @input.nil?
|
105
|
+
invalid_properties.push('invalid value for "input", input cannot be nil.')
|
106
|
+
end
|
107
|
+
|
108
|
+
if @name.nil?
|
109
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
110
|
+
end
|
111
|
+
|
112
|
+
if @output.nil?
|
113
|
+
invalid_properties.push('invalid value for "output", output cannot be nil.')
|
114
|
+
end
|
115
|
+
|
116
|
+
if @type.nil?
|
117
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
118
|
+
end
|
119
|
+
|
120
|
+
invalid_properties
|
121
|
+
end
|
122
|
+
|
123
|
+
# Check to see if the all the properties in the model are valid
|
124
|
+
# @return true if the model is valid
|
125
|
+
def valid?
|
126
|
+
return false if @config.nil?
|
127
|
+
return false if @id.nil?
|
128
|
+
return false if @input.nil?
|
129
|
+
return false if @name.nil?
|
130
|
+
return false if @output.nil?
|
131
|
+
return false if @type.nil?
|
132
|
+
true
|
133
|
+
end
|
134
|
+
|
135
|
+
# Checks equality by comparing each attribute.
|
136
|
+
# @param [Object] Object to be compared
|
137
|
+
def ==(o)
|
138
|
+
return true if self.equal?(o)
|
139
|
+
self.class == o.class &&
|
140
|
+
config == o.config &&
|
141
|
+
id == o.id &&
|
142
|
+
input == o.input &&
|
143
|
+
name == o.name &&
|
144
|
+
output == o.output &&
|
145
|
+
type == o.type
|
146
|
+
end
|
147
|
+
|
148
|
+
# @see the `==` method
|
149
|
+
# @param [Object] Object to be compared
|
150
|
+
def eql?(o)
|
151
|
+
self == o
|
152
|
+
end
|
153
|
+
|
154
|
+
# Calculates hash code according to all attributes.
|
155
|
+
# @return [Fixnum] Hash code
|
156
|
+
def hash
|
157
|
+
[config, id, input, name, output, type].hash
|
158
|
+
end
|
159
|
+
|
160
|
+
# Builds the object from hash
|
161
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
162
|
+
# @return [Object] Returns the model itself
|
163
|
+
def build_from_hash(attributes)
|
164
|
+
return nil unless attributes.is_a?(Hash)
|
165
|
+
self.class.swagger_types.each_pair do |key, type|
|
166
|
+
if type =~ /\AArray<(.*)>/i
|
167
|
+
# check to ensure the input is an array given that the attribute
|
168
|
+
# is documented as an array but the input is not
|
169
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
170
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
171
|
+
end
|
172
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
173
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
174
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
175
|
+
end
|
176
|
+
|
177
|
+
self
|
178
|
+
end
|
179
|
+
|
180
|
+
# Deserializes the data based on type
|
181
|
+
# @param string type Data type
|
182
|
+
# @param string value Value to be deserialized
|
183
|
+
# @return [Object] Deserialized data
|
184
|
+
def _deserialize(type, value)
|
185
|
+
case type.to_sym
|
186
|
+
when :DateTime
|
187
|
+
DateTime.parse(value)
|
188
|
+
when :Date
|
189
|
+
Date.parse(value)
|
190
|
+
when :String
|
191
|
+
value.to_s
|
192
|
+
when :Integer
|
193
|
+
value.to_i
|
194
|
+
when :Float
|
195
|
+
value.to_f
|
196
|
+
when :BOOLEAN
|
197
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
198
|
+
true
|
199
|
+
else
|
200
|
+
false
|
201
|
+
end
|
202
|
+
when :Object
|
203
|
+
# generic object (usually a Hash), return directly
|
204
|
+
value
|
205
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
206
|
+
inner_type = Regexp.last_match[:inner_type]
|
207
|
+
value.map { |v| _deserialize(inner_type, v) }
|
208
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
209
|
+
k_type = Regexp.last_match[:k_type]
|
210
|
+
v_type = Regexp.last_match[:v_type]
|
211
|
+
{}.tap do |hash|
|
212
|
+
value.each do |k, v|
|
213
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
else # model
|
217
|
+
temp_model = DocuSign_Maestro.const_get(type).new
|
218
|
+
temp_model.build_from_hash(value)
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
# Returns the string representation of the object
|
223
|
+
# @return [String] String presentation of the object
|
224
|
+
def to_s
|
225
|
+
to_hash.to_s
|
226
|
+
end
|
227
|
+
|
228
|
+
# to_body is an alias to to_hash (backward compatibility)
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
230
|
+
def to_body
|
231
|
+
to_hash
|
232
|
+
end
|
233
|
+
|
234
|
+
# Returns the object in the form of hash
|
235
|
+
# @return [Hash] Returns the object in the form of hash
|
236
|
+
def to_hash
|
237
|
+
hash = {}
|
238
|
+
self.class.attribute_map.each_pair do |attr, param|
|
239
|
+
value = self.send(attr)
|
240
|
+
next if value.nil?
|
241
|
+
hash[param] = _to_hash(value)
|
242
|
+
end
|
243
|
+
hash
|
244
|
+
end
|
245
|
+
|
246
|
+
# Outputs non-array value in the form of hash
|
247
|
+
# For object, use to_hash. Otherwise, just return the value
|
248
|
+
# @param [Object] value Any valid value
|
249
|
+
# @return [Hash] Returns the value in the form of hash
|
250
|
+
def _to_hash(value)
|
251
|
+
if value.is_a?(Array)
|
252
|
+
value.compact.map { |v| _to_hash(v) }
|
253
|
+
elsif value.is_a?(Hash)
|
254
|
+
{}.tap do |hash|
|
255
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
256
|
+
end
|
257
|
+
elsif value.respond_to? :to_hash
|
258
|
+
value.to_hash
|
259
|
+
else
|
260
|
+
value
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
end
|
265
|
+
end
|