google-ads-data_manager-v1 0.1.0 → 0.3.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/lib/google/ads/data_manager/v1/marketing_data_insights_service/client.rb +494 -0
- data/lib/google/ads/data_manager/v1/marketing_data_insights_service/credentials.rb +47 -0
- data/lib/google/ads/data_manager/v1/marketing_data_insights_service/rest/client.rb +444 -0
- data/lib/google/ads/data_manager/v1/marketing_data_insights_service/rest/service_stub.rb +143 -0
- data/lib/google/ads/data_manager/v1/marketing_data_insights_service/rest.rb +53 -0
- data/lib/google/ads/data_manager/v1/marketing_data_insights_service.rb +56 -0
- data/lib/google/ads/data_manager/v1/partner_link_service/client.rb +739 -0
- data/lib/google/ads/data_manager/v1/partner_link_service/credentials.rb +47 -0
- data/lib/google/ads/data_manager/v1/partner_link_service/paths.rb +69 -0
- data/lib/google/ads/data_manager/v1/partner_link_service/rest/client.rb +675 -0
- data/lib/google/ads/data_manager/v1/partner_link_service/rest/service_stub.rb +265 -0
- data/lib/google/ads/data_manager/v1/partner_link_service/rest.rb +52 -0
- data/lib/google/ads/data_manager/v1/partner_link_service.rb +55 -0
- data/lib/google/ads/data_manager/v1/rest.rb +5 -0
- data/lib/google/ads/data_manager/v1/user_list_direct_license_service/client.rb +813 -0
- data/lib/google/ads/data_manager/v1/user_list_direct_license_service/credentials.rb +47 -0
- data/lib/google/ads/data_manager/v1/user_list_direct_license_service/paths.rb +69 -0
- data/lib/google/ads/data_manager/v1/user_list_direct_license_service/rest/client.rb +742 -0
- data/lib/google/ads/data_manager/v1/user_list_direct_license_service/rest/service_stub.rb +327 -0
- data/lib/google/ads/data_manager/v1/user_list_direct_license_service/rest.rb +56 -0
- data/lib/google/ads/data_manager/v1/user_list_direct_license_service.rb +59 -0
- data/lib/google/ads/data_manager/v1/user_list_global_license_service/client.rb +955 -0
- data/lib/google/ads/data_manager/v1/user_list_global_license_service/credentials.rb +47 -0
- data/lib/google/ads/data_manager/v1/user_list_global_license_service/paths.rb +69 -0
- data/lib/google/ads/data_manager/v1/user_list_global_license_service/rest/client.rb +877 -0
- data/lib/google/ads/data_manager/v1/user_list_global_license_service/rest/service_stub.rb +388 -0
- data/lib/google/ads/data_manager/v1/user_list_global_license_service/rest.rb +56 -0
- data/lib/google/ads/data_manager/v1/user_list_global_license_service.rb +59 -0
- data/lib/google/ads/data_manager/v1/user_list_service/client.rb +972 -0
- data/lib/google/ads/data_manager/v1/user_list_service/credentials.rb +47 -0
- data/lib/google/ads/data_manager/v1/user_list_service/paths.rb +69 -0
- data/lib/google/ads/data_manager/v1/user_list_service/rest/client.rb +894 -0
- data/lib/google/ads/data_manager/v1/user_list_service/rest/service_stub.rb +388 -0
- data/lib/google/ads/data_manager/v1/user_list_service/rest.rb +52 -0
- data/lib/google/ads/data_manager/v1/user_list_service.rb +55 -0
- data/lib/google/ads/data_manager/v1/version.rb +1 -1
- data/lib/google/ads/data_manager/v1.rb +5 -0
- data/lib/google/ads/datamanager/v1/age_range_pb.rb +21 -0
- data/lib/google/ads/datamanager/v1/audience_pb.rb +5 -26
- data/lib/google/ads/datamanager/v1/cart_data_pb.rb +4 -24
- data/lib/google/ads/datamanager/v1/consent_pb.rb +3 -24
- data/lib/google/ads/datamanager/v1/destination_pb.rb +4 -24
- data/lib/google/ads/datamanager/v1/device_info_pb.rb +3 -24
- data/lib/google/ads/datamanager/v1/encryption_info_pb.rb +5 -24
- data/lib/google/ads/datamanager/v1/error_pb.rb +3 -24
- data/lib/google/ads/datamanager/v1/event_pb.rb +4 -31
- data/lib/google/ads/datamanager/v1/experimental_field_pb.rb +3 -24
- data/lib/google/ads/datamanager/v1/gender_pb.rb +21 -0
- data/lib/google/ads/datamanager/v1/ingestion_service_pb.rb +3 -31
- data/lib/google/ads/datamanager/v1/insights_service_pb.rb +33 -0
- data/lib/google/ads/datamanager/v1/insights_service_services_pb.rb +62 -0
- data/lib/google/ads/datamanager/v1/item_parameter_pb.rb +23 -0
- data/lib/google/ads/datamanager/v1/match_rate_pb.rb +3 -24
- data/lib/google/ads/datamanager/v1/partner_link_service_pb.rb +32 -0
- data/lib/google/ads/datamanager/v1/partner_link_service_services_pb.rb +79 -0
- data/lib/google/ads/datamanager/v1/processing_errors_pb.rb +3 -24
- data/lib/google/ads/datamanager/v1/request_status_per_destination_pb.rb +7 -26
- data/lib/google/ads/datamanager/v1/terms_of_service_pb.rb +3 -24
- data/lib/google/ads/datamanager/v1/user_data_pb.rb +3 -24
- data/lib/google/ads/datamanager/v1/user_list_direct_license_pb.rb +28 -0
- data/lib/google/ads/datamanager/v1/user_list_direct_license_service_pb.rb +32 -0
- data/lib/google/ads/datamanager/v1/user_list_direct_license_service_services_pb.rb +63 -0
- data/lib/google/ads/datamanager/v1/user_list_global_license_pb.rb +30 -0
- data/lib/google/ads/datamanager/v1/user_list_global_license_service_pb.rb +34 -0
- data/lib/google/ads/datamanager/v1/user_list_global_license_service_services_pb.rb +67 -0
- data/lib/google/ads/datamanager/v1/user_list_global_license_type_pb.rb +21 -0
- data/lib/google/ads/datamanager/v1/user_list_license_client_account_type_pb.rb +21 -0
- data/lib/google/ads/datamanager/v1/user_list_license_metrics_pb.rb +23 -0
- data/lib/google/ads/datamanager/v1/user_list_license_pricing_pb.rb +26 -0
- data/lib/google/ads/datamanager/v1/user_list_license_status_pb.rb +21 -0
- data/lib/google/ads/datamanager/v1/user_list_pb.rb +43 -0
- data/lib/google/ads/datamanager/v1/user_list_service_pb.rb +34 -0
- data/lib/google/ads/datamanager/v1/user_list_service_services_pb.rb +118 -0
- data/lib/google/ads/datamanager/v1/user_properties_pb.rb +4 -24
- data/proto_docs/google/ads/datamanager/v1/age_range.rb +53 -0
- data/proto_docs/google/ads/datamanager/v1/audience.rb +42 -3
- data/proto_docs/google/ads/datamanager/v1/cart_data.rb +9 -0
- data/proto_docs/google/ads/datamanager/v1/destination.rb +6 -0
- data/proto_docs/google/ads/datamanager/v1/encryption_info.rb +41 -1
- data/proto_docs/google/ads/datamanager/v1/error.rb +200 -1
- data/proto_docs/google/ads/datamanager/v1/event.rb +28 -0
- data/proto_docs/google/ads/datamanager/v1/gender.rb +41 -0
- data/proto_docs/google/ads/datamanager/v1/insights_service.rb +133 -0
- data/proto_docs/google/ads/datamanager/v1/item_parameter.rb +41 -0
- data/proto_docs/google/ads/datamanager/v1/partner_link_service.rb +141 -0
- data/proto_docs/google/ads/datamanager/v1/processing_errors.rb +6 -0
- data/proto_docs/google/ads/datamanager/v1/request_status_per_destination.rb +92 -6
- data/proto_docs/google/ads/datamanager/v1/user_list.rb +397 -0
- data/proto_docs/google/ads/datamanager/v1/user_list_direct_license.rb +75 -0
- data/proto_docs/google/ads/datamanager/v1/user_list_direct_license_service.rb +134 -0
- data/proto_docs/google/ads/datamanager/v1/user_list_global_license.rb +114 -0
- data/proto_docs/google/ads/datamanager/v1/user_list_global_license_service.rb +204 -0
- data/proto_docs/google/ads/datamanager/v1/user_list_global_license_type.rb +41 -0
- data/proto_docs/google/ads/datamanager/v1/user_list_license_client_account_type.rb +44 -0
- data/proto_docs/google/ads/datamanager/v1/user_list_license_metrics.rb +55 -0
- data/proto_docs/google/ads/datamanager/v1/user_list_license_pricing.rb +108 -0
- data/proto_docs/google/ads/datamanager/v1/user_list_license_status.rb +38 -0
- data/proto_docs/google/ads/datamanager/v1/user_list_service.rb +151 -0
- data/proto_docs/google/ads/datamanager/v1/user_properties.rb +20 -0
- data/proto_docs/google/api/client.rb +149 -29
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- metadata +75 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f028a8de554f5f83e7b859b471aa5f9260e4cfbc17f4593a08f85452200b2628
|
|
4
|
+
data.tar.gz: 26f4d04450dbdfc9e2858b9ff75945b03b35b92fbfd0ac3c3bc8d2f5f70f4424
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e3f533d3d953a6bc108ea8e646401030752bb88cfefbd5482ee7a9c3c52ca03491a47a51548c63f1440153252b8270979fb6a660b97bdf1d7ae1f84fbdcfe03e
|
|
7
|
+
data.tar.gz: 5205299a7662560f51fd7018a5aca58a92bbc745d3fe0726c8265c6003aecb06a3ca1521938b673700ec9d1ab2fda13e0b8b07f430115195b60f8bb9b04ad335
|
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 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/datamanager/v1/insights_service_pb"
|
|
21
|
+
|
|
22
|
+
module Google
|
|
23
|
+
module Ads
|
|
24
|
+
module DataManager
|
|
25
|
+
module V1
|
|
26
|
+
module MarketingDataInsightsService
|
|
27
|
+
##
|
|
28
|
+
# Client for the MarketingDataInsightsService service.
|
|
29
|
+
#
|
|
30
|
+
# Service to return insights on marketing data.
|
|
31
|
+
#
|
|
32
|
+
# This feature is only available to data partners.
|
|
33
|
+
#
|
|
34
|
+
class Client
|
|
35
|
+
# @private
|
|
36
|
+
API_VERSION = ""
|
|
37
|
+
|
|
38
|
+
# @private
|
|
39
|
+
DEFAULT_ENDPOINT_TEMPLATE = "datamanager.$UNIVERSE_DOMAIN$"
|
|
40
|
+
|
|
41
|
+
# @private
|
|
42
|
+
attr_reader :marketing_data_insights_service_stub
|
|
43
|
+
|
|
44
|
+
##
|
|
45
|
+
# Configure the MarketingDataInsightsService Client class.
|
|
46
|
+
#
|
|
47
|
+
# See {::Google::Ads::DataManager::V1::MarketingDataInsightsService::Client::Configuration}
|
|
48
|
+
# for a description of the configuration fields.
|
|
49
|
+
#
|
|
50
|
+
# @example
|
|
51
|
+
#
|
|
52
|
+
# # Modify the configuration for all MarketingDataInsightsService clients
|
|
53
|
+
# ::Google::Ads::DataManager::V1::MarketingDataInsightsService::Client.configure do |config|
|
|
54
|
+
# config.timeout = 10.0
|
|
55
|
+
# end
|
|
56
|
+
#
|
|
57
|
+
# @yield [config] Configure the Client client.
|
|
58
|
+
# @yieldparam config [Client::Configuration]
|
|
59
|
+
#
|
|
60
|
+
# @return [Client::Configuration]
|
|
61
|
+
#
|
|
62
|
+
def self.configure
|
|
63
|
+
@configure ||= begin
|
|
64
|
+
namespace = ["Google", "Ads", "DataManager", "V1"]
|
|
65
|
+
parent_config = while namespace.any?
|
|
66
|
+
parent_name = namespace.join "::"
|
|
67
|
+
parent_const = const_get parent_name
|
|
68
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
|
69
|
+
namespace.pop
|
|
70
|
+
end
|
|
71
|
+
default_config = Client::Configuration.new parent_config
|
|
72
|
+
|
|
73
|
+
default_config
|
|
74
|
+
end
|
|
75
|
+
yield @configure if block_given?
|
|
76
|
+
@configure
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
##
|
|
80
|
+
# Configure the MarketingDataInsightsService Client instance.
|
|
81
|
+
#
|
|
82
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
|
83
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
84
|
+
# should be made on {Client.configure}.
|
|
85
|
+
#
|
|
86
|
+
# See {::Google::Ads::DataManager::V1::MarketingDataInsightsService::Client::Configuration}
|
|
87
|
+
# for a description of the configuration fields.
|
|
88
|
+
#
|
|
89
|
+
# @yield [config] Configure the Client client.
|
|
90
|
+
# @yieldparam config [Client::Configuration]
|
|
91
|
+
#
|
|
92
|
+
# @return [Client::Configuration]
|
|
93
|
+
#
|
|
94
|
+
def configure
|
|
95
|
+
yield @config if block_given?
|
|
96
|
+
@config
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
##
|
|
100
|
+
# The effective universe domain
|
|
101
|
+
#
|
|
102
|
+
# @return [String]
|
|
103
|
+
#
|
|
104
|
+
def universe_domain
|
|
105
|
+
@marketing_data_insights_service_stub.universe_domain
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
##
|
|
109
|
+
# Create a new MarketingDataInsightsService client object.
|
|
110
|
+
#
|
|
111
|
+
# @example
|
|
112
|
+
#
|
|
113
|
+
# # Create a client using the default configuration
|
|
114
|
+
# client = ::Google::Ads::DataManager::V1::MarketingDataInsightsService::Client.new
|
|
115
|
+
#
|
|
116
|
+
# # Create a client using a custom configuration
|
|
117
|
+
# client = ::Google::Ads::DataManager::V1::MarketingDataInsightsService::Client.new do |config|
|
|
118
|
+
# config.timeout = 10.0
|
|
119
|
+
# end
|
|
120
|
+
#
|
|
121
|
+
# @yield [config] Configure the MarketingDataInsightsService client.
|
|
122
|
+
# @yieldparam config [Client::Configuration]
|
|
123
|
+
#
|
|
124
|
+
def initialize
|
|
125
|
+
# These require statements are intentionally placed here to initialize
|
|
126
|
+
# the gRPC module only when it's required.
|
|
127
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
|
128
|
+
require "gapic/grpc"
|
|
129
|
+
require "google/ads/datamanager/v1/insights_service_services_pb"
|
|
130
|
+
|
|
131
|
+
# Create the configuration object
|
|
132
|
+
@config = Configuration.new Client.configure
|
|
133
|
+
|
|
134
|
+
# Yield the configuration if needed
|
|
135
|
+
yield @config if block_given?
|
|
136
|
+
|
|
137
|
+
# Create credentials
|
|
138
|
+
credentials = @config.credentials
|
|
139
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
140
|
+
# but only if the default endpoint does not have a region prefix.
|
|
141
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
142
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
143
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
144
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
145
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
146
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
147
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
|
148
|
+
end
|
|
149
|
+
@quota_project_id = @config.quota_project
|
|
150
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
151
|
+
|
|
152
|
+
@marketing_data_insights_service_stub = ::Gapic::ServiceStub.new(
|
|
153
|
+
::Google::Ads::DataManager::V1::MarketingDataInsightsService::Stub,
|
|
154
|
+
credentials: credentials,
|
|
155
|
+
endpoint: @config.endpoint,
|
|
156
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
157
|
+
universe_domain: @config.universe_domain,
|
|
158
|
+
channel_args: @config.channel_args,
|
|
159
|
+
interceptors: @config.interceptors,
|
|
160
|
+
channel_pool_config: @config.channel_pool,
|
|
161
|
+
logger: @config.logger
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
@marketing_data_insights_service_stub.stub_logger&.info do |entry|
|
|
165
|
+
entry.set_system_name
|
|
166
|
+
entry.set_service
|
|
167
|
+
entry.message = "Created client for #{entry.service}"
|
|
168
|
+
entry.set_credentials_fields credentials
|
|
169
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
170
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
171
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
##
|
|
176
|
+
# The logger used for request/response debug logging.
|
|
177
|
+
#
|
|
178
|
+
# @return [Logger]
|
|
179
|
+
#
|
|
180
|
+
def logger
|
|
181
|
+
@marketing_data_insights_service_stub.logger
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Service calls
|
|
185
|
+
|
|
186
|
+
##
|
|
187
|
+
# Retrieves marketing data insights for a given user list.
|
|
188
|
+
#
|
|
189
|
+
# This feature is only available to data partners.
|
|
190
|
+
#
|
|
191
|
+
# Authorization Headers:
|
|
192
|
+
#
|
|
193
|
+
# This method supports the following optional headers to define how the API
|
|
194
|
+
# authorizes access for the request:
|
|
195
|
+
#
|
|
196
|
+
# * `login-account`: (Optional) The resource name of the account where the
|
|
197
|
+
# Google Account of the credentials is a user. If not set, defaults to the
|
|
198
|
+
# account of the request. Format:
|
|
199
|
+
# `accountTypes/{loginAccountType}/accounts/{loginAccountId}`
|
|
200
|
+
# * `linked-account`: (Optional) The resource name of the account with an
|
|
201
|
+
# established product link to the `login-account`. Format:
|
|
202
|
+
# `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`
|
|
203
|
+
#
|
|
204
|
+
# @overload retrieve_insights(request, options = nil)
|
|
205
|
+
# Pass arguments to `retrieve_insights` via a request object, either of type
|
|
206
|
+
# {::Google::Ads::DataManager::V1::RetrieveInsightsRequest} or an equivalent Hash.
|
|
207
|
+
#
|
|
208
|
+
# @param request [::Google::Ads::DataManager::V1::RetrieveInsightsRequest, ::Hash]
|
|
209
|
+
# A request object representing the call parameters. Required. To specify no
|
|
210
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
211
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
212
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
213
|
+
#
|
|
214
|
+
# @overload retrieve_insights(parent: nil, baseline: nil, user_list_id: nil)
|
|
215
|
+
# Pass arguments to `retrieve_insights` via keyword arguments. Note that at
|
|
216
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
217
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
218
|
+
#
|
|
219
|
+
# @param parent [::String]
|
|
220
|
+
# Required. The parent account that owns the user list.
|
|
221
|
+
# Format: `accountTypes/{account_type}/accounts/{account}`
|
|
222
|
+
# @param baseline [::Google::Ads::DataManager::V1::Baseline, ::Hash]
|
|
223
|
+
# Required. Baseline for the insights requested.
|
|
224
|
+
# @param user_list_id [::String]
|
|
225
|
+
# Required. The user list ID for which insights are requested.
|
|
226
|
+
#
|
|
227
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
228
|
+
# @yieldparam response [::Google::Ads::DataManager::V1::RetrieveInsightsResponse]
|
|
229
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
230
|
+
#
|
|
231
|
+
# @return [::Google::Ads::DataManager::V1::RetrieveInsightsResponse]
|
|
232
|
+
#
|
|
233
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
234
|
+
#
|
|
235
|
+
# @example Basic example
|
|
236
|
+
# require "google/ads/data_manager/v1"
|
|
237
|
+
#
|
|
238
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
239
|
+
# client = Google::Ads::DataManager::V1::MarketingDataInsightsService::Client.new
|
|
240
|
+
#
|
|
241
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
242
|
+
# request = Google::Ads::DataManager::V1::RetrieveInsightsRequest.new
|
|
243
|
+
#
|
|
244
|
+
# # Call the retrieve_insights method.
|
|
245
|
+
# result = client.retrieve_insights request
|
|
246
|
+
#
|
|
247
|
+
# # The returned object is of type Google::Ads::DataManager::V1::RetrieveInsightsResponse.
|
|
248
|
+
# p result
|
|
249
|
+
#
|
|
250
|
+
def retrieve_insights request, options = nil
|
|
251
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
252
|
+
|
|
253
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::DataManager::V1::RetrieveInsightsRequest
|
|
254
|
+
|
|
255
|
+
# Converts hash and nil to an options object
|
|
256
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
257
|
+
|
|
258
|
+
# Customize the options with defaults
|
|
259
|
+
metadata = @config.rpcs.retrieve_insights.metadata.to_h
|
|
260
|
+
|
|
261
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
262
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
263
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
264
|
+
gapic_version: ::Google::Ads::DataManager::V1::VERSION
|
|
265
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
266
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
267
|
+
|
|
268
|
+
header_params = {}
|
|
269
|
+
if request.parent
|
|
270
|
+
header_params["parent"] = request.parent
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
274
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
275
|
+
|
|
276
|
+
options.apply_defaults timeout: @config.rpcs.retrieve_insights.timeout,
|
|
277
|
+
metadata: metadata,
|
|
278
|
+
retry_policy: @config.rpcs.retrieve_insights.retry_policy
|
|
279
|
+
|
|
280
|
+
options.apply_defaults timeout: @config.timeout,
|
|
281
|
+
metadata: @config.metadata,
|
|
282
|
+
retry_policy: @config.retry_policy
|
|
283
|
+
|
|
284
|
+
@marketing_data_insights_service_stub.call_rpc :retrieve_insights, request, options: options do |response, operation|
|
|
285
|
+
yield response, operation if block_given?
|
|
286
|
+
end
|
|
287
|
+
rescue ::GRPC::BadStatus => e
|
|
288
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
##
|
|
292
|
+
# Configuration class for the MarketingDataInsightsService API.
|
|
293
|
+
#
|
|
294
|
+
# This class represents the configuration for MarketingDataInsightsService,
|
|
295
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
296
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
297
|
+
# applied individually to specific RPCs. See
|
|
298
|
+
# {::Google::Ads::DataManager::V1::MarketingDataInsightsService::Client::Configuration::Rpcs}
|
|
299
|
+
# for a list of RPCs that can be configured independently.
|
|
300
|
+
#
|
|
301
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
302
|
+
# on construction.
|
|
303
|
+
#
|
|
304
|
+
# @example
|
|
305
|
+
#
|
|
306
|
+
# # Modify the global config, setting the timeout for
|
|
307
|
+
# # retrieve_insights to 20 seconds,
|
|
308
|
+
# # and all remaining timeouts to 10 seconds.
|
|
309
|
+
# ::Google::Ads::DataManager::V1::MarketingDataInsightsService::Client.configure do |config|
|
|
310
|
+
# config.timeout = 10.0
|
|
311
|
+
# config.rpcs.retrieve_insights.timeout = 20.0
|
|
312
|
+
# end
|
|
313
|
+
#
|
|
314
|
+
# # Apply the above configuration only to a new client.
|
|
315
|
+
# client = ::Google::Ads::DataManager::V1::MarketingDataInsightsService::Client.new do |config|
|
|
316
|
+
# config.timeout = 10.0
|
|
317
|
+
# config.rpcs.retrieve_insights.timeout = 20.0
|
|
318
|
+
# end
|
|
319
|
+
#
|
|
320
|
+
# @!attribute [rw] endpoint
|
|
321
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
322
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
323
|
+
# @return [::String,nil]
|
|
324
|
+
# @!attribute [rw] credentials
|
|
325
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
326
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
327
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
328
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
329
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
330
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
|
331
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
332
|
+
# * (`nil`) indicating no credentials
|
|
333
|
+
#
|
|
334
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
335
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
336
|
+
# Google APIs can compromise the security of your systems and data.
|
|
337
|
+
#
|
|
338
|
+
# @example
|
|
339
|
+
#
|
|
340
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
341
|
+
# # on the appropriate credentials class for your environment.
|
|
342
|
+
#
|
|
343
|
+
# require "googleauth"
|
|
344
|
+
#
|
|
345
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
346
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
347
|
+
# )
|
|
348
|
+
#
|
|
349
|
+
# client = ::Google::Ads::DataManager::V1::MarketingDataInsightsService::Client.new do |config|
|
|
350
|
+
# config.credentials = credentials
|
|
351
|
+
# end
|
|
352
|
+
#
|
|
353
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
354
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
355
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
356
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
357
|
+
# For more information, refer to [Validate credential configurations from external
|
|
358
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
359
|
+
# @return [::Object]
|
|
360
|
+
# @!attribute [rw] scope
|
|
361
|
+
# The OAuth scopes
|
|
362
|
+
# @return [::Array<::String>]
|
|
363
|
+
# @!attribute [rw] lib_name
|
|
364
|
+
# The library name as recorded in instrumentation and logging
|
|
365
|
+
# @return [::String]
|
|
366
|
+
# @!attribute [rw] lib_version
|
|
367
|
+
# The library version as recorded in instrumentation and logging
|
|
368
|
+
# @return [::String]
|
|
369
|
+
# @!attribute [rw] channel_args
|
|
370
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
|
371
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
|
372
|
+
# @return [::Hash]
|
|
373
|
+
# @!attribute [rw] interceptors
|
|
374
|
+
# An array of interceptors that are run before calls are executed.
|
|
375
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
|
376
|
+
# @!attribute [rw] timeout
|
|
377
|
+
# The call timeout in seconds.
|
|
378
|
+
# @return [::Numeric]
|
|
379
|
+
# @!attribute [rw] metadata
|
|
380
|
+
# Additional gRPC headers to be sent with the call.
|
|
381
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
382
|
+
# @!attribute [rw] retry_policy
|
|
383
|
+
# The retry policy. The value is a hash with the following keys:
|
|
384
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
385
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
386
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
387
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
388
|
+
# trigger a retry.
|
|
389
|
+
# @return [::Hash]
|
|
390
|
+
# @!attribute [rw] quota_project
|
|
391
|
+
# A separate project against which to charge quota.
|
|
392
|
+
# @return [::String]
|
|
393
|
+
# @!attribute [rw] universe_domain
|
|
394
|
+
# The universe domain within which to make requests. This determines the
|
|
395
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
396
|
+
# universe (usually the default "googleapis.com" universe).
|
|
397
|
+
# @return [::String,nil]
|
|
398
|
+
# @!attribute [rw] logger
|
|
399
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
400
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
401
|
+
# explicitly disable logging.
|
|
402
|
+
# @return [::Logger,:default,nil]
|
|
403
|
+
#
|
|
404
|
+
class Configuration
|
|
405
|
+
extend ::Gapic::Config
|
|
406
|
+
|
|
407
|
+
# @private
|
|
408
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
409
|
+
DEFAULT_ENDPOINT = "datamanager.googleapis.com"
|
|
410
|
+
|
|
411
|
+
config_attr :endpoint, nil, ::String, nil
|
|
412
|
+
config_attr :credentials, nil do |value|
|
|
413
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
|
414
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
|
|
415
|
+
allowed.any? { |klass| klass === value }
|
|
416
|
+
end
|
|
417
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
418
|
+
config_attr :lib_name, nil, ::String, nil
|
|
419
|
+
config_attr :lib_version, nil, ::String, nil
|
|
420
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
|
421
|
+
config_attr :interceptors, nil, ::Array, nil
|
|
422
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
423
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
424
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
425
|
+
config_attr :quota_project, nil, ::String, nil
|
|
426
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
427
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
428
|
+
|
|
429
|
+
# @private
|
|
430
|
+
def initialize parent_config = nil
|
|
431
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
432
|
+
|
|
433
|
+
yield self if block_given?
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
##
|
|
437
|
+
# Configurations for individual RPCs
|
|
438
|
+
# @return [Rpcs]
|
|
439
|
+
#
|
|
440
|
+
def rpcs
|
|
441
|
+
@rpcs ||= begin
|
|
442
|
+
parent_rpcs = nil
|
|
443
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
444
|
+
Rpcs.new parent_rpcs
|
|
445
|
+
end
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
##
|
|
449
|
+
# Configuration for the channel pool
|
|
450
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
|
451
|
+
#
|
|
452
|
+
def channel_pool
|
|
453
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
##
|
|
457
|
+
# Configuration RPC class for the MarketingDataInsightsService API.
|
|
458
|
+
#
|
|
459
|
+
# Includes fields providing the configuration for each RPC in this service.
|
|
460
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
461
|
+
# the following configuration fields:
|
|
462
|
+
#
|
|
463
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
464
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
|
465
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
466
|
+
# include the following keys:
|
|
467
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
468
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
469
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
470
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
471
|
+
# trigger a retry.
|
|
472
|
+
#
|
|
473
|
+
class Rpcs
|
|
474
|
+
##
|
|
475
|
+
# RPC-specific configuration for `retrieve_insights`
|
|
476
|
+
# @return [::Gapic::Config::Method]
|
|
477
|
+
#
|
|
478
|
+
attr_reader :retrieve_insights
|
|
479
|
+
|
|
480
|
+
# @private
|
|
481
|
+
def initialize parent_rpcs = nil
|
|
482
|
+
retrieve_insights_config = parent_rpcs.retrieve_insights if parent_rpcs.respond_to? :retrieve_insights
|
|
483
|
+
@retrieve_insights = ::Gapic::Config::Method.new retrieve_insights_config
|
|
484
|
+
|
|
485
|
+
yield self if block_given?
|
|
486
|
+
end
|
|
487
|
+
end
|
|
488
|
+
end
|
|
489
|
+
end
|
|
490
|
+
end
|
|
491
|
+
end
|
|
492
|
+
end
|
|
493
|
+
end
|
|
494
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 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 "googleauth"
|
|
20
|
+
|
|
21
|
+
module Google
|
|
22
|
+
module Ads
|
|
23
|
+
module DataManager
|
|
24
|
+
module V1
|
|
25
|
+
module MarketingDataInsightsService
|
|
26
|
+
# Credentials for the MarketingDataInsightsService API.
|
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
|
28
|
+
self.scope = [
|
|
29
|
+
"https://www.googleapis.com/auth/datamanager"
|
|
30
|
+
]
|
|
31
|
+
self.env_vars = [
|
|
32
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
|
33
|
+
"GOOGLE_CLOUD_KEYFILE",
|
|
34
|
+
"GCLOUD_KEYFILE",
|
|
35
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
|
36
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
|
37
|
+
"GCLOUD_KEYFILE_JSON"
|
|
38
|
+
]
|
|
39
|
+
self.paths = [
|
|
40
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
|
41
|
+
]
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|