google-api-client 0.9.4 → 0.9.5

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 (134) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/README.md +34 -0
  4. data/api_names.yaml +3 -0
  5. data/api_names_out.yaml +1058 -20
  6. data/bin/generate-api +1 -1
  7. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  8. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +203 -6
  9. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +78 -0
  10. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +36 -0
  11. data/generated/google/apis/admin_directory_v1.rb +1 -1
  12. data/generated/google/apis/adsense_v1_4.rb +1 -1
  13. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  14. data/generated/google/apis/androidenterprise_v1.rb +2 -3
  15. data/generated/google/apis/androidenterprise_v1/classes.rb +11 -4
  16. data/generated/google/apis/androidenterprise_v1/representations.rb +1 -0
  17. data/generated/google/apis/androidenterprise_v1/service.rb +5 -6
  18. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  19. data/generated/google/apis/androidpublisher_v2/classes.rb +47 -0
  20. data/generated/google/apis/androidpublisher_v2/representations.rb +6 -0
  21. data/generated/google/apis/appengine_v1beta5.rb +2 -3
  22. data/generated/google/apis/appengine_v1beta5/classes.rb +143 -8
  23. data/generated/google/apis/appengine_v1beta5/representations.rb +42 -0
  24. data/generated/google/apis/appengine_v1beta5/service.rb +48 -6
  25. data/generated/google/apis/appstate_v1.rb +1 -1
  26. data/generated/google/apis/bigquery_v2.rb +1 -1
  27. data/generated/google/apis/bigquery_v2/classes.rb +68 -14
  28. data/generated/google/apis/bigquery_v2/representations.rb +30 -0
  29. data/generated/google/apis/books_v1.rb +1 -1
  30. data/generated/google/apis/books_v1/classes.rb +68 -3
  31. data/generated/google/apis/books_v1/representations.rb +21 -0
  32. data/generated/google/apis/calendar_v3.rb +2 -2
  33. data/generated/google/apis/calendar_v3/service.rb +1 -1
  34. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  35. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  36. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  37. data/generated/google/apis/cloudresourcemanager_v1/service.rb +2 -2
  38. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  39. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +2 -2
  40. data/generated/google/apis/clouduseraccounts_beta.rb +1 -1
  41. data/generated/google/apis/clouduseraccounts_beta/classes.rb +1 -1
  42. data/generated/google/apis/compute_beta.rb +1 -1
  43. data/generated/google/apis/compute_beta/classes.rb +138 -108
  44. data/generated/google/apis/compute_beta/representations.rb +16 -18
  45. data/generated/google/apis/compute_beta/service.rb +52 -2
  46. data/generated/google/apis/compute_v1.rb +1 -1
  47. data/generated/google/apis/compute_v1/classes.rb +55 -74
  48. data/generated/google/apis/compute_v1/representations.rb +14 -18
  49. data/generated/google/apis/compute_v1/service.rb +45 -1
  50. data/generated/google/apis/container_v1.rb +3 -3
  51. data/generated/google/apis/container_v1/classes.rb +200 -42
  52. data/generated/google/apis/container_v1/representations.rb +54 -0
  53. data/generated/google/apis/container_v1/service.rb +31 -30
  54. data/generated/google/apis/content_v2.rb +1 -1
  55. data/generated/google/apis/datastore_v1beta2.rb +2 -2
  56. data/generated/google/apis/datastore_v1beta2/service.rb +1 -1
  57. data/generated/google/apis/deploymentmanager_v2.rb +2 -3
  58. data/generated/google/apis/deploymentmanager_v2/classes.rb +7 -1
  59. data/generated/google/apis/deploymentmanager_v2/representations.rb +1 -0
  60. data/generated/google/apis/deploymentmanager_v2/service.rb +26 -27
  61. data/generated/google/apis/dfareporting_v2_3.rb +2 -2
  62. data/generated/google/apis/dfareporting_v2_3/classes.rb +1 -1
  63. data/generated/google/apis/dfareporting_v2_3/service.rb +2 -2
  64. data/generated/google/apis/dns_v1.rb +1 -1
  65. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  66. data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
  67. data/generated/google/apis/drive_v2.rb +1 -1
  68. data/generated/google/apis/drive_v2/classes.rb +10 -4
  69. data/generated/google/apis/drive_v2/representations.rb +1 -0
  70. data/generated/google/apis/drive_v3.rb +1 -1
  71. data/generated/google/apis/drive_v3/classes.rb +7 -0
  72. data/generated/google/apis/drive_v3/representations.rb +1 -0
  73. data/generated/google/apis/fusiontables_v2.rb +1 -1
  74. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  75. data/generated/google/apis/games_management_v1management.rb +1 -1
  76. data/generated/google/apis/games_v1.rb +1 -1
  77. data/generated/google/apis/genomics_v1.rb +2 -2
  78. data/generated/google/apis/genomics_v1/classes.rb +770 -82
  79. data/generated/google/apis/genomics_v1/representations.rb +287 -24
  80. data/generated/google/apis/genomics_v1/service.rb +412 -13
  81. data/generated/google/apis/gmail_v1.rb +1 -1
  82. data/generated/google/apis/groupssettings_v1.rb +1 -1
  83. data/generated/google/apis/groupssettings_v1/classes.rb +13 -6
  84. data/generated/google/apis/groupssettings_v1/representations.rb +1 -0
  85. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  86. data/generated/google/apis/identitytoolkit_v3/classes.rb +50 -0
  87. data/generated/google/apis/identitytoolkit_v3/representations.rb +10 -0
  88. data/generated/google/apis/logging_v2beta1.rb +2 -3
  89. data/generated/google/apis/logging_v2beta1/classes.rb +219 -63
  90. data/generated/google/apis/logging_v2beta1/representations.rb +24 -1
  91. data/generated/google/apis/logging_v2beta1/service.rb +25 -32
  92. data/generated/google/apis/oauth2_v2.rb +2 -2
  93. data/generated/google/apis/oauth2_v2/service.rb +1 -1
  94. data/generated/google/apis/plus_domains_v1.rb +1 -1
  95. data/generated/google/apis/plus_v1.rb +1 -1
  96. data/generated/google/apis/pubsub_v1.rb +1 -1
  97. data/generated/google/apis/pubsub_v1/classes.rb +20 -12
  98. data/generated/google/apis/pubsub_v1/service.rb +32 -35
  99. data/generated/google/apis/reseller_v1.rb +1 -1
  100. data/generated/google/apis/reseller_v1/classes.rb +23 -9
  101. data/generated/google/apis/reseller_v1/representations.rb +2 -0
  102. data/generated/google/apis/sheets_v1.rb +43 -0
  103. data/generated/google/apis/sheets_v1/classes.rb +4542 -0
  104. data/generated/google/apis/sheets_v1/representations.rb +1703 -0
  105. data/generated/google/apis/sheets_v1/service.rb +363 -0
  106. data/generated/google/apis/sqladmin_v1beta4.rb +3 -2
  107. data/generated/google/apis/sqladmin_v1beta4/classes.rb +4 -3
  108. data/generated/google/apis/sqladmin_v1beta4/service.rb +2 -1
  109. data/generated/google/apis/storage_v1.rb +1 -1
  110. data/generated/google/apis/vision_v1.rb +2 -2
  111. data/generated/google/apis/vision_v1/classes.rb +11 -11
  112. data/generated/google/apis/vision_v1/service.rb +1 -1
  113. data/generated/google/apis/webmasters_v3.rb +2 -2
  114. data/generated/google/apis/webmasters_v3/classes.rb +7 -0
  115. data/generated/google/apis/webmasters_v3/representations.rb +1 -0
  116. data/generated/google/apis/webmasters_v3/service.rb +1 -1
  117. data/generated/google/apis/youtube_partner_v1.rb +37 -0
  118. data/generated/google/apis/youtube_partner_v1/classes.rb +3656 -0
  119. data/generated/google/apis/youtube_partner_v1/representations.rb +1452 -0
  120. data/generated/google/apis/youtube_partner_v1/service.rb +3165 -0
  121. data/generated/google/apis/youtube_v3.rb +3 -2
  122. data/generated/google/apis/youtube_v3/classes.rb +100 -3
  123. data/generated/google/apis/youtube_v3/representations.rb +50 -0
  124. data/generated/google/apis/youtube_v3/service.rb +2 -1
  125. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  126. data/generated/google/apis/youtubereporting_v1/classes.rb +17 -0
  127. data/generated/google/apis/youtubereporting_v1/representations.rb +2 -0
  128. data/generated/google/apis/youtubereporting_v1/service.rb +21 -3
  129. data/google-api-client.gemspec +2 -0
  130. data/lib/google/apis.rb +12 -2
  131. data/lib/google/apis/version.rb +1 -1
  132. data/script/generate +5 -2
  133. data/spec/google/apis/logging_spec.rb +55 -0
  134. metadata +12 -4
