google-ads-ad_manager-v1 0.a → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (208) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/ads/ad_manager/v1/ad_unit_service/credentials.rb +44 -0
  6. data/lib/google/ads/ad_manager/v1/ad_unit_service/paths.rb +64 -0
  7. data/lib/google/ads/ad_manager/v1/ad_unit_service/rest/client.rb +644 -0
  8. data/lib/google/ads/ad_manager/v1/ad_unit_service/rest/service_stub.rb +264 -0
  9. data/lib/google/ads/ad_manager/v1/ad_unit_service/rest.rb +52 -0
  10. data/lib/google/ads/ad_manager/v1/ad_unit_service.rb +48 -0
  11. data/lib/google/ads/ad_manager/v1/company_service/credentials.rb +44 -0
  12. data/lib/google/ads/ad_manager/v1/company_service/paths.rb +64 -0
  13. data/lib/google/ads/ad_manager/v1/company_service/rest/client.rb +531 -0
  14. data/lib/google/ads/ad_manager/v1/company_service/rest/service_stub.rb +203 -0
  15. data/lib/google/ads/ad_manager/v1/company_service/rest.rb +52 -0
  16. data/lib/google/ads/ad_manager/v1/company_service.rb +48 -0
  17. data/lib/google/ads/ad_manager/v1/custom_field_service/credentials.rb +44 -0
  18. data/lib/google/ads/ad_manager/v1/custom_field_service/paths.rb +64 -0
  19. data/lib/google/ads/ad_manager/v1/custom_field_service/rest/client.rb +531 -0
  20. data/lib/google/ads/ad_manager/v1/custom_field_service/rest/service_stub.rb +203 -0
  21. data/lib/google/ads/ad_manager/v1/custom_field_service/rest.rb +52 -0
  22. data/lib/google/ads/ad_manager/v1/custom_field_service.rb +48 -0
  23. data/lib/google/ads/ad_manager/v1/custom_targeting_key_service/credentials.rb +44 -0
  24. data/lib/google/ads/ad_manager/v1/custom_targeting_key_service/paths.rb +64 -0
  25. data/lib/google/ads/ad_manager/v1/custom_targeting_key_service/rest/client.rb +532 -0
  26. data/lib/google/ads/ad_manager/v1/custom_targeting_key_service/rest/service_stub.rb +203 -0
  27. data/lib/google/ads/ad_manager/v1/custom_targeting_key_service/rest.rb +52 -0
  28. data/lib/google/ads/ad_manager/v1/custom_targeting_key_service.rb +48 -0
  29. data/lib/google/ads/ad_manager/v1/custom_targeting_value_service/credentials.rb +44 -0
  30. data/lib/google/ads/ad_manager/v1/custom_targeting_value_service/paths.rb +69 -0
  31. data/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/client.rb +535 -0
  32. data/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/service_stub.rb +203 -0
  33. data/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest.rb +52 -0
  34. data/lib/google/ads/ad_manager/v1/custom_targeting_value_service.rb +48 -0
  35. data/lib/google/ads/ad_manager/v1/entity_signals_mapping_service/credentials.rb +44 -0
  36. data/lib/google/ads/ad_manager/v1/entity_signals_mapping_service/paths.rb +64 -0
  37. data/lib/google/ads/ad_manager/v1/entity_signals_mapping_service/rest/client.rb +894 -0
  38. data/lib/google/ads/ad_manager/v1/entity_signals_mapping_service/rest/service_stub.rb +451 -0
  39. data/lib/google/ads/ad_manager/v1/entity_signals_mapping_service/rest.rb +52 -0
  40. data/lib/google/ads/ad_manager/v1/entity_signals_mapping_service.rb +48 -0
  41. data/lib/google/ads/ad_manager/v1/network_service/credentials.rb +44 -0
  42. data/lib/google/ads/ad_manager/v1/network_service/paths.rb +47 -0
  43. data/lib/google/ads/ad_manager/v1/network_service/rest/client.rb +495 -0
  44. data/lib/google/ads/ad_manager/v1/network_service/rest/service_stub.rb +201 -0
  45. data/lib/google/ads/ad_manager/v1/network_service/rest.rb +52 -0
  46. data/lib/google/ads/ad_manager/v1/network_service.rb +48 -0
  47. data/lib/google/ads/ad_manager/v1/order_service/credentials.rb +44 -0
  48. data/lib/google/ads/ad_manager/v1/order_service/paths.rb +64 -0
  49. data/lib/google/ads/ad_manager/v1/order_service/rest/client.rb +541 -0
  50. data/lib/google/ads/ad_manager/v1/order_service/rest/service_stub.rb +203 -0
  51. data/lib/google/ads/ad_manager/v1/order_service/rest.rb +52 -0
  52. data/lib/google/ads/ad_manager/v1/order_service.rb +48 -0
  53. data/lib/google/ads/ad_manager/v1/placement_service/credentials.rb +44 -0
  54. data/lib/google/ads/ad_manager/v1/placement_service/paths.rb +64 -0
  55. data/lib/google/ads/ad_manager/v1/placement_service/rest/client.rb +531 -0
  56. data/lib/google/ads/ad_manager/v1/placement_service/rest/service_stub.rb +203 -0
  57. data/lib/google/ads/ad_manager/v1/placement_service/rest.rb +52 -0
  58. data/lib/google/ads/ad_manager/v1/placement_service.rb +48 -0
  59. data/lib/google/ads/ad_manager/v1/report_service/credentials.rb +44 -0
  60. data/lib/google/ads/ad_manager/v1/report_service/paths.rb +64 -0
  61. data/lib/google/ads/ad_manager/v1/report_service/rest/client.rb +923 -0
  62. data/lib/google/ads/ad_manager/v1/report_service/rest/operations.rb +914 -0
  63. data/lib/google/ads/ad_manager/v1/report_service/rest/service_stub.rb +450 -0
  64. data/lib/google/ads/ad_manager/v1/report_service/rest.rb +53 -0
  65. data/lib/google/ads/ad_manager/v1/report_service.rb +48 -0
  66. data/lib/google/ads/ad_manager/v1/rest.rb +49 -0
  67. data/lib/google/ads/ad_manager/v1/role_service/credentials.rb +44 -0
  68. data/lib/google/ads/ad_manager/v1/role_service/paths.rb +64 -0
  69. data/lib/google/ads/ad_manager/v1/role_service/rest/client.rb +530 -0
  70. data/lib/google/ads/ad_manager/v1/role_service/rest/service_stub.rb +203 -0
  71. data/lib/google/ads/ad_manager/v1/role_service/rest.rb +52 -0
  72. data/lib/google/ads/ad_manager/v1/role_service.rb +48 -0
  73. data/lib/google/ads/ad_manager/v1/taxonomy_category_service/credentials.rb +44 -0
  74. data/lib/google/ads/ad_manager/v1/taxonomy_category_service/paths.rb +64 -0
  75. data/lib/google/ads/ad_manager/v1/taxonomy_category_service/rest/client.rb +531 -0
  76. data/lib/google/ads/ad_manager/v1/taxonomy_category_service/rest/service_stub.rb +203 -0
  77. data/lib/google/ads/ad_manager/v1/taxonomy_category_service/rest.rb +52 -0
  78. data/lib/google/ads/ad_manager/v1/taxonomy_category_service.rb +48 -0
  79. data/lib/google/ads/ad_manager/v1/user_service/credentials.rb +44 -0
  80. data/lib/google/ads/ad_manager/v1/user_service/paths.rb +50 -0
  81. data/lib/google/ads/ad_manager/v1/user_service/rest/client.rb +421 -0
  82. data/lib/google/ads/ad_manager/v1/user_service/rest/service_stub.rb +142 -0
  83. data/lib/google/ads/ad_manager/v1/user_service/rest.rb +52 -0
  84. data/lib/google/ads/ad_manager/v1/user_service.rb +48 -0
  85. data/lib/google/ads/ad_manager/v1/version.rb +7 -2
  86. data/lib/google/ads/ad_manager/v1.rb +52 -0
  87. data/lib/google/ads/admanager/v1/ad_unit_enums_pb.rb +47 -0
  88. data/lib/google/ads/admanager/v1/ad_unit_messages_pb.rb +60 -0
  89. data/lib/google/ads/admanager/v1/ad_unit_service_pb.rb +53 -0
  90. data/lib/google/ads/admanager/v1/ad_unit_service_services_pb.rb +49 -0
  91. data/lib/google/ads/admanager/v1/admanager_error_pb.rb +45 -0
  92. data/lib/google/ads/admanager/v1/applied_label_pb.rb +45 -0
  93. data/lib/google/ads/admanager/v1/company_credit_status_enum_pb.rb +43 -0
  94. data/lib/google/ads/admanager/v1/company_messages_pb.rb +51 -0
  95. data/lib/google/ads/admanager/v1/company_service_pb.rb +51 -0
  96. data/lib/google/ads/admanager/v1/company_service_services_pb.rb +47 -0
  97. data/lib/google/ads/admanager/v1/company_type_enum_pb.rb +43 -0
  98. data/lib/google/ads/admanager/v1/contact_messages_pb.rb +45 -0
  99. data/lib/google/ads/admanager/v1/custom_field_enums_pb.rb +49 -0
  100. data/lib/google/ads/admanager/v1/custom_field_messages_pb.rb +47 -0
  101. data/lib/google/ads/admanager/v1/custom_field_service_pb.rb +51 -0
  102. data/lib/google/ads/admanager/v1/custom_field_service_services_pb.rb +47 -0
  103. data/lib/google/ads/admanager/v1/custom_field_value_pb.rb +46 -0
  104. data/lib/google/ads/admanager/v1/custom_targeting_key_enums_pb.rb +47 -0
  105. data/lib/google/ads/admanager/v1/custom_targeting_key_messages_pb.rb +46 -0
  106. data/lib/google/ads/admanager/v1/custom_targeting_key_service_pb.rb +51 -0
  107. data/lib/google/ads/admanager/v1/custom_targeting_key_service_services_pb.rb +47 -0
  108. data/lib/google/ads/admanager/v1/custom_targeting_value_enums_pb.rb +45 -0
  109. data/lib/google/ads/admanager/v1/custom_targeting_value_messages_pb.rb +46 -0
  110. data/lib/google/ads/admanager/v1/custom_targeting_value_service_pb.rb +51 -0
  111. data/lib/google/ads/admanager/v1/custom_targeting_value_service_services_pb.rb +47 -0
  112. data/lib/google/ads/admanager/v1/entity_signals_mapping_messages_pb.rb +45 -0
  113. data/lib/google/ads/admanager/v1/entity_signals_mapping_service_pb.rb +59 -0
  114. data/lib/google/ads/admanager/v1/entity_signals_mapping_service_services_pb.rb +55 -0
  115. data/lib/google/ads/admanager/v1/environment_type_enum_pb.rb +43 -0
  116. data/lib/google/ads/admanager/v1/frequency_cap_pb.rb +44 -0
  117. data/lib/google/ads/admanager/v1/label_messages_pb.rb +45 -0
  118. data/lib/google/ads/admanager/v1/network_messages_pb.rb +45 -0
  119. data/lib/google/ads/admanager/v1/network_service_pb.rb +51 -0
  120. data/lib/google/ads/admanager/v1/network_service_services_pb.rb +47 -0
  121. data/lib/google/ads/admanager/v1/order_enums_pb.rb +43 -0
  122. data/lib/google/ads/admanager/v1/order_messages_pb.rb +52 -0
  123. data/lib/google/ads/admanager/v1/order_service_pb.rb +51 -0
  124. data/lib/google/ads/admanager/v1/order_service_services_pb.rb +52 -0
  125. data/lib/google/ads/admanager/v1/placement_enums_pb.rb +43 -0
  126. data/lib/google/ads/admanager/v1/placement_messages_pb.rb +48 -0
  127. data/lib/google/ads/admanager/v1/placement_service_pb.rb +51 -0
  128. data/lib/google/ads/admanager/v1/placement_service_services_pb.rb +47 -0
  129. data/lib/google/ads/admanager/v1/report_service_pb.rb +97 -0
  130. data/lib/google/ads/admanager/v1/report_service_services_pb.rb +65 -0
  131. data/lib/google/ads/admanager/v1/role_enums_pb.rb +43 -0
  132. data/lib/google/ads/admanager/v1/role_messages_pb.rb +46 -0
  133. data/lib/google/ads/admanager/v1/role_service_pb.rb +51 -0
  134. data/lib/google/ads/admanager/v1/role_service_services_pb.rb +47 -0
  135. data/lib/google/ads/admanager/v1/size_pb.rb +45 -0
  136. data/lib/google/ads/admanager/v1/size_type_enum_pb.rb +43 -0
  137. data/lib/google/ads/admanager/v1/taxonomy_category_messages_pb.rb +46 -0
  138. data/lib/google/ads/admanager/v1/taxonomy_category_service_pb.rb +51 -0
  139. data/lib/google/ads/admanager/v1/taxonomy_category_service_services_pb.rb +47 -0
  140. data/lib/google/ads/admanager/v1/taxonomy_type_enum_pb.rb +43 -0
  141. data/lib/google/ads/admanager/v1/team_messages_pb.rb +45 -0
  142. data/lib/google/ads/admanager/v1/time_unit_enum_pb.rb +43 -0
  143. data/lib/google/ads/admanager/v1/user_messages_pb.rb +45 -0
  144. data/lib/google/ads/admanager/v1/user_service_pb.rb +48 -0
  145. data/lib/google/ads/admanager/v1/user_service_services_pb.rb +48 -0
  146. data/lib/google-ads-ad_manager-v1.rb +21 -0
  147. data/proto_docs/README.md +4 -0
  148. data/proto_docs/google/ads/admanager/v1/ad_unit_enums.rb +91 -0
  149. data/proto_docs/google/ads/admanager/v1/ad_unit_messages.rb +188 -0
  150. data/proto_docs/google/ads/admanager/v1/ad_unit_service.rb +160 -0
  151. data/proto_docs/google/ads/admanager/v1/admanager_error.rb +54 -0
  152. data/proto_docs/google/ads/admanager/v1/applied_label.rb +39 -0
  153. data/proto_docs/google/ads/admanager/v1/company_credit_status_enum.rb +101 -0
  154. data/proto_docs/google/ads/admanager/v1/company_messages.rb +101 -0
  155. data/proto_docs/google/ads/admanager/v1/company_service.rb +99 -0
  156. data/proto_docs/google/ads/admanager/v1/company_type_enum.rb +55 -0
  157. data/proto_docs/google/ads/admanager/v1/contact_messages.rb +43 -0
  158. data/proto_docs/google/ads/admanager/v1/custom_field_enums.rb +123 -0
  159. data/proto_docs/google/ads/admanager/v1/custom_field_messages.rb +78 -0
  160. data/proto_docs/google/ads/admanager/v1/custom_field_service.rb +99 -0
  161. data/proto_docs/google/ads/admanager/v1/custom_field_value.rb +58 -0
  162. data/proto_docs/google/ads/admanager/v1/custom_targeting_key_enums.rb +86 -0
  163. data/proto_docs/google/ads/admanager/v1/custom_targeting_key_messages.rb +59 -0
  164. data/proto_docs/google/ads/admanager/v1/custom_targeting_key_service.rb +100 -0
  165. data/proto_docs/google/ads/admanager/v1/custom_targeting_value_enums.rb +97 -0
  166. data/proto_docs/google/ads/admanager/v1/custom_targeting_value_messages.rb +54 -0
  167. data/proto_docs/google/ads/admanager/v1/custom_targeting_value_service.rb +103 -0
  168. data/proto_docs/google/ads/admanager/v1/entity_signals_mapping_messages.rb +53 -0
  169. data/proto_docs/google/ads/admanager/v1/entity_signals_mapping_service.rb +180 -0
  170. data/proto_docs/google/ads/admanager/v1/environment_type_enum.rb +45 -0
  171. data/proto_docs/google/ads/admanager/v1/frequency_cap.rb +41 -0
  172. data/proto_docs/google/ads/admanager/v1/label_messages.rb +36 -0
  173. data/proto_docs/google/ads/admanager/v1/network_messages.rb +67 -0
  174. data/proto_docs/google/ads/admanager/v1/network_service.rb +51 -0
  175. data/proto_docs/google/ads/admanager/v1/order_enums.rb +63 -0
  176. data/proto_docs/google/ads/admanager/v1/order_messages.rb +149 -0
  177. data/proto_docs/google/ads/admanager/v1/order_service.rb +99 -0
  178. data/proto_docs/google/ads/admanager/v1/placement_enums.rb +48 -0
  179. data/proto_docs/google/ads/admanager/v1/placement_messages.rb +62 -0
  180. data/proto_docs/google/ads/admanager/v1/placement_service.rb +99 -0
  181. data/proto_docs/google/ads/admanager/v1/report_service.rb +3476 -0
  182. data/proto_docs/google/ads/admanager/v1/role_enums.rb +45 -0
  183. data/proto_docs/google/ads/admanager/v1/role_messages.rb +51 -0
  184. data/proto_docs/google/ads/admanager/v1/role_service.rb +97 -0
  185. data/proto_docs/google/ads/admanager/v1/size.rb +48 -0
  186. data/proto_docs/google/ads/admanager/v1/size_type_enum.rb +66 -0
  187. data/proto_docs/google/ads/admanager/v1/taxonomy_category_messages.rb +59 -0
  188. data/proto_docs/google/ads/admanager/v1/taxonomy_category_service.rb +99 -0
  189. data/proto_docs/google/ads/admanager/v1/taxonomy_type_enum.rb +55 -0
  190. data/proto_docs/google/ads/admanager/v1/team_messages.rb +40 -0
  191. data/proto_docs/google/ads/admanager/v1/time_unit_enum.rb +63 -0
  192. data/proto_docs/google/ads/admanager/v1/user_messages.rb +69 -0
  193. data/proto_docs/google/ads/admanager/v1/user_service.rb +36 -0
  194. data/proto_docs/google/api/client.rb +459 -0
  195. data/proto_docs/google/api/field_behavior.rb +85 -0
  196. data/proto_docs/google/api/launch_stage.rb +71 -0
  197. data/proto_docs/google/api/resource.rb +227 -0
  198. data/proto_docs/google/longrunning/operations.rb +169 -0
  199. data/proto_docs/google/protobuf/any.rb +145 -0
  200. data/proto_docs/google/protobuf/duration.rb +98 -0
  201. data/proto_docs/google/protobuf/empty.rb +34 -0
  202. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  203. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  204. data/proto_docs/google/rpc/status.rb +48 -0
  205. data/proto_docs/google/type/date.rb +53 -0
  206. data/proto_docs/google/type/dayofweek.rb +49 -0
  207. data/proto_docs/google/type/timeofday.rb +45 -0
  208. metadata +248 -11
