late-sdk 0.0.103 → 0.0.104

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.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -52
  3. data/lib/late-sdk/version.rb +1 -1
  4. data/lib/late-sdk.rb +0 -41
  5. data/openapi.yaml +1 -731
  6. data/zernio-sdk-0.0.104.gem +0 -0
  7. metadata +2 -166
  8. data/docs/CaptionResponse.md +0 -18
  9. data/docs/CheckInstagramHashtags200Response.md +0 -22
  10. data/docs/CheckInstagramHashtags200ResponseResultsInner.md +0 -24
  11. data/docs/CheckInstagramHashtags200ResponseSummary.md +0 -22
  12. data/docs/CheckInstagramHashtagsRequest.md +0 -18
  13. data/docs/DownloadBlueskyMedia200Response.md +0 -26
  14. data/docs/DownloadFacebookVideo200Response.md +0 -24
  15. data/docs/DownloadFormat.md +0 -26
  16. data/docs/DownloadInstagramMedia200Response.md +0 -22
  17. data/docs/DownloadResponse.md +0 -26
  18. data/docs/DownloadTikTokVideo200Response.md +0 -24
  19. data/docs/DownloadTikTokVideo200ResponseFormatsInner.md +0 -22
  20. data/docs/DownloadYouTubeVideo200Response.md +0 -24
  21. data/docs/DownloadYouTubeVideo200ResponseFormatsInner.md +0 -28
  22. data/docs/GetYouTubeTranscript200Response.md +0 -26
  23. data/docs/GetYouTubeTranscript200ResponseSegmentsInner.md +0 -22
  24. data/docs/HashtagCheckResponse.md +0 -18
  25. data/docs/HashtagInfo.md +0 -22
  26. data/docs/ToolsApi.md +0 -663
  27. data/docs/TranscriptResponse.md +0 -22
  28. data/docs/TranscriptSegment.md +0 -22
  29. data/docs/ValidateApi.md +0 -287
  30. data/docs/ValidateMedia200Response.md +0 -32
  31. data/docs/ValidateMedia200ResponsePlatformLimitsValue.md +0 -22
  32. data/docs/ValidateMediaRequest.md +0 -18
  33. data/docs/ValidatePost200Response.md +0 -49
  34. data/docs/ValidatePost200ResponseOneOf.md +0 -22
  35. data/docs/ValidatePost200ResponseOneOf1.md +0 -22
  36. data/docs/ValidatePost200ResponseOneOf1ErrorsInner.md +0 -20
  37. data/docs/ValidatePost200ResponseOneOfWarningsInner.md +0 -20
  38. data/docs/ValidatePostLength200Response.md +0 -20
  39. data/docs/ValidatePostLength200ResponsePlatformsValue.md +0 -22
  40. data/docs/ValidatePostLengthRequest.md +0 -18
  41. data/docs/ValidatePostRequest.md +0 -22
  42. data/docs/ValidatePostRequestMediaItemsInner.md +0 -20
  43. data/docs/ValidatePostRequestPlatformsInner.md +0 -24
  44. data/docs/ValidatePostRequestPlatformsInnerCustomMediaInner.md +0 -20
  45. data/docs/ValidateSubreddit200Response.md +0 -49
  46. data/docs/ValidateSubreddit200ResponseOneOf.md +0 -20
  47. data/docs/ValidateSubreddit200ResponseOneOf1.md +0 -20
  48. data/docs/ValidateSubreddit200ResponseOneOfSubreddit.md +0 -32
  49. data/lib/late-sdk/api/tools_api.rb +0 -649
  50. data/lib/late-sdk/api/validate_api.rb +0 -290
  51. data/lib/late-sdk/models/caption_response.rb +0 -147
  52. data/lib/late-sdk/models/check_instagram_hashtags200_response.rb +0 -167
  53. data/lib/late-sdk/models/check_instagram_hashtags200_response_results_inner.rb +0 -208
  54. data/lib/late-sdk/models/check_instagram_hashtags200_response_summary.rb +0 -165
  55. data/lib/late-sdk/models/check_instagram_hashtags_request.rb +0 -175
  56. data/lib/late-sdk/models/download_bluesky_media200_response.rb +0 -183
  57. data/lib/late-sdk/models/download_facebook_video200_response.rb +0 -174
  58. data/lib/late-sdk/models/download_format.rb +0 -183
  59. data/lib/late-sdk/models/download_instagram_media200_response.rb +0 -165
  60. data/lib/late-sdk/models/download_response.rb +0 -185
  61. data/lib/late-sdk/models/download_tik_tok_video200_response.rb +0 -176
  62. data/lib/late-sdk/models/download_tik_tok_video200_response_formats_inner.rb +0 -165
  63. data/lib/late-sdk/models/download_you_tube_video200_response.rb +0 -176
  64. data/lib/late-sdk/models/download_you_tube_video200_response_formats_inner.rb +0 -192
  65. data/lib/late-sdk/models/get_you_tube_transcript200_response.rb +0 -185
  66. data/lib/late-sdk/models/get_you_tube_transcript200_response_segments_inner.rb +0 -165
  67. data/lib/late-sdk/models/hashtag_check_response.rb +0 -149
  68. data/lib/late-sdk/models/hashtag_info.rb +0 -199
  69. data/lib/late-sdk/models/transcript_response.rb +0 -167
  70. data/lib/late-sdk/models/transcript_segment.rb +0 -165
  71. data/lib/late-sdk/models/validate_media200_response.rb +0 -249
  72. data/lib/late-sdk/models/validate_media200_response_platform_limits_value.rb +0 -166
  73. data/lib/late-sdk/models/validate_media_request.rb +0 -165
  74. data/lib/late-sdk/models/validate_post200_response.rb +0 -104
  75. data/lib/late-sdk/models/validate_post200_response_one_of.rb +0 -168
  76. data/lib/late-sdk/models/validate_post200_response_one_of1.rb +0 -170
  77. data/lib/late-sdk/models/validate_post200_response_one_of1_errors_inner.rb +0 -156
  78. data/lib/late-sdk/models/validate_post200_response_one_of_warnings_inner.rb +0 -156
  79. data/lib/late-sdk/models/validate_post_length200_response.rb +0 -158
  80. data/lib/late-sdk/models/validate_post_length200_response_platforms_value.rb +0 -168
  81. data/lib/late-sdk/models/validate_post_length_request.rb +0 -165
  82. data/lib/late-sdk/models/validate_post_request.rb +0 -189
  83. data/lib/late-sdk/models/validate_post_request_media_items_inner.rb +0 -190
  84. data/lib/late-sdk/models/validate_post_request_platforms_inner.rb +0 -217
  85. data/lib/late-sdk/models/validate_post_request_platforms_inner_custom_media_inner.rb +0 -190
  86. data/lib/late-sdk/models/validate_subreddit200_response.rb +0 -104
  87. data/lib/late-sdk/models/validate_subreddit200_response_one_of.rb +0 -157
  88. data/lib/late-sdk/models/validate_subreddit200_response_one_of1.rb +0 -157
  89. data/lib/late-sdk/models/validate_subreddit200_response_one_of_subreddit.rb +0 -244
  90. data/spec/api/tools_api_spec.rb +0 -152
  91. data/spec/api/validate_api_spec.rb +0 -83
  92. data/spec/models/caption_response_spec.rb +0 -36
  93. data/spec/models/check_instagram_hashtags200_response_results_inner_spec.rb +0 -58
  94. data/spec/models/check_instagram_hashtags200_response_spec.rb +0 -48
  95. data/spec/models/check_instagram_hashtags200_response_summary_spec.rb +0 -48
  96. data/spec/models/check_instagram_hashtags_request_spec.rb +0 -36
  97. data/spec/models/download_bluesky_media200_response_spec.rb +0 -60
  98. data/spec/models/download_facebook_video200_response_spec.rb +0 -54
  99. data/spec/models/download_format_spec.rb +0 -60
  100. data/spec/models/download_instagram_media200_response_spec.rb +0 -48
  101. data/spec/models/download_response_spec.rb +0 -60
  102. data/spec/models/download_tik_tok_video200_response_formats_inner_spec.rb +0 -48
  103. data/spec/models/download_tik_tok_video200_response_spec.rb +0 -54
  104. data/spec/models/download_you_tube_video200_response_formats_inner_spec.rb +0 -66
  105. data/spec/models/download_you_tube_video200_response_spec.rb +0 -54
  106. data/spec/models/get_you_tube_transcript200_response_segments_inner_spec.rb +0 -48
  107. data/spec/models/get_you_tube_transcript200_response_spec.rb +0 -60
  108. data/spec/models/hashtag_check_response_spec.rb +0 -36
  109. data/spec/models/hashtag_info_spec.rb +0 -52
  110. data/spec/models/transcript_response_spec.rb +0 -48
  111. data/spec/models/transcript_segment_spec.rb +0 -48
  112. data/spec/models/validate_media200_response_platform_limits_value_spec.rb +0 -48
  113. data/spec/models/validate_media200_response_spec.rb +0 -82
  114. data/spec/models/validate_media_request_spec.rb +0 -36
  115. data/spec/models/validate_post200_response_one_of1_errors_inner_spec.rb +0 -42
  116. data/spec/models/validate_post200_response_one_of1_spec.rb +0 -48
  117. data/spec/models/validate_post200_response_one_of_spec.rb +0 -48
  118. data/spec/models/validate_post200_response_one_of_warnings_inner_spec.rb +0 -42
  119. data/spec/models/validate_post200_response_spec.rb +0 -32
  120. data/spec/models/validate_post_length200_response_platforms_value_spec.rb +0 -48
  121. data/spec/models/validate_post_length200_response_spec.rb +0 -42
  122. data/spec/models/validate_post_length_request_spec.rb +0 -36
  123. data/spec/models/validate_post_request_media_items_inner_spec.rb +0 -46
  124. data/spec/models/validate_post_request_platforms_inner_custom_media_inner_spec.rb +0 -46
  125. data/spec/models/validate_post_request_platforms_inner_spec.rb +0 -58
  126. data/spec/models/validate_post_request_spec.rb +0 -48
  127. data/spec/models/validate_subreddit200_response_one_of1_spec.rb +0 -42
  128. data/spec/models/validate_subreddit200_response_one_of_spec.rb +0 -42
  129. data/spec/models/validate_subreddit200_response_one_of_subreddit_spec.rb +0 -82
  130. data/spec/models/validate_subreddit200_response_spec.rb +0 -32
  131. data/zernio-sdk-0.0.103.gem +0 -0
