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,538 @@
|
|
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/operating_system_service_pb"
|
21
|
+
require "google/ads/ad_manager/v1/operating_system_service/rest/service_stub"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Ads
|
25
|
+
module AdManager
|
26
|
+
module V1
|
27
|
+
module OperatingSystemService
|
28
|
+
module Rest
|
29
|
+
##
|
30
|
+
# REST client for the OperatingSystemService service.
|
31
|
+
#
|
32
|
+
# Provides methods for handling `OperatingSystem` 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 :operating_system_service_stub
|
45
|
+
|
46
|
+
##
|
47
|
+
# Configure the OperatingSystemService Client class.
|
48
|
+
#
|
49
|
+
# See {::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client::Configuration}
|
50
|
+
# for a description of the configuration fields.
|
51
|
+
#
|
52
|
+
# @example
|
53
|
+
#
|
54
|
+
# # Modify the configuration for all OperatingSystemService clients
|
55
|
+
# ::Google::Ads::AdManager::V1::OperatingSystemService::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 OperatingSystemService 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::OperatingSystemService::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
|
+
@operating_system_service_stub.universe_domain
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Create a new OperatingSystemService REST client object.
|
112
|
+
#
|
113
|
+
# @example
|
114
|
+
#
|
115
|
+
# # Create a client using the default configuration
|
116
|
+
# client = ::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new
|
117
|
+
#
|
118
|
+
# # Create a client using a custom configuration
|
119
|
+
# client = ::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new do |config|
|
120
|
+
# config.timeout = 10.0
|
121
|
+
# end
|
122
|
+
#
|
123
|
+
# @yield [config] Configure the OperatingSystemService 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
|
+
@operating_system_service_stub = ::Google::Ads::AdManager::V1::OperatingSystemService::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
|
+
@operating_system_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
|
+
@operating_system_service_stub.logger
|
175
|
+
end
|
176
|
+
|
177
|
+
# Service calls
|
178
|
+
|
179
|
+
##
|
180
|
+
# API to retrieve a `OperatingSystem` object.
|
181
|
+
#
|
182
|
+
# @overload get_operating_system(request, options = nil)
|
183
|
+
# Pass arguments to `get_operating_system` via a request object, either of type
|
184
|
+
# {::Google::Ads::AdManager::V1::GetOperatingSystemRequest} or an equivalent Hash.
|
185
|
+
#
|
186
|
+
# @param request [::Google::Ads::AdManager::V1::GetOperatingSystemRequest, ::Hash]
|
187
|
+
# A request object representing the call parameters. Required. To specify no
|
188
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
189
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
190
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
191
|
+
#
|
192
|
+
# @overload get_operating_system(name: nil)
|
193
|
+
# Pass arguments to `get_operating_system` via keyword arguments. Note that at
|
194
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
195
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
196
|
+
#
|
197
|
+
# @param name [::String]
|
198
|
+
# Required. The resource name of the OperatingSystem.
|
199
|
+
# Format: `networks/{network_code}/operatingSystems/{operating_system_id}`
|
200
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
201
|
+
# @yieldparam result [::Google::Ads::AdManager::V1::OperatingSystem]
|
202
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
203
|
+
#
|
204
|
+
# @return [::Google::Ads::AdManager::V1::OperatingSystem]
|
205
|
+
#
|
206
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
207
|
+
#
|
208
|
+
# @example Basic example
|
209
|
+
# require "google/ads/ad_manager/v1"
|
210
|
+
#
|
211
|
+
# # Create a client object. The client can be reused for multiple calls.
|
212
|
+
# client = Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new
|
213
|
+
#
|
214
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
215
|
+
# request = Google::Ads::AdManager::V1::GetOperatingSystemRequest.new
|
216
|
+
#
|
217
|
+
# # Call the get_operating_system method.
|
218
|
+
# result = client.get_operating_system request
|
219
|
+
#
|
220
|
+
# # The returned object is of type Google::Ads::AdManager::V1::OperatingSystem.
|
221
|
+
# p result
|
222
|
+
#
|
223
|
+
def get_operating_system request, options = nil
|
224
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
225
|
+
|
226
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetOperatingSystemRequest
|
227
|
+
|
228
|
+
# Converts hash and nil to an options object
|
229
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
230
|
+
|
231
|
+
# Customize the options with defaults
|
232
|
+
call_metadata = @config.rpcs.get_operating_system.metadata.to_h
|
233
|
+
|
234
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
235
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
236
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
237
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
238
|
+
transports_version_send: [:rest]
|
239
|
+
|
240
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
241
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
242
|
+
|
243
|
+
options.apply_defaults timeout: @config.rpcs.get_operating_system.timeout,
|
244
|
+
metadata: call_metadata,
|
245
|
+
retry_policy: @config.rpcs.get_operating_system.retry_policy
|
246
|
+
|
247
|
+
options.apply_defaults timeout: @config.timeout,
|
248
|
+
metadata: @config.metadata,
|
249
|
+
retry_policy: @config.retry_policy
|
250
|
+
|
251
|
+
@operating_system_service_stub.get_operating_system request, options do |result, operation|
|
252
|
+
yield result, operation if block_given?
|
253
|
+
end
|
254
|
+
rescue ::Gapic::Rest::Error => e
|
255
|
+
raise ::Google::Cloud::Error.from_error(e)
|
256
|
+
end
|
257
|
+
|
258
|
+
##
|
259
|
+
# API to retrieve a list of `OperatingSystem` objects.
|
260
|
+
#
|
261
|
+
# @overload list_operating_systems(request, options = nil)
|
262
|
+
# Pass arguments to `list_operating_systems` via a request object, either of type
|
263
|
+
# {::Google::Ads::AdManager::V1::ListOperatingSystemsRequest} or an equivalent Hash.
|
264
|
+
#
|
265
|
+
# @param request [::Google::Ads::AdManager::V1::ListOperatingSystemsRequest, ::Hash]
|
266
|
+
# A request object representing the call parameters. Required. To specify no
|
267
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
268
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
269
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
270
|
+
#
|
271
|
+
# @overload list_operating_systems(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil)
|
272
|
+
# Pass arguments to `list_operating_systems` via keyword arguments. Note that at
|
273
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
274
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
275
|
+
#
|
276
|
+
# @param parent [::String]
|
277
|
+
# Required. The parent, which owns this collection of OperatingSystems.
|
278
|
+
# Format: `networks/{network_code}`
|
279
|
+
# @param page_size [::Integer]
|
280
|
+
# Optional. The maximum number of `OperatingSystems` to return. The service
|
281
|
+
# may return fewer than this value. If unspecified, at most 50
|
282
|
+
# `OperatingSystems` will be returned. The maximum value is 1000; values
|
283
|
+
# above 1000 will be coerced to 1000.
|
284
|
+
# @param page_token [::String]
|
285
|
+
# Optional. A page token, received from a previous `ListOperatingSystems`
|
286
|
+
# call. Provide this to retrieve the subsequent page.
|
287
|
+
#
|
288
|
+
# When paginating, all other parameters provided to `ListOperatingSystems`
|
289
|
+
# must match the call that provided the page token.
|
290
|
+
# @param filter [::String]
|
291
|
+
# Optional. Expression to filter the response.
|
292
|
+
# See syntax details at
|
293
|
+
# https://developers.google.com/ad-manager/api/beta/filters
|
294
|
+
# @param order_by [::String]
|
295
|
+
# Optional. Expression to specify sorting order.
|
296
|
+
# See syntax details at
|
297
|
+
# https://developers.google.com/ad-manager/api/beta/filters#order
|
298
|
+
# @param skip [::Integer]
|
299
|
+
# Optional. Number of individual resources to skip while paginating.
|
300
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
301
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::OperatingSystem>]
|
302
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
303
|
+
#
|
304
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::OperatingSystem>]
|
305
|
+
#
|
306
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
307
|
+
#
|
308
|
+
# @example Basic example
|
309
|
+
# require "google/ads/ad_manager/v1"
|
310
|
+
#
|
311
|
+
# # Create a client object. The client can be reused for multiple calls.
|
312
|
+
# client = Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new
|
313
|
+
#
|
314
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
315
|
+
# request = Google::Ads::AdManager::V1::ListOperatingSystemsRequest.new
|
316
|
+
#
|
317
|
+
# # Call the list_operating_systems method.
|
318
|
+
# result = client.list_operating_systems request
|
319
|
+
#
|
320
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
321
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
322
|
+
# result.each do |item|
|
323
|
+
# # Each element is of type ::Google::Ads::AdManager::V1::OperatingSystem.
|
324
|
+
# p item
|
325
|
+
# end
|
326
|
+
#
|
327
|
+
def list_operating_systems request, options = nil
|
328
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
329
|
+
|
330
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListOperatingSystemsRequest
|
331
|
+
|
332
|
+
# Converts hash and nil to an options object
|
333
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
334
|
+
|
335
|
+
# Customize the options with defaults
|
336
|
+
call_metadata = @config.rpcs.list_operating_systems.metadata.to_h
|
337
|
+
|
338
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
339
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
340
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
341
|
+
gapic_version: ::Google::Ads::AdManager::V1::VERSION,
|
342
|
+
transports_version_send: [:rest]
|
343
|
+
|
344
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
345
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
346
|
+
|
347
|
+
options.apply_defaults timeout: @config.rpcs.list_operating_systems.timeout,
|
348
|
+
metadata: call_metadata,
|
349
|
+
retry_policy: @config.rpcs.list_operating_systems.retry_policy
|
350
|
+
|
351
|
+
options.apply_defaults timeout: @config.timeout,
|
352
|
+
metadata: @config.metadata,
|
353
|
+
retry_policy: @config.retry_policy
|
354
|
+
|
355
|
+
@operating_system_service_stub.list_operating_systems request, options do |result, operation|
|
356
|
+
result = ::Gapic::Rest::PagedEnumerable.new @operating_system_service_stub, :list_operating_systems, "operating_systems", request, result, options
|
357
|
+
yield result, operation if block_given?
|
358
|
+
throw :response, result
|
359
|
+
end
|
360
|
+
rescue ::Gapic::Rest::Error => e
|
361
|
+
raise ::Google::Cloud::Error.from_error(e)
|
362
|
+
end
|
363
|
+
|
364
|
+
##
|
365
|
+
# Configuration class for the OperatingSystemService REST API.
|
366
|
+
#
|
367
|
+
# This class represents the configuration for OperatingSystemService REST,
|
368
|
+
# providing control over timeouts, retry behavior, logging, transport
|
369
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
370
|
+
# applied individually to specific RPCs. See
|
371
|
+
# {::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client::Configuration::Rpcs}
|
372
|
+
# for a list of RPCs that can be configured independently.
|
373
|
+
#
|
374
|
+
# Configuration can be applied globally to all clients, or to a single client
|
375
|
+
# on construction.
|
376
|
+
#
|
377
|
+
# @example
|
378
|
+
#
|
379
|
+
# # Modify the global config, setting the timeout for
|
380
|
+
# # get_operating_system to 20 seconds,
|
381
|
+
# # and all remaining timeouts to 10 seconds.
|
382
|
+
# ::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.configure do |config|
|
383
|
+
# config.timeout = 10.0
|
384
|
+
# config.rpcs.get_operating_system.timeout = 20.0
|
385
|
+
# end
|
386
|
+
#
|
387
|
+
# # Apply the above configuration only to a new client.
|
388
|
+
# client = ::Google::Ads::AdManager::V1::OperatingSystemService::Rest::Client.new do |config|
|
389
|
+
# config.timeout = 10.0
|
390
|
+
# config.rpcs.get_operating_system.timeout = 20.0
|
391
|
+
# end
|
392
|
+
#
|
393
|
+
# @!attribute [rw] endpoint
|
394
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
395
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
396
|
+
# @return [::String,nil]
|
397
|
+
# @!attribute [rw] credentials
|
398
|
+
# Credentials to send with calls. You may provide any of the following types:
|
399
|
+
# * (`String`) The path to a service account key file in JSON format
|
400
|
+
# * (`Hash`) A service account key as a Hash
|
401
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
402
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
403
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
404
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
405
|
+
# * (`nil`) indicating no credentials
|
406
|
+
#
|
407
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
408
|
+
# external source for authentication to Google Cloud, you must validate it before
|
409
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
410
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
411
|
+
# For more information, refer to [Validate credential configurations from external
|
412
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
413
|
+
# @return [::Object]
|
414
|
+
# @!attribute [rw] scope
|
415
|
+
# The OAuth scopes
|
416
|
+
# @return [::Array<::String>]
|
417
|
+
# @!attribute [rw] lib_name
|
418
|
+
# The library name as recorded in instrumentation and logging
|
419
|
+
# @return [::String]
|
420
|
+
# @!attribute [rw] lib_version
|
421
|
+
# The library version as recorded in instrumentation and logging
|
422
|
+
# @return [::String]
|
423
|
+
# @!attribute [rw] timeout
|
424
|
+
# The call timeout in seconds.
|
425
|
+
# @return [::Numeric]
|
426
|
+
# @!attribute [rw] metadata
|
427
|
+
# Additional headers to be sent with the call.
|
428
|
+
# @return [::Hash{::Symbol=>::String}]
|
429
|
+
# @!attribute [rw] retry_policy
|
430
|
+
# The retry policy. The value is a hash with the following keys:
|
431
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
432
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
433
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
434
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
435
|
+
# trigger a retry.
|
436
|
+
# @return [::Hash]
|
437
|
+
# @!attribute [rw] quota_project
|
438
|
+
# A separate project against which to charge quota.
|
439
|
+
# @return [::String]
|
440
|
+
# @!attribute [rw] universe_domain
|
441
|
+
# The universe domain within which to make requests. This determines the
|
442
|
+
# default endpoint URL. The default value of nil uses the environment
|
443
|
+
# universe (usually the default "googleapis.com" universe).
|
444
|
+
# @return [::String,nil]
|
445
|
+
# @!attribute [rw] logger
|
446
|
+
# A custom logger to use for request/response debug logging, or the value
|
447
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
448
|
+
# explicitly disable logging.
|
449
|
+
# @return [::Logger,:default,nil]
|
450
|
+
#
|
451
|
+
class Configuration
|
452
|
+
extend ::Gapic::Config
|
453
|
+
|
454
|
+
# @private
|
455
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
456
|
+
DEFAULT_ENDPOINT = "admanager.googleapis.com"
|
457
|
+
|
458
|
+
config_attr :endpoint, nil, ::String, nil
|
459
|
+
config_attr :credentials, nil do |value|
|
460
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
461
|
+
allowed.any? { |klass| klass === value }
|
462
|
+
end
|
463
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
464
|
+
config_attr :lib_name, nil, ::String, nil
|
465
|
+
config_attr :lib_version, nil, ::String, nil
|
466
|
+
config_attr :timeout, nil, ::Numeric, nil
|
467
|
+
config_attr :metadata, nil, ::Hash, nil
|
468
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
469
|
+
config_attr :quota_project, nil, ::String, nil
|
470
|
+
config_attr :universe_domain, nil, ::String, nil
|
471
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
472
|
+
|
473
|
+
# @private
|
474
|
+
def initialize parent_config = nil
|
475
|
+
@parent_config = parent_config unless parent_config.nil?
|
476
|
+
|
477
|
+
yield self if block_given?
|
478
|
+
end
|
479
|
+
|
480
|
+
##
|
481
|
+
# Configurations for individual RPCs
|
482
|
+
# @return [Rpcs]
|
483
|
+
#
|
484
|
+
def rpcs
|
485
|
+
@rpcs ||= begin
|
486
|
+
parent_rpcs = nil
|
487
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
488
|
+
Rpcs.new parent_rpcs
|
489
|
+
end
|
490
|
+
end
|
491
|
+
|
492
|
+
##
|
493
|
+
# Configuration RPC class for the OperatingSystemService API.
|
494
|
+
#
|
495
|
+
# Includes fields providing the configuration for each RPC in this service.
|
496
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
497
|
+
# the following configuration fields:
|
498
|
+
#
|
499
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
500
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
501
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
502
|
+
# include the following keys:
|
503
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
504
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
505
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
506
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
507
|
+
# trigger a retry.
|
508
|
+
#
|
509
|
+
class Rpcs
|
510
|
+
##
|
511
|
+
# RPC-specific configuration for `get_operating_system`
|
512
|
+
# @return [::Gapic::Config::Method]
|
513
|
+
#
|
514
|
+
attr_reader :get_operating_system
|
515
|
+
##
|
516
|
+
# RPC-specific configuration for `list_operating_systems`
|
517
|
+
# @return [::Gapic::Config::Method]
|
518
|
+
#
|
519
|
+
attr_reader :list_operating_systems
|
520
|
+
|
521
|
+
# @private
|
522
|
+
def initialize parent_rpcs = nil
|
523
|
+
get_operating_system_config = parent_rpcs.get_operating_system if parent_rpcs.respond_to? :get_operating_system
|
524
|
+
@get_operating_system = ::Gapic::Config::Method.new get_operating_system_config
|
525
|
+
list_operating_systems_config = parent_rpcs.list_operating_systems if parent_rpcs.respond_to? :list_operating_systems
|
526
|
+
@list_operating_systems = ::Gapic::Config::Method.new list_operating_systems_config
|
527
|
+
|
528
|
+
yield self if block_given?
|
529
|
+
end
|
530
|
+
end
|
531
|
+
end
|
532
|
+
end
|
533
|
+
end
|
534
|
+
end
|
535
|
+
end
|
536
|
+
end
|
537
|
+
end
|
538
|
+
end
|