@@ -0,0 +1,3165 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module YoutubePartnerV1
23
+ # Youtube Content ID API
24
+ #
25
+ # API for YouTube partners. To use this API YouTube CMS account is required.
26
+ #
27
+ # @example
28
+ # require 'google/apis/youtube_partner_v1'
29
+ #
30
+ # YoutubePartner = Google::Apis::YoutubePartnerV1 # Alias the module
31
+ # service = YoutubePartner::YouTubePartnerService.new
32
+ #
33
+ # @see https://developers.google.com/youtube/partner/
34
+ class YouTubePartnerService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ # Overrides userIp if both are provided.
44
+ attr_accessor :quota_user
45
+
46
+ # @return [String]
47
+ # IP address of the site where the request originates. Use this if you want to
48
+ # enforce per-user limits.
49
+ attr_accessor :user_ip
50
+
51
+ def initialize
52
+ super('https://www.googleapis.com/', 'youtube/partner/v1/')
53
+ end
54
+
55
+ # Insert an asset label for an owner.
56
+ # @param [Google::Apis::YoutubePartnerV1::AssetLabel] asset_label_object
57
+ # @param [String] on_behalf_of_content_owner
58
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
59
+ # user is acting on behalf of. This parameter supports users whose accounts are
60
+ # associated with multiple content owners.
61
+ # @param [String] fields
62
+ # Selector specifying which fields to include in a partial response.
63
+ # @param [String] quota_user
64
+ # Available to use for quota purposes for server-side applications. Can be any
65
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
66
+ # Overrides userIp if both are provided.
67
+ # @param [String] user_ip
68
+ # IP address of the site where the request originates. Use this if you want to
69
+ # enforce per-user limits.
70
+ # @param [Google::Apis::RequestOptions] options
71
+ # Request-specific options
72
+ #
73
+ # @yield [result, err] Result & error if block supplied
74
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetLabel] parsed result object
75
+ # @yieldparam err [StandardError] error object if request failed
76
+ #
77
+ # @return [Google::Apis::YoutubePartnerV1::AssetLabel]
78
+ #
79
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
80
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
81
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
82
+ def insert_asset_label(asset_label_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
83
+ command = make_simple_command(:post, 'assetLabels', options)
84
+ command.request_representation = Google::Apis::YoutubePartnerV1::AssetLabel::Representation
85
+ command.request_object = asset_label_object
86
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetLabel::Representation
87
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetLabel
88
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
89
+ command.query['fields'] = fields unless fields.nil?
90
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
91
+ command.query['userIp'] = user_ip unless user_ip.nil?
92
+ execute_or_queue_command(command, &block)
93
+ end
94
+
95
+ # Retrieves a list of all asset labels for an owner.
96
+ # @param [String] label_prefix
97
+ # The labelPrefix parameter identifies the prefix of asset labels to retrieve.
98
+ # @param [String] on_behalf_of_content_owner
99
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
100
+ # user is acting on behalf of. This parameter supports users whose accounts are
101
+ # associated with multiple content owners.
102
+ # @param [String] q
103
+ # The q parameter specifies the query string to use to filter search results.
104
+ # YouTube searches for the query string in the labelName field of asset labels.
105
+ # @param [String] fields
106
+ # Selector specifying which fields to include in a partial response.
107
+ # @param [String] quota_user
108
+ # Available to use for quota purposes for server-side applications. Can be any
109
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
110
+ # Overrides userIp if both are provided.
111
+ # @param [String] user_ip
112
+ # IP address of the site where the request originates. Use this if you want to
113
+ # enforce per-user limits.
114
+ # @param [Google::Apis::RequestOptions] options
115
+ # Request-specific options
116
+ #
117
+ # @yield [result, err] Result & error if block supplied
118
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetLabelListResponse] parsed result object
119
+ # @yieldparam err [StandardError] error object if request failed
120
+ #
121
+ # @return [Google::Apis::YoutubePartnerV1::AssetLabelListResponse]
122
+ #
123
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
124
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
125
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
126
+ def list_asset_labels(label_prefix: nil, on_behalf_of_content_owner: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
127
+ command = make_simple_command(:get, 'assetLabels', options)
128
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetLabelListResponse::Representation
129
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetLabelListResponse
130
+ command.query['labelPrefix'] = label_prefix unless label_prefix.nil?
131
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
132
+ command.query['q'] = q unless q.nil?
133
+ command.query['fields'] = fields unless fields.nil?
134
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
135
+ command.query['userIp'] = user_ip unless user_ip.nil?
136
+ execute_or_queue_command(command, &block)
137
+ end
138
+
139
+ # Retrieves the match policy assigned to the specified asset by the content
140
+ # owner associated with the authenticated user. This information is only
141
+ # accessible to an owner of the asset.
142
+ # @param [String] asset_id
143
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
144
+ # you are retrieving the match policy.
145
+ # @param [String] on_behalf_of_content_owner
146
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
147
+ # user is acting on behalf of. This parameter supports users whose accounts are
148
+ # associated with multiple content owners.
149
+ # @param [String] fields
150
+ # Selector specifying which fields to include in a partial response.
151
+ # @param [String] quota_user
152
+ # Available to use for quota purposes for server-side applications. Can be any
153
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
154
+ # Overrides userIp if both are provided.
155
+ # @param [String] user_ip
156
+ # IP address of the site where the request originates. Use this if you want to
157
+ # enforce per-user limits.
158
+ # @param [Google::Apis::RequestOptions] options
159
+ # Request-specific options
160
+ #
161
+ # @yield [result, err] Result & error if block supplied
162
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] parsed result object
163
+ # @yieldparam err [StandardError] error object if request failed
164
+ #
165
+ # @return [Google::Apis::YoutubePartnerV1::AssetMatchPolicy]
166
+ #
167
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
168
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
169
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
170
+ def get_asset_match_policy(asset_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
171
+ command = make_simple_command(:get, 'assets/{assetId}/matchPolicy', options)
172
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
173
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetMatchPolicy
174
+ command.params['assetId'] = asset_id unless asset_id.nil?
175
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
176
+ command.query['fields'] = fields unless fields.nil?
177
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
178
+ command.query['userIp'] = user_ip unless user_ip.nil?
179
+ execute_or_queue_command(command, &block)
180
+ end
181
+
182
+ # Updates the asset's match policy. If an asset has multiple owners, each owner
183
+ # may set its own match policy for the asset. YouTube then computes the match
184
+ # policy that is actually applied for the asset based on the territories where
185
+ # each owner owns the asset. This method supports patch semantics.
186
+ # @param [String] asset_id
187
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
188
+ # you are retrieving the match policy.
189
+ # @param [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] asset_match_policy_object
190
+ # @param [String] on_behalf_of_content_owner
191
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
192
+ # user is acting on behalf of. This parameter supports users whose accounts are
193
+ # associated with multiple content owners.
194
+ # @param [String] fields
195
+ # Selector specifying which fields to include in a partial response.
196
+ # @param [String] quota_user
197
+ # Available to use for quota purposes for server-side applications. Can be any
198
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
199
+ # Overrides userIp if both are provided.
200
+ # @param [String] user_ip
201
+ # IP address of the site where the request originates. Use this if you want to
202
+ # enforce per-user limits.
203
+ # @param [Google::Apis::RequestOptions] options
204
+ # Request-specific options
205
+ #
206
+ # @yield [result, err] Result & error if block supplied
207
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] parsed result object
208
+ # @yieldparam err [StandardError] error object if request failed
209
+ #
210
+ # @return [Google::Apis::YoutubePartnerV1::AssetMatchPolicy]
211
+ #
212
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
213
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
214
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
215
+ def patch_asset_match_policy(asset_id, asset_match_policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
216
+ command = make_simple_command(:patch, 'assets/{assetId}/matchPolicy', options)
217
+ command.request_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
218
+ command.request_object = asset_match_policy_object
219
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
220
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetMatchPolicy
221
+ command.params['assetId'] = asset_id unless asset_id.nil?
222
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
223
+ command.query['fields'] = fields unless fields.nil?
224
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
225
+ command.query['userIp'] = user_ip unless user_ip.nil?
226
+ execute_or_queue_command(command, &block)
227
+ end
228
+
229
+ # Updates the asset's match policy. If an asset has multiple owners, each owner
230
+ # may set its own match policy for the asset. YouTube then computes the match
231
+ # policy that is actually applied for the asset based on the territories where
232
+ # each owner owns the asset.
233
+ # @param [String] asset_id
234
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
235
+ # you are retrieving the match policy.
236
+ # @param [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] asset_match_policy_object
237
+ # @param [String] on_behalf_of_content_owner
238
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
239
+ # user is acting on behalf of. This parameter supports users whose accounts are
240
+ # associated with multiple content owners.
241
+ # @param [String] fields
242
+ # Selector specifying which fields to include in a partial response.
243
+ # @param [String] quota_user
244
+ # Available to use for quota purposes for server-side applications. Can be any
245
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
246
+ # Overrides userIp if both are provided.
247
+ # @param [String] user_ip
248
+ # IP address of the site where the request originates. Use this if you want to
249
+ # enforce per-user limits.
250
+ # @param [Google::Apis::RequestOptions] options
251
+ # Request-specific options
252
+ #
253
+ # @yield [result, err] Result & error if block supplied
254
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] parsed result object
255
+ # @yieldparam err [StandardError] error object if request failed
256
+ #
257
+ # @return [Google::Apis::YoutubePartnerV1::AssetMatchPolicy]
258
+ #
259
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
260
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
261
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
262
+ def update_asset_match_policy(asset_id, asset_match_policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
263
+ command = make_simple_command(:put, 'assets/{assetId}/matchPolicy', options)
264
+ command.request_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
265
+ command.request_object = asset_match_policy_object
266
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
267
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetMatchPolicy
268
+ command.params['assetId'] = asset_id unless asset_id.nil?
269
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
270
+ command.query['fields'] = fields unless fields.nil?
271
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
272
+ command.query['userIp'] = user_ip unless user_ip.nil?
273
+ execute_or_queue_command(command, &block)
274
+ end
275
+
276
+ # Deletes a relationship between two assets.
277
+ # @param [String] asset_relationship_id
278
+ # The assetRelationshipId parameter specifies a value that uniquely identifies
279
+ # the relationship you are deleting.
280
+ # @param [String] on_behalf_of_content_owner
281
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
282
+ # user is acting on behalf of. This parameter supports users whose accounts are
283
+ # associated with multiple content owners.
284
+ # @param [String] fields
285
+ # Selector specifying which fields to include in a partial response.
286
+ # @param [String] quota_user
287
+ # Available to use for quota purposes for server-side applications. Can be any
288
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
289
+ # Overrides userIp if both are provided.
290
+ # @param [String] user_ip
291
+ # IP address of the site where the request originates. Use this if you want to
292
+ # enforce per-user limits.
293
+ # @param [Google::Apis::RequestOptions] options
294
+ # Request-specific options
295
+ #
296
+ # @yield [result, err] Result & error if block supplied
297
+ # @yieldparam result [NilClass] No result returned for this method
298
+ # @yieldparam err [StandardError] error object if request failed
299
+ #
300
+ # @return [void]
301
+ #
302
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
303
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
304
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
305
+ def delete_asset_relationship(asset_relationship_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
306
+ command = make_simple_command(:delete, 'assetRelationships/{assetRelationshipId}', options)
307
+ command.params['assetRelationshipId'] = asset_relationship_id unless asset_relationship_id.nil?
308
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
309
+ command.query['fields'] = fields unless fields.nil?
310
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
311
+ command.query['userIp'] = user_ip unless user_ip.nil?
312
+ execute_or_queue_command(command, &block)
313
+ end
314
+
315
+ # Creates a relationship that links two assets.
316
+ # @param [Google::Apis::YoutubePartnerV1::AssetRelationship] asset_relationship_object
317
+ # @param [String] on_behalf_of_content_owner
318
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
319
+ # user is acting on behalf of. This parameter supports users whose accounts are
320
+ # associated with multiple content owners.
321
+ # @param [String] fields
322
+ # Selector specifying which fields to include in a partial response.
323
+ # @param [String] quota_user
324
+ # Available to use for quota purposes for server-side applications. Can be any
325
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
326
+ # Overrides userIp if both are provided.
327
+ # @param [String] user_ip
328
+ # IP address of the site where the request originates. Use this if you want to
329
+ # enforce per-user limits.
330
+ # @param [Google::Apis::RequestOptions] options
331
+ # Request-specific options
332
+ #
333
+ # @yield [result, err] Result & error if block supplied
334
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetRelationship] parsed result object
335
+ # @yieldparam err [StandardError] error object if request failed
336
+ #
337
+ # @return [Google::Apis::YoutubePartnerV1::AssetRelationship]
338
+ #
339
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
340
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
341
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
342
+ def insert_asset_relationship(asset_relationship_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
343
+ command = make_simple_command(:post, 'assetRelationships', options)
344
+ command.request_representation = Google::Apis::YoutubePartnerV1::AssetRelationship::Representation
345
+ command.request_object = asset_relationship_object
346
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetRelationship::Representation
347
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetRelationship
348
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
349
+ command.query['fields'] = fields unless fields.nil?
350
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
351
+ command.query['userIp'] = user_ip unless user_ip.nil?
352
+ execute_or_queue_command(command, &block)
353
+ end
354
+
355
+ # Retrieves a list of relationships for a given asset. The list contains
356
+ # relationships where the specified asset is either the parent (embedding) or
357
+ # child (embedded) asset in the relationship.
358
+ # @param [String] asset_id
359
+ # The assetId parameter specifies the asset ID of the asset for which you are
360
+ # retrieving relationships.
361
+ # @param [String] on_behalf_of_content_owner
362
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
363
+ # user is acting on behalf of. This parameter supports users whose accounts are
364
+ # associated with multiple content owners.
365
+ # @param [String] page_token
366
+ # The pageToken parameter specifies a token that identifies a particular page of
367
+ # results to return. Set this parameter to the value of the nextPageToken value
368
+ # from the previous API response to retrieve the next page of search results.
369
+ # @param [String] fields
370
+ # Selector specifying which fields to include in a partial response.
371
+ # @param [String] quota_user
372
+ # Available to use for quota purposes for server-side applications. Can be any
373
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
374
+ # Overrides userIp if both are provided.
375
+ # @param [String] user_ip
376
+ # IP address of the site where the request originates. Use this if you want to
377
+ # enforce per-user limits.
378
+ # @param [Google::Apis::RequestOptions] options
379
+ # Request-specific options
380
+ #
381
+ # @yield [result, err] Result & error if block supplied
382
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetRelationshipListResponse] parsed result object
383
+ # @yieldparam err [StandardError] error object if request failed
384
+ #
385
+ # @return [Google::Apis::YoutubePartnerV1::AssetRelationshipListResponse]
386
+ #
387
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
388
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
389
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
390
+ def list_asset_relationships(asset_id, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
391
+ command = make_simple_command(:get, 'assetRelationships', options)
392
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetRelationshipListResponse::Representation
393
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetRelationshipListResponse
394
+ command.query['assetId'] = asset_id unless asset_id.nil?
395
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
396
+ command.query['pageToken'] = page_token unless page_token.nil?
397
+ command.query['fields'] = fields unless fields.nil?
398
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
399
+ command.query['userIp'] = user_ip unless user_ip.nil?
400
+ execute_or_queue_command(command, &block)
401
+ end
402
+
403
+ # Searches for assets based on asset metadata. The method can retrieve all
404
+ # assets or only assets owned by the content owner. This method mimics the
405
+ # functionality of the advanced search feature on the Assets page in CMS.
406
+ # @param [DateTime] created_after
407
+ # The createdAfter parameter restricts the set of returned assets to ones
408
+ # originally created on or after the specified datetime. For example: 2015-01-
409
+ # 29T23:00:00Z
410
+ # @param [DateTime] created_before
411
+ # The createdBefore parameter restricts the set of returned assets to ones
412
+ # originally created on or before the specified datetime. For example: 2015-01-
413
+ # 29T23:00:00Z
414
+ # @param [Boolean] has_conflicts
415
+ # The hasConflicts parameter enables you to only retrieve assets that have
416
+ # ownership conflicts. The only valid value is true. Setting the parameter value
417
+ # to false does not affect the results.
418
+ # @param [Boolean] include_any_providedlabel
419
+ # If includeAnyProvidedlabel parameter is set to true, will search for assets
420
+ # that contain any of the provided labels; else will search for assets that
421
+ # contain all the provided labels.
422
+ # @param [String] isrcs
423
+ # A comma-separated list of up to 50 ISRCs. If you specify a value for this
424
+ # parameter, the API server ignores any values set for the following parameters:
425
+ # q, includeAnyProvidedLabel, hasConflicts, labels, metadataSearchFields, sort,
426
+ # and type.
427
+ # @param [String] labels
428
+ # The labels parameter specifies the assets with certain asset labels that you
429
+ # want to retrieve. The parameter value is a comma-separated list of asset
430
+ # labels.
431
+ # @param [String] metadata_search_fields
432
+ # The metadataSearchField parameter specifies which metadata fields to search by.
433
+ # It is a comma-separated list of metadata field and value pairs connected by
434
+ # colon(:). For example: customId:my_custom_id,artist:Dandexx
435
+ # @param [String] on_behalf_of_content_owner
436
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
437
+ # user is acting on behalf of. This parameter supports users whose accounts are
438
+ # associated with multiple content owners.
439
+ # @param [String] ownership_restriction
440
+ # The ownershipRestriction parameter specifies the ownership filtering option
441
+ # for the search. By default the search is performed in the assets owned by
442
+ # currently authenticated user only.
443
+ # @param [String] page_token
444
+ # The pageToken parameter specifies a token that identifies a particular page of
445
+ # results to return. Set this parameter to the value of the nextPageToken value
446
+ # from the previous API response to retrieve the next page of search results.
447
+ # @param [String] q
448
+ # YouTube searches within the id, type, and customId fields for all assets as
449
+ # well as in numerous other metadata fields – such as actor, album, director,
450
+ # isrc, and tmsId – that vary for different types of assets (movies, music
451
+ # videos, etc.).
452
+ # @param [String] sort
453
+ # The sort parameter specifies how the search results should be sorted. Note
454
+ # that results are always sorted in descending order.
455
+ # @param [String] type
456
+ # The type parameter specifies the types of assets that you want to retrieve.
457
+ # The parameter value is a comma-separated list of asset types.
458
+ # @param [String] fields
459
+ # Selector specifying which fields to include in a partial response.
460
+ # @param [String] quota_user
461
+ # Available to use for quota purposes for server-side applications. Can be any
462
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
463
+ # Overrides userIp if both are provided.
464
+ # @param [String] user_ip
465
+ # IP address of the site where the request originates. Use this if you want to
466
+ # enforce per-user limits.
467
+ # @param [Google::Apis::RequestOptions] options
468
+ # Request-specific options
469
+ #
470
+ # @yield [result, err] Result & error if block supplied
471
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetSearchResponse] parsed result object
472
+ # @yieldparam err [StandardError] error object if request failed
473
+ #
474
+ # @return [Google::Apis::YoutubePartnerV1::AssetSearchResponse]
475
+ #
476
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
477
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
478
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
479
+ def list_asset_searches(created_after: nil, created_before: nil, has_conflicts: nil, include_any_providedlabel: nil, isrcs: nil, labels: nil, metadata_search_fields: nil, on_behalf_of_content_owner: nil, ownership_restriction: nil, page_token: nil, q: nil, sort: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
480
+ command = make_simple_command(:get, 'assetSearch', options)
481
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetSearchResponse::Representation
482
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetSearchResponse
483
+ command.query['createdAfter'] = created_after unless created_after.nil?
484
+ command.query['createdBefore'] = created_before unless created_before.nil?
485
+ command.query['hasConflicts'] = has_conflicts unless has_conflicts.nil?
486
+ command.query['includeAnyProvidedlabel'] = include_any_providedlabel unless include_any_providedlabel.nil?
487
+ command.query['isrcs'] = isrcs unless isrcs.nil?
488
+ command.query['labels'] = labels unless labels.nil?
489
+ command.query['metadataSearchFields'] = metadata_search_fields unless metadata_search_fields.nil?
490
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
491
+ command.query['ownershipRestriction'] = ownership_restriction unless ownership_restriction.nil?
492
+ command.query['pageToken'] = page_token unless page_token.nil?
493
+ command.query['q'] = q unless q.nil?
494
+ command.query['sort'] = sort unless sort.nil?
495
+ command.query['type'] = type unless type.nil?
496
+ command.query['fields'] = fields unless fields.nil?
497
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
498
+ command.query['userIp'] = user_ip unless user_ip.nil?
499
+ execute_or_queue_command(command, &block)
500
+ end
501
+
502
+ # Retrieves the metadata for the specified asset. Note that if the request
503
+ # identifies an asset that has been merged with another asset, meaning that
504
+ # YouTube identified the requested asset as a duplicate, then the request
505
+ # retrieves the merged, or synthesized, asset.
506
+ # @param [String] asset_id
507
+ # The assetId parameter specifies the YouTube asset ID of the asset being
508
+ # retrieved.
509
+ # @param [String] fetch_match_policy
510
+ # The fetchMatchPolicy parameter specifies the version of the asset's match
511
+ # policy that should be returned in the API response.
512
+ # @param [String] fetch_metadata
513
+ # The fetchMetadata parameter specifies the version of the asset's metadata that
514
+ # should be returned in the API response. In some cases, YouTube receives
515
+ # metadata for an asset from multiple sources, such as when different partners
516
+ # own the asset in different territories.
517
+ # @param [String] fetch_ownership
518
+ # The fetchOwnership parameter specifies the version of the asset's ownership
519
+ # data that should be returned in the API response. As with asset metadata,
520
+ # YouTube can receive asset ownership data from multiple sources.
521
+ # @param [Boolean] fetch_ownership_conflicts
522
+ # The fetchOwnershipConflicts parameter allows you to retrieve information about
523
+ # ownership conflicts.
524
+ # @param [String] on_behalf_of_content_owner
525
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
526
+ # user is acting on behalf of. This parameter supports users whose accounts are
527
+ # associated with multiple content owners.
528
+ # @param [String] fields
529
+ # Selector specifying which fields to include in a partial response.
530
+ # @param [String] quota_user
531
+ # Available to use for quota purposes for server-side applications. Can be any
532
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
533
+ # Overrides userIp if both are provided.
534
+ # @param [String] user_ip
535
+ # IP address of the site where the request originates. Use this if you want to
536
+ # enforce per-user limits.
537
+ # @param [Google::Apis::RequestOptions] options
538
+ # Request-specific options
539
+ #
540
+ # @yield [result, err] Result & error if block supplied
541
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Asset] parsed result object
542
+ # @yieldparam err [StandardError] error object if request failed
543
+ #
544
+ # @return [Google::Apis::YoutubePartnerV1::Asset]
545
+ #
546
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
547
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
548
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
549
+ def get_asset(asset_id, fetch_match_policy: nil, fetch_metadata: nil, fetch_ownership: nil, fetch_ownership_conflicts: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
550
+ command = make_simple_command(:get, 'assets/{assetId}', options)
551
+ command.response_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
552
+ command.response_class = Google::Apis::YoutubePartnerV1::Asset
553
+ command.params['assetId'] = asset_id unless asset_id.nil?
554
+ command.query['fetchMatchPolicy'] = fetch_match_policy unless fetch_match_policy.nil?
555
+ command.query['fetchMetadata'] = fetch_metadata unless fetch_metadata.nil?
556
+ command.query['fetchOwnership'] = fetch_ownership unless fetch_ownership.nil?
557
+ command.query['fetchOwnershipConflicts'] = fetch_ownership_conflicts unless fetch_ownership_conflicts.nil?
558
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
559
+ command.query['fields'] = fields unless fields.nil?
560
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
561
+ command.query['userIp'] = user_ip unless user_ip.nil?
562
+ execute_or_queue_command(command, &block)
563
+ end
564
+
565
+ # Inserts an asset with the specified metadata. After inserting an asset, you
566
+ # can set its ownership data and match policy.
567
+ # @param [Google::Apis::YoutubePartnerV1::Asset] asset_object
568
+ # @param [String] on_behalf_of_content_owner
569
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
570
+ # user is acting on behalf of. This parameter supports users whose accounts are
571
+ # associated with multiple content owners.
572
+ # @param [String] fields
573
+ # Selector specifying which fields to include in a partial response.
574
+ # @param [String] quota_user
575
+ # Available to use for quota purposes for server-side applications. Can be any
576
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
577
+ # Overrides userIp if both are provided.
578
+ # @param [String] user_ip
579
+ # IP address of the site where the request originates. Use this if you want to
580
+ # enforce per-user limits.
581
+ # @param [Google::Apis::RequestOptions] options
582
+ # Request-specific options
583
+ #
584
+ # @yield [result, err] Result & error if block supplied
585
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Asset] parsed result object
586
+ # @yieldparam err [StandardError] error object if request failed
587
+ #
588
+ # @return [Google::Apis::YoutubePartnerV1::Asset]
589
+ #
590
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
591
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
592
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
593
+ def insert_asset(asset_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
594
+ command = make_simple_command(:post, 'assets', options)
595
+ command.request_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
596
+ command.request_object = asset_object
597
+ command.response_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
598
+ command.response_class = Google::Apis::YoutubePartnerV1::Asset
599
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
600
+ command.query['fields'] = fields unless fields.nil?
601
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
602
+ command.query['userIp'] = user_ip unless user_ip.nil?
603
+ execute_or_queue_command(command, &block)
604
+ end
605
+
606
+ # Retrieves a list of assets based on asset metadata. The method can retrieve
607
+ # all assets or only assets owned by the content owner.
608
+ # Note that in cases where duplicate assets have been merged, the API response
609
+ # only contains the synthesized asset. (It does not contain the constituent
610
+ # assets that were merged into the synthesized asset.)
611
+ # @param [String] id
612
+ # The id parameter specifies a comma-separated list of YouTube Asset IDs that
613
+ # identify the assets you want to retrieve. As noted in the method description,
614
+ # if you try to retrieve an asset that YouTube identified as a duplicate and
615
+ # merged with another asset, the API response only returns the synthesized asset.
616
+ # In that case, the aliasId property in the asset resource specifies a list of
617
+ # other asset IDs that can be used to identify that asset.
618
+ # Also note that the API response does not contain duplicates. As such, if your
619
+ # request identifies three asset IDs, and all of those have been merged into a
620
+ # single asset, then the API response identifies one matching asset.
621
+ # @param [String] fetch_match_policy
622
+ # The fetchMatchPolicy parameter specifies the version of the asset's match
623
+ # policy that should be returned in the API response.
624
+ # @param [String] fetch_metadata
625
+ # The fetchMetadata parameter specifies the version of the asset's metadata that
626
+ # should be returned in the API response. In some cases, YouTube receives
627
+ # metadata for an asset from multiple sources, such as when different partners
628
+ # own the asset in different territories.
629
+ # @param [String] fetch_ownership
630
+ # The fetchOwnership parameter specifies the version of the asset's ownership
631
+ # data that should be returned in the API response. As with asset metadata,
632
+ # YouTube can receive asset ownership data from multiple sources.
633
+ # @param [Boolean] fetch_ownership_conflicts
634
+ # The fetchOwnershipConflicts parameter allows you to retrieve information about
635
+ # ownership conflicts.
636
+ # @param [String] on_behalf_of_content_owner
637
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
638
+ # user is acting on behalf of. This parameter supports users whose accounts are
639
+ # associated with multiple content owners.
640
+ # @param [String] fields
641
+ # Selector specifying which fields to include in a partial response.
642
+ # @param [String] quota_user
643
+ # Available to use for quota purposes for server-side applications. Can be any
644
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
645
+ # Overrides userIp if both are provided.
646
+ # @param [String] user_ip
647
+ # IP address of the site where the request originates. Use this if you want to
648
+ # enforce per-user limits.
649
+ # @param [Google::Apis::RequestOptions] options
650
+ # Request-specific options
651
+ #
652
+ # @yield [result, err] Result & error if block supplied
653
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetListResponse] parsed result object
654
+ # @yieldparam err [StandardError] error object if request failed
655
+ #
656
+ # @return [Google::Apis::YoutubePartnerV1::AssetListResponse]
657
+ #
658
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
659
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
660
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
661
+ def list_assets(id, fetch_match_policy: nil, fetch_metadata: nil, fetch_ownership: nil, fetch_ownership_conflicts: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
662
+ command = make_simple_command(:get, 'assets', options)
663
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetListResponse::Representation
664
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetListResponse
665
+ command.query['fetchMatchPolicy'] = fetch_match_policy unless fetch_match_policy.nil?
666
+ command.query['fetchMetadata'] = fetch_metadata unless fetch_metadata.nil?
667
+ command.query['fetchOwnership'] = fetch_ownership unless fetch_ownership.nil?
668
+ command.query['fetchOwnershipConflicts'] = fetch_ownership_conflicts unless fetch_ownership_conflicts.nil?
669
+ command.query['id'] = id unless id.nil?
670
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
671
+ command.query['fields'] = fields unless fields.nil?
672
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
673
+ command.query['userIp'] = user_ip unless user_ip.nil?
674
+ execute_or_queue_command(command, &block)
675
+ end
676
+
677
+ # Updates the metadata for the specified asset. This method supports patch
678
+ # semantics.
679
+ # @param [String] asset_id
680
+ # The assetId parameter specifies the YouTube asset ID of the asset being
681
+ # updated.
682
+ # @param [Google::Apis::YoutubePartnerV1::Asset] asset_object
683
+ # @param [String] on_behalf_of_content_owner
684
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
685
+ # user is acting on behalf of. This parameter supports users whose accounts are
686
+ # associated with multiple content owners.
687
+ # @param [String] fields
688
+ # Selector specifying which fields to include in a partial response.
689
+ # @param [String] quota_user
690
+ # Available to use for quota purposes for server-side applications. Can be any
691
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
692
+ # Overrides userIp if both are provided.
693
+ # @param [String] user_ip
694
+ # IP address of the site where the request originates. Use this if you want to
695
+ # enforce per-user limits.
696
+ # @param [Google::Apis::RequestOptions] options
697
+ # Request-specific options
698
+ #
699
+ # @yield [result, err] Result & error if block supplied
700
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Asset] parsed result object
701
+ # @yieldparam err [StandardError] error object if request failed
702
+ #
703
+ # @return [Google::Apis::YoutubePartnerV1::Asset]
704
+ #
705
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
706
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
707
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
708
+ def patch_asset(asset_id, asset_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
709
+ command = make_simple_command(:patch, 'assets/{assetId}', options)
710
+ command.request_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
711
+ command.request_object = asset_object
712
+ command.response_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
713
+ command.response_class = Google::Apis::YoutubePartnerV1::Asset
714
+ command.params['assetId'] = asset_id unless asset_id.nil?
715
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
716
+ command.query['fields'] = fields unless fields.nil?
717
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
718
+ command.query['userIp'] = user_ip unless user_ip.nil?
719
+ execute_or_queue_command(command, &block)
720
+ end
721
+
722
+ # Updates the metadata for the specified asset.
723
+ # @param [String] asset_id
724
+ # The assetId parameter specifies the YouTube asset ID of the asset being
725
+ # updated.
726
+ # @param [Google::Apis::YoutubePartnerV1::Asset] asset_object
727
+ # @param [String] on_behalf_of_content_owner
728
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
729
+ # user is acting on behalf of. This parameter supports users whose accounts are
730
+ # associated with multiple content owners.
731
+ # @param [String] fields
732
+ # Selector specifying which fields to include in a partial response.
733
+ # @param [String] quota_user
734
+ # Available to use for quota purposes for server-side applications. Can be any
735
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
736
+ # Overrides userIp if both are provided.
737
+ # @param [String] user_ip
738
+ # IP address of the site where the request originates. Use this if you want to
739
+ # enforce per-user limits.
740
+ # @param [Google::Apis::RequestOptions] options
741
+ # Request-specific options
742
+ #
743
+ # @yield [result, err] Result & error if block supplied
744
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Asset] parsed result object
745
+ # @yieldparam err [StandardError] error object if request failed
746
+ #
747
+ # @return [Google::Apis::YoutubePartnerV1::Asset]
748
+ #
749
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
750
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
751
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
752
+ def update_asset(asset_id, asset_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
753
+ command = make_simple_command(:put, 'assets/{assetId}', options)
754
+ command.request_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
755
+ command.request_object = asset_object
756
+ command.response_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
757
+ command.response_class = Google::Apis::YoutubePartnerV1::Asset
758
+ command.params['assetId'] = asset_id unless asset_id.nil?
759
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
760
+ command.query['fields'] = fields unless fields.nil?
761
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
762
+ command.query['userIp'] = user_ip unless user_ip.nil?
763
+ execute_or_queue_command(command, &block)
764
+ end
765
+
766
+ # Deletes a specified campaign for an owner.
767
+ # @param [String] campaign_id
768
+ # The campaignId parameter specifies the YouTube campaign ID of the campaign
769
+ # being deleted.
770
+ # @param [String] on_behalf_of_content_owner
771
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
772
+ # user is acting on behalf of. This parameter supports users whose accounts are
773
+ # associated with multiple content owners.
774
+ # @param [String] fields
775
+ # Selector specifying which fields to include in a partial response.
776
+ # @param [String] quota_user
777
+ # Available to use for quota purposes for server-side applications. Can be any
778
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
779
+ # Overrides userIp if both are provided.
780
+ # @param [String] user_ip
781
+ # IP address of the site where the request originates. Use this if you want to
782
+ # enforce per-user limits.
783
+ # @param [Google::Apis::RequestOptions] options
784
+ # Request-specific options
785
+ #
786
+ # @yield [result, err] Result & error if block supplied
787
+ # @yieldparam result [NilClass] No result returned for this method
788
+ # @yieldparam err [StandardError] error object if request failed
789
+ #
790
+ # @return [void]
791
+ #
792
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
793
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
794
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
795
+ def delete_campaign(campaign_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
796
+ command = make_simple_command(:delete, 'campaigns/{campaignId}', options)
797
+ command.params['campaignId'] = campaign_id unless campaign_id.nil?
798
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
799
+ command.query['fields'] = fields unless fields.nil?
800
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
801
+ command.query['userIp'] = user_ip unless user_ip.nil?
802
+ execute_or_queue_command(command, &block)
803
+ end
804
+
805
+ # Retrieves a particular campaign for an owner.
806
+ # @param [String] campaign_id
807
+ # The campaignId parameter specifies the YouTube campaign ID of the campaign
808
+ # being retrieved.
809
+ # @param [String] on_behalf_of_content_owner
810
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
811
+ # user is acting on behalf of. This parameter supports users whose accounts are
812
+ # associated with multiple content owners.
813
+ # @param [String] fields
814
+ # Selector specifying which fields to include in a partial response.
815
+ # @param [String] quota_user
816
+ # Available to use for quota purposes for server-side applications. Can be any
817
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
818
+ # Overrides userIp if both are provided.
819
+ # @param [String] user_ip
820
+ # IP address of the site where the request originates. Use this if you want to
821
+ # enforce per-user limits.
822
+ # @param [Google::Apis::RequestOptions] options
823
+ # Request-specific options
824
+ #
825
+ # @yield [result, err] Result & error if block supplied
826
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Campaign] parsed result object
827
+ # @yieldparam err [StandardError] error object if request failed
828
+ #
829
+ # @return [Google::Apis::YoutubePartnerV1::Campaign]
830
+ #
831
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
832
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
833
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
834
+ def get_campaign(campaign_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
835
+ command = make_simple_command(:get, 'campaigns/{campaignId}', options)
836
+ command.response_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
837
+ command.response_class = Google::Apis::YoutubePartnerV1::Campaign
838
+ command.params['campaignId'] = campaign_id unless campaign_id.nil?
839
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
840
+ command.query['fields'] = fields unless fields.nil?
841
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
842
+ command.query['userIp'] = user_ip unless user_ip.nil?
843
+ execute_or_queue_command(command, &block)
844
+ end
845
+
846
+ # Insert a new campaign for an owner using the specified campaign data.
847
+ # @param [Google::Apis::YoutubePartnerV1::Campaign] campaign_object
848
+ # @param [String] on_behalf_of_content_owner
849
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
850
+ # user is acting on behalf of. This parameter supports users whose accounts are
851
+ # associated with multiple content owners.
852
+ # @param [String] fields
853
+ # Selector specifying which fields to include in a partial response.
854
+ # @param [String] quota_user
855
+ # Available to use for quota purposes for server-side applications. Can be any
856
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
857
+ # Overrides userIp if both are provided.
858
+ # @param [String] user_ip
859
+ # IP address of the site where the request originates. Use this if you want to
860
+ # enforce per-user limits.
861
+ # @param [Google::Apis::RequestOptions] options
862
+ # Request-specific options
863
+ #
864
+ # @yield [result, err] Result & error if block supplied
865
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Campaign] parsed result object
866
+ # @yieldparam err [StandardError] error object if request failed
867
+ #
868
+ # @return [Google::Apis::YoutubePartnerV1::Campaign]
869
+ #
870
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
871
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
872
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
873
+ def insert_campaign(campaign_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
874
+ command = make_simple_command(:post, 'campaigns', options)
875
+ command.request_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
876
+ command.request_object = campaign_object
877
+ command.response_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
878
+ command.response_class = Google::Apis::YoutubePartnerV1::Campaign
879
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
880
+ command.query['fields'] = fields unless fields.nil?
881
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
882
+ command.query['userIp'] = user_ip unless user_ip.nil?
883
+ execute_or_queue_command(command, &block)
884
+ end
885
+
886
+ # Retrieves a list of campaigns for an owner.
887
+ # @param [String] on_behalf_of_content_owner
888
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
889
+ # user is acting on behalf of. This parameter supports users whose accounts are
890
+ # associated with multiple content owners.
891
+ # @param [String] page_token
892
+ # The pageToken parameter specifies a token that identifies a particular page of
893
+ # results to return. For example, set this parameter to the value of the
894
+ # nextPageToken value from the previous API response to retrieve the next page
895
+ # of search results.
896
+ # @param [String] fields
897
+ # Selector specifying which fields to include in a partial response.
898
+ # @param [String] quota_user
899
+ # Available to use for quota purposes for server-side applications. Can be any
900
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
901
+ # Overrides userIp if both are provided.
902
+ # @param [String] user_ip
903
+ # IP address of the site where the request originates. Use this if you want to
904
+ # enforce per-user limits.
905
+ # @param [Google::Apis::RequestOptions] options
906
+ # Request-specific options
907
+ #
908
+ # @yield [result, err] Result & error if block supplied
909
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::CampaignList] parsed result object
910
+ # @yieldparam err [StandardError] error object if request failed
911
+ #
912
+ # @return [Google::Apis::YoutubePartnerV1::CampaignList]
913
+ #
914
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
915
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
916
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
917
+ def list_campaigns(on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
918
+ command = make_simple_command(:get, 'campaigns', options)
919
+ command.response_representation = Google::Apis::YoutubePartnerV1::CampaignList::Representation
920
+ command.response_class = Google::Apis::YoutubePartnerV1::CampaignList
921
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
922
+ command.query['pageToken'] = page_token unless page_token.nil?
923
+ command.query['fields'] = fields unless fields.nil?
924
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
925
+ command.query['userIp'] = user_ip unless user_ip.nil?
926
+ execute_or_queue_command(command, &block)
927
+ end
928
+
929
+ # Update the data for a specific campaign. This method supports patch semantics.
930
+ # @param [String] campaign_id
931
+ # The campaignId parameter specifies the YouTube campaign ID of the campaign
932
+ # being retrieved.
933
+ # @param [Google::Apis::YoutubePartnerV1::Campaign] campaign_object
934
+ # @param [String] on_behalf_of_content_owner
935
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
936
+ # user is acting on behalf of. This parameter supports users whose accounts are
937
+ # associated with multiple content owners.
938
+ # @param [String] fields
939
+ # Selector specifying which fields to include in a partial response.
940
+ # @param [String] quota_user
941
+ # Available to use for quota purposes for server-side applications. Can be any
942
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
943
+ # Overrides userIp if both are provided.
944
+ # @param [String] user_ip
945
+ # IP address of the site where the request originates. Use this if you want to
946
+ # enforce per-user limits.
947
+ # @param [Google::Apis::RequestOptions] options
948
+ # Request-specific options
949
+ #
950
+ # @yield [result, err] Result & error if block supplied
951
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Campaign] parsed result object
952
+ # @yieldparam err [StandardError] error object if request failed
953
+ #
954
+ # @return [Google::Apis::YoutubePartnerV1::Campaign]
955
+ #
956
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
957
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
958
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
959
+ def patch_campaign(campaign_id, campaign_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
960
+ command = make_simple_command(:patch, 'campaigns/{campaignId}', options)
961
+ command.request_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
962
+ command.request_object = campaign_object
963
+ command.response_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
964
+ command.response_class = Google::Apis::YoutubePartnerV1::Campaign
965
+ command.params['campaignId'] = campaign_id unless campaign_id.nil?
966
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
967
+ command.query['fields'] = fields unless fields.nil?
968
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
969
+ command.query['userIp'] = user_ip unless user_ip.nil?
970
+ execute_or_queue_command(command, &block)
971
+ end
972
+
973
+ # Update the data for a specific campaign.
974
+ # @param [String] campaign_id
975
+ # The campaignId parameter specifies the YouTube campaign ID of the campaign
976
+ # being retrieved.
977
+ # @param [Google::Apis::YoutubePartnerV1::Campaign] campaign_object
978
+ # @param [String] on_behalf_of_content_owner
979
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
980
+ # user is acting on behalf of. This parameter supports users whose accounts are
981
+ # associated with multiple content owners.
982
+ # @param [String] fields
983
+ # Selector specifying which fields to include in a partial response.
984
+ # @param [String] quota_user
985
+ # Available to use for quota purposes for server-side applications. Can be any
986
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
987
+ # Overrides userIp if both are provided.
988
+ # @param [String] user_ip
989
+ # IP address of the site where the request originates. Use this if you want to
990
+ # enforce per-user limits.
991
+ # @param [Google::Apis::RequestOptions] options
992
+ # Request-specific options
993
+ #
994
+ # @yield [result, err] Result & error if block supplied
995
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Campaign] parsed result object
996
+ # @yieldparam err [StandardError] error object if request failed
997
+ #
998
+ # @return [Google::Apis::YoutubePartnerV1::Campaign]
999
+ #
1000
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1001
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1002
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1003
+ def update_campaign(campaign_id, campaign_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1004
+ command = make_simple_command(:put, 'campaigns/{campaignId}', options)
1005
+ command.request_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
1006
+ command.request_object = campaign_object
1007
+ command.response_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
1008
+ command.response_class = Google::Apis::YoutubePartnerV1::Campaign
1009
+ command.params['campaignId'] = campaign_id unless campaign_id.nil?
1010
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1011
+ command.query['fields'] = fields unless fields.nil?
1012
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1013
+ command.query['userIp'] = user_ip unless user_ip.nil?
1014
+ execute_or_queue_command(command, &block)
1015
+ end
1016
+
1017
+ # Retrieves the claim history for a specified claim.
1018
+ # @param [String] claim_id
1019
+ # The claimId parameter specifies the YouTube claim ID of the claim for which
1020
+ # you are retrieving the claim history.
1021
+ # @param [String] on_behalf_of_content_owner
1022
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1023
+ # user is acting on behalf of. This parameter supports users whose accounts are
1024
+ # associated with multiple content owners.
1025
+ # @param [String] fields
1026
+ # Selector specifying which fields to include in a partial response.
1027
+ # @param [String] quota_user
1028
+ # Available to use for quota purposes for server-side applications. Can be any
1029
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1030
+ # Overrides userIp if both are provided.
1031
+ # @param [String] user_ip
1032
+ # IP address of the site where the request originates. Use this if you want to
1033
+ # enforce per-user limits.
1034
+ # @param [Google::Apis::RequestOptions] options
1035
+ # Request-specific options
1036
+ #
1037
+ # @yield [result, err] Result & error if block supplied
1038
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ClaimHistory] parsed result object
1039
+ # @yieldparam err [StandardError] error object if request failed
1040
+ #
1041
+ # @return [Google::Apis::YoutubePartnerV1::ClaimHistory]
1042
+ #
1043
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1044
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1045
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1046
+ def get_claim_history(claim_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1047
+ command = make_simple_command(:get, 'claimHistory/{claimId}', options)
1048
+ command.response_representation = Google::Apis::YoutubePartnerV1::ClaimHistory::Representation
1049
+ command.response_class = Google::Apis::YoutubePartnerV1::ClaimHistory
1050
+ command.params['claimId'] = claim_id unless claim_id.nil?
1051
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1052
+ command.query['fields'] = fields unless fields.nil?
1053
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1054
+ command.query['userIp'] = user_ip unless user_ip.nil?
1055
+ execute_or_queue_command(command, &block)
1056
+ end
1057
+
1058
+ # Retrieves a list of claims that match the search criteria. You can search for
1059
+ # claims that are associated with a specific asset or video or that match a
1060
+ # specified query string.
1061
+ # @param [String] asset_id
1062
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
1063
+ # you are retrieving claims.
1064
+ # @param [String] content_type
1065
+ # The contentType parameter specifies the content type of claims that you want
1066
+ # to retrieve.
1067
+ # @param [DateTime] created_after
1068
+ # The createdAfter parameter allows you to restrict the set of returned claims
1069
+ # to ones originally created after the specified date.
1070
+ # @param [DateTime] created_before
1071
+ # The createdBefore parameter allows you to restrict the set of returned claims
1072
+ # to ones originally created before the specified date.
1073
+ # @param [String] inactive_reasons
1074
+ # The inactiveReasons parameter allows you to specify what kind of inactive
1075
+ # claims you want to find based on the reasons why the claims became inactive.
1076
+ # @param [Boolean] include_third_party_claims
1077
+ # Used along with the videoId parameter this parameter determines whether or not
1078
+ # to include third party claims in the search results.
1079
+ # @param [String] on_behalf_of_content_owner
1080
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1081
+ # user is acting on behalf of. This parameter supports users whose accounts are
1082
+ # associated with multiple content owners.
1083
+ # @param [String] origin
1084
+ # The origin parameter specifies the origins you want to find claims for. It is
1085
+ # a comma-separated list of origin values.
1086
+ # @param [String] page_token
1087
+ # The pageToken parameter specifies a token that identifies a particular page of
1088
+ # results to return. For example, set this parameter to the value of the
1089
+ # nextPageToken value from the previous API response to retrieve the next page
1090
+ # of search results.
1091
+ # @param [Boolean] partner_uploaded
1092
+ # The partnerUploaded parameter specifies whether you want to filter your search
1093
+ # results to only partner uploaded or non partner uploaded claims.
1094
+ # @param [String] q
1095
+ # The q parameter specifies the query string to use to filter search results.
1096
+ # YouTube searches for the query string in the following claim fields:
1097
+ # video_title, video_keywords, user_name, isrc, iswc, grid, custom_id, and in
1098
+ # the content owner's email address.
1099
+ # @param [String] reference_id
1100
+ # The referenceId parameter specifies the YouTube reference ID of the reference
1101
+ # for which you are retrieving claims.
1102
+ # @param [String] sort
1103
+ # The sort parameter specifies the method that will be used to order resources
1104
+ # in the API response. The default value is date. However, if the status
1105
+ # parameter value is either appealed, disputed, pending, potential, or
1106
+ # routedForReview, then results will be sorted by the time that the claim review
1107
+ # period expires.
1108
+ # @param [String] status
1109
+ # The status parameter restricts your results to only claims in the specified
1110
+ # status.
1111
+ # @param [String] video_id
1112
+ # The videoId parameter specifies comma-separated list of YouTube video IDs for
1113
+ # which you are retrieving claims.
1114
+ # @param [String] fields
1115
+ # Selector specifying which fields to include in a partial response.
1116
+ # @param [String] quota_user
1117
+ # Available to use for quota purposes for server-side applications. Can be any
1118
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1119
+ # Overrides userIp if both are provided.
1120
+ # @param [String] user_ip
1121
+ # IP address of the site where the request originates. Use this if you want to
1122
+ # enforce per-user limits.
1123
+ # @param [Google::Apis::RequestOptions] options
1124
+ # Request-specific options
1125
+ #
1126
+ # @yield [result, err] Result & error if block supplied
1127
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ClaimSearchResponse] parsed result object
1128
+ # @yieldparam err [StandardError] error object if request failed
1129
+ #
1130
+ # @return [Google::Apis::YoutubePartnerV1::ClaimSearchResponse]
1131
+ #
1132
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1133
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1134
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1135
+ def list_claim_searches(asset_id: nil, content_type: nil, created_after: nil, created_before: nil, inactive_reasons: nil, include_third_party_claims: nil, on_behalf_of_content_owner: nil, origin: nil, page_token: nil, partner_uploaded: nil, q: nil, reference_id: nil, sort: nil, status: nil, video_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1136
+ command = make_simple_command(:get, 'claimSearch', options)
1137
+ command.response_representation = Google::Apis::YoutubePartnerV1::ClaimSearchResponse::Representation
1138
+ command.response_class = Google::Apis::YoutubePartnerV1::ClaimSearchResponse
1139
+ command.query['assetId'] = asset_id unless asset_id.nil?
1140
+ command.query['contentType'] = content_type unless content_type.nil?
1141
+ command.query['createdAfter'] = created_after unless created_after.nil?
1142
+ command.query['createdBefore'] = created_before unless created_before.nil?
1143
+ command.query['inactiveReasons'] = inactive_reasons unless inactive_reasons.nil?
1144
+ command.query['includeThirdPartyClaims'] = include_third_party_claims unless include_third_party_claims.nil?
1145
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1146
+ command.query['origin'] = origin unless origin.nil?
1147
+ command.query['pageToken'] = page_token unless page_token.nil?
1148
+ command.query['partnerUploaded'] = partner_uploaded unless partner_uploaded.nil?
1149
+ command.query['q'] = q unless q.nil?
1150
+ command.query['referenceId'] = reference_id unless reference_id.nil?
1151
+ command.query['sort'] = sort unless sort.nil?
1152
+ command.query['status'] = status unless status.nil?
1153
+ command.query['videoId'] = video_id unless video_id.nil?
1154
+ command.query['fields'] = fields unless fields.nil?
1155
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1156
+ command.query['userIp'] = user_ip unless user_ip.nil?
1157
+ execute_or_queue_command(command, &block)
1158
+ end
1159
+
1160
+ # Retrieves a specific claim by ID.
1161
+ # @param [String] claim_id
1162
+ # The claimId parameter specifies the claim ID of the claim being retrieved.
1163
+ # @param [String] on_behalf_of_content_owner
1164
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1165
+ # user is acting on behalf of. This parameter supports users whose accounts are
1166
+ # associated with multiple content owners.
1167
+ # @param [String] fields
1168
+ # Selector specifying which fields to include in a partial response.
1169
+ # @param [String] quota_user
1170
+ # Available to use for quota purposes for server-side applications. Can be any
1171
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1172
+ # Overrides userIp if both are provided.
1173
+ # @param [String] user_ip
1174
+ # IP address of the site where the request originates. Use this if you want to
1175
+ # enforce per-user limits.
1176
+ # @param [Google::Apis::RequestOptions] options
1177
+ # Request-specific options
1178
+ #
1179
+ # @yield [result, err] Result & error if block supplied
1180
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Claim] parsed result object
1181
+ # @yieldparam err [StandardError] error object if request failed
1182
+ #
1183
+ # @return [Google::Apis::YoutubePartnerV1::Claim]
1184
+ #
1185
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1186
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1187
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1188
+ def get_claim(claim_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1189
+ command = make_simple_command(:get, 'claims/{claimId}', options)
1190
+ command.response_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1191
+ command.response_class = Google::Apis::YoutubePartnerV1::Claim
1192
+ command.params['claimId'] = claim_id unless claim_id.nil?
1193
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1194
+ command.query['fields'] = fields unless fields.nil?
1195
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1196
+ command.query['userIp'] = user_ip unless user_ip.nil?
1197
+ execute_or_queue_command(command, &block)
1198
+ end
1199
+
1200
+ # Creates a claim. The video being claimed must have been uploaded to a channel
1201
+ # associated with the same content owner as the API user sending the request.
1202
+ # You can set the claim's policy in any of the following ways:
1203
+ # - Use the claim resource's policy property to identify a saved policy by its
1204
+ # unique ID.
1205
+ # - Use the claim resource's policy property to specify a custom set of rules.
1206
+ # @param [Google::Apis::YoutubePartnerV1::Claim] claim_object
1207
+ # @param [Boolean] is_manual_claim
1208
+ # restricted
1209
+ # @param [String] on_behalf_of_content_owner
1210
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1211
+ # user is acting on behalf of. This parameter supports users whose accounts are
1212
+ # associated with multiple content owners.
1213
+ # @param [String] fields
1214
+ # Selector specifying which fields to include in a partial response.
1215
+ # @param [String] quota_user
1216
+ # Available to use for quota purposes for server-side applications. Can be any
1217
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1218
+ # Overrides userIp if both are provided.
1219
+ # @param [String] user_ip
1220
+ # IP address of the site where the request originates. Use this if you want to
1221
+ # enforce per-user limits.
1222
+ # @param [Google::Apis::RequestOptions] options
1223
+ # Request-specific options
1224
+ #
1225
+ # @yield [result, err] Result & error if block supplied
1226
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Claim] parsed result object
1227
+ # @yieldparam err [StandardError] error object if request failed
1228
+ #
1229
+ # @return [Google::Apis::YoutubePartnerV1::Claim]
1230
+ #
1231
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1232
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1233
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1234
+ def insert_claim(claim_object = nil, is_manual_claim: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1235
+ command = make_simple_command(:post, 'claims', options)
1236
+ command.request_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1237
+ command.request_object = claim_object
1238
+ command.response_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1239
+ command.response_class = Google::Apis::YoutubePartnerV1::Claim
1240
+ command.query['isManualClaim'] = is_manual_claim unless is_manual_claim.nil?
1241
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1242
+ command.query['fields'] = fields unless fields.nil?
1243
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1244
+ command.query['userIp'] = user_ip unless user_ip.nil?
1245
+ execute_or_queue_command(command, &block)
1246
+ end
1247
+
1248
+ # Retrieves a list of claims administered by the content owner associated with
1249
+ # the currently authenticated user. Results are sorted in descending order of
1250
+ # creation time.
1251
+ # @param [String] asset_id
1252
+ # Use the claimSearch.list method's assetId parameter to search for claim
1253
+ # snippets by asset ID. You can then retrieve the claim resources for those
1254
+ # claims by using this method's id parameter to specify a comma-separated list
1255
+ # of claim IDs.
1256
+ # @param [String] id
1257
+ # The id parameter specifies a list of comma-separated YouTube claim IDs to
1258
+ # retrieve.
1259
+ # @param [String] on_behalf_of_content_owner
1260
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1261
+ # user is acting on behalf of. This parameter supports users whose accounts are
1262
+ # associated with multiple content owners.
1263
+ # @param [String] page_token
1264
+ # The pageToken parameter specifies a token that identifies a particular page of
1265
+ # results to return. For example, set this parameter to the value of the
1266
+ # nextPageToken value from the previous API response to retrieve the next page
1267
+ # of search results.
1268
+ # @param [String] q
1269
+ # Use the claimSearch.list method's q parameter to search for claim snippets
1270
+ # that match a particular query string. You can then retrieve the claim
1271
+ # resources for those claims by using this method's id parameter to specify a
1272
+ # comma-separated list of claim IDs.
1273
+ # @param [String] video_id
1274
+ # Use the claimSearch.list method's videoId parameter to search for claim
1275
+ # snippets by video ID. You can then retrieve the claim resources for those
1276
+ # claims by using this method's id parameter to specify a comma-separated list
1277
+ # of claim IDs.
1278
+ # @param [String] fields
1279
+ # Selector specifying which fields to include in a partial response.
1280
+ # @param [String] quota_user
1281
+ # Available to use for quota purposes for server-side applications. Can be any
1282
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1283
+ # Overrides userIp if both are provided.
1284
+ # @param [String] user_ip
1285
+ # IP address of the site where the request originates. Use this if you want to
1286
+ # enforce per-user limits.
1287
+ # @param [Google::Apis::RequestOptions] options
1288
+ # Request-specific options
1289
+ #
1290
+ # @yield [result, err] Result & error if block supplied
1291
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ClaimListResponse] parsed result object
1292
+ # @yieldparam err [StandardError] error object if request failed
1293
+ #
1294
+ # @return [Google::Apis::YoutubePartnerV1::ClaimListResponse]
1295
+ #
1296
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1297
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1298
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1299
+ def list_claims(asset_id: nil, id: nil, on_behalf_of_content_owner: nil, page_token: nil, q: nil, video_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1300
+ command = make_simple_command(:get, 'claims', options)
1301
+ command.response_representation = Google::Apis::YoutubePartnerV1::ClaimListResponse::Representation
1302
+ command.response_class = Google::Apis::YoutubePartnerV1::ClaimListResponse
1303
+ command.query['assetId'] = asset_id unless asset_id.nil?
1304
+ command.query['id'] = id unless id.nil?
1305
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1306
+ command.query['pageToken'] = page_token unless page_token.nil?
1307
+ command.query['q'] = q unless q.nil?
1308
+ command.query['videoId'] = video_id unless video_id.nil?
1309
+ command.query['fields'] = fields unless fields.nil?
1310
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1311
+ command.query['userIp'] = user_ip unless user_ip.nil?
1312
+ execute_or_queue_command(command, &block)
1313
+ end
1314
+
1315
+ # Updates an existing claim by either changing its policy or its status. You can
1316
+ # update a claim's status from active to inactive to effectively release the
1317
+ # claim. This method supports patch semantics.
1318
+ # @param [String] claim_id
1319
+ # The claimId parameter specifies the claim ID of the claim being updated.
1320
+ # @param [Google::Apis::YoutubePartnerV1::Claim] claim_object
1321
+ # @param [String] on_behalf_of_content_owner
1322
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1323
+ # user is acting on behalf of. This parameter supports users whose accounts are
1324
+ # associated with multiple content owners.
1325
+ # @param [String] fields
1326
+ # Selector specifying which fields to include in a partial response.
1327
+ # @param [String] quota_user
1328
+ # Available to use for quota purposes for server-side applications. Can be any
1329
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1330
+ # Overrides userIp if both are provided.
1331
+ # @param [String] user_ip
1332
+ # IP address of the site where the request originates. Use this if you want to
1333
+ # enforce per-user limits.
1334
+ # @param [Google::Apis::RequestOptions] options
1335
+ # Request-specific options
1336
+ #
1337
+ # @yield [result, err] Result & error if block supplied
1338
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Claim] parsed result object
1339
+ # @yieldparam err [StandardError] error object if request failed
1340
+ #
1341
+ # @return [Google::Apis::YoutubePartnerV1::Claim]
1342
+ #
1343
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1344
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1345
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1346
+ def patch_claim(claim_id, claim_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1347
+ command = make_simple_command(:patch, 'claims/{claimId}', options)
1348
+ command.request_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1349
+ command.request_object = claim_object
1350
+ command.response_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1351
+ command.response_class = Google::Apis::YoutubePartnerV1::Claim
1352
+ command.params['claimId'] = claim_id unless claim_id.nil?
1353
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1354
+ command.query['fields'] = fields unless fields.nil?
1355
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1356
+ command.query['userIp'] = user_ip unless user_ip.nil?
1357
+ execute_or_queue_command(command, &block)
1358
+ end
1359
+
1360
+ # Updates an existing claim by either changing its policy or its status. You can
1361
+ # update a claim's status from active to inactive to effectively release the
1362
+ # claim.
1363
+ # @param [String] claim_id
1364
+ # The claimId parameter specifies the claim ID of the claim being updated.
1365
+ # @param [Google::Apis::YoutubePartnerV1::Claim] claim_object
1366
+ # @param [String] on_behalf_of_content_owner
1367
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1368
+ # user is acting on behalf of. This parameter supports users whose accounts are
1369
+ # associated with multiple content owners.
1370
+ # @param [String] fields
1371
+ # Selector specifying which fields to include in a partial response.
1372
+ # @param [String] quota_user
1373
+ # Available to use for quota purposes for server-side applications. Can be any
1374
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1375
+ # Overrides userIp if both are provided.
1376
+ # @param [String] user_ip
1377
+ # IP address of the site where the request originates. Use this if you want to
1378
+ # enforce per-user limits.
1379
+ # @param [Google::Apis::RequestOptions] options
1380
+ # Request-specific options
1381
+ #
1382
+ # @yield [result, err] Result & error if block supplied
1383
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Claim] parsed result object
1384
+ # @yieldparam err [StandardError] error object if request failed
1385
+ #
1386
+ # @return [Google::Apis::YoutubePartnerV1::Claim]
1387
+ #
1388
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1389
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1390
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1391
+ def update_claim(claim_id, claim_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1392
+ command = make_simple_command(:put, 'claims/{claimId}', options)
1393
+ command.request_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1394
+ command.request_object = claim_object
1395
+ command.response_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1396
+ command.response_class = Google::Apis::YoutubePartnerV1::Claim
1397
+ command.params['claimId'] = claim_id unless claim_id.nil?
1398
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1399
+ command.query['fields'] = fields unless fields.nil?
1400
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1401
+ command.query['userIp'] = user_ip unless user_ip.nil?
1402
+ execute_or_queue_command(command, &block)
1403
+ end
1404
+
1405
+ # Retrieves advertising options for the content owner associated with the
1406
+ # authenticated user.
1407
+ # @param [String] on_behalf_of_content_owner
1408
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1409
+ # user is acting on behalf of. This parameter supports users whose accounts are
1410
+ # associated with multiple content owners.
1411
+ # @param [String] fields
1412
+ # Selector specifying which fields to include in a partial response.
1413
+ # @param [String] quota_user
1414
+ # Available to use for quota purposes for server-side applications. Can be any
1415
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1416
+ # Overrides userIp if both are provided.
1417
+ # @param [String] user_ip
1418
+ # IP address of the site where the request originates. Use this if you want to
1419
+ # enforce per-user limits.
1420
+ # @param [Google::Apis::RequestOptions] options
1421
+ # Request-specific options
1422
+ #
1423
+ # @yield [result, err] Result & error if block supplied
1424
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption] parsed result object
1425
+ # @yieldparam err [StandardError] error object if request failed
1426
+ #
1427
+ # @return [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption]
1428
+ #
1429
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1430
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1431
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1432
+ def get_content_owner_advertising_option(on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1433
+ command = make_simple_command(:get, 'contentOwnerAdvertisingOptions', options)
1434
+ command.response_representation = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption::Representation
1435
+ command.response_class = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption
1436
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1437
+ command.query['fields'] = fields unless fields.nil?
1438
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1439
+ command.query['userIp'] = user_ip unless user_ip.nil?
1440
+ execute_or_queue_command(command, &block)
1441
+ end
1442
+
1443
+ # Updates advertising options for the content owner associated with the
1444
+ # authenticated API user. This method supports patch semantics.
1445
+ # @param [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption] content_owner_advertising_option_object
1446
+ # @param [String] on_behalf_of_content_owner
1447
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1448
+ # user is acting on behalf of. This parameter supports users whose accounts are
1449
+ # associated with multiple content owners.
1450
+ # @param [String] fields
1451
+ # Selector specifying which fields to include in a partial response.
1452
+ # @param [String] quota_user
1453
+ # Available to use for quota purposes for server-side applications. Can be any
1454
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1455
+ # Overrides userIp if both are provided.
1456
+ # @param [String] user_ip
1457
+ # IP address of the site where the request originates. Use this if you want to
1458
+ # enforce per-user limits.
1459
+ # @param [Google::Apis::RequestOptions] options
1460
+ # Request-specific options
1461
+ #
1462
+ # @yield [result, err] Result & error if block supplied
1463
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption] parsed result object
1464
+ # @yieldparam err [StandardError] error object if request failed
1465
+ #
1466
+ # @return [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption]
1467
+ #
1468
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1469
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1470
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1471
+ def patch_content_owner_advertising_option(content_owner_advertising_option_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1472
+ command = make_simple_command(:patch, 'contentOwnerAdvertisingOptions', options)
1473
+ command.request_representation = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption::Representation
1474
+ command.request_object = content_owner_advertising_option_object
1475
+ command.response_representation = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption::Representation
1476
+ command.response_class = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption
1477
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1478
+ command.query['fields'] = fields unless fields.nil?
1479
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1480
+ command.query['userIp'] = user_ip unless user_ip.nil?
1481
+ execute_or_queue_command(command, &block)
1482
+ end
1483
+
1484
+ # Updates advertising options for the content owner associated with the
1485
+ # authenticated API user.
1486
+ # @param [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption] content_owner_advertising_option_object
1487
+ # @param [String] on_behalf_of_content_owner
1488
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1489
+ # user is acting on behalf of. This parameter supports users whose accounts are
1490
+ # associated with multiple content owners.
1491
+ # @param [String] fields
1492
+ # Selector specifying which fields to include in a partial response.
1493
+ # @param [String] quota_user
1494
+ # Available to use for quota purposes for server-side applications. Can be any
1495
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1496
+ # Overrides userIp if both are provided.
1497
+ # @param [String] user_ip
1498
+ # IP address of the site where the request originates. Use this if you want to
1499
+ # enforce per-user limits.
1500
+ # @param [Google::Apis::RequestOptions] options
1501
+ # Request-specific options
1502
+ #
1503
+ # @yield [result, err] Result & error if block supplied
1504
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption] parsed result object
1505
+ # @yieldparam err [StandardError] error object if request failed
1506
+ #
1507
+ # @return [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption]
1508
+ #
1509
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1510
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1511
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1512
+ def update_content_owner_advertising_option(content_owner_advertising_option_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1513
+ command = make_simple_command(:put, 'contentOwnerAdvertisingOptions', options)
1514
+ command.request_representation = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption::Representation
1515
+ command.request_object = content_owner_advertising_option_object
1516
+ command.response_representation = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption::Representation
1517
+ command.response_class = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption
1518
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1519
+ command.query['fields'] = fields unless fields.nil?
1520
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1521
+ command.query['userIp'] = user_ip unless user_ip.nil?
1522
+ execute_or_queue_command(command, &block)
1523
+ end
1524
+
1525
+ # Retrieves information about the specified content owner.
1526
+ # @param [String] content_owner_id
1527
+ # The contentOwnerId parameter specifies a value that uniquely identifies the
1528
+ # content owner.
1529
+ # @param [String] on_behalf_of_content_owner
1530
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1531
+ # user is acting on behalf of. This parameter supports users whose accounts are
1532
+ # associated with multiple content owners.
1533
+ # @param [String] fields
1534
+ # Selector specifying which fields to include in a partial response.
1535
+ # @param [String] quota_user
1536
+ # Available to use for quota purposes for server-side applications. Can be any
1537
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1538
+ # Overrides userIp if both are provided.
1539
+ # @param [String] user_ip
1540
+ # IP address of the site where the request originates. Use this if you want to
1541
+ # enforce per-user limits.
1542
+ # @param [Google::Apis::RequestOptions] options
1543
+ # Request-specific options
1544
+ #
1545
+ # @yield [result, err] Result & error if block supplied
1546
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ContentOwner] parsed result object
1547
+ # @yieldparam err [StandardError] error object if request failed
1548
+ #
1549
+ # @return [Google::Apis::YoutubePartnerV1::ContentOwner]
1550
+ #
1551
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1552
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1553
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1554
+ def get_content_owner(content_owner_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1555
+ command = make_simple_command(:get, 'contentOwners/{contentOwnerId}', options)
1556
+ command.response_representation = Google::Apis::YoutubePartnerV1::ContentOwner::Representation
1557
+ command.response_class = Google::Apis::YoutubePartnerV1::ContentOwner
1558
+ command.params['contentOwnerId'] = content_owner_id unless content_owner_id.nil?
1559
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1560
+ command.query['fields'] = fields unless fields.nil?
1561
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1562
+ command.query['userIp'] = user_ip unless user_ip.nil?
1563
+ execute_or_queue_command(command, &block)
1564
+ end
1565
+
1566
+ # Retrieves a list of content owners that match the request criteria.
1567
+ # @param [Boolean] fetch_mine
1568
+ # The fetchMine parameter restricts the result set to content owners associated
1569
+ # with the currently authenticated API user.
1570
+ # @param [String] id
1571
+ # The id parameter specifies a comma-separated list of YouTube content owner IDs
1572
+ # to retrieve.
1573
+ # @param [String] on_behalf_of_content_owner
1574
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1575
+ # user is acting on behalf of. This parameter supports users whose accounts are
1576
+ # associated with multiple content owners.
1577
+ # @param [String] fields
1578
+ # Selector specifying which fields to include in a partial response.
1579
+ # @param [String] quota_user
1580
+ # Available to use for quota purposes for server-side applications. Can be any
1581
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1582
+ # Overrides userIp if both are provided.
1583
+ # @param [String] user_ip
1584
+ # IP address of the site where the request originates. Use this if you want to
1585
+ # enforce per-user limits.
1586
+ # @param [Google::Apis::RequestOptions] options
1587
+ # Request-specific options
1588
+ #
1589
+ # @yield [result, err] Result & error if block supplied
1590
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ContentOwnerListResponse] parsed result object
1591
+ # @yieldparam err [StandardError] error object if request failed
1592
+ #
1593
+ # @return [Google::Apis::YoutubePartnerV1::ContentOwnerListResponse]
1594
+ #
1595
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1596
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1597
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1598
+ def list_content_owners(fetch_mine: nil, id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1599
+ command = make_simple_command(:get, 'contentOwners', options)
1600
+ command.response_representation = Google::Apis::YoutubePartnerV1::ContentOwnerListResponse::Representation
1601
+ command.response_class = Google::Apis::YoutubePartnerV1::ContentOwnerListResponse
1602
+ command.query['fetchMine'] = fetch_mine unless fetch_mine.nil?
1603
+ command.query['id'] = id unless id.nil?
1604
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1605
+ command.query['fields'] = fields unless fields.nil?
1606
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1607
+ command.query['userIp'] = user_ip unless user_ip.nil?
1608
+ execute_or_queue_command(command, &block)
1609
+ end
1610
+
1611
+ # Inserts a cuepoint into a live broadcast.
1612
+ # @param [String] channel_id
1613
+ # The channelId parameter identifies the channel that owns the broadcast into
1614
+ # which the cuepoint is being inserted.
1615
+ # @param [Google::Apis::YoutubePartnerV1::LiveCuepoint] live_cuepoint_object
1616
+ # @param [String] on_behalf_of_content_owner
1617
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1618
+ # user is acting on behalf of. This parameter supports users whose accounts are
1619
+ # associated with multiple content owners. You can obtain the content owner ID
1620
+ # that will serve as the parameter value by calling the YouTube Content ID API's
1621
+ # contentOwners.list method.
1622
+ # @param [String] fields
1623
+ # Selector specifying which fields to include in a partial response.
1624
+ # @param [String] quota_user
1625
+ # Available to use for quota purposes for server-side applications. Can be any
1626
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1627
+ # Overrides userIp if both are provided.
1628
+ # @param [String] user_ip
1629
+ # IP address of the site where the request originates. Use this if you want to
1630
+ # enforce per-user limits.
1631
+ # @param [Google::Apis::RequestOptions] options
1632
+ # Request-specific options
1633
+ #
1634
+ # @yield [result, err] Result & error if block supplied
1635
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::LiveCuepoint] parsed result object
1636
+ # @yieldparam err [StandardError] error object if request failed
1637
+ #
1638
+ # @return [Google::Apis::YoutubePartnerV1::LiveCuepoint]
1639
+ #
1640
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1641
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1642
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1643
+ def insert_live_cuepoint(channel_id, live_cuepoint_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1644
+ command = make_simple_command(:post, 'liveCuepoints', options)
1645
+ command.request_representation = Google::Apis::YoutubePartnerV1::LiveCuepoint::Representation
1646
+ command.request_object = live_cuepoint_object
1647
+ command.response_representation = Google::Apis::YoutubePartnerV1::LiveCuepoint::Representation
1648
+ command.response_class = Google::Apis::YoutubePartnerV1::LiveCuepoint
1649
+ command.query['channelId'] = channel_id unless channel_id.nil?
1650
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1651
+ command.query['fields'] = fields unless fields.nil?
1652
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1653
+ command.query['userIp'] = user_ip unless user_ip.nil?
1654
+ execute_or_queue_command(command, &block)
1655
+ end
1656
+
1657
+ # Retrieves a list of all metadata provided for an asset, regardless of which
1658
+ # content owner provided the data.
1659
+ # @param [String] asset_id
1660
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
1661
+ # you are retrieving a metadata history.
1662
+ # @param [String] on_behalf_of_content_owner
1663
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1664
+ # user is acting on behalf of. This parameter supports users whose accounts are
1665
+ # associated with multiple content owners.
1666
+ # @param [String] fields
1667
+ # Selector specifying which fields to include in a partial response.
1668
+ # @param [String] quota_user
1669
+ # Available to use for quota purposes for server-side applications. Can be any
1670
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1671
+ # Overrides userIp if both are provided.
1672
+ # @param [String] user_ip
1673
+ # IP address of the site where the request originates. Use this if you want to
1674
+ # enforce per-user limits.
1675
+ # @param [Google::Apis::RequestOptions] options
1676
+ # Request-specific options
1677
+ #
1678
+ # @yield [result, err] Result & error if block supplied
1679
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::MetadataHistoryListResponse] parsed result object
1680
+ # @yieldparam err [StandardError] error object if request failed
1681
+ #
1682
+ # @return [Google::Apis::YoutubePartnerV1::MetadataHistoryListResponse]
1683
+ #
1684
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1685
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1686
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1687
+ def list_metadata_histories(asset_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1688
+ command = make_simple_command(:get, 'metadataHistory', options)
1689
+ command.response_representation = Google::Apis::YoutubePartnerV1::MetadataHistoryListResponse::Representation
1690
+ command.response_class = Google::Apis::YoutubePartnerV1::MetadataHistoryListResponse
1691
+ command.query['assetId'] = asset_id unless asset_id.nil?
1692
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1693
+ command.query['fields'] = fields unless fields.nil?
1694
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1695
+ command.query['userIp'] = user_ip unless user_ip.nil?
1696
+ execute_or_queue_command(command, &block)
1697
+ end
1698
+
1699
+ # Delete an order, which moves orders to inactive state and removes any
1700
+ # associated video.
1701
+ # @param [String] order_id
1702
+ # Id of the order to delete.
1703
+ # @param [String] on_behalf_of_content_owner
1704
+ # ContentOwnerId that super admin acts in behalf of.
1705
+ # @param [String] fields
1706
+ # Selector specifying which fields to include in a partial response.
1707
+ # @param [String] quota_user
1708
+ # Available to use for quota purposes for server-side applications. Can be any
1709
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1710
+ # Overrides userIp if both are provided.
1711
+ # @param [String] user_ip
1712
+ # IP address of the site where the request originates. Use this if you want to
1713
+ # enforce per-user limits.
1714
+ # @param [Google::Apis::RequestOptions] options
1715
+ # Request-specific options
1716
+ #
1717
+ # @yield [result, err] Result & error if block supplied
1718
+ # @yieldparam result [NilClass] No result returned for this method
1719
+ # @yieldparam err [StandardError] error object if request failed
1720
+ #
1721
+ # @return [void]
1722
+ #
1723
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1724
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1725
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1726
+ def delete_order(order_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1727
+ command = make_simple_command(:delete, 'orders/{orderId}', options)
1728
+ command.params['orderId'] = order_id unless order_id.nil?
1729
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1730
+ command.query['fields'] = fields unless fields.nil?
1731
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1732
+ command.query['userIp'] = user_ip unless user_ip.nil?
1733
+ execute_or_queue_command(command, &block)
1734
+ end
1735
+
1736
+ # Retrieve the details of an existing order.
1737
+ # @param [String] order_id
1738
+ # The id of the order.
1739
+ # @param [String] on_behalf_of_content_owner
1740
+ # ContentOnwerId that super admin acts in behalf of.
1741
+ # @param [String] fields
1742
+ # Selector specifying which fields to include in a partial response.
1743
+ # @param [String] quota_user
1744
+ # Available to use for quota purposes for server-side applications. Can be any
1745
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1746
+ # Overrides userIp if both are provided.
1747
+ # @param [String] user_ip
1748
+ # IP address of the site where the request originates. Use this if you want to
1749
+ # enforce per-user limits.
1750
+ # @param [Google::Apis::RequestOptions] options
1751
+ # Request-specific options
1752
+ #
1753
+ # @yield [result, err] Result & error if block supplied
1754
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Order] parsed result object
1755
+ # @yieldparam err [StandardError] error object if request failed
1756
+ #
1757
+ # @return [Google::Apis::YoutubePartnerV1::Order]
1758
+ #
1759
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1760
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1761
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1762
+ def get_order(order_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1763
+ command = make_simple_command(:get, 'orders/{orderId}', options)
1764
+ command.response_representation = Google::Apis::YoutubePartnerV1::Order::Representation
1765
+ command.response_class = Google::Apis::YoutubePartnerV1::Order
1766
+ command.params['orderId'] = order_id unless order_id.nil?
1767
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1768
+ command.query['fields'] = fields unless fields.nil?
1769
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1770
+ command.query['userIp'] = user_ip unless user_ip.nil?
1771
+ execute_or_queue_command(command, &block)
1772
+ end
1773
+
1774
+ # Creates a new basic order entry in the YouTube premium asset order management
1775
+ # system. You must supply at least a country and channel in the new order.
1776
+ # @param [Google::Apis::YoutubePartnerV1::Order] order_object
1777
+ # @param [String] on_behalf_of_content_owner
1778
+ # ContentOnwerId that super admin acts in behalf of.
1779
+ # @param [String] fields
1780
+ # Selector specifying which fields to include in a partial response.
1781
+ # @param [String] quota_user
1782
+ # Available to use for quota purposes for server-side applications. Can be any
1783
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1784
+ # Overrides userIp if both are provided.
1785
+ # @param [String] user_ip
1786
+ # IP address of the site where the request originates. Use this if you want to
1787
+ # enforce per-user limits.
1788
+ # @param [Google::Apis::RequestOptions] options
1789
+ # Request-specific options
1790
+ #
1791
+ # @yield [result, err] Result & error if block supplied
1792
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Order] parsed result object
1793
+ # @yieldparam err [StandardError] error object if request failed
1794
+ #
1795
+ # @return [Google::Apis::YoutubePartnerV1::Order]
1796
+ #
1797
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1798
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1799
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1800
+ def insert_order(order_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1801
+ command = make_simple_command(:post, 'orders', options)
1802
+ command.request_representation = Google::Apis::YoutubePartnerV1::Order::Representation
1803
+ command.request_object = order_object
1804
+ command.response_representation = Google::Apis::YoutubePartnerV1::Order::Representation
1805
+ command.response_class = Google::Apis::YoutubePartnerV1::Order
1806
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1807
+ command.query['fields'] = fields unless fields.nil?
1808
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1809
+ command.query['userIp'] = user_ip unless user_ip.nil?
1810
+ execute_or_queue_command(command, &block)
1811
+ end
1812
+
1813
+ # Return a list of orders, filtered by the parameters below, may return more
1814
+ # than a single page of results.
1815
+ # @param [String] channel_id
1816
+ # Filter results to only a specific channel ( use encrypted ID).
1817
+ # @param [String] content_type
1818
+ # Filter the results by type, possible values are SHOW or MOVIE.
1819
+ # @param [String] country
1820
+ # Filter results by country, two letter ISO country codes are used.
1821
+ # @param [String] custom_id
1822
+ # Filter result by orders that have this custom ID.
1823
+ # @param [String] on_behalf_of_content_owner
1824
+ # ContentOnwerId that super admin acts in behalf of.
1825
+ # @param [String] page_token
1826
+ # The continuation token is an optional value that is only used to page through
1827
+ # large result sets.
1828
+ # - To retrieve the next page of results for a request, set this parameter to
1829
+ # the value of the nextPageToken value from the previous response.
1830
+ # - To get the previous page of results, set this parameter to the value of the
1831
+ # previousPageToken value from the previous response.
1832
+ # @param [String] priority
1833
+ # Filter results by priority. P0, P1, P2, P3 and P4 are the acceptable options.
1834
+ # @param [String] production_house
1835
+ # Filter results by a particular production house. Specified by the name of the
1836
+ # production house.
1837
+ # @param [String] q
1838
+ # Filter results to only orders that contain this string in the title.
1839
+ # @param [String] status
1840
+ # Filter results to have this status, available options are STATUS_AVAILED,
1841
+ # STATUS_ORDERED, STATUS_RECEIVED, STATUS_READY_FOR_QC, STATUS_MOC_FIX,
1842
+ # STATUS_PARTNER_FIX, STATUS_YOUTUBE_FIX, STATUS_QC_APPROVED, STATUS_INACTIVE,
1843
+ # STATUS_INGESTION_COMPLETE, STATUS_REORDERED
1844
+ # @param [String] video_id
1845
+ # Filter results to orders that are associated with this YouTube external video
1846
+ # id.
1847
+ # @param [String] fields
1848
+ # Selector specifying which fields to include in a partial response.
1849
+ # @param [String] quota_user
1850
+ # Available to use for quota purposes for server-side applications. Can be any
1851
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1852
+ # Overrides userIp if both are provided.
1853
+ # @param [String] user_ip
1854
+ # IP address of the site where the request originates. Use this if you want to
1855
+ # enforce per-user limits.
1856
+ # @param [Google::Apis::RequestOptions] options
1857
+ # Request-specific options
1858
+ #
1859
+ # @yield [result, err] Result & error if block supplied
1860
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::OrderListResponse] parsed result object
1861
+ # @yieldparam err [StandardError] error object if request failed
1862
+ #
1863
+ # @return [Google::Apis::YoutubePartnerV1::OrderListResponse]
1864
+ #
1865
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1866
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1867
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1868
+ def list_orders(channel_id: nil, content_type: nil, country: nil, custom_id: nil, on_behalf_of_content_owner: nil, page_token: nil, priority: nil, production_house: nil, q: nil, status: nil, video_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1869
+ command = make_simple_command(:get, 'orders', options)
1870
+ command.response_representation = Google::Apis::YoutubePartnerV1::OrderListResponse::Representation
1871
+ command.response_class = Google::Apis::YoutubePartnerV1::OrderListResponse
1872
+ command.query['channelId'] = channel_id unless channel_id.nil?
1873
+ command.query['contentType'] = content_type unless content_type.nil?
1874
+ command.query['country'] = country unless country.nil?
1875
+ command.query['customId'] = custom_id unless custom_id.nil?
1876
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1877
+ command.query['pageToken'] = page_token unless page_token.nil?
1878
+ command.query['priority'] = priority unless priority.nil?
1879
+ command.query['productionHouse'] = production_house unless production_house.nil?
1880
+ command.query['q'] = q unless q.nil?
1881
+ command.query['status'] = status unless status.nil?
1882
+ command.query['videoId'] = video_id unless video_id.nil?
1883
+ command.query['fields'] = fields unless fields.nil?
1884
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1885
+ command.query['userIp'] = user_ip unless user_ip.nil?
1886
+ execute_or_queue_command(command, &block)
1887
+ end
1888
+
1889
+ # Update the values in an existing order. This method supports patch semantics.
1890
+ # @param [String] order_id
1891
+ # The id of the order.
1892
+ # @param [Google::Apis::YoutubePartnerV1::Order] order_object
1893
+ # @param [String] on_behalf_of_content_owner
1894
+ # ContentOwnerId that super admin acts in behalf of.
1895
+ # @param [String] fields
1896
+ # Selector specifying which fields to include in a partial response.
1897
+ # @param [String] quota_user
1898
+ # Available to use for quota purposes for server-side applications. Can be any
1899
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1900
+ # Overrides userIp if both are provided.
1901
+ # @param [String] user_ip
1902
+ # IP address of the site where the request originates. Use this if you want to
1903
+ # enforce per-user limits.
1904
+ # @param [Google::Apis::RequestOptions] options
1905
+ # Request-specific options
1906
+ #
1907
+ # @yield [result, err] Result & error if block supplied
1908
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Order] parsed result object
1909
+ # @yieldparam err [StandardError] error object if request failed
1910
+ #
1911
+ # @return [Google::Apis::YoutubePartnerV1::Order]
1912
+ #
1913
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1914
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1915
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1916
+ def patch_order(order_id, order_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1917
+ command = make_simple_command(:patch, 'orders/{orderId}', options)
1918
+ command.request_representation = Google::Apis::YoutubePartnerV1::Order::Representation
1919
+ command.request_object = order_object
1920
+ command.response_representation = Google::Apis::YoutubePartnerV1::Order::Representation
1921
+ command.response_class = Google::Apis::YoutubePartnerV1::Order
1922
+ command.params['orderId'] = order_id unless order_id.nil?
1923
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1924
+ command.query['fields'] = fields unless fields.nil?
1925
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1926
+ command.query['userIp'] = user_ip unless user_ip.nil?
1927
+ execute_or_queue_command(command, &block)
1928
+ end
1929
+
1930
+ # Update the values in an existing order.
1931
+ # @param [String] order_id
1932
+ # The id of the order.
1933
+ # @param [Google::Apis::YoutubePartnerV1::Order] order_object
1934
+ # @param [String] on_behalf_of_content_owner
1935
+ # ContentOwnerId that super admin acts in behalf of.
1936
+ # @param [String] fields
1937
+ # Selector specifying which fields to include in a partial response.
1938
+ # @param [String] quota_user
1939
+ # Available to use for quota purposes for server-side applications. Can be any
1940
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1941
+ # Overrides userIp if both are provided.
1942
+ # @param [String] user_ip
1943
+ # IP address of the site where the request originates. Use this if you want to
1944
+ # enforce per-user limits.
1945
+ # @param [Google::Apis::RequestOptions] options
1946
+ # Request-specific options
1947
+ #
1948
+ # @yield [result, err] Result & error if block supplied
1949
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Order] parsed result object
1950
+ # @yieldparam err [StandardError] error object if request failed
1951
+ #
1952
+ # @return [Google::Apis::YoutubePartnerV1::Order]
1953
+ #
1954
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1955
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1956
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1957
+ def update_order(order_id, order_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1958
+ command = make_simple_command(:put, 'orders/{orderId}', options)
1959
+ command.request_representation = Google::Apis::YoutubePartnerV1::Order::Representation
1960
+ command.request_object = order_object
1961
+ command.response_representation = Google::Apis::YoutubePartnerV1::Order::Representation
1962
+ command.response_class = Google::Apis::YoutubePartnerV1::Order
1963
+ command.params['orderId'] = order_id unless order_id.nil?
1964
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1965
+ command.query['fields'] = fields unless fields.nil?
1966
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1967
+ command.query['userIp'] = user_ip unless user_ip.nil?
1968
+ execute_or_queue_command(command, &block)
1969
+ end
1970
+
1971
+ # Retrieves the ownership data provided for the specified asset by the content
1972
+ # owner associated with the authenticated user.
1973
+ # @param [String] asset_id
1974
+ # The assetId parameter specifies the YouTube asset ID for which you are
1975
+ # retrieving ownership data.
1976
+ # @param [String] on_behalf_of_content_owner
1977
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1978
+ # user is acting on behalf of. This parameter supports users whose accounts are
1979
+ # associated with multiple content owners.
1980
+ # @param [String] fields
1981
+ # Selector specifying which fields to include in a partial response.
1982
+ # @param [String] quota_user
1983
+ # Available to use for quota purposes for server-side applications. Can be any
1984
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1985
+ # Overrides userIp if both are provided.
1986
+ # @param [String] user_ip
1987
+ # IP address of the site where the request originates. Use this if you want to
1988
+ # enforce per-user limits.
1989
+ # @param [Google::Apis::RequestOptions] options
1990
+ # Request-specific options
1991
+ #
1992
+ # @yield [result, err] Result & error if block supplied
1993
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::RightsOwnership] parsed result object
1994
+ # @yieldparam err [StandardError] error object if request failed
1995
+ #
1996
+ # @return [Google::Apis::YoutubePartnerV1::RightsOwnership]
1997
+ #
1998
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1999
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2000
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2001
+ def get_ownership(asset_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2002
+ command = make_simple_command(:get, 'assets/{assetId}/ownership', options)
2003
+ command.response_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
2004
+ command.response_class = Google::Apis::YoutubePartnerV1::RightsOwnership
2005
+ command.params['assetId'] = asset_id unless asset_id.nil?
2006
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2007
+ command.query['fields'] = fields unless fields.nil?
2008
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2009
+ command.query['userIp'] = user_ip unless user_ip.nil?
2010
+ execute_or_queue_command(command, &block)
2011
+ end
2012
+
2013
+ # Provides new ownership information for the specified asset. Note that YouTube
2014
+ # may receive ownership information from multiple sources. For example, if an
2015
+ # asset has multiple owners, each owner might send ownership data for the asset.
2016
+ # YouTube algorithmically combines the ownership data received from all of those
2017
+ # sources to generate the asset's canonical ownership data, which should provide
2018
+ # the most comprehensive and accurate representation of the asset's ownership.
2019
+ # This method supports patch semantics.
2020
+ # @param [String] asset_id
2021
+ # The assetId parameter specifies the YouTube asset ID of the asset being
2022
+ # updated.
2023
+ # @param [Google::Apis::YoutubePartnerV1::RightsOwnership] rights_ownership_object
2024
+ # @param [String] on_behalf_of_content_owner
2025
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2026
+ # user is acting on behalf of. This parameter supports users whose accounts are
2027
+ # associated with multiple content owners.
2028
+ # @param [String] fields
2029
+ # Selector specifying which fields to include in a partial response.
2030
+ # @param [String] quota_user
2031
+ # Available to use for quota purposes for server-side applications. Can be any
2032
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2033
+ # Overrides userIp if both are provided.
2034
+ # @param [String] user_ip
2035
+ # IP address of the site where the request originates. Use this if you want to
2036
+ # enforce per-user limits.
2037
+ # @param [Google::Apis::RequestOptions] options
2038
+ # Request-specific options
2039
+ #
2040
+ # @yield [result, err] Result & error if block supplied
2041
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::RightsOwnership] parsed result object
2042
+ # @yieldparam err [StandardError] error object if request failed
2043
+ #
2044
+ # @return [Google::Apis::YoutubePartnerV1::RightsOwnership]
2045
+ #
2046
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2047
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2048
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2049
+ def patch_ownership(asset_id, rights_ownership_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2050
+ command = make_simple_command(:patch, 'assets/{assetId}/ownership', options)
2051
+ command.request_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
2052
+ command.request_object = rights_ownership_object
2053
+ command.response_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
2054
+ command.response_class = Google::Apis::YoutubePartnerV1::RightsOwnership
2055
+ command.params['assetId'] = asset_id unless asset_id.nil?
2056
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2057
+ command.query['fields'] = fields unless fields.nil?
2058
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2059
+ command.query['userIp'] = user_ip unless user_ip.nil?
2060
+ execute_or_queue_command(command, &block)
2061
+ end
2062
+
2063
+ # Provides new ownership information for the specified asset. Note that YouTube
2064
+ # may receive ownership information from multiple sources. For example, if an
2065
+ # asset has multiple owners, each owner might send ownership data for the asset.
2066
+ # YouTube algorithmically combines the ownership data received from all of those
2067
+ # sources to generate the asset's canonical ownership data, which should provide
2068
+ # the most comprehensive and accurate representation of the asset's ownership.
2069
+ # @param [String] asset_id
2070
+ # The assetId parameter specifies the YouTube asset ID of the asset being
2071
+ # updated.
2072
+ # @param [Google::Apis::YoutubePartnerV1::RightsOwnership] rights_ownership_object
2073
+ # @param [String] on_behalf_of_content_owner
2074
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2075
+ # user is acting on behalf of. This parameter supports users whose accounts are
2076
+ # associated with multiple content owners.
2077
+ # @param [String] fields
2078
+ # Selector specifying which fields to include in a partial response.
2079
+ # @param [String] quota_user
2080
+ # Available to use for quota purposes for server-side applications. Can be any
2081
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2082
+ # Overrides userIp if both are provided.
2083
+ # @param [String] user_ip
2084
+ # IP address of the site where the request originates. Use this if you want to
2085
+ # enforce per-user limits.
2086
+ # @param [Google::Apis::RequestOptions] options
2087
+ # Request-specific options
2088
+ #
2089
+ # @yield [result, err] Result & error if block supplied
2090
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::RightsOwnership] parsed result object
2091
+ # @yieldparam err [StandardError] error object if request failed
2092
+ #
2093
+ # @return [Google::Apis::YoutubePartnerV1::RightsOwnership]
2094
+ #
2095
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2096
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2097
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2098
+ def update_ownership(asset_id, rights_ownership_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2099
+ command = make_simple_command(:put, 'assets/{assetId}/ownership', options)
2100
+ command.request_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
2101
+ command.request_object = rights_ownership_object
2102
+ command.response_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
2103
+ command.response_class = Google::Apis::YoutubePartnerV1::RightsOwnership
2104
+ command.params['assetId'] = asset_id unless asset_id.nil?
2105
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2106
+ command.query['fields'] = fields unless fields.nil?
2107
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2108
+ command.query['userIp'] = user_ip unless user_ip.nil?
2109
+ execute_or_queue_command(command, &block)
2110
+ end
2111
+
2112
+ # Retrieves a list of the ownership data for an asset, regardless of which
2113
+ # content owner provided the data. The list only includes the most recent
2114
+ # ownership data for each content owner. However, if the content owner has
2115
+ # submitted ownership data through multiple data sources (API, content feeds,
2116
+ # etc.), the list will contain the most recent data for each content owner and
2117
+ # data source.
2118
+ # @param [String] asset_id
2119
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
2120
+ # you are retrieving an ownership data history.
2121
+ # @param [String] on_behalf_of_content_owner
2122
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2123
+ # user is acting on behalf of. This parameter supports users whose accounts are
2124
+ # associated with multiple content owners.
2125
+ # @param [String] fields
2126
+ # Selector specifying which fields to include in a partial response.
2127
+ # @param [String] quota_user
2128
+ # Available to use for quota purposes for server-side applications. Can be any
2129
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2130
+ # Overrides userIp if both are provided.
2131
+ # @param [String] user_ip
2132
+ # IP address of the site where the request originates. Use this if you want to
2133
+ # enforce per-user limits.
2134
+ # @param [Google::Apis::RequestOptions] options
2135
+ # Request-specific options
2136
+ #
2137
+ # @yield [result, err] Result & error if block supplied
2138
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::OwnershipHistoryListResponse] parsed result object
2139
+ # @yieldparam err [StandardError] error object if request failed
2140
+ #
2141
+ # @return [Google::Apis::YoutubePartnerV1::OwnershipHistoryListResponse]
2142
+ #
2143
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2144
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2145
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2146
+ def list_ownership_histories(asset_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2147
+ command = make_simple_command(:get, 'ownershipHistory', options)
2148
+ command.response_representation = Google::Apis::YoutubePartnerV1::OwnershipHistoryListResponse::Representation
2149
+ command.response_class = Google::Apis::YoutubePartnerV1::OwnershipHistoryListResponse
2150
+ command.query['assetId'] = asset_id unless asset_id.nil?
2151
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2152
+ command.query['fields'] = fields unless fields.nil?
2153
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2154
+ command.query['userIp'] = user_ip unless user_ip.nil?
2155
+ execute_or_queue_command(command, &block)
2156
+ end
2157
+
2158
+ # Retrieves the specified saved policy.
2159
+ # @param [String] policy_id
2160
+ # The policyId parameter specifies a value that uniquely identifies the policy
2161
+ # being retrieved.
2162
+ # @param [String] on_behalf_of_content_owner
2163
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2164
+ # user is acting on behalf of. This parameter supports users whose accounts are
2165
+ # associated with multiple content owners.
2166
+ # @param [String] fields
2167
+ # Selector specifying which fields to include in a partial response.
2168
+ # @param [String] quota_user
2169
+ # Available to use for quota purposes for server-side applications. Can be any
2170
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2171
+ # Overrides userIp if both are provided.
2172
+ # @param [String] user_ip
2173
+ # IP address of the site where the request originates. Use this if you want to
2174
+ # enforce per-user limits.
2175
+ # @param [Google::Apis::RequestOptions] options
2176
+ # Request-specific options
2177
+ #
2178
+ # @yield [result, err] Result & error if block supplied
2179
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Policy] parsed result object
2180
+ # @yieldparam err [StandardError] error object if request failed
2181
+ #
2182
+ # @return [Google::Apis::YoutubePartnerV1::Policy]
2183
+ #
2184
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2185
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2186
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2187
+ def get_policy(policy_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2188
+ command = make_simple_command(:get, 'policies/{policyId}', options)
2189
+ command.response_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2190
+ command.response_class = Google::Apis::YoutubePartnerV1::Policy
2191
+ command.params['policyId'] = policy_id unless policy_id.nil?
2192
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2193
+ command.query['fields'] = fields unless fields.nil?
2194
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2195
+ command.query['userIp'] = user_ip unless user_ip.nil?
2196
+ execute_or_queue_command(command, &block)
2197
+ end
2198
+
2199
+ # Creates a saved policy.
2200
+ # @param [Google::Apis::YoutubePartnerV1::Policy] policy_object
2201
+ # @param [String] on_behalf_of_content_owner
2202
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2203
+ # user is acting on behalf of. This parameter supports users whose accounts are
2204
+ # associated with multiple content owners.
2205
+ # @param [String] fields
2206
+ # Selector specifying which fields to include in a partial response.
2207
+ # @param [String] quota_user
2208
+ # Available to use for quota purposes for server-side applications. Can be any
2209
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2210
+ # Overrides userIp if both are provided.
2211
+ # @param [String] user_ip
2212
+ # IP address of the site where the request originates. Use this if you want to
2213
+ # enforce per-user limits.
2214
+ # @param [Google::Apis::RequestOptions] options
2215
+ # Request-specific options
2216
+ #
2217
+ # @yield [result, err] Result & error if block supplied
2218
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Policy] parsed result object
2219
+ # @yieldparam err [StandardError] error object if request failed
2220
+ #
2221
+ # @return [Google::Apis::YoutubePartnerV1::Policy]
2222
+ #
2223
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2224
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2225
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2226
+ def insert_policy(policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2227
+ command = make_simple_command(:post, 'policies', options)
2228
+ command.request_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2229
+ command.request_object = policy_object
2230
+ command.response_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2231
+ command.response_class = Google::Apis::YoutubePartnerV1::Policy
2232
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2233
+ command.query['fields'] = fields unless fields.nil?
2234
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2235
+ command.query['userIp'] = user_ip unless user_ip.nil?
2236
+ execute_or_queue_command(command, &block)
2237
+ end
2238
+
2239
+ # Retrieves a list of the content owner's saved policies.
2240
+ # @param [String] id
2241
+ # The id parameter specifies a comma-separated list of saved policy IDs to
2242
+ # retrieve. Only policies belonging to the currently authenticated content owner
2243
+ # will be available.
2244
+ # @param [String] on_behalf_of_content_owner
2245
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2246
+ # user is acting on behalf of. This parameter supports users whose accounts are
2247
+ # associated with multiple content owners.
2248
+ # @param [String] sort
2249
+ # The sort parameter specifies how the search results should be sorted.
2250
+ # @param [String] fields
2251
+ # Selector specifying which fields to include in a partial response.
2252
+ # @param [String] quota_user
2253
+ # Available to use for quota purposes for server-side applications. Can be any
2254
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2255
+ # Overrides userIp if both are provided.
2256
+ # @param [String] user_ip
2257
+ # IP address of the site where the request originates. Use this if you want to
2258
+ # enforce per-user limits.
2259
+ # @param [Google::Apis::RequestOptions] options
2260
+ # Request-specific options
2261
+ #
2262
+ # @yield [result, err] Result & error if block supplied
2263
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::PolicyList] parsed result object
2264
+ # @yieldparam err [StandardError] error object if request failed
2265
+ #
2266
+ # @return [Google::Apis::YoutubePartnerV1::PolicyList]
2267
+ #
2268
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2269
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2270
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2271
+ def list_policies(id: nil, on_behalf_of_content_owner: nil, sort: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2272
+ command = make_simple_command(:get, 'policies', options)
2273
+ command.response_representation = Google::Apis::YoutubePartnerV1::PolicyList::Representation
2274
+ command.response_class = Google::Apis::YoutubePartnerV1::PolicyList
2275
+ command.query['id'] = id unless id.nil?
2276
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2277
+ command.query['sort'] = sort unless sort.nil?
2278
+ command.query['fields'] = fields unless fields.nil?
2279
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2280
+ command.query['userIp'] = user_ip unless user_ip.nil?
2281
+ execute_or_queue_command(command, &block)
2282
+ end
2283
+
2284
+ # Updates the specified saved policy. This method supports patch semantics.
2285
+ # @param [String] policy_id
2286
+ # The policyId parameter specifies a value that uniquely identifies the policy
2287
+ # being updated.
2288
+ # @param [Google::Apis::YoutubePartnerV1::Policy] policy_object
2289
+ # @param [String] on_behalf_of_content_owner
2290
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2291
+ # user is acting on behalf of. This parameter supports users whose accounts are
2292
+ # associated with multiple content owners.
2293
+ # @param [String] fields
2294
+ # Selector specifying which fields to include in a partial response.
2295
+ # @param [String] quota_user
2296
+ # Available to use for quota purposes for server-side applications. Can be any
2297
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2298
+ # Overrides userIp if both are provided.
2299
+ # @param [String] user_ip
2300
+ # IP address of the site where the request originates. Use this if you want to
2301
+ # enforce per-user limits.
2302
+ # @param [Google::Apis::RequestOptions] options
2303
+ # Request-specific options
2304
+ #
2305
+ # @yield [result, err] Result & error if block supplied
2306
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Policy] parsed result object
2307
+ # @yieldparam err [StandardError] error object if request failed
2308
+ #
2309
+ # @return [Google::Apis::YoutubePartnerV1::Policy]
2310
+ #
2311
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2312
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2313
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2314
+ def patch_policy(policy_id, policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2315
+ command = make_simple_command(:patch, 'policies/{policyId}', options)
2316
+ command.request_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2317
+ command.request_object = policy_object
2318
+ command.response_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2319
+ command.response_class = Google::Apis::YoutubePartnerV1::Policy
2320
+ command.params['policyId'] = policy_id unless policy_id.nil?
2321
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2322
+ command.query['fields'] = fields unless fields.nil?
2323
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2324
+ command.query['userIp'] = user_ip unless user_ip.nil?
2325
+ execute_or_queue_command(command, &block)
2326
+ end
2327
+
2328
+ # Updates the specified saved policy.
2329
+ # @param [String] policy_id
2330
+ # The policyId parameter specifies a value that uniquely identifies the policy
2331
+ # being updated.
2332
+ # @param [Google::Apis::YoutubePartnerV1::Policy] policy_object
2333
+ # @param [String] on_behalf_of_content_owner
2334
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2335
+ # user is acting on behalf of. This parameter supports users whose accounts are
2336
+ # associated with multiple content owners.
2337
+ # @param [String] fields
2338
+ # Selector specifying which fields to include in a partial response.
2339
+ # @param [String] quota_user
2340
+ # Available to use for quota purposes for server-side applications. Can be any
2341
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2342
+ # Overrides userIp if both are provided.
2343
+ # @param [String] user_ip
2344
+ # IP address of the site where the request originates. Use this if you want to
2345
+ # enforce per-user limits.
2346
+ # @param [Google::Apis::RequestOptions] options
2347
+ # Request-specific options
2348
+ #
2349
+ # @yield [result, err] Result & error if block supplied
2350
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Policy] parsed result object
2351
+ # @yieldparam err [StandardError] error object if request failed
2352
+ #
2353
+ # @return [Google::Apis::YoutubePartnerV1::Policy]
2354
+ #
2355
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2356
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2357
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2358
+ def update_policy(policy_id, policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2359
+ command = make_simple_command(:put, 'policies/{policyId}', options)
2360
+ command.request_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2361
+ command.request_object = policy_object
2362
+ command.response_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2363
+ command.response_class = Google::Apis::YoutubePartnerV1::Policy
2364
+ command.params['policyId'] = policy_id unless policy_id.nil?
2365
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2366
+ command.query['fields'] = fields unless fields.nil?
2367
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2368
+ command.query['userIp'] = user_ip unless user_ip.nil?
2369
+ execute_or_queue_command(command, &block)
2370
+ end
2371
+
2372
+ # Retrieves information about the specified publisher.
2373
+ # @param [String] publisher_id
2374
+ # The publisherId parameter specifies a publisher ID that uniquely identifies
2375
+ # the publisher being retrieved.
2376
+ # @param [String] on_behalf_of_content_owner
2377
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2378
+ # user is acting on behalf of. This parameter supports users whose accounts are
2379
+ # associated with multiple content owners.
2380
+ # @param [String] fields
2381
+ # Selector specifying which fields to include in a partial response.
2382
+ # @param [String] quota_user
2383
+ # Available to use for quota purposes for server-side applications. Can be any
2384
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2385
+ # Overrides userIp if both are provided.
2386
+ # @param [String] user_ip
2387
+ # IP address of the site where the request originates. Use this if you want to
2388
+ # enforce per-user limits.
2389
+ # @param [Google::Apis::RequestOptions] options
2390
+ # Request-specific options
2391
+ #
2392
+ # @yield [result, err] Result & error if block supplied
2393
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Publisher] parsed result object
2394
+ # @yieldparam err [StandardError] error object if request failed
2395
+ #
2396
+ # @return [Google::Apis::YoutubePartnerV1::Publisher]
2397
+ #
2398
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2399
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2400
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2401
+ def get_publisher(publisher_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2402
+ command = make_simple_command(:get, 'publishers/{publisherId}', options)
2403
+ command.response_representation = Google::Apis::YoutubePartnerV1::Publisher::Representation
2404
+ command.response_class = Google::Apis::YoutubePartnerV1::Publisher
2405
+ command.params['publisherId'] = publisher_id unless publisher_id.nil?
2406
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2407
+ command.query['fields'] = fields unless fields.nil?
2408
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2409
+ command.query['userIp'] = user_ip unless user_ip.nil?
2410
+ execute_or_queue_command(command, &block)
2411
+ end
2412
+
2413
+ # Retrieves a list of publishers that match the request criteria. This method is
2414
+ # analogous to a publisher search function.
2415
+ # @param [String] cae_number
2416
+ # The caeNumber parameter specifies the CAE number of the publisher that you
2417
+ # want to retrieve.
2418
+ # @param [String] id
2419
+ # The id parameter specifies a comma-separated list of YouTube publisher IDs to
2420
+ # retrieve.
2421
+ # @param [String] ipi_number
2422
+ # The ipiNumber parameter specifies the IPI number of the publisher that you
2423
+ # want to retrieve.
2424
+ # @param [Fixnum] max_results
2425
+ # The maxResults parameter specifies the maximum number of results to return per
2426
+ # page.
2427
+ # @param [String] name_prefix
2428
+ # The namePrefix parameter indicates that the API should only return publishers
2429
+ # whose name starts with this prefix.
2430
+ # @param [String] on_behalf_of_content_owner
2431
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2432
+ # user is acting on behalf of. This parameter supports users whose accounts are
2433
+ # associated with multiple content owners.
2434
+ # @param [String] page_token
2435
+ # The pageToken parameter specifies a token that identifies a particular page of
2436
+ # results to return. Set this parameter to the value of the nextPageToken value
2437
+ # from the previous API response to retrieve the next page of search results.
2438
+ # @param [String] fields
2439
+ # Selector specifying which fields to include in a partial response.
2440
+ # @param [String] quota_user
2441
+ # Available to use for quota purposes for server-side applications. Can be any
2442
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2443
+ # Overrides userIp if both are provided.
2444
+ # @param [String] user_ip
2445
+ # IP address of the site where the request originates. Use this if you want to
2446
+ # enforce per-user limits.
2447
+ # @param [Google::Apis::RequestOptions] options
2448
+ # Request-specific options
2449
+ #
2450
+ # @yield [result, err] Result & error if block supplied
2451
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::PublisherList] parsed result object
2452
+ # @yieldparam err [StandardError] error object if request failed
2453
+ #
2454
+ # @return [Google::Apis::YoutubePartnerV1::PublisherList]
2455
+ #
2456
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2457
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2458
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2459
+ def list_publishers(cae_number: nil, id: nil, ipi_number: nil, max_results: nil, name_prefix: nil, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2460
+ command = make_simple_command(:get, 'publishers', options)
2461
+ command.response_representation = Google::Apis::YoutubePartnerV1::PublisherList::Representation
2462
+ command.response_class = Google::Apis::YoutubePartnerV1::PublisherList
2463
+ command.query['caeNumber'] = cae_number unless cae_number.nil?
2464
+ command.query['id'] = id unless id.nil?
2465
+ command.query['ipiNumber'] = ipi_number unless ipi_number.nil?
2466
+ command.query['maxResults'] = max_results unless max_results.nil?
2467
+ command.query['namePrefix'] = name_prefix unless name_prefix.nil?
2468
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2469
+ command.query['pageToken'] = page_token unless page_token.nil?
2470
+ command.query['fields'] = fields unless fields.nil?
2471
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2472
+ command.query['userIp'] = user_ip unless user_ip.nil?
2473
+ execute_or_queue_command(command, &block)
2474
+ end
2475
+
2476
+ # Retrieves information about the specified reference conflict.
2477
+ # @param [String] reference_conflict_id
2478
+ # The referenceConflictId parameter specifies the YouTube reference conflict ID
2479
+ # of the reference conflict being retrieved.
2480
+ # @param [String] on_behalf_of_content_owner
2481
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2482
+ # user is acting on behalf of. This parameter supports users whose accounts are
2483
+ # associated with multiple content owners.
2484
+ # @param [String] fields
2485
+ # Selector specifying which fields to include in a partial response.
2486
+ # @param [String] quota_user
2487
+ # Available to use for quota purposes for server-side applications. Can be any
2488
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2489
+ # Overrides userIp if both are provided.
2490
+ # @param [String] user_ip
2491
+ # IP address of the site where the request originates. Use this if you want to
2492
+ # enforce per-user limits.
2493
+ # @param [Google::Apis::RequestOptions] options
2494
+ # Request-specific options
2495
+ #
2496
+ # @yield [result, err] Result & error if block supplied
2497
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ReferenceConflict] parsed result object
2498
+ # @yieldparam err [StandardError] error object if request failed
2499
+ #
2500
+ # @return [Google::Apis::YoutubePartnerV1::ReferenceConflict]
2501
+ #
2502
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2503
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2504
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2505
+ def get_reference_conflict(reference_conflict_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2506
+ command = make_simple_command(:get, 'referenceConflicts/{referenceConflictId}', options)
2507
+ command.response_representation = Google::Apis::YoutubePartnerV1::ReferenceConflict::Representation
2508
+ command.response_class = Google::Apis::YoutubePartnerV1::ReferenceConflict
2509
+ command.params['referenceConflictId'] = reference_conflict_id unless reference_conflict_id.nil?
2510
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2511
+ command.query['fields'] = fields unless fields.nil?
2512
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2513
+ command.query['userIp'] = user_ip unless user_ip.nil?
2514
+ execute_or_queue_command(command, &block)
2515
+ end
2516
+
2517
+ # Retrieves a list of unresolved reference conflicts.
2518
+ # @param [String] on_behalf_of_content_owner
2519
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2520
+ # user is acting on behalf of. This parameter supports users whose accounts are
2521
+ # associated with multiple content owners.
2522
+ # @param [String] page_token
2523
+ # The pageToken parameter specifies a token that identifies a particular page of
2524
+ # results to return. Set this parameter to the value of the nextPageToken value
2525
+ # from the previous API response to retrieve the next page of search results.
2526
+ # @param [String] fields
2527
+ # Selector specifying which fields to include in a partial response.
2528
+ # @param [String] quota_user
2529
+ # Available to use for quota purposes for server-side applications. Can be any
2530
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2531
+ # Overrides userIp if both are provided.
2532
+ # @param [String] user_ip
2533
+ # IP address of the site where the request originates. Use this if you want to
2534
+ # enforce per-user limits.
2535
+ # @param [Google::Apis::RequestOptions] options
2536
+ # Request-specific options
2537
+ #
2538
+ # @yield [result, err] Result & error if block supplied
2539
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ReferenceConflictListResponse] parsed result object
2540
+ # @yieldparam err [StandardError] error object if request failed
2541
+ #
2542
+ # @return [Google::Apis::YoutubePartnerV1::ReferenceConflictListResponse]
2543
+ #
2544
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2545
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2546
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2547
+ def list_reference_conflicts(on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2548
+ command = make_simple_command(:get, 'referenceConflicts', options)
2549
+ command.response_representation = Google::Apis::YoutubePartnerV1::ReferenceConflictListResponse::Representation
2550
+ command.response_class = Google::Apis::YoutubePartnerV1::ReferenceConflictListResponse
2551
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2552
+ command.query['pageToken'] = page_token unless page_token.nil?
2553
+ command.query['fields'] = fields unless fields.nil?
2554
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2555
+ command.query['userIp'] = user_ip unless user_ip.nil?
2556
+ execute_or_queue_command(command, &block)
2557
+ end
2558
+
2559
+ # Retrieves information about the specified reference.
2560
+ # @param [String] reference_id
2561
+ # The referenceId parameter specifies the YouTube reference ID of the reference
2562
+ # being retrieved.
2563
+ # @param [String] on_behalf_of_content_owner
2564
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2565
+ # user is acting on behalf of. This parameter supports users whose accounts are
2566
+ # associated with multiple content owners.
2567
+ # @param [String] fields
2568
+ # Selector specifying which fields to include in a partial response.
2569
+ # @param [String] quota_user
2570
+ # Available to use for quota purposes for server-side applications. Can be any
2571
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2572
+ # Overrides userIp if both are provided.
2573
+ # @param [String] user_ip
2574
+ # IP address of the site where the request originates. Use this if you want to
2575
+ # enforce per-user limits.
2576
+ # @param [Google::Apis::RequestOptions] options
2577
+ # Request-specific options
2578
+ #
2579
+ # @yield [result, err] Result & error if block supplied
2580
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Reference] parsed result object
2581
+ # @yieldparam err [StandardError] error object if request failed
2582
+ #
2583
+ # @return [Google::Apis::YoutubePartnerV1::Reference]
2584
+ #
2585
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2586
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2587
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2588
+ def get_reference(reference_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2589
+ command = make_simple_command(:get, 'references/{referenceId}', options)
2590
+ command.response_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2591
+ command.response_class = Google::Apis::YoutubePartnerV1::Reference
2592
+ command.params['referenceId'] = reference_id unless reference_id.nil?
2593
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2594
+ command.query['fields'] = fields unless fields.nil?
2595
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2596
+ command.query['userIp'] = user_ip unless user_ip.nil?
2597
+ execute_or_queue_command(command, &block)
2598
+ end
2599
+
2600
+ # Creates a reference in one of the following ways:
2601
+ # - If your request is uploading a reference file, YouTube creates the reference
2602
+ # from the provided content. You can provide either a video/audio file or a pre-
2603
+ # generated fingerprint. If you are providing a pre-generated fingerprint, set
2604
+ # the reference resource's fpDirect property to true in the request body. In
2605
+ # this flow, you can use either the multipart or resumable upload flows to
2606
+ # provide the reference content.
2607
+ # - If you want to create a reference using a claimed video as the reference
2608
+ # content, use the claimId parameter to identify the claim.
2609
+ # @param [Google::Apis::YoutubePartnerV1::Reference] reference_object
2610
+ # @param [String] claim_id
2611
+ # The claimId parameter specifies the YouTube claim ID of an existing claim from
2612
+ # which a reference should be created. (The claimed video is used as the
2613
+ # reference content.)
2614
+ # @param [String] on_behalf_of_content_owner
2615
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2616
+ # user is acting on behalf of. This parameter supports users whose accounts are
2617
+ # associated with multiple content owners.
2618
+ # @param [String] fields
2619
+ # Selector specifying which fields to include in a partial response.
2620
+ # @param [String] quota_user
2621
+ # Available to use for quota purposes for server-side applications. Can be any
2622
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2623
+ # Overrides userIp if both are provided.
2624
+ # @param [String] user_ip
2625
+ # IP address of the site where the request originates. Use this if you want to
2626
+ # enforce per-user limits.
2627
+ # @param [IO, String] upload_source
2628
+ # IO stream or filename containing content to upload
2629
+ # @param [String] content_type
2630
+ # Content type of the uploaded content.
2631
+ # @param [Google::Apis::RequestOptions] options
2632
+ # Request-specific options
2633
+ #
2634
+ # @yield [result, err] Result & error if block supplied
2635
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Reference] parsed result object
2636
+ # @yieldparam err [StandardError] error object if request failed
2637
+ #
2638
+ # @return [Google::Apis::YoutubePartnerV1::Reference]
2639
+ #
2640
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2641
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2642
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2643
+ def insert_reference(reference_object = nil, claim_id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
2644
+ if upload_source.nil?
2645
+ command = make_simple_command(:post, 'references', options)
2646
+ else
2647
+ command = make_upload_command(:post, 'references', options)
2648
+ command.upload_source = upload_source
2649
+ command.upload_content_type = content_type
2650
+ end
2651
+ command.request_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2652
+ command.request_object = reference_object
2653
+ command.response_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2654
+ command.response_class = Google::Apis::YoutubePartnerV1::Reference
2655
+ command.query['claimId'] = claim_id unless claim_id.nil?
2656
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2657
+ command.query['fields'] = fields unless fields.nil?
2658
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2659
+ command.query['userIp'] = user_ip unless user_ip.nil?
2660
+ execute_or_queue_command(command, &block)
2661
+ end
2662
+
2663
+ # Retrieves a list of references by ID or the list of references for the
2664
+ # specified asset.
2665
+ # @param [String] asset_id
2666
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
2667
+ # you are retrieving references.
2668
+ # @param [String] id
2669
+ # The id parameter specifies a comma-separated list of YouTube reference IDs to
2670
+ # retrieve.
2671
+ # @param [String] on_behalf_of_content_owner
2672
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2673
+ # user is acting on behalf of. This parameter supports users whose accounts are
2674
+ # associated with multiple content owners.
2675
+ # @param [String] page_token
2676
+ # The pageToken parameter specifies a token that identifies a particular page of
2677
+ # results to return. Set this parameter to the value of the nextPageToken value
2678
+ # from the previous API response to retrieve the next page of search results.
2679
+ # @param [String] fields
2680
+ # Selector specifying which fields to include in a partial response.
2681
+ # @param [String] quota_user
2682
+ # Available to use for quota purposes for server-side applications. Can be any
2683
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2684
+ # Overrides userIp if both are provided.
2685
+ # @param [String] user_ip
2686
+ # IP address of the site where the request originates. Use this if you want to
2687
+ # enforce per-user limits.
2688
+ # @param [Google::Apis::RequestOptions] options
2689
+ # Request-specific options
2690
+ #
2691
+ # @yield [result, err] Result & error if block supplied
2692
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ReferenceListResponse] parsed result object
2693
+ # @yieldparam err [StandardError] error object if request failed
2694
+ #
2695
+ # @return [Google::Apis::YoutubePartnerV1::ReferenceListResponse]
2696
+ #
2697
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2698
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2699
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2700
+ def list_references(asset_id: nil, id: nil, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2701
+ command = make_simple_command(:get, 'references', options)
2702
+ command.response_representation = Google::Apis::YoutubePartnerV1::ReferenceListResponse::Representation
2703
+ command.response_class = Google::Apis::YoutubePartnerV1::ReferenceListResponse
2704
+ command.query['assetId'] = asset_id unless asset_id.nil?
2705
+ command.query['id'] = id unless id.nil?
2706
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2707
+ command.query['pageToken'] = page_token unless page_token.nil?
2708
+ command.query['fields'] = fields unless fields.nil?
2709
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2710
+ command.query['userIp'] = user_ip unless user_ip.nil?
2711
+ execute_or_queue_command(command, &block)
2712
+ end
2713
+
2714
+ # Updates a reference. This method supports patch semantics.
2715
+ # @param [String] reference_id
2716
+ # The referenceId parameter specifies the YouTube reference ID of the reference
2717
+ # being updated.
2718
+ # @param [Google::Apis::YoutubePartnerV1::Reference] reference_object
2719
+ # @param [String] on_behalf_of_content_owner
2720
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2721
+ # user is acting on behalf of. This parameter supports users whose accounts are
2722
+ # associated with multiple content owners.
2723
+ # @param [Boolean] release_claims
2724
+ # The releaseClaims parameter indicates that you want to release all match
2725
+ # claims associated with this reference. This parameter only works when the
2726
+ # claim's status is being updated to 'inactive' - you can then set the parameter'
2727
+ # s value to true to release all match claims produced by this reference.
2728
+ # @param [String] fields
2729
+ # Selector specifying which fields to include in a partial response.
2730
+ # @param [String] quota_user
2731
+ # Available to use for quota purposes for server-side applications. Can be any
2732
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2733
+ # Overrides userIp if both are provided.
2734
+ # @param [String] user_ip
2735
+ # IP address of the site where the request originates. Use this if you want to
2736
+ # enforce per-user limits.
2737
+ # @param [Google::Apis::RequestOptions] options
2738
+ # Request-specific options
2739
+ #
2740
+ # @yield [result, err] Result & error if block supplied
2741
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Reference] parsed result object
2742
+ # @yieldparam err [StandardError] error object if request failed
2743
+ #
2744
+ # @return [Google::Apis::YoutubePartnerV1::Reference]
2745
+ #
2746
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2747
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2748
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2749
+ def patch_reference(reference_id, reference_object = nil, on_behalf_of_content_owner: nil, release_claims: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2750
+ command = make_simple_command(:patch, 'references/{referenceId}', options)
2751
+ command.request_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2752
+ command.request_object = reference_object
2753
+ command.response_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2754
+ command.response_class = Google::Apis::YoutubePartnerV1::Reference
2755
+ command.params['referenceId'] = reference_id unless reference_id.nil?
2756
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2757
+ command.query['releaseClaims'] = release_claims unless release_claims.nil?
2758
+ command.query['fields'] = fields unless fields.nil?
2759
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2760
+ command.query['userIp'] = user_ip unless user_ip.nil?
2761
+ execute_or_queue_command(command, &block)
2762
+ end
2763
+
2764
+ # Updates a reference.
2765
+ # @param [String] reference_id
2766
+ # The referenceId parameter specifies the YouTube reference ID of the reference
2767
+ # being updated.
2768
+ # @param [Google::Apis::YoutubePartnerV1::Reference] reference_object
2769
+ # @param [String] on_behalf_of_content_owner
2770
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2771
+ # user is acting on behalf of. This parameter supports users whose accounts are
2772
+ # associated with multiple content owners.
2773
+ # @param [Boolean] release_claims
2774
+ # The releaseClaims parameter indicates that you want to release all match
2775
+ # claims associated with this reference. This parameter only works when the
2776
+ # claim's status is being updated to 'inactive' - you can then set the parameter'
2777
+ # s value to true to release all match claims produced by this reference.
2778
+ # @param [String] fields
2779
+ # Selector specifying which fields to include in a partial response.
2780
+ # @param [String] quota_user
2781
+ # Available to use for quota purposes for server-side applications. Can be any
2782
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2783
+ # Overrides userIp if both are provided.
2784
+ # @param [String] user_ip
2785
+ # IP address of the site where the request originates. Use this if you want to
2786
+ # enforce per-user limits.
2787
+ # @param [Google::Apis::RequestOptions] options
2788
+ # Request-specific options
2789
+ #
2790
+ # @yield [result, err] Result & error if block supplied
2791
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Reference] parsed result object
2792
+ # @yieldparam err [StandardError] error object if request failed
2793
+ #
2794
+ # @return [Google::Apis::YoutubePartnerV1::Reference]
2795
+ #
2796
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2797
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2798
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2799
+ def update_reference(reference_id, reference_object = nil, on_behalf_of_content_owner: nil, release_claims: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2800
+ command = make_simple_command(:put, 'references/{referenceId}', options)
2801
+ command.request_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2802
+ command.request_object = reference_object
2803
+ command.response_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2804
+ command.response_class = Google::Apis::YoutubePartnerV1::Reference
2805
+ command.params['referenceId'] = reference_id unless reference_id.nil?
2806
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2807
+ command.query['releaseClaims'] = release_claims unless release_claims.nil?
2808
+ command.query['fields'] = fields unless fields.nil?
2809
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2810
+ command.query['userIp'] = user_ip unless user_ip.nil?
2811
+ execute_or_queue_command(command, &block)
2812
+ end
2813
+
2814
+ # Retrieves advertising settings for the specified video.
2815
+ # @param [String] video_id
2816
+ # The videoId parameter specifies the YouTube video ID of the video for which
2817
+ # you are retrieving advertising settings.
2818
+ # @param [String] on_behalf_of_content_owner
2819
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2820
+ # user is acting on behalf of. This parameter supports users whose accounts are
2821
+ # associated with multiple content owners.
2822
+ # @param [String] fields
2823
+ # Selector specifying which fields to include in a partial response.
2824
+ # @param [String] quota_user
2825
+ # Available to use for quota purposes for server-side applications. Can be any
2826
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2827
+ # Overrides userIp if both are provided.
2828
+ # @param [String] user_ip
2829
+ # IP address of the site where the request originates. Use this if you want to
2830
+ # enforce per-user limits.
2831
+ # @param [Google::Apis::RequestOptions] options
2832
+ # Request-specific options
2833
+ #
2834
+ # @yield [result, err] Result & error if block supplied
2835
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] parsed result object
2836
+ # @yieldparam err [StandardError] error object if request failed
2837
+ #
2838
+ # @return [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption]
2839
+ #
2840
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2841
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2842
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2843
+ def get_video_advertising_option(video_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2844
+ command = make_simple_command(:get, 'videoAdvertisingOptions/{videoId}', options)
2845
+ command.response_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
2846
+ command.response_class = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption
2847
+ command.params['videoId'] = video_id unless video_id.nil?
2848
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2849
+ command.query['fields'] = fields unless fields.nil?
2850
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2851
+ command.query['userIp'] = user_ip unless user_ip.nil?
2852
+ execute_or_queue_command(command, &block)
2853
+ end
2854
+
2855
+ # Retrieves details about the types of allowed ads for a specified partner- or
2856
+ # user-uploaded video.
2857
+ # @param [String] video_id
2858
+ # The videoId parameter specifies the YouTube video ID of the video for which
2859
+ # you are retrieving advertising options.
2860
+ # @param [String] on_behalf_of_content_owner
2861
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2862
+ # user is acting on behalf of. This parameter supports users whose accounts are
2863
+ # associated with multiple content owners.
2864
+ # @param [String] fields
2865
+ # Selector specifying which fields to include in a partial response.
2866
+ # @param [String] quota_user
2867
+ # Available to use for quota purposes for server-side applications. Can be any
2868
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2869
+ # Overrides userIp if both are provided.
2870
+ # @param [String] user_ip
2871
+ # IP address of the site where the request originates. Use this if you want to
2872
+ # enforce per-user limits.
2873
+ # @param [Google::Apis::RequestOptions] options
2874
+ # Request-specific options
2875
+ #
2876
+ # @yield [result, err] Result & error if block supplied
2877
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::VideoAdvertisingOptionGetEnabledAdsResponse] parsed result object
2878
+ # @yieldparam err [StandardError] error object if request failed
2879
+ #
2880
+ # @return [Google::Apis::YoutubePartnerV1::VideoAdvertisingOptionGetEnabledAdsResponse]
2881
+ #
2882
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2883
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2884
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2885
+ def get_video_advertising_option_enabled_ads(video_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2886
+ command = make_simple_command(:get, 'videoAdvertisingOptions/{videoId}/getEnabledAds', options)
2887
+ command.response_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOptionGetEnabledAdsResponse::Representation
2888
+ command.response_class = Google::Apis::YoutubePartnerV1::VideoAdvertisingOptionGetEnabledAdsResponse
2889
+ command.params['videoId'] = video_id unless video_id.nil?
2890
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2891
+ command.query['fields'] = fields unless fields.nil?
2892
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2893
+ command.query['userIp'] = user_ip unless user_ip.nil?
2894
+ execute_or_queue_command(command, &block)
2895
+ end
2896
+
2897
+ # Updates the advertising settings for the specified video. This method supports
2898
+ # patch semantics.
2899
+ # @param [String] video_id
2900
+ # The videoId parameter specifies the YouTube video ID of the video for which
2901
+ # you are updating advertising settings.
2902
+ # @param [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] video_advertising_option_object
2903
+ # @param [String] on_behalf_of_content_owner
2904
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2905
+ # user is acting on behalf of. This parameter supports users whose accounts are
2906
+ # associated with multiple content owners.
2907
+ # @param [String] fields
2908
+ # Selector specifying which fields to include in a partial response.
2909
+ # @param [String] quota_user
2910
+ # Available to use for quota purposes for server-side applications. Can be any
2911
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2912
+ # Overrides userIp if both are provided.
2913
+ # @param [String] user_ip
2914
+ # IP address of the site where the request originates. Use this if you want to
2915
+ # enforce per-user limits.
2916
+ # @param [Google::Apis::RequestOptions] options
2917
+ # Request-specific options
2918
+ #
2919
+ # @yield [result, err] Result & error if block supplied
2920
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] parsed result object
2921
+ # @yieldparam err [StandardError] error object if request failed
2922
+ #
2923
+ # @return [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption]
2924
+ #
2925
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2926
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2927
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2928
+ def patch_video_advertising_option(video_id, video_advertising_option_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2929
+ command = make_simple_command(:patch, 'videoAdvertisingOptions/{videoId}', options)
2930
+ command.request_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
2931
+ command.request_object = video_advertising_option_object
2932
+ command.response_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
2933
+ command.response_class = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption
2934
+ command.params['videoId'] = video_id unless video_id.nil?
2935
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2936
+ command.query['fields'] = fields unless fields.nil?
2937
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2938
+ command.query['userIp'] = user_ip unless user_ip.nil?
2939
+ execute_or_queue_command(command, &block)
2940
+ end
2941
+
2942
+ # Updates the advertising settings for the specified video.
2943
+ # @param [String] video_id
2944
+ # The videoId parameter specifies the YouTube video ID of the video for which
2945
+ # you are updating advertising settings.
2946
+ # @param [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] video_advertising_option_object
2947
+ # @param [String] on_behalf_of_content_owner
2948
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2949
+ # user is acting on behalf of. This parameter supports users whose accounts are
2950
+ # associated with multiple content owners.
2951
+ # @param [String] fields
2952
+ # Selector specifying which fields to include in a partial response.
2953
+ # @param [String] quota_user
2954
+ # Available to use for quota purposes for server-side applications. Can be any
2955
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2956
+ # Overrides userIp if both are provided.
2957
+ # @param [String] user_ip
2958
+ # IP address of the site where the request originates. Use this if you want to
2959
+ # enforce per-user limits.
2960
+ # @param [Google::Apis::RequestOptions] options
2961
+ # Request-specific options
2962
+ #
2963
+ # @yield [result, err] Result & error if block supplied
2964
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] parsed result object
2965
+ # @yieldparam err [StandardError] error object if request failed
2966
+ #
2967
+ # @return [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption]
2968
+ #
2969
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2970
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2971
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2972
+ def update_video_advertising_option(video_id, video_advertising_option_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2973
+ command = make_simple_command(:put, 'videoAdvertisingOptions/{videoId}', options)
2974
+ command.request_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
2975
+ command.request_object = video_advertising_option_object
2976
+ command.response_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
2977
+ command.response_class = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption
2978
+ command.params['videoId'] = video_id unless video_id.nil?
2979
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2980
+ command.query['fields'] = fields unless fields.nil?
2981
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2982
+ command.query['userIp'] = user_ip unless user_ip.nil?
2983
+ execute_or_queue_command(command, &block)
2984
+ end
2985
+
2986
+ # Removes a whitelisted channel for a content owner.
2987
+ # @param [String] id
2988
+ # The id parameter specifies the YouTube channel ID of the channel being removed
2989
+ # from whitelist.
2990
+ # @param [String] on_behalf_of_content_owner
2991
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2992
+ # user is acting on behalf of. This parameter supports users whose accounts are
2993
+ # associated with multiple content owners.
2994
+ # @param [String] fields
2995
+ # Selector specifying which fields to include in a partial response.
2996
+ # @param [String] quota_user
2997
+ # Available to use for quota purposes for server-side applications. Can be any
2998
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2999
+ # Overrides userIp if both are provided.
3000
+ # @param [String] user_ip
3001
+ # IP address of the site where the request originates. Use this if you want to
3002
+ # enforce per-user limits.
3003
+ # @param [Google::Apis::RequestOptions] options
3004
+ # Request-specific options
3005
+ #
3006
+ # @yield [result, err] Result & error if block supplied
3007
+ # @yieldparam result [NilClass] No result returned for this method
3008
+ # @yieldparam err [StandardError] error object if request failed
3009
+ #
3010
+ # @return [void]
3011
+ #
3012
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3013
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3014
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3015
+ def delete_whitelist(id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3016
+ command = make_simple_command(:delete, 'whitelists/{id}', options)
3017
+ command.params['id'] = id unless id.nil?
3018
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3019
+ command.query['fields'] = fields unless fields.nil?
3020
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3021
+ command.query['userIp'] = user_ip unless user_ip.nil?
3022
+ execute_or_queue_command(command, &block)
3023
+ end
3024
+
3025
+ # Retrieves a specific whitelisted channel by ID.
3026
+ # @param [String] id
3027
+ # The id parameter specifies the YouTube channel ID of the whitelisted channel
3028
+ # being retrieved.
3029
+ # @param [String] on_behalf_of_content_owner
3030
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
3031
+ # user is acting on behalf of. This parameter supports users whose accounts are
3032
+ # associated with multiple content owners.
3033
+ # @param [String] fields
3034
+ # Selector specifying which fields to include in a partial response.
3035
+ # @param [String] quota_user
3036
+ # Available to use for quota purposes for server-side applications. Can be any
3037
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3038
+ # Overrides userIp if both are provided.
3039
+ # @param [String] user_ip
3040
+ # IP address of the site where the request originates. Use this if you want to
3041
+ # enforce per-user limits.
3042
+ # @param [Google::Apis::RequestOptions] options
3043
+ # Request-specific options
3044
+ #
3045
+ # @yield [result, err] Result & error if block supplied
3046
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Whitelist] parsed result object
3047
+ # @yieldparam err [StandardError] error object if request failed
3048
+ #
3049
+ # @return [Google::Apis::YoutubePartnerV1::Whitelist]
3050
+ #
3051
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3052
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3053
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3054
+ def get_whitelist(id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3055
+ command = make_simple_command(:get, 'whitelists/{id}', options)
3056
+ command.response_representation = Google::Apis::YoutubePartnerV1::Whitelist::Representation
3057
+ command.response_class = Google::Apis::YoutubePartnerV1::Whitelist
3058
+ command.params['id'] = id unless id.nil?
3059
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3060
+ command.query['fields'] = fields unless fields.nil?
3061
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3062
+ command.query['userIp'] = user_ip unless user_ip.nil?
3063
+ execute_or_queue_command(command, &block)
3064
+ end
3065
+
3066
+ # Whitelist a YouTube channel for your content owner. Whitelisted channels are
3067
+ # channels that are not owned or managed by you, but you would like to whitelist
3068
+ # so that no claims from your assets are placed on videos uploaded to these
3069
+ # channels.
3070
+ # @param [Google::Apis::YoutubePartnerV1::Whitelist] whitelist_object
3071
+ # @param [String] on_behalf_of_content_owner
3072
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
3073
+ # user is acting on behalf of. This parameter supports users whose accounts are
3074
+ # associated with multiple content owners.
3075
+ # @param [String] fields
3076
+ # Selector specifying which fields to include in a partial response.
3077
+ # @param [String] quota_user
3078
+ # Available to use for quota purposes for server-side applications. Can be any
3079
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3080
+ # Overrides userIp if both are provided.
3081
+ # @param [String] user_ip
3082
+ # IP address of the site where the request originates. Use this if you want to
3083
+ # enforce per-user limits.
3084
+ # @param [Google::Apis::RequestOptions] options
3085
+ # Request-specific options
3086
+ #
3087
+ # @yield [result, err] Result & error if block supplied
3088
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Whitelist] parsed result object
3089
+ # @yieldparam err [StandardError] error object if request failed
3090
+ #
3091
+ # @return [Google::Apis::YoutubePartnerV1::Whitelist]
3092
+ #
3093
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3094
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3095
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3096
+ def insert_whitelist(whitelist_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3097
+ command = make_simple_command(:post, 'whitelists', options)
3098
+ command.request_representation = Google::Apis::YoutubePartnerV1::Whitelist::Representation
3099
+ command.request_object = whitelist_object
3100
+ command.response_representation = Google::Apis::YoutubePartnerV1::Whitelist::Representation
3101
+ command.response_class = Google::Apis::YoutubePartnerV1::Whitelist
3102
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3103
+ command.query['fields'] = fields unless fields.nil?
3104
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3105
+ command.query['userIp'] = user_ip unless user_ip.nil?
3106
+ execute_or_queue_command(command, &block)
3107
+ end
3108
+
3109
+ # Retrieves a list of whitelisted channels for a content owner.
3110
+ # @param [String] id
3111
+ # The id parameter specifies a comma-separated list of YouTube channel IDs that
3112
+ # identify the whitelisted channels you want to retrieve.
3113
+ # @param [String] on_behalf_of_content_owner
3114
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
3115
+ # user is acting on behalf of. This parameter supports users whose accounts are
3116
+ # associated with multiple content owners.
3117
+ # @param [String] page_token
3118
+ # The pageToken parameter specifies a token that identifies a particular page of
3119
+ # results to return. Set this parameter to the value of the nextPageToken value
3120
+ # from the previous API response to retrieve the next page of results.
3121
+ # @param [String] fields
3122
+ # Selector specifying which fields to include in a partial response.
3123
+ # @param [String] quota_user
3124
+ # Available to use for quota purposes for server-side applications. Can be any
3125
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3126
+ # Overrides userIp if both are provided.
3127
+ # @param [String] user_ip
3128
+ # IP address of the site where the request originates. Use this if you want to
3129
+ # enforce per-user limits.
3130
+ # @param [Google::Apis::RequestOptions] options
3131
+ # Request-specific options
3132
+ #
3133
+ # @yield [result, err] Result & error if block supplied
3134
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::WhitelistListResponse] parsed result object
3135
+ # @yieldparam err [StandardError] error object if request failed
3136
+ #
3137
+ # @return [Google::Apis::YoutubePartnerV1::WhitelistListResponse]
3138
+ #
3139
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3140
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3141
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3142
+ def list_whitelists(id: nil, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3143
+ command = make_simple_command(:get, 'whitelists', options)
3144
+ command.response_representation = Google::Apis::YoutubePartnerV1::WhitelistListResponse::Representation
3145
+ command.response_class = Google::Apis::YoutubePartnerV1::WhitelistListResponse
3146
+ command.query['id'] = id unless id.nil?
3147
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3148
+ command.query['pageToken'] = page_token unless page_token.nil?
3149
+ command.query['fields'] = fields unless fields.nil?
3150
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3151
+ command.query['userIp'] = user_ip unless user_ip.nil?
3152
+ execute_or_queue_command(command, &block)
3153
+ end
3154
+
3155
+ protected
3156
+
3157
+ def apply_command_defaults(command)
3158
+ command.query['key'] = key unless key.nil?
3159
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3160
+ command.query['userIp'] = user_ip unless user_ip.nil?
3161
+ end
3162
+ end
3163
+ end
3164
+ end
3165
+ end