@@ -0,0 +1,894 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/entity_signals_mapping_service_pb"
21
+ require "google/ads/ad_manager/v1/entity_signals_mapping_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Ads
25
+ module AdManager
26
+ module V1
27
+ module EntitySignalsMappingService
28
+ module Rest
29
+ ##
30
+ # REST client for the EntitySignalsMappingService service.
31
+ #
32
+ # Provides methods for handling `EntitySignalsMapping` 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 :entity_signals_mapping_service_stub
45
+
46
+ ##
47
+ # Configure the EntitySignalsMappingService Client class.
48
+ #
49
+ # See {::Google::Ads::AdManager::V1::EntitySignalsMappingService::Rest::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all EntitySignalsMappingService clients
55
+ # ::Google::Ads::AdManager::V1::EntitySignalsMappingService::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 EntitySignalsMappingService 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::EntitySignalsMappingService::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
+ @entity_signals_mapping_service_stub.universe_domain
108
+ end
109
+
110
+ ##
111
+ # Create a new EntitySignalsMappingService REST client object.
112
+ #
113
+ # @example
114
+ #
115
+ # # Create a client using the default configuration
116
+ # client = ::Google::Ads::AdManager::V1::EntitySignalsMappingService::Rest::Client.new
117
+ #
118
+ # # Create a client using a custom configuration
119
+ # client = ::Google::Ads::AdManager::V1::EntitySignalsMappingService::Rest::Client.new do |config|
120
+ # config.timeout = 10.0
121
+ # end
122
+ #
123
+ # @yield [config] Configure the EntitySignalsMappingService 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
+ @entity_signals_mapping_service_stub = ::Google::Ads::AdManager::V1::EntitySignalsMappingService::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
+ @entity_signals_mapping_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
+ @entity_signals_mapping_service_stub.logger
175
+ end
176
+
177
+ # Service calls
178
+
179
+ ##
180
+ # API to retrieve a `EntitySignalsMapping` object.
181
+ #
182
+ # @overload get_entity_signals_mapping(request, options = nil)
183
+ # Pass arguments to `get_entity_signals_mapping` via a request object, either of type
184
+ # {::Google::Ads::AdManager::V1::GetEntitySignalsMappingRequest} or an equivalent Hash.
185
+ #
186
+ # @param request [::Google::Ads::AdManager::V1::GetEntitySignalsMappingRequest, ::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_entity_signals_mapping(name: nil)
193
+ # Pass arguments to `get_entity_signals_mapping` 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 EntitySignalsMapping.
199
+ # Format:
200
+ # `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping_id}`
201
+ # @yield [result, operation] Access the result along with the TransportOperation object
202
+ # @yieldparam result [::Google::Ads::AdManager::V1::EntitySignalsMapping]
203
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
204
+ #
205
+ # @return [::Google::Ads::AdManager::V1::EntitySignalsMapping]
206
+ #
207
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
208
+ #
209
+ # @example Basic example
210
+ # require "google/ads/ad_manager/v1"
211
+ #
212
+ # # Create a client object. The client can be reused for multiple calls.
213
+ # client = Google::Ads::AdManager::V1::EntitySignalsMappingService::Rest::Client.new
214
+ #
215
+ # # Create a request. To set request fields, pass in keyword arguments.
216
+ # request = Google::Ads::AdManager::V1::GetEntitySignalsMappingRequest.new
217
+ #
218
+ # # Call the get_entity_signals_mapping method.
219
+ # result = client.get_entity_signals_mapping request
220
+ #
221
+ # # The returned object is of type Google::Ads::AdManager::V1::EntitySignalsMapping.
222
+ # p result
223
+ #
224
+ def get_entity_signals_mapping request, options = nil
225
+ raise ::ArgumentError, "request must be provided" if request.nil?
226
+
227
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetEntitySignalsMappingRequest
228
+
229
+ # Converts hash and nil to an options object
230
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
231
+
232
+ # Customize the options with defaults
233
+ call_metadata = @config.rpcs.get_entity_signals_mapping.metadata.to_h
234
+
235
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
236
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
237
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
238
+ gapic_version: ::Google::Ads::AdManager::V1::VERSION,
239
+ transports_version_send: [:rest]
240
+
241
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
242
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
243
+
244
+ options.apply_defaults timeout: @config.rpcs.get_entity_signals_mapping.timeout,
245
+ metadata: call_metadata,
246
+ retry_policy: @config.rpcs.get_entity_signals_mapping.retry_policy
247
+
248
+ options.apply_defaults timeout: @config.timeout,
249
+ metadata: @config.metadata,
250
+ retry_policy: @config.retry_policy
251
+
252
+ @entity_signals_mapping_service_stub.get_entity_signals_mapping request, options do |result, operation|
253
+ yield result, operation if block_given?
254
+ end
255
+ rescue ::Gapic::Rest::Error => e
256
+ raise ::Google::Cloud::Error.from_error(e)
257
+ end
258
+
259
+ ##
260
+ # API to retrieve a list of `EntitySignalsMapping` objects.
261
+ #
262
+ # @overload list_entity_signals_mappings(request, options = nil)
263
+ # Pass arguments to `list_entity_signals_mappings` via a request object, either of type
264
+ # {::Google::Ads::AdManager::V1::ListEntitySignalsMappingsRequest} or an equivalent Hash.
265
+ #
266
+ # @param request [::Google::Ads::AdManager::V1::ListEntitySignalsMappingsRequest, ::Hash]
267
+ # A request object representing the call parameters. Required. To specify no
268
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
269
+ # @param options [::Gapic::CallOptions, ::Hash]
270
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
271
+ #
272
+ # @overload list_entity_signals_mappings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil)
273
+ # Pass arguments to `list_entity_signals_mappings` via keyword arguments. Note that at
274
+ # least one keyword argument is required. To specify no parameters, or to keep all
275
+ # the default parameter values, pass an empty Hash as a request object (see above).
276
+ #
277
+ # @param parent [::String]
278
+ # Required. The parent, which owns this collection of EntitySignalsMappings.
279
+ # Format: `networks/{network_code}`
280
+ # @param page_size [::Integer]
281
+ # Optional. The maximum number of `EntitySignalsMappings` to return. The
282
+ # service may return fewer than this value. If unspecified, at most 50
283
+ # `EntitySignalsMappings` will be returned. The maximum value is 1000; values
284
+ # above 1000 will be coerced to 1000.
285
+ # @param page_token [::String]
286
+ # Optional. A page token, received from a previous
287
+ # `ListEntitySignalsMappings` call. Provide this to retrieve the subsequent
288
+ # page.
289
+ #
290
+ # When paginating, all other parameters provided to
291
+ # `ListEntitySignalsMappings` must match the call that provided the page
292
+ # token.
293
+ # @param filter [::String]
294
+ # Optional. Expression to filter the response.
295
+ # See syntax details at
296
+ # https://developers.google.com/ad-manager/api/beta/filters
297
+ # @param order_by [::String]
298
+ # Optional. Expression to specify sorting order.
299
+ # See syntax details at
300
+ # https://developers.google.com/ad-manager/api/beta/filters#order
301
+ # @param skip [::Integer]
302
+ # Optional. Number of individual resources to skip while paginating.
303
+ # @yield [result, operation] Access the result along with the TransportOperation object
304
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::EntitySignalsMapping>]
305
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
306
+ #
307
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::EntitySignalsMapping>]
308
+ #
309
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
310
+ #
311
+ # @example Basic example
312
+ # require "google/ads/ad_manager/v1"
313
+ #
314
+ # # Create a client object. The client can be reused for multiple calls.
315
+ # client = Google::Ads::AdManager::V1::EntitySignalsMappingService::Rest::Client.new
316
+ #
317
+ # # Create a request. To set request fields, pass in keyword arguments.
318
+ # request = Google::Ads::AdManager::V1::ListEntitySignalsMappingsRequest.new
319
+ #
320
+ # # Call the list_entity_signals_mappings method.
321
+ # result = client.list_entity_signals_mappings request
322
+ #
323
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
324
+ # # over elements, and API calls will be issued to fetch pages as needed.
325
+ # result.each do |item|
326
+ # # Each element is of type ::Google::Ads::AdManager::V1::EntitySignalsMapping.
327
+ # p item
328
+ # end
329
+ #
330
+ def list_entity_signals_mappings request, options = nil
331
+ raise ::ArgumentError, "request must be provided" if request.nil?
332
+
333
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListEntitySignalsMappingsRequest
334
+
335
+ # Converts hash and nil to an options object
336
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
337
+
338
+ # Customize the options with defaults
339
+ call_metadata = @config.rpcs.list_entity_signals_mappings.metadata.to_h
340
+
341
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
342
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
343
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
344
+ gapic_version: ::Google::Ads::AdManager::V1::VERSION,
345
+ transports_version_send: [:rest]
346
+
347
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
348
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
349
+
350
+ options.apply_defaults timeout: @config.rpcs.list_entity_signals_mappings.timeout,
351
+ metadata: call_metadata,
352
+ retry_policy: @config.rpcs.list_entity_signals_mappings.retry_policy
353
+
354
+ options.apply_defaults timeout: @config.timeout,
355
+ metadata: @config.metadata,
356
+ retry_policy: @config.retry_policy
357
+
358
+ @entity_signals_mapping_service_stub.list_entity_signals_mappings request, options do |result, operation|
359
+ result = ::Gapic::Rest::PagedEnumerable.new @entity_signals_mapping_service_stub, :list_entity_signals_mappings, "entity_signals_mappings", request, result, options
360
+ yield result, operation if block_given?
361
+ throw :response, result
362
+ end
363
+ rescue ::Gapic::Rest::Error => e
364
+ raise ::Google::Cloud::Error.from_error(e)
365
+ end
366
+
367
+ ##
368
+ # API to create an `EntitySignalsMapping` object.
369
+ #
370
+ # @overload create_entity_signals_mapping(request, options = nil)
371
+ # Pass arguments to `create_entity_signals_mapping` via a request object, either of type
372
+ # {::Google::Ads::AdManager::V1::CreateEntitySignalsMappingRequest} or an equivalent Hash.
373
+ #
374
+ # @param request [::Google::Ads::AdManager::V1::CreateEntitySignalsMappingRequest, ::Hash]
375
+ # A request object representing the call parameters. Required. To specify no
376
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
377
+ # @param options [::Gapic::CallOptions, ::Hash]
378
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
379
+ #
380
+ # @overload create_entity_signals_mapping(parent: nil, entity_signals_mapping: nil)
381
+ # Pass arguments to `create_entity_signals_mapping` via keyword arguments. Note that at
382
+ # least one keyword argument is required. To specify no parameters, or to keep all
383
+ # the default parameter values, pass an empty Hash as a request object (see above).
384
+ #
385
+ # @param parent [::String]
386
+ # Required. The parent resource where this EntitySignalsMapping will be
387
+ # created. Format: `networks/{network_code}`
388
+ # @param entity_signals_mapping [::Google::Ads::AdManager::V1::EntitySignalsMapping, ::Hash]
389
+ # Required. The EntitySignalsMapping object to create.
390
+ # @yield [result, operation] Access the result along with the TransportOperation object
391
+ # @yieldparam result [::Google::Ads::AdManager::V1::EntitySignalsMapping]
392
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
393
+ #
394
+ # @return [::Google::Ads::AdManager::V1::EntitySignalsMapping]
395
+ #
396
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
397
+ #
398
+ # @example Basic example
399
+ # require "google/ads/ad_manager/v1"
400
+ #
401
+ # # Create a client object. The client can be reused for multiple calls.
402
+ # client = Google::Ads::AdManager::V1::EntitySignalsMappingService::Rest::Client.new
403
+ #
404
+ # # Create a request. To set request fields, pass in keyword arguments.
405
+ # request = Google::Ads::AdManager::V1::CreateEntitySignalsMappingRequest.new
406
+ #
407
+ # # Call the create_entity_signals_mapping method.
408
+ # result = client.create_entity_signals_mapping request
409
+ #
410
+ # # The returned object is of type Google::Ads::AdManager::V1::EntitySignalsMapping.
411
+ # p result
412
+ #
413
+ def create_entity_signals_mapping request, options = nil
414
+ raise ::ArgumentError, "request must be provided" if request.nil?
415
+
416
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::CreateEntitySignalsMappingRequest
417
+
418
+ # Converts hash and nil to an options object
419
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
420
+
421
+ # Customize the options with defaults
422
+ call_metadata = @config.rpcs.create_entity_signals_mapping.metadata.to_h
423
+
424
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
425
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
426
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
427
+ gapic_version: ::Google::Ads::AdManager::V1::VERSION,
428
+ transports_version_send: [:rest]
429
+
430
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
431
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
432
+
433
+ options.apply_defaults timeout: @config.rpcs.create_entity_signals_mapping.timeout,
434
+ metadata: call_metadata,
435
+ retry_policy: @config.rpcs.create_entity_signals_mapping.retry_policy
436
+
437
+ options.apply_defaults timeout: @config.timeout,
438
+ metadata: @config.metadata,
439
+ retry_policy: @config.retry_policy
440
+
441
+ @entity_signals_mapping_service_stub.create_entity_signals_mapping request, options do |result, operation|
442
+ yield result, operation if block_given?
443
+ end
444
+ rescue ::Gapic::Rest::Error => e
445
+ raise ::Google::Cloud::Error.from_error(e)
446
+ end
447
+
448
+ ##
449
+ # API to update an `EntitySignalsMapping` object.
450
+ #
451
+ # @overload update_entity_signals_mapping(request, options = nil)
452
+ # Pass arguments to `update_entity_signals_mapping` via a request object, either of type
453
+ # {::Google::Ads::AdManager::V1::UpdateEntitySignalsMappingRequest} or an equivalent Hash.
454
+ #
455
+ # @param request [::Google::Ads::AdManager::V1::UpdateEntitySignalsMappingRequest, ::Hash]
456
+ # A request object representing the call parameters. Required. To specify no
457
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
458
+ # @param options [::Gapic::CallOptions, ::Hash]
459
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
460
+ #
461
+ # @overload update_entity_signals_mapping(entity_signals_mapping: nil, update_mask: nil)
462
+ # Pass arguments to `update_entity_signals_mapping` via keyword arguments. Note that at
463
+ # least one keyword argument is required. To specify no parameters, or to keep all
464
+ # the default parameter values, pass an empty Hash as a request object (see above).
465
+ #
466
+ # @param entity_signals_mapping [::Google::Ads::AdManager::V1::EntitySignalsMapping, ::Hash]
467
+ # Required. The `EntitySignalsMapping` to update.
468
+ #
469
+ # The EntitySignalsMapping's name is used to identify the
470
+ # EntitySignalsMapping to update.
471
+ # Format:
472
+ # `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}`
473
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
474
+ # Required. The list of fields to update.
475
+ # @yield [result, operation] Access the result along with the TransportOperation object
476
+ # @yieldparam result [::Google::Ads::AdManager::V1::EntitySignalsMapping]
477
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
478
+ #
479
+ # @return [::Google::Ads::AdManager::V1::EntitySignalsMapping]
480
+ #
481
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
482
+ #
483
+ # @example Basic example
484
+ # require "google/ads/ad_manager/v1"
485
+ #
486
+ # # Create a client object. The client can be reused for multiple calls.
487
+ # client = Google::Ads::AdManager::V1::EntitySignalsMappingService::Rest::Client.new
488
+ #
489
+ # # Create a request. To set request fields, pass in keyword arguments.
490
+ # request = Google::Ads::AdManager::V1::UpdateEntitySignalsMappingRequest.new
491
+ #
492
+ # # Call the update_entity_signals_mapping method.
493
+ # result = client.update_entity_signals_mapping request
494
+ #
495
+ # # The returned object is of type Google::Ads::AdManager::V1::EntitySignalsMapping.
496
+ # p result
497
+ #
498
+ def update_entity_signals_mapping request, options = nil
499
+ raise ::ArgumentError, "request must be provided" if request.nil?
500
+
501
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::UpdateEntitySignalsMappingRequest
502
+
503
+ # Converts hash and nil to an options object
504
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
505
+
506
+ # Customize the options with defaults
507
+ call_metadata = @config.rpcs.update_entity_signals_mapping.metadata.to_h
508
+
509
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
510
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
511
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
512
+ gapic_version: ::Google::Ads::AdManager::V1::VERSION,
513
+ transports_version_send: [:rest]
514
+
515
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
516
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
517
+
518
+ options.apply_defaults timeout: @config.rpcs.update_entity_signals_mapping.timeout,
519
+ metadata: call_metadata,
520
+ retry_policy: @config.rpcs.update_entity_signals_mapping.retry_policy
521
+
522
+ options.apply_defaults timeout: @config.timeout,
523
+ metadata: @config.metadata,
524
+ retry_policy: @config.retry_policy
525
+
526
+ @entity_signals_mapping_service_stub.update_entity_signals_mapping request, options do |result, operation|
527
+ yield result, operation if block_given?
528
+ end
529
+ rescue ::Gapic::Rest::Error => e
530
+ raise ::Google::Cloud::Error.from_error(e)
531
+ end
532
+
533
+ ##
534
+ # API to batch create `EntitySignalsMapping` objects.
535
+ #
536
+ # @overload batch_create_entity_signals_mappings(request, options = nil)
537
+ # Pass arguments to `batch_create_entity_signals_mappings` via a request object, either of type
538
+ # {::Google::Ads::AdManager::V1::BatchCreateEntitySignalsMappingsRequest} or an equivalent Hash.
539
+ #
540
+ # @param request [::Google::Ads::AdManager::V1::BatchCreateEntitySignalsMappingsRequest, ::Hash]
541
+ # A request object representing the call parameters. Required. To specify no
542
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
543
+ # @param options [::Gapic::CallOptions, ::Hash]
544
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
545
+ #
546
+ # @overload batch_create_entity_signals_mappings(parent: nil, requests: nil)
547
+ # Pass arguments to `batch_create_entity_signals_mappings` via keyword arguments. Note that at
548
+ # least one keyword argument is required. To specify no parameters, or to keep all
549
+ # the default parameter values, pass an empty Hash as a request object (see above).
550
+ #
551
+ # @param parent [::String]
552
+ # Required. The parent resource where `EntitySignalsMappings` will be
553
+ # created. Format: `networks/{network_code}` The parent field in the
554
+ # CreateEntitySignalsMappingRequest must match this field.
555
+ # @param requests [::Array<::Google::Ads::AdManager::V1::CreateEntitySignalsMappingRequest, ::Hash>]
556
+ # Required. The `EntitySignalsMapping` objects to create.
557
+ # A maximum of 100 objects can be created in a batch.
558
+ # @yield [result, operation] Access the result along with the TransportOperation object
559
+ # @yieldparam result [::Google::Ads::AdManager::V1::BatchCreateEntitySignalsMappingsResponse]
560
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
561
+ #
562
+ # @return [::Google::Ads::AdManager::V1::BatchCreateEntitySignalsMappingsResponse]
563
+ #
564
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
565
+ #
566
+ # @example Basic example
567
+ # require "google/ads/ad_manager/v1"
568
+ #
569
+ # # Create a client object. The client can be reused for multiple calls.
570
+ # client = Google::Ads::AdManager::V1::EntitySignalsMappingService::Rest::Client.new
571
+ #
572
+ # # Create a request. To set request fields, pass in keyword arguments.
573
+ # request = Google::Ads::AdManager::V1::BatchCreateEntitySignalsMappingsRequest.new
574
+ #
575
+ # # Call the batch_create_entity_signals_mappings method.
576
+ # result = client.batch_create_entity_signals_mappings request
577
+ #
578
+ # # The returned object is of type Google::Ads::AdManager::V1::BatchCreateEntitySignalsMappingsResponse.
579
+ # p result
580
+ #
581
+ def batch_create_entity_signals_mappings request, options = nil
582
+ raise ::ArgumentError, "request must be provided" if request.nil?
583
+
584
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchCreateEntitySignalsMappingsRequest
585
+
586
+ # Converts hash and nil to an options object
587
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
588
+
589
+ # Customize the options with defaults
590
+ call_metadata = @config.rpcs.batch_create_entity_signals_mappings.metadata.to_h
591
+
592
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
593
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
594
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
595
+ gapic_version: ::Google::Ads::AdManager::V1::VERSION,
596
+ transports_version_send: [:rest]
597
+
598
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
599
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
600
+
601
+ options.apply_defaults timeout: @config.rpcs.batch_create_entity_signals_mappings.timeout,
602
+ metadata: call_metadata,
603
+ retry_policy: @config.rpcs.batch_create_entity_signals_mappings.retry_policy
604
+
605
+ options.apply_defaults timeout: @config.timeout,
606
+ metadata: @config.metadata,
607
+ retry_policy: @config.retry_policy
608
+
609
+ @entity_signals_mapping_service_stub.batch_create_entity_signals_mappings request, options do |result, operation|
610
+ yield result, operation if block_given?
611
+ end
612
+ rescue ::Gapic::Rest::Error => e
613
+ raise ::Google::Cloud::Error.from_error(e)
614
+ end
615
+
616
+ ##
617
+ # API to batch update `EntitySignalsMapping` objects.
618
+ #
619
+ # @overload batch_update_entity_signals_mappings(request, options = nil)
620
+ # Pass arguments to `batch_update_entity_signals_mappings` via a request object, either of type
621
+ # {::Google::Ads::AdManager::V1::BatchUpdateEntitySignalsMappingsRequest} or an equivalent Hash.
622
+ #
623
+ # @param request [::Google::Ads::AdManager::V1::BatchUpdateEntitySignalsMappingsRequest, ::Hash]
624
+ # A request object representing the call parameters. Required. To specify no
625
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
626
+ # @param options [::Gapic::CallOptions, ::Hash]
627
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
628
+ #
629
+ # @overload batch_update_entity_signals_mappings(parent: nil, requests: nil)
630
+ # Pass arguments to `batch_update_entity_signals_mappings` via keyword arguments. Note that at
631
+ # least one keyword argument is required. To specify no parameters, or to keep all
632
+ # the default parameter values, pass an empty Hash as a request object (see above).
633
+ #
634
+ # @param parent [::String]
635
+ # Required. The parent resource where `EntitySignalsMappings` will be
636
+ # updated. Format: `networks/{network_code}` The parent field in the
637
+ # UpdateEntitySignalsMappingRequest must match this field.
638
+ # @param requests [::Array<::Google::Ads::AdManager::V1::UpdateEntitySignalsMappingRequest, ::Hash>]
639
+ # Required. The `EntitySignalsMapping` objects to update.
640
+ # A maximum of 100 objects can be updated in a batch.
641
+ # @yield [result, operation] Access the result along with the TransportOperation object
642
+ # @yieldparam result [::Google::Ads::AdManager::V1::BatchUpdateEntitySignalsMappingsResponse]
643
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
644
+ #
645
+ # @return [::Google::Ads::AdManager::V1::BatchUpdateEntitySignalsMappingsResponse]
646
+ #
647
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
648
+ #
649
+ # @example Basic example
650
+ # require "google/ads/ad_manager/v1"
651
+ #
652
+ # # Create a client object. The client can be reused for multiple calls.
653
+ # client = Google::Ads::AdManager::V1::EntitySignalsMappingService::Rest::Client.new
654
+ #
655
+ # # Create a request. To set request fields, pass in keyword arguments.
656
+ # request = Google::Ads::AdManager::V1::BatchUpdateEntitySignalsMappingsRequest.new
657
+ #
658
+ # # Call the batch_update_entity_signals_mappings method.
659
+ # result = client.batch_update_entity_signals_mappings request
660
+ #
661
+ # # The returned object is of type Google::Ads::AdManager::V1::BatchUpdateEntitySignalsMappingsResponse.
662
+ # p result
663
+ #
664
+ def batch_update_entity_signals_mappings request, options = nil
665
+ raise ::ArgumentError, "request must be provided" if request.nil?
666
+
667
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchUpdateEntitySignalsMappingsRequest
668
+
669
+ # Converts hash and nil to an options object
670
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
671
+
672
+ # Customize the options with defaults
673
+ call_metadata = @config.rpcs.batch_update_entity_signals_mappings.metadata.to_h
674
+
675
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
676
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
677
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
678
+ gapic_version: ::Google::Ads::AdManager::V1::VERSION,
679
+ transports_version_send: [:rest]
680
+
681
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
682
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
683
+
684
+ options.apply_defaults timeout: @config.rpcs.batch_update_entity_signals_mappings.timeout,
685
+ metadata: call_metadata,
686
+ retry_policy: @config.rpcs.batch_update_entity_signals_mappings.retry_policy
687
+
688
+ options.apply_defaults timeout: @config.timeout,
689
+ metadata: @config.metadata,
690
+ retry_policy: @config.retry_policy
691
+
692
+ @entity_signals_mapping_service_stub.batch_update_entity_signals_mappings request, options do |result, operation|
693
+ yield result, operation if block_given?
694
+ end
695
+ rescue ::Gapic::Rest::Error => e
696
+ raise ::Google::Cloud::Error.from_error(e)
697
+ end
698
+
699
+ ##
700
+ # Configuration class for the EntitySignalsMappingService REST API.
701
+ #
702
+ # This class represents the configuration for EntitySignalsMappingService REST,
703
+ # providing control over timeouts, retry behavior, logging, transport
704
+ # parameters, and other low-level controls. Certain parameters can also be
705
+ # applied individually to specific RPCs. See
706
+ # {::Google::Ads::AdManager::V1::EntitySignalsMappingService::Rest::Client::Configuration::Rpcs}
707
+ # for a list of RPCs that can be configured independently.
708
+ #
709
+ # Configuration can be applied globally to all clients, or to a single client
710
+ # on construction.
711
+ #
712
+ # @example
713
+ #
714
+ # # Modify the global config, setting the timeout for
715
+ # # get_entity_signals_mapping to 20 seconds,
716
+ # # and all remaining timeouts to 10 seconds.
717
+ # ::Google::Ads::AdManager::V1::EntitySignalsMappingService::Rest::Client.configure do |config|
718
+ # config.timeout = 10.0
719
+ # config.rpcs.get_entity_signals_mapping.timeout = 20.0
720
+ # end
721
+ #
722
+ # # Apply the above configuration only to a new client.
723
+ # client = ::Google::Ads::AdManager::V1::EntitySignalsMappingService::Rest::Client.new do |config|
724
+ # config.timeout = 10.0
725
+ # config.rpcs.get_entity_signals_mapping.timeout = 20.0
726
+ # end
727
+ #
728
+ # @!attribute [rw] endpoint
729
+ # A custom service endpoint, as a hostname or hostname:port. The default is
730
+ # nil, indicating to use the default endpoint in the current universe domain.
731
+ # @return [::String,nil]
732
+ # @!attribute [rw] credentials
733
+ # Credentials to send with calls. You may provide any of the following types:
734
+ # * (`String`) The path to a service account key file in JSON format
735
+ # * (`Hash`) A service account key as a Hash
736
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
737
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
738
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
739
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
740
+ # * (`nil`) indicating no credentials
741
+ # @return [::Object]
742
+ # @!attribute [rw] scope
743
+ # The OAuth scopes
744
+ # @return [::Array<::String>]
745
+ # @!attribute [rw] lib_name
746
+ # The library name as recorded in instrumentation and logging
747
+ # @return [::String]
748
+ # @!attribute [rw] lib_version
749
+ # The library version as recorded in instrumentation and logging
750
+ # @return [::String]
751
+ # @!attribute [rw] timeout
752
+ # The call timeout in seconds.
753
+ # @return [::Numeric]
754
+ # @!attribute [rw] metadata
755
+ # Additional headers to be sent with the call.
756
+ # @return [::Hash{::Symbol=>::String}]
757
+ # @!attribute [rw] retry_policy
758
+ # The retry policy. The value is a hash with the following keys:
759
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
760
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
761
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
762
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
763
+ # trigger a retry.
764
+ # @return [::Hash]
765
+ # @!attribute [rw] quota_project
766
+ # A separate project against which to charge quota.
767
+ # @return [::String]
768
+ # @!attribute [rw] universe_domain
769
+ # The universe domain within which to make requests. This determines the
770
+ # default endpoint URL. The default value of nil uses the environment
771
+ # universe (usually the default "googleapis.com" universe).
772
+ # @return [::String,nil]
773
+ # @!attribute [rw] logger
774
+ # A custom logger to use for request/response debug logging, or the value
775
+ # `:default` (the default) to construct a default logger, or `nil` to
776
+ # explicitly disable logging.
777
+ # @return [::Logger,:default,nil]
778
+ #
779
+ class Configuration
780
+ extend ::Gapic::Config
781
+
782
+ # @private
783
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
784
+ DEFAULT_ENDPOINT = "admanager.googleapis.com"
785
+
786
+ config_attr :endpoint, nil, ::String, nil
787
+ config_attr :credentials, nil do |value|
788
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
789
+ allowed.any? { |klass| klass === value }
790
+ end
791
+ config_attr :scope, nil, ::String, ::Array, nil
792
+ config_attr :lib_name, nil, ::String, nil
793
+ config_attr :lib_version, nil, ::String, nil
794
+ config_attr :timeout, nil, ::Numeric, nil
795
+ config_attr :metadata, nil, ::Hash, nil
796
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
797
+ config_attr :quota_project, nil, ::String, nil
798
+ config_attr :universe_domain, nil, ::String, nil
799
+ config_attr :logger, :default, ::Logger, nil, :default
800
+
801
+ # @private
802
+ def initialize parent_config = nil
803
+ @parent_config = parent_config unless parent_config.nil?
804
+
805
+ yield self if block_given?
806
+ end
807
+
808
+ ##
809
+ # Configurations for individual RPCs
810
+ # @return [Rpcs]
811
+ #
812
+ def rpcs
813
+ @rpcs ||= begin
814
+ parent_rpcs = nil
815
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
816
+ Rpcs.new parent_rpcs
817
+ end
818
+ end
819
+
820
+ ##
821
+ # Configuration RPC class for the EntitySignalsMappingService API.
822
+ #
823
+ # Includes fields providing the configuration for each RPC in this service.
824
+ # Each configuration object is of type `Gapic::Config::Method` and includes
825
+ # the following configuration fields:
826
+ #
827
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
828
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
829
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
830
+ # include the following keys:
831
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
832
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
833
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
834
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
835
+ # trigger a retry.
836
+ #
837
+ class Rpcs
838
+ ##
839
+ # RPC-specific configuration for `get_entity_signals_mapping`
840
+ # @return [::Gapic::Config::Method]
841
+ #
842
+ attr_reader :get_entity_signals_mapping
843
+ ##
844
+ # RPC-specific configuration for `list_entity_signals_mappings`
845
+ # @return [::Gapic::Config::Method]
846
+ #
847
+ attr_reader :list_entity_signals_mappings
848
+ ##
849
+ # RPC-specific configuration for `create_entity_signals_mapping`
850
+ # @return [::Gapic::Config::Method]
851
+ #
852
+ attr_reader :create_entity_signals_mapping
853
+ ##
854
+ # RPC-specific configuration for `update_entity_signals_mapping`
855
+ # @return [::Gapic::Config::Method]
856
+ #
857
+ attr_reader :update_entity_signals_mapping
858
+ ##
859
+ # RPC-specific configuration for `batch_create_entity_signals_mappings`
860
+ # @return [::Gapic::Config::Method]
861
+ #
862
+ attr_reader :batch_create_entity_signals_mappings
863
+ ##
864
+ # RPC-specific configuration for `batch_update_entity_signals_mappings`
865
+ # @return [::Gapic::Config::Method]
866
+ #
867
+ attr_reader :batch_update_entity_signals_mappings
868
+
869
+ # @private
870
+ def initialize parent_rpcs = nil
871
+ get_entity_signals_mapping_config = parent_rpcs.get_entity_signals_mapping if parent_rpcs.respond_to? :get_entity_signals_mapping
872
+ @get_entity_signals_mapping = ::Gapic::Config::Method.new get_entity_signals_mapping_config
873
+ list_entity_signals_mappings_config = parent_rpcs.list_entity_signals_mappings if parent_rpcs.respond_to? :list_entity_signals_mappings
874
+ @list_entity_signals_mappings = ::Gapic::Config::Method.new list_entity_signals_mappings_config
875
+ create_entity_signals_mapping_config = parent_rpcs.create_entity_signals_mapping if parent_rpcs.respond_to? :create_entity_signals_mapping
876
+ @create_entity_signals_mapping = ::Gapic::Config::Method.new create_entity_signals_mapping_config
877
+ update_entity_signals_mapping_config = parent_rpcs.update_entity_signals_mapping if parent_rpcs.respond_to? :update_entity_signals_mapping
878
+ @update_entity_signals_mapping = ::Gapic::Config::Method.new update_entity_signals_mapping_config
879
+ batch_create_entity_signals_mappings_config = parent_rpcs.batch_create_entity_signals_mappings if parent_rpcs.respond_to? :batch_create_entity_signals_mappings
880
+ @batch_create_entity_signals_mappings = ::Gapic::Config::Method.new batch_create_entity_signals_mappings_config
881
+ batch_update_entity_signals_mappings_config = parent_rpcs.batch_update_entity_signals_mappings if parent_rpcs.respond_to? :batch_update_entity_signals_mappings
882
+ @batch_update_entity_signals_mappings = ::Gapic::Config::Method.new batch_update_entity_signals_mappings_config
883
+
884
+ yield self if block_given?
885
+ end
886
+ end
887
+ end
888
+ end
889
+ end
890
+ end
891
+ end
892
+ end
893
+ end
894
+ end