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,87 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module TmdbApiClient
|
7
|
+
class AuthCreateRequestTokenResponse
|
8
|
+
# @return [String]
|
9
|
+
attr_reader :status_message
|
10
|
+
# @return [String]
|
11
|
+
attr_reader :request_token
|
12
|
+
# @return [Boolean]
|
13
|
+
attr_reader :success
|
14
|
+
# @return [Integer]
|
15
|
+
attr_reader :status_code
|
16
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
attr_reader :additional_properties
|
18
|
+
# @return [Object]
|
19
|
+
attr_reader :_field_set
|
20
|
+
protected :_field_set
|
21
|
+
|
22
|
+
OMIT = Object.new
|
23
|
+
|
24
|
+
# @param status_message [String]
|
25
|
+
# @param request_token [String]
|
26
|
+
# @param success [Boolean]
|
27
|
+
# @param status_code [Integer]
|
28
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
# @return [TmdbApiClient::AuthCreateRequestTokenResponse]
|
30
|
+
def initialize(status_message: OMIT, request_token: OMIT, success: OMIT, status_code: OMIT,
|
31
|
+
additional_properties: nil)
|
32
|
+
@status_message = status_message if status_message != OMIT
|
33
|
+
@request_token = request_token if request_token != OMIT
|
34
|
+
@success = success if success != OMIT
|
35
|
+
@status_code = status_code if status_code != OMIT
|
36
|
+
@additional_properties = additional_properties
|
37
|
+
@_field_set = {
|
38
|
+
"status_message": status_message,
|
39
|
+
"request_token": request_token,
|
40
|
+
"success": success,
|
41
|
+
"status_code": status_code
|
42
|
+
}.reject do |_k, v|
|
43
|
+
v == OMIT
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Deserialize a JSON object to an instance of AuthCreateRequestTokenResponse
|
48
|
+
#
|
49
|
+
# @param json_object [String]
|
50
|
+
# @return [TmdbApiClient::AuthCreateRequestTokenResponse]
|
51
|
+
def self.from_json(json_object:)
|
52
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
53
|
+
parsed_json = JSON.parse(json_object)
|
54
|
+
status_message = parsed_json["status_message"]
|
55
|
+
request_token = parsed_json["request_token"]
|
56
|
+
success = parsed_json["success"]
|
57
|
+
status_code = parsed_json["status_code"]
|
58
|
+
new(
|
59
|
+
status_message: status_message,
|
60
|
+
request_token: request_token,
|
61
|
+
success: success,
|
62
|
+
status_code: status_code,
|
63
|
+
additional_properties: struct
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Serialize an instance of AuthCreateRequestTokenResponse to a JSON object
|
68
|
+
#
|
69
|
+
# @return [String]
|
70
|
+
def to_json(*_args)
|
71
|
+
@_field_set&.to_json
|
72
|
+
end
|
73
|
+
|
74
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
75
|
+
# hash and check each fields type against the current object's property
|
76
|
+
# definitions.
|
77
|
+
#
|
78
|
+
# @param obj [Object]
|
79
|
+
# @return [Void]
|
80
|
+
def self.validate_raw(obj:)
|
81
|
+
obj.status_message&.is_a?(String) != false || raise("Passed value for field obj.status_message is not the expected type, validation failed.")
|
82
|
+
obj.request_token&.is_a?(String) != false || raise("Passed value for field obj.request_token is not the expected type, validation failed.")
|
83
|
+
obj.success&.is_a?(Boolean) != false || raise("Passed value for field obj.success is not the expected type, validation failed.")
|
84
|
+
obj.status_code&.is_a?(Integer) != false || raise("Passed value for field obj.status_code is not the expected type, validation failed.")
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module TmdbApiClient
|
7
|
+
class AuthLogoutResponse
|
8
|
+
# @return [String]
|
9
|
+
attr_reader :status_message
|
10
|
+
# @return [Boolean]
|
11
|
+
attr_reader :success
|
12
|
+
# @return [Integer]
|
13
|
+
attr_reader :status_code
|
14
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
|
+
attr_reader :additional_properties
|
16
|
+
# @return [Object]
|
17
|
+
attr_reader :_field_set
|
18
|
+
protected :_field_set
|
19
|
+
|
20
|
+
OMIT = Object.new
|
21
|
+
|
22
|
+
# @param status_message [String]
|
23
|
+
# @param success [Boolean]
|
24
|
+
# @param status_code [Integer]
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [TmdbApiClient::AuthLogoutResponse]
|
27
|
+
def initialize(status_message: OMIT, success: OMIT, status_code: OMIT, additional_properties: nil)
|
28
|
+
@status_message = status_message if status_message != OMIT
|
29
|
+
@success = success if success != OMIT
|
30
|
+
@status_code = status_code if status_code != OMIT
|
31
|
+
@additional_properties = additional_properties
|
32
|
+
@_field_set = {
|
33
|
+
"status_message": status_message,
|
34
|
+
"success": success,
|
35
|
+
"status_code": status_code
|
36
|
+
}.reject do |_k, v|
|
37
|
+
v == OMIT
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# Deserialize a JSON object to an instance of AuthLogoutResponse
|
42
|
+
#
|
43
|
+
# @param json_object [String]
|
44
|
+
# @return [TmdbApiClient::AuthLogoutResponse]
|
45
|
+
def self.from_json(json_object:)
|
46
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
47
|
+
parsed_json = JSON.parse(json_object)
|
48
|
+
status_message = parsed_json["status_message"]
|
49
|
+
success = parsed_json["success"]
|
50
|
+
status_code = parsed_json["status_code"]
|
51
|
+
new(
|
52
|
+
status_message: status_message,
|
53
|
+
success: success,
|
54
|
+
status_code: status_code,
|
55
|
+
additional_properties: struct
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Serialize an instance of AuthLogoutResponse to a JSON object
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
def to_json(*_args)
|
63
|
+
@_field_set&.to_json
|
64
|
+
end
|
65
|
+
|
66
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
67
|
+
# hash and check each fields type against the current object's property
|
68
|
+
# definitions.
|
69
|
+
#
|
70
|
+
# @param obj [Object]
|
71
|
+
# @return [Void]
|
72
|
+
def self.validate_raw(obj:)
|
73
|
+
obj.status_message&.is_a?(String) != false || raise("Passed value for field obj.status_message is not the expected type, validation failed.")
|
74
|
+
obj.success&.is_a?(Boolean) != false || raise("Passed value for field obj.success is not the expected type, validation failed.")
|
75
|
+
obj.status_code&.is_a?(Integer) != false || raise("Passed value for field obj.status_code is not the expected type, validation failed.")
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "list_add_items_response_results_item"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module TmdbApiClient
|
8
|
+
class ListAddItemsResponse
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :status_message
|
11
|
+
# @return [Array<TmdbApiClient::ListAddItemsResponseResultsItem>]
|
12
|
+
attr_reader :results
|
13
|
+
# @return [Boolean]
|
14
|
+
attr_reader :success
|
15
|
+
# @return [Integer]
|
16
|
+
attr_reader :status_code
|
17
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
18
|
+
attr_reader :additional_properties
|
19
|
+
# @return [Object]
|
20
|
+
attr_reader :_field_set
|
21
|
+
protected :_field_set
|
22
|
+
|
23
|
+
OMIT = Object.new
|
24
|
+
|
25
|
+
# @param status_message [String]
|
26
|
+
# @param results [Array<TmdbApiClient::ListAddItemsResponseResultsItem>]
|
27
|
+
# @param success [Boolean]
|
28
|
+
# @param status_code [Integer]
|
29
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
+
# @return [TmdbApiClient::ListAddItemsResponse]
|
31
|
+
def initialize(status_message: OMIT, results: OMIT, success: OMIT, status_code: OMIT, additional_properties: nil)
|
32
|
+
@status_message = status_message if status_message != OMIT
|
33
|
+
@results = results if results != OMIT
|
34
|
+
@success = success if success != OMIT
|
35
|
+
@status_code = status_code if status_code != OMIT
|
36
|
+
@additional_properties = additional_properties
|
37
|
+
@_field_set = {
|
38
|
+
"status_message": status_message,
|
39
|
+
"results": results,
|
40
|
+
"success": success,
|
41
|
+
"status_code": status_code
|
42
|
+
}.reject do |_k, v|
|
43
|
+
v == OMIT
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Deserialize a JSON object to an instance of ListAddItemsResponse
|
48
|
+
#
|
49
|
+
# @param json_object [String]
|
50
|
+
# @return [TmdbApiClient::ListAddItemsResponse]
|
51
|
+
def self.from_json(json_object:)
|
52
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
53
|
+
parsed_json = JSON.parse(json_object)
|
54
|
+
status_message = parsed_json["status_message"]
|
55
|
+
results = parsed_json["results"]&.map do |item|
|
56
|
+
item = item.to_json
|
57
|
+
TmdbApiClient::ListAddItemsResponseResultsItem.from_json(json_object: item)
|
58
|
+
end
|
59
|
+
success = parsed_json["success"]
|
60
|
+
status_code = parsed_json["status_code"]
|
61
|
+
new(
|
62
|
+
status_message: status_message,
|
63
|
+
results: results,
|
64
|
+
success: success,
|
65
|
+
status_code: status_code,
|
66
|
+
additional_properties: struct
|
67
|
+
)
|
68
|
+
end
|
69
|
+
|
70
|
+
# Serialize an instance of ListAddItemsResponse to a JSON object
|
71
|
+
#
|
72
|
+
# @return [String]
|
73
|
+
def to_json(*_args)
|
74
|
+
@_field_set&.to_json
|
75
|
+
end
|
76
|
+
|
77
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
78
|
+
# hash and check each fields type against the current object's property
|
79
|
+
# definitions.
|
80
|
+
#
|
81
|
+
# @param obj [Object]
|
82
|
+
# @return [Void]
|
83
|
+
def self.validate_raw(obj:)
|
84
|
+
obj.status_message&.is_a?(String) != false || raise("Passed value for field obj.status_message is not the expected type, validation failed.")
|
85
|
+
obj.results&.is_a?(Array) != false || raise("Passed value for field obj.results is not the expected type, validation failed.")
|
86
|
+
obj.success&.is_a?(Boolean) != false || raise("Passed value for field obj.success is not the expected type, validation failed.")
|
87
|
+
obj.status_code&.is_a?(Integer) != false || raise("Passed value for field obj.status_code is not the expected type, validation failed.")
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module TmdbApiClient
|
7
|
+
class ListAddItemsResponseResultsItem
|
8
|
+
# @return [String]
|
9
|
+
attr_reader :media_type
|
10
|
+
# @return [Integer]
|
11
|
+
attr_reader :media_id
|
12
|
+
# @return [Boolean]
|
13
|
+
attr_reader :success
|
14
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
|
+
attr_reader :additional_properties
|
16
|
+
# @return [Object]
|
17
|
+
attr_reader :_field_set
|
18
|
+
protected :_field_set
|
19
|
+
|
20
|
+
OMIT = Object.new
|
21
|
+
|
22
|
+
# @param media_type [String]
|
23
|
+
# @param media_id [Integer]
|
24
|
+
# @param success [Boolean]
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [TmdbApiClient::ListAddItemsResponseResultsItem]
|
27
|
+
def initialize(media_type: OMIT, media_id: OMIT, success: OMIT, additional_properties: nil)
|
28
|
+
@media_type = media_type if media_type != OMIT
|
29
|
+
@media_id = media_id if media_id != OMIT
|
30
|
+
@success = success if success != OMIT
|
31
|
+
@additional_properties = additional_properties
|
32
|
+
@_field_set = { "media_type": media_type, "media_id": media_id, "success": success }.reject do |_k, v|
|
33
|
+
v == OMIT
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Deserialize a JSON object to an instance of ListAddItemsResponseResultsItem
|
38
|
+
#
|
39
|
+
# @param json_object [String]
|
40
|
+
# @return [TmdbApiClient::ListAddItemsResponseResultsItem]
|
41
|
+
def self.from_json(json_object:)
|
42
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
+
parsed_json = JSON.parse(json_object)
|
44
|
+
media_type = parsed_json["media_type"]
|
45
|
+
media_id = parsed_json["media_id"]
|
46
|
+
success = parsed_json["success"]
|
47
|
+
new(
|
48
|
+
media_type: media_type,
|
49
|
+
media_id: media_id,
|
50
|
+
success: success,
|
51
|
+
additional_properties: struct
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Serialize an instance of ListAddItemsResponseResultsItem to a JSON object
|
56
|
+
#
|
57
|
+
# @return [String]
|
58
|
+
def to_json(*_args)
|
59
|
+
@_field_set&.to_json
|
60
|
+
end
|
61
|
+
|
62
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
63
|
+
# hash and check each fields type against the current object's property
|
64
|
+
# definitions.
|
65
|
+
#
|
66
|
+
# @param obj [Object]
|
67
|
+
# @return [Void]
|
68
|
+
def self.validate_raw(obj:)
|
69
|
+
obj.media_type&.is_a?(String) != false || raise("Passed value for field obj.media_type is not the expected type, validation failed.")
|
70
|
+
obj.media_id&.is_a?(Integer) != false || raise("Passed value for field obj.media_id is not the expected type, validation failed.")
|
71
|
+
obj.success&.is_a?(Boolean) != false || raise("Passed value for field obj.success is not the expected type, validation failed.")
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module TmdbApiClient
|
7
|
+
class ListClearResponse
|
8
|
+
# @return [Integer]
|
9
|
+
attr_reader :items_deleted
|
10
|
+
# @return [String]
|
11
|
+
attr_reader :status_message
|
12
|
+
# @return [Integer]
|
13
|
+
attr_reader :id
|
14
|
+
# @return [Integer]
|
15
|
+
attr_reader :status_code
|
16
|
+
# @return [Boolean]
|
17
|
+
attr_reader :success
|
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 items_deleted [Integer]
|
27
|
+
# @param status_message [String]
|
28
|
+
# @param id [Integer]
|
29
|
+
# @param status_code [Integer]
|
30
|
+
# @param success [Boolean]
|
31
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
32
|
+
# @return [TmdbApiClient::ListClearResponse]
|
33
|
+
def initialize(items_deleted: OMIT, status_message: OMIT, id: OMIT, status_code: OMIT, success: OMIT,
|
34
|
+
additional_properties: nil)
|
35
|
+
@items_deleted = items_deleted if items_deleted != OMIT
|
36
|
+
@status_message = status_message if status_message != OMIT
|
37
|
+
@id = id if id != OMIT
|
38
|
+
@status_code = status_code if status_code != OMIT
|
39
|
+
@success = success if success != OMIT
|
40
|
+
@additional_properties = additional_properties
|
41
|
+
@_field_set = {
|
42
|
+
"items_deleted": items_deleted,
|
43
|
+
"status_message": status_message,
|
44
|
+
"id": id,
|
45
|
+
"status_code": status_code,
|
46
|
+
"success": success
|
47
|
+
}.reject do |_k, v|
|
48
|
+
v == OMIT
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# Deserialize a JSON object to an instance of ListClearResponse
|
53
|
+
#
|
54
|
+
# @param json_object [String]
|
55
|
+
# @return [TmdbApiClient::ListClearResponse]
|
56
|
+
def self.from_json(json_object:)
|
57
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
58
|
+
parsed_json = JSON.parse(json_object)
|
59
|
+
items_deleted = parsed_json["items_deleted"]
|
60
|
+
status_message = parsed_json["status_message"]
|
61
|
+
id = parsed_json["id"]
|
62
|
+
status_code = parsed_json["status_code"]
|
63
|
+
success = parsed_json["success"]
|
64
|
+
new(
|
65
|
+
items_deleted: items_deleted,
|
66
|
+
status_message: status_message,
|
67
|
+
id: id,
|
68
|
+
status_code: status_code,
|
69
|
+
success: success,
|
70
|
+
additional_properties: struct
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
74
|
+
# Serialize an instance of ListClearResponse 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.items_deleted&.is_a?(Integer) != false || raise("Passed value for field obj.items_deleted is not the expected type, validation failed.")
|
89
|
+
obj.status_message&.is_a?(String) != false || raise("Passed value for field obj.status_message is not the expected type, validation failed.")
|
90
|
+
obj.id&.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
91
|
+
obj.status_code&.is_a?(Integer) != false || raise("Passed value for field obj.status_code is not the expected type, validation failed.")
|
92
|
+
obj.success&.is_a?(Boolean) != false || raise("Passed value for field obj.success is not the expected type, validation failed.")
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module TmdbApiClient
|
7
|
+
class ListCreateResponse
|
8
|
+
# @return [String]
|
9
|
+
attr_reader :status_message
|
10
|
+
# @return [Integer]
|
11
|
+
attr_reader :id
|
12
|
+
# @return [Boolean]
|
13
|
+
attr_reader :success
|
14
|
+
# @return [Integer]
|
15
|
+
attr_reader :status_code
|
16
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
attr_reader :additional_properties
|
18
|
+
# @return [Object]
|
19
|
+
attr_reader :_field_set
|
20
|
+
protected :_field_set
|
21
|
+
|
22
|
+
OMIT = Object.new
|
23
|
+
|
24
|
+
# @param status_message [String]
|
25
|
+
# @param id [Integer]
|
26
|
+
# @param success [Boolean]
|
27
|
+
# @param status_code [Integer]
|
28
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
# @return [TmdbApiClient::ListCreateResponse]
|
30
|
+
def initialize(status_message: OMIT, id: OMIT, success: OMIT, status_code: OMIT, additional_properties: nil)
|
31
|
+
@status_message = status_message if status_message != OMIT
|
32
|
+
@id = id if id != OMIT
|
33
|
+
@success = success if success != OMIT
|
34
|
+
@status_code = status_code if status_code != OMIT
|
35
|
+
@additional_properties = additional_properties
|
36
|
+
@_field_set = {
|
37
|
+
"status_message": status_message,
|
38
|
+
"id": id,
|
39
|
+
"success": success,
|
40
|
+
"status_code": status_code
|
41
|
+
}.reject do |_k, v|
|
42
|
+
v == OMIT
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Deserialize a JSON object to an instance of ListCreateResponse
|
47
|
+
#
|
48
|
+
# @param json_object [String]
|
49
|
+
# @return [TmdbApiClient::ListCreateResponse]
|
50
|
+
def self.from_json(json_object:)
|
51
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
52
|
+
parsed_json = JSON.parse(json_object)
|
53
|
+
status_message = parsed_json["status_message"]
|
54
|
+
id = parsed_json["id"]
|
55
|
+
success = parsed_json["success"]
|
56
|
+
status_code = parsed_json["status_code"]
|
57
|
+
new(
|
58
|
+
status_message: status_message,
|
59
|
+
id: id,
|
60
|
+
success: success,
|
61
|
+
status_code: status_code,
|
62
|
+
additional_properties: struct
|
63
|
+
)
|
64
|
+
end
|
65
|
+
|
66
|
+
# Serialize an instance of ListCreateResponse to a JSON object
|
67
|
+
#
|
68
|
+
# @return [String]
|
69
|
+
def to_json(*_args)
|
70
|
+
@_field_set&.to_json
|
71
|
+
end
|
72
|
+
|
73
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
74
|
+
# hash and check each fields type against the current object's property
|
75
|
+
# definitions.
|
76
|
+
#
|
77
|
+
# @param obj [Object]
|
78
|
+
# @return [Void]
|
79
|
+
def self.validate_raw(obj:)
|
80
|
+
obj.status_message&.is_a?(String) != false || raise("Passed value for field obj.status_message is not the expected type, validation failed.")
|
81
|
+
obj.id&.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
82
|
+
obj.success&.is_a?(Boolean) != false || raise("Passed value for field obj.success is not the expected type, validation failed.")
|
83
|
+
obj.status_code&.is_a?(Integer) != false || raise("Passed value for field obj.status_code is not the expected type, validation failed.")
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module TmdbApiClient
|
7
|
+
class ListDeleteResponse
|
8
|
+
# @return [String]
|
9
|
+
attr_reader :status_message
|
10
|
+
# @return [Boolean]
|
11
|
+
attr_reader :success
|
12
|
+
# @return [Integer]
|
13
|
+
attr_reader :status_code
|
14
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
|
+
attr_reader :additional_properties
|
16
|
+
# @return [Object]
|
17
|
+
attr_reader :_field_set
|
18
|
+
protected :_field_set
|
19
|
+
|
20
|
+
OMIT = Object.new
|
21
|
+
|
22
|
+
# @param status_message [String]
|
23
|
+
# @param success [Boolean]
|
24
|
+
# @param status_code [Integer]
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [TmdbApiClient::ListDeleteResponse]
|
27
|
+
def initialize(status_message: OMIT, success: OMIT, status_code: OMIT, additional_properties: nil)
|
28
|
+
@status_message = status_message if status_message != OMIT
|
29
|
+
@success = success if success != OMIT
|
30
|
+
@status_code = status_code if status_code != OMIT
|
31
|
+
@additional_properties = additional_properties
|
32
|
+
@_field_set = {
|
33
|
+
"status_message": status_message,
|
34
|
+
"success": success,
|
35
|
+
"status_code": status_code
|
36
|
+
}.reject do |_k, v|
|
37
|
+
v == OMIT
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# Deserialize a JSON object to an instance of ListDeleteResponse
|
42
|
+
#
|
43
|
+
# @param json_object [String]
|
44
|
+
# @return [TmdbApiClient::ListDeleteResponse]
|
45
|
+
def self.from_json(json_object:)
|
46
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
47
|
+
parsed_json = JSON.parse(json_object)
|
48
|
+
status_message = parsed_json["status_message"]
|
49
|
+
success = parsed_json["success"]
|
50
|
+
status_code = parsed_json["status_code"]
|
51
|
+
new(
|
52
|
+
status_message: status_message,
|
53
|
+
success: success,
|
54
|
+
status_code: status_code,
|
55
|
+
additional_properties: struct
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Serialize an instance of ListDeleteResponse to a JSON object
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
def to_json(*_args)
|
63
|
+
@_field_set&.to_json
|
64
|
+
end
|
65
|
+
|
66
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
67
|
+
# hash and check each fields type against the current object's property
|
68
|
+
# definitions.
|
69
|
+
#
|
70
|
+
# @param obj [Object]
|
71
|
+
# @return [Void]
|
72
|
+
def self.validate_raw(obj:)
|
73
|
+
obj.status_message&.is_a?(String) != false || raise("Passed value for field obj.status_message is not the expected type, validation failed.")
|
74
|
+
obj.success&.is_a?(Boolean) != false || raise("Passed value for field obj.success is not the expected type, validation failed.")
|
75
|
+
obj.status_code&.is_a?(Integer) != false || raise("Passed value for field obj.status_code is not the expected type, validation failed.")
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|