google-apis-displayvideo_v1 0.5.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -421,6 +421,69 @@ module Google
421
421
  execute_or_queue_command(command, &block)
422
422
  end
423
423
 
424
+ # Lists assigned targeting options of a campaign across targeting types.
425
+ # @param [Fixnum] advertiser_id
426
+ # Required. The ID of the advertiser the campaign belongs to.
427
+ # @param [Fixnum] campaign_id
428
+ # Required. The ID of the campaign to list assigned targeting options for.
429
+ # @param [String] filter
430
+ # Allows filtering by assigned targeting option properties. Supported syntax: *
431
+ # Filter expressions are made up of one or more restrictions. * Restrictions can
432
+ # be combined by the logical operator `OR` on the same field. * A restriction
433
+ # has the form of ``field` `operator` `value``. * The operator must be `EQUALS (=
434
+ # )`. * Supported fields: - `targetingType` - `inheritance` Examples: *
435
+ # AssignedTargetingOptions of targeting type TARGETING_TYPE_LANGUAGE or
436
+ # TARGETING_TYPE_GENDER `targetingType="TARGETING_TYPE_LANGUAGE" OR
437
+ # targetingType="TARGETING_TYPE_GENDER"` * AssignedTargetingOptions with
438
+ # inheritance status of NOT_INHERITED or INHERITED_FROM_PARTNER `inheritance="
439
+ # NOT_INHERITED" OR inheritance="INHERITED_FROM_PARTNER"` The length of this
440
+ # field should be no more than 500 characters.
441
+ # @param [String] order_by
442
+ # Field by which to sort the list. Acceptable values are: * `targetingType` (
443
+ # default) The default sorting order is ascending. To specify descending order
444
+ # for a field, a suffix "desc" should be added to the field name. Example: `
445
+ # targetingType desc`.
446
+ # @param [Fixnum] page_size
447
+ # Requested page size. The size must be an integer between `1` and `5000`. If
448
+ # unspecified, the default is `5000`. Returns error code `INVALID_ARGUMENT` if
449
+ # an invalid value is specified.
450
+ # @param [String] page_token
451
+ # A token that lets the client fetch the next page of results. Typically, this
452
+ # is the value of next_page_token returned from the previous call to `
453
+ # BulkListCampaignAssignedTargetingOptions` method. If not specified, the first
454
+ # page of results will be returned.
455
+ # @param [String] fields
456
+ # Selector specifying which fields to include in a partial response.
457
+ # @param [String] quota_user
458
+ # Available to use for quota purposes for server-side applications. Can be any
459
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
460
+ # @param [Google::Apis::RequestOptions] options
461
+ # Request-specific options
462
+ #
463
+ # @yield [result, err] Result & error if block supplied
464
+ # @yieldparam result [Google::Apis::DisplayvideoV1::BulkListCampaignAssignedTargetingOptionsResponse] parsed result object
465
+ # @yieldparam err [StandardError] error object if request failed
466
+ #
467
+ # @return [Google::Apis::DisplayvideoV1::BulkListCampaignAssignedTargetingOptionsResponse]
468
+ #
469
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
470
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
471
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
472
+ def bulk_advertiser_campaign_list_campaign_assigned_targeting_options(advertiser_id, campaign_id, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
473
+ command = make_simple_command(:get, 'v1/advertisers/{+advertiserId}/campaigns/{+campaignId}:bulkListCampaignAssignedTargetingOptions', options)
474
+ command.response_representation = Google::Apis::DisplayvideoV1::BulkListCampaignAssignedTargetingOptionsResponse::Representation
475
+ command.response_class = Google::Apis::DisplayvideoV1::BulkListCampaignAssignedTargetingOptionsResponse
476
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
477
+ command.params['campaignId'] = campaign_id unless campaign_id.nil?
478
+ command.query['filter'] = filter unless filter.nil?
479
+ command.query['orderBy'] = order_by unless order_by.nil?
480
+ command.query['pageSize'] = page_size unless page_size.nil?
481
+ command.query['pageToken'] = page_token unless page_token.nil?
482
+ command.query['fields'] = fields unless fields.nil?
483
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
484
+ execute_or_queue_command(command, &block)
485
+ end
486
+
424
487
  # Creates a new campaign. Returns the newly created campaign if successful.
425
488
  # @param [Fixnum] advertiser_id
426
489
  # Output only. The unique ID of the advertiser the campaign belongs to.
@@ -626,6 +689,136 @@ module Google
626
689
  execute_or_queue_command(command, &block)
627
690
  end
628
691
 
692
+ # Gets a single targeting option assigned to a campaign.
693
+ # @param [Fixnum] advertiser_id
694
+ # Required. The ID of the advertiser the campaign belongs to.
695
+ # @param [Fixnum] campaign_id
696
+ # Required. The ID of the campaign the assigned targeting option belongs to.
697
+ # @param [String] targeting_type
698
+ # Required. Identifies the type of this assigned targeting option. Supported
699
+ # targeting types: * `TARGETING_TYPE_AGE_RANGE` * `
700
+ # TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `
701
+ # TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `
702
+ # TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `
703
+ # TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT`
704
+ # * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `
705
+ # TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `
706
+ # TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `
707
+ # TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `
708
+ # TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`
709
+ # * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `
710
+ # TARGETING_TYPE_VIEWABILITY`
711
+ # @param [String] assigned_targeting_option_id
712
+ # Required. An identifier unique to the targeting type in this campaign that
713
+ # identifies the assigned targeting option being requested.
714
+ # @param [String] fields
715
+ # Selector specifying which fields to include in a partial response.
716
+ # @param [String] quota_user
717
+ # Available to use for quota purposes for server-side applications. Can be any
718
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
719
+ # @param [Google::Apis::RequestOptions] options
720
+ # Request-specific options
721
+ #
722
+ # @yield [result, err] Result & error if block supplied
723
+ # @yieldparam result [Google::Apis::DisplayvideoV1::AssignedTargetingOption] parsed result object
724
+ # @yieldparam err [StandardError] error object if request failed
725
+ #
726
+ # @return [Google::Apis::DisplayvideoV1::AssignedTargetingOption]
727
+ #
728
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
729
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
730
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
731
+ def get_advertiser_campaign_targeting_type_assigned_targeting_option(advertiser_id, campaign_id, targeting_type, assigned_targeting_option_id, fields: nil, quota_user: nil, options: nil, &block)
732
+ command = make_simple_command(:get, 'v1/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}', options)
733
+ command.response_representation = Google::Apis::DisplayvideoV1::AssignedTargetingOption::Representation
734
+ command.response_class = Google::Apis::DisplayvideoV1::AssignedTargetingOption
735
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
736
+ command.params['campaignId'] = campaign_id unless campaign_id.nil?
737
+ command.params['targetingType'] = targeting_type unless targeting_type.nil?
738
+ command.params['assignedTargetingOptionId'] = assigned_targeting_option_id unless assigned_targeting_option_id.nil?
739
+ command.query['fields'] = fields unless fields.nil?
740
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
741
+ execute_or_queue_command(command, &block)
742
+ end
743
+
744
+ # Lists the targeting options assigned to a campaign for a specified targeting
745
+ # type.
746
+ # @param [Fixnum] advertiser_id
747
+ # Required. The ID of the advertiser the campaign belongs to.
748
+ # @param [Fixnum] campaign_id
749
+ # Required. The ID of the campaign to list assigned targeting options for.
750
+ # @param [String] targeting_type
751
+ # Required. Identifies the type of assigned targeting options to list. Supported
752
+ # targeting types: * `TARGETING_TYPE_AGE_RANGE` * `
753
+ # TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `
754
+ # TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `
755
+ # TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `
756
+ # TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT`
757
+ # * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `
758
+ # TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `
759
+ # TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `
760
+ # TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `
761
+ # TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`
762
+ # * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `
763
+ # TARGETING_TYPE_VIEWABILITY`
764
+ # @param [String] filter
765
+ # Allows filtering by assigned targeting option properties. Supported syntax: *
766
+ # Filter expressions are made up of one or more restrictions. * Restrictions can
767
+ # be combined by the logical operator `OR`. * A restriction has the form of ``
768
+ # field` `operator` `value``. * The operator must be `EQUALS (=)`. * Supported
769
+ # fields: - `assignedTargetingOptionId` - `inheritance` Examples: *
770
+ # AssignedTargetingOptions with ID 1 or 2 `assignedTargetingOptionId="1" OR
771
+ # assignedTargetingOptionId="2"` * AssignedTargetingOptions with inheritance
772
+ # status of NOT_INHERITED or INHERITED_FROM_PARTNER `inheritance="NOT_INHERITED"
773
+ # OR inheritance="INHERITED_FROM_PARTNER"` The length of this field should be no
774
+ # more than 500 characters.
775
+ # @param [String] order_by
776
+ # Field by which to sort the list. Acceptable values are: * `
777
+ # assignedTargetingOptionId` (default) The default sorting order is ascending.
778
+ # To specify descending order for a field, a suffix "desc" should be added to
779
+ # the field name. Example: `assignedTargetingOptionId desc`.
780
+ # @param [Fixnum] page_size
781
+ # Requested page size. Must be between `1` and `100`. If unspecified will
782
+ # default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is
783
+ # specified.
784
+ # @param [String] page_token
785
+ # A token identifying a page of results the server should return. Typically,
786
+ # this is the value of next_page_token returned from the previous call to `
787
+ # ListCampaignAssignedTargetingOptions` method. If not specified, the first page
788
+ # of results will be returned.
789
+ # @param [String] fields
790
+ # Selector specifying which fields to include in a partial response.
791
+ # @param [String] quota_user
792
+ # Available to use for quota purposes for server-side applications. Can be any
793
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
794
+ # @param [Google::Apis::RequestOptions] options
795
+ # Request-specific options
796
+ #
797
+ # @yield [result, err] Result & error if block supplied
798
+ # @yieldparam result [Google::Apis::DisplayvideoV1::ListCampaignAssignedTargetingOptionsResponse] parsed result object
799
+ # @yieldparam err [StandardError] error object if request failed
800
+ #
801
+ # @return [Google::Apis::DisplayvideoV1::ListCampaignAssignedTargetingOptionsResponse]
802
+ #
803
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
804
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
805
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
806
+ def list_advertiser_campaign_targeting_type_assigned_targeting_options(advertiser_id, campaign_id, targeting_type, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
807
+ command = make_simple_command(:get, 'v1/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions', options)
808
+ command.response_representation = Google::Apis::DisplayvideoV1::ListCampaignAssignedTargetingOptionsResponse::Representation
809
+ command.response_class = Google::Apis::DisplayvideoV1::ListCampaignAssignedTargetingOptionsResponse
810
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
811
+ command.params['campaignId'] = campaign_id unless campaign_id.nil?
812
+ command.params['targetingType'] = targeting_type unless targeting_type.nil?
813
+ command.query['filter'] = filter unless filter.nil?
814
+ command.query['orderBy'] = order_by unless order_by.nil?
815
+ command.query['pageSize'] = page_size unless page_size.nil?
816
+ command.query['pageToken'] = page_token unless page_token.nil?
817
+ command.query['fields'] = fields unless fields.nil?
818
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
819
+ execute_or_queue_command(command, &block)
820
+ end
821
+
629
822
  # Creates a new channel. Returns the newly created channel if successful.
630
823
  # @param [Fixnum] advertiser_id
631
824
  # The ID of the advertiser that owns the created channel.
@@ -931,7 +1124,7 @@ module Google
931
1124
  # for a field, a suffix " desc" should be added to the field name. Example: `
932
1125
  # urlOrAppId desc`.
933
1126
  # @param [Fixnum] page_size
934
- # Requested page size. Must be between `1` and `100`. If unspecified will
1127
+ # Requested page size. Must be between `1` and `10000`. If unspecified will
935
1128
  # default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is
936
1129
  # specified.
937
1130
  # @param [String] page_token
@@ -974,6 +1167,44 @@ module Google
974
1167
  execute_or_queue_command(command, &block)
975
1168
  end
976
1169
 
1170
+ # Replaces all of the sites under a single channel. The operation will replace
1171
+ # the sites under a channel with the sites provided in ReplaceSitesRequest.
1172
+ # new_sites.
1173
+ # @param [Fixnum] advertiser_id
1174
+ # The ID of the advertiser that owns the parent channel.
1175
+ # @param [Fixnum] channel_id
1176
+ # Required. The ID of the parent channel whose sites will be replaced.
1177
+ # @param [Google::Apis::DisplayvideoV1::ReplaceSitesRequest] replace_sites_request_object
1178
+ # @param [String] fields
1179
+ # Selector specifying which fields to include in a partial response.
1180
+ # @param [String] quota_user
1181
+ # Available to use for quota purposes for server-side applications. Can be any
1182
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1183
+ # @param [Google::Apis::RequestOptions] options
1184
+ # Request-specific options
1185
+ #
1186
+ # @yield [result, err] Result & error if block supplied
1187
+ # @yieldparam result [Google::Apis::DisplayvideoV1::ReplaceSitesResponse] parsed result object
1188
+ # @yieldparam err [StandardError] error object if request failed
1189
+ #
1190
+ # @return [Google::Apis::DisplayvideoV1::ReplaceSitesResponse]
1191
+ #
1192
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1193
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1194
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1195
+ def replace_advertiser_channel_site(advertiser_id, channel_id, replace_sites_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1196
+ command = make_simple_command(:post, 'v1/advertisers/{advertiserId}/channels/{+channelId}/sites:replace', options)
1197
+ command.request_representation = Google::Apis::DisplayvideoV1::ReplaceSitesRequest::Representation
1198
+ command.request_object = replace_sites_request_object
1199
+ command.response_representation = Google::Apis::DisplayvideoV1::ReplaceSitesResponse::Representation
1200
+ command.response_class = Google::Apis::DisplayvideoV1::ReplaceSitesResponse
1201
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
1202
+ command.params['channelId'] = channel_id unless channel_id.nil?
1203
+ command.query['fields'] = fields unless fields.nil?
1204
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1205
+ execute_or_queue_command(command, &block)
1206
+ end
1207
+
977
1208
  # Creates a new creative. Returns the newly created creative if successful.
978
1209
  # @param [Fixnum] advertiser_id
979
1210
  # Output only. The unique ID of the advertiser the creative belongs to.
@@ -1578,6 +1809,91 @@ module Google
1578
1809
  execute_or_queue_command(command, &block)
1579
1810
  end
1580
1811
 
1812
+ # Lists invoices posted for an advertiser in a given month. Invoices generated
1813
+ # by billing profiles with a "Partner" invoice level are not retrievable through
1814
+ # this method.
1815
+ # @param [Fixnum] advertiser_id
1816
+ # Required. The ID of the advertiser to list invoices for.
1817
+ # @param [String] issue_month
1818
+ # The month to list the invoices for. If not set, the request will retrieve
1819
+ # invoices for the previous month. Must be in the format YYYYMM.
1820
+ # @param [String] loi_sapin_invoice_type
1821
+ # Select type of invoice to retrieve for Loi Sapin advertisers. Only applicable
1822
+ # to Loi Sapin advertisers. Will be ignored otherwise.
1823
+ # @param [Fixnum] page_size
1824
+ # Requested page size. Must be between `1` and `100`. If unspecified will
1825
+ # default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is
1826
+ # specified.
1827
+ # @param [String] page_token
1828
+ # A token identifying a page of results the server should return. Typically,
1829
+ # this is the value of next_page_token returned from the previous call to `
1830
+ # ListInvoices` method. If not specified, the first page of results will be
1831
+ # returned.
1832
+ # @param [String] fields
1833
+ # Selector specifying which fields to include in a partial response.
1834
+ # @param [String] quota_user
1835
+ # Available to use for quota purposes for server-side applications. Can be any
1836
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1837
+ # @param [Google::Apis::RequestOptions] options
1838
+ # Request-specific options
1839
+ #
1840
+ # @yield [result, err] Result & error if block supplied
1841
+ # @yieldparam result [Google::Apis::DisplayvideoV1::ListInvoicesResponse] parsed result object
1842
+ # @yieldparam err [StandardError] error object if request failed
1843
+ #
1844
+ # @return [Google::Apis::DisplayvideoV1::ListInvoicesResponse]
1845
+ #
1846
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1847
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1848
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1849
+ def list_advertiser_invoices(advertiser_id, issue_month: nil, loi_sapin_invoice_type: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1850
+ command = make_simple_command(:get, 'v1/advertisers/{+advertiserId}/invoices', options)
1851
+ command.response_representation = Google::Apis::DisplayvideoV1::ListInvoicesResponse::Representation
1852
+ command.response_class = Google::Apis::DisplayvideoV1::ListInvoicesResponse
1853
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
1854
+ command.query['issueMonth'] = issue_month unless issue_month.nil?
1855
+ command.query['loiSapinInvoiceType'] = loi_sapin_invoice_type unless loi_sapin_invoice_type.nil?
1856
+ command.query['pageSize'] = page_size unless page_size.nil?
1857
+ command.query['pageToken'] = page_token unless page_token.nil?
1858
+ command.query['fields'] = fields unless fields.nil?
1859
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1860
+ execute_or_queue_command(command, &block)
1861
+ end
1862
+
1863
+ # Retrieves the invoice currency used by an advertiser in a given month.
1864
+ # @param [Fixnum] advertiser_id
1865
+ # Required. The ID of the advertiser to lookup currency for.
1866
+ # @param [String] invoice_month
1867
+ # Month for which the currency is needed. If not set, the request will return
1868
+ # existing currency settings for the advertiser. Must be in the format YYYYMM.
1869
+ # @param [String] fields
1870
+ # Selector specifying which fields to include in a partial response.
1871
+ # @param [String] quota_user
1872
+ # Available to use for quota purposes for server-side applications. Can be any
1873
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1874
+ # @param [Google::Apis::RequestOptions] options
1875
+ # Request-specific options
1876
+ #
1877
+ # @yield [result, err] Result & error if block supplied
1878
+ # @yieldparam result [Google::Apis::DisplayvideoV1::LookupInvoiceCurrencyResponse] parsed result object
1879
+ # @yieldparam err [StandardError] error object if request failed
1880
+ #
1881
+ # @return [Google::Apis::DisplayvideoV1::LookupInvoiceCurrencyResponse]
1882
+ #
1883
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1884
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1885
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1886
+ def lookup_advertiser_invoice_invoice_currency(advertiser_id, invoice_month: nil, fields: nil, quota_user: nil, options: nil, &block)
1887
+ command = make_simple_command(:get, 'v1/advertisers/{+advertiserId}/invoices:lookupInvoiceCurrency', options)
1888
+ command.response_representation = Google::Apis::DisplayvideoV1::LookupInvoiceCurrencyResponse::Representation
1889
+ command.response_class = Google::Apis::DisplayvideoV1::LookupInvoiceCurrencyResponse
1890
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
1891
+ command.query['invoiceMonth'] = invoice_month unless invoice_month.nil?
1892
+ command.query['fields'] = fields unless fields.nil?
1893
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1894
+ execute_or_queue_command(command, &block)
1895
+ end
1896
+
1581
1897
  # Bulk edits targeting options under a single line item. The operation will
1582
1898
  # delete the assigned targeting options provided in
1583
1899
  # BulkEditLineItemAssignedTargetingOptionsRequest.delete_requests and then
@@ -1750,6 +2066,43 @@ module Google
1750
2066
  execute_or_queue_command(command, &block)
1751
2067
  end
1752
2068
 
2069
+ # Creates a new line item with settings (including targeting) inherited from the
2070
+ # insertion order and an `ENTITY_STATUS_DRAFT` entity_status. Returns the newly
2071
+ # created line item if successful. There are default values based on the three
2072
+ # fields: * The insertion order's insertion_order_type * The insertion order's
2073
+ # automation_type * The given line_item_type
2074
+ # @param [Fixnum] advertiser_id
2075
+ # Required. The ID of the advertiser this line item belongs to.
2076
+ # @param [Google::Apis::DisplayvideoV1::GenerateDefaultLineItemRequest] generate_default_line_item_request_object
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
+ # @param [Google::Apis::RequestOptions] options
2083
+ # Request-specific options
2084
+ #
2085
+ # @yield [result, err] Result & error if block supplied
2086
+ # @yieldparam result [Google::Apis::DisplayvideoV1::LineItem] parsed result object
2087
+ # @yieldparam err [StandardError] error object if request failed
2088
+ #
2089
+ # @return [Google::Apis::DisplayvideoV1::LineItem]
2090
+ #
2091
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2092
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2093
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2094
+ def generate_default_line_item(advertiser_id, generate_default_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2095
+ command = make_simple_command(:post, 'v1/advertisers/{+advertiserId}/lineItems:generateDefault', options)
2096
+ command.request_representation = Google::Apis::DisplayvideoV1::GenerateDefaultLineItemRequest::Representation
2097
+ command.request_object = generate_default_line_item_request_object
2098
+ command.response_representation = Google::Apis::DisplayvideoV1::LineItem::Representation
2099
+ command.response_class = Google::Apis::DisplayvideoV1::LineItem
2100
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
2101
+ command.query['fields'] = fields unless fields.nil?
2102
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2103
+ execute_or_queue_command(command, &block)
2104
+ end
2105
+
1753
2106
  # Gets a line item.
1754
2107
  # @param [Fixnum] advertiser_id
1755
2108
  # Required. The ID of the advertiser this line item belongs to.
@@ -1797,23 +2150,26 @@ module Google
1797
2150
  # ). * The operator used on `updateTime` must be `GREATER THAN OR EQUAL TO (>=)`
1798
2151
  # or `LESS THAN OR EQUAL TO (<=)`. * The operator used on `warningMessages` must
1799
2152
  # be `HAS (:)`. * The operators used on all other fields must be `EQUALS (=)`. *
1800
- # Supported fields: - `campaignId` - `displayName` - `insertionOrderId` - `
2153
+ # Supported properties: - `campaignId` - `displayName` - `insertionOrderId` - `
1801
2154
  # entityStatus` - `lineItemId` - `lineItemType` - `flight.dateRange.endDate` (
1802
2155
  # input formatted as YYYY-MM-DD) - `warningMessages` - `flight.triggerId` - `
1803
- # updateTime` (input in ISO 8601 format, or YYYY-MM-DDTHH:MM:SSZ) * The operator
1804
- # can be `NO LESS THAN (>=)` or `NO GREATER THAN (<=)`. - `updateTime` (format
1805
- # of ISO 8601) Examples: * All line items under an insertion order: `
1806
- # insertionOrderId="1234"` * All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED`
1807
- # and `LINE_ITEM_TYPE_DISPLAY_DEFAULT` line items under an advertiser: `(
1808
- # entityStatus="ENTITY_STATUS_ACTIVE" OR entityStatus="ENTITY_STATUS_PAUSED")
1809
- # AND lineItemType="LINE_ITEM_TYPE_DISPLAY_DEFAULT"` * All line items whose
1810
- # flight dates end before March 28, 2019: `flight.dateRange.endDate<"2019-03-28"`
1811
- # * All line items that have `NO_VALID_CREATIVE` in `warningMessages`: `
2156
+ # updateTime` (input in ISO 8601 format, or YYYY-MM-DDTHH:MM:SSZ) - `
2157
+ # targetedChannelId` - `targetedNegativeKeywordListId` Examples: * All line
2158
+ # items under an insertion order: `insertionOrderId="1234"` * All `
2159
+ # ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` and `
2160
+ # LINE_ITEM_TYPE_DISPLAY_DEFAULT` line items under an advertiser: `(entityStatus=
2161
+ # "ENTITY_STATUS_ACTIVE" OR entityStatus="ENTITY_STATUS_PAUSED") AND
2162
+ # lineItemType="LINE_ITEM_TYPE_DISPLAY_DEFAULT"` * All line items whose flight
2163
+ # dates end before March 28, 2019: `flight.dateRange.endDate<"2019-03-28"` * All
2164
+ # line items that have `NO_VALID_CREATIVE` in `warningMessages`: `
1812
2165
  # warningMessages:"NO_VALID_CREATIVE"` * All line items with an update time less
1813
2166
  # than or equal to `2020-11-04T18:54:47Z (format of ISO 8601)`: `updateTime<="
1814
2167
  # 2020-11-04T18:54:47Z"` * All line items with an update time greater than or
1815
2168
  # equal to `2020-11-04T18:54:47Z (format of ISO 8601)`: `updateTime>="2020-11-
1816
- # 04T18:54:47Z"` The length of this field should be no more than 500 characters.
2169
+ # 04T18:54:47Z"` * All line items that are using both the specified channel and
2170
+ # specified negative keyword list in their targeting: `
2171
+ # targetedNegativeKeywordListId=789 AND targetedChannelId=12345` The length of
2172
+ # this field should be no more than 500 characters.
1817
2173
  # @param [String] order_by
1818
2174
  # Field by which to sort the list. Acceptable values are: * "displayName" (
1819
2175
  # default) * "entityStatus" * “flight.dateRange.endDate” * "updateTime" The
@@ -2982,7 +3338,7 @@ module Google
2982
3338
  # for a field, a suffix " desc" should be added to the field name. Example: `
2983
3339
  # keywordValue desc`.
2984
3340
  # @param [Fixnum] page_size
2985
- # Requested page size. Must be between `1` and `100`. If unspecified will
3341
+ # Requested page size. Must be between `1` and `1000`. If unspecified will
2986
3342
  # default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is
2987
3343
  # specified.
2988
3344
  # @param [String] page_token
@@ -3022,6 +3378,46 @@ module Google
3022
3378
  execute_or_queue_command(command, &block)
3023
3379
  end
3024
3380
 
3381
+ # Replaces all negative keywords in a single negative keyword list. The
3382
+ # operation will replace the keywords in a negative keyword list with keywords
3383
+ # provided in ReplaceNegativeKeywordsRequest.new_negative_keywords.
3384
+ # @param [Fixnum] advertiser_id
3385
+ # Required. The ID of the DV360 advertiser to which the parent negative keyword
3386
+ # list belongs.
3387
+ # @param [Fixnum] negative_keyword_list_id
3388
+ # Required. The ID of the parent negative keyword list to which the negative
3389
+ # keywords belong.
3390
+ # @param [Google::Apis::DisplayvideoV1::ReplaceNegativeKeywordsRequest] replace_negative_keywords_request_object
3391
+ # @param [String] fields
3392
+ # Selector specifying which fields to include in a partial response.
3393
+ # @param [String] quota_user
3394
+ # Available to use for quota purposes for server-side applications. Can be any
3395
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3396
+ # @param [Google::Apis::RequestOptions] options
3397
+ # Request-specific options
3398
+ #
3399
+ # @yield [result, err] Result & error if block supplied
3400
+ # @yieldparam result [Google::Apis::DisplayvideoV1::ReplaceNegativeKeywordsResponse] parsed result object
3401
+ # @yieldparam err [StandardError] error object if request failed
3402
+ #
3403
+ # @return [Google::Apis::DisplayvideoV1::ReplaceNegativeKeywordsResponse]
3404
+ #
3405
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3406
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3407
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3408
+ def replace_negative_keywords(advertiser_id, negative_keyword_list_id, replace_negative_keywords_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3409
+ command = make_simple_command(:post, 'v1/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords:replace', options)
3410
+ command.request_representation = Google::Apis::DisplayvideoV1::ReplaceNegativeKeywordsRequest::Representation
3411
+ command.request_object = replace_negative_keywords_request_object
3412
+ command.response_representation = Google::Apis::DisplayvideoV1::ReplaceNegativeKeywordsResponse::Representation
3413
+ command.response_class = Google::Apis::DisplayvideoV1::ReplaceNegativeKeywordsResponse
3414
+ command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
3415
+ command.params['negativeKeywordListId'] = negative_keyword_list_id unless negative_keyword_list_id.nil?
3416
+ command.query['fields'] = fields unless fields.nil?
3417
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3418
+ execute_or_queue_command(command, &block)
3419
+ end
3420
+
3025
3421
  # Assigns a targeting option to an advertiser. Returns the assigned targeting
3026
3422
  # option if successful.
3027
3423
  # @param [Fixnum] advertiser_id
@@ -4738,7 +5134,7 @@ module Google
4738
5134
  # for a field, a suffix " desc" should be added to the field name. Example: `
4739
5135
  # urlOrAppId desc`.
4740
5136
  # @param [Fixnum] page_size
4741
- # Requested page size. Must be between `1` and `100`. If unspecified will
5137
+ # Requested page size. Must be between `1` and `10000`. If unspecified will
4742
5138
  # default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is
4743
5139
  # specified.
4744
5140
  # @param [String] page_token
@@ -4779,6 +5175,44 @@ module Google
4779
5175
  execute_or_queue_command(command, &block)
4780
5176
  end
4781
5177
 
5178
+ # Replaces all of the sites under a single channel. The operation will replace
5179
+ # the sites under a channel with the sites provided in ReplaceSitesRequest.
5180
+ # new_sites.
5181
+ # @param [Fixnum] partner_id
5182
+ # The ID of the partner that owns the parent channel.
5183
+ # @param [Fixnum] channel_id
5184
+ # Required. The ID of the parent channel whose sites will be replaced.
5185
+ # @param [Google::Apis::DisplayvideoV1::ReplaceSitesRequest] replace_sites_request_object
5186
+ # @param [String] fields
5187
+ # Selector specifying which fields to include in a partial response.
5188
+ # @param [String] quota_user
5189
+ # Available to use for quota purposes for server-side applications. Can be any
5190
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
5191
+ # @param [Google::Apis::RequestOptions] options
5192
+ # Request-specific options
5193
+ #
5194
+ # @yield [result, err] Result & error if block supplied
5195
+ # @yieldparam result [Google::Apis::DisplayvideoV1::ReplaceSitesResponse] parsed result object
5196
+ # @yieldparam err [StandardError] error object if request failed
5197
+ #
5198
+ # @return [Google::Apis::DisplayvideoV1::ReplaceSitesResponse]
5199
+ #
5200
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5201
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5202
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
5203
+ def replace_partner_channel_site(partner_id, channel_id, replace_sites_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
5204
+ command = make_simple_command(:post, 'v1/partners/{partnerId}/channels/{+channelId}/sites:replace', options)
5205
+ command.request_representation = Google::Apis::DisplayvideoV1::ReplaceSitesRequest::Representation
5206
+ command.request_object = replace_sites_request_object
5207
+ command.response_representation = Google::Apis::DisplayvideoV1::ReplaceSitesResponse::Representation
5208
+ command.response_class = Google::Apis::DisplayvideoV1::ReplaceSitesResponse
5209
+ command.params['partnerId'] = partner_id unless partner_id.nil?
5210
+ command.params['channelId'] = channel_id unless channel_id.nil?
5211
+ command.query['fields'] = fields unless fields.nil?
5212
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
5213
+ execute_or_queue_command(command, &block)
5214
+ end
5215
+
4782
5216
  # Assigns a targeting option to a partner. Returns the assigned targeting option
4783
5217
  # if successful.
4784
5218
  # @param [Fixnum] partner_id