google-shopping-merchant-products-v1beta 0.a → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +144 -8
- data/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb +547 -0
- data/lib/google/shopping/merchant/products/v1beta/product_inputs_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/products/v1beta/product_inputs_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb +507 -0
- data/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.rb +190 -0
- data/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest.rb +55 -0
- data/lib/google/shopping/merchant/products/v1beta/product_inputs_service.rb +58 -0
- data/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb +56 -0
- data/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb +58 -0
- data/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb +75 -0
- data/lib/google/shopping/merchant/products/v1beta/products_pb.rb +56 -0
- data/lib/google/shopping/merchant/products/v1beta/products_service/client.rb +552 -0
- data/lib/google/shopping/merchant/products/v1beta/products_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/products/v1beta/products_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb +512 -0
- data/lib/google/shopping/merchant/products/v1beta/products_service/rest/service_stub.rb +189 -0
- data/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb +55 -0
- data/lib/google/shopping/merchant/products/v1beta/products_service.rb +58 -0
- data/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb +58 -0
- data/lib/google/shopping/merchant/products/v1beta/rest.rb +40 -0
- data/lib/google/shopping/merchant/products/v1beta/version.rb +7 -2
- data/lib/google/shopping/merchant/products/v1beta.rb +48 -0
- data/lib/google-shopping-merchant-products-v1beta.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +399 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb +152 -0
- data/proto_docs/google/shopping/merchant/products/v1beta/products.rb +152 -0
- data/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb +899 -0
- data/proto_docs/google/shopping/type/types.rb +210 -0
- data/proto_docs/google/type/interval.rb +45 -0
- metadata +100 -10
@@ -0,0 +1,222 @@
|
|
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
|
+
|
20
|
+
module Google
|
21
|
+
module Api
|
22
|
+
# A simple descriptor of a resource type.
|
23
|
+
#
|
24
|
+
# ResourceDescriptor annotates a resource message (either by means of a
|
25
|
+
# protobuf annotation or use in the service config), and associates the
|
26
|
+
# resource's schema, the resource type, and the pattern of the resource name.
|
27
|
+
#
|
28
|
+
# Example:
|
29
|
+
#
|
30
|
+
# message Topic {
|
31
|
+
# // Indicates this message defines a resource schema.
|
32
|
+
# // Declares the resource type in the format of {service}/{kind}.
|
33
|
+
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
|
+
# option (google.api.resource) = {
|
35
|
+
# type: "pubsub.googleapis.com/Topic"
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
37
|
+
# };
|
38
|
+
# }
|
39
|
+
#
|
40
|
+
# The ResourceDescriptor Yaml config will look like:
|
41
|
+
#
|
42
|
+
# resources:
|
43
|
+
# - type: "pubsub.googleapis.com/Topic"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
45
|
+
#
|
46
|
+
# Sometimes, resources have multiple patterns, typically because they can
|
47
|
+
# live under multiple parents.
|
48
|
+
#
|
49
|
+
# Example:
|
50
|
+
#
|
51
|
+
# message LogEntry {
|
52
|
+
# option (google.api.resource) = {
|
53
|
+
# type: "logging.googleapis.com/LogEntry"
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
58
|
+
# };
|
59
|
+
# }
|
60
|
+
#
|
61
|
+
# The ResourceDescriptor Yaml config will look like:
|
62
|
+
#
|
63
|
+
# resources:
|
64
|
+
# - type: 'logging.googleapis.com/LogEntry'
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
69
|
+
# @!attribute [rw] type
|
70
|
+
# @return [::String]
|
71
|
+
# The resource type. It must be in the format of
|
72
|
+
# \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
|
73
|
+
# singular and must not include version numbers.
|
74
|
+
#
|
75
|
+
# Example: `storage.googleapis.com/Bucket`
|
76
|
+
#
|
77
|
+
# The value of the resource_type_kind must follow the regular expression
|
78
|
+
# /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
|
79
|
+
# should use PascalCase (UpperCamelCase). The maximum number of
|
80
|
+
# characters allowed for the `resource_type_kind` is 100.
|
81
|
+
# @!attribute [rw] pattern
|
82
|
+
# @return [::Array<::String>]
|
83
|
+
# Optional. The relative resource name pattern associated with this resource
|
84
|
+
# type. The DNS prefix of the full resource name shouldn't be specified here.
|
85
|
+
#
|
86
|
+
# The path pattern must follow the syntax, which aligns with HTTP binding
|
87
|
+
# syntax:
|
88
|
+
#
|
89
|
+
# Template = Segment { "/" Segment } ;
|
90
|
+
# Segment = LITERAL | Variable ;
|
91
|
+
# Variable = "{" LITERAL "}" ;
|
92
|
+
#
|
93
|
+
# Examples:
|
94
|
+
#
|
95
|
+
# - "projects/\\{project}/topics/\\{topic}"
|
96
|
+
# - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
|
97
|
+
#
|
98
|
+
# The components in braces correspond to the IDs for each resource in the
|
99
|
+
# hierarchy. It is expected that, if multiple patterns are provided,
|
100
|
+
# the same component name (e.g. "project") refers to IDs of the same
|
101
|
+
# type of resource.
|
102
|
+
# @!attribute [rw] name_field
|
103
|
+
# @return [::String]
|
104
|
+
# Optional. The field on the resource that designates the resource name
|
105
|
+
# field. If omitted, this is assumed to be "name".
|
106
|
+
# @!attribute [rw] history
|
107
|
+
# @return [::Google::Api::ResourceDescriptor::History]
|
108
|
+
# Optional. The historical or future-looking state of the resource pattern.
|
109
|
+
#
|
110
|
+
# Example:
|
111
|
+
#
|
112
|
+
# // The InspectTemplate message originally only supported resource
|
113
|
+
# // names with organization, and project was added later.
|
114
|
+
# message InspectTemplate {
|
115
|
+
# option (google.api.resource) = {
|
116
|
+
# type: "dlp.googleapis.com/InspectTemplate"
|
117
|
+
# pattern:
|
118
|
+
# "organizations/{organization}/inspectTemplates/{inspect_template}"
|
119
|
+
# pattern: "projects/{project}/inspectTemplates/{inspect_template}"
|
120
|
+
# history: ORIGINALLY_SINGLE_PATTERN
|
121
|
+
# };
|
122
|
+
# }
|
123
|
+
# @!attribute [rw] plural
|
124
|
+
# @return [::String]
|
125
|
+
# The plural name used in the resource name and permission names, such as
|
126
|
+
# 'projects' for the resource name of 'projects/\\{project}' and the permission
|
127
|
+
# name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
|
128
|
+
# concept of the `plural` field in k8s CRD spec
|
129
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
130
|
+
#
|
131
|
+
# Note: The plural form is required even for singleton resources. See
|
132
|
+
# https://aip.dev/156
|
133
|
+
# @!attribute [rw] singular
|
134
|
+
# @return [::String]
|
135
|
+
# The same concept of the `singular` field in k8s CRD spec
|
136
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
137
|
+
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
138
|
+
# @!attribute [rw] style
|
139
|
+
# @return [::Array<::Google::Api::ResourceDescriptor::Style>]
|
140
|
+
# Style flag(s) for this resource.
|
141
|
+
# These indicate that a resource is expected to conform to a given
|
142
|
+
# style. See the specific style flags for additional information.
|
143
|
+
class ResourceDescriptor
|
144
|
+
include ::Google::Protobuf::MessageExts
|
145
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
146
|
+
|
147
|
+
# A description of the historical or future-looking state of the
|
148
|
+
# resource pattern.
|
149
|
+
module History
|
150
|
+
# The "unset" value.
|
151
|
+
HISTORY_UNSPECIFIED = 0
|
152
|
+
|
153
|
+
# The resource originally had one pattern and launched as such, and
|
154
|
+
# additional patterns were added later.
|
155
|
+
ORIGINALLY_SINGLE_PATTERN = 1
|
156
|
+
|
157
|
+
# The resource has one pattern, but the API owner expects to add more
|
158
|
+
# later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
|
159
|
+
# that from being necessary once there are multiple patterns.)
|
160
|
+
FUTURE_MULTI_PATTERN = 2
|
161
|
+
end
|
162
|
+
|
163
|
+
# A flag representing a specific style that a resource claims to conform to.
|
164
|
+
module Style
|
165
|
+
# The unspecified value. Do not use.
|
166
|
+
STYLE_UNSPECIFIED = 0
|
167
|
+
|
168
|
+
# This resource is intended to be "declarative-friendly".
|
169
|
+
#
|
170
|
+
# Declarative-friendly resources must be more strictly consistent, and
|
171
|
+
# setting this to true communicates to tools that this resource should
|
172
|
+
# adhere to declarative-friendly expectations.
|
173
|
+
#
|
174
|
+
# Note: This is used by the API linter (linter.aip.dev) to enable
|
175
|
+
# additional checks.
|
176
|
+
DECLARATIVE_FRIENDLY = 1
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# Defines a proto annotation that describes a string field that refers to
|
181
|
+
# an API resource.
|
182
|
+
# @!attribute [rw] type
|
183
|
+
# @return [::String]
|
184
|
+
# The resource type that the annotated field references.
|
185
|
+
#
|
186
|
+
# Example:
|
187
|
+
#
|
188
|
+
# message Subscription {
|
189
|
+
# string topic = 2 [(google.api.resource_reference) = {
|
190
|
+
# type: "pubsub.googleapis.com/Topic"
|
191
|
+
# }];
|
192
|
+
# }
|
193
|
+
#
|
194
|
+
# Occasionally, a field may reference an arbitrary resource. In this case,
|
195
|
+
# APIs use the special value * in their resource reference.
|
196
|
+
#
|
197
|
+
# Example:
|
198
|
+
#
|
199
|
+
# message GetIamPolicyRequest {
|
200
|
+
# string resource = 2 [(google.api.resource_reference) = {
|
201
|
+
# type: "*"
|
202
|
+
# }];
|
203
|
+
# }
|
204
|
+
# @!attribute [rw] child_type
|
205
|
+
# @return [::String]
|
206
|
+
# The resource type of a child collection that the annotated field
|
207
|
+
# references. This is useful for annotating the `parent` field that
|
208
|
+
# doesn't have a fixed resource type.
|
209
|
+
#
|
210
|
+
# Example:
|
211
|
+
#
|
212
|
+
# message ListLogEntriesRequest {
|
213
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
214
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
215
|
+
# };
|
216
|
+
# }
|
217
|
+
class ResourceReference
|
218
|
+
include ::Google::Protobuf::MessageExts
|
219
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
@@ -0,0 +1,98 @@
|
|
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
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# A Duration represents a signed, fixed-length span of time represented
|
23
|
+
# as a count of seconds and fractions of seconds at nanosecond
|
24
|
+
# resolution. It is independent of any calendar and concepts like "day"
|
25
|
+
# or "month". It is related to Timestamp in that the difference between
|
26
|
+
# two Timestamp values is a Duration and it can be added or subtracted
|
27
|
+
# from a Timestamp. Range is approximately +-10,000 years.
|
28
|
+
#
|
29
|
+
# # Examples
|
30
|
+
#
|
31
|
+
# Example 1: Compute Duration from two Timestamps in pseudo code.
|
32
|
+
#
|
33
|
+
# Timestamp start = ...;
|
34
|
+
# Timestamp end = ...;
|
35
|
+
# Duration duration = ...;
|
36
|
+
#
|
37
|
+
# duration.seconds = end.seconds - start.seconds;
|
38
|
+
# duration.nanos = end.nanos - start.nanos;
|
39
|
+
#
|
40
|
+
# if (duration.seconds < 0 && duration.nanos > 0) {
|
41
|
+
# duration.seconds += 1;
|
42
|
+
# duration.nanos -= 1000000000;
|
43
|
+
# } else if (duration.seconds > 0 && duration.nanos < 0) {
|
44
|
+
# duration.seconds -= 1;
|
45
|
+
# duration.nanos += 1000000000;
|
46
|
+
# }
|
47
|
+
#
|
48
|
+
# Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
49
|
+
#
|
50
|
+
# Timestamp start = ...;
|
51
|
+
# Duration duration = ...;
|
52
|
+
# Timestamp end = ...;
|
53
|
+
#
|
54
|
+
# end.seconds = start.seconds + duration.seconds;
|
55
|
+
# end.nanos = start.nanos + duration.nanos;
|
56
|
+
#
|
57
|
+
# if (end.nanos < 0) {
|
58
|
+
# end.seconds -= 1;
|
59
|
+
# end.nanos += 1000000000;
|
60
|
+
# } else if (end.nanos >= 1000000000) {
|
61
|
+
# end.seconds += 1;
|
62
|
+
# end.nanos -= 1000000000;
|
63
|
+
# }
|
64
|
+
#
|
65
|
+
# Example 3: Compute Duration from datetime.timedelta in Python.
|
66
|
+
#
|
67
|
+
# td = datetime.timedelta(days=3, minutes=10)
|
68
|
+
# duration = Duration()
|
69
|
+
# duration.FromTimedelta(td)
|
70
|
+
#
|
71
|
+
# # JSON Mapping
|
72
|
+
#
|
73
|
+
# In JSON format, the Duration type is encoded as a string rather than an
|
74
|
+
# object, where the string ends in the suffix "s" (indicating seconds) and
|
75
|
+
# is preceded by the number of seconds, with nanoseconds expressed as
|
76
|
+
# fractional seconds. For example, 3 seconds with 0 nanoseconds should be
|
77
|
+
# encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
|
78
|
+
# be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
79
|
+
# microsecond should be expressed in JSON format as "3.000001s".
|
80
|
+
# @!attribute [rw] seconds
|
81
|
+
# @return [::Integer]
|
82
|
+
# Signed seconds of the span of time. Must be from -315,576,000,000
|
83
|
+
# to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
84
|
+
# 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
85
|
+
# @!attribute [rw] nanos
|
86
|
+
# @return [::Integer]
|
87
|
+
# Signed fractions of a second at nanosecond resolution of the span
|
88
|
+
# of time. Durations less than one second are represented with a 0
|
89
|
+
# `seconds` field and a positive or negative `nanos` field. For durations
|
90
|
+
# of one second or more, a non-zero value for the `nanos` field must be
|
91
|
+
# of the same sign as the `seconds` field. Must be from -999,999,999
|
92
|
+
# to +999,999,999 inclusive.
|
93
|
+
class Duration
|
94
|
+
include ::Google::Protobuf::MessageExts
|
95
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,34 @@
|
|
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
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# A generic empty message that you can re-use to avoid defining duplicated
|
23
|
+
# empty messages in your APIs. A typical example is to use it as the request
|
24
|
+
# or the response type of an API method. For instance:
|
25
|
+
#
|
26
|
+
# service Foo {
|
27
|
+
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
28
|
+
# }
|
29
|
+
class Empty
|
30
|
+
include ::Google::Protobuf::MessageExts
|
31
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,127 @@
|
|
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
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# A Timestamp represents a point in time independent of any time zone or local
|
23
|
+
# calendar, encoded as a count of seconds and fractions of seconds at
|
24
|
+
# nanosecond resolution. The count is relative to an epoch at UTC midnight on
|
25
|
+
# January 1, 1970, in the proleptic Gregorian calendar which extends the
|
26
|
+
# Gregorian calendar backwards to year one.
|
27
|
+
#
|
28
|
+
# All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
|
29
|
+
# second table is needed for interpretation, using a [24-hour linear
|
30
|
+
# smear](https://developers.google.com/time/smear).
|
31
|
+
#
|
32
|
+
# The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
|
33
|
+
# restricting to that range, we ensure that we can convert to and from [RFC
|
34
|
+
# 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
|
35
|
+
#
|
36
|
+
# # Examples
|
37
|
+
#
|
38
|
+
# Example 1: Compute Timestamp from POSIX `time()`.
|
39
|
+
#
|
40
|
+
# Timestamp timestamp;
|
41
|
+
# timestamp.set_seconds(time(NULL));
|
42
|
+
# timestamp.set_nanos(0);
|
43
|
+
#
|
44
|
+
# Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
45
|
+
#
|
46
|
+
# struct timeval tv;
|
47
|
+
# gettimeofday(&tv, NULL);
|
48
|
+
#
|
49
|
+
# Timestamp timestamp;
|
50
|
+
# timestamp.set_seconds(tv.tv_sec);
|
51
|
+
# timestamp.set_nanos(tv.tv_usec * 1000);
|
52
|
+
#
|
53
|
+
# Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
54
|
+
#
|
55
|
+
# FILETIME ft;
|
56
|
+
# GetSystemTimeAsFileTime(&ft);
|
57
|
+
# UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
|
58
|
+
#
|
59
|
+
# // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
|
60
|
+
# // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
|
61
|
+
# Timestamp timestamp;
|
62
|
+
# timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
63
|
+
# timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
64
|
+
#
|
65
|
+
# Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
66
|
+
#
|
67
|
+
# long millis = System.currentTimeMillis();
|
68
|
+
#
|
69
|
+
# Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
70
|
+
# .setNanos((int) ((millis % 1000) * 1000000)).build();
|
71
|
+
#
|
72
|
+
# Example 5: Compute Timestamp from Java `Instant.now()`.
|
73
|
+
#
|
74
|
+
# Instant now = Instant.now();
|
75
|
+
#
|
76
|
+
# Timestamp timestamp =
|
77
|
+
# Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
78
|
+
# .setNanos(now.getNano()).build();
|
79
|
+
#
|
80
|
+
# Example 6: Compute Timestamp from current time in Python.
|
81
|
+
#
|
82
|
+
# timestamp = Timestamp()
|
83
|
+
# timestamp.GetCurrentTime()
|
84
|
+
#
|
85
|
+
# # JSON Mapping
|
86
|
+
#
|
87
|
+
# In JSON format, the Timestamp type is encoded as a string in the
|
88
|
+
# [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
89
|
+
# format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z"
|
90
|
+
# where \\{year} is always expressed using four digits while \\{month}, \\{day},
|
91
|
+
# \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional
|
92
|
+
# seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
93
|
+
# are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
94
|
+
# is required. A proto3 JSON serializer should always use UTC (as indicated by
|
95
|
+
# "Z") when printing the Timestamp type and a proto3 JSON parser should be
|
96
|
+
# able to accept both UTC and other timezones (as indicated by an offset).
|
97
|
+
#
|
98
|
+
# For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
99
|
+
# 01:30 UTC on January 15, 2017.
|
100
|
+
#
|
101
|
+
# In JavaScript, one can convert a Date object to this format using the
|
102
|
+
# standard
|
103
|
+
# [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
104
|
+
# method. In Python, a standard `datetime.datetime` object can be converted
|
105
|
+
# to this format using
|
106
|
+
# [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
107
|
+
# the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
108
|
+
# the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
109
|
+
# http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
|
110
|
+
# ) to obtain a formatter capable of generating timestamps in this format.
|
111
|
+
# @!attribute [rw] seconds
|
112
|
+
# @return [::Integer]
|
113
|
+
# Represents seconds of UTC time since Unix epoch
|
114
|
+
# 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
115
|
+
# 9999-12-31T23:59:59Z inclusive.
|
116
|
+
# @!attribute [rw] nanos
|
117
|
+
# @return [::Integer]
|
118
|
+
# Non-negative fractions of a second at nanosecond resolution. Negative
|
119
|
+
# second values with fractions must still have non-negative nanos values
|
120
|
+
# that count forward in time. Must be from 0 to 999,999,999
|
121
|
+
# inclusive.
|
122
|
+
class Timestamp
|
123
|
+
include ::Google::Protobuf::MessageExts
|
124
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
@@ -0,0 +1,152 @@
|
|
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
|
+
|
20
|
+
module Google
|
21
|
+
module Shopping
|
22
|
+
module Merchant
|
23
|
+
module Products
|
24
|
+
module V1beta
|
25
|
+
# This resource represents input data you submit for a product, not the
|
26
|
+
# processed product that you see in Merchant Center, in Shopping ads, or across
|
27
|
+
# Google surfaces. Product inputs, rules and supplemental data source data are
|
28
|
+
# combined to create the processed
|
29
|
+
# [product][google.shopping.content.bundles.Products.Product].
|
30
|
+
#
|
31
|
+
# Required product input attributes to pass data validation checks are
|
32
|
+
# primarily defined in the [Products Data
|
33
|
+
# Specification](https://support.google.com/merchants/answer/188494).
|
34
|
+
#
|
35
|
+
# The following attributes are required:
|
36
|
+
# [feedLabel][google.shopping.content.bundles.Products.feed_label],
|
37
|
+
# [contentLanguage][google.shopping.content.bundles.Products.content_language]
|
38
|
+
# and [offerId][google.shopping.content.bundles.Products.offer_id].
|
39
|
+
#
|
40
|
+
# After inserting, updating, or deleting a product input, it may take several
|
41
|
+
# minutes before the processed product can be retrieved.
|
42
|
+
#
|
43
|
+
# All fields in the product input and its sub-messages match the English name
|
44
|
+
# of their corresponding attribute in the vertical spec with [some
|
45
|
+
# exceptions](https://support.google.com/merchants/answer/7052112).
|
46
|
+
# @!attribute [rw] name
|
47
|
+
# @return [::String]
|
48
|
+
# Identifier. The name of the product input.
|
49
|
+
# Format:
|
50
|
+
# `"{productinput.name=accounts/{account}/productInputs/{productinput}}"`
|
51
|
+
# @!attribute [r] product
|
52
|
+
# @return [::String]
|
53
|
+
# Output only. The name of the processed product.
|
54
|
+
# Format:
|
55
|
+
# `"{product.name=accounts/{account}/products/{product}}"`
|
56
|
+
# @!attribute [rw] channel
|
57
|
+
# @return [::Google::Shopping::Type::Channel::ChannelEnum]
|
58
|
+
# Required. Immutable. The
|
59
|
+
# [channel](https://support.google.com/merchants/answer/7361332) of the
|
60
|
+
# product.
|
61
|
+
# @!attribute [rw] offer_id
|
62
|
+
# @return [::String]
|
63
|
+
# Required. Immutable. Your unique identifier for the product. This is the
|
64
|
+
# same for the product input and processed product. Leading and trailing
|
65
|
+
# whitespaces are stripped and multiple whitespaces are replaced by a single
|
66
|
+
# whitespace upon submission. See the [products data
|
67
|
+
# specification](https://support.google.com/merchants/answer/188494#id) for
|
68
|
+
# details.
|
69
|
+
# @!attribute [rw] content_language
|
70
|
+
# @return [::String]
|
71
|
+
# Required. Immutable. The two-letter [ISO
|
72
|
+
# 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the
|
73
|
+
# product.
|
74
|
+
# @!attribute [rw] feed_label
|
75
|
+
# @return [::String]
|
76
|
+
# Required. Immutable. The [feed
|
77
|
+
# label](https://developers.google.com/shopping-content/guides/products/feed-labels)
|
78
|
+
# for the product.
|
79
|
+
# @!attribute [rw] version_number
|
80
|
+
# @return [::Integer]
|
81
|
+
# Optional. Represents the existing version (freshness) of the product, which
|
82
|
+
# can be used to preserve the right order when multiple updates are done at
|
83
|
+
# the same time.
|
84
|
+
#
|
85
|
+
# If set, the insertion is prevented when version number is lower than
|
86
|
+
# the current version number of the existing product. Re-insertion (for
|
87
|
+
# example, product refresh after 30 days) can be performed with the current
|
88
|
+
# `version_number`.
|
89
|
+
#
|
90
|
+
# Only supported for insertions into primary data sources.
|
91
|
+
#
|
92
|
+
# If the operation is prevented, the aborted exception will be
|
93
|
+
# thrown.
|
94
|
+
# @!attribute [rw] attributes
|
95
|
+
# @return [::Google::Shopping::Merchant::Products::V1beta::Attributes]
|
96
|
+
# Optional. A list of product attributes.
|
97
|
+
# @!attribute [rw] custom_attributes
|
98
|
+
# @return [::Array<::Google::Shopping::Type::CustomAttribute>]
|
99
|
+
# Optional. A list of custom (merchant-provided) attributes. It can also be
|
100
|
+
# used for submitting any attribute of the data specification in its generic
|
101
|
+
# form (for example,
|
102
|
+
# `{ "name": "size type", "value": "regular" }`).
|
103
|
+
# This is useful for submitting attributes not explicitly exposed by the
|
104
|
+
# API, such as additional attributes used for Buy on Google.
|
105
|
+
# Maximum allowed number of characters for each
|
106
|
+
# custom attribute is 10240 (represents sum of characters for name and
|
107
|
+
# value). Maximum 2500 custom attributes can be set per product, with total
|
108
|
+
# size of 102.4kB. Underscores in custom attribute names are replaced by
|
109
|
+
# spaces upon insertion.
|
110
|
+
class ProductInput
|
111
|
+
include ::Google::Protobuf::MessageExts
|
112
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
113
|
+
end
|
114
|
+
|
115
|
+
# Request message for the InsertProductInput method.
|
116
|
+
# @!attribute [rw] parent
|
117
|
+
# @return [::String]
|
118
|
+
# Required. The account where this product will be inserted.
|
119
|
+
# Format: accounts/\\{account}
|
120
|
+
# @!attribute [rw] product_input
|
121
|
+
# @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput]
|
122
|
+
# Required. The product input to insert.
|
123
|
+
# @!attribute [rw] data_source
|
124
|
+
# @return [::String]
|
125
|
+
# Required. The primary or supplemental product data source name. If the
|
126
|
+
# product already exists and data source provided is different, then the
|
127
|
+
# product will be moved to a new data source. Format:
|
128
|
+
# `accounts/{account}/dataSources/{datasource}`.
|
129
|
+
class InsertProductInputRequest
|
130
|
+
include ::Google::Protobuf::MessageExts
|
131
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
132
|
+
end
|
133
|
+
|
134
|
+
# Request message for the DeleteProductInput method.
|
135
|
+
# @!attribute [rw] name
|
136
|
+
# @return [::String]
|
137
|
+
# Required. The name of the product input resource to delete.
|
138
|
+
# Format: accounts/\\{account}/productInputs/\\{product}
|
139
|
+
# @!attribute [rw] data_source
|
140
|
+
# @return [::String]
|
141
|
+
# Required. The primary or supplemental data source from which the product
|
142
|
+
# input should be deleted. Format:
|
143
|
+
# `accounts/{account}/dataSources/{datasource}`.
|
144
|
+
class DeleteProductInputRequest
|
145
|
+
include ::Google::Protobuf::MessageExts
|
146
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|