google-ads-googleads 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +3 -0
- data/lib/google/ads/google_ads/google_ads_client.rb +1 -1
- data/lib/google/ads/google_ads/path_lookup_util.rb +101 -0
- data/lib/google/ads/google_ads/proto_lookup_util.rb +113 -20
- data/lib/google/ads/google_ads/v0/common/ad_type_infos_pb.rb +17 -0
- data/lib/google/ads/google_ads/v0/common/criteria_pb.rb +60 -0
- data/lib/google/ads/google_ads/v0/common/metrics_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/common/tag_snippet_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/account_budget_status_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/enums/ad_group_ad_rotation_mode_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/ad_group_type_pb.rb +4 -0
- data/lib/google/ads/google_ads/v0/enums/ad_type_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/enums/advertising_channel_sub_type_pb.rb +3 -0
- data/lib/google/ads/google_ads/v0/enums/age_range_type_pb.rb +33 -0
- data/lib/google/ads/google_ads/v0/enums/call_conversion_reporting_state_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/enums/change_status_resource_type_pb.rb +31 -0
- data/lib/google/ads/google_ads/v0/enums/criterion_type_pb.rb +9 -0
- data/lib/google/ads/google_ads/v0/enums/display_ad_format_setting_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/enums/gender_type_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/enums/geo_target_constant_status_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/enums/income_range_type_pb.rb +33 -0
- data/lib/google/ads/google_ads/v0/enums/manager_link_status_pb.rb +31 -0
- data/lib/google/ads/google_ads/v0/enums/media_type_pb.rb +32 -0
- data/lib/google/ads/google_ads/v0/enums/mime_type_pb.rb +38 -0
- data/lib/google/ads/google_ads/v0/enums/parental_status_type_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/enums/proximity_radius_units_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/errors/billing_setup_error_pb.rb +41 -0
- data/lib/google/ads/google_ads/v0/errors/change_status_error_pb.rb +0 -1
- data/lib/google/ads/google_ads/v0/errors/criterion_error_pb.rb +1 -1
- data/lib/google/ads/google_ads/v0/errors/customer_client_link_error_pb.rb +33 -0
- data/lib/google/ads/google_ads/v0/errors/customer_error_pb.rb +27 -0
- data/lib/google/ads/google_ads/v0/errors/customer_manager_link_error_pb.rb +34 -0
- data/lib/google/ads/google_ads/v0/errors/errors_pb.rb +12 -2
- data/lib/google/ads/google_ads/v0/errors/field_error_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/errors/geo_target_constant_suggestion_error_pb.rb +30 -0
- data/lib/google/ads/google_ads/v0/errors/header_error_pb.rb +1 -1
- data/lib/google/ads/google_ads/v0/errors/media_file_error_pb.rb +49 -0
- data/lib/google/ads/google_ads/v0/errors/request_error_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/errors/resource_count_limit_exceeded_error_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/errors/url_field_error_pb.rb +2 -0
- data/lib/google/ads/google_ads/v0/resources/account_budget_pb.rb +54 -0
- data/lib/google/ads/google_ads/v0/resources/account_budget_proposal_pb.rb +9 -0
- data/lib/google/ads/google_ads/v0/resources/ad_group_audience_view_pb.rb +22 -0
- data/lib/google/ads/google_ads/v0/resources/ad_group_criterion_pb.rb +9 -0
- data/lib/google/ads/google_ads/v0/resources/ad_group_pb.rb +2 -0
- data/lib/google/ads/google_ads/v0/resources/age_range_view_pb.rb +22 -0
- data/lib/google/ads/google_ads/v0/resources/billing_setup_pb.rb +15 -5
- data/lib/google/ads/google_ads/v0/resources/campaign_criterion_pb.rb +9 -0
- data/lib/google/ads/google_ads/v0/resources/campaign_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/resources/change_status_pb.rb +2 -2
- data/lib/google/ads/google_ads/v0/resources/conversion_action_pb.rb +2 -10
- data/lib/google/ads/google_ads/v0/resources/customer_client_link_pb.rb +28 -0
- data/lib/google/ads/google_ads/v0/resources/customer_manager_link_pb.rb +27 -0
- data/lib/google/ads/google_ads/v0/resources/customer_pb.rb +7 -0
- data/lib/google/ads/google_ads/v0/resources/display_keyword_view_pb.rb +22 -0
- data/lib/google/ads/google_ads/v0/resources/gender_view_pb.rb +22 -0
- data/lib/google/ads/google_ads/v0/resources/geo_target_constant_pb.rb +2 -0
- data/lib/google/ads/google_ads/v0/resources/hotel_group_view_pb.rb +22 -0
- data/lib/google/ads/google_ads/v0/resources/managed_placement_view_pb.rb +22 -0
- data/lib/google/ads/google_ads/v0/resources/media_file_pb.rb +43 -0
- data/lib/google/ads/google_ads/v0/resources/parental_status_view_pb.rb +22 -0
- data/lib/google/ads/google_ads/v0/resources/product_group_view_pb.rb +22 -0
- data/lib/google/ads/google_ads/v0/resources/shared_criterion_pb.rb +3 -0
- data/lib/google/ads/google_ads/v0/resources/topic_constant_pb.rb +26 -0
- data/lib/google/ads/google_ads/v0/resources/topic_view_pb.rb +22 -0
- data/lib/google/ads/google_ads/v0/services/account_budget_service_client.rb +223 -0
- data/lib/google/ads/google_ads/v0/services/account_budget_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/account_budget_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/account_budget_service_services_pb.rb +50 -0
- data/lib/google/ads/google_ads/v0/services/ad_group_audience_view_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/ad_group_audience_view_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/ad_group_audience_view_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/ad_group_audience_view_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/age_range_view_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/age_range_view_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/age_range_view_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/age_range_view_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/billing_setup_service_client.rb +2 -3
- data/lib/google/ads/google_ads/v0/services/billing_setup_service_pb.rb +1 -0
- data/lib/google/ads/google_ads/v0/services/billing_setup_service_services_pb.rb +2 -3
- data/lib/google/ads/google_ads/v0/services/customer_client_link_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/customer_client_link_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/customer_client_link_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/customer_client_link_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/customer_manager_link_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/customer_manager_link_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/customer_manager_link_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/customer_manager_link_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/customer_service_client.rb +27 -0
- data/lib/google/ads/google_ads/v0/services/customer_service_client_config.json +5 -0
- data/lib/google/ads/google_ads/v0/services/customer_service_pb.rb +8 -0
- data/lib/google/ads/google_ads/v0/services/customer_service_services_pb.rb +3 -0
- data/lib/google/ads/google_ads/v0/services/display_keyword_view_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/display_keyword_view_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/display_keyword_view_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/display_keyword_view_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/gender_view_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/gender_view_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/gender_view_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/gender_view_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/geo_target_constant_service_client.rb +53 -0
- data/lib/google/ads/google_ads/v0/services/geo_target_constant_service_client_config.json +5 -0
- data/lib/google/ads/google_ads/v0/services/geo_target_constant_service_pb.rb +29 -0
- data/lib/google/ads/google_ads/v0/services/geo_target_constant_service_services_pb.rb +2 -0
- data/lib/google/ads/google_ads/v0/services/google_ads_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/hotel_group_view_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/hotel_group_view_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/hotel_group_view_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/hotel_group_view_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/managed_placement_view_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/managed_placement_view_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/managed_placement_view_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/managed_placement_view_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/media_file_service_client.rb +267 -0
- data/lib/google/ads/google_ads/v0/services/media_file_service_client_config.json +36 -0
- data/lib/google/ads/google_ads/v0/services/media_file_service_pb.rb +43 -0
- data/lib/google/ads/google_ads/v0/services/media_file_service_services_pb.rb +50 -0
- data/lib/google/ads/google_ads/v0/services/parental_status_view_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/parental_status_view_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/parental_status_view_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/parental_status_view_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/product_group_view_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/product_group_view_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/product_group_view_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/product_group_view_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/topic_constant_service_client.rb +219 -0
- data/lib/google/ads/google_ads/v0/services/topic_constant_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/topic_constant_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/topic_constant_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/v0/services/topic_view_service_client.rb +221 -0
- data/lib/google/ads/google_ads/v0/services/topic_view_service_client_config.json +31 -0
- data/lib/google/ads/google_ads/v0/services/topic_view_service_pb.rb +24 -0
- data/lib/google/ads/google_ads/v0/services/topic_view_service_services_pb.rb +48 -0
- data/lib/google/ads/google_ads/version.rb +1 -1
- metadata +92 -4
- data/lib/google/ads/google_ads/v0/enums/resource_type_pb.rb +0 -32
- data/lib/google/ads/google_ads/v0/errors/media_error_pb.rb +0 -50
@@ -0,0 +1,31 @@
|
|
1
|
+
{
|
2
|
+
"interfaces": {
|
3
|
+
"google.ads.googleads.v0.services.TopicConstantService": {
|
4
|
+
"retry_codes": {
|
5
|
+
"idempotent": [
|
6
|
+
"DEADLINE_EXCEEDED",
|
7
|
+
"UNAVAILABLE"
|
8
|
+
],
|
9
|
+
"non_idempotent": []
|
10
|
+
},
|
11
|
+
"retry_params": {
|
12
|
+
"default": {
|
13
|
+
"initial_retry_delay_millis": 100,
|
14
|
+
"retry_delay_multiplier": 1.3,
|
15
|
+
"max_retry_delay_millis": 60000,
|
16
|
+
"initial_rpc_timeout_millis": 20000,
|
17
|
+
"rpc_timeout_multiplier": 1.0,
|
18
|
+
"max_rpc_timeout_millis": 20000,
|
19
|
+
"total_timeout_millis": 600000
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"methods": {
|
23
|
+
"GetTopicConstant": {
|
24
|
+
"timeout_millis": 60000,
|
25
|
+
"retry_codes_name": "idempotent",
|
26
|
+
"retry_params_name": "default"
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/ads/google_ads/v0/services/topic_constant_service.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/ads/google_ads/v0/resources/topic_constant_pb'
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_message "google.ads.googleads.v0.services.GetTopicConstantRequest" do
|
10
|
+
optional :resource_name, :string, 1
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
module Google
|
15
|
+
module Ads
|
16
|
+
module GoogleAds
|
17
|
+
module V0
|
18
|
+
module Services
|
19
|
+
GetTopicConstantRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.GetTopicConstantRequest").msgclass
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/ads/google_ads/v0/services/topic_constant_service.proto for package 'google.ads.googleads.v0.services'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2018 Google LLC.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
#
|
19
|
+
|
20
|
+
require 'grpc'
|
21
|
+
require 'google/ads/google_ads/v0/services/topic_constant_service_pb'
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Ads
|
25
|
+
module GoogleAds
|
26
|
+
module V0
|
27
|
+
module Services
|
28
|
+
module TopicConstantService
|
29
|
+
# Service to fetch topic constants.
|
30
|
+
class Service
|
31
|
+
|
32
|
+
include GRPC::GenericService
|
33
|
+
|
34
|
+
self.marshal_class_method = :encode
|
35
|
+
self.unmarshal_class_method = :decode
|
36
|
+
self.service_name = 'google.ads.googleads.v0.services.TopicConstantService'
|
37
|
+
|
38
|
+
# Returns the requested topic constant in full detail.
|
39
|
+
rpc :GetTopicConstant, GetTopicConstantRequest, Google::Ads::GoogleAds::V0::Resources::TopicConstant
|
40
|
+
end
|
41
|
+
|
42
|
+
Stub = Service.rpc_stub_class
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,221 @@
|
|
1
|
+
# Copyright 2018 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
#
|
15
|
+
# EDITING INSTRUCTIONS
|
16
|
+
# This file was generated from the file
|
17
|
+
# https://github.com/googleapis/googleapis/blob/master/google/ads/google_ads/v0/services/topic_view_service.proto,
|
18
|
+
# and updates to that file get reflected here through a refresh process.
|
19
|
+
# For the short term, the refresh process will only be runnable by Google
|
20
|
+
# engineers.
|
21
|
+
|
22
|
+
require "json"
|
23
|
+
require "pathname"
|
24
|
+
|
25
|
+
require "google/gax"
|
26
|
+
|
27
|
+
require "google/ads/google_ads/v0/services/topic_view_service_pb"
|
28
|
+
require "google/ads/google_ads/v0/services/credentials"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Ads
|
32
|
+
module GoogleAds
|
33
|
+
module V0
|
34
|
+
module Services
|
35
|
+
# Service to manage topic views.
|
36
|
+
#
|
37
|
+
# @!attribute [r] topic_view_service_stub
|
38
|
+
# @return [Google::Ads::GoogleAds::V0::Services::TopicViewService::Stub]
|
39
|
+
class TopicViewServiceClient
|
40
|
+
attr_reader :topic_view_service_stub
|
41
|
+
|
42
|
+
# The default address of the service.
|
43
|
+
SERVICE_ADDRESS = "googleads.googleapis.com".freeze
|
44
|
+
|
45
|
+
# The default port of the service.
|
46
|
+
DEFAULT_SERVICE_PORT = 443
|
47
|
+
|
48
|
+
# The default set of gRPC interceptors.
|
49
|
+
GRPC_INTERCEPTORS = []
|
50
|
+
|
51
|
+
DEFAULT_TIMEOUT = 30
|
52
|
+
|
53
|
+
# The scopes needed to make gRPC calls to all of the methods defined in
|
54
|
+
# this service.
|
55
|
+
ALL_SCOPES = [
|
56
|
+
].freeze
|
57
|
+
|
58
|
+
|
59
|
+
TOPIC_VIEW_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
60
|
+
"customers/{customer}/topicViews/{topic_view}"
|
61
|
+
)
|
62
|
+
|
63
|
+
private_constant :TOPIC_VIEW_PATH_TEMPLATE
|
64
|
+
|
65
|
+
# Returns a fully-qualified topic_view resource name string.
|
66
|
+
# @param customer [String]
|
67
|
+
# @param topic_view [String]
|
68
|
+
# @return [String]
|
69
|
+
def self.topic_view_path customer, topic_view
|
70
|
+
TOPIC_VIEW_PATH_TEMPLATE.render(
|
71
|
+
:"customer" => customer,
|
72
|
+
:"topic_view" => topic_view
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
77
|
+
# Provides the means for authenticating requests made by the client. This parameter can
|
78
|
+
# be many types.
|
79
|
+
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
80
|
+
# authenticating requests made by this client.
|
81
|
+
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
82
|
+
# credentials for this client.
|
83
|
+
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
84
|
+
# credentials for this client.
|
85
|
+
# A `GRPC::Core::Channel` will be used to make calls through.
|
86
|
+
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
87
|
+
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
88
|
+
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
89
|
+
# metadata for requests, generally, to give OAuth credentials.
|
90
|
+
# @param scopes [Array<String>]
|
91
|
+
# The OAuth scopes for this service. This parameter is ignored if
|
92
|
+
# an updater_proc is supplied.
|
93
|
+
# @param client_config [Hash]
|
94
|
+
# A Hash for call options for each method. See
|
95
|
+
# Google::Gax#construct_settings for the structure of
|
96
|
+
# this data. Falls back to the default config if not specified
|
97
|
+
# or the specified config is missing data points.
|
98
|
+
# @param timeout [Numeric]
|
99
|
+
# The default timeout, in seconds, for calls made through this client.
|
100
|
+
# @param metadata [Hash]
|
101
|
+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
102
|
+
# @param exception_transformer [Proc]
|
103
|
+
# An optional proc that intercepts any exceptions raised during an API call to inject
|
104
|
+
# custom error handling.
|
105
|
+
def initialize \
|
106
|
+
credentials: nil,
|
107
|
+
scopes: ALL_SCOPES,
|
108
|
+
client_config: {},
|
109
|
+
timeout: DEFAULT_TIMEOUT,
|
110
|
+
metadata: nil,
|
111
|
+
exception_transformer: nil,
|
112
|
+
lib_name: nil,
|
113
|
+
lib_version: ""
|
114
|
+
# These require statements are intentionally placed here to initialize
|
115
|
+
# the gRPC module only when it's required.
|
116
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
117
|
+
require "google/gax/grpc"
|
118
|
+
require "google/ads/google_ads/v0/services/topic_view_service_services_pb"
|
119
|
+
|
120
|
+
credentials ||= Google::Ads::GoogleAds::V0::Services::Credentials.default
|
121
|
+
|
122
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
123
|
+
updater_proc = Google::Ads::GoogleAds::V0::Services::Credentials.new(credentials).updater_proc
|
124
|
+
end
|
125
|
+
if credentials.is_a?(GRPC::Core::Channel)
|
126
|
+
channel = credentials
|
127
|
+
end
|
128
|
+
if credentials.is_a?(GRPC::Core::ChannelCredentials)
|
129
|
+
chan_creds = credentials
|
130
|
+
end
|
131
|
+
if credentials.is_a?(Proc)
|
132
|
+
updater_proc = credentials
|
133
|
+
end
|
134
|
+
if credentials.is_a?(Google::Auth::Credentials)
|
135
|
+
updater_proc = credentials.updater_proc
|
136
|
+
end
|
137
|
+
|
138
|
+
package_version = Gem.loaded_specs['google-ads-googleads'].version.version
|
139
|
+
|
140
|
+
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
141
|
+
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
142
|
+
google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
|
143
|
+
google_api_client << " grpc/#{GRPC::VERSION}"
|
144
|
+
google_api_client.freeze
|
145
|
+
|
146
|
+
headers = { :"x-goog-api-client" => google_api_client }
|
147
|
+
headers.merge!(metadata) unless metadata.nil?
|
148
|
+
client_config_file = Pathname.new(__dir__).join(
|
149
|
+
"topic_view_service_client_config.json"
|
150
|
+
)
|
151
|
+
defaults = client_config_file.open do |f|
|
152
|
+
Google::Gax.construct_settings(
|
153
|
+
"google.ads.googleads.v0.services.TopicViewService",
|
154
|
+
JSON.parse(f.read),
|
155
|
+
client_config,
|
156
|
+
Google::Gax::Grpc::STATUS_CODE_NAMES,
|
157
|
+
timeout,
|
158
|
+
errors: Google::Gax::Grpc::API_ERRORS,
|
159
|
+
metadata: headers
|
160
|
+
)
|
161
|
+
end
|
162
|
+
|
163
|
+
# Allow overriding the service path/port in subclasses.
|
164
|
+
service_path = self.class::SERVICE_ADDRESS
|
165
|
+
port = self.class::DEFAULT_SERVICE_PORT
|
166
|
+
interceptors = self.class::GRPC_INTERCEPTORS
|
167
|
+
@topic_view_service_stub = Google::Gax::Grpc.create_stub(
|
168
|
+
service_path,
|
169
|
+
port,
|
170
|
+
chan_creds: chan_creds,
|
171
|
+
channel: channel,
|
172
|
+
updater_proc: updater_proc,
|
173
|
+
scopes: scopes,
|
174
|
+
interceptors: interceptors,
|
175
|
+
&Google::Ads::GoogleAds::V0::Services::TopicViewService::Stub.method(:new)
|
176
|
+
)
|
177
|
+
|
178
|
+
@get_topic_view = Google::Gax.create_api_call(
|
179
|
+
@topic_view_service_stub.method(:get_topic_view),
|
180
|
+
defaults["get_topic_view"],
|
181
|
+
exception_transformer: exception_transformer
|
182
|
+
)
|
183
|
+
end
|
184
|
+
|
185
|
+
# Service calls
|
186
|
+
|
187
|
+
# Returns the requested topic view in full detail.
|
188
|
+
#
|
189
|
+
# @param resource_name [String]
|
190
|
+
# The resource name of the topic view to fetch.
|
191
|
+
# @param options [Google::Gax::CallOptions]
|
192
|
+
# Overrides the default settings for this call, e.g, timeout,
|
193
|
+
# retries, etc.
|
194
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
195
|
+
# @yieldparam result [Google::Ads::GoogleAds::V0::Resources::TopicView]
|
196
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
197
|
+
# @return [Google::Ads::GoogleAds::V0::Resources::TopicView]
|
198
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
199
|
+
# @example
|
200
|
+
# require "google/ads/google_ads"
|
201
|
+
#
|
202
|
+
# topic_view_service_client = Google::Ads::GoogleAds::TopicView.new(version: :v0)
|
203
|
+
# formatted_resource_name = Google::Ads::GoogleAds::V0::Services::TopicViewServiceClient.topic_view_path("[CUSTOMER]", "[TOPIC_VIEW]")
|
204
|
+
# response = topic_view_service_client.get_topic_view(formatted_resource_name)
|
205
|
+
|
206
|
+
def get_topic_view \
|
207
|
+
resource_name,
|
208
|
+
options: nil,
|
209
|
+
&block
|
210
|
+
req = {
|
211
|
+
resource_name: resource_name
|
212
|
+
}.delete_if { |_, v| v.nil? }
|
213
|
+
req = Google::Gax::to_proto(req, Google::Ads::GoogleAds::V0::Services::GetTopicViewRequest)
|
214
|
+
@get_topic_view.call(req, options, &block)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
221
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
{
|
2
|
+
"interfaces": {
|
3
|
+
"google.ads.googleads.v0.services.TopicViewService": {
|
4
|
+
"retry_codes": {
|
5
|
+
"idempotent": [
|
6
|
+
"DEADLINE_EXCEEDED",
|
7
|
+
"UNAVAILABLE"
|
8
|
+
],
|
9
|
+
"non_idempotent": []
|
10
|
+
},
|
11
|
+
"retry_params": {
|
12
|
+
"default": {
|
13
|
+
"initial_retry_delay_millis": 100,
|
14
|
+
"retry_delay_multiplier": 1.3,
|
15
|
+
"max_retry_delay_millis": 60000,
|
16
|
+
"initial_rpc_timeout_millis": 20000,
|
17
|
+
"rpc_timeout_multiplier": 1.0,
|
18
|
+
"max_rpc_timeout_millis": 20000,
|
19
|
+
"total_timeout_millis": 600000
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"methods": {
|
23
|
+
"GetTopicView": {
|
24
|
+
"timeout_millis": 60000,
|
25
|
+
"retry_codes_name": "idempotent",
|
26
|
+
"retry_params_name": "default"
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/ads/google_ads/v0/services/topic_view_service.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/ads/google_ads/v0/resources/topic_view_pb'
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_message "google.ads.googleads.v0.services.GetTopicViewRequest" do
|
10
|
+
optional :resource_name, :string, 1
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
module Google
|
15
|
+
module Ads
|
16
|
+
module GoogleAds
|
17
|
+
module V0
|
18
|
+
module Services
|
19
|
+
GetTopicViewRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v0.services.GetTopicViewRequest").msgclass
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/ads/google_ads/v0/services/topic_view_service.proto for package 'google.ads.googleads.v0.services'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2018 Google LLC.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
#
|
19
|
+
|
20
|
+
require 'grpc'
|
21
|
+
require 'google/ads/google_ads/v0/services/topic_view_service_pb'
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Ads
|
25
|
+
module GoogleAds
|
26
|
+
module V0
|
27
|
+
module Services
|
28
|
+
module TopicViewService
|
29
|
+
# Service to manage topic views.
|
30
|
+
class Service
|
31
|
+
|
32
|
+
include GRPC::GenericService
|
33
|
+
|
34
|
+
self.marshal_class_method = :encode
|
35
|
+
self.unmarshal_class_method = :decode
|
36
|
+
self.service_name = 'google.ads.googleads.v0.services.TopicViewService'
|
37
|
+
|
38
|
+
# Returns the requested topic view in full detail.
|
39
|
+
rpc :GetTopicView, GetTopicViewRequest, Google::Ads::GoogleAds::V0::Resources::TopicView
|
40
|
+
end
|
41
|
+
|
42
|
+
Stub = Service.rpc_stub_class
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|