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,923 @@
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/report_service_pb"
21
+ require "google/ads/ad_manager/v1/report_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Ads
25
+ module AdManager
26
+ module V1
27
+ module ReportService
28
+ module Rest
29
+ ##
30
+ # REST client for the ReportService service.
31
+ #
32
+ # Provides methods for interacting with reports.
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 :report_service_stub
45
+
46
+ ##
47
+ # Configure the ReportService Client class.
48
+ #
49
+ # See {::Google::Ads::AdManager::V1::ReportService::Rest::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all ReportService clients
55
+ # ::Google::Ads::AdManager::V1::ReportService::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 ReportService 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::ReportService::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
+ @report_service_stub.universe_domain
108
+ end
109
+
110
+ ##
111
+ # Create a new ReportService REST client object.
112
+ #
113
+ # @example
114
+ #
115
+ # # Create a client using the default configuration
116
+ # client = ::Google::Ads::AdManager::V1::ReportService::Rest::Client.new
117
+ #
118
+ # # Create a client using a custom configuration
119
+ # client = ::Google::Ads::AdManager::V1::ReportService::Rest::Client.new do |config|
120
+ # config.timeout = 10.0
121
+ # end
122
+ #
123
+ # @yield [config] Configure the ReportService 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
+ @operations_client = ::Google::Ads::AdManager::V1::ReportService::Rest::Operations.new do |config|
150
+ config.credentials = credentials
151
+ config.quota_project = @quota_project_id
152
+ config.endpoint = @config.endpoint
153
+ config.universe_domain = @config.universe_domain
154
+ end
155
+
156
+ @report_service_stub = ::Google::Ads::AdManager::V1::ReportService::Rest::ServiceStub.new(
157
+ endpoint: @config.endpoint,
158
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
159
+ universe_domain: @config.universe_domain,
160
+ credentials: credentials,
161
+ logger: @config.logger
162
+ )
163
+
164
+ @report_service_stub.logger(stub: true)&.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
+ # Get the associated client for long-running operations.
177
+ #
178
+ # @return [::Google::Ads::AdManager::V1::ReportService::Rest::Operations]
179
+ #
180
+ attr_reader :operations_client
181
+
182
+ ##
183
+ # The logger used for request/response debug logging.
184
+ #
185
+ # @return [Logger]
186
+ #
187
+ def logger
188
+ @report_service_stub.logger
189
+ end
190
+
191
+ # Service calls
192
+
193
+ ##
194
+ # API to retrieve a `Report` object.
195
+ #
196
+ # @overload get_report(request, options = nil)
197
+ # Pass arguments to `get_report` via a request object, either of type
198
+ # {::Google::Ads::AdManager::V1::GetReportRequest} or an equivalent Hash.
199
+ #
200
+ # @param request [::Google::Ads::AdManager::V1::GetReportRequest, ::Hash]
201
+ # A request object representing the call parameters. Required. To specify no
202
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
203
+ # @param options [::Gapic::CallOptions, ::Hash]
204
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
205
+ #
206
+ # @overload get_report(name: nil)
207
+ # Pass arguments to `get_report` via keyword arguments. Note that at
208
+ # least one keyword argument is required. To specify no parameters, or to keep all
209
+ # the default parameter values, pass an empty Hash as a request object (see above).
210
+ #
211
+ # @param name [::String]
212
+ # Required. The resource name of the report.
213
+ # Format: `networks/{network_code}/reports/{report_id}`
214
+ # @yield [result, operation] Access the result along with the TransportOperation object
215
+ # @yieldparam result [::Google::Ads::AdManager::V1::Report]
216
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
217
+ #
218
+ # @return [::Google::Ads::AdManager::V1::Report]
219
+ #
220
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
221
+ #
222
+ # @example Basic example
223
+ # require "google/ads/ad_manager/v1"
224
+ #
225
+ # # Create a client object. The client can be reused for multiple calls.
226
+ # client = Google::Ads::AdManager::V1::ReportService::Rest::Client.new
227
+ #
228
+ # # Create a request. To set request fields, pass in keyword arguments.
229
+ # request = Google::Ads::AdManager::V1::GetReportRequest.new
230
+ #
231
+ # # Call the get_report method.
232
+ # result = client.get_report request
233
+ #
234
+ # # The returned object is of type Google::Ads::AdManager::V1::Report.
235
+ # p result
236
+ #
237
+ def get_report request, options = nil
238
+ raise ::ArgumentError, "request must be provided" if request.nil?
239
+
240
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetReportRequest
241
+
242
+ # Converts hash and nil to an options object
243
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
244
+
245
+ # Customize the options with defaults
246
+ call_metadata = @config.rpcs.get_report.metadata.to_h
247
+
248
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
249
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
250
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
251
+ gapic_version: ::Google::Ads::AdManager::V1::VERSION,
252
+ transports_version_send: [:rest]
253
+
254
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
255
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
256
+
257
+ options.apply_defaults timeout: @config.rpcs.get_report.timeout,
258
+ metadata: call_metadata,
259
+ retry_policy: @config.rpcs.get_report.retry_policy
260
+
261
+ options.apply_defaults timeout: @config.timeout,
262
+ metadata: @config.metadata,
263
+ retry_policy: @config.retry_policy
264
+
265
+ @report_service_stub.get_report request, options do |result, operation|
266
+ yield result, operation if block_given?
267
+ end
268
+ rescue ::Gapic::Rest::Error => e
269
+ raise ::Google::Cloud::Error.from_error(e)
270
+ end
271
+
272
+ ##
273
+ # API to retrieve a list of `Report` objects.
274
+ #
275
+ # @overload list_reports(request, options = nil)
276
+ # Pass arguments to `list_reports` via a request object, either of type
277
+ # {::Google::Ads::AdManager::V1::ListReportsRequest} or an equivalent Hash.
278
+ #
279
+ # @param request [::Google::Ads::AdManager::V1::ListReportsRequest, ::Hash]
280
+ # A request object representing the call parameters. Required. To specify no
281
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
282
+ # @param options [::Gapic::CallOptions, ::Hash]
283
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
284
+ #
285
+ # @overload list_reports(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil)
286
+ # Pass arguments to `list_reports` via keyword arguments. Note that at
287
+ # least one keyword argument is required. To specify no parameters, or to keep all
288
+ # the default parameter values, pass an empty Hash as a request object (see above).
289
+ #
290
+ # @param parent [::String]
291
+ # Required. The parent, which owns this collection of reports.
292
+ # Format: `networks/{network_code}`
293
+ # @param page_size [::Integer]
294
+ # Optional. The maximum number of `Reports` to return. The service may return
295
+ # fewer than this value. If unspecified, at most 50 `Reports` will be
296
+ # returned. The maximum value is 1000; values above 1000 will be coerced to
297
+ # 1000.
298
+ # @param page_token [::String]
299
+ # Optional. A page token, received from a previous `ListReports` call.
300
+ # Provide this to retrieve the subsequent page.
301
+ #
302
+ # When paginating, all other parameters provided to `ListReports` must
303
+ # match the call that provided the page token.
304
+ # @param filter [::String]
305
+ # Optional. Expression to filter the response.
306
+ # See syntax details at
307
+ # https://developers.google.com/ad-manager/api/beta/filters
308
+ # @param order_by [::String]
309
+ # Optional. Expression to specify sorting order.
310
+ # See syntax details at
311
+ # https://developers.google.com/ad-manager/api/beta/filters#order
312
+ # @param skip [::Integer]
313
+ # Optional. Number of individual resources to skip while paginating.
314
+ # @yield [result, operation] Access the result along with the TransportOperation object
315
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::Report>]
316
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
317
+ #
318
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::Report>]
319
+ #
320
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
321
+ #
322
+ # @example Basic example
323
+ # require "google/ads/ad_manager/v1"
324
+ #
325
+ # # Create a client object. The client can be reused for multiple calls.
326
+ # client = Google::Ads::AdManager::V1::ReportService::Rest::Client.new
327
+ #
328
+ # # Create a request. To set request fields, pass in keyword arguments.
329
+ # request = Google::Ads::AdManager::V1::ListReportsRequest.new
330
+ #
331
+ # # Call the list_reports method.
332
+ # result = client.list_reports request
333
+ #
334
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
335
+ # # over elements, and API calls will be issued to fetch pages as needed.
336
+ # result.each do |item|
337
+ # # Each element is of type ::Google::Ads::AdManager::V1::Report.
338
+ # p item
339
+ # end
340
+ #
341
+ def list_reports request, options = nil
342
+ raise ::ArgumentError, "request must be provided" if request.nil?
343
+
344
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListReportsRequest
345
+
346
+ # Converts hash and nil to an options object
347
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
348
+
349
+ # Customize the options with defaults
350
+ call_metadata = @config.rpcs.list_reports.metadata.to_h
351
+
352
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
353
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
354
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
355
+ gapic_version: ::Google::Ads::AdManager::V1::VERSION,
356
+ transports_version_send: [:rest]
357
+
358
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
359
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
360
+
361
+ options.apply_defaults timeout: @config.rpcs.list_reports.timeout,
362
+ metadata: call_metadata,
363
+ retry_policy: @config.rpcs.list_reports.retry_policy
364
+
365
+ options.apply_defaults timeout: @config.timeout,
366
+ metadata: @config.metadata,
367
+ retry_policy: @config.retry_policy
368
+
369
+ @report_service_stub.list_reports request, options do |result, operation|
370
+ result = ::Gapic::Rest::PagedEnumerable.new @report_service_stub, :list_reports, "reports", request, result, options
371
+ yield result, operation if block_given?
372
+ throw :response, result
373
+ end
374
+ rescue ::Gapic::Rest::Error => e
375
+ raise ::Google::Cloud::Error.from_error(e)
376
+ end
377
+
378
+ ##
379
+ # API to create a `Report` object.
380
+ #
381
+ # @overload create_report(request, options = nil)
382
+ # Pass arguments to `create_report` via a request object, either of type
383
+ # {::Google::Ads::AdManager::V1::CreateReportRequest} or an equivalent Hash.
384
+ #
385
+ # @param request [::Google::Ads::AdManager::V1::CreateReportRequest, ::Hash]
386
+ # A request object representing the call parameters. Required. To specify no
387
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
388
+ # @param options [::Gapic::CallOptions, ::Hash]
389
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
390
+ #
391
+ # @overload create_report(parent: nil, report: nil)
392
+ # Pass arguments to `create_report` via keyword arguments. Note that at
393
+ # least one keyword argument is required. To specify no parameters, or to keep all
394
+ # the default parameter values, pass an empty Hash as a request object (see above).
395
+ #
396
+ # @param parent [::String]
397
+ # Required. The parent resource where this `Report` will be created.
398
+ # Format: `networks/{network_code}`
399
+ # @param report [::Google::Ads::AdManager::V1::Report, ::Hash]
400
+ # Required. The `Report` to create.
401
+ # @yield [result, operation] Access the result along with the TransportOperation object
402
+ # @yieldparam result [::Google::Ads::AdManager::V1::Report]
403
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
404
+ #
405
+ # @return [::Google::Ads::AdManager::V1::Report]
406
+ #
407
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
408
+ #
409
+ # @example Basic example
410
+ # require "google/ads/ad_manager/v1"
411
+ #
412
+ # # Create a client object. The client can be reused for multiple calls.
413
+ # client = Google::Ads::AdManager::V1::ReportService::Rest::Client.new
414
+ #
415
+ # # Create a request. To set request fields, pass in keyword arguments.
416
+ # request = Google::Ads::AdManager::V1::CreateReportRequest.new
417
+ #
418
+ # # Call the create_report method.
419
+ # result = client.create_report request
420
+ #
421
+ # # The returned object is of type Google::Ads::AdManager::V1::Report.
422
+ # p result
423
+ #
424
+ def create_report request, options = nil
425
+ raise ::ArgumentError, "request must be provided" if request.nil?
426
+
427
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::CreateReportRequest
428
+
429
+ # Converts hash and nil to an options object
430
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
431
+
432
+ # Customize the options with defaults
433
+ call_metadata = @config.rpcs.create_report.metadata.to_h
434
+
435
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
436
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
437
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
438
+ gapic_version: ::Google::Ads::AdManager::V1::VERSION,
439
+ transports_version_send: [:rest]
440
+
441
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
442
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
443
+
444
+ options.apply_defaults timeout: @config.rpcs.create_report.timeout,
445
+ metadata: call_metadata,
446
+ retry_policy: @config.rpcs.create_report.retry_policy
447
+
448
+ options.apply_defaults timeout: @config.timeout,
449
+ metadata: @config.metadata,
450
+ retry_policy: @config.retry_policy
451
+
452
+ @report_service_stub.create_report request, options do |result, operation|
453
+ yield result, operation if block_given?
454
+ end
455
+ rescue ::Gapic::Rest::Error => e
456
+ raise ::Google::Cloud::Error.from_error(e)
457
+ end
458
+
459
+ ##
460
+ # API to update a `Report` object.
461
+ #
462
+ # @overload update_report(request, options = nil)
463
+ # Pass arguments to `update_report` via a request object, either of type
464
+ # {::Google::Ads::AdManager::V1::UpdateReportRequest} or an equivalent Hash.
465
+ #
466
+ # @param request [::Google::Ads::AdManager::V1::UpdateReportRequest, ::Hash]
467
+ # A request object representing the call parameters. Required. To specify no
468
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
469
+ # @param options [::Gapic::CallOptions, ::Hash]
470
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
471
+ #
472
+ # @overload update_report(report: nil, update_mask: nil)
473
+ # Pass arguments to `update_report` via keyword arguments. Note that at
474
+ # least one keyword argument is required. To specify no parameters, or to keep all
475
+ # the default parameter values, pass an empty Hash as a request object (see above).
476
+ #
477
+ # @param report [::Google::Ads::AdManager::V1::Report, ::Hash]
478
+ # Required. The `Report` to update.
479
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
480
+ # Required. The list of fields to update.
481
+ # @yield [result, operation] Access the result along with the TransportOperation object
482
+ # @yieldparam result [::Google::Ads::AdManager::V1::Report]
483
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
484
+ #
485
+ # @return [::Google::Ads::AdManager::V1::Report]
486
+ #
487
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
488
+ #
489
+ # @example Basic example
490
+ # require "google/ads/ad_manager/v1"
491
+ #
492
+ # # Create a client object. The client can be reused for multiple calls.
493
+ # client = Google::Ads::AdManager::V1::ReportService::Rest::Client.new
494
+ #
495
+ # # Create a request. To set request fields, pass in keyword arguments.
496
+ # request = Google::Ads::AdManager::V1::UpdateReportRequest.new
497
+ #
498
+ # # Call the update_report method.
499
+ # result = client.update_report request
500
+ #
501
+ # # The returned object is of type Google::Ads::AdManager::V1::Report.
502
+ # p result
503
+ #
504
+ def update_report request, options = nil
505
+ raise ::ArgumentError, "request must be provided" if request.nil?
506
+
507
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::UpdateReportRequest
508
+
509
+ # Converts hash and nil to an options object
510
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
511
+
512
+ # Customize the options with defaults
513
+ call_metadata = @config.rpcs.update_report.metadata.to_h
514
+
515
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
516
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
517
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
518
+ gapic_version: ::Google::Ads::AdManager::V1::VERSION,
519
+ transports_version_send: [:rest]
520
+
521
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
522
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
523
+
524
+ options.apply_defaults timeout: @config.rpcs.update_report.timeout,
525
+ metadata: call_metadata,
526
+ retry_policy: @config.rpcs.update_report.retry_policy
527
+
528
+ options.apply_defaults timeout: @config.timeout,
529
+ metadata: @config.metadata,
530
+ retry_policy: @config.retry_policy
531
+
532
+ @report_service_stub.update_report request, options do |result, operation|
533
+ yield result, operation if block_given?
534
+ end
535
+ rescue ::Gapic::Rest::Error => e
536
+ raise ::Google::Cloud::Error.from_error(e)
537
+ end
538
+
539
+ ##
540
+ # Initiates the execution of an existing report asynchronously. Users can
541
+ # get the report by polling this operation via
542
+ # `OperationsService.GetOperation`.
543
+ # Poll every 5 seconds initially, with an exponential
544
+ # backoff. Once a report is complete, the operation will contain a
545
+ # `RunReportResponse` in its response field containing a report_result that
546
+ # can be passed to the `FetchReportResultRows` method to retrieve the report
547
+ # data.
548
+ #
549
+ # @overload run_report(request, options = nil)
550
+ # Pass arguments to `run_report` via a request object, either of type
551
+ # {::Google::Ads::AdManager::V1::RunReportRequest} or an equivalent Hash.
552
+ #
553
+ # @param request [::Google::Ads::AdManager::V1::RunReportRequest, ::Hash]
554
+ # A request object representing the call parameters. Required. To specify no
555
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
556
+ # @param options [::Gapic::CallOptions, ::Hash]
557
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
558
+ #
559
+ # @overload run_report(name: nil)
560
+ # Pass arguments to `run_report` via keyword arguments. Note that at
561
+ # least one keyword argument is required. To specify no parameters, or to keep all
562
+ # the default parameter values, pass an empty Hash as a request object (see above).
563
+ #
564
+ # @param name [::String]
565
+ # Required. The report to run.
566
+ # Format: `networks/{network_code}/reports/{report_id}`
567
+ # @yield [result, operation] Access the result along with the TransportOperation object
568
+ # @yieldparam result [::Gapic::Operation]
569
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
570
+ #
571
+ # @return [::Gapic::Operation]
572
+ #
573
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
574
+ #
575
+ # @example Basic example
576
+ # require "google/ads/ad_manager/v1"
577
+ #
578
+ # # Create a client object. The client can be reused for multiple calls.
579
+ # client = Google::Ads::AdManager::V1::ReportService::Rest::Client.new
580
+ #
581
+ # # Create a request. To set request fields, pass in keyword arguments.
582
+ # request = Google::Ads::AdManager::V1::RunReportRequest.new
583
+ #
584
+ # # Call the run_report method.
585
+ # result = client.run_report request
586
+ #
587
+ # # The returned object is of type Gapic::Operation. You can use it to
588
+ # # check the status of an operation, cancel it, or wait for results.
589
+ # # Here is how to wait for a response.
590
+ # result.wait_until_done! timeout: 60
591
+ # if result.response?
592
+ # p result.response
593
+ # else
594
+ # puts "No response received."
595
+ # end
596
+ #
597
+ def run_report request, options = nil
598
+ raise ::ArgumentError, "request must be provided" if request.nil?
599
+
600
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::RunReportRequest
601
+
602
+ # Converts hash and nil to an options object
603
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
604
+
605
+ # Customize the options with defaults
606
+ call_metadata = @config.rpcs.run_report.metadata.to_h
607
+
608
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
609
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
610
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
611
+ gapic_version: ::Google::Ads::AdManager::V1::VERSION,
612
+ transports_version_send: [:rest]
613
+
614
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
615
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
616
+
617
+ options.apply_defaults timeout: @config.rpcs.run_report.timeout,
618
+ metadata: call_metadata,
619
+ retry_policy: @config.rpcs.run_report.retry_policy
620
+
621
+ options.apply_defaults timeout: @config.timeout,
622
+ metadata: @config.metadata,
623
+ retry_policy: @config.retry_policy
624
+
625
+ @report_service_stub.run_report request, options do |result, operation|
626
+ result = ::Gapic::Operation.new result, @operations_client, options: options
627
+ yield result, operation if block_given?
628
+ throw :response, result
629
+ end
630
+ rescue ::Gapic::Rest::Error => e
631
+ raise ::Google::Cloud::Error.from_error(e)
632
+ end
633
+
634
+ ##
635
+ # Returns the result rows from a completed report.
636
+ # The caller must have previously called `RunReport` and waited for that
637
+ # operation to complete. The rows will be returned according to the order
638
+ # specified by the `sorts` member of the report definition.
639
+ #
640
+ # @overload fetch_report_result_rows(request, options = nil)
641
+ # Pass arguments to `fetch_report_result_rows` via a request object, either of type
642
+ # {::Google::Ads::AdManager::V1::FetchReportResultRowsRequest} or an equivalent Hash.
643
+ #
644
+ # @param request [::Google::Ads::AdManager::V1::FetchReportResultRowsRequest, ::Hash]
645
+ # A request object representing the call parameters. Required. To specify no
646
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
647
+ # @param options [::Gapic::CallOptions, ::Hash]
648
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
649
+ #
650
+ # @overload fetch_report_result_rows(name: nil, page_size: nil, page_token: nil)
651
+ # Pass arguments to `fetch_report_result_rows` via keyword arguments. Note that at
652
+ # least one keyword argument is required. To specify no parameters, or to keep all
653
+ # the default parameter values, pass an empty Hash as a request object (see above).
654
+ #
655
+ # @param name [::String]
656
+ # The report result being fetched.
657
+ # Format:
658
+ # `networks/{network_code}/reports/{report_id}/results/{report_result_id}`
659
+ # @param page_size [::Integer]
660
+ # Optional. The maximum number of rows to return. The service may return
661
+ # fewer than this value. If unspecified, at most 1,000 rows will be returned.
662
+ # The maximum value is 10,000; values above 10,000 will be reduced to 10,000.
663
+ # @param page_token [::String]
664
+ # Optional. A page token, received from a previous `FetchReportResultRows`
665
+ # call. Provide this to retrieve the second and subsequent batches of rows.
666
+ # @yield [result, operation] Access the result along with the TransportOperation object
667
+ # @yieldparam result [::Google::Ads::AdManager::V1::FetchReportResultRowsResponse]
668
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
669
+ #
670
+ # @return [::Google::Ads::AdManager::V1::FetchReportResultRowsResponse]
671
+ #
672
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
673
+ #
674
+ # @example Basic example
675
+ # require "google/ads/ad_manager/v1"
676
+ #
677
+ # # Create a client object. The client can be reused for multiple calls.
678
+ # client = Google::Ads::AdManager::V1::ReportService::Rest::Client.new
679
+ #
680
+ # # Create a request. To set request fields, pass in keyword arguments.
681
+ # request = Google::Ads::AdManager::V1::FetchReportResultRowsRequest.new
682
+ #
683
+ # # Call the fetch_report_result_rows method.
684
+ # result = client.fetch_report_result_rows request
685
+ #
686
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
687
+ # # over elements, and API calls will be issued to fetch pages as needed.
688
+ # result.each do |item|
689
+ # # Each element is of type ::Google::Ads::AdManager::V1::Report::DataTable::Row.
690
+ # p item
691
+ # end
692
+ #
693
+ def fetch_report_result_rows request, options = nil
694
+ raise ::ArgumentError, "request must be provided" if request.nil?
695
+
696
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::FetchReportResultRowsRequest
697
+
698
+ # Converts hash and nil to an options object
699
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
700
+
701
+ # Customize the options with defaults
702
+ call_metadata = @config.rpcs.fetch_report_result_rows.metadata.to_h
703
+
704
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
705
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
706
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
707
+ gapic_version: ::Google::Ads::AdManager::V1::VERSION,
708
+ transports_version_send: [:rest]
709
+
710
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
711
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
712
+
713
+ options.apply_defaults timeout: @config.rpcs.fetch_report_result_rows.timeout,
714
+ metadata: call_metadata,
715
+ retry_policy: @config.rpcs.fetch_report_result_rows.retry_policy
716
+
717
+ options.apply_defaults timeout: @config.timeout,
718
+ metadata: @config.metadata,
719
+ retry_policy: @config.retry_policy
720
+
721
+ @report_service_stub.fetch_report_result_rows request, options do |result, operation|
722
+ yield result, operation if block_given?
723
+ end
724
+ rescue ::Gapic::Rest::Error => e
725
+ raise ::Google::Cloud::Error.from_error(e)
726
+ end
727
+
728
+ ##
729
+ # Configuration class for the ReportService REST API.
730
+ #
731
+ # This class represents the configuration for ReportService REST,
732
+ # providing control over timeouts, retry behavior, logging, transport
733
+ # parameters, and other low-level controls. Certain parameters can also be
734
+ # applied individually to specific RPCs. See
735
+ # {::Google::Ads::AdManager::V1::ReportService::Rest::Client::Configuration::Rpcs}
736
+ # for a list of RPCs that can be configured independently.
737
+ #
738
+ # Configuration can be applied globally to all clients, or to a single client
739
+ # on construction.
740
+ #
741
+ # @example
742
+ #
743
+ # # Modify the global config, setting the timeout for
744
+ # # get_report to 20 seconds,
745
+ # # and all remaining timeouts to 10 seconds.
746
+ # ::Google::Ads::AdManager::V1::ReportService::Rest::Client.configure do |config|
747
+ # config.timeout = 10.0
748
+ # config.rpcs.get_report.timeout = 20.0
749
+ # end
750
+ #
751
+ # # Apply the above configuration only to a new client.
752
+ # client = ::Google::Ads::AdManager::V1::ReportService::Rest::Client.new do |config|
753
+ # config.timeout = 10.0
754
+ # config.rpcs.get_report.timeout = 20.0
755
+ # end
756
+ #
757
+ # @!attribute [rw] endpoint
758
+ # A custom service endpoint, as a hostname or hostname:port. The default is
759
+ # nil, indicating to use the default endpoint in the current universe domain.
760
+ # @return [::String,nil]
761
+ # @!attribute [rw] credentials
762
+ # Credentials to send with calls. You may provide any of the following types:
763
+ # * (`String`) The path to a service account key file in JSON format
764
+ # * (`Hash`) A service account key as a Hash
765
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
766
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
767
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
768
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
769
+ # * (`nil`) indicating no credentials
770
+ # @return [::Object]
771
+ # @!attribute [rw] scope
772
+ # The OAuth scopes
773
+ # @return [::Array<::String>]
774
+ # @!attribute [rw] lib_name
775
+ # The library name as recorded in instrumentation and logging
776
+ # @return [::String]
777
+ # @!attribute [rw] lib_version
778
+ # The library version as recorded in instrumentation and logging
779
+ # @return [::String]
780
+ # @!attribute [rw] timeout
781
+ # The call timeout in seconds.
782
+ # @return [::Numeric]
783
+ # @!attribute [rw] metadata
784
+ # Additional headers to be sent with the call.
785
+ # @return [::Hash{::Symbol=>::String}]
786
+ # @!attribute [rw] retry_policy
787
+ # The retry policy. The value is a hash with the following keys:
788
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
789
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
790
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
791
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
792
+ # trigger a retry.
793
+ # @return [::Hash]
794
+ # @!attribute [rw] quota_project
795
+ # A separate project against which to charge quota.
796
+ # @return [::String]
797
+ # @!attribute [rw] universe_domain
798
+ # The universe domain within which to make requests. This determines the
799
+ # default endpoint URL. The default value of nil uses the environment
800
+ # universe (usually the default "googleapis.com" universe).
801
+ # @return [::String,nil]
802
+ # @!attribute [rw] logger
803
+ # A custom logger to use for request/response debug logging, or the value
804
+ # `:default` (the default) to construct a default logger, or `nil` to
805
+ # explicitly disable logging.
806
+ # @return [::Logger,:default,nil]
807
+ #
808
+ class Configuration
809
+ extend ::Gapic::Config
810
+
811
+ # @private
812
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
813
+ DEFAULT_ENDPOINT = "admanager.googleapis.com"
814
+
815
+ config_attr :endpoint, nil, ::String, nil
816
+ config_attr :credentials, nil do |value|
817
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
818
+ allowed.any? { |klass| klass === value }
819
+ end
820
+ config_attr :scope, nil, ::String, ::Array, nil
821
+ config_attr :lib_name, nil, ::String, nil
822
+ config_attr :lib_version, nil, ::String, nil
823
+ config_attr :timeout, nil, ::Numeric, nil
824
+ config_attr :metadata, nil, ::Hash, nil
825
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
826
+ config_attr :quota_project, nil, ::String, nil
827
+ config_attr :universe_domain, nil, ::String, nil
828
+ config_attr :logger, :default, ::Logger, nil, :default
829
+
830
+ # @private
831
+ def initialize parent_config = nil
832
+ @parent_config = parent_config unless parent_config.nil?
833
+
834
+ yield self if block_given?
835
+ end
836
+
837
+ ##
838
+ # Configurations for individual RPCs
839
+ # @return [Rpcs]
840
+ #
841
+ def rpcs
842
+ @rpcs ||= begin
843
+ parent_rpcs = nil
844
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
845
+ Rpcs.new parent_rpcs
846
+ end
847
+ end
848
+
849
+ ##
850
+ # Configuration RPC class for the ReportService API.
851
+ #
852
+ # Includes fields providing the configuration for each RPC in this service.
853
+ # Each configuration object is of type `Gapic::Config::Method` and includes
854
+ # the following configuration fields:
855
+ #
856
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
857
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
858
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
859
+ # include the following keys:
860
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
861
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
862
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
863
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
864
+ # trigger a retry.
865
+ #
866
+ class Rpcs
867
+ ##
868
+ # RPC-specific configuration for `get_report`
869
+ # @return [::Gapic::Config::Method]
870
+ #
871
+ attr_reader :get_report
872
+ ##
873
+ # RPC-specific configuration for `list_reports`
874
+ # @return [::Gapic::Config::Method]
875
+ #
876
+ attr_reader :list_reports
877
+ ##
878
+ # RPC-specific configuration for `create_report`
879
+ # @return [::Gapic::Config::Method]
880
+ #
881
+ attr_reader :create_report
882
+ ##
883
+ # RPC-specific configuration for `update_report`
884
+ # @return [::Gapic::Config::Method]
885
+ #
886
+ attr_reader :update_report
887
+ ##
888
+ # RPC-specific configuration for `run_report`
889
+ # @return [::Gapic::Config::Method]
890
+ #
891
+ attr_reader :run_report
892
+ ##
893
+ # RPC-specific configuration for `fetch_report_result_rows`
894
+ # @return [::Gapic::Config::Method]
895
+ #
896
+ attr_reader :fetch_report_result_rows
897
+
898
+ # @private
899
+ def initialize parent_rpcs = nil
900
+ get_report_config = parent_rpcs.get_report if parent_rpcs.respond_to? :get_report
901
+ @get_report = ::Gapic::Config::Method.new get_report_config
902
+ list_reports_config = parent_rpcs.list_reports if parent_rpcs.respond_to? :list_reports
903
+ @list_reports = ::Gapic::Config::Method.new list_reports_config
904
+ create_report_config = parent_rpcs.create_report if parent_rpcs.respond_to? :create_report
905
+ @create_report = ::Gapic::Config::Method.new create_report_config
906
+ update_report_config = parent_rpcs.update_report if parent_rpcs.respond_to? :update_report
907
+ @update_report = ::Gapic::Config::Method.new update_report_config
908
+ run_report_config = parent_rpcs.run_report if parent_rpcs.respond_to? :run_report
909
+ @run_report = ::Gapic::Config::Method.new run_report_config
910
+ fetch_report_result_rows_config = parent_rpcs.fetch_report_result_rows if parent_rpcs.respond_to? :fetch_report_result_rows
911
+ @fetch_report_result_rows = ::Gapic::Config::Method.new fetch_report_result_rows_config
912
+
913
+ yield self if block_given?
914
+ end
915
+ end
916
+ end
917
+ end
918
+ end
919
+ end
920
+ end
921
+ end
922
+ end
923
+ end