google-shopping-merchant-products-v1beta 0.a → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +143 -8
  5. data/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb +547 -0
  6. data/lib/google/shopping/merchant/products/v1beta/product_inputs_service/credentials.rb +49 -0
  7. data/lib/google/shopping/merchant/products/v1beta/product_inputs_service/paths.rb +66 -0
  8. data/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb +507 -0
  9. data/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.rb +190 -0
  10. data/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest.rb +55 -0
  11. data/lib/google/shopping/merchant/products/v1beta/product_inputs_service.rb +58 -0
  12. data/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb +56 -0
  13. data/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb +58 -0
  14. data/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb +75 -0
  15. data/lib/google/shopping/merchant/products/v1beta/products_pb.rb +56 -0
  16. data/lib/google/shopping/merchant/products/v1beta/products_service/client.rb +552 -0
  17. data/lib/google/shopping/merchant/products/v1beta/products_service/credentials.rb +49 -0
  18. data/lib/google/shopping/merchant/products/v1beta/products_service/paths.rb +66 -0
  19. data/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb +512 -0
  20. data/lib/google/shopping/merchant/products/v1beta/products_service/rest/service_stub.rb +189 -0
  21. data/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb +55 -0
  22. data/lib/google/shopping/merchant/products/v1beta/products_service.rb +58 -0
  23. data/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb +58 -0
  24. data/lib/google/shopping/merchant/products/v1beta/rest.rb +40 -0
  25. data/lib/google/shopping/merchant/products/v1beta/version.rb +7 -2
  26. data/lib/google/shopping/merchant/products/v1beta.rb +48 -0
  27. data/lib/google-shopping-merchant-products-v1beta.rb +21 -0
  28. data/proto_docs/README.md +4 -0
  29. data/proto_docs/google/api/client.rb +420 -0
  30. data/proto_docs/google/api/field_behavior.rb +85 -0
  31. data/proto_docs/google/api/launch_stage.rb +71 -0
  32. data/proto_docs/google/api/resource.rb +227 -0
  33. data/proto_docs/google/protobuf/duration.rb +98 -0
  34. data/proto_docs/google/protobuf/empty.rb +34 -0
  35. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  36. data/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb +152 -0
  37. data/proto_docs/google/shopping/merchant/products/v1beta/products.rb +152 -0
  38. data/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb +899 -0
  39. data/proto_docs/google/shopping/type/types.rb +210 -0
  40. data/proto_docs/google/type/interval.rb +45 -0
  41. metadata +100 -10
@@ -0,0 +1,189 @@
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/shopping/merchant/products/v1beta/products_pb"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module Products
25
+ module V1beta
26
+ module ProductsService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the ProductsService service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
40
+ endpoint_template: endpoint_template,
41
+ universe_domain: universe_domain,
42
+ credentials: credentials,
43
+ numeric_enums: true,
44
+ raise_faraday_errors: false
45
+ end
46
+
47
+ ##
48
+ # The effective universe domain
49
+ #
50
+ # @return [String]
51
+ #
52
+ def universe_domain
53
+ @client_stub.universe_domain
54
+ end
55
+
56
+ ##
57
+ # The effective endpoint
58
+ #
59
+ # @return [String]
60
+ #
61
+ def endpoint
62
+ @client_stub.endpoint
63
+ end
64
+
65
+ ##
66
+ # Baseline implementation for the get_product REST call
67
+ #
68
+ # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::GetProductRequest]
69
+ # A request object representing the call parameters. Required.
70
+ # @param options [::Gapic::CallOptions]
71
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
72
+ #
73
+ # @yield [result, operation] Access the result along with the TransportOperation object
74
+ # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::Product]
75
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
76
+ #
77
+ # @return [::Google::Shopping::Merchant::Products::V1beta::Product]
78
+ # A result object deserialized from the server's reply
79
+ def get_product request_pb, options = nil
80
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
81
+
82
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_product_request request_pb
83
+ query_string_params = if query_string_params.any?
84
+ query_string_params.to_h { |p| p.split "=", 2 }
85
+ else
86
+ {}
87
+ end
88
+
89
+ response = @client_stub.make_http_request(
90
+ verb,
91
+ uri: uri,
92
+ body: body || "",
93
+ params: query_string_params,
94
+ options: options
95
+ )
96
+ operation = ::Gapic::Rest::TransportOperation.new response
97
+ result = ::Google::Shopping::Merchant::Products::V1beta::Product.decode_json response.body, ignore_unknown_fields: true
98
+
99
+ yield result, operation if block_given?
100
+ result
101
+ end
102
+
103
+ ##
104
+ # Baseline implementation for the list_products REST call
105
+ #
106
+ # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest]
107
+ # A request object representing the call parameters. Required.
108
+ # @param options [::Gapic::CallOptions]
109
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
110
+ #
111
+ # @yield [result, operation] Access the result along with the TransportOperation object
112
+ # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse]
113
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
114
+ #
115
+ # @return [::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse]
116
+ # A result object deserialized from the server's reply
117
+ def list_products request_pb, options = nil
118
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
119
+
120
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_products_request request_pb
121
+ query_string_params = if query_string_params.any?
122
+ query_string_params.to_h { |p| p.split "=", 2 }
123
+ else
124
+ {}
125
+ end
126
+
127
+ response = @client_stub.make_http_request(
128
+ verb,
129
+ uri: uri,
130
+ body: body || "",
131
+ params: query_string_params,
132
+ options: options
133
+ )
134
+ operation = ::Gapic::Rest::TransportOperation.new response
135
+ result = ::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse.decode_json response.body, ignore_unknown_fields: true
136
+
137
+ yield result, operation if block_given?
138
+ result
139
+ end
140
+
141
+ ##
142
+ # @private
143
+ #
144
+ # GRPC transcoding helper method for the get_product REST call
145
+ #
146
+ # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::GetProductRequest]
147
+ # A request object representing the call parameters. Required.
148
+ # @return [Array(String, [String, nil], Hash{String => String})]
149
+ # Uri, Body, Query string parameters
150
+ def self.transcode_get_product_request request_pb
151
+ transcoder = Gapic::Rest::GrpcTranscoder.new
152
+ .with_bindings(
153
+ uri_method: :get,
154
+ uri_template: "/products/v1beta/{name}",
155
+ matches: [
156
+ ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false]
157
+ ]
158
+ )
159
+ transcoder.transcode request_pb
160
+ end
161
+
162
+ ##
163
+ # @private
164
+ #
165
+ # GRPC transcoding helper method for the list_products REST call
166
+ #
167
+ # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest]
168
+ # A request object representing the call parameters. Required.
169
+ # @return [Array(String, [String, nil], Hash{String => String})]
170
+ # Uri, Body, Query string parameters
171
+ def self.transcode_list_products_request request_pb
172
+ transcoder = Gapic::Rest::GrpcTranscoder.new
173
+ .with_bindings(
174
+ uri_method: :get,
175
+ uri_template: "/products/v1beta/{parent}/products",
176
+ matches: [
177
+ ["parent", %r{^accounts/[^/]+/?$}, false]
178
+ ]
179
+ )
180
+ transcoder.transcode request_pb
181
+ end
182
+ end
183
+ end
184
+ end
185
+ end
186
+ end
187
+ end
188
+ end
189
+ end
@@ -0,0 +1,55 @@
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 "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/shopping/merchant/products/v1beta/version"
24
+
25
+ require "google/shopping/merchant/products/v1beta/products_service/credentials"
26
+ require "google/shopping/merchant/products/v1beta/products_service/paths"
27
+ require "google/shopping/merchant/products/v1beta/products_service/rest/client"
28
+
29
+ module Google
30
+ module Shopping
31
+ module Merchant
32
+ module Products
33
+ module V1beta
34
+ ##
35
+ # Service to use Product resource.
36
+ # This service works for products with online channel only.
37
+ #
38
+ # To load this service and instantiate a REST client:
39
+ #
40
+ # require "google/shopping/merchant/products/v1beta/products_service/rest"
41
+ # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new
42
+ #
43
+ module ProductsService
44
+ # Client for the REST transport
45
+ module Rest
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
55
+ require "google/shopping/merchant/products/v1beta/products_service/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,58 @@
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 "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/shopping/merchant/products/v1beta/version"
24
+
25
+ require "google/shopping/merchant/products/v1beta/products_service/credentials"
26
+ require "google/shopping/merchant/products/v1beta/products_service/paths"
27
+ require "google/shopping/merchant/products/v1beta/products_service/client"
28
+ require "google/shopping/merchant/products/v1beta/products_service/rest"
29
+
30
+ module Google
31
+ module Shopping
32
+ module Merchant
33
+ module Products
34
+ module V1beta
35
+ ##
36
+ # Service to use Product resource.
37
+ # This service works for products with online channel only.
38
+ #
39
+ # @example Load this service and instantiate a gRPC client
40
+ #
41
+ # require "google/shopping/merchant/products/v1beta/products_service"
42
+ # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new
43
+ #
44
+ # @example Load this service and instantiate a REST client
45
+ #
46
+ # require "google/shopping/merchant/products/v1beta/products_service/rest"
47
+ # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new
48
+ #
49
+ module ProductsService
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+
57
+ helper_path = ::File.join __dir__, "products_service", "helpers.rb"
58
+ require "google/shopping/merchant/products/v1beta/products_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,58 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/shopping/merchant/products/v1beta/products.proto for package 'google.shopping.merchant.products.v1beta'
3
+ # Original file comments:
4
+ # Copyright 2024 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/products/v1beta/products_pb'
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Products
26
+ module V1beta
27
+ module ProductsService
28
+ # Service to use Product resource.
29
+ # This service works for products with online channel only.
30
+ class Service
31
+
32
+ include ::GRPC::GenericService
33
+
34
+ self.marshal_class_method = :encode
35
+ self.unmarshal_class_method = :decode
36
+ self.service_name = 'google.shopping.merchant.products.v1beta.ProductsService'
37
+
38
+ # Retrieves the processed product from your Merchant Center account.
39
+ #
40
+ # After inserting, updating, or deleting a product input, it may take several
41
+ # minutes before the updated final product can be retrieved.
42
+ rpc :GetProduct, ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest, ::Google::Shopping::Merchant::Products::V1beta::Product
43
+ # Lists the processed products in your Merchant Center account. The response
44
+ # might contain fewer items than specified by pageSize. Rely on pageToken to
45
+ # determine if there are more items to be requested.
46
+ #
47
+ # After inserting, updating, or deleting a product input, it may take several
48
+ # minutes before the updated processed product can be retrieved.
49
+ rpc :ListProducts, ::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest, ::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse
50
+ end
51
+
52
+ Stub = Service.rpc_stub_class
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,40 @@
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/shopping/merchant/products/v1beta/product_inputs_service/rest"
20
+ require "google/shopping/merchant/products/v1beta/products_service/rest"
21
+ require "google/shopping/merchant/products/v1beta/version"
22
+
23
+ module Google
24
+ module Shopping
25
+ module Merchant
26
+ module Products
27
+ ##
28
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
29
+ #
30
+ # @example
31
+ #
32
+ # require "google/shopping/merchant/products/v1beta/rest"
33
+ # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new
34
+ #
35
+ module V1beta
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright 2024 Google LLC
2
4
  #
3
5
  # Licensed under the Apache License, Version 2.0 (the "License");
4
6
  # you may not use this file except in compliance with the License.
5
7
  # You may obtain a copy of the License at
6
8
  #
7
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # https://www.apache.org/licenses/LICENSE-2.0
8
10
  #
9
11
  # Unless required by applicable law or agreed to in writing, software
10
12
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -12,12 +14,15 @@
12
14
  # See the License for the specific language governing permissions and
13
15
  # limitations under the License.
14
16
 
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
15
20
  module Google
16
21
  module Shopping
17
22
  module Merchant
18
23
  module Products
19
24
  module V1beta
20
- VERSION = "0.a"
25
+ VERSION = "0.1.2"
21
26
  end
22
27
  end
23
28
  end
@@ -0,0 +1,48 @@
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/shopping/merchant/products/v1beta/product_inputs_service"
20
+ require "google/shopping/merchant/products/v1beta/products_service"
21
+ require "google/shopping/merchant/products/v1beta/version"
22
+
23
+ module Google
24
+ module Shopping
25
+ module Merchant
26
+ module Products
27
+ ##
28
+ # API client module.
29
+ #
30
+ # @example Load this package, including all its services, and instantiate a gRPC client
31
+ #
32
+ # require "google/shopping/merchant/products/v1beta"
33
+ # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new
34
+ #
35
+ # @example Load this package, including all its services, and instantiate a REST client
36
+ #
37
+ # require "google/shopping/merchant/products/v1beta"
38
+ # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new
39
+ #
40
+ module V1beta
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+
47
+ helper_path = ::File.join __dir__, "v1beta", "_helpers.rb"
48
+ require "google/shopping/merchant/products/v1beta/_helpers" if ::File.file? helper_path
@@ -0,0 +1,21 @@
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
+ # This gem does not autoload during Bundler.require. To load this gem,
20
+ # issue explicit require statements for the packages desired, e.g.:
21
+ # require "google/shopping/merchant/products/v1beta"
@@ -0,0 +1,4 @@
1
+ # Merchant V1BETA Protocol Buffer Documentation
2
+
3
+ These files are for the YARD documentation of the generated protobuf files.
4
+ They are not intended to be required or loaded at runtime.