google-shopping-merchant-quota-v1 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,205 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/shopping/merchant/quota/v1/accountlimits_pb"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module Quota
25
+ module V1
26
+ module AccountLimitsService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the AccountLimitsService service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ # @private
35
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
36
+ # These require statements are intentionally placed here to initialize
37
+ # the REST modules only when it's required.
38
+ require "gapic/rest"
39
+
40
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
41
+ endpoint_template: endpoint_template,
42
+ universe_domain: universe_domain,
43
+ credentials: credentials,
44
+ numeric_enums: true,
45
+ service_name: self.class,
46
+ raise_faraday_errors: false,
47
+ logger: logger
48
+ end
49
+
50
+ ##
51
+ # The effective universe domain
52
+ #
53
+ # @return [String]
54
+ #
55
+ def universe_domain
56
+ @client_stub.universe_domain
57
+ end
58
+
59
+ ##
60
+ # The effective endpoint
61
+ #
62
+ # @return [String]
63
+ #
64
+ def endpoint
65
+ @client_stub.endpoint
66
+ end
67
+
68
+ ##
69
+ # The logger used for request/response debug logging.
70
+ #
71
+ # @return [Logger]
72
+ #
73
+ def logger stub: false
74
+ stub ? @client_stub.stub_logger : @client_stub.logger
75
+ end
76
+
77
+ ##
78
+ # Baseline implementation for the get_account_limit REST call
79
+ #
80
+ # @param request_pb [::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest]
81
+ # A request object representing the call parameters. Required.
82
+ # @param options [::Gapic::CallOptions]
83
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
84
+ #
85
+ # @yield [result, operation] Access the result along with the TransportOperation object
86
+ # @yieldparam result [::Google::Shopping::Merchant::Quota::V1::AccountLimit]
87
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
88
+ #
89
+ # @return [::Google::Shopping::Merchant::Quota::V1::AccountLimit]
90
+ # A result object deserialized from the server's reply
91
+ def get_account_limit request_pb, options = nil
92
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
93
+
94
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_account_limit_request request_pb
95
+ query_string_params = if query_string_params.any?
96
+ query_string_params.to_h { |p| p.split "=", 2 }
97
+ else
98
+ {}
99
+ end
100
+
101
+ response = @client_stub.make_http_request(
102
+ verb,
103
+ uri: uri,
104
+ body: body || "",
105
+ params: query_string_params,
106
+ method_name: "get_account_limit",
107
+ options: options
108
+ )
109
+ operation = ::Gapic::Rest::TransportOperation.new response
110
+ result = ::Google::Shopping::Merchant::Quota::V1::AccountLimit.decode_json response.body, ignore_unknown_fields: true
111
+ catch :response do
112
+ yield result, operation if block_given?
113
+ result
114
+ end
115
+ end
116
+
117
+ ##
118
+ # Baseline implementation for the list_account_limits REST call
119
+ #
120
+ # @param request_pb [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest]
121
+ # A request object representing the call parameters. Required.
122
+ # @param options [::Gapic::CallOptions]
123
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
124
+ #
125
+ # @yield [result, operation] Access the result along with the TransportOperation object
126
+ # @yieldparam result [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse]
127
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
128
+ #
129
+ # @return [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse]
130
+ # A result object deserialized from the server's reply
131
+ def list_account_limits request_pb, options = nil
132
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
133
+
134
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_account_limits_request request_pb
135
+ query_string_params = if query_string_params.any?
136
+ query_string_params.to_h { |p| p.split "=", 2 }
137
+ else
138
+ {}
139
+ end
140
+
141
+ response = @client_stub.make_http_request(
142
+ verb,
143
+ uri: uri,
144
+ body: body || "",
145
+ params: query_string_params,
146
+ method_name: "list_account_limits",
147
+ options: options
148
+ )
149
+ operation = ::Gapic::Rest::TransportOperation.new response
150
+ result = ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse.decode_json response.body, ignore_unknown_fields: true
151
+ catch :response do
152
+ yield result, operation if block_given?
153
+ result
154
+ end
155
+ end
156
+
157
+ ##
158
+ # @private
159
+ #
160
+ # GRPC transcoding helper method for the get_account_limit REST call
161
+ #
162
+ # @param request_pb [::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest]
163
+ # A request object representing the call parameters. Required.
164
+ # @return [Array(String, [String, nil], Hash{String => String})]
165
+ # Uri, Body, Query string parameters
166
+ def self.transcode_get_account_limit_request request_pb
167
+ transcoder = Gapic::Rest::GrpcTranscoder.new
168
+ .with_bindings(
169
+ uri_method: :get,
170
+ uri_template: "/accounts/v1/{name}",
171
+ matches: [
172
+ ["name", %r{^accounts/[^/]+/limits/[^/]+/?$}, false]
173
+ ]
174
+ )
175
+ transcoder.transcode request_pb
176
+ end
177
+
178
+ ##
179
+ # @private
180
+ #
181
+ # GRPC transcoding helper method for the list_account_limits REST call
182
+ #
183
+ # @param request_pb [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest]
184
+ # A request object representing the call parameters. Required.
185
+ # @return [Array(String, [String, nil], Hash{String => String})]
186
+ # Uri, Body, Query string parameters
187
+ def self.transcode_list_account_limits_request request_pb
188
+ transcoder = Gapic::Rest::GrpcTranscoder.new
189
+ .with_bindings(
190
+ uri_method: :get,
191
+ uri_template: "/accounts/v1/{parent}/limits",
192
+ matches: [
193
+ ["parent", %r{^accounts/[^/]+/?$}, false]
194
+ ]
195
+ )
196
+ transcoder.transcode request_pb
197
+ end
198
+ end
199
+ end
200
+ end
201
+ end
202
+ end
203
+ end
204
+ end
205
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/shopping/merchant/quota/v1/version"
24
+
25
+ require "google/shopping/merchant/quota/v1/account_limits_service/credentials"
26
+ require "google/shopping/merchant/quota/v1/account_limits_service/paths"
27
+ require "google/shopping/merchant/quota/v1/account_limits_service/rest/client"
28
+
29
+ module Google
30
+ module Shopping
31
+ module Merchant
32
+ module Quota
33
+ module V1
34
+ ##
35
+ # Service to retrieve account limits.
36
+ #
37
+ # To load this service and instantiate a REST client:
38
+ #
39
+ # require "google/shopping/merchant/quota/v1/account_limits_service/rest"
40
+ # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new
41
+ #
42
+ module AccountLimitsService
43
+ # Client for the REST transport
44
+ module Rest
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+
53
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
54
+ require "google/shopping/merchant/quota/v1/account_limits_service/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/shopping/merchant/quota/v1/version"
24
+
25
+ require "google/shopping/merchant/quota/v1/account_limits_service/credentials"
26
+ require "google/shopping/merchant/quota/v1/account_limits_service/paths"
27
+ require "google/shopping/merchant/quota/v1/account_limits_service/client"
28
+ require "google/shopping/merchant/quota/v1/account_limits_service/rest"
29
+
30
+ module Google
31
+ module Shopping
32
+ module Merchant
33
+ module Quota
34
+ module V1
35
+ ##
36
+ # Service to retrieve account limits.
37
+ #
38
+ # @example Load this service and instantiate a gRPC client
39
+ #
40
+ # require "google/shopping/merchant/quota/v1/account_limits_service"
41
+ # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new
42
+ #
43
+ # @example Load this service and instantiate a REST client
44
+ #
45
+ # require "google/shopping/merchant/quota/v1/account_limits_service/rest"
46
+ # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new
47
+ #
48
+ module AccountLimitsService
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+
56
+ helper_path = ::File.join __dir__, "account_limits_service", "helpers.rb"
57
+ require "google/shopping/merchant/quota/v1/account_limits_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/shopping/merchant/quota/v1/accountlimits.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
11
+
12
+
13
+ descriptor_data = "\n5google/shopping/merchant/quota/v1/accountlimits.proto\x12!google.shopping.merchant.quota.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xab\x01\n\x0cProductLimit\x12I\n\x05scope\x18\x01 \x01(\x0e\x32\x35.google.shopping.merchant.quota.v1.ProductLimit.ScopeB\x03\xe0\x41\x02\x12\x12\n\x05limit\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"<\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41\x44S_NON_EEA\x10\x01\x12\x0b\n\x07\x41\x44S_EEA\x10\x02\"\xdc\x01\n\x0c\x41\x63\x63ountLimit\x12\x43\n\x08products\x18\x64 \x01(\x0b\x32/.google.shopping.merchant.quota.v1.ProductLimitH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:l\xea\x41i\n\'merchantapi.googleapis.com/AccountLimit\x12!accounts/{account}/limits/{limit}*\raccountLimits2\x0c\x61\x63\x63ountLimitB\x06\n\x04type\"W\n\x16GetAccountLimitRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/AccountLimit\"\x9c\x01\n\x18ListAccountLimitsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x02\"}\n\x19ListAccountLimitsResponse\x12G\n\x0e\x61\x63\x63ount_limits\x18\x01 \x03(\x0b\x32/.google.shopping.merchant.quota.v1.AccountLimit\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe2\x03\n\x14\x41\x63\x63ountLimitsService\x12\xb5\x01\n\x0fGetAccountLimit\x12\x39.google.shopping.merchant.quota.v1.GetAccountLimitRequest\x1a/.google.shopping.merchant.quota.v1.AccountLimit\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/accounts/v1/{name=accounts/*/limits/*}\x12\xc8\x01\n\x11ListAccountLimits\x12;.google.shopping.merchant.quota.v1.ListAccountLimitsRequest\x1a<.google.shopping.merchant.quota.v1.ListAccountLimitsResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/accounts/v1/{parent=accounts/*}/limits\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xf0\x01\n%com.google.shopping.merchant.quota.v1B\x12\x41\x63\x63ountLimitsProtoP\x01ZAcloud.google.com/go/shopping/merchant/quota/apiv1/quotapb;quotapb\xaa\x02!Google.Shopping.Merchant.Quota.V1\xca\x02!Google\\Shopping\\Merchant\\Quota\\V1\xea\x02%Google::Shopping::Merchant::Quota::V1b\x06proto3"
14
+
15
+ pool = Google::Protobuf::DescriptorPool.generated_pool
16
+
17
+ begin
18
+ pool.add_serialized_file(descriptor_data)
19
+ rescue TypeError
20
+ # Compatibility code: will be removed in the next major version.
21
+ require 'google/protobuf/descriptor_pb'
22
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
23
+ parsed.clear_dependency
24
+ serialized = parsed.class.encode(parsed)
25
+ file = pool.add_serialized_file(serialized)
26
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
27
+ imports = [
28
+ ]
29
+ imports.each do |type_name, expected_filename|
30
+ import_file = pool.lookup(type_name).file_descriptor
31
+ if import_file.name != expected_filename
32
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
33
+ end
34
+ end
35
+ warn "Each proto file must use a consistent fully-qualified name."
36
+ warn "This will become an error in the next major version."
37
+ end
38
+
39
+ module Google
40
+ module Shopping
41
+ module Merchant
42
+ module Quota
43
+ module V1
44
+ ProductLimit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ProductLimit").msgclass
45
+ ProductLimit::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ProductLimit.Scope").enummodule
46
+ AccountLimit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.AccountLimit").msgclass
47
+ GetAccountLimitRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.GetAccountLimitRequest").msgclass
48
+ ListAccountLimitsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ListAccountLimitsRequest").msgclass
49
+ ListAccountLimitsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ListAccountLimitsResponse").msgclass
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,49 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/shopping/merchant/quota/v1/accountlimits.proto for package 'Google.Shopping.Merchant.Quota.V1'
3
+ # Original file comments:
4
+ # Copyright 2025 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/shopping/merchant/quota/v1/accountlimits_pb'
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Quota
26
+ module V1
27
+ module AccountLimitsService
28
+ # Service to retrieve account limits.
29
+ class Service
30
+
31
+ include ::GRPC::GenericService
32
+
33
+ self.marshal_class_method = :encode
34
+ self.unmarshal_class_method = :decode
35
+ self.service_name = 'google.shopping.merchant.quota.v1.AccountLimitsService'
36
+
37
+ # Retrieves an account limit.
38
+ rpc :GetAccountLimit, ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest, ::Google::Shopping::Merchant::Quota::V1::AccountLimit
39
+ # Lists the limits of an account.
40
+ rpc :ListAccountLimits, ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest, ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse
41
+ end
42
+
43
+ Stub = Service.rpc_stub_class
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -323,8 +323,6 @@ module Google
323
323
  # @return [::String,nil]
324
324
  # @!attribute [rw] credentials
325
325
  # Credentials to send with calls. You may provide any of the following types:
326
- # * (`String`) The path to a service account key file in JSON format
327
- # * (`Hash`) A service account key as a Hash
328
326
  # * (`Google::Auth::Credentials`) A googleauth credentials object
329
327
  # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
330
328
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
@@ -333,7 +331,26 @@ module Google
333
331
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
334
332
  # * (`nil`) indicating no credentials
335
333
  #
336
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
334
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
335
+ # is deprecated. Providing an unvalidated credential configuration to
336
+ # Google APIs can compromise the security of your systems and data.
337
+ #
338
+ # @example
339
+ #
340
+ # # The recommended way to provide credentials is to use the `make_creds` method
341
+ # # on the appropriate credentials class for your environment.
342
+ #
343
+ # require "googleauth"
344
+ #
345
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
346
+ # json_key_io: ::File.open("/path/to/keyfile.json")
347
+ # )
348
+ #
349
+ # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config|
350
+ # config.credentials = credentials
351
+ # end
352
+ #
353
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
337
354
  # external source for authentication to Google Cloud, you must validate it before
338
355
  # providing it to a Google API client library. Providing an unvalidated credential
339
356
  # configuration to Google APIs can compromise the security of your systems and data.
@@ -16,6 +16,7 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
+ require "google/shopping/merchant/quota/v1/account_limits_service/rest"
19
20
  require "google/shopping/merchant/quota/v1/quota_service/rest"
20
21
  require "google/shopping/merchant/quota/v1/version"
21
22
 
@@ -29,7 +30,7 @@ module Google
29
30
  # @example
30
31
  #
31
32
  # require "google/shopping/merchant/quota/v1/rest"
32
- # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new
33
+ # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new
33
34
  #
34
35
  module V1
35
36
  end
@@ -22,7 +22,7 @@ module Google
22
22
  module Merchant
23
23
  module Quota
24
24
  module V1
25
- VERSION = "0.2.0"
25
+ VERSION = "0.3.0"
26
26
  end
27
27
  end
28
28
  end
@@ -16,6 +16,7 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
+ require "google/shopping/merchant/quota/v1/account_limits_service"
19
20
  require "google/shopping/merchant/quota/v1/quota_service"
20
21
  require "google/shopping/merchant/quota/v1/version"
21
22
 
@@ -29,12 +30,12 @@ module Google
29
30
  # @example Load this package, including all its services, and instantiate a gRPC client
30
31
  #
31
32
  # require "google/shopping/merchant/quota/v1"
32
- # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new
33
+ # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new
33
34
  #
34
35
  # @example Load this package, including all its services, and instantiate a REST client
35
36
  #
36
37
  # require "google/shopping/merchant/quota/v1"
37
- # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new
38
+ # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new
38
39
  #
39
40
  module V1
40
41
  end
@@ -0,0 +1,118 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Shopping
22
+ module Merchant
23
+ module Quota
24
+ module V1
25
+ # The limit for products.
26
+ # @!attribute [rw] scope
27
+ # @return [::Google::Shopping::Merchant::Quota::V1::ProductLimit::Scope]
28
+ # Required. The scope of the product limit.
29
+ # @!attribute [rw] limit
30
+ # @return [::Integer]
31
+ # Required. The maximum number of products that are allowed in the account in
32
+ # the given scope.
33
+ class ProductLimit
34
+ include ::Google::Protobuf::MessageExts
35
+ extend ::Google::Protobuf::MessageExts::ClassMethods
36
+
37
+ # The scope of the limit.
38
+ module Scope
39
+ # Default value. Should not be used.
40
+ SCOPE_UNSPECIFIED = 0
41
+
42
+ # Limit for products in non-EEA countries.
43
+ ADS_NON_EEA = 1
44
+
45
+ # Limit for products in EEA countries.
46
+ ADS_EEA = 2
47
+ end
48
+ end
49
+
50
+ # A limit of a certain type that is applied to an account.
51
+ # @!attribute [rw] products
52
+ # @return [::Google::Shopping::Merchant::Quota::V1::ProductLimit]
53
+ # The limit for products.
54
+ # @!attribute [rw] name
55
+ # @return [::String]
56
+ # Identifier. The limit part of the name will be a combination of the type
57
+ # and the scope. For example: `accounts/123/limits/products~ADS_NON_EEA`
58
+ #
59
+ # Format: `accounts/{account}/limits/{limit}`
60
+ class AccountLimit
61
+ include ::Google::Protobuf::MessageExts
62
+ extend ::Google::Protobuf::MessageExts::ClassMethods
63
+ end
64
+
65
+ # Request message for the `GetAccountLimit` method.
66
+ # @!attribute [rw] name
67
+ # @return [::String]
68
+ # Required. The name of the limit to retrieve.
69
+ # Format: `accounts/{account}/limits/{limit}`
70
+ # For example: `accounts/123/limits/products~ADS_NON_EEA`
71
+ class GetAccountLimitRequest
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
+ end
75
+
76
+ # Request message for the `ListAccountLimits` method.
77
+ # @!attribute [rw] parent
78
+ # @return [::String]
79
+ # Required. The parent account.
80
+ # Format: `accounts/{account}`
81
+ # @!attribute [rw] page_size
82
+ # @return [::Integer]
83
+ # Optional. The maximum number of limits to return. The service may return
84
+ # fewer than this value. If unspecified, at most 100 limits will be returned.
85
+ # The maximum value is 100; values above 100 will be coerced to 100.
86
+ # @!attribute [rw] page_token
87
+ # @return [::String]
88
+ # Optional. A page token, received from a previous `ListAccountLimits` call.
89
+ # Provide this to retrieve the subsequent page.
90
+ #
91
+ # When paginating, all other parameters provided to `ListAccountLimits` must
92
+ # match the call that provided the page token.
93
+ # @!attribute [rw] filter
94
+ # @return [::String]
95
+ # Required. A filter on the limit `type` is required, for example, `type =
96
+ # "products"`.
97
+ class ListAccountLimitsRequest
98
+ include ::Google::Protobuf::MessageExts
99
+ extend ::Google::Protobuf::MessageExts::ClassMethods
100
+ end
101
+
102
+ # Response message for the `ListAccountLimits` method.
103
+ # @!attribute [rw] account_limits
104
+ # @return [::Array<::Google::Shopping::Merchant::Quota::V1::AccountLimit>]
105
+ # The limits for the given account.
106
+ # @!attribute [rw] next_page_token
107
+ # @return [::String]
108
+ # A token, which can be sent as `page_token` to retrieve the next page.
109
+ # If this field is omitted, there are no subsequent pages.
110
+ class ListAccountLimitsResponse
111
+ include ::Google::Protobuf::MessageExts
112
+ extend ::Google::Protobuf::MessageExts::ClassMethods
113
+ end
114
+ end
115
+ end
116
+ end
117
+ end
118
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-shopping-merchant-quota-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -64,6 +64,15 @@ files:
64
64
  - README.md
65
65
  - lib/google-shopping-merchant-quota-v1.rb
66
66
  - lib/google/shopping/merchant/quota/v1.rb
67
+ - lib/google/shopping/merchant/quota/v1/account_limits_service.rb
68
+ - lib/google/shopping/merchant/quota/v1/account_limits_service/client.rb
69
+ - lib/google/shopping/merchant/quota/v1/account_limits_service/credentials.rb
70
+ - lib/google/shopping/merchant/quota/v1/account_limits_service/paths.rb
71
+ - lib/google/shopping/merchant/quota/v1/account_limits_service/rest.rb
72
+ - lib/google/shopping/merchant/quota/v1/account_limits_service/rest/client.rb
73
+ - lib/google/shopping/merchant/quota/v1/account_limits_service/rest/service_stub.rb
74
+ - lib/google/shopping/merchant/quota/v1/accountlimits_pb.rb
75
+ - lib/google/shopping/merchant/quota/v1/accountlimits_services_pb.rb
67
76
  - lib/google/shopping/merchant/quota/v1/quota_pb.rb
68
77
  - lib/google/shopping/merchant/quota/v1/quota_service.rb
69
78
  - lib/google/shopping/merchant/quota/v1/quota_service/client.rb
@@ -81,6 +90,7 @@ files:
81
90
  - proto_docs/google/api/launch_stage.rb
82
91
  - proto_docs/google/api/resource.rb
83
92
  - proto_docs/google/protobuf/duration.rb
93
+ - proto_docs/google/shopping/merchant/quota/v1/accountlimits.rb
84
94
  - proto_docs/google/shopping/merchant/quota/v1/quota.rb
85
95
  homepage: https://github.com/googleapis/google-cloud-ruby
86
96
  licenses: