tmdb_ryanstep 1.0.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 +7 -0
- data/lib/environment.rb +7 -0
- data/lib/gemconfig.rb +14 -0
- data/lib/requests.rb +163 -0
- data/lib/tmdb_ryanstep/types/account_favorite_movies_request_sort_by.rb +8 -0
- data/lib/tmdb_ryanstep/types/account_favorite_movies_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_favorite_movies_response_results_item.rb +169 -0
- data/lib/tmdb_ryanstep/types/account_favorite_tv_request_sort_by.rb +8 -0
- data/lib/tmdb_ryanstep/types/account_favorite_tv_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_favorite_tv_response_results_item.rb +167 -0
- data/lib/tmdb_ryanstep/types/account_lists_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_lists_response_results_item.rb +183 -0
- data/lib/tmdb_ryanstep/types/account_movie_recommendations_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_movie_recommendations_response_results_item.rb +177 -0
- data/lib/tmdb_ryanstep/types/account_movie_watchlist_request_sort_by.rb +8 -0
- data/lib/tmdb_ryanstep/types/account_movie_watchlist_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_movie_watchlist_response_results_item.rb +177 -0
- data/lib/tmdb_ryanstep/types/account_rated_movies_request_sort_by.rb +8 -0
- data/lib/tmdb_ryanstep/types/account_rated_movies_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_rated_movies_response_results_item.rb +182 -0
- data/lib/tmdb_ryanstep/types/account_rated_movies_response_results_item_account_rating.rb +69 -0
- data/lib/tmdb_ryanstep/types/account_rated_tv_request_sort_by.rb +8 -0
- data/lib/tmdb_ryanstep/types/account_rated_tv_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_rated_tv_response_results_item.rb +181 -0
- data/lib/tmdb_ryanstep/types/account_rated_tv_response_results_item_account_rating.rb +69 -0
- data/lib/tmdb_ryanstep/types/account_tv_recommendations_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_tv_recommendations_response_results_item.rb +177 -0
- data/lib/tmdb_ryanstep/types/account_tv_watchlist_request_sort_by.rb +8 -0
- data/lib/tmdb_ryanstep/types/account_tv_watchlist_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_tv_watchlist_response_results_item.rb +176 -0
- data/lib/tmdb_ryanstep/types/auth_create_access_token_response.rb +95 -0
- data/lib/tmdb_ryanstep/types/auth_create_request_token_response.rb +87 -0
- data/lib/tmdb_ryanstep/types/auth_logout_response.rb +78 -0
- data/lib/tmdb_ryanstep/types/list_add_items_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/list_add_items_response_results_item.rb +74 -0
- data/lib/tmdb_ryanstep/types/list_clear_response.rb +95 -0
- data/lib/tmdb_ryanstep/types/list_create_response.rb +86 -0
- data/lib/tmdb_ryanstep/types/list_delete_response.rb +78 -0
- data/lib/tmdb_ryanstep/types/list_details_response.rb +237 -0
- data/lib/tmdb_ryanstep/types/list_details_response_comments.rb +215 -0
- data/lib/tmdb_ryanstep/types/list_details_response_created_by.rb +95 -0
- data/lib/tmdb_ryanstep/types/list_details_response_object_ids.rb +47 -0
- data/lib/tmdb_ryanstep/types/list_details_response_results_item.rb +175 -0
- data/lib/tmdb_ryanstep/types/list_item_status_request_media_type.rb +9 -0
- data/lib/tmdb_ryanstep/types/list_item_status_response.rb +103 -0
- data/lib/tmdb_ryanstep/types/list_remove_items_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/list_remove_items_response_results_item.rb +74 -0
- data/lib/tmdb_ryanstep/types/list_update_items_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/list_update_items_response_results_item.rb +74 -0
- data/lib/tmdb_ryanstep/types/list_update_response.rb +78 -0
- data/lib/tmdb_ryanstep.rb +1557 -0
- data/lib/types_export.rb +48 -0
- metadata +175 -0
@@ -0,0 +1,237 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "list_details_response_results_item"
|
4
|
+
require_relative "list_details_response_comments"
|
5
|
+
require_relative "list_details_response_created_by"
|
6
|
+
require_relative "list_details_response_object_ids"
|
7
|
+
require "ostruct"
|
8
|
+
require "json"
|
9
|
+
|
10
|
+
module TmdbApiClient
|
11
|
+
class ListDetailsResponse
|
12
|
+
# @return [Float]
|
13
|
+
attr_reader :average_rating
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :backdrop_path
|
16
|
+
# @return [Array<TmdbApiClient::ListDetailsResponseResultsItem>]
|
17
|
+
attr_reader :results
|
18
|
+
# @return [TmdbApiClient::ListDetailsResponseComments]
|
19
|
+
attr_reader :comments
|
20
|
+
# @return [TmdbApiClient::ListDetailsResponseCreatedBy]
|
21
|
+
attr_reader :created_by
|
22
|
+
# @return [String]
|
23
|
+
attr_reader :description
|
24
|
+
# @return [Integer]
|
25
|
+
attr_reader :id
|
26
|
+
# @return [String]
|
27
|
+
attr_reader :iso_3166_1
|
28
|
+
# @return [String]
|
29
|
+
attr_reader :iso_639_1
|
30
|
+
# @return [Integer]
|
31
|
+
attr_reader :item_count
|
32
|
+
# @return [String]
|
33
|
+
attr_reader :name
|
34
|
+
# @return [TmdbApiClient::ListDetailsResponseObjectIds]
|
35
|
+
attr_reader :object_ids
|
36
|
+
# @return [Integer]
|
37
|
+
attr_reader :page
|
38
|
+
# @return [String]
|
39
|
+
attr_reader :poster_path
|
40
|
+
# @return [Boolean]
|
41
|
+
attr_reader :public
|
42
|
+
# @return [Integer]
|
43
|
+
attr_reader :revenue
|
44
|
+
# @return [Integer]
|
45
|
+
attr_reader :runtime
|
46
|
+
# @return [String]
|
47
|
+
attr_reader :sort_by
|
48
|
+
# @return [Integer]
|
49
|
+
attr_reader :total_pages
|
50
|
+
# @return [Integer]
|
51
|
+
attr_reader :total_results
|
52
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
53
|
+
attr_reader :additional_properties
|
54
|
+
# @return [Object]
|
55
|
+
attr_reader :_field_set
|
56
|
+
protected :_field_set
|
57
|
+
|
58
|
+
OMIT = Object.new
|
59
|
+
|
60
|
+
# @param average_rating [Float]
|
61
|
+
# @param backdrop_path [String]
|
62
|
+
# @param results [Array<TmdbApiClient::ListDetailsResponseResultsItem>]
|
63
|
+
# @param comments [TmdbApiClient::ListDetailsResponseComments]
|
64
|
+
# @param created_by [TmdbApiClient::ListDetailsResponseCreatedBy]
|
65
|
+
# @param description [String]
|
66
|
+
# @param id [Integer]
|
67
|
+
# @param iso_3166_1 [String]
|
68
|
+
# @param iso_639_1 [String]
|
69
|
+
# @param item_count [Integer]
|
70
|
+
# @param name [String]
|
71
|
+
# @param object_ids [TmdbApiClient::ListDetailsResponseObjectIds]
|
72
|
+
# @param page [Integer]
|
73
|
+
# @param poster_path [String]
|
74
|
+
# @param public [Boolean]
|
75
|
+
# @param revenue [Integer]
|
76
|
+
# @param runtime [Integer]
|
77
|
+
# @param sort_by [String]
|
78
|
+
# @param total_pages [Integer]
|
79
|
+
# @param total_results [Integer]
|
80
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
81
|
+
# @return [TmdbApiClient::ListDetailsResponse]
|
82
|
+
def initialize(average_rating: OMIT, backdrop_path: OMIT, results: OMIT, comments: OMIT, created_by: OMIT,
|
83
|
+
description: OMIT, id: OMIT, iso_3166_1: OMIT, iso_639_1: OMIT, item_count: OMIT, name: OMIT, object_ids: OMIT, page: OMIT, poster_path: OMIT, public: OMIT, revenue: OMIT, runtime: OMIT, sort_by: OMIT, total_pages: OMIT, total_results: OMIT, additional_properties: nil)
|
84
|
+
@average_rating = average_rating if average_rating != OMIT
|
85
|
+
@backdrop_path = backdrop_path if backdrop_path != OMIT
|
86
|
+
@results = results if results != OMIT
|
87
|
+
@comments = comments if comments != OMIT
|
88
|
+
@created_by = created_by if created_by != OMIT
|
89
|
+
@description = description if description != OMIT
|
90
|
+
@id = id if id != OMIT
|
91
|
+
@iso_3166_1 = iso_3166_1 if iso_3166_1 != OMIT
|
92
|
+
@iso_639_1 = iso_639_1 if iso_639_1 != OMIT
|
93
|
+
@item_count = item_count if item_count != OMIT
|
94
|
+
@name = name if name != OMIT
|
95
|
+
@object_ids = object_ids if object_ids != OMIT
|
96
|
+
@page = page if page != OMIT
|
97
|
+
@poster_path = poster_path if poster_path != OMIT
|
98
|
+
@public = public if public != OMIT
|
99
|
+
@revenue = revenue if revenue != OMIT
|
100
|
+
@runtime = runtime if runtime != OMIT
|
101
|
+
@sort_by = sort_by if sort_by != OMIT
|
102
|
+
@total_pages = total_pages if total_pages != OMIT
|
103
|
+
@total_results = total_results if total_results != OMIT
|
104
|
+
@additional_properties = additional_properties
|
105
|
+
@_field_set = {
|
106
|
+
"average_rating": average_rating,
|
107
|
+
"backdrop_path": backdrop_path,
|
108
|
+
"results": results,
|
109
|
+
"comments": comments,
|
110
|
+
"created_by": created_by,
|
111
|
+
"description": description,
|
112
|
+
"id": id,
|
113
|
+
"iso_3166_1": iso_3166_1,
|
114
|
+
"iso_639_1": iso_639_1,
|
115
|
+
"item_count": item_count,
|
116
|
+
"name": name,
|
117
|
+
"object_ids": object_ids,
|
118
|
+
"page": page,
|
119
|
+
"poster_path": poster_path,
|
120
|
+
"public": public,
|
121
|
+
"revenue": revenue,
|
122
|
+
"runtime": runtime,
|
123
|
+
"sort_by": sort_by,
|
124
|
+
"total_pages": total_pages,
|
125
|
+
"total_results": total_results
|
126
|
+
}.reject do |_k, v|
|
127
|
+
v == OMIT
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# Deserialize a JSON object to an instance of ListDetailsResponse
|
132
|
+
#
|
133
|
+
# @param json_object [String]
|
134
|
+
# @return [TmdbApiClient::ListDetailsResponse]
|
135
|
+
def self.from_json(json_object:)
|
136
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
137
|
+
parsed_json = JSON.parse(json_object)
|
138
|
+
average_rating = parsed_json["average_rating"]
|
139
|
+
backdrop_path = parsed_json["backdrop_path"]
|
140
|
+
results = parsed_json["results"]&.map do |item|
|
141
|
+
item = item.to_json
|
142
|
+
TmdbApiClient::ListDetailsResponseResultsItem.from_json(json_object: item)
|
143
|
+
end
|
144
|
+
if parsed_json["comments"].nil?
|
145
|
+
comments = nil
|
146
|
+
else
|
147
|
+
comments = parsed_json["comments"].to_json
|
148
|
+
comments = TmdbApiClient::ListDetailsResponseComments.from_json(json_object: comments)
|
149
|
+
end
|
150
|
+
if parsed_json["created_by"].nil?
|
151
|
+
created_by = nil
|
152
|
+
else
|
153
|
+
created_by = parsed_json["created_by"].to_json
|
154
|
+
created_by = TmdbApiClient::ListDetailsResponseCreatedBy.from_json(json_object: created_by)
|
155
|
+
end
|
156
|
+
description = parsed_json["description"]
|
157
|
+
id = parsed_json["id"]
|
158
|
+
iso_3166_1 = parsed_json["iso_3166_1"]
|
159
|
+
iso_639_1 = parsed_json["iso_639_1"]
|
160
|
+
item_count = parsed_json["item_count"]
|
161
|
+
name = parsed_json["name"]
|
162
|
+
if parsed_json["object_ids"].nil?
|
163
|
+
object_ids = nil
|
164
|
+
else
|
165
|
+
object_ids = parsed_json["object_ids"].to_json
|
166
|
+
object_ids = TmdbApiClient::ListDetailsResponseObjectIds.from_json(json_object: object_ids)
|
167
|
+
end
|
168
|
+
page = parsed_json["page"]
|
169
|
+
poster_path = parsed_json["poster_path"]
|
170
|
+
public = parsed_json["public"]
|
171
|
+
revenue = parsed_json["revenue"]
|
172
|
+
runtime = parsed_json["runtime"]
|
173
|
+
sort_by = parsed_json["sort_by"]
|
174
|
+
total_pages = parsed_json["total_pages"]
|
175
|
+
total_results = parsed_json["total_results"]
|
176
|
+
new(
|
177
|
+
average_rating: average_rating,
|
178
|
+
backdrop_path: backdrop_path,
|
179
|
+
results: results,
|
180
|
+
comments: comments,
|
181
|
+
created_by: created_by,
|
182
|
+
description: description,
|
183
|
+
id: id,
|
184
|
+
iso_3166_1: iso_3166_1,
|
185
|
+
iso_639_1: iso_639_1,
|
186
|
+
item_count: item_count,
|
187
|
+
name: name,
|
188
|
+
object_ids: object_ids,
|
189
|
+
page: page,
|
190
|
+
poster_path: poster_path,
|
191
|
+
public: public,
|
192
|
+
revenue: revenue,
|
193
|
+
runtime: runtime,
|
194
|
+
sort_by: sort_by,
|
195
|
+
total_pages: total_pages,
|
196
|
+
total_results: total_results,
|
197
|
+
additional_properties: struct
|
198
|
+
)
|
199
|
+
end
|
200
|
+
|
201
|
+
# Serialize an instance of ListDetailsResponse to a JSON object
|
202
|
+
#
|
203
|
+
# @return [String]
|
204
|
+
def to_json(*_args)
|
205
|
+
@_field_set&.to_json
|
206
|
+
end
|
207
|
+
|
208
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
209
|
+
# hash and check each fields type against the current object's property
|
210
|
+
# definitions.
|
211
|
+
#
|
212
|
+
# @param obj [Object]
|
213
|
+
# @return [Void]
|
214
|
+
def self.validate_raw(obj:)
|
215
|
+
obj.average_rating&.is_a?(Float) != false || raise("Passed value for field obj.average_rating is not the expected type, validation failed.")
|
216
|
+
obj.backdrop_path&.is_a?(String) != false || raise("Passed value for field obj.backdrop_path is not the expected type, validation failed.")
|
217
|
+
obj.results&.is_a?(Array) != false || raise("Passed value for field obj.results is not the expected type, validation failed.")
|
218
|
+
obj.comments.nil? || TmdbApiClient::ListDetailsResponseComments.validate_raw(obj: obj.comments)
|
219
|
+
obj.created_by.nil? || TmdbApiClient::ListDetailsResponseCreatedBy.validate_raw(obj: obj.created_by)
|
220
|
+
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
221
|
+
obj.id&.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
222
|
+
obj.iso_3166_1&.is_a?(String) != false || raise("Passed value for field obj.iso_3166_1 is not the expected type, validation failed.")
|
223
|
+
obj.iso_639_1&.is_a?(String) != false || raise("Passed value for field obj.iso_639_1 is not the expected type, validation failed.")
|
224
|
+
obj.item_count&.is_a?(Integer) != false || raise("Passed value for field obj.item_count is not the expected type, validation failed.")
|
225
|
+
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
226
|
+
obj.object_ids.nil? || TmdbApiClient::ListDetailsResponseObjectIds.validate_raw(obj: obj.object_ids)
|
227
|
+
obj.page&.is_a?(Integer) != false || raise("Passed value for field obj.page is not the expected type, validation failed.")
|
228
|
+
obj.poster_path&.is_a?(String) != false || raise("Passed value for field obj.poster_path is not the expected type, validation failed.")
|
229
|
+
obj.public&.is_a?(Boolean) != false || raise("Passed value for field obj.public is not the expected type, validation failed.")
|
230
|
+
obj.revenue&.is_a?(Integer) != false || raise("Passed value for field obj.revenue is not the expected type, validation failed.")
|
231
|
+
obj.runtime&.is_a?(Integer) != false || raise("Passed value for field obj.runtime is not the expected type, validation failed.")
|
232
|
+
obj.sort_by&.is_a?(String) != false || raise("Passed value for field obj.sort_by is not the expected type, validation failed.")
|
233
|
+
obj.total_pages&.is_a?(Integer) != false || raise("Passed value for field obj.total_pages is not the expected type, validation failed.")
|
234
|
+
obj.total_results&.is_a?(Integer) != false || raise("Passed value for field obj.total_results is not the expected type, validation failed.")
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
@@ -0,0 +1,215 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module TmdbApiClient
|
7
|
+
class ListDetailsResponseComments
|
8
|
+
# @return [Object]
|
9
|
+
attr_reader :movie_617127
|
10
|
+
# @return [Object]
|
11
|
+
attr_reader :movie_986056
|
12
|
+
# @return [Object]
|
13
|
+
attr_reader :movie_822119
|
14
|
+
# @return [Object]
|
15
|
+
attr_reader :movie_533535
|
16
|
+
# @return [Object]
|
17
|
+
attr_reader :movie_609681
|
18
|
+
# @return [Object]
|
19
|
+
attr_reader :movie_447365
|
20
|
+
# @return [Object]
|
21
|
+
attr_reader :movie_640146
|
22
|
+
# @return [Object]
|
23
|
+
attr_reader :movie_505642
|
24
|
+
# @return [Object]
|
25
|
+
attr_reader :movie_616037
|
26
|
+
# @return [Object]
|
27
|
+
attr_reader :movie_453395
|
28
|
+
# @return [Object]
|
29
|
+
attr_reader :movie_634649
|
30
|
+
# @return [Object]
|
31
|
+
attr_reader :movie_524434
|
32
|
+
# @return [Object]
|
33
|
+
attr_reader :movie_566525
|
34
|
+
# @return [Object]
|
35
|
+
attr_reader :movie_497698
|
36
|
+
# @return [Object]
|
37
|
+
attr_reader :movie_429617
|
38
|
+
# @return [Object]
|
39
|
+
attr_reader :movie_299534
|
40
|
+
# @return [Object]
|
41
|
+
attr_reader :movie_299537
|
42
|
+
# @return [Object]
|
43
|
+
attr_reader :movie_363088
|
44
|
+
# @return [Object]
|
45
|
+
attr_reader :movie_299536
|
46
|
+
# @return [Object]
|
47
|
+
attr_reader :movie_284054
|
48
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
49
|
+
attr_reader :additional_properties
|
50
|
+
# @return [Object]
|
51
|
+
attr_reader :_field_set
|
52
|
+
protected :_field_set
|
53
|
+
|
54
|
+
OMIT = Object.new
|
55
|
+
|
56
|
+
# @param movie_617127 [Object]
|
57
|
+
# @param movie_986056 [Object]
|
58
|
+
# @param movie_822119 [Object]
|
59
|
+
# @param movie_533535 [Object]
|
60
|
+
# @param movie_609681 [Object]
|
61
|
+
# @param movie_447365 [Object]
|
62
|
+
# @param movie_640146 [Object]
|
63
|
+
# @param movie_505642 [Object]
|
64
|
+
# @param movie_616037 [Object]
|
65
|
+
# @param movie_453395 [Object]
|
66
|
+
# @param movie_634649 [Object]
|
67
|
+
# @param movie_524434 [Object]
|
68
|
+
# @param movie_566525 [Object]
|
69
|
+
# @param movie_497698 [Object]
|
70
|
+
# @param movie_429617 [Object]
|
71
|
+
# @param movie_299534 [Object]
|
72
|
+
# @param movie_299537 [Object]
|
73
|
+
# @param movie_363088 [Object]
|
74
|
+
# @param movie_299536 [Object]
|
75
|
+
# @param movie_284054 [Object]
|
76
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
77
|
+
# @return [TmdbApiClient::ListDetailsResponseComments]
|
78
|
+
def initialize(movie_617127: OMIT, movie_986056: OMIT, movie_822119: OMIT, movie_533535: OMIT, movie_609681: OMIT,
|
79
|
+
movie_447365: OMIT, movie_640146: OMIT, movie_505642: OMIT, movie_616037: OMIT, movie_453395: OMIT, movie_634649: OMIT, movie_524434: OMIT, movie_566525: OMIT, movie_497698: OMIT, movie_429617: OMIT, movie_299534: OMIT, movie_299537: OMIT, movie_363088: OMIT, movie_299536: OMIT, movie_284054: OMIT, additional_properties: nil)
|
80
|
+
@movie_617127 = movie_617127 if movie_617127 != OMIT
|
81
|
+
@movie_986056 = movie_986056 if movie_986056 != OMIT
|
82
|
+
@movie_822119 = movie_822119 if movie_822119 != OMIT
|
83
|
+
@movie_533535 = movie_533535 if movie_533535 != OMIT
|
84
|
+
@movie_609681 = movie_609681 if movie_609681 != OMIT
|
85
|
+
@movie_447365 = movie_447365 if movie_447365 != OMIT
|
86
|
+
@movie_640146 = movie_640146 if movie_640146 != OMIT
|
87
|
+
@movie_505642 = movie_505642 if movie_505642 != OMIT
|
88
|
+
@movie_616037 = movie_616037 if movie_616037 != OMIT
|
89
|
+
@movie_453395 = movie_453395 if movie_453395 != OMIT
|
90
|
+
@movie_634649 = movie_634649 if movie_634649 != OMIT
|
91
|
+
@movie_524434 = movie_524434 if movie_524434 != OMIT
|
92
|
+
@movie_566525 = movie_566525 if movie_566525 != OMIT
|
93
|
+
@movie_497698 = movie_497698 if movie_497698 != OMIT
|
94
|
+
@movie_429617 = movie_429617 if movie_429617 != OMIT
|
95
|
+
@movie_299534 = movie_299534 if movie_299534 != OMIT
|
96
|
+
@movie_299537 = movie_299537 if movie_299537 != OMIT
|
97
|
+
@movie_363088 = movie_363088 if movie_363088 != OMIT
|
98
|
+
@movie_299536 = movie_299536 if movie_299536 != OMIT
|
99
|
+
@movie_284054 = movie_284054 if movie_284054 != OMIT
|
100
|
+
@additional_properties = additional_properties
|
101
|
+
@_field_set = {
|
102
|
+
"movie:617127": movie_617127,
|
103
|
+
"movie:986056": movie_986056,
|
104
|
+
"movie:822119": movie_822119,
|
105
|
+
"movie:533535": movie_533535,
|
106
|
+
"movie:609681": movie_609681,
|
107
|
+
"movie:447365": movie_447365,
|
108
|
+
"movie:640146": movie_640146,
|
109
|
+
"movie:505642": movie_505642,
|
110
|
+
"movie:616037": movie_616037,
|
111
|
+
"movie:453395": movie_453395,
|
112
|
+
"movie:634649": movie_634649,
|
113
|
+
"movie:524434": movie_524434,
|
114
|
+
"movie:566525": movie_566525,
|
115
|
+
"movie:497698": movie_497698,
|
116
|
+
"movie:429617": movie_429617,
|
117
|
+
"movie:299534": movie_299534,
|
118
|
+
"movie:299537": movie_299537,
|
119
|
+
"movie:363088": movie_363088,
|
120
|
+
"movie:299536": movie_299536,
|
121
|
+
"movie:284054": movie_284054
|
122
|
+
}.reject do |_k, v|
|
123
|
+
v == OMIT
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
# Deserialize a JSON object to an instance of ListDetailsResponseComments
|
128
|
+
#
|
129
|
+
# @param json_object [String]
|
130
|
+
# @return [TmdbApiClient::ListDetailsResponseComments]
|
131
|
+
def self.from_json(json_object:)
|
132
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
133
|
+
parsed_json = JSON.parse(json_object)
|
134
|
+
movie_617127 = parsed_json["movie:617127"]
|
135
|
+
movie_986056 = parsed_json["movie:986056"]
|
136
|
+
movie_822119 = parsed_json["movie:822119"]
|
137
|
+
movie_533535 = parsed_json["movie:533535"]
|
138
|
+
movie_609681 = parsed_json["movie:609681"]
|
139
|
+
movie_447365 = parsed_json["movie:447365"]
|
140
|
+
movie_640146 = parsed_json["movie:640146"]
|
141
|
+
movie_505642 = parsed_json["movie:505642"]
|
142
|
+
movie_616037 = parsed_json["movie:616037"]
|
143
|
+
movie_453395 = parsed_json["movie:453395"]
|
144
|
+
movie_634649 = parsed_json["movie:634649"]
|
145
|
+
movie_524434 = parsed_json["movie:524434"]
|
146
|
+
movie_566525 = parsed_json["movie:566525"]
|
147
|
+
movie_497698 = parsed_json["movie:497698"]
|
148
|
+
movie_429617 = parsed_json["movie:429617"]
|
149
|
+
movie_299534 = parsed_json["movie:299534"]
|
150
|
+
movie_299537 = parsed_json["movie:299537"]
|
151
|
+
movie_363088 = parsed_json["movie:363088"]
|
152
|
+
movie_299536 = parsed_json["movie:299536"]
|
153
|
+
movie_284054 = parsed_json["movie:284054"]
|
154
|
+
new(
|
155
|
+
movie_617127: movie_617127,
|
156
|
+
movie_986056: movie_986056,
|
157
|
+
movie_822119: movie_822119,
|
158
|
+
movie_533535: movie_533535,
|
159
|
+
movie_609681: movie_609681,
|
160
|
+
movie_447365: movie_447365,
|
161
|
+
movie_640146: movie_640146,
|
162
|
+
movie_505642: movie_505642,
|
163
|
+
movie_616037: movie_616037,
|
164
|
+
movie_453395: movie_453395,
|
165
|
+
movie_634649: movie_634649,
|
166
|
+
movie_524434: movie_524434,
|
167
|
+
movie_566525: movie_566525,
|
168
|
+
movie_497698: movie_497698,
|
169
|
+
movie_429617: movie_429617,
|
170
|
+
movie_299534: movie_299534,
|
171
|
+
movie_299537: movie_299537,
|
172
|
+
movie_363088: movie_363088,
|
173
|
+
movie_299536: movie_299536,
|
174
|
+
movie_284054: movie_284054,
|
175
|
+
additional_properties: struct
|
176
|
+
)
|
177
|
+
end
|
178
|
+
|
179
|
+
# Serialize an instance of ListDetailsResponseComments to a JSON object
|
180
|
+
#
|
181
|
+
# @return [String]
|
182
|
+
def to_json(*_args)
|
183
|
+
@_field_set&.to_json
|
184
|
+
end
|
185
|
+
|
186
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
187
|
+
# hash and check each fields type against the current object's property
|
188
|
+
# definitions.
|
189
|
+
#
|
190
|
+
# @param obj [Object]
|
191
|
+
# @return [Void]
|
192
|
+
def self.validate_raw(obj:)
|
193
|
+
obj.movie_617127&.is_a?(Object) != false || raise("Passed value for field obj.movie_617127 is not the expected type, validation failed.")
|
194
|
+
obj.movie_986056&.is_a?(Object) != false || raise("Passed value for field obj.movie_986056 is not the expected type, validation failed.")
|
195
|
+
obj.movie_822119&.is_a?(Object) != false || raise("Passed value for field obj.movie_822119 is not the expected type, validation failed.")
|
196
|
+
obj.movie_533535&.is_a?(Object) != false || raise("Passed value for field obj.movie_533535 is not the expected type, validation failed.")
|
197
|
+
obj.movie_609681&.is_a?(Object) != false || raise("Passed value for field obj.movie_609681 is not the expected type, validation failed.")
|
198
|
+
obj.movie_447365&.is_a?(Object) != false || raise("Passed value for field obj.movie_447365 is not the expected type, validation failed.")
|
199
|
+
obj.movie_640146&.is_a?(Object) != false || raise("Passed value for field obj.movie_640146 is not the expected type, validation failed.")
|
200
|
+
obj.movie_505642&.is_a?(Object) != false || raise("Passed value for field obj.movie_505642 is not the expected type, validation failed.")
|
201
|
+
obj.movie_616037&.is_a?(Object) != false || raise("Passed value for field obj.movie_616037 is not the expected type, validation failed.")
|
202
|
+
obj.movie_453395&.is_a?(Object) != false || raise("Passed value for field obj.movie_453395 is not the expected type, validation failed.")
|
203
|
+
obj.movie_634649&.is_a?(Object) != false || raise("Passed value for field obj.movie_634649 is not the expected type, validation failed.")
|
204
|
+
obj.movie_524434&.is_a?(Object) != false || raise("Passed value for field obj.movie_524434 is not the expected type, validation failed.")
|
205
|
+
obj.movie_566525&.is_a?(Object) != false || raise("Passed value for field obj.movie_566525 is not the expected type, validation failed.")
|
206
|
+
obj.movie_497698&.is_a?(Object) != false || raise("Passed value for field obj.movie_497698 is not the expected type, validation failed.")
|
207
|
+
obj.movie_429617&.is_a?(Object) != false || raise("Passed value for field obj.movie_429617 is not the expected type, validation failed.")
|
208
|
+
obj.movie_299534&.is_a?(Object) != false || raise("Passed value for field obj.movie_299534 is not the expected type, validation failed.")
|
209
|
+
obj.movie_299537&.is_a?(Object) != false || raise("Passed value for field obj.movie_299537 is not the expected type, validation failed.")
|
210
|
+
obj.movie_363088&.is_a?(Object) != false || raise("Passed value for field obj.movie_363088 is not the expected type, validation failed.")
|
211
|
+
obj.movie_299536&.is_a?(Object) != false || raise("Passed value for field obj.movie_299536 is not the expected type, validation failed.")
|
212
|
+
obj.movie_284054&.is_a?(Object) != false || raise("Passed value for field obj.movie_284054 is not the expected type, validation failed.")
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module TmdbApiClient
|
7
|
+
class ListDetailsResponseCreatedBy
|
8
|
+
# @return [String]
|
9
|
+
attr_reader :avatar_path
|
10
|
+
# @return [String]
|
11
|
+
attr_reader :gravatar_hash
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :id
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :name
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :username
|
18
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
19
|
+
attr_reader :additional_properties
|
20
|
+
# @return [Object]
|
21
|
+
attr_reader :_field_set
|
22
|
+
protected :_field_set
|
23
|
+
|
24
|
+
OMIT = Object.new
|
25
|
+
|
26
|
+
# @param avatar_path [String]
|
27
|
+
# @param gravatar_hash [String]
|
28
|
+
# @param id [String]
|
29
|
+
# @param name [String]
|
30
|
+
# @param username [String]
|
31
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
32
|
+
# @return [TmdbApiClient::ListDetailsResponseCreatedBy]
|
33
|
+
def initialize(avatar_path: OMIT, gravatar_hash: OMIT, id: OMIT, name: OMIT, username: OMIT,
|
34
|
+
additional_properties: nil)
|
35
|
+
@avatar_path = avatar_path if avatar_path != OMIT
|
36
|
+
@gravatar_hash = gravatar_hash if gravatar_hash != OMIT
|
37
|
+
@id = id if id != OMIT
|
38
|
+
@name = name if name != OMIT
|
39
|
+
@username = username if username != OMIT
|
40
|
+
@additional_properties = additional_properties
|
41
|
+
@_field_set = {
|
42
|
+
"avatar_path": avatar_path,
|
43
|
+
"gravatar_hash": gravatar_hash,
|
44
|
+
"id": id,
|
45
|
+
"name": name,
|
46
|
+
"username": username
|
47
|
+
}.reject do |_k, v|
|
48
|
+
v == OMIT
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# Deserialize a JSON object to an instance of ListDetailsResponseCreatedBy
|
53
|
+
#
|
54
|
+
# @param json_object [String]
|
55
|
+
# @return [TmdbApiClient::ListDetailsResponseCreatedBy]
|
56
|
+
def self.from_json(json_object:)
|
57
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
58
|
+
parsed_json = JSON.parse(json_object)
|
59
|
+
avatar_path = parsed_json["avatar_path"]
|
60
|
+
gravatar_hash = parsed_json["gravatar_hash"]
|
61
|
+
id = parsed_json["id"]
|
62
|
+
name = parsed_json["name"]
|
63
|
+
username = parsed_json["username"]
|
64
|
+
new(
|
65
|
+
avatar_path: avatar_path,
|
66
|
+
gravatar_hash: gravatar_hash,
|
67
|
+
id: id,
|
68
|
+
name: name,
|
69
|
+
username: username,
|
70
|
+
additional_properties: struct
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
74
|
+
# Serialize an instance of ListDetailsResponseCreatedBy to a JSON object
|
75
|
+
#
|
76
|
+
# @return [String]
|
77
|
+
def to_json(*_args)
|
78
|
+
@_field_set&.to_json
|
79
|
+
end
|
80
|
+
|
81
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
82
|
+
# hash and check each fields type against the current object's property
|
83
|
+
# definitions.
|
84
|
+
#
|
85
|
+
# @param obj [Object]
|
86
|
+
# @return [Void]
|
87
|
+
def self.validate_raw(obj:)
|
88
|
+
obj.avatar_path&.is_a?(String) != false || raise("Passed value for field obj.avatar_path is not the expected type, validation failed.")
|
89
|
+
obj.gravatar_hash&.is_a?(String) != false || raise("Passed value for field obj.gravatar_hash is not the expected type, validation failed.")
|
90
|
+
obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
91
|
+
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
92
|
+
obj.username&.is_a?(String) != false || raise("Passed value for field obj.username is not the expected type, validation failed.")
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module TmdbApiClient
|
7
|
+
class ListDetailsResponseObjectIds
|
8
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
9
|
+
attr_reader :additional_properties
|
10
|
+
# @return [Object]
|
11
|
+
attr_reader :_field_set
|
12
|
+
protected :_field_set
|
13
|
+
|
14
|
+
OMIT = Object.new
|
15
|
+
|
16
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
# @return [TmdbApiClient::ListDetailsResponseObjectIds]
|
18
|
+
def initialize(additional_properties: nil)
|
19
|
+
@additional_properties = additional_properties
|
20
|
+
@_field_set = {}
|
21
|
+
end
|
22
|
+
|
23
|
+
# Deserialize a JSON object to an instance of ListDetailsResponseObjectIds
|
24
|
+
#
|
25
|
+
# @param json_object [String]
|
26
|
+
# @return [TmdbApiClient::ListDetailsResponseObjectIds]
|
27
|
+
def self.from_json(json_object:)
|
28
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
29
|
+
new(additional_properties: struct)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Serialize an instance of ListDetailsResponseObjectIds to a JSON object
|
33
|
+
#
|
34
|
+
# @return [String]
|
35
|
+
def to_json(*_args)
|
36
|
+
@_field_set&.to_json
|
37
|
+
end
|
38
|
+
|
39
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
40
|
+
# hash and check each fields type against the current object's property
|
41
|
+
# definitions.
|
42
|
+
#
|
43
|
+
# @param obj [Object]
|
44
|
+
# @return [Void]
|
45
|
+
def self.validate_raw(obj:); end
|
46
|
+
end
|
47
|
+
end
|