docusign_maestro 1.0.0.rc1

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