google-ads-ad_manager-v1 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +4 -4
- data/README.md +4 -4
- data/lib/google/ads/ad_manager/v1/ad_break_service/credentials.rb +47 -0
- data/lib/google/ads/ad_manager/v1/ad_break_service/paths.rb +69 -0
- data/lib/google/ads/ad_manager/v1/ad_break_service/rest/client.rb +854 -0
- data/lib/google/ads/ad_manager/v1/ad_break_service/rest/service_stub.rb +432 -0
- data/lib/google/ads/ad_manager/v1/ad_break_service/rest.rb +52 -0
- data/lib/google/ads/ad_manager/v1/ad_break_service.rb +48 -0
- data/lib/google/ads/ad_manager/v1/ad_unit_service/credentials.rb +3 -0
- data/lib/google/ads/ad_manager/v1/bandwidth_group_service/credentials.rb +47 -0
- data/lib/google/ads/ad_manager/v1/bandwidth_group_service/paths.rb +64 -0
- data/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest/client.rb +538 -0
- data/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest/service_stub.rb +203 -0
- data/lib/google/ads/ad_manager/v1/bandwidth_group_service/rest.rb +52 -0
- data/lib/google/ads/ad_manager/v1/bandwidth_group_service.rb +48 -0
- data/lib/google/ads/ad_manager/v1/company_service/credentials.rb +3 -0
- data/lib/google/ads/ad_manager/v1/custom_field_service/credentials.rb +3 -0
- data/lib/google/ads/ad_manager/v1/custom_targeting_key_service/credentials.rb +3 -0
- data/lib/google/ads/ad_manager/v1/custom_targeting_value_service/credentials.rb +3 -0
- data/lib/google/ads/ad_manager/v1/custom_targeting_value_service/paths.rb +9 -14
- data/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/client.rb +2 -2
- data/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/service_stub.rb +14 -0
- data/lib/google/ads/ad_manager/v1/device_category_service/credentials.rb +47 -0
- data/lib/google/ads/ad_manager/v1/device_category_service/paths.rb +64 -0
- data/lib/google/ads/ad_manager/v1/device_category_service/rest/client.rb +538 -0
- data/lib/google/ads/ad_manager/v1/device_category_service/rest/service_stub.rb +203 -0
- data/lib/google/ads/ad_manager/v1/device_category_service/rest.rb +52 -0
- data/lib/google/ads/ad_manager/v1/device_category_service.rb +48 -0
- data/lib/google/ads/ad_manager/v1/entity_signals_mapping_service/credentials.rb +3 -0
- data/lib/google/ads/ad_manager/v1/geo_target_service/credentials.rb +47 -0
- data/lib/google/ads/ad_manager/v1/geo_target_service/paths.rb +64 -0
- data/lib/google/ads/ad_manager/v1/geo_target_service/rest/client.rb +538 -0
- data/lib/google/ads/ad_manager/v1/geo_target_service/rest/service_stub.rb +203 -0
- data/lib/google/ads/ad_manager/v1/geo_target_service/rest.rb +52 -0
- data/lib/google/ads/ad_manager/v1/geo_target_service.rb +48 -0
- data/lib/google/ads/ad_manager/v1/network_service/credentials.rb +3 -0
- data/lib/google/ads/ad_manager/v1/network_service/rest/client.rb +1 -1
- data/lib/google/ads/ad_manager/v1/network_service/rest.rb +1 -1
- data/lib/google/ads/ad_manager/v1/network_service.rb +1 -1
- data/lib/google/ads/ad_manager/v1/operating_system_service/credentials.rb +47 -0
- data/lib/google/ads/ad_manager/v1/operating_system_service/paths.rb +64 -0
- data/lib/google/ads/ad_manager/v1/operating_system_service/rest/client.rb +538 -0
- data/lib/google/ads/ad_manager/v1/operating_system_service/rest/service_stub.rb +203 -0
- data/lib/google/ads/ad_manager/v1/operating_system_service/rest.rb +52 -0
- data/lib/google/ads/ad_manager/v1/operating_system_service.rb +48 -0
- data/lib/google/ads/ad_manager/v1/operating_system_version_service/credentials.rb +47 -0
- data/lib/google/ads/ad_manager/v1/operating_system_version_service/paths.rb +64 -0
- data/lib/google/ads/ad_manager/v1/operating_system_version_service/rest/client.rb +541 -0
- data/lib/google/ads/ad_manager/v1/operating_system_version_service/rest/service_stub.rb +203 -0
- data/lib/google/ads/ad_manager/v1/operating_system_version_service/rest.rb +52 -0
- data/lib/google/ads/ad_manager/v1/operating_system_version_service.rb +48 -0
- data/lib/google/ads/ad_manager/v1/order_service/credentials.rb +3 -0
- data/lib/google/ads/ad_manager/v1/placement_service/credentials.rb +3 -0
- data/lib/google/ads/ad_manager/v1/private_auction_deal_service/credentials.rb +47 -0
- data/lib/google/ads/ad_manager/v1/private_auction_deal_service/paths.rb +217 -0
- data/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest/client.rb +719 -0
- data/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest/service_stub.rb +327 -0
- data/lib/google/ads/ad_manager/v1/private_auction_deal_service/rest.rb +52 -0
- data/lib/google/ads/ad_manager/v1/private_auction_deal_service.rb +48 -0
- data/lib/google/ads/ad_manager/v1/private_auction_service/credentials.rb +47 -0
- data/lib/google/ads/ad_manager/v1/private_auction_service/paths.rb +81 -0
- data/lib/google/ads/ad_manager/v1/private_auction_service/rest/client.rb +718 -0
- data/lib/google/ads/ad_manager/v1/private_auction_service/rest/service_stub.rb +327 -0
- data/lib/google/ads/ad_manager/v1/private_auction_service/rest.rb +52 -0
- data/lib/google/ads/ad_manager/v1/private_auction_service.rb +48 -0
- data/lib/google/ads/ad_manager/v1/programmatic_buyer_service/credentials.rb +47 -0
- data/lib/google/ads/ad_manager/v1/programmatic_buyer_service/paths.rb +64 -0
- data/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest/client.rb +539 -0
- data/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest/service_stub.rb +203 -0
- data/lib/google/ads/ad_manager/v1/programmatic_buyer_service/rest.rb +52 -0
- data/lib/google/ads/ad_manager/v1/programmatic_buyer_service.rb +48 -0
- data/lib/google/ads/ad_manager/v1/report_service/credentials.rb +3 -0
- data/lib/google/ads/ad_manager/v1/report_service/rest/operations.rb +0 -7
- data/lib/google/ads/ad_manager/v1/rest.rb +10 -1
- data/lib/google/ads/ad_manager/v1/role_service/credentials.rb +3 -0
- data/lib/google/ads/ad_manager/v1/taxonomy_category_service/credentials.rb +3 -0
- data/lib/google/ads/ad_manager/v1/user_service/credentials.rb +3 -0
- data/lib/google/ads/ad_manager/v1/version.rb +1 -1
- data/lib/google/ads/ad_manager/v1.rb +10 -1
- data/lib/google/ads/admanager/v1/ad_break_messages_pb.rb +50 -0
- data/lib/google/ads/admanager/v1/ad_break_service_pb.rb +57 -0
- data/lib/google/ads/admanager/v1/ad_break_service_services_pb.rb +93 -0
- data/lib/google/ads/admanager/v1/ad_unit_messages_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/ad_unit_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/bandwidth_group_messages_pb.rb +45 -0
- data/lib/google/ads/admanager/v1/bandwidth_group_service_pb.rb +51 -0
- data/lib/google/ads/admanager/v1/bandwidth_group_service_services_pb.rb +47 -0
- data/lib/google/ads/admanager/v1/{company_credit_status_enum_pb.rb → company_enums_pb.rb} +4 -2
- data/lib/google/ads/admanager/v1/company_messages_pb.rb +2 -3
- data/lib/google/ads/admanager/v1/company_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/contact_messages_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/custom_field_messages_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/custom_field_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/custom_targeting_key_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/custom_targeting_value_messages_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/custom_targeting_value_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/deal_buyer_permission_type_enum_pb.rb +43 -0
- data/lib/google/ads/admanager/v1/device_category_messages_pb.rb +45 -0
- data/lib/google/ads/admanager/v1/device_category_service_pb.rb +51 -0
- data/lib/google/ads/admanager/v1/device_category_service_services_pb.rb +47 -0
- data/lib/google/ads/admanager/v1/early_ad_break_notification_enums_pb.rb +43 -0
- data/lib/google/ads/admanager/v1/entity_signals_mapping_messages_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/entity_signals_mapping_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/geo_target_messages_pb.rb +45 -0
- data/lib/google/ads/admanager/v1/geo_target_service_pb.rb +51 -0
- data/lib/google/ads/admanager/v1/geo_target_service_services_pb.rb +47 -0
- data/lib/google/ads/admanager/v1/{company_type_enum_pb.rb → live_stream_event_messages_pb.rb} +6 -4
- data/lib/google/ads/admanager/v1/network_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/network_service_services_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/operating_system_messages_pb.rb +45 -0
- data/lib/google/ads/admanager/v1/operating_system_service_pb.rb +51 -0
- data/lib/google/ads/admanager/v1/operating_system_service_services_pb.rb +47 -0
- data/lib/google/ads/admanager/v1/operating_system_version_messages_pb.rb +45 -0
- data/lib/google/ads/admanager/v1/operating_system_version_service_pb.rb +51 -0
- data/lib/google/ads/admanager/v1/operating_system_version_service_services_pb.rb +47 -0
- data/lib/google/ads/admanager/v1/order_messages_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/order_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/placement_messages_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/placement_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/private_auction_deal_messages_pb.rb +56 -0
- data/lib/google/ads/admanager/v1/private_auction_deal_service_pb.rb +55 -0
- data/lib/google/ads/admanager/v1/private_auction_deal_service_services_pb.rb +51 -0
- data/lib/google/ads/admanager/v1/private_auction_messages_pb.rb +47 -0
- data/lib/google/ads/admanager/v1/private_auction_service_pb.rb +55 -0
- data/lib/google/ads/admanager/v1/private_auction_service_services_pb.rb +51 -0
- data/lib/google/ads/admanager/v1/private_marketplace_enums_pb.rb +43 -0
- data/lib/google/ads/admanager/v1/programmatic_buyer_messages_pb.rb +45 -0
- data/lib/google/ads/admanager/v1/programmatic_buyer_service_pb.rb +51 -0
- data/lib/google/ads/admanager/v1/programmatic_buyer_service_services_pb.rb +47 -0
- data/lib/google/ads/admanager/v1/report_messages_pb.rb +83 -0
- data/lib/google/ads/admanager/v1/report_service_pb.rb +4 -38
- data/lib/google/ads/admanager/v1/request_platform_enum_pb.rb +43 -0
- data/lib/google/ads/admanager/v1/role_messages_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/role_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/targeted_video_bumper_type_enum_pb.rb +43 -0
- data/lib/google/ads/admanager/v1/targeting_pb.rb +63 -0
- data/lib/google/ads/admanager/v1/taxonomy_category_messages_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/taxonomy_category_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/team_messages_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/user_messages_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/user_service_pb.rb +1 -1
- data/lib/google/ads/admanager/v1/video_position_enum_pb.rb +43 -0
- data/proto_docs/google/ads/admanager/v1/ad_break_messages.rb +112 -0
- data/proto_docs/google/ads/admanager/v1/ad_break_service.rb +150 -0
- data/proto_docs/google/ads/admanager/v1/ad_unit_messages.rb +10 -9
- data/proto_docs/google/ads/admanager/v1/bandwidth_group_messages.rb +40 -0
- data/proto_docs/google/ads/admanager/v1/bandwidth_group_service.rb +99 -0
- data/proto_docs/google/ads/admanager/v1/{company_credit_status_enum.rb → company_enums.rb} +30 -1
- data/proto_docs/google/ads/admanager/v1/company_messages.rb +3 -3
- data/proto_docs/google/ads/admanager/v1/contact_messages.rb +3 -4
- data/proto_docs/google/ads/admanager/v1/custom_field_messages.rb +3 -3
- data/proto_docs/google/ads/admanager/v1/custom_field_value.rb +0 -1
- data/proto_docs/google/ads/admanager/v1/custom_targeting_value_messages.rb +6 -1
- data/proto_docs/google/ads/admanager/v1/custom_targeting_value_service.rb +2 -2
- data/proto_docs/google/ads/admanager/v1/deal_buyer_permission_type_enum.rb +45 -0
- data/proto_docs/google/ads/admanager/v1/device_category_messages.rb +39 -0
- data/proto_docs/google/ads/admanager/v1/device_category_service.rb +99 -0
- data/proto_docs/google/ads/admanager/v1/early_ad_break_notification_enums.rb +51 -0
- data/proto_docs/google/ads/admanager/v1/entity_signals_mapping_messages.rb +1 -1
- data/proto_docs/google/ads/admanager/v1/geo_target_messages.rb +59 -0
- data/proto_docs/google/ads/admanager/v1/geo_target_service.rb +99 -0
- data/proto_docs/google/ads/admanager/v1/live_stream_event_messages.rb +41 -0
- data/proto_docs/google/ads/admanager/v1/network_messages.rb +1 -1
- data/proto_docs/google/ads/admanager/v1/operating_system_messages.rb +39 -0
- data/proto_docs/google/ads/admanager/v1/operating_system_service.rb +99 -0
- data/proto_docs/google/ads/admanager/v1/operating_system_version_messages.rb +46 -0
- data/proto_docs/google/ads/admanager/v1/operating_system_version_service.rb +102 -0
- data/proto_docs/google/ads/admanager/v1/placement_messages.rb +7 -8
- data/proto_docs/google/ads/admanager/v1/private_auction_deal_messages.rb +98 -0
- data/proto_docs/google/ads/admanager/v1/private_auction_deal_service.rb +130 -0
- data/proto_docs/google/ads/admanager/v1/private_auction_messages.rb +61 -0
- data/proto_docs/google/ads/admanager/v1/private_auction_service.rb +129 -0
- data/proto_docs/google/ads/admanager/v1/{company_type_enum.rb → private_marketplace_enums.rb} +17 -18
- data/proto_docs/google/ads/admanager/v1/programmatic_buyer_messages.rb +61 -0
- data/proto_docs/google/ads/admanager/v1/programmatic_buyer_service.rb +100 -0
- data/proto_docs/google/ads/admanager/v1/report_messages.rb +3587 -0
- data/proto_docs/google/ads/admanager/v1/report_service.rb +0 -3300
- data/proto_docs/google/ads/admanager/v1/request_platform_enum.rb +53 -0
- data/proto_docs/google/ads/admanager/v1/size.rb +6 -10
- data/proto_docs/google/ads/admanager/v1/targeted_video_bumper_type_enum.rb +48 -0
- data/proto_docs/google/ads/admanager/v1/targeting.rb +279 -0
- data/proto_docs/google/ads/admanager/v1/team_messages.rb +0 -4
- data/proto_docs/google/ads/admanager/v1/video_position_enum.rb +51 -0
- data/proto_docs/google/type/money.rb +43 -0
- metadata +122 -6
@@ -0,0 +1,854 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/ads/admanager/v1/ad_break_service_pb"
|
21
|
+
require "google/ads/ad_manager/v1/ad_break_service/rest/service_stub"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Ads
|
25
|
+
module AdManager
|
26
|
+
module V1
|
27
|
+
module AdBreakService
|
28
|
+
module Rest
|
29
|
+
##
|
30
|
+
# REST client for the AdBreakService service.
|
31
|
+
#
|
32
|
+
# Provides methods for handling `AdBreak` objects.
|
33
|
+
#
|
34
|
+
class Client
|
35
|
+
# @private
|
36
|
+
API_VERSION = ""
|
37
|
+
|
38
|
+
# @private
|
39
|
+
DEFAULT_ENDPOINT_TEMPLATE = "admanager.$UNIVERSE_DOMAIN$"
|
40
|
+
|
41
|
+
include Paths
|
42
|
+
|
43
|
+
# @private
|
44
|
+
attr_reader :ad_break_service_stub
|
45
|
+
|
46
|
+
##
|
47
|
+
# Configure the AdBreakService Client class.
|
48
|
+
#
|
49
|
+
# See {::Google::Ads::AdManager::V1::AdBreakService::Rest::Client::Configuration}
|
50
|
+
# for a description of the configuration fields.
|
51
|
+
#
|
52
|
+
# @example
|
53
|
+
#
|
54
|
+
# # Modify the configuration for all AdBreakService clients
|
55
|
+
# ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.configure do |config|
|
56
|
+
# config.timeout = 10.0
|
57
|
+
# end
|
58
|
+
#
|
59
|
+
# @yield [config] Configure the Client client.
|
60
|
+
# @yieldparam config [Client::Configuration]
|
61
|
+
#
|
62
|
+
# @return [Client::Configuration]
|
63
|
+
#
|
64
|
+
def self.configure
|
65
|
+
@configure ||= begin
|
66
|
+
namespace = ["Google", "Ads", "AdManager", "V1"]
|
67
|
+
parent_config = while namespace.any?
|
68
|
+
parent_name = namespace.join "::"
|
69
|
+
parent_const = const_get parent_name
|
70
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
71
|
+
namespace.pop
|
72
|
+
end
|
73
|
+
default_config = Client::Configuration.new parent_config
|
74
|
+
|
75
|
+
default_config
|
76
|
+
end
|
77
|
+
yield @configure if block_given?
|
78
|
+
@configure
|
79
|
+
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# Configure the AdBreakService Client instance.
|
83
|
+
#
|
84
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
85
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
86
|
+
# should be made on {Client.configure}.
|
87
|
+
#
|
88
|
+
# See {::Google::Ads::AdManager::V1::AdBreakService::Rest::Client::Configuration}
|
89
|
+
# for a description of the configuration fields.
|
90
|
+
#
|
91
|
+
# @yield [config] Configure the Client client.
|
92
|
+
# @yieldparam config [Client::Configuration]
|
93
|
+
#
|
94
|
+
# @return [Client::Configuration]
|
95
|
+
#
|
96
|
+
def configure
|
97
|
+
yield @config if block_given?
|
98
|
+
@config
|
99
|
+
end
|
100
|
+
|
101
|
+
##
|
102
|
+
# The effective universe domain
|
103
|
+
#
|
104
|
+
# @return [String]
|
105
|
+
#
|
106
|
+
def universe_domain
|
107
|
+
@ad_break_service_stub.universe_domain
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Create a new AdBreakService REST client object.
|
112
|
+
#
|
113
|
+
# @example
|
114
|
+
#
|
115
|
+
# # Create a client using the default configuration
|
116
|
+
# client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new
|
117
|
+
#
|
118
|
+
# # Create a client using a custom configuration
|
119
|
+
# client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new do |config|
|
120
|
+
# config.timeout = 10.0
|
121
|
+
# end
|
122
|
+
#
|
123
|
+
# @yield [config] Configure the AdBreakService client.
|
124
|
+
# @yieldparam config [Client::Configuration]
|
125
|
+
#
|
126
|
+
def initialize
|
127
|
+
# Create the configuration object
|
128
|
+
@config = Configuration.new Client.configure
|
129
|
+
|
130
|
+
# Yield the configuration if needed
|
131
|
+
yield @config if block_given?
|
132
|
+
|
133
|
+
# Create credentials
|
134
|
+
credentials = @config.credentials
|
135
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
136
|
+
# but only if the default endpoint does not have a region prefix.
|
137
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
138
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
139
|
+
!@config.endpoint.split(".").first.include?("-"))
|
140
|
+
credentials ||= Credentials.default scope: @config.scope,
|
141
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
142
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
143
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
144
|
+
end
|
145
|
+
|
146
|
+
@quota_project_id = @config.quota_project
|
147
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
148
|
+
|
149
|
+
@ad_break_service_stub = ::Google::Ads::AdManager::V1::AdBreakService::Rest::ServiceStub.new(
|
150
|
+
endpoint: @config.endpoint,
|
151
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
152
|
+
universe_domain: @config.universe_domain,
|
153
|
+
credentials: credentials,
|
154
|
+
logger: @config.logger
|
155
|
+
)
|
156
|
+
|
157
|
+
@ad_break_service_stub.logger(stub: true)&.info do |entry|
|
158
|
+
entry.set_system_name
|
159
|
+
entry.set_service
|
160
|
+
entry.message = "Created client for #{entry.service}"
|
161
|
+
entry.set_credentials_fields credentials
|
162
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
163
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
164
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
##
|
169
|
+
# The logger used for request/response debug logging.
|
170
|
+
#
|
171
|
+
# @return [Logger]
|
172
|
+
#
|
173
|
+
def logger
|
174
|
+
@ad_break_service_stub.logger
|
175
|
+
end
|
176
|
+
|
177
|
+
# Service calls
|
178
|
+
|
179
|
+
##
|
180
|
+
# API to retrieve an `AdBreak` object.
|
181
|
+
#
|
182
|
+
# Query an ad break by its resource name or custom asset key. Check the
|
183
|
+
# resource's `breakState` field to determine its state.
|
184
|
+
#
|
185
|
+
# @overload get_ad_break(request, options = nil)
|
186
|
+
# Pass arguments to `get_ad_break` via a request object, either of type
|
187
|
+
# {::Google::Ads::AdManager::V1::GetAdBreakRequest} or an equivalent Hash.
|
188
|
+
#
|
189
|
+
# @param request [::Google::Ads::AdManager::V1::GetAdBreakRequest, ::Hash]
|
190
|
+
# A request object representing the call parameters. Required. To specify no
|
191
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
192
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
193
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
194
|
+
#
|
195
|
+
# @overload get_ad_break(name: nil)
|
196
|
+
# Pass arguments to `get_ad_break` via keyword arguments. Note that at
|
197
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
198
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
199
|
+
#
|
200
|
+
# @param name [::String]
|
201
|
+
# Required. The resource name of the AdBreak using the asset key or custom
|
202
|
+
# asset key.
|
203
|
+
#
|
204
|
+
# Format:
|
205
|
+
# `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break_id}`
|
206
|
+
# `networks/{network_code}/liveStreamEventsByCustomAssetKey/{custom_asset_key}/adBreaks/{ad_break_id}`
|
207
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
208
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::AdBreak]
|
209
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
210
|
+
#
|
211
|
+
# @return [::Google::Ads::AdManager::V1::AdBreak]
|
212
|
+
#
|
213
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
214
|
+
#
|
215
|
+
# @example Basic example
|
216
|
+
# require "google/ads/ad_manager/v1"
|
217
|
+
#
|
218
|
+
# # Create a client object. The client can be reused for multiple calls.
|
219
|
+
# client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new
|
220
|
+
#
|
221
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
222
|
+
# request = Google::Ads::AdManager::V1::GetAdBreakRequest.new
|
223
|
+
#
|
224
|
+
# # Call the get_ad_break method.
|
225
|
+
# result = client.get_ad_break request
|
226
|
+
#
|
227
|
+
# # The returned object is of type Google::Ads::AdManager::V1::AdBreak.
|
228
|
+
# p result
|
229
|
+
#
|
230
|
+
def get_ad_break request, options = nil
|
231
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
232
|
+
|
233
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetAdBreakRequest
|
234
|
+
|
235
|
+
# Converts hash and nil to an options object
|
236
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
237
|
+
|
238
|
+
# Customize the options with defaults
|
239
|
+
call_metadata = @config.rpcs.get_ad_break.metadata.to_h
|
240
|
+
|
241
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
242
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
243
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
244
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
245
|
+
transports_version_send: [:rest]
|
246
|
+
|
247
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
248
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
249
|
+
|
250
|
+
options.apply_defaults timeout: @config.rpcs.get_ad_break.timeout,
|
251
|
+
metadata: call_metadata,
|
252
|
+
retry_policy: @config.rpcs.get_ad_break.retry_policy
|
253
|
+
|
254
|
+
options.apply_defaults timeout: @config.timeout,
|
255
|
+
metadata: @config.metadata,
|
256
|
+
retry_policy: @config.retry_policy
|
257
|
+
|
258
|
+
@ad_break_service_stub.get_ad_break request, options do |result, operation|
|
259
|
+
yield result, operation if block_given?
|
260
|
+
end
|
261
|
+
rescue ::Gapic::Rest::Error => e
|
262
|
+
raise ::Google::Cloud::Error.from_error(e)
|
263
|
+
end
|
264
|
+
|
265
|
+
##
|
266
|
+
# API to retrieve a list of `AdBreak` objects.
|
267
|
+
#
|
268
|
+
# By default, when no `orderBy` query parameter is specified, ad breaks are
|
269
|
+
# ordered reverse chronologically. However, ad breaks with a 'breakState' of
|
270
|
+
# 'SCHEDULED' or 'DECISIONED' are prioritized and appear first.
|
271
|
+
#
|
272
|
+
# @overload list_ad_breaks(request, options = nil)
|
273
|
+
# Pass arguments to `list_ad_breaks` via a request object, either of type
|
274
|
+
# {::Google::Ads::AdManager::V1::ListAdBreaksRequest} or an equivalent Hash.
|
275
|
+
#
|
276
|
+
# @param request [::Google::Ads::AdManager::V1::ListAdBreaksRequest, ::Hash]
|
277
|
+
# A request object representing the call parameters. Required. To specify no
|
278
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
279
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
280
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
281
|
+
#
|
282
|
+
# @overload list_ad_breaks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil)
|
283
|
+
# Pass arguments to `list_ad_breaks` via keyword arguments. Note that at
|
284
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
285
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
286
|
+
#
|
287
|
+
# @param parent [::String]
|
288
|
+
# Required. The parent, which owns this collection of AdBreaks.
|
289
|
+
#
|
290
|
+
# Formats:
|
291
|
+
# `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}`
|
292
|
+
# `networks/{network_code}/liveStreamEventsByCustomAssetKey/{custom_asset_key}`
|
293
|
+
# @param page_size [::Integer]
|
294
|
+
# Optional. The maximum number of `AdBreaks` to return. The service might
|
295
|
+
# return fewer than this value. If unspecified, at most 10 ad breaks are
|
296
|
+
# returned. The maximum value is `100`. Values above `100` are coerced to
|
297
|
+
# `100`.
|
298
|
+
# @param page_token [::String]
|
299
|
+
# Optional. A page token, received from a previous `ListAdBreaks` call.
|
300
|
+
# Provide this to retrieve the subsequent page.
|
301
|
+
#
|
302
|
+
# When paginating, all other parameters provided to `ListAdBreaks` must match
|
303
|
+
# the call that provided the page token.
|
304
|
+
# @param filter [::String]
|
305
|
+
# Optional. Expression to filter the response.
|
306
|
+
# See syntax details at
|
307
|
+
# https://developers.google.com/ad-manager/api/beta/filters
|
308
|
+
# @param order_by [::String]
|
309
|
+
# Optional. Expression to specify sorting order.
|
310
|
+
# See syntax details at
|
311
|
+
# https://developers.google.com/ad-manager/api/beta/filters#order
|
312
|
+
# @param skip [::Integer]
|
313
|
+
# Optional. Number of individual resources to skip while paginating.
|
314
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
315
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::AdBreak>]
|
316
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
317
|
+
#
|
318
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::AdBreak>]
|
319
|
+
#
|
320
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
321
|
+
#
|
322
|
+
# @example Basic example
|
323
|
+
# require "google/ads/ad_manager/v1"
|
324
|
+
#
|
325
|
+
# # Create a client object. The client can be reused for multiple calls.
|
326
|
+
# client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new
|
327
|
+
#
|
328
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
329
|
+
# request = Google::Ads::AdManager::V1::ListAdBreaksRequest.new
|
330
|
+
#
|
331
|
+
# # Call the list_ad_breaks method.
|
332
|
+
# result = client.list_ad_breaks request
|
333
|
+
#
|
334
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
335
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
336
|
+
# result.each do |item|
|
337
|
+
# # Each element is of type ::Google::Ads::AdManager::V1::AdBreak.
|
338
|
+
# p item
|
339
|
+
# end
|
340
|
+
#
|
341
|
+
def list_ad_breaks request, options = nil
|
342
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
343
|
+
|
344
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListAdBreaksRequest
|
345
|
+
|
346
|
+
# Converts hash and nil to an options object
|
347
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
348
|
+
|
349
|
+
# Customize the options with defaults
|
350
|
+
call_metadata = @config.rpcs.list_ad_breaks.metadata.to_h
|
351
|
+
|
352
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
353
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
354
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
355
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
356
|
+
transports_version_send: [:rest]
|
357
|
+
|
358
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
359
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
360
|
+
|
361
|
+
options.apply_defaults timeout: @config.rpcs.list_ad_breaks.timeout,
|
362
|
+
metadata: call_metadata,
|
363
|
+
retry_policy: @config.rpcs.list_ad_breaks.retry_policy
|
364
|
+
|
365
|
+
options.apply_defaults timeout: @config.timeout,
|
366
|
+
metadata: @config.metadata,
|
367
|
+
retry_policy: @config.retry_policy
|
368
|
+
|
369
|
+
@ad_break_service_stub.list_ad_breaks request, options do |result, operation|
|
370
|
+
result = ::Gapic::Rest::PagedEnumerable.new @ad_break_service_stub, :list_ad_breaks, "ad_breaks", request, result, options
|
371
|
+
yield result, operation if block_given?
|
372
|
+
throw :response, result
|
373
|
+
end
|
374
|
+
rescue ::Gapic::Rest::Error => e
|
375
|
+
raise ::Google::Cloud::Error.from_error(e)
|
376
|
+
end
|
377
|
+
|
378
|
+
##
|
379
|
+
# API to create an `AdBreak` object.
|
380
|
+
#
|
381
|
+
# Informs DAI of an upcoming ad break for a live stream event, with an
|
382
|
+
# optional expected start time. DAI will begin decisioning ads for the break
|
383
|
+
# shortly before the expected start time, if provided. Each live stream
|
384
|
+
# event can only have one incomplete ad break at any given time. The next ad
|
385
|
+
# break can be scheduled after the previous ad break has started serving,
|
386
|
+
# indicated by its state being
|
387
|
+
# {::Google::Ads::AdManager::V1::AdBreakStateEnum::AdBreakState::COMPLETE `COMPLETE`},
|
388
|
+
# or it has been deleted.
|
389
|
+
#
|
390
|
+
# This method cannot be used if the `LiveStreamEvent` has
|
391
|
+
# [prefetching ad breaks
|
392
|
+
# enabled](https://developers.google.com/ad-manager/api/reference/latest/LiveStreamEventService.LiveStreamEvent#prefetchenabled)
|
393
|
+
# or the event is not active. If a `LiveStreamEvent` is deactivated after
|
394
|
+
# creating an ad break and before the ad break is complete, the ad break
|
395
|
+
# is discarded.
|
396
|
+
#
|
397
|
+
# An ad break's state is complete when the following occurs:
|
398
|
+
# - Full service DAI: after a matching ad break shows in the
|
399
|
+
# `LiveStreamEvent` manifest only when the ad break has started decisioning.
|
400
|
+
# - Pod Serving: after the ad break is requested using the ad break ID or
|
401
|
+
# break sequence.
|
402
|
+
#
|
403
|
+
# @overload create_ad_break(request, options = nil)
|
404
|
+
# Pass arguments to `create_ad_break` via a request object, either of type
|
405
|
+
# {::Google::Ads::AdManager::V1::CreateAdBreakRequest} or an equivalent Hash.
|
406
|
+
#
|
407
|
+
# @param request [::Google::Ads::AdManager::V1::CreateAdBreakRequest, ::Hash]
|
408
|
+
# A request object representing the call parameters. Required. To specify no
|
409
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
410
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
411
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
412
|
+
#
|
413
|
+
# @overload create_ad_break(parent: nil, ad_break: nil)
|
414
|
+
# Pass arguments to `create_ad_break` via keyword arguments. Note that at
|
415
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
416
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
417
|
+
#
|
418
|
+
# @param parent [::String]
|
419
|
+
# Required. The parent resource where this `AdBreak` will be created
|
420
|
+
# identified by an asset key or custom asset key.
|
421
|
+
#
|
422
|
+
# Formats:
|
423
|
+
# `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}`
|
424
|
+
# `networks/{network_code}/liveStreamEventsByCustomAssetKey/{custom_asset_key}`
|
425
|
+
# @param ad_break [::Google::Ads::AdManager::V1::AdBreak, ::Hash]
|
426
|
+
# Required. The `AdBreak` to create.
|
427
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
428
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::AdBreak]
|
429
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
430
|
+
#
|
431
|
+
# @return [::Google::Ads::AdManager::V1::AdBreak]
|
432
|
+
#
|
433
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
434
|
+
#
|
435
|
+
# @example Basic example
|
436
|
+
# require "google/ads/ad_manager/v1"
|
437
|
+
#
|
438
|
+
# # Create a client object. The client can be reused for multiple calls.
|
439
|
+
# client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new
|
440
|
+
#
|
441
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
442
|
+
# request = Google::Ads::AdManager::V1::CreateAdBreakRequest.new
|
443
|
+
#
|
444
|
+
# # Call the create_ad_break method.
|
445
|
+
# result = client.create_ad_break request
|
446
|
+
#
|
447
|
+
# # The returned object is of type Google::Ads::AdManager::V1::AdBreak.
|
448
|
+
# p result
|
449
|
+
#
|
450
|
+
def create_ad_break request, options = nil
|
451
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
452
|
+
|
453
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::CreateAdBreakRequest
|
454
|
+
|
455
|
+
# Converts hash and nil to an options object
|
456
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
457
|
+
|
458
|
+
# Customize the options with defaults
|
459
|
+
call_metadata = @config.rpcs.create_ad_break.metadata.to_h
|
460
|
+
|
461
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
462
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
463
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
464
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
465
|
+
transports_version_send: [:rest]
|
466
|
+
|
467
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
468
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
469
|
+
|
470
|
+
options.apply_defaults timeout: @config.rpcs.create_ad_break.timeout,
|
471
|
+
metadata: call_metadata,
|
472
|
+
retry_policy: @config.rpcs.create_ad_break.retry_policy
|
473
|
+
|
474
|
+
options.apply_defaults timeout: @config.timeout,
|
475
|
+
metadata: @config.metadata,
|
476
|
+
retry_policy: @config.retry_policy
|
477
|
+
|
478
|
+
@ad_break_service_stub.create_ad_break request, options do |result, operation|
|
479
|
+
yield result, operation if block_given?
|
480
|
+
end
|
481
|
+
rescue ::Gapic::Rest::Error => e
|
482
|
+
raise ::Google::Cloud::Error.from_error(e)
|
483
|
+
end
|
484
|
+
|
485
|
+
##
|
486
|
+
# API to update an `AdBreak` object.
|
487
|
+
#
|
488
|
+
# Modify an ad break when its state is
|
489
|
+
# {::Google::Ads::AdManager::V1::AdBreakStateEnum::AdBreakState::SCHEDULED `SCHEDULED`}.
|
490
|
+
#
|
491
|
+
# @overload update_ad_break(request, options = nil)
|
492
|
+
# Pass arguments to `update_ad_break` via a request object, either of type
|
493
|
+
# {::Google::Ads::AdManager::V1::UpdateAdBreakRequest} or an equivalent Hash.
|
494
|
+
#
|
495
|
+
# @param request [::Google::Ads::AdManager::V1::UpdateAdBreakRequest, ::Hash]
|
496
|
+
# A request object representing the call parameters. Required. To specify no
|
497
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
498
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
499
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
500
|
+
#
|
501
|
+
# @overload update_ad_break(ad_break: nil, update_mask: nil)
|
502
|
+
# Pass arguments to `update_ad_break` via keyword arguments. Note that at
|
503
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
504
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
505
|
+
#
|
506
|
+
# @param ad_break [::Google::Ads::AdManager::V1::AdBreak, ::Hash]
|
507
|
+
# Required. The `AdBreak` to update.
|
508
|
+
#
|
509
|
+
# The `AdBreak`'s `name` is used to identify the `AdBreak` to update.
|
510
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
511
|
+
# Required. The list of fields to update.
|
512
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
513
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::AdBreak]
|
514
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
515
|
+
#
|
516
|
+
# @return [::Google::Ads::AdManager::V1::AdBreak]
|
517
|
+
#
|
518
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
519
|
+
#
|
520
|
+
# @example Basic example
|
521
|
+
# require "google/ads/ad_manager/v1"
|
522
|
+
#
|
523
|
+
# # Create a client object. The client can be reused for multiple calls.
|
524
|
+
# client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new
|
525
|
+
#
|
526
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
527
|
+
# request = Google::Ads::AdManager::V1::UpdateAdBreakRequest.new
|
528
|
+
#
|
529
|
+
# # Call the update_ad_break method.
|
530
|
+
# result = client.update_ad_break request
|
531
|
+
#
|
532
|
+
# # The returned object is of type Google::Ads::AdManager::V1::AdBreak.
|
533
|
+
# p result
|
534
|
+
#
|
535
|
+
def update_ad_break request, options = nil
|
536
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
537
|
+
|
538
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::UpdateAdBreakRequest
|
539
|
+
|
540
|
+
# Converts hash and nil to an options object
|
541
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
542
|
+
|
543
|
+
# Customize the options with defaults
|
544
|
+
call_metadata = @config.rpcs.update_ad_break.metadata.to_h
|
545
|
+
|
546
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
547
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
548
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
549
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
550
|
+
transports_version_send: [:rest]
|
551
|
+
|
552
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
553
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
554
|
+
|
555
|
+
options.apply_defaults timeout: @config.rpcs.update_ad_break.timeout,
|
556
|
+
metadata: call_metadata,
|
557
|
+
retry_policy: @config.rpcs.update_ad_break.retry_policy
|
558
|
+
|
559
|
+
options.apply_defaults timeout: @config.timeout,
|
560
|
+
metadata: @config.metadata,
|
561
|
+
retry_policy: @config.retry_policy
|
562
|
+
|
563
|
+
@ad_break_service_stub.update_ad_break request, options do |result, operation|
|
564
|
+
yield result, operation if block_given?
|
565
|
+
end
|
566
|
+
rescue ::Gapic::Rest::Error => e
|
567
|
+
raise ::Google::Cloud::Error.from_error(e)
|
568
|
+
end
|
569
|
+
|
570
|
+
##
|
571
|
+
# API to delete an `AdBreak` object.
|
572
|
+
#
|
573
|
+
# Deletes and cancels an incomplete ad break, mitigating the need to wait
|
574
|
+
# for the current break to serve before recreating an ad break. You can
|
575
|
+
# delete an ad break that has not started serving or seen in manifests,
|
576
|
+
# indicated by its state being
|
577
|
+
# {::Google::Ads::AdManager::V1::AdBreakStateEnum::AdBreakState::SCHEDULED `SCHEDULED`}
|
578
|
+
# or
|
579
|
+
# {::Google::Ads::AdManager::V1::AdBreakStateEnum::AdBreakState::DECISIONED `DECISIONED`}.
|
580
|
+
#
|
581
|
+
# @overload delete_ad_break(request, options = nil)
|
582
|
+
# Pass arguments to `delete_ad_break` via a request object, either of type
|
583
|
+
# {::Google::Ads::AdManager::V1::DeleteAdBreakRequest} or an equivalent Hash.
|
584
|
+
#
|
585
|
+
# @param request [::Google::Ads::AdManager::V1::DeleteAdBreakRequest, ::Hash]
|
586
|
+
# A request object representing the call parameters. Required. To specify no
|
587
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
588
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
589
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
590
|
+
#
|
591
|
+
# @overload delete_ad_break(name: nil)
|
592
|
+
# Pass arguments to `delete_ad_break` via keyword arguments. Note that at
|
593
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
594
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
595
|
+
#
|
596
|
+
# @param name [::String]
|
597
|
+
# Required. The name of the ad break to delete.
|
598
|
+
#
|
599
|
+
# Format:
|
600
|
+
# `networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}`
|
601
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
602
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
603
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
604
|
+
#
|
605
|
+
# @return [::Google::Protobuf::Empty]
|
606
|
+
#
|
607
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
608
|
+
#
|
609
|
+
# @example Basic example
|
610
|
+
# require "google/ads/ad_manager/v1"
|
611
|
+
#
|
612
|
+
# # Create a client object. The client can be reused for multiple calls.
|
613
|
+
# client = Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new
|
614
|
+
#
|
615
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
616
|
+
# request = Google::Ads::AdManager::V1::DeleteAdBreakRequest.new
|
617
|
+
#
|
618
|
+
# # Call the delete_ad_break method.
|
619
|
+
# result = client.delete_ad_break request
|
620
|
+
#
|
621
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
622
|
+
# p result
|
623
|
+
#
|
624
|
+
def delete_ad_break request, options = nil
|
625
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
626
|
+
|
627
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::DeleteAdBreakRequest
|
628
|
+
|
629
|
+
# Converts hash and nil to an options object
|
630
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
631
|
+
|
632
|
+
# Customize the options with defaults
|
633
|
+
call_metadata = @config.rpcs.delete_ad_break.metadata.to_h
|
634
|
+
|
635
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
636
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
637
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
638
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
639
|
+
transports_version_send: [:rest]
|
640
|
+
|
641
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
642
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
643
|
+
|
644
|
+
options.apply_defaults timeout: @config.rpcs.delete_ad_break.timeout,
|
645
|
+
metadata: call_metadata,
|
646
|
+
retry_policy: @config.rpcs.delete_ad_break.retry_policy
|
647
|
+
|
648
|
+
options.apply_defaults timeout: @config.timeout,
|
649
|
+
metadata: @config.metadata,
|
650
|
+
retry_policy: @config.retry_policy
|
651
|
+
|
652
|
+
@ad_break_service_stub.delete_ad_break request, options do |result, operation|
|
653
|
+
yield result, operation if block_given?
|
654
|
+
end
|
655
|
+
rescue ::Gapic::Rest::Error => e
|
656
|
+
raise ::Google::Cloud::Error.from_error(e)
|
657
|
+
end
|
658
|
+
|
659
|
+
##
|
660
|
+
# Configuration class for the AdBreakService REST API.
|
661
|
+
#
|
662
|
+
# This class represents the configuration for AdBreakService REST,
|
663
|
+
# providing control over timeouts, retry behavior, logging, transport
|
664
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
665
|
+
# applied individually to specific RPCs. See
|
666
|
+
# {::Google::Ads::AdManager::V1::AdBreakService::Rest::Client::Configuration::Rpcs}
|
667
|
+
# for a list of RPCs that can be configured independently.
|
668
|
+
#
|
669
|
+
# Configuration can be applied globally to all clients, or to a single client
|
670
|
+
# on construction.
|
671
|
+
#
|
672
|
+
# @example
|
673
|
+
#
|
674
|
+
# # Modify the global config, setting the timeout for
|
675
|
+
# # get_ad_break to 20 seconds,
|
676
|
+
# # and all remaining timeouts to 10 seconds.
|
677
|
+
# ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.configure do |config|
|
678
|
+
# config.timeout = 10.0
|
679
|
+
# config.rpcs.get_ad_break.timeout = 20.0
|
680
|
+
# end
|
681
|
+
#
|
682
|
+
# # Apply the above configuration only to a new client.
|
683
|
+
# client = ::Google::Ads::AdManager::V1::AdBreakService::Rest::Client.new do |config|
|
684
|
+
# config.timeout = 10.0
|
685
|
+
# config.rpcs.get_ad_break.timeout = 20.0
|
686
|
+
# end
|
687
|
+
#
|
688
|
+
# @!attribute [rw] endpoint
|
689
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
690
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
691
|
+
# @return [::String,nil]
|
692
|
+
# @!attribute [rw] credentials
|
693
|
+
# Credentials to send with calls. You may provide any of the following types:
|
694
|
+
# * (`String`) The path to a service account key file in JSON format
|
695
|
+
# * (`Hash`) A service account key as a Hash
|
696
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
697
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
698
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
699
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
700
|
+
# * (`nil`) indicating no credentials
|
701
|
+
#
|
702
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
703
|
+
# external source for authentication to Google Cloud, you must validate it before
|
704
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
705
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
706
|
+
# For more information, refer to [Validate credential configurations from external
|
707
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
708
|
+
# @return [::Object]
|
709
|
+
# @!attribute [rw] scope
|
710
|
+
# The OAuth scopes
|
711
|
+
# @return [::Array<::String>]
|
712
|
+
# @!attribute [rw] lib_name
|
713
|
+
# The library name as recorded in instrumentation and logging
|
714
|
+
# @return [::String]
|
715
|
+
# @!attribute [rw] lib_version
|
716
|
+
# The library version as recorded in instrumentation and logging
|
717
|
+
# @return [::String]
|
718
|
+
# @!attribute [rw] timeout
|
719
|
+
# The call timeout in seconds.
|
720
|
+
# @return [::Numeric]
|
721
|
+
# @!attribute [rw] metadata
|
722
|
+
# Additional headers to be sent with the call.
|
723
|
+
# @return [::Hash{::Symbol=>::String}]
|
724
|
+
# @!attribute [rw] retry_policy
|
725
|
+
# The retry policy. The value is a hash with the following keys:
|
726
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
727
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
728
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
729
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
730
|
+
# trigger a retry.
|
731
|
+
# @return [::Hash]
|
732
|
+
# @!attribute [rw] quota_project
|
733
|
+
# A separate project against which to charge quota.
|
734
|
+
# @return [::String]
|
735
|
+
# @!attribute [rw] universe_domain
|
736
|
+
# The universe domain within which to make requests. This determines the
|
737
|
+
# default endpoint URL. The default value of nil uses the environment
|
738
|
+
# universe (usually the default "googleapis.com" universe).
|
739
|
+
# @return [::String,nil]
|
740
|
+
# @!attribute [rw] logger
|
741
|
+
# A custom logger to use for request/response debug logging, or the value
|
742
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
743
|
+
# explicitly disable logging.
|
744
|
+
# @return [::Logger,:default,nil]
|
745
|
+
#
|
746
|
+
class Configuration
|
747
|
+
extend ::Gapic::Config
|
748
|
+
|
749
|
+
# @private
|
750
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
751
|
+
DEFAULT_ENDPOINT = "admanager.googleapis.com"
|
752
|
+
|
753
|
+
config_attr :endpoint, nil, ::String, nil
|
754
|
+
config_attr :credentials, nil do |value|
|
755
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
756
|
+
allowed.any? { |klass| klass === value }
|
757
|
+
end
|
758
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
759
|
+
config_attr :lib_name, nil, ::String, nil
|
760
|
+
config_attr :lib_version, nil, ::String, nil
|
761
|
+
config_attr :timeout, nil, ::Numeric, nil
|
762
|
+
config_attr :metadata, nil, ::Hash, nil
|
763
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
764
|
+
config_attr :quota_project, nil, ::String, nil
|
765
|
+
config_attr :universe_domain, nil, ::String, nil
|
766
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
767
|
+
|
768
|
+
# @private
|
769
|
+
def initialize parent_config = nil
|
770
|
+
@parent_config = parent_config unless parent_config.nil?
|
771
|
+
|
772
|
+
yield self if block_given?
|
773
|
+
end
|
774
|
+
|
775
|
+
##
|
776
|
+
# Configurations for individual RPCs
|
777
|
+
# @return [Rpcs]
|
778
|
+
#
|
779
|
+
def rpcs
|
780
|
+
@rpcs ||= begin
|
781
|
+
parent_rpcs = nil
|
782
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
783
|
+
Rpcs.new parent_rpcs
|
784
|
+
end
|
785
|
+
end
|
786
|
+
|
787
|
+
##
|
788
|
+
# Configuration RPC class for the AdBreakService API.
|
789
|
+
#
|
790
|
+
# Includes fields providing the configuration for each RPC in this service.
|
791
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
792
|
+
# the following configuration fields:
|
793
|
+
#
|
794
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
795
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
796
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
797
|
+
# include the following keys:
|
798
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
799
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
800
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
801
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
802
|
+
# trigger a retry.
|
803
|
+
#
|
804
|
+
class Rpcs
|
805
|
+
##
|
806
|
+
# RPC-specific configuration for `get_ad_break`
|
807
|
+
# @return [::Gapic::Config::Method]
|
808
|
+
#
|
809
|
+
attr_reader :get_ad_break
|
810
|
+
##
|
811
|
+
# RPC-specific configuration for `list_ad_breaks`
|
812
|
+
# @return [::Gapic::Config::Method]
|
813
|
+
#
|
814
|
+
attr_reader :list_ad_breaks
|
815
|
+
##
|
816
|
+
# RPC-specific configuration for `create_ad_break`
|
817
|
+
# @return [::Gapic::Config::Method]
|
818
|
+
#
|
819
|
+
attr_reader :create_ad_break
|
820
|
+
##
|
821
|
+
# RPC-specific configuration for `update_ad_break`
|
822
|
+
# @return [::Gapic::Config::Method]
|
823
|
+
#
|
824
|
+
attr_reader :update_ad_break
|
825
|
+
##
|
826
|
+
# RPC-specific configuration for `delete_ad_break`
|
827
|
+
# @return [::Gapic::Config::Method]
|
828
|
+
#
|
829
|
+
attr_reader :delete_ad_break
|
830
|
+
|
831
|
+
# @private
|
832
|
+
def initialize parent_rpcs = nil
|
833
|
+
get_ad_break_config = parent_rpcs.get_ad_break if parent_rpcs.respond_to? :get_ad_break
|
834
|
+
@get_ad_break = ::Gapic::Config::Method.new get_ad_break_config
|
835
|
+
list_ad_breaks_config = parent_rpcs.list_ad_breaks if parent_rpcs.respond_to? :list_ad_breaks
|
836
|
+
@list_ad_breaks = ::Gapic::Config::Method.new list_ad_breaks_config
|
837
|
+
create_ad_break_config = parent_rpcs.create_ad_break if parent_rpcs.respond_to? :create_ad_break
|
838
|
+
@create_ad_break = ::Gapic::Config::Method.new create_ad_break_config
|
839
|
+
update_ad_break_config = parent_rpcs.update_ad_break if parent_rpcs.respond_to? :update_ad_break
|
840
|
+
@update_ad_break = ::Gapic::Config::Method.new update_ad_break_config
|
841
|
+
delete_ad_break_config = parent_rpcs.delete_ad_break if parent_rpcs.respond_to? :delete_ad_break
|
842
|
+
@delete_ad_break = ::Gapic::Config::Method.new delete_ad_break_config
|
843
|
+
|
844
|
+
yield self if block_given?
|
845
|
+
end
|
846
|
+
end
|
847
|
+
end
|
848
|
+
end
|
849
|
+
end
|
850
|
+
end
|
851
|
+
end
|
852
|
+
end
|
853
|
+
end
|
854
|
+
end
|