docspring 4.6.0 → 4.8.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/README.md +25 -1
- data/lib/docspring/api/client.rb +1934 -209
- data/lib/docspring/api_client.rb +1 -1
- data/lib/docspring/models/add_page_numbers_request.rb +279 -0
- data/lib/docspring/models/ask_support_help_request.rb +217 -0
- data/lib/docspring/models/base64_job_source.rb +222 -0
- data/lib/docspring/models/combined_pdf_job_source.rb +222 -0
- data/lib/docspring/models/compress_pdf_request.rb +207 -0
- data/lib/docspring/models/create_template_request.rb +22 -2
- data/lib/docspring/models/custom_file_job_source.rb +222 -0
- data/lib/docspring/models/decrypt_pdf_request.rb +217 -0
- data/lib/docspring/models/encrypt_pdf_request.rb +237 -0
- data/lib/docspring/models/error_code.rb +4 -1
- data/lib/docspring/models/error_info.rb +25 -5
- data/lib/docspring/models/extract_pages_request.rb +234 -0
- data/lib/docspring/models/field.rb +1 -1
- data/lib/docspring/models/field_input.rb +1 -1
- data/lib/docspring/models/flatten_pdf_request.rb +207 -0
- data/lib/docspring/models/html_engine_options.rb +1 -1
- data/lib/docspring/models/html_engine_options_input.rb +1 -1
- data/lib/docspring/models/htmlto_pdf_request.rb +322 -0
- data/lib/docspring/models/image_format.rb +41 -0
- data/lib/docspring/models/images_to_pdf_request.rb +241 -0
- data/lib/docspring/models/job.rb +508 -0
- data/lib/docspring/models/job_file.rb +308 -0
- data/lib/docspring/models/job_file_job_source.rb +232 -0
- data/lib/docspring/models/job_html_engine.rb +41 -0
- data/lib/docspring/models/job_list.rb +200 -0
- data/lib/docspring/models/job_operation.rb +53 -0
- data/lib/docspring/models/job_operation_filter.rb +53 -0
- data/lib/docspring/models/job_options.rb +392 -0
- data/lib/docspring/models/job_page_margin.rb +198 -0
- data/lib/docspring/models/job_page_size.rb +51 -0
- data/lib/docspring/models/job_source.rb +267 -0
- data/lib/docspring/models/job_source_input.rb +66 -0
- data/lib/docspring/models/job_source_type.rb +46 -0
- data/lib/docspring/models/job_state.rb +42 -0
- data/lib/docspring/models/markdown_to_pdf_request.rb +312 -0
- data/lib/docspring/models/open_support_ticket_request.rb +363 -0
- data/lib/docspring/models/page_image.rb +3 -3
- data/lib/docspring/models/page_number_position.rb +45 -0
- data/lib/docspring/models/page_size.rb +45 -0
- data/lib/docspring/models/pdf_permissions.rb +198 -0
- data/lib/docspring/models/pdf_permissions_input.rb +198 -0
- data/lib/docspring/models/pdfto_images_request.rb +269 -0
- data/lib/docspring/models/pdfto_text_request.rb +217 -0
- data/lib/docspring/models/reply_to_support_ticket_request.rb +217 -0
- data/lib/docspring/models/rotate_pages_request.rb +244 -0
- data/lib/docspring/models/send_support_feedback_request.rb +363 -0
- data/lib/docspring/models/split_pdf_request.rb +229 -0
- data/lib/docspring/models/submission_job_source.rb +222 -0
- data/lib/docspring/models/support_feedback.rb +239 -0
- data/lib/docspring/models/support_help.rb +316 -0
- data/lib/docspring/models/support_help_source.rb +212 -0
- data/lib/docspring/models/support_help_state.rb +42 -0
- data/lib/docspring/models/support_help_turn.rb +234 -0
- data/lib/docspring/models/support_help_turn_role.rb +41 -0
- data/lib/docspring/models/support_message.rb +301 -0
- data/lib/docspring/models/support_message_author.rb +42 -0
- data/lib/docspring/models/support_report_agent.rb +188 -0
- data/lib/docspring/models/support_report_category.rb +57 -0
- data/lib/docspring/models/support_report_impact.rb +42 -0
- data/lib/docspring/models/support_report_kind.rb +47 -0
- data/lib/docspring/models/support_report_source.rb +41 -0
- data/lib/docspring/models/support_ticket.rb +637 -0
- data/lib/docspring/models/support_ticket_list.rb +200 -0
- data/lib/docspring/models/support_ticket_list_status.rb +42 -0
- data/lib/docspring/models/support_ticket_notifications.rb +197 -0
- data/lib/docspring/models/support_ticket_reply.rb +210 -0
- data/lib/docspring/models/support_ticket_reply_outcome.rb +41 -0
- data/lib/docspring/models/support_ticket_resolution.rb +45 -0
- data/lib/docspring/models/support_ticket_status.rb +43 -0
- data/lib/docspring/models/support_ticket_watch.rb +239 -0
- data/lib/docspring/models/template.rb +41 -2
- data/lib/docspring/models/template_blank_page.rb +212 -0
- data/lib/docspring/models/template_blank_page_input.rb +212 -0
- data/lib/docspring/models/template_document.rb +1 -1
- data/lib/docspring/models/template_html_engine.rb +41 -0
- data/lib/docspring/models/template_page_images.rb +3 -3
- data/lib/docspring/models/template_page_list.rb +243 -0
- data/lib/docspring/models/template_page_list_input.rb +243 -0
- data/lib/docspring/models/template_page_processing_status.rb +28 -1
- data/lib/docspring/models/update_template_request.rb +33 -2
- data/lib/docspring/models/upload_job_source.rb +222 -0
- data/lib/docspring/models/url_job_source.rb +222 -0
- data/lib/docspring/models/watermark_layer.rb +41 -0
- data/lib/docspring/models/watermark_pdf_request.rb +316 -0
- data/lib/docspring/models/webhook_event_type.rb +4 -1
- data/lib/docspring/request_schemas.json +2424 -46
- data/lib/docspring/version.rb +1 -1
- data/lib/docspring.rb +71 -0
- metadata +72 -1
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#DocSpring API
|
|
3
|
+
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0-DOCSPRING
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DocSpring
|
|
17
|
+
# The PDF, and the pages to rotate.
|
|
18
|
+
class RotatePagesRequest < ApiModelBase
|
|
19
|
+
# The file the job reads. The job shows it as `inputs[0]`.
|
|
20
|
+
attr_accessor :input
|
|
21
|
+
|
|
22
|
+
# Your own data about the job, such as an ID from your app. Up to 50 keys.
|
|
23
|
+
attr_accessor :metadata
|
|
24
|
+
|
|
25
|
+
# Seconds after the job finishes until its files are deleted, up to 10 years (315360000), sooner or later than the account's expiry setting. Defaults to the account's expiry setting for the PDF tools, which keeps them until you delete the job when it's off. A job that fails is kept for at least 48 hours.
|
|
26
|
+
attr_accessor :expires_in
|
|
27
|
+
|
|
28
|
+
# Degrees to rotate each page clockwise (-90 is anticlockwise), added to its current rotation.
|
|
29
|
+
attr_accessor :angle
|
|
30
|
+
|
|
31
|
+
# The pages to use, such as `1-3,5,8-z` (`z` is the last page). Default every page.
|
|
32
|
+
attr_accessor :pages
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'input' => :'input',
|
|
38
|
+
:'metadata' => :'metadata',
|
|
39
|
+
:'expires_in' => :'expires_in',
|
|
40
|
+
:'angle' => :'angle',
|
|
41
|
+
:'pages' => :'pages'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns attribute mapping this model knows about
|
|
46
|
+
def self.acceptable_attribute_map
|
|
47
|
+
attribute_map
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
def self.acceptable_attributes
|
|
52
|
+
acceptable_attribute_map.values
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'input' => :'JobSourceInput',
|
|
59
|
+
:'metadata' => :'Hash<String, Object>',
|
|
60
|
+
:'expires_in' => :'Integer',
|
|
61
|
+
:'angle' => :'Integer',
|
|
62
|
+
:'pages' => :'String'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# List of attributes with nullable: true
|
|
67
|
+
def self.openapi_nullable
|
|
68
|
+
Set.new([
|
|
69
|
+
])
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns attribute type mapping
|
|
73
|
+
def self.acceptable_openapi_types
|
|
74
|
+
openapi_types
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Returns the nullable attributes
|
|
78
|
+
def self.acceptable_openapi_nullable
|
|
79
|
+
openapi_nullable
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Initializes the object
|
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
84
|
+
def initialize(attributes = {})
|
|
85
|
+
if (!attributes.is_a?(Hash))
|
|
86
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::RotatePagesRequest` initialize method"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
90
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
92
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
93
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::RotatePagesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
94
|
+
end
|
|
95
|
+
h[k.to_sym] = v
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'input')
|
|
99
|
+
self.input = attributes[:'input']
|
|
100
|
+
else
|
|
101
|
+
self.input = nil
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'metadata')
|
|
105
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
106
|
+
self.metadata = value
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'expires_in')
|
|
111
|
+
self.expires_in = attributes[:'expires_in']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'angle')
|
|
115
|
+
self.angle = attributes[:'angle']
|
|
116
|
+
else
|
|
117
|
+
self.angle = nil
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'pages')
|
|
121
|
+
self.pages = attributes[:'pages']
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
126
|
+
# @return Array for valid properties with the reasons
|
|
127
|
+
def list_invalid_properties
|
|
128
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
129
|
+
invalid_properties = Array.new
|
|
130
|
+
if @input.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "input", input cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @angle.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "angle", angle cannot be nil.')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
invalid_properties
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Check to see if the all the properties in the model are valid
|
|
142
|
+
# @return true if the model is valid
|
|
143
|
+
def valid?
|
|
144
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
145
|
+
return false if @input.nil?
|
|
146
|
+
return false if @angle.nil?
|
|
147
|
+
true
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Custom attribute writer method with validation
|
|
151
|
+
# @param [Object] input Value to be assigned
|
|
152
|
+
def input=(input)
|
|
153
|
+
if input.nil?
|
|
154
|
+
fail ArgumentError, 'input cannot be nil'
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
@input = input
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Custom attribute writer method with validation
|
|
161
|
+
# @param [Object] angle Value to be assigned
|
|
162
|
+
def angle=(angle)
|
|
163
|
+
if angle.nil?
|
|
164
|
+
fail ArgumentError, 'angle cannot be nil'
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
@angle = angle
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Checks equality by comparing each attribute.
|
|
171
|
+
# @param [Object] Object to be compared
|
|
172
|
+
def ==(o)
|
|
173
|
+
return true if self.equal?(o)
|
|
174
|
+
self.class == o.class &&
|
|
175
|
+
input == o.input &&
|
|
176
|
+
metadata == o.metadata &&
|
|
177
|
+
expires_in == o.expires_in &&
|
|
178
|
+
angle == o.angle &&
|
|
179
|
+
pages == o.pages
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# @see the `==` method
|
|
183
|
+
# @param [Object] Object to be compared
|
|
184
|
+
def eql?(o)
|
|
185
|
+
self == o
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Calculates hash code according to all attributes.
|
|
189
|
+
# @return [Integer] Hash code
|
|
190
|
+
def hash
|
|
191
|
+
[input, metadata, expires_in, angle, pages].hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Builds the object from hash
|
|
195
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
196
|
+
# @return [Object] Returns the model itself
|
|
197
|
+
def self.build_from_hash(attributes)
|
|
198
|
+
return nil unless attributes.is_a?(Hash)
|
|
199
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
200
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
201
|
+
map = acceptable_attribute_map
|
|
202
|
+
transformed_hash = {}
|
|
203
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
204
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
205
|
+
transformed_hash["#{key}"] = nil
|
|
206
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
207
|
+
# check to ensure the input is an array given that the attribute
|
|
208
|
+
# is documented as an array but the input is not
|
|
209
|
+
if attributes[map[key]].is_a?(Array)
|
|
210
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
211
|
+
end
|
|
212
|
+
elsif !attributes[map[key]].nil?
|
|
213
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
217
|
+
# accept any value while the model is built from a response
|
|
218
|
+
allocate.tap do |model|
|
|
219
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
220
|
+
model.send(:initialize, transformed_hash)
|
|
221
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Returns the object in the form of hash
|
|
226
|
+
# @return [Hash] Returns the object in the form of hash
|
|
227
|
+
def to_hash
|
|
228
|
+
hash = {}
|
|
229
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
230
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
231
|
+
value = self.send(attr)
|
|
232
|
+
if value.nil?
|
|
233
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
234
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
hash[param] = _to_hash(value)
|
|
238
|
+
end
|
|
239
|
+
hash
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
end
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#DocSpring API
|
|
3
|
+
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0-DOCSPRING
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DocSpring
|
|
17
|
+
# Something about DocSpring that got in the way while the work still got done. Never include secrets, credentials or your users' data.
|
|
18
|
+
class SendSupportFeedbackRequest < ApiModelBase
|
|
19
|
+
# One line, written like an issue title.
|
|
20
|
+
attr_accessor :title
|
|
21
|
+
|
|
22
|
+
# What kind of problem this is.
|
|
23
|
+
attr_accessor :kind
|
|
24
|
+
|
|
25
|
+
# The part of DocSpring this is about.
|
|
26
|
+
attr_accessor :category
|
|
27
|
+
|
|
28
|
+
# What was tried, what was expected and what happened.
|
|
29
|
+
attr_accessor :description
|
|
30
|
+
|
|
31
|
+
# `blocked`: the task could not be done. `worked_around`: it was done another way. `friction`: it was only slower.
|
|
32
|
+
attr_accessor :impact
|
|
33
|
+
|
|
34
|
+
# What the user asked for, in a short phrase.
|
|
35
|
+
attr_accessor :task
|
|
36
|
+
|
|
37
|
+
# The request IDs of the requests that went wrong: `error.request_id` in an error response, or any response's `X-Request-Id` header.
|
|
38
|
+
attr_accessor :request_ids
|
|
39
|
+
|
|
40
|
+
# The API operation, MCP tool or CLI command involved.
|
|
41
|
+
attr_accessor :tool
|
|
42
|
+
|
|
43
|
+
# The exact error text.
|
|
44
|
+
attr_accessor :error
|
|
45
|
+
|
|
46
|
+
# What would have helped.
|
|
47
|
+
attr_accessor :suggestion
|
|
48
|
+
|
|
49
|
+
# `user`: the user asked for this to be sent. `agent` (the default): an AI agent noticed the problem itself.
|
|
50
|
+
attr_accessor :source
|
|
51
|
+
|
|
52
|
+
# A label the sender chooses for its work, such as a session ID, a branch or a task name. When an account runs several agents at once, each can list only the tickets opened with its own label.
|
|
53
|
+
attr_accessor :session
|
|
54
|
+
|
|
55
|
+
# The AI agent sending this, as it describes itself. Stored as unverified.
|
|
56
|
+
attr_accessor :agent
|
|
57
|
+
|
|
58
|
+
class EnumAttributeValidator
|
|
59
|
+
attr_reader :datatype
|
|
60
|
+
attr_reader :allowable_values
|
|
61
|
+
|
|
62
|
+
def initialize(datatype, allowable_values)
|
|
63
|
+
@allowable_values = allowable_values.map do |value|
|
|
64
|
+
case datatype.to_s
|
|
65
|
+
when /Integer/i
|
|
66
|
+
value.to_i
|
|
67
|
+
when /Float/i
|
|
68
|
+
value.to_f
|
|
69
|
+
else
|
|
70
|
+
value
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def valid?(value)
|
|
76
|
+
!value || allowable_values.include?(value)
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
81
|
+
def self.attribute_map
|
|
82
|
+
{
|
|
83
|
+
:'title' => :'title',
|
|
84
|
+
:'kind' => :'kind',
|
|
85
|
+
:'category' => :'category',
|
|
86
|
+
:'description' => :'description',
|
|
87
|
+
:'impact' => :'impact',
|
|
88
|
+
:'task' => :'task',
|
|
89
|
+
:'request_ids' => :'request_ids',
|
|
90
|
+
:'tool' => :'tool',
|
|
91
|
+
:'error' => :'error',
|
|
92
|
+
:'suggestion' => :'suggestion',
|
|
93
|
+
:'source' => :'source',
|
|
94
|
+
:'session' => :'session',
|
|
95
|
+
:'agent' => :'agent'
|
|
96
|
+
}
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Returns attribute mapping this model knows about
|
|
100
|
+
def self.acceptable_attribute_map
|
|
101
|
+
attribute_map
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Returns all the JSON keys this model knows about
|
|
105
|
+
def self.acceptable_attributes
|
|
106
|
+
acceptable_attribute_map.values
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Attribute type mapping.
|
|
110
|
+
def self.openapi_types
|
|
111
|
+
{
|
|
112
|
+
:'title' => :'String',
|
|
113
|
+
:'kind' => :'SupportReportKind',
|
|
114
|
+
:'category' => :'SupportReportCategory',
|
|
115
|
+
:'description' => :'String',
|
|
116
|
+
:'impact' => :'SupportReportImpact',
|
|
117
|
+
:'task' => :'String',
|
|
118
|
+
:'request_ids' => :'Array<String>',
|
|
119
|
+
:'tool' => :'String',
|
|
120
|
+
:'error' => :'String',
|
|
121
|
+
:'suggestion' => :'String',
|
|
122
|
+
:'source' => :'SupportReportSource',
|
|
123
|
+
:'session' => :'String',
|
|
124
|
+
:'agent' => :'SupportReportAgent'
|
|
125
|
+
}
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# List of attributes with nullable: true
|
|
129
|
+
def self.openapi_nullable
|
|
130
|
+
Set.new([
|
|
131
|
+
])
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Returns attribute type mapping
|
|
135
|
+
def self.acceptable_openapi_types
|
|
136
|
+
openapi_types
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Returns the nullable attributes
|
|
140
|
+
def self.acceptable_openapi_nullable
|
|
141
|
+
openapi_nullable
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Initializes the object
|
|
145
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
146
|
+
def initialize(attributes = {})
|
|
147
|
+
if (!attributes.is_a?(Hash))
|
|
148
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::SendSupportFeedbackRequest` initialize method"
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
152
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
153
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
154
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
155
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::SendSupportFeedbackRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
156
|
+
end
|
|
157
|
+
h[k.to_sym] = v
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'title')
|
|
161
|
+
self.title = attributes[:'title']
|
|
162
|
+
else
|
|
163
|
+
self.title = nil
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'kind')
|
|
167
|
+
self.kind = attributes[:'kind']
|
|
168
|
+
else
|
|
169
|
+
self.kind = nil
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'category')
|
|
173
|
+
self.category = attributes[:'category']
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'description')
|
|
177
|
+
self.description = attributes[:'description']
|
|
178
|
+
else
|
|
179
|
+
self.description = nil
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'impact')
|
|
183
|
+
self.impact = attributes[:'impact']
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'task')
|
|
187
|
+
self.task = attributes[:'task']
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'request_ids')
|
|
191
|
+
if (value = attributes[:'request_ids']).is_a?(Array)
|
|
192
|
+
self.request_ids = value
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if attributes.key?(:'tool')
|
|
197
|
+
self.tool = attributes[:'tool']
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if attributes.key?(:'error')
|
|
201
|
+
self.error = attributes[:'error']
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if attributes.key?(:'suggestion')
|
|
205
|
+
self.suggestion = attributes[:'suggestion']
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if attributes.key?(:'source')
|
|
209
|
+
self.source = attributes[:'source']
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if attributes.key?(:'session')
|
|
213
|
+
self.session = attributes[:'session']
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if attributes.key?(:'agent')
|
|
217
|
+
self.agent = attributes[:'agent']
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
222
|
+
# @return Array for valid properties with the reasons
|
|
223
|
+
def list_invalid_properties
|
|
224
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
225
|
+
invalid_properties = Array.new
|
|
226
|
+
if @title.nil?
|
|
227
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if @kind.nil?
|
|
231
|
+
invalid_properties.push('invalid value for "kind", kind cannot be nil.')
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if @description.nil?
|
|
235
|
+
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
invalid_properties
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Check to see if the all the properties in the model are valid
|
|
242
|
+
# @return true if the model is valid
|
|
243
|
+
def valid?
|
|
244
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
245
|
+
return false if @title.nil?
|
|
246
|
+
return false if @kind.nil?
|
|
247
|
+
return false if @description.nil?
|
|
248
|
+
true
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Custom attribute writer method with validation
|
|
252
|
+
# @param [Object] title Value to be assigned
|
|
253
|
+
def title=(title)
|
|
254
|
+
if title.nil?
|
|
255
|
+
fail ArgumentError, 'title cannot be nil'
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
@title = title
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Custom attribute writer method with validation
|
|
262
|
+
# @param [Object] kind Value to be assigned
|
|
263
|
+
def kind=(kind)
|
|
264
|
+
if kind.nil?
|
|
265
|
+
fail ArgumentError, 'kind cannot be nil'
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
@kind = kind
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Custom attribute writer method with validation
|
|
272
|
+
# @param [Object] description Value to be assigned
|
|
273
|
+
def description=(description)
|
|
274
|
+
if description.nil?
|
|
275
|
+
fail ArgumentError, 'description cannot be nil'
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
@description = description
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Checks equality by comparing each attribute.
|
|
282
|
+
# @param [Object] Object to be compared
|
|
283
|
+
def ==(o)
|
|
284
|
+
return true if self.equal?(o)
|
|
285
|
+
self.class == o.class &&
|
|
286
|
+
title == o.title &&
|
|
287
|
+
kind == o.kind &&
|
|
288
|
+
category == o.category &&
|
|
289
|
+
description == o.description &&
|
|
290
|
+
impact == o.impact &&
|
|
291
|
+
task == o.task &&
|
|
292
|
+
request_ids == o.request_ids &&
|
|
293
|
+
tool == o.tool &&
|
|
294
|
+
error == o.error &&
|
|
295
|
+
suggestion == o.suggestion &&
|
|
296
|
+
source == o.source &&
|
|
297
|
+
session == o.session &&
|
|
298
|
+
agent == o.agent
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# @see the `==` method
|
|
302
|
+
# @param [Object] Object to be compared
|
|
303
|
+
def eql?(o)
|
|
304
|
+
self == o
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# Calculates hash code according to all attributes.
|
|
308
|
+
# @return [Integer] Hash code
|
|
309
|
+
def hash
|
|
310
|
+
[title, kind, category, description, impact, task, request_ids, tool, error, suggestion, source, session, agent].hash
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Builds the object from hash
|
|
314
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
315
|
+
# @return [Object] Returns the model itself
|
|
316
|
+
def self.build_from_hash(attributes)
|
|
317
|
+
return nil unless attributes.is_a?(Hash)
|
|
318
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
319
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
320
|
+
map = acceptable_attribute_map
|
|
321
|
+
transformed_hash = {}
|
|
322
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
323
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
324
|
+
transformed_hash["#{key}"] = nil
|
|
325
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
326
|
+
# check to ensure the input is an array given that the attribute
|
|
327
|
+
# is documented as an array but the input is not
|
|
328
|
+
if attributes[map[key]].is_a?(Array)
|
|
329
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
330
|
+
end
|
|
331
|
+
elsif !attributes[map[key]].nil?
|
|
332
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
336
|
+
# accept any value while the model is built from a response
|
|
337
|
+
allocate.tap do |model|
|
|
338
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
339
|
+
model.send(:initialize, transformed_hash)
|
|
340
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
341
|
+
end
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Returns the object in the form of hash
|
|
345
|
+
# @return [Hash] Returns the object in the form of hash
|
|
346
|
+
def to_hash
|
|
347
|
+
hash = {}
|
|
348
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
349
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
350
|
+
value = self.send(attr)
|
|
351
|
+
if value.nil?
|
|
352
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
353
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
hash[param] = _to_hash(value)
|
|
357
|
+
end
|
|
358
|
+
hash
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
end
|