@@ -1,158 +0,0 @@
1
- =begin
2
- #Zernio API
3
-
4
- #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
-
6
- The version of the OpenAPI document: 1.0.1
7
- Contact: support@zernio.com
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.19.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Late
17
- class ValidatePostLength200Response < ApiModelBase
18
- attr_accessor :text
19
-
20
- attr_accessor :platforms
21
-
22
- # Attribute mapping from ruby-style variable name to JSON key.
23
- def self.attribute_map
24
- {
25
- :'text' => :'text',
26
- :'platforms' => :'platforms'
27
- }
28
- end
29
-
30
- # Returns attribute mapping this model knows about
31
- def self.acceptable_attribute_map
32
- attribute_map
33
- end
34
-
35
- # Returns all the JSON keys this model knows about
36
- def self.acceptable_attributes
37
- acceptable_attribute_map.values
38
- end
39
-
40
- # Attribute type mapping.
41
- def self.openapi_types
42
- {
43
- :'text' => :'String',
44
- :'platforms' => :'Hash<String, ValidatePostLength200ResponsePlatformsValue>'
45
- }
46
- end
47
-
48
- # List of attributes with nullable: true
49
- def self.openapi_nullable
50
- Set.new([
51
- ])
52
- end
53
-
54
- # Initializes the object
55
- # @param [Hash] attributes Model attributes in the form of hash
56
- def initialize(attributes = {})
57
- if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ValidatePostLength200Response` initialize method"
59
- end
60
-
61
- # check to see if the attribute exists and convert string to symbol for hash key
62
- acceptable_attribute_map = self.class.acceptable_attribute_map
63
- attributes = attributes.each_with_object({}) { |(k, v), h|
64
- if (!acceptable_attribute_map.key?(k.to_sym))
65
- fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ValidatePostLength200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
- end
67
- h[k.to_sym] = v
68
- }
69
-
70
- if attributes.key?(:'text')
71
- self.text = attributes[:'text']
72
- end
73
-
74
- if attributes.key?(:'platforms')
75
- if (value = attributes[:'platforms']).is_a?(Hash)
76
- self.platforms = value
77
- end
78
- end
79
- end
80
-
81
- # Show invalid properties with the reasons. Usually used together with valid?
82
- # @return Array for valid properties with the reasons
83
- def list_invalid_properties
84
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
- invalid_properties = Array.new
86
- invalid_properties
87
- end
88
-
89
- # Check to see if the all the properties in the model are valid
90
- # @return true if the model is valid
91
- def valid?
92
- warn '[DEPRECATED] the `valid?` method is obsolete'
93
- true
94
- end
95
-
96
- # Checks equality by comparing each attribute.
97
- # @param [Object] Object to be compared
98
- def ==(o)
99
- return true if self.equal?(o)
100
- self.class == o.class &&
101
- text == o.text &&
102
- platforms == o.platforms
103
- end
104
-
105
- # @see the `==` method
106
- # @param [Object] Object to be compared
107
- def eql?(o)
108
- self == o
109
- end
110
-
111
- # Calculates hash code according to all attributes.
112
- # @return [Integer] Hash code
113
- def hash
114
- [text, platforms].hash
115
- end
116
-
117
- # Builds the object from hash
118
- # @param [Hash] attributes Model attributes in the form of hash
119
- # @return [Object] Returns the model itself
120
- def self.build_from_hash(attributes)
121
- return nil unless attributes.is_a?(Hash)
122
- attributes = attributes.transform_keys(&:to_sym)
123
- transformed_hash = {}
124
- openapi_types.each_pair do |key, type|
125
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
- transformed_hash["#{key}"] = nil
127
- elsif type =~ /\AArray<(.*)>/i
128
- # check to ensure the input is an array given that the attribute
129
- # is documented as an array but the input is not
130
- if attributes[attribute_map[key]].is_a?(Array)
131
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
- end
133
- elsif !attributes[attribute_map[key]].nil?
134
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
- end
136
- end
137
- new(transformed_hash)
138
- end
139
-
140
- # Returns the object in the form of hash
141
- # @return [Hash] Returns the object in the form of hash
142
- def to_hash
143
- hash = {}
144
- self.class.attribute_map.each_pair do |attr, param|
145
- value = self.send(attr)
146
- if value.nil?
147
- is_nullable = self.class.openapi_nullable.include?(attr)
148
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
- end
150
-
151
- hash[param] = _to_hash(value)
152
- end
153
- hash
154
- end
155
-
156
- end
157
-
158
- end
@@ -1,168 +0,0 @@
1
- =begin
2
- #Zernio API
3
-
4
- #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
-
6
- The version of the OpenAPI document: 1.0.1
7
- Contact: support@zernio.com
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.19.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Late
17
- class ValidatePostLength200ResponsePlatformsValue < ApiModelBase
18
- # Character count for this platform
19
- attr_accessor :count
20
-
21
- # Maximum allowed characters
22
- attr_accessor :limit
23
-
24
- # Whether the text is within the limit
25
- attr_accessor :valid
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'count' => :'count',
31
- :'limit' => :'limit',
32
- :'valid' => :'valid'
33
- }
34
- end
35
-
36
- # Returns attribute mapping this model knows about
37
- def self.acceptable_attribute_map
38
- attribute_map
39
- end
40
-
41
- # Returns all the JSON keys this model knows about
42
- def self.acceptable_attributes
43
- acceptable_attribute_map.values
44
- end
45
-
46
- # Attribute type mapping.
47
- def self.openapi_types
48
- {
49
- :'count' => :'Integer',
50
- :'limit' => :'Integer',
51
- :'valid' => :'Boolean'
52
- }
53
- end
54
-
55
- # List of attributes with nullable: true
56
- def self.openapi_nullable
57
- Set.new([
58
- ])
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ValidatePostLength200ResponsePlatformsValue` initialize method"
66
- end
67
-
68
- # check to see if the attribute exists and convert string to symbol for hash key
69
- acceptable_attribute_map = self.class.acceptable_attribute_map
70
- attributes = attributes.each_with_object({}) { |(k, v), h|
71
- if (!acceptable_attribute_map.key?(k.to_sym))
72
- fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ValidatePostLength200ResponsePlatformsValue`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
- end
74
- h[k.to_sym] = v
75
- }
76
-
77
- if attributes.key?(:'count')
78
- self.count = attributes[:'count']
79
- end
80
-
81
- if attributes.key?(:'limit')
82
- self.limit = attributes[:'limit']
83
- end
84
-
85
- if attributes.key?(:'valid')
86
- self.valid = attributes[:'valid']
87
- end
88
- end
89
-
90
- # Show invalid properties with the reasons. Usually used together with valid?
91
- # @return Array for valid properties with the reasons
92
- def list_invalid_properties
93
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
- invalid_properties = Array.new
95
- invalid_properties
96
- end
97
-
98
- # Check to see if the all the properties in the model are valid
99
- # @return true if the model is valid
100
- def valid?
101
- warn '[DEPRECATED] the `valid?` method is obsolete'
102
- true
103
- end
104
-
105
- # Checks equality by comparing each attribute.
106
- # @param [Object] Object to be compared
107
- def ==(o)
108
- return true if self.equal?(o)
109
- self.class == o.class &&
110
- count == o.count &&
111
- limit == o.limit &&
112
- valid == o.valid
113
- end
114
-
115
- # @see the `==` method
116
- # @param [Object] Object to be compared
117
- def eql?(o)
118
- self == o
119
- end
120
-
121
- # Calculates hash code according to all attributes.
122
- # @return [Integer] Hash code
123
- def hash
124
- [count, limit, valid].hash
125
- end
126
-
127
- # Builds the object from hash
128
- # @param [Hash] attributes Model attributes in the form of hash
129
- # @return [Object] Returns the model itself
130
- def self.build_from_hash(attributes)
131
- return nil unless attributes.is_a?(Hash)
132
- attributes = attributes.transform_keys(&:to_sym)
133
- transformed_hash = {}
134
- openapi_types.each_pair do |key, type|
135
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
- transformed_hash["#{key}"] = nil
137
- elsif type =~ /\AArray<(.*)>/i
138
- # check to ensure the input is an array given that the attribute
139
- # is documented as an array but the input is not
140
- if attributes[attribute_map[key]].is_a?(Array)
141
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
- end
143
- elsif !attributes[attribute_map[key]].nil?
144
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
- end
146
- end
147
- new(transformed_hash)
148
- end
149
-
150
- # Returns the object in the form of hash
151
- # @return [Hash] Returns the object in the form of hash
152
- def to_hash
153
- hash = {}
154
- self.class.attribute_map.each_pair do |attr, param|
155
- value = self.send(attr)
156
- if value.nil?
157
- is_nullable = self.class.openapi_nullable.include?(attr)
158
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
159
- end
160
-
161
- hash[param] = _to_hash(value)
162
- end
163
- hash
164
- end
165
-
166
- end
167
-
168
- end
@@ -1,165 +0,0 @@
1
- =begin
2
- #Zernio API
3
-
4
- #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
-
6
- The version of the OpenAPI document: 1.0.1
7
- Contact: support@zernio.com
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.19.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Late
17
- class ValidatePostLengthRequest < ApiModelBase
18
- # The post text to check
19
- attr_accessor :text
20
-
21
- # Attribute mapping from ruby-style variable name to JSON key.
22
- def self.attribute_map
23
- {
24
- :'text' => :'text'
25
- }
26
- end
27
-
28
- # Returns attribute mapping this model knows about
29
- def self.acceptable_attribute_map
30
- attribute_map
31
- end
32
-
33
- # Returns all the JSON keys this model knows about
34
- def self.acceptable_attributes
35
- acceptable_attribute_map.values
36
- end
37
-
38
- # Attribute type mapping.
39
- def self.openapi_types
40
- {
41
- :'text' => :'String'
42
- }
43
- end
44
-
45
- # List of attributes with nullable: true
46
- def self.openapi_nullable
47
- Set.new([
48
- ])
49
- end
50
-
51
- # Initializes the object
52
- # @param [Hash] attributes Model attributes in the form of hash
53
- def initialize(attributes = {})
54
- if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ValidatePostLengthRequest` initialize method"
56
- end
57
-
58
- # check to see if the attribute exists and convert string to symbol for hash key
59
- acceptable_attribute_map = self.class.acceptable_attribute_map
60
- attributes = attributes.each_with_object({}) { |(k, v), h|
61
- if (!acceptable_attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ValidatePostLengthRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
- end
64
- h[k.to_sym] = v
65
- }
66
-
67
- if attributes.key?(:'text')
68
- self.text = attributes[:'text']
69
- else
70
- self.text = nil
71
- end
72
- end
73
-
74
- # Show invalid properties with the reasons. Usually used together with valid?
75
- # @return Array for valid properties with the reasons
76
- def list_invalid_properties
77
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
- invalid_properties = Array.new
79
- if @text.nil?
80
- invalid_properties.push('invalid value for "text", text cannot be nil.')
81
- end
82
-
83
- invalid_properties
84
- end
85
-
86
- # Check to see if the all the properties in the model are valid
87
- # @return true if the model is valid
88
- def valid?
89
- warn '[DEPRECATED] the `valid?` method is obsolete'
90
- return false if @text.nil?
91
- true
92
- end
93
-
94
- # Custom attribute writer method with validation
95
- # @param [Object] text Value to be assigned
96
- def text=(text)
97
- if text.nil?
98
- fail ArgumentError, 'text cannot be nil'
99
- end
100
-
101
- @text = text
102
- end
103
-
104
- # Checks equality by comparing each attribute.
105
- # @param [Object] Object to be compared
106
- def ==(o)
107
- return true if self.equal?(o)
108
- self.class == o.class &&
109
- text == o.text
110
- end
111
-
112
- # @see the `==` method
113
- # @param [Object] Object to be compared
114
- def eql?(o)
115
- self == o
116
- end
117
-
118
- # Calculates hash code according to all attributes.
119
- # @return [Integer] Hash code
120
- def hash
121
- [text].hash
122
- end
123
-
124
- # Builds the object from hash
125
- # @param [Hash] attributes Model attributes in the form of hash
126
- # @return [Object] Returns the model itself
127
- def self.build_from_hash(attributes)
128
- return nil unless attributes.is_a?(Hash)
129
- attributes = attributes.transform_keys(&:to_sym)
130
- transformed_hash = {}
131
- openapi_types.each_pair do |key, type|
132
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
- transformed_hash["#{key}"] = nil
134
- elsif type =~ /\AArray<(.*)>/i
135
- # check to ensure the input is an array given that the attribute
136
- # is documented as an array but the input is not
137
- if attributes[attribute_map[key]].is_a?(Array)
138
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
- end
140
- elsif !attributes[attribute_map[key]].nil?
141
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
- end
143
- end
144
- new(transformed_hash)
145
- end
146
-
147
- # Returns the object in the form of hash
148
- # @return [Hash] Returns the object in the form of hash
149
- def to_hash
150
- hash = {}
151
- self.class.attribute_map.each_pair do |attr, param|
152
- value = self.send(attr)
153
- if value.nil?
154
- is_nullable = self.class.openapi_nullable.include?(attr)
155
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
- end
157
-
158
- hash[param] = _to_hash(value)
159
- end
160
- hash
161
- end
162
-
163
- end
164
-
165
- end
@@ -1,189 +0,0 @@
1
- =begin
2
- #Zernio API
3
-
4
- #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
-
6
- The version of the OpenAPI document: 1.0.1
7
- Contact: support@zernio.com
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.19.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Late
17
- class ValidatePostRequest < ApiModelBase
18
- # Post text content
19
- attr_accessor :content
20
-
21
- # Target platforms (same format as POST /v1/posts)
22
- attr_accessor :platforms
23
-
24
- # Root media items shared across platforms
25
- attr_accessor :media_items
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'content' => :'content',
31
- :'platforms' => :'platforms',
32
- :'media_items' => :'mediaItems'
33
- }
34
- end
35
-
36
- # Returns attribute mapping this model knows about
37
- def self.acceptable_attribute_map
38
- attribute_map
39
- end
40
-
41
- # Returns all the JSON keys this model knows about
42
- def self.acceptable_attributes
43
- acceptable_attribute_map.values
44
- end
45
-
46
- # Attribute type mapping.
47
- def self.openapi_types
48
- {
49
- :'content' => :'String',
50
- :'platforms' => :'Array<ValidatePostRequestPlatformsInner>',
51
- :'media_items' => :'Array<ValidatePostRequestMediaItemsInner>'
52
- }
53
- end
54
-
55
- # List of attributes with nullable: true
56
- def self.openapi_nullable
57
- Set.new([
58
- ])
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ValidatePostRequest` initialize method"
66
- end
67
-
68
- # check to see if the attribute exists and convert string to symbol for hash key
69
- acceptable_attribute_map = self.class.acceptable_attribute_map
70
- attributes = attributes.each_with_object({}) { |(k, v), h|
71
- if (!acceptable_attribute_map.key?(k.to_sym))
72
- fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ValidatePostRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
- end
74
- h[k.to_sym] = v
75
- }
76
-
77
- if attributes.key?(:'content')
78
- self.content = attributes[:'content']
79
- end
80
-
81
- if attributes.key?(:'platforms')
82
- if (value = attributes[:'platforms']).is_a?(Array)
83
- self.platforms = value
84
- end
85
- else
86
- self.platforms = nil
87
- end
88
-
89
- if attributes.key?(:'media_items')
90
- if (value = attributes[:'media_items']).is_a?(Array)
91
- self.media_items = value
92
- end
93
- end
94
- end
95
-
96
- # Show invalid properties with the reasons. Usually used together with valid?
97
- # @return Array for valid properties with the reasons
98
- def list_invalid_properties
99
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
- invalid_properties = Array.new
101
- if @platforms.nil?
102
- invalid_properties.push('invalid value for "platforms", platforms cannot be nil.')
103
- end
104
-
105
- invalid_properties
106
- end
107
-
108
- # Check to see if the all the properties in the model are valid
109
- # @return true if the model is valid
110
- def valid?
111
- warn '[DEPRECATED] the `valid?` method is obsolete'
112
- return false if @platforms.nil?
113
- true
114
- end
115
-
116
- # Custom attribute writer method with validation
117
- # @param [Object] platforms Value to be assigned
118
- def platforms=(platforms)
119
- if platforms.nil?
120
- fail ArgumentError, 'platforms cannot be nil'
121
- end
122
-
123
- @platforms = platforms
124
- end
125
-
126
- # Checks equality by comparing each attribute.
127
- # @param [Object] Object to be compared
128
- def ==(o)
129
- return true if self.equal?(o)
130
- self.class == o.class &&
131
- content == o.content &&
132
- platforms == o.platforms &&
133
- media_items == o.media_items
134
- end
135
-
136
- # @see the `==` method
137
- # @param [Object] Object to be compared
138
- def eql?(o)
139
- self == o
140
- end
141
-
142
- # Calculates hash code according to all attributes.
143
- # @return [Integer] Hash code
144
- def hash
145
- [content, platforms, media_items].hash
146
- end
147
-
148
- # Builds the object from hash
149
- # @param [Hash] attributes Model attributes in the form of hash
150
- # @return [Object] Returns the model itself
151
- def self.build_from_hash(attributes)
152
- return nil unless attributes.is_a?(Hash)
153
- attributes = attributes.transform_keys(&:to_sym)
154
- transformed_hash = {}
155
- openapi_types.each_pair do |key, type|
156
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
157
- transformed_hash["#{key}"] = nil
158
- elsif type =~ /\AArray<(.*)>/i
159
- # check to ensure the input is an array given that the attribute
160
- # is documented as an array but the input is not
161
- if attributes[attribute_map[key]].is_a?(Array)
162
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
163
- end
164
- elsif !attributes[attribute_map[key]].nil?
165
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
166
- end
167
- end
168
- new(transformed_hash)
169
- end
170
-
171
- # Returns the object in the form of hash
172
- # @return [Hash] Returns the object in the form of hash
173
- def to_hash
174
- hash = {}
175
- self.class.attribute_map.each_pair do |attr, param|
176
- value = self.send(attr)
177
- if value.nil?
178
- is_nullable = self.class.openapi_nullable.include?(attr)
179
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
180
- end
181
-
182
- hash[param] = _to_hash(value)
183
- end
184
- hash
185
- end
186
-
187
- end
188
-
189
- end