google-apis-displayvideo_v4 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -384,6 +384,210 @@ module Google
384
384
  execute_or_queue_command(command, &block)
385
385
  end
386
386
 
387
+ # Creates multiple ad assets in a single request. Returns the newly-created ad
388
+ # assets if successful. Only supports the creation of assets of AdAssetType `
389
+ # AD_ASSET_TYPE_YOUTUBE_VIDEO`.
390
+ # @param [Fixnum] advertiser_id
391
+ # Required. The ID of the advertiser these ad assets belong to.
392
+ # @param [Google::Apis::DisplayvideoV4::BulkCreateAdAssetsRequest] bulk_create_ad_assets_request_object
393
+ # @param [String] fields
394
+ # Selector specifying which fields to include in a partial response.
395
+ # @param [String] quota_user
396
+ # Available to use for quota purposes for server-side applications. Can be any
397
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
398
+ # @param [Google::Apis::RequestOptions] options
399
+ # Request-specific options
400
+ #
401
+ # @yield [result, err] Result & error if block supplied
402
+ # @yieldparam result [Google::Apis::DisplayvideoV4::BulkCreateAdAssetsResponse] parsed result object
403
+ # @yieldparam err [StandardError] error object if request failed
404
+ #
405
+ # @return [Google::Apis::DisplayvideoV4::BulkCreateAdAssetsResponse]
406
+ #
407
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
408
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
409
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
410
+ def bulk_create_ad_assets(advertiser_id, bulk_create_ad_assets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
411
+ command = make_simple_command(:post, 'v4/advertisers/{+advertiserId}/adAssets:bulkCreate', options)
412
+ command.request_representation = Google::Apis::DisplayvideoV4::BulkCreateAdAssetsRequest::Representation
413
+ command.request_object = bulk_create_ad_assets_request_object
414
+ command.response_representation = Google::Apis::DisplayvideoV4::BulkCreateAdAssetsResponse::Representation
415
+ command.response_class = Google::Apis::DisplayvideoV4::BulkCreateAdAssetsResponse
416
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
417
+ command.query['fields'] = fields unless fields.nil?
418
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
419
+ execute_or_queue_command(command, &block)
420
+ end
421
+
422
+ # Creates an ad asset. Returns the newly-created ad asset if successful. Only
423
+ # supports the creation of assets of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO`.
424
+ # @param [Fixnum] advertiser_id
425
+ # Required. The ID of the advertiser this ad asset belongs to.
426
+ # @param [Google::Apis::DisplayvideoV4::CreateAdAssetRequest] create_ad_asset_request_object
427
+ # @param [String] fields
428
+ # Selector specifying which fields to include in a partial response.
429
+ # @param [String] quota_user
430
+ # Available to use for quota purposes for server-side applications. Can be any
431
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
432
+ # @param [Google::Apis::RequestOptions] options
433
+ # Request-specific options
434
+ #
435
+ # @yield [result, err] Result & error if block supplied
436
+ # @yieldparam result [Google::Apis::DisplayvideoV4::AdAsset] parsed result object
437
+ # @yieldparam err [StandardError] error object if request failed
438
+ #
439
+ # @return [Google::Apis::DisplayvideoV4::AdAsset]
440
+ #
441
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
442
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
443
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
444
+ def create_ad_asset(advertiser_id, create_ad_asset_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
445
+ command = make_simple_command(:post, 'v4/advertisers/{+advertiserId}/adAssets', options)
446
+ command.request_representation = Google::Apis::DisplayvideoV4::CreateAdAssetRequest::Representation
447
+ command.request_object = create_ad_asset_request_object
448
+ command.response_representation = Google::Apis::DisplayvideoV4::AdAsset::Representation
449
+ command.response_class = Google::Apis::DisplayvideoV4::AdAsset
450
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
451
+ command.query['fields'] = fields unless fields.nil?
452
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
453
+ execute_or_queue_command(command, &block)
454
+ end
455
+
456
+ # Gets an ad asset. Only supports the retrieval of assets of AdAssetType `
457
+ # AD_ASSET_TYPE_YOUTUBE_VIDEO`.
458
+ # @param [Fixnum] advertiser_id
459
+ # Required. The ID of the advertiser this ad asset belongs to.
460
+ # @param [Fixnum] ad_asset_id
461
+ # Required. The ID of the ad asset to fetch. Only supports assets of AdAssetType
462
+ # `AD_ASSET_TYPE_YOUTUBE_VIDEO`
463
+ # @param [String] fields
464
+ # Selector specifying which fields to include in a partial response.
465
+ # @param [String] quota_user
466
+ # Available to use for quota purposes for server-side applications. Can be any
467
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
468
+ # @param [Google::Apis::RequestOptions] options
469
+ # Request-specific options
470
+ #
471
+ # @yield [result, err] Result & error if block supplied
472
+ # @yieldparam result [Google::Apis::DisplayvideoV4::AdAsset] parsed result object
473
+ # @yieldparam err [StandardError] error object if request failed
474
+ #
475
+ # @return [Google::Apis::DisplayvideoV4::AdAsset]
476
+ #
477
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
478
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
479
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
480
+ def get_advertiser_ad_asset(advertiser_id, ad_asset_id, fields: nil, quota_user: nil, options: nil, &block)
481
+ command = make_simple_command(:get, 'v4/advertisers/{+advertiserId}/adAssets/{+adAssetId}', options)
482
+ command.response_representation = Google::Apis::DisplayvideoV4::AdAsset::Representation
483
+ command.response_class = Google::Apis::DisplayvideoV4::AdAsset
484
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
485
+ command.params['adAssetId'] = ad_asset_id unless ad_asset_id.nil?
486
+ command.query['fields'] = fields unless fields.nil?
487
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
488
+ execute_or_queue_command(command, &block)
489
+ end
490
+
491
+ # Lists ad assets under an advertiser ID. Only supports the retrieval of assets
492
+ # of AdAssetType `AD_ASSET_TYPE_YOUTUBE_VIDEO`.
493
+ # @param [Fixnum] advertiser_id
494
+ # Required. The ID of the advertiser the ad assets belong to.
495
+ # @param [String] filter
496
+ # Optional. Allows filtering of the results by ad asset fields. Supported syntax:
497
+ # * A restriction has the form of ``field` `operator` `value``. * All fields
498
+ # must use the `EQUALS (=)` operator. Supported fields: * `youtubeVideoAsset.
499
+ # youtubeVideoId` * `entityStatus` Examples: * All active YouTube video ad
500
+ # assets under an advertiser: `entityStatus=ENTITY_STATUS_ACTIVE`
501
+ # @param [String] order_by
502
+ # Optional. Field by which to sort the list. Acceptable values are: * `
503
+ # entityStatus` * `youtubeVideoAsset.youtubeVideoId` * `adAssetId` (default) The
504
+ # default sorting order is ascending. To specify descending order for a field, a
505
+ # suffix "desc" should be added to the field name. Example: `adAssetId desc`.
506
+ # @param [Fixnum] page_size
507
+ # Optional. Requested page size. Must be between `1` and `5000`. If unspecified
508
+ # will default to `5000`. Returns error code `INVALID_ARGUMENT` if an invalid
509
+ # value is specified.
510
+ # @param [String] page_token
511
+ # Optional. A token identifying a page of results the server should return.
512
+ # Typically, this is the value of next_page_token returned from the previous
513
+ # call to `ListAdAssets` method. If not specified, the first page of results
514
+ # will be returned.
515
+ # @param [String] fields
516
+ # Selector specifying which fields to include in a partial response.
517
+ # @param [String] quota_user
518
+ # Available to use for quota purposes for server-side applications. Can be any
519
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
520
+ # @param [Google::Apis::RequestOptions] options
521
+ # Request-specific options
522
+ #
523
+ # @yield [result, err] Result & error if block supplied
524
+ # @yieldparam result [Google::Apis::DisplayvideoV4::ListAdAssetsResponse] parsed result object
525
+ # @yieldparam err [StandardError] error object if request failed
526
+ #
527
+ # @return [Google::Apis::DisplayvideoV4::ListAdAssetsResponse]
528
+ #
529
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
530
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
531
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
532
+ def list_advertiser_ad_assets(advertiser_id, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
533
+ command = make_simple_command(:get, 'v4/advertisers/{+advertiserId}/adAssets', options)
534
+ command.response_representation = Google::Apis::DisplayvideoV4::ListAdAssetsResponse::Representation
535
+ command.response_class = Google::Apis::DisplayvideoV4::ListAdAssetsResponse
536
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
537
+ command.query['filter'] = filter unless filter.nil?
538
+ command.query['orderBy'] = order_by unless order_by.nil?
539
+ command.query['pageSize'] = page_size unless page_size.nil?
540
+ command.query['pageToken'] = page_token unless page_token.nil?
541
+ command.query['fields'] = fields unless fields.nil?
542
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
543
+ execute_or_queue_command(command, &block)
544
+ end
545
+
546
+ # Uploads and creates an ad asset. Returns the ID of the newly-created ad asset
547
+ # if successful. Only supports the uploading of assets with the AdAssetType `
548
+ # AD_ASSET_TYPE_IMAGE`.
549
+ # @param [Fixnum] advertiser_id
550
+ # Required. The ID of the advertiser this ad asset belongs to.
551
+ # @param [Google::Apis::DisplayvideoV4::UploadAdAssetRequest] upload_ad_asset_request_object
552
+ # @param [String] fields
553
+ # Selector specifying which fields to include in a partial response.
554
+ # @param [String] quota_user
555
+ # Available to use for quota purposes for server-side applications. Can be any
556
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
557
+ # @param [IO, String] upload_source
558
+ # IO stream or filename containing content to upload
559
+ # @param [String] content_type
560
+ # Content type of the uploaded content.
561
+ # @param [Google::Apis::RequestOptions] options
562
+ # Request-specific options
563
+ #
564
+ # @yield [result, err] Result & error if block supplied
565
+ # @yieldparam result [Google::Apis::DisplayvideoV4::UploadAdAssetResponse] parsed result object
566
+ # @yieldparam err [StandardError] error object if request failed
567
+ #
568
+ # @return [Google::Apis::DisplayvideoV4::UploadAdAssetResponse]
569
+ #
570
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
571
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
572
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
573
+ def upload_ad_asset(advertiser_id, upload_ad_asset_request_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block)
574
+ if upload_source.nil?
575
+ command = make_simple_command(:post, 'v4/advertisers/{+advertiserId}/adAssets:uploadAdAsset', options)
576
+ else
577
+ command = make_upload_command(:post, 'v4/advertisers/{+advertiserId}/adAssets:uploadAdAsset', options)
578
+ command.upload_source = upload_source
579
+ command.upload_content_type = content_type
580
+ end
581
+ command.request_representation = Google::Apis::DisplayvideoV4::UploadAdAssetRequest::Representation
582
+ command.request_object = upload_ad_asset_request_object
583
+ command.response_representation = Google::Apis::DisplayvideoV4::UploadAdAssetResponse::Representation
584
+ command.response_class = Google::Apis::DisplayvideoV4::UploadAdAssetResponse
585
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
586
+ command.query['fields'] = fields unless fields.nil?
587
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
588
+ execute_or_queue_command(command, &block)
589
+ end
590
+
387
591
  # Gets an ad group ad.
388
592
  # @param [Fixnum] advertiser_id
389
593
  # Required. The ID of the advertiser this ad group ad belongs to.
@@ -757,6 +961,156 @@ module Google
757
961
  execute_or_queue_command(command, &block)
758
962
  end
759
963
 
964
+ # Creates a new association between the identified resource and a YouTube asset.
965
+ # Returns the newly-created association. *Warning:* This method is only
966
+ # available to an informed subset of users.
967
+ # @param [Fixnum] advertiser_id
968
+ # Required. The ID of the advertiser that the linked entity belongs to.
969
+ # @param [Fixnum] ad_group_id
970
+ # The ID of an ad group.
971
+ # @param [String] youtube_asset_type
972
+ # Required. The type of YouTube asset associated with the resource.
973
+ # @param [Google::Apis::DisplayvideoV4::YoutubeAssetAssociation] youtube_asset_association_object
974
+ # @param [Fixnum] linked_entity_line_item_id
975
+ # The ID of a line item.
976
+ # @param [String] fields
977
+ # Selector specifying which fields to include in a partial response.
978
+ # @param [String] quota_user
979
+ # Available to use for quota purposes for server-side applications. Can be any
980
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
981
+ # @param [Google::Apis::RequestOptions] options
982
+ # Request-specific options
983
+ #
984
+ # @yield [result, err] Result & error if block supplied
985
+ # @yieldparam result [Google::Apis::DisplayvideoV4::YoutubeAssetAssociation] parsed result object
986
+ # @yieldparam err [StandardError] error object if request failed
987
+ #
988
+ # @return [Google::Apis::DisplayvideoV4::YoutubeAssetAssociation]
989
+ #
990
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
991
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
992
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
993
+ def create_advertiser_ad_group_youtube_asset_type_youtube_asset_association(advertiser_id, ad_group_id, youtube_asset_type, youtube_asset_association_object = nil, linked_entity_line_item_id: nil, fields: nil, quota_user: nil, options: nil, &block)
994
+ command = make_simple_command(:post, 'v4/advertisers/{+advertiserId}/adGroups/{+adGroupId}/youtubeAssetTypes/{+youtubeAssetType}/youtubeAssetAssociations', options)
995
+ command.request_representation = Google::Apis::DisplayvideoV4::YoutubeAssetAssociation::Representation
996
+ command.request_object = youtube_asset_association_object
997
+ command.response_representation = Google::Apis::DisplayvideoV4::YoutubeAssetAssociation::Representation
998
+ command.response_class = Google::Apis::DisplayvideoV4::YoutubeAssetAssociation
999
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
1000
+ command.params['adGroupId'] = ad_group_id unless ad_group_id.nil?
1001
+ command.params['youtubeAssetType'] = youtube_asset_type unless youtube_asset_type.nil?
1002
+ command.query['linkedEntity.lineItemId'] = linked_entity_line_item_id unless linked_entity_line_item_id.nil?
1003
+ command.query['fields'] = fields unless fields.nil?
1004
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1005
+ execute_or_queue_command(command, &block)
1006
+ end
1007
+
1008
+ # Deletes an existing association between the identified resource and a YouTube
1009
+ # asset. *Warning:* This method is only available to an informed subset of users.
1010
+ # @param [Fixnum] advertiser_id
1011
+ # Required. The ID of the advertiser that the linked entity belongs to.
1012
+ # @param [Fixnum] ad_group_id
1013
+ # The ID of an ad group.
1014
+ # @param [String] youtube_asset_type
1015
+ # Required. The type of YouTube asset associated with the resource.
1016
+ # @param [Fixnum] youtube_asset_association_id
1017
+ # Required. The ID of the YouTube asset in the association. For `
1018
+ # YOUTUBE_ASSET_TYPE_LOCATION` and `YOUTUBE_ASSET_TYPE_AFFILIATE_LOCATION`
1019
+ # associations: This should be the ID of the asset set linked, or 0 if the
1020
+ # location_asset_filter or affiliate_location_asset_filter is `DISABLED`. For `
1021
+ # YOUTUBE_ASSET_TYPE_SITELINK` associations: This should be the ID of the
1022
+ # sitelink asset linked.
1023
+ # @param [Fixnum] linked_entity_line_item_id
1024
+ # The ID of a line item.
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
+ # @param [Google::Apis::RequestOptions] options
1031
+ # Request-specific options
1032
+ #
1033
+ # @yield [result, err] Result & error if block supplied
1034
+ # @yieldparam result [Google::Apis::DisplayvideoV4::Empty] parsed result object
1035
+ # @yieldparam err [StandardError] error object if request failed
1036
+ #
1037
+ # @return [Google::Apis::DisplayvideoV4::Empty]
1038
+ #
1039
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1040
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1041
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1042
+ def delete_advertiser_ad_group_youtube_asset_type_youtube_asset_association(advertiser_id, ad_group_id, youtube_asset_type, youtube_asset_association_id, linked_entity_line_item_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1043
+ command = make_simple_command(:delete, 'v4/advertisers/{+advertiserId}/adGroups/{+adGroupId}/youtubeAssetTypes/{+youtubeAssetType}/youtubeAssetAssociations/{+youtubeAssetAssociationId}', options)
1044
+ command.response_representation = Google::Apis::DisplayvideoV4::Empty::Representation
1045
+ command.response_class = Google::Apis::DisplayvideoV4::Empty
1046
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
1047
+ command.params['adGroupId'] = ad_group_id unless ad_group_id.nil?
1048
+ command.params['youtubeAssetType'] = youtube_asset_type unless youtube_asset_type.nil?
1049
+ command.params['youtubeAssetAssociationId'] = youtube_asset_association_id unless youtube_asset_association_id.nil?
1050
+ command.query['linkedEntity.lineItemId'] = linked_entity_line_item_id unless linked_entity_line_item_id.nil?
1051
+ command.query['fields'] = fields unless fields.nil?
1052
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1053
+ execute_or_queue_command(command, &block)
1054
+ end
1055
+
1056
+ # Lists the YouTube asset associations linked to the given resource.
1057
+ # @param [Fixnum] advertiser_id
1058
+ # Required. The ID of the advertiser that the linked entity belongs to.
1059
+ # @param [Fixnum] ad_group_id
1060
+ # The ID of an ad group.
1061
+ # @param [String] youtube_asset_type
1062
+ # Required. The type of YouTube asset being associated with the resource.
1063
+ # @param [Fixnum] linked_entity_line_item_id
1064
+ # The ID of a line item.
1065
+ # @param [String] order_by
1066
+ # Optional. Field by which to sort the list. The only acceptable values are: * `
1067
+ # linkedYoutubeAsset.locationAssetFilter.assetSetId`, * `linkedYoutubeAsset.
1068
+ # affiliateLocationAssetFilter.assetSetId`, * `linkedYoutubeAsset.sitelinkAsset.
1069
+ # assetId` The default sorting order is ascending. To specify descending order
1070
+ # for a field, a suffix " desc" should be added to the field name. Example: `
1071
+ # linkedYoutubeAsset.sitelinkAsset.assetId desc`.
1072
+ # @param [Fixnum] page_size
1073
+ # Optional. Requested page size. Must be between `1` and `10000`. If unspecified
1074
+ # will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid
1075
+ # value is specified.
1076
+ # @param [String] page_token
1077
+ # Optional. A token identifying a page of results the server should return.
1078
+ # Typically, this is the value of next_page_token returned from the previous
1079
+ # call to `ListYoutubeAssetAssociations` method. If not specified, the first
1080
+ # page of results will be returned.
1081
+ # @param [String] fields
1082
+ # Selector specifying which fields to include in a partial response.
1083
+ # @param [String] quota_user
1084
+ # Available to use for quota purposes for server-side applications. Can be any
1085
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1086
+ # @param [Google::Apis::RequestOptions] options
1087
+ # Request-specific options
1088
+ #
1089
+ # @yield [result, err] Result & error if block supplied
1090
+ # @yieldparam result [Google::Apis::DisplayvideoV4::ListYoutubeAssetAssociationsResponse] parsed result object
1091
+ # @yieldparam err [StandardError] error object if request failed
1092
+ #
1093
+ # @return [Google::Apis::DisplayvideoV4::ListYoutubeAssetAssociationsResponse]
1094
+ #
1095
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1096
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1097
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1098
+ def list_advertiser_ad_group_youtube_asset_type_youtube_asset_associations(advertiser_id, ad_group_id, youtube_asset_type, linked_entity_line_item_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1099
+ command = make_simple_command(:get, 'v4/advertisers/{+advertiserId}/adGroups/{+adGroupId}/youtubeAssetTypes/{+youtubeAssetType}/youtubeAssetAssociations', options)
1100
+ command.response_representation = Google::Apis::DisplayvideoV4::ListYoutubeAssetAssociationsResponse::Representation
1101
+ command.response_class = Google::Apis::DisplayvideoV4::ListYoutubeAssetAssociationsResponse
1102
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
1103
+ command.params['adGroupId'] = ad_group_id unless ad_group_id.nil?
1104
+ command.params['youtubeAssetType'] = youtube_asset_type unless youtube_asset_type.nil?
1105
+ command.query['linkedEntity.lineItemId'] = linked_entity_line_item_id unless linked_entity_line_item_id.nil?
1106
+ command.query['orderBy'] = order_by unless order_by.nil?
1107
+ command.query['pageSize'] = page_size unless page_size.nil?
1108
+ command.query['pageToken'] = page_token unless page_token.nil?
1109
+ command.query['fields'] = fields unless fields.nil?
1110
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1111
+ execute_or_queue_command(command, &block)
1112
+ end
1113
+
760
1114
  # Uploads an asset. Returns the ID of the newly uploaded asset if successful.
761
1115
  # The asset file size should be no more than 10 MB for images, 200 MB for ZIP
762
1116
  # files, and 1 GB for videos. Must be used within the [multipart media upload
@@ -3213,6 +3567,156 @@ module Google
3213
3567
  execute_or_queue_command(command, &block)
3214
3568
  end
3215
3569
 
3570
+ # Creates a new association between the identified resource and a YouTube asset.
3571
+ # Returns the newly-created association. *Warning:* This method is only
3572
+ # available to an informed subset of users.
3573
+ # @param [Fixnum] advertiser_id
3574
+ # Required. The ID of the advertiser that the linked entity belongs to.
3575
+ # @param [Fixnum] line_item_id
3576
+ # The ID of a line item.
3577
+ # @param [String] youtube_asset_type
3578
+ # Required. The type of YouTube asset associated with the resource.
3579
+ # @param [Google::Apis::DisplayvideoV4::YoutubeAssetAssociation] youtube_asset_association_object
3580
+ # @param [Fixnum] linked_entity_ad_group_id
3581
+ # The ID of an ad group.
3582
+ # @param [String] fields
3583
+ # Selector specifying which fields to include in a partial response.
3584
+ # @param [String] quota_user
3585
+ # Available to use for quota purposes for server-side applications. Can be any
3586
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3587
+ # @param [Google::Apis::RequestOptions] options
3588
+ # Request-specific options
3589
+ #
3590
+ # @yield [result, err] Result & error if block supplied
3591
+ # @yieldparam result [Google::Apis::DisplayvideoV4::YoutubeAssetAssociation] parsed result object
3592
+ # @yieldparam err [StandardError] error object if request failed
3593
+ #
3594
+ # @return [Google::Apis::DisplayvideoV4::YoutubeAssetAssociation]
3595
+ #
3596
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3597
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3598
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3599
+ def create_advertiser_line_item_youtube_asset_type_youtube_asset_association(advertiser_id, line_item_id, youtube_asset_type, youtube_asset_association_object = nil, linked_entity_ad_group_id: nil, fields: nil, quota_user: nil, options: nil, &block)
3600
+ command = make_simple_command(:post, 'v4/advertisers/{+advertiserId}/lineItems/{+lineItemId}/youtubeAssetTypes/{+youtubeAssetType}/youtubeAssetAssociations', options)
3601
+ command.request_representation = Google::Apis::DisplayvideoV4::YoutubeAssetAssociation::Representation
3602
+ command.request_object = youtube_asset_association_object
3603
+ command.response_representation = Google::Apis::DisplayvideoV4::YoutubeAssetAssociation::Representation
3604
+ command.response_class = Google::Apis::DisplayvideoV4::YoutubeAssetAssociation
3605
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
3606
+ command.params['lineItemId'] = line_item_id unless line_item_id.nil?
3607
+ command.params['youtubeAssetType'] = youtube_asset_type unless youtube_asset_type.nil?
3608
+ command.query['linkedEntity.adGroupId'] = linked_entity_ad_group_id unless linked_entity_ad_group_id.nil?
3609
+ command.query['fields'] = fields unless fields.nil?
3610
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3611
+ execute_or_queue_command(command, &block)
3612
+ end
3613
+
3614
+ # Deletes an existing association between the identified resource and a YouTube
3615
+ # asset. *Warning:* This method is only available to an informed subset of users.
3616
+ # @param [Fixnum] advertiser_id
3617
+ # Required. The ID of the advertiser that the linked entity belongs to.
3618
+ # @param [Fixnum] line_item_id
3619
+ # The ID of a line item.
3620
+ # @param [String] youtube_asset_type
3621
+ # Required. The type of YouTube asset associated with the resource.
3622
+ # @param [Fixnum] youtube_asset_association_id
3623
+ # Required. The ID of the YouTube asset in the association. For `
3624
+ # YOUTUBE_ASSET_TYPE_LOCATION` and `YOUTUBE_ASSET_TYPE_AFFILIATE_LOCATION`
3625
+ # associations: This should be the ID of the asset set linked, or 0 if the
3626
+ # location_asset_filter or affiliate_location_asset_filter is `DISABLED`. For `
3627
+ # YOUTUBE_ASSET_TYPE_SITELINK` associations: This should be the ID of the
3628
+ # sitelink asset linked.
3629
+ # @param [Fixnum] linked_entity_ad_group_id
3630
+ # The ID of an ad group.
3631
+ # @param [String] fields
3632
+ # Selector specifying which fields to include in a partial response.
3633
+ # @param [String] quota_user
3634
+ # Available to use for quota purposes for server-side applications. Can be any
3635
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3636
+ # @param [Google::Apis::RequestOptions] options
3637
+ # Request-specific options
3638
+ #
3639
+ # @yield [result, err] Result & error if block supplied
3640
+ # @yieldparam result [Google::Apis::DisplayvideoV4::Empty] parsed result object
3641
+ # @yieldparam err [StandardError] error object if request failed
3642
+ #
3643
+ # @return [Google::Apis::DisplayvideoV4::Empty]
3644
+ #
3645
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3646
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3647
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3648
+ def delete_advertiser_line_item_youtube_asset_type_youtube_asset_association(advertiser_id, line_item_id, youtube_asset_type, youtube_asset_association_id, linked_entity_ad_group_id: nil, fields: nil, quota_user: nil, options: nil, &block)
3649
+ command = make_simple_command(:delete, 'v4/advertisers/{+advertiserId}/lineItems/{+lineItemId}/youtubeAssetTypes/{+youtubeAssetType}/youtubeAssetAssociations/{+youtubeAssetAssociationId}', options)
3650
+ command.response_representation = Google::Apis::DisplayvideoV4::Empty::Representation
3651
+ command.response_class = Google::Apis::DisplayvideoV4::Empty
3652
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
3653
+ command.params['lineItemId'] = line_item_id unless line_item_id.nil?
3654
+ command.params['youtubeAssetType'] = youtube_asset_type unless youtube_asset_type.nil?
3655
+ command.params['youtubeAssetAssociationId'] = youtube_asset_association_id unless youtube_asset_association_id.nil?
3656
+ command.query['linkedEntity.adGroupId'] = linked_entity_ad_group_id unless linked_entity_ad_group_id.nil?
3657
+ command.query['fields'] = fields unless fields.nil?
3658
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3659
+ execute_or_queue_command(command, &block)
3660
+ end
3661
+
3662
+ # Lists the YouTube asset associations linked to the given resource.
3663
+ # @param [Fixnum] advertiser_id
3664
+ # Required. The ID of the advertiser that the linked entity belongs to.
3665
+ # @param [Fixnum] line_item_id
3666
+ # The ID of a line item.
3667
+ # @param [String] youtube_asset_type
3668
+ # Required. The type of YouTube asset being associated with the resource.
3669
+ # @param [Fixnum] linked_entity_ad_group_id
3670
+ # The ID of an ad group.
3671
+ # @param [String] order_by
3672
+ # Optional. Field by which to sort the list. The only acceptable values are: * `
3673
+ # linkedYoutubeAsset.locationAssetFilter.assetSetId`, * `linkedYoutubeAsset.
3674
+ # affiliateLocationAssetFilter.assetSetId`, * `linkedYoutubeAsset.sitelinkAsset.
3675
+ # assetId` The default sorting order is ascending. To specify descending order
3676
+ # for a field, a suffix " desc" should be added to the field name. Example: `
3677
+ # linkedYoutubeAsset.sitelinkAsset.assetId desc`.
3678
+ # @param [Fixnum] page_size
3679
+ # Optional. Requested page size. Must be between `1` and `10000`. If unspecified
3680
+ # will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid
3681
+ # value is specified.
3682
+ # @param [String] page_token
3683
+ # Optional. A token identifying a page of results the server should return.
3684
+ # Typically, this is the value of next_page_token returned from the previous
3685
+ # call to `ListYoutubeAssetAssociations` method. If not specified, the first
3686
+ # page of results will be returned.
3687
+ # @param [String] fields
3688
+ # Selector specifying which fields to include in a partial response.
3689
+ # @param [String] quota_user
3690
+ # Available to use for quota purposes for server-side applications. Can be any
3691
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3692
+ # @param [Google::Apis::RequestOptions] options
3693
+ # Request-specific options
3694
+ #
3695
+ # @yield [result, err] Result & error if block supplied
3696
+ # @yieldparam result [Google::Apis::DisplayvideoV4::ListYoutubeAssetAssociationsResponse] parsed result object
3697
+ # @yieldparam err [StandardError] error object if request failed
3698
+ #
3699
+ # @return [Google::Apis::DisplayvideoV4::ListYoutubeAssetAssociationsResponse]
3700
+ #
3701
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3702
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3703
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3704
+ def list_advertiser_line_item_youtube_asset_type_youtube_asset_associations(advertiser_id, line_item_id, youtube_asset_type, linked_entity_ad_group_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3705
+ command = make_simple_command(:get, 'v4/advertisers/{+advertiserId}/lineItems/{+lineItemId}/youtubeAssetTypes/{+youtubeAssetType}/youtubeAssetAssociations', options)
3706
+ command.response_representation = Google::Apis::DisplayvideoV4::ListYoutubeAssetAssociationsResponse::Representation
3707
+ command.response_class = Google::Apis::DisplayvideoV4::ListYoutubeAssetAssociationsResponse
3708
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
3709
+ command.params['lineItemId'] = line_item_id unless line_item_id.nil?
3710
+ command.params['youtubeAssetType'] = youtube_asset_type unless youtube_asset_type.nil?
3711
+ command.query['linkedEntity.adGroupId'] = linked_entity_ad_group_id unless linked_entity_ad_group_id.nil?
3712
+ command.query['orderBy'] = order_by unless order_by.nil?
3713
+ command.query['pageSize'] = page_size unless page_size.nil?
3714
+ command.query['pageToken'] = page_token unless page_token.nil?
3715
+ command.query['fields'] = fields unless fields.nil?
3716
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3717
+ execute_or_queue_command(command, &block)
3718
+ end
3719
+
3216
3720
  # Creates a new location list. Returns the newly created location list if
3217
3721
  # successful.
3218
3722
  # @param [Fixnum] advertiser_id
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-displayvideo_v4
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -57,7 +57,7 @@ licenses:
57
57
  metadata:
58
58
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
59
59
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-displayvideo_v4/CHANGELOG.md
60
- documentation_uri: https://googleapis.dev/ruby/google-apis-displayvideo_v4/v0.12.0
60
+ documentation_uri: https://googleapis.dev/ruby/google-apis-displayvideo_v4/v0.14.0
61
61
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-displayvideo_v4
62
62
  rdoc_options: []
63
63
  require_paths: