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,175 @@
|
|
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
|
+
# The DocuSign Admin user Id who has the ability to create workflow definitions.
|
16
|
+
class WorkflowCreatorId
|
17
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
18
|
+
def self.attribute_map
|
19
|
+
{
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
# Attribute type mapping.
|
24
|
+
def self.swagger_types
|
25
|
+
{
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
# Initializes the object
|
30
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
31
|
+
def initialize(attributes = {})
|
32
|
+
return unless attributes.is_a?(Hash)
|
33
|
+
|
34
|
+
# convert string to symbol for hash key
|
35
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
36
|
+
end
|
37
|
+
|
38
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
39
|
+
# @return Array for valid properties with the reasons
|
40
|
+
def list_invalid_properties
|
41
|
+
invalid_properties = Array.new
|
42
|
+
invalid_properties
|
43
|
+
end
|
44
|
+
|
45
|
+
# Check to see if the all the properties in the model are valid
|
46
|
+
# @return true if the model is valid
|
47
|
+
def valid?
|
48
|
+
true
|
49
|
+
end
|
50
|
+
|
51
|
+
# Checks equality by comparing each attribute.
|
52
|
+
# @param [Object] Object to be compared
|
53
|
+
def ==(o)
|
54
|
+
return true if self.equal?(o)
|
55
|
+
self.class == o.class
|
56
|
+
end
|
57
|
+
|
58
|
+
# @see the `==` method
|
59
|
+
# @param [Object] Object to be compared
|
60
|
+
def eql?(o)
|
61
|
+
self == o
|
62
|
+
end
|
63
|
+
|
64
|
+
# Calculates hash code according to all attributes.
|
65
|
+
# @return [Fixnum] Hash code
|
66
|
+
def hash
|
67
|
+
[].hash
|
68
|
+
end
|
69
|
+
|
70
|
+
# Builds the object from hash
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
72
|
+
# @return [Object] Returns the model itself
|
73
|
+
def build_from_hash(attributes)
|
74
|
+
return nil unless attributes.is_a?(Hash)
|
75
|
+
self.class.swagger_types.each_pair do |key, type|
|
76
|
+
if type =~ /\AArray<(.*)>/i
|
77
|
+
# check to ensure the input is an array given that the attribute
|
78
|
+
# is documented as an array but the input is not
|
79
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
80
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
81
|
+
end
|
82
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
83
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
84
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
85
|
+
end
|
86
|
+
|
87
|
+
self
|
88
|
+
end
|
89
|
+
|
90
|
+
# Deserializes the data based on type
|
91
|
+
# @param string type Data type
|
92
|
+
# @param string value Value to be deserialized
|
93
|
+
# @return [Object] Deserialized data
|
94
|
+
def _deserialize(type, value)
|
95
|
+
case type.to_sym
|
96
|
+
when :DateTime
|
97
|
+
DateTime.parse(value)
|
98
|
+
when :Date
|
99
|
+
Date.parse(value)
|
100
|
+
when :String
|
101
|
+
value.to_s
|
102
|
+
when :Integer
|
103
|
+
value.to_i
|
104
|
+
when :Float
|
105
|
+
value.to_f
|
106
|
+
when :BOOLEAN
|
107
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
108
|
+
true
|
109
|
+
else
|
110
|
+
false
|
111
|
+
end
|
112
|
+
when :Object
|
113
|
+
# generic object (usually a Hash), return directly
|
114
|
+
value
|
115
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
116
|
+
inner_type = Regexp.last_match[:inner_type]
|
117
|
+
value.map { |v| _deserialize(inner_type, v) }
|
118
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
119
|
+
k_type = Regexp.last_match[:k_type]
|
120
|
+
v_type = Regexp.last_match[:v_type]
|
121
|
+
{}.tap do |hash|
|
122
|
+
value.each do |k, v|
|
123
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
else # model
|
127
|
+
temp_model = DocuSign_Maestro.const_get(type).new
|
128
|
+
temp_model.build_from_hash(value)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
# Returns the string representation of the object
|
133
|
+
# @return [String] String presentation of the object
|
134
|
+
def to_s
|
135
|
+
to_hash.to_s
|
136
|
+
end
|
137
|
+
|
138
|
+
# to_body is an alias to to_hash (backward compatibility)
|
139
|
+
# @return [Hash] Returns the object in the form of hash
|
140
|
+
def to_body
|
141
|
+
to_hash
|
142
|
+
end
|
143
|
+
|
144
|
+
# Returns the object in the form of hash
|
145
|
+
# @return [Hash] Returns the object in the form of hash
|
146
|
+
def to_hash
|
147
|
+
hash = {}
|
148
|
+
self.class.attribute_map.each_pair do |attr, param|
|
149
|
+
value = self.send(attr)
|
150
|
+
next if value.nil?
|
151
|
+
hash[param] = _to_hash(value)
|
152
|
+
end
|
153
|
+
hash
|
154
|
+
end
|
155
|
+
|
156
|
+
# Outputs non-array value in the form of hash
|
157
|
+
# For object, use to_hash. Otherwise, just return the value
|
158
|
+
# @param [Object] value Any valid value
|
159
|
+
# @return [Hash] Returns the value in the form of hash
|
160
|
+
def _to_hash(value)
|
161
|
+
if value.is_a?(Array)
|
162
|
+
value.compact.map { |v| _to_hash(v) }
|
163
|
+
elsif value.is_a?(Hash)
|
164
|
+
{}.tap do |hash|
|
165
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
166
|
+
end
|
167
|
+
elsif value.respond_to? :to_hash
|
168
|
+
value.to_hash
|
169
|
+
else
|
170
|
+
value
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
end
|
175
|
+
end
|
@@ -0,0 +1,174 @@
|
|
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 WorkflowDateTime
|
16
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
17
|
+
def self.attribute_map
|
18
|
+
{
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
# Attribute type mapping.
|
23
|
+
def self.swagger_types
|
24
|
+
{
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Initializes the object
|
29
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
30
|
+
def initialize(attributes = {})
|
31
|
+
return unless attributes.is_a?(Hash)
|
32
|
+
|
33
|
+
# convert string to symbol for hash key
|
34
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
35
|
+
end
|
36
|
+
|
37
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
38
|
+
# @return Array for valid properties with the reasons
|
39
|
+
def list_invalid_properties
|
40
|
+
invalid_properties = Array.new
|
41
|
+
invalid_properties
|
42
|
+
end
|
43
|
+
|
44
|
+
# Check to see if the all the properties in the model are valid
|
45
|
+
# @return true if the model is valid
|
46
|
+
def valid?
|
47
|
+
true
|
48
|
+
end
|
49
|
+
|
50
|
+
# Checks equality by comparing each attribute.
|
51
|
+
# @param [Object] Object to be compared
|
52
|
+
def ==(o)
|
53
|
+
return true if self.equal?(o)
|
54
|
+
self.class == o.class
|
55
|
+
end
|
56
|
+
|
57
|
+
# @see the `==` method
|
58
|
+
# @param [Object] Object to be compared
|
59
|
+
def eql?(o)
|
60
|
+
self == o
|
61
|
+
end
|
62
|
+
|
63
|
+
# Calculates hash code according to all attributes.
|
64
|
+
# @return [Fixnum] Hash code
|
65
|
+
def hash
|
66
|
+
[].hash
|
67
|
+
end
|
68
|
+
|
69
|
+
# Builds the object from hash
|
70
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
71
|
+
# @return [Object] Returns the model itself
|
72
|
+
def build_from_hash(attributes)
|
73
|
+
return nil unless attributes.is_a?(Hash)
|
74
|
+
self.class.swagger_types.each_pair do |key, type|
|
75
|
+
if type =~ /\AArray<(.*)>/i
|
76
|
+
# check to ensure the input is an array given that the attribute
|
77
|
+
# is documented as an array but the input is not
|
78
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
79
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
80
|
+
end
|
81
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
82
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
83
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
84
|
+
end
|
85
|
+
|
86
|
+
self
|
87
|
+
end
|
88
|
+
|
89
|
+
# Deserializes the data based on type
|
90
|
+
# @param string type Data type
|
91
|
+
# @param string value Value to be deserialized
|
92
|
+
# @return [Object] Deserialized data
|
93
|
+
def _deserialize(type, value)
|
94
|
+
case type.to_sym
|
95
|
+
when :DateTime
|
96
|
+
DateTime.parse(value)
|
97
|
+
when :Date
|
98
|
+
Date.parse(value)
|
99
|
+
when :String
|
100
|
+
value.to_s
|
101
|
+
when :Integer
|
102
|
+
value.to_i
|
103
|
+
when :Float
|
104
|
+
value.to_f
|
105
|
+
when :BOOLEAN
|
106
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
107
|
+
true
|
108
|
+
else
|
109
|
+
false
|
110
|
+
end
|
111
|
+
when :Object
|
112
|
+
# generic object (usually a Hash), return directly
|
113
|
+
value
|
114
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
115
|
+
inner_type = Regexp.last_match[:inner_type]
|
116
|
+
value.map { |v| _deserialize(inner_type, v) }
|
117
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
118
|
+
k_type = Regexp.last_match[:k_type]
|
119
|
+
v_type = Regexp.last_match[:v_type]
|
120
|
+
{}.tap do |hash|
|
121
|
+
value.each do |k, v|
|
122
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
123
|
+
end
|
124
|
+
end
|
125
|
+
else # model
|
126
|
+
temp_model = DocuSign_Maestro.const_get(type).new
|
127
|
+
temp_model.build_from_hash(value)
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# Returns the string representation of the object
|
132
|
+
# @return [String] String presentation of the object
|
133
|
+
def to_s
|
134
|
+
to_hash.to_s
|
135
|
+
end
|
136
|
+
|
137
|
+
# to_body is an alias to to_hash (backward compatibility)
|
138
|
+
# @return [Hash] Returns the object in the form of hash
|
139
|
+
def to_body
|
140
|
+
to_hash
|
141
|
+
end
|
142
|
+
|
143
|
+
# Returns the object in the form of hash
|
144
|
+
# @return [Hash] Returns the object in the form of hash
|
145
|
+
def to_hash
|
146
|
+
hash = {}
|
147
|
+
self.class.attribute_map.each_pair do |attr, param|
|
148
|
+
value = self.send(attr)
|
149
|
+
next if value.nil?
|
150
|
+
hash[param] = _to_hash(value)
|
151
|
+
end
|
152
|
+
hash
|
153
|
+
end
|
154
|
+
|
155
|
+
# Outputs non-array value in the form of hash
|
156
|
+
# For object, use to_hash. Otherwise, just return the value
|
157
|
+
# @param [Object] value Any valid value
|
158
|
+
# @return [Hash] Returns the value in the form of hash
|
159
|
+
def _to_hash(value)
|
160
|
+
if value.is_a?(Array)
|
161
|
+
value.compact.map { |v| _to_hash(v) }
|
162
|
+
elsif value.is_a?(Hash)
|
163
|
+
{}.tap do |hash|
|
164
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
165
|
+
end
|
166
|
+
elsif value.respond_to? :to_hash
|
167
|
+
value.to_hash
|
168
|
+
else
|
169
|
+
value
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
end
|
174
|
+
end
|
@@ -0,0 +1,315 @@
|
|
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 definition.
|
16
|
+
class WorkflowDefinition
|
17
|
+
attr_accessor :account_id
|
18
|
+
|
19
|
+
# The name of the user who created this workflow definition
|
20
|
+
attr_accessor :created_by_name
|
21
|
+
|
22
|
+
attr_accessor :document_version
|
23
|
+
|
24
|
+
# A DS Workflow participant record
|
25
|
+
attr_accessor :participants
|
26
|
+
|
27
|
+
attr_accessor :schema_version
|
28
|
+
|
29
|
+
# 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]
|
30
|
+
attr_accessor :steps
|
31
|
+
|
32
|
+
attr_accessor :trigger
|
33
|
+
|
34
|
+
# A DS Workflow variable record
|
35
|
+
attr_accessor :variables
|
36
|
+
|
37
|
+
attr_accessor :workflow_description
|
38
|
+
|
39
|
+
attr_accessor :workflow_name
|
40
|
+
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
42
|
+
def self.attribute_map
|
43
|
+
{
|
44
|
+
:'account_id' => :'accountId',
|
45
|
+
:'created_by_name' => :'createdByName',
|
46
|
+
:'document_version' => :'documentVersion',
|
47
|
+
:'participants' => :'participants',
|
48
|
+
:'schema_version' => :'schemaVersion',
|
49
|
+
:'steps' => :'steps',
|
50
|
+
:'trigger' => :'trigger',
|
51
|
+
:'variables' => :'variables',
|
52
|
+
:'workflow_description' => :'workflowDescription',
|
53
|
+
:'workflow_name' => :'workflowName'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.swagger_types
|
59
|
+
{
|
60
|
+
:'account_id' => :'String',
|
61
|
+
:'created_by_name' => :'String',
|
62
|
+
:'document_version' => :'String',
|
63
|
+
:'participants' => :'Hash<String, Participant>',
|
64
|
+
:'schema_version' => :'String',
|
65
|
+
:'steps' => :'Array<Object>',
|
66
|
+
:'trigger' => :'DSWorkflowTrigger',
|
67
|
+
:'variables' => :'Hash<String, Object>',
|
68
|
+
:'workflow_description' => :'String',
|
69
|
+
:'workflow_name' => :'String'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# Initializes the object
|
74
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
75
|
+
def initialize(attributes = {})
|
76
|
+
return unless attributes.is_a?(Hash)
|
77
|
+
|
78
|
+
# convert string to symbol for hash key
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
80
|
+
|
81
|
+
if attributes.has_key?(:'accountId')
|
82
|
+
self.account_id = attributes[:'accountId']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'createdByName')
|
86
|
+
self.created_by_name = attributes[:'createdByName']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'documentVersion')
|
90
|
+
self.document_version = attributes[:'documentVersion']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'participants')
|
94
|
+
if (value = attributes[:'participants']).is_a?(Hash)
|
95
|
+
self.participants = value
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.has_key?(:'schemaVersion')
|
100
|
+
self.schema_version = attributes[:'schemaVersion']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.has_key?(:'steps')
|
104
|
+
if (value = attributes[:'steps']).is_a?(Array)
|
105
|
+
self.steps = value
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.has_key?(:'trigger')
|
110
|
+
self.trigger = attributes[:'trigger']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.has_key?(:'variables')
|
114
|
+
if (value = attributes[:'variables']).is_a?(Hash)
|
115
|
+
self.variables = value
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.has_key?(:'workflowDescription')
|
120
|
+
self.workflow_description = attributes[:'workflowDescription']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.has_key?(:'workflowName')
|
124
|
+
self.workflow_name = attributes[:'workflowName']
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
129
|
+
# @return Array for valid properties with the reasons
|
130
|
+
def list_invalid_properties
|
131
|
+
invalid_properties = Array.new
|
132
|
+
if @account_id.nil?
|
133
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
134
|
+
end
|
135
|
+
|
136
|
+
if @document_version.nil?
|
137
|
+
invalid_properties.push('invalid value for "document_version", document_version cannot be nil.')
|
138
|
+
end
|
139
|
+
|
140
|
+
if @schema_version.nil?
|
141
|
+
invalid_properties.push('invalid value for "schema_version", schema_version cannot be nil.')
|
142
|
+
end
|
143
|
+
|
144
|
+
if @steps.nil?
|
145
|
+
invalid_properties.push('invalid value for "steps", steps cannot be nil.')
|
146
|
+
end
|
147
|
+
|
148
|
+
if @trigger.nil?
|
149
|
+
invalid_properties.push('invalid value for "trigger", trigger cannot be nil.')
|
150
|
+
end
|
151
|
+
|
152
|
+
if @variables.nil?
|
153
|
+
invalid_properties.push('invalid value for "variables", variables cannot be nil.')
|
154
|
+
end
|
155
|
+
|
156
|
+
if @workflow_description.nil?
|
157
|
+
invalid_properties.push('invalid value for "workflow_description", workflow_description cannot be nil.')
|
158
|
+
end
|
159
|
+
|
160
|
+
if @workflow_name.nil?
|
161
|
+
invalid_properties.push('invalid value for "workflow_name", workflow_name cannot be nil.')
|
162
|
+
end
|
163
|
+
|
164
|
+
invalid_properties
|
165
|
+
end
|
166
|
+
|
167
|
+
# Check to see if the all the properties in the model are valid
|
168
|
+
# @return true if the model is valid
|
169
|
+
def valid?
|
170
|
+
return false if @account_id.nil?
|
171
|
+
return false if @document_version.nil?
|
172
|
+
return false if @schema_version.nil?
|
173
|
+
return false if @steps.nil?
|
174
|
+
return false if @trigger.nil?
|
175
|
+
return false if @variables.nil?
|
176
|
+
return false if @workflow_description.nil?
|
177
|
+
return false if @workflow_name.nil?
|
178
|
+
true
|
179
|
+
end
|
180
|
+
|
181
|
+
# Checks equality by comparing each attribute.
|
182
|
+
# @param [Object] Object to be compared
|
183
|
+
def ==(o)
|
184
|
+
return true if self.equal?(o)
|
185
|
+
self.class == o.class &&
|
186
|
+
account_id == o.account_id &&
|
187
|
+
created_by_name == o.created_by_name &&
|
188
|
+
document_version == o.document_version &&
|
189
|
+
participants == o.participants &&
|
190
|
+
schema_version == o.schema_version &&
|
191
|
+
steps == o.steps &&
|
192
|
+
trigger == o.trigger &&
|
193
|
+
variables == o.variables &&
|
194
|
+
workflow_description == o.workflow_description &&
|
195
|
+
workflow_name == o.workflow_name
|
196
|
+
end
|
197
|
+
|
198
|
+
# @see the `==` method
|
199
|
+
# @param [Object] Object to be compared
|
200
|
+
def eql?(o)
|
201
|
+
self == o
|
202
|
+
end
|
203
|
+
|
204
|
+
# Calculates hash code according to all attributes.
|
205
|
+
# @return [Fixnum] Hash code
|
206
|
+
def hash
|
207
|
+
[account_id, created_by_name, document_version, participants, schema_version, steps, trigger, variables, workflow_description, workflow_name].hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Builds the object from hash
|
211
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
212
|
+
# @return [Object] Returns the model itself
|
213
|
+
def build_from_hash(attributes)
|
214
|
+
return nil unless attributes.is_a?(Hash)
|
215
|
+
self.class.swagger_types.each_pair do |key, type|
|
216
|
+
if type =~ /\AArray<(.*)>/i
|
217
|
+
# check to ensure the input is an array given that the attribute
|
218
|
+
# is documented as an array but the input is not
|
219
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
220
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
221
|
+
end
|
222
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
223
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
224
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
225
|
+
end
|
226
|
+
|
227
|
+
self
|
228
|
+
end
|
229
|
+
|
230
|
+
# Deserializes the data based on type
|
231
|
+
# @param string type Data type
|
232
|
+
# @param string value Value to be deserialized
|
233
|
+
# @return [Object] Deserialized data
|
234
|
+
def _deserialize(type, value)
|
235
|
+
case type.to_sym
|
236
|
+
when :DateTime
|
237
|
+
DateTime.parse(value)
|
238
|
+
when :Date
|
239
|
+
Date.parse(value)
|
240
|
+
when :String
|
241
|
+
value.to_s
|
242
|
+
when :Integer
|
243
|
+
value.to_i
|
244
|
+
when :Float
|
245
|
+
value.to_f
|
246
|
+
when :BOOLEAN
|
247
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
248
|
+
true
|
249
|
+
else
|
250
|
+
false
|
251
|
+
end
|
252
|
+
when :Object
|
253
|
+
# generic object (usually a Hash), return directly
|
254
|
+
value
|
255
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
256
|
+
inner_type = Regexp.last_match[:inner_type]
|
257
|
+
value.map { |v| _deserialize(inner_type, v) }
|
258
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
259
|
+
k_type = Regexp.last_match[:k_type]
|
260
|
+
v_type = Regexp.last_match[:v_type]
|
261
|
+
{}.tap do |hash|
|
262
|
+
value.each do |k, v|
|
263
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
264
|
+
end
|
265
|
+
end
|
266
|
+
else # model
|
267
|
+
temp_model = DocuSign_Maestro.const_get(type).new
|
268
|
+
temp_model.build_from_hash(value)
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
# Returns the string representation of the object
|
273
|
+
# @return [String] String presentation of the object
|
274
|
+
def to_s
|
275
|
+
to_hash.to_s
|
276
|
+
end
|
277
|
+
|
278
|
+
# to_body is an alias to to_hash (backward compatibility)
|
279
|
+
# @return [Hash] Returns the object in the form of hash
|
280
|
+
def to_body
|
281
|
+
to_hash
|
282
|
+
end
|
283
|
+
|
284
|
+
# Returns the object in the form of hash
|
285
|
+
# @return [Hash] Returns the object in the form of hash
|
286
|
+
def to_hash
|
287
|
+
hash = {}
|
288
|
+
self.class.attribute_map.each_pair do |attr, param|
|
289
|
+
value = self.send(attr)
|
290
|
+
next if value.nil?
|
291
|
+
hash[param] = _to_hash(value)
|
292
|
+
end
|
293
|
+
hash
|
294
|
+
end
|
295
|
+
|
296
|
+
# Outputs non-array value in the form of hash
|
297
|
+
# For object, use to_hash. Otherwise, just return the value
|
298
|
+
# @param [Object] value Any valid value
|
299
|
+
# @return [Hash] Returns the value in the form of hash
|
300
|
+
def _to_hash(value)
|
301
|
+
if value.is_a?(Array)
|
302
|
+
value.compact.map { |v| _to_hash(v) }
|
303
|
+
elsif value.is_a?(Hash)
|
304
|
+
{}.tap do |hash|
|
305
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
306
|
+
end
|
307
|
+
elsif value.respond_to? :to_hash
|
308
|
+
value.to_hash
|
309
|
+
else
|
310
|
+
value
|
311
|
+
end
|
312
|
+
end
|
313
|
+
|
314
|
+
end
|
315
|
+
end
|