aspose_slides_cloud 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +22 -0
- data/README.md +42 -0
- data/aspose_slides_cloud.gemspec +26 -0
- data/lib/aspose_slides_cloud.rb +94 -0
- data/lib/aspose_slides_cloud/api/slides_api.rb +3420 -0
- data/lib/aspose_slides_cloud/api_client.rb +335 -0
- data/lib/aspose_slides_cloud/api_error.rb +24 -0
- data/lib/aspose_slides_cloud/configuration.rb +166 -0
- data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +53 -0
- data/lib/aspose_slides_cloud/models/base_object.rb +86 -0
- data/lib/aspose_slides_cloud/models/base_response.rb +53 -0
- data/lib/aspose_slides_cloud/models/color.rb +29 -0
- data/lib/aspose_slides_cloud/models/color_scheme.rb +153 -0
- data/lib/aspose_slides_cloud/models/color_scheme_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/common_response.rb +53 -0
- data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +39 -0
- data/lib/aspose_slides_cloud/models/document.rb +81 -0
- data/lib/aspose_slides_cloud/models/document_properties.rb +67 -0
- data/lib/aspose_slides_cloud/models/document_properties_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/document_property.rb +81 -0
- data/lib/aspose_slides_cloud/models/document_property_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/document_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/fill_format.rb +37 -0
- data/lib/aspose_slides_cloud/models/font_scheme.rb +81 -0
- data/lib/aspose_slides_cloud/models/font_scheme_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/font_set.rb +53 -0
- data/lib/aspose_slides_cloud/models/format_scheme.rb +97 -0
- data/lib/aspose_slides_cloud/models/format_scheme_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/html_export_options.rb +53 -0
- data/lib/aspose_slides_cloud/models/image.rb +73 -0
- data/lib/aspose_slides_cloud/models/images.rb +67 -0
- data/lib/aspose_slides_cloud/models/images_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/line_format.rb +117 -0
- data/lib/aspose_slides_cloud/models/new_shape_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +39 -0
- data/lib/aspose_slides_cloud/models/paragraph.rb +67 -0
- data/lib/aspose_slides_cloud/models/paragraph_portion_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/paragraphs.rb +67 -0
- data/lib/aspose_slides_cloud/models/pdf_export_options.rb +101 -0
- data/lib/aspose_slides_cloud/models/placeholder.rb +97 -0
- data/lib/aspose_slides_cloud/models/placeholder_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/placeholders.rb +67 -0
- data/lib/aspose_slides_cloud/models/placeholders_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/portion.rb +81 -0
- data/lib/aspose_slides_cloud/models/presentation_string_replace_response.rb +69 -0
- data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +47 -0
- data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +39 -0
- data/lib/aspose_slides_cloud/models/resource_uri.rb +61 -0
- data/lib/aspose_slides_cloud/models/resource_uri_element.rb +37 -0
- data/lib/aspose_slides_cloud/models/shape.rb +169 -0
- data/lib/aspose_slides_cloud/models/shape_list.rb +67 -0
- data/lib/aspose_slides_cloud/models/shape_paragraph_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/shape_paragraphs_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/shape_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/slide.rb +121 -0
- data/lib/aspose_slides_cloud/models/slide_background.rb +73 -0
- data/lib/aspose_slides_cloud/models/slide_background_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/slide_comment.rb +53 -0
- data/lib/aspose_slides_cloud/models/slide_comments.rb +67 -0
- data/lib/aspose_slides_cloud/models/slide_comments_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/slide_list_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/slide_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/slide_string_replace_response.rb +69 -0
- data/lib/aspose_slides_cloud/models/slides.rb +67 -0
- data/lib/aspose_slides_cloud/models/split_document_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/split_document_result.rb +67 -0
- data/lib/aspose_slides_cloud/models/text_item.rb +45 -0
- data/lib/aspose_slides_cloud/models/text_items.rb +67 -0
- data/lib/aspose_slides_cloud/models/text_items_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/theme.rb +89 -0
- data/lib/aspose_slides_cloud/models/theme_response.rb +61 -0
- data/lib/aspose_slides_cloud/models/tiff_export_options.rb +77 -0
- data/lib/aspose_slides_cloud/version.rb +3 -0
- data/test/data/ReadMe.html +48 -0
- data/test/data/Test.html +6 -0
- data/test/data/demo.pptx +0 -0
- data/test/data/sample-input.pptx +0 -0
- data/test/data/sample.pptx +0 -0
- data/test/data/welcome.pptx +0 -0
- data/test/slides_tests.rb +570 -0
- metadata +200 -0
@@ -0,0 +1,53 @@
|
|
1
|
+
module AsposeSlidesCloud
|
2
|
+
#
|
3
|
+
class ArrowHeadProperties < BaseObject
|
4
|
+
attr_accessor :length, :style, :width
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'length' => :'Length',
|
11
|
+
|
12
|
+
#
|
13
|
+
:'style' => :'Style',
|
14
|
+
|
15
|
+
#
|
16
|
+
:'width' => :'Width'
|
17
|
+
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# attribute type
|
22
|
+
def self.swagger_types
|
23
|
+
{
|
24
|
+
:'length' => :'String',
|
25
|
+
:'style' => :'String',
|
26
|
+
:'width' => :'String'
|
27
|
+
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
def initialize(attributes = {})
|
32
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
33
|
+
|
34
|
+
# convert string to symbol for hash key
|
35
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
36
|
+
|
37
|
+
|
38
|
+
if attributes[:'Length']
|
39
|
+
self.length = attributes[:'Length']
|
40
|
+
end
|
41
|
+
|
42
|
+
if attributes[:'Style']
|
43
|
+
self.style = attributes[:'Style']
|
44
|
+
end
|
45
|
+
|
46
|
+
if attributes[:'Width']
|
47
|
+
self.width = attributes[:'Width']
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module AsposeSlidesCloud
|
4
|
+
# base class containing fundamental method such as to_hash, build_from_hash and more
|
5
|
+
class BaseObject
|
6
|
+
|
7
|
+
# build the object from hash
|
8
|
+
def build_from_hash(attributes)
|
9
|
+
return nil unless attributes.is_a?(Hash)
|
10
|
+
self.class.swagger_types.each_pair do |key, type|
|
11
|
+
if type =~ /^Array<(.*)>/i
|
12
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
13
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
14
|
+
else
|
15
|
+
#TODO show warning in debug mode
|
16
|
+
end
|
17
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
18
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
19
|
+
else
|
20
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
self
|
25
|
+
end
|
26
|
+
|
27
|
+
def _deserialize(type, value)
|
28
|
+
case type.to_sym
|
29
|
+
when :DateTime
|
30
|
+
DateTime.parse(value)
|
31
|
+
when :Date
|
32
|
+
Date.parse(value)
|
33
|
+
when :String
|
34
|
+
value.to_s
|
35
|
+
when :Integer
|
36
|
+
value.to_i
|
37
|
+
when :Float
|
38
|
+
value.to_f
|
39
|
+
when :BOOLEAN
|
40
|
+
if value =~ /^(true|t|yes|y|1)$/i
|
41
|
+
true
|
42
|
+
else
|
43
|
+
false
|
44
|
+
end
|
45
|
+
else # model
|
46
|
+
_model = AsposeSlidesCloud.const_get(type).new
|
47
|
+
_model.build_from_hash(value)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def to_s
|
52
|
+
to_hash.to_s
|
53
|
+
end
|
54
|
+
|
55
|
+
# to_body is an alias to to_body (backward compatibility))
|
56
|
+
def to_body
|
57
|
+
to_hash
|
58
|
+
end
|
59
|
+
|
60
|
+
# return the object in the form of hash
|
61
|
+
def to_hash
|
62
|
+
hash = {}
|
63
|
+
self.class.attribute_map.each_pair do |attr, param|
|
64
|
+
value = self.send(attr)
|
65
|
+
next if value.nil?
|
66
|
+
if value.is_a?(Array)
|
67
|
+
hash[param] = value.compact.map{ |v| _to_hash(v) }
|
68
|
+
else
|
69
|
+
hash[param] = _to_hash(value)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
hash
|
73
|
+
end
|
74
|
+
|
75
|
+
# Method to output non-array value in the form of hash
|
76
|
+
# For object, use to_hash. Otherwise, just return the value
|
77
|
+
def _to_hash(value)
|
78
|
+
if value.respond_to? :to_hash
|
79
|
+
value.to_hash
|
80
|
+
else
|
81
|
+
value
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module AsposeSlidesCloud
|
2
|
+
#
|
3
|
+
class BaseResponse < BaseObject
|
4
|
+
attr_accessor :status, :code
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'status' => :'Status',
|
11
|
+
|
12
|
+
#
|
13
|
+
:'code' => :'Code'
|
14
|
+
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
# attribute type
|
19
|
+
def self.swagger_types
|
20
|
+
{
|
21
|
+
:'status' => :'String',
|
22
|
+
:'code' => :'String'
|
23
|
+
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def initialize(attributes = {})
|
28
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
29
|
+
|
30
|
+
# convert string to symbol for hash key
|
31
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
32
|
+
|
33
|
+
|
34
|
+
if attributes[:'Status']
|
35
|
+
self.status = attributes[:'Status']
|
36
|
+
end
|
37
|
+
|
38
|
+
if attributes[:'Code']
|
39
|
+
self.code = attributes[:'Code']
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
def status=(status)
|
45
|
+
allowed_values = ["Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", "TemporaryRedirect", "RedirectKeepVerb", "BadRequest", "Unauthorized", "PaymentRequired", "Forbidden", "NotFound", "MethodNotAllowed", "NotAcceptable", "ProxyAuthenticationRequired", "RequestTimeout", "Conflict", "Gone", "LengthRequired", "PreconditionFailed", "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", "HttpVersionNotSupported"]
|
46
|
+
if status && !allowed_values.include?(status)
|
47
|
+
fail "invalid value for 'status', must be one of #{allowed_values}"
|
48
|
+
end
|
49
|
+
@status = status
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module AsposeSlidesCloud
|
2
|
+
#
|
3
|
+
class Color < BaseObject
|
4
|
+
attr_accessor
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
# attribute type
|
13
|
+
def self.swagger_types
|
14
|
+
{
|
15
|
+
|
16
|
+
}
|
17
|
+
end
|
18
|
+
|
19
|
+
def initialize(attributes = {})
|
20
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
21
|
+
|
22
|
+
# convert string to symbol for hash key
|
23
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
24
|
+
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,153 @@
|
|
1
|
+
module AsposeSlidesCloud
|
2
|
+
#
|
3
|
+
class ColorScheme < BaseObject
|
4
|
+
attr_accessor :accent1, :accent2, :accent3, :accent4, :accent5, :accent6, :dark1, :dark2, :followed_hyperlink, :hyperlink, :light1, :light2, :self_uri, :alternate_links, :links
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'accent1' => :'Accent1',
|
11
|
+
|
12
|
+
#
|
13
|
+
:'accent2' => :'Accent2',
|
14
|
+
|
15
|
+
#
|
16
|
+
:'accent3' => :'Accent3',
|
17
|
+
|
18
|
+
#
|
19
|
+
:'accent4' => :'Accent4',
|
20
|
+
|
21
|
+
#
|
22
|
+
:'accent5' => :'Accent5',
|
23
|
+
|
24
|
+
#
|
25
|
+
:'accent6' => :'Accent6',
|
26
|
+
|
27
|
+
#
|
28
|
+
:'dark1' => :'Dark1',
|
29
|
+
|
30
|
+
#
|
31
|
+
:'dark2' => :'Dark2',
|
32
|
+
|
33
|
+
#
|
34
|
+
:'followed_hyperlink' => :'FollowedHyperlink',
|
35
|
+
|
36
|
+
#
|
37
|
+
:'hyperlink' => :'Hyperlink',
|
38
|
+
|
39
|
+
#
|
40
|
+
:'light1' => :'Light1',
|
41
|
+
|
42
|
+
#
|
43
|
+
:'light2' => :'Light2',
|
44
|
+
|
45
|
+
#
|
46
|
+
:'self_uri' => :'SelfUri',
|
47
|
+
|
48
|
+
#
|
49
|
+
:'alternate_links' => :'AlternateLinks',
|
50
|
+
|
51
|
+
#
|
52
|
+
:'links' => :'Links'
|
53
|
+
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# attribute type
|
58
|
+
def self.swagger_types
|
59
|
+
{
|
60
|
+
:'accent1' => :'String',
|
61
|
+
:'accent2' => :'String',
|
62
|
+
:'accent3' => :'String',
|
63
|
+
:'accent4' => :'String',
|
64
|
+
:'accent5' => :'String',
|
65
|
+
:'accent6' => :'String',
|
66
|
+
:'dark1' => :'String',
|
67
|
+
:'dark2' => :'String',
|
68
|
+
:'followed_hyperlink' => :'String',
|
69
|
+
:'hyperlink' => :'String',
|
70
|
+
:'light1' => :'String',
|
71
|
+
:'light2' => :'String',
|
72
|
+
:'self_uri' => :'ResourceUri',
|
73
|
+
:'alternate_links' => :'Array<ResourceUri>',
|
74
|
+
:'links' => :'Array<ResourceUri>'
|
75
|
+
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
def initialize(attributes = {})
|
80
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
81
|
+
|
82
|
+
# convert string to symbol for hash key
|
83
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
84
|
+
|
85
|
+
|
86
|
+
if attributes[:'Accent1']
|
87
|
+
self.accent1 = attributes[:'Accent1']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes[:'Accent2']
|
91
|
+
self.accent2 = attributes[:'Accent2']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes[:'Accent3']
|
95
|
+
self.accent3 = attributes[:'Accent3']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes[:'Accent4']
|
99
|
+
self.accent4 = attributes[:'Accent4']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes[:'Accent5']
|
103
|
+
self.accent5 = attributes[:'Accent5']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes[:'Accent6']
|
107
|
+
self.accent6 = attributes[:'Accent6']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes[:'Dark1']
|
111
|
+
self.dark1 = attributes[:'Dark1']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes[:'Dark2']
|
115
|
+
self.dark2 = attributes[:'Dark2']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes[:'FollowedHyperlink']
|
119
|
+
self.followed_hyperlink = attributes[:'FollowedHyperlink']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes[:'Hyperlink']
|
123
|
+
self.hyperlink = attributes[:'Hyperlink']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes[:'Light1']
|
127
|
+
self.light1 = attributes[:'Light1']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes[:'Light2']
|
131
|
+
self.light2 = attributes[:'Light2']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes[:'SelfUri']
|
135
|
+
self.self_uri = attributes[:'SelfUri']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes[:'AlternateLinks']
|
139
|
+
if (value = attributes[:'AlternateLinks']).is_a?(Array)
|
140
|
+
self.alternate_links = value
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes[:'Links']
|
145
|
+
if (value = attributes[:'Links']).is_a?(Array)
|
146
|
+
self.links = value
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
end
|
151
|
+
|
152
|
+
end
|
153
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module AsposeSlidesCloud
|
2
|
+
#
|
3
|
+
class ColorSchemeResponse < BaseObject
|
4
|
+
attr_accessor :color_scheme, :status, :code
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'color_scheme' => :'ColorScheme',
|
11
|
+
|
12
|
+
#
|
13
|
+
:'status' => :'Status',
|
14
|
+
|
15
|
+
#
|
16
|
+
:'code' => :'Code'
|
17
|
+
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# attribute type
|
22
|
+
def self.swagger_types
|
23
|
+
{
|
24
|
+
:'color_scheme' => :'ColorScheme',
|
25
|
+
:'status' => :'String',
|
26
|
+
:'code' => :'String'
|
27
|
+
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
def initialize(attributes = {})
|
32
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
33
|
+
|
34
|
+
# convert string to symbol for hash key
|
35
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
36
|
+
|
37
|
+
|
38
|
+
if attributes[:'ColorScheme']
|
39
|
+
self.color_scheme = attributes[:'ColorScheme']
|
40
|
+
end
|
41
|
+
|
42
|
+
if attributes[:'Status']
|
43
|
+
self.status = attributes[:'Status']
|
44
|
+
end
|
45
|
+
|
46
|
+
if attributes[:'Code']
|
47
|
+
self.code = attributes[:'Code']
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
def status=(status)
|
53
|
+
allowed_values = ["Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", "TemporaryRedirect", "RedirectKeepVerb", "BadRequest", "Unauthorized", "PaymentRequired", "Forbidden", "NotFound", "MethodNotAllowed", "NotAcceptable", "ProxyAuthenticationRequired", "RequestTimeout", "Conflict", "Gone", "LengthRequired", "PreconditionFailed", "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", "HttpVersionNotSupported"]
|
54
|
+
if status && !allowed_values.include?(status)
|
55
|
+
fail "invalid value for 'status', must be one of #{allowed_values}"
|
56
|
+
end
|
57
|
+
@status = status
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module AsposeSlidesCloud
|
2
|
+
#
|
3
|
+
class CommonResponse < BaseObject
|
4
|
+
attr_accessor :status, :code
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'status' => :'Status',
|
11
|
+
|
12
|
+
#
|
13
|
+
:'code' => :'Code'
|
14
|
+
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
# attribute type
|
19
|
+
def self.swagger_types
|
20
|
+
{
|
21
|
+
:'status' => :'String',
|
22
|
+
:'code' => :'String'
|
23
|
+
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def initialize(attributes = {})
|
28
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
29
|
+
|
30
|
+
# convert string to symbol for hash key
|
31
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
32
|
+
|
33
|
+
|
34
|
+
if attributes[:'Status']
|
35
|
+
self.status = attributes[:'Status']
|
36
|
+
end
|
37
|
+
|
38
|
+
if attributes[:'Code']
|
39
|
+
self.code = attributes[:'Code']
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
def status=(status)
|
45
|
+
allowed_values = ["Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", "TemporaryRedirect", "RedirectKeepVerb", "BadRequest", "Unauthorized", "PaymentRequired", "Forbidden", "NotFound", "MethodNotAllowed", "NotAcceptable", "ProxyAuthenticationRequired", "RequestTimeout", "Conflict", "Gone", "LengthRequired", "PreconditionFailed", "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", "HttpVersionNotSupported"]
|
46
|
+
if status && !allowed_values.include?(status)
|
47
|
+
fail "invalid value for 'status', must be one of #{allowed_values}"
|
48
|
+
end
|
49
|
+
@status = status
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|