Skip to content

Commit 58bb9a8

Browse files
feat(merchant-data_sources-v1beta): Support for data source product destinations (googleapis#29348)
1 parent 507c50a commit 58bb9a8

6 files changed

Lines changed: 264 additions & 5 deletions

File tree

google-shopping-merchant-data_sources-v1beta/.owlbot-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb",
5151
"proto_docs/google/shopping/merchant/datasources/v1beta/fileinputs.rb",
5252
"proto_docs/google/shopping/merchant/datasources/v1beta/fileuploads.rb",
53+
"proto_docs/google/shopping/type/types.rb",
5354
"proto_docs/google/type/dayofweek.rb",
5455
"proto_docs/google/type/timeofday.rb",
5556
"snippets/Gemfile",

google-shopping-merchant-data_sources-v1beta/google-shopping-merchant-data_sources-v1beta.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ Gem::Specification.new do |gem|
2525

2626
gem.add_dependency "gapic-common", ">= 0.25.0", "< 2.a"
2727
gem.add_dependency "google-cloud-errors", "~> 1.0"
28+
gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a"
2829
end

google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasourcetypes_pb.rb

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasources.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ module V1beta
5454
# Note: The following fields are mutually exclusive: `regional_inventory_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
5555
# @!attribute [rw] promotion_data_source
5656
# @return [::Google::Shopping::Merchant::DataSources::V1beta::PromotionDataSource]
57-
# The
58-
# [promotion](https://support.google.com/merchants/answer/2906014) data
59-
# source.
57+
# The [promotion](https://support.google.com/merchants/answer/2906014)
58+
# data source.
6059
#
6160
# Note: The following fields are mutually exclusive: `promotion_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
6261
# @!attribute [rw] product_review_data_source

google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module V1beta
2525
# The primary data source for local and online products.
2626
# @!attribute [rw] channel
2727
# @return [::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource::Channel]
28-
# Required. Immutable. Specifies the type of data source channel.
28+
# Optional. Immutable. Specifies the type of data source channel.
2929
# @!attribute [rw] feed_label
3030
# @return [::String]
3131
# Optional. Immutable. The feed label that is specified on the data source
@@ -64,6 +64,25 @@ module V1beta
6464
# @return [::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource::DefaultRule]
6565
# Optional. Default rule management of the data source. If set, the linked
6666
# data sources will be replaced.
67+
# @!attribute [rw] destinations
68+
# @return [::Array<::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource::Destination>]
69+
# Optional. A list of destinations describing where products of the data
70+
# source can be shown.
71+
#
72+
# When retrieving the data source, the list contains all the destinations
73+
# that can be used for the data source, including the ones that are disabled
74+
# for the data source but enabled for the account.
75+
#
76+
# Only destinations that are enabled on the account, for example through
77+
# program participation, can be enabled on the data source.
78+
#
79+
# If unset, during creation, the destinations will be inherited based on the
80+
# account level program participation.
81+
#
82+
# If set, during creation or update, the data source will be set only for the
83+
# specified destinations.
84+
#
85+
# Updating this field requires at least one destination.
6786
class PrimaryProductDataSource
6887
include ::Google::Protobuf::MessageExts
6988
extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -96,6 +115,32 @@ class DefaultRule
96115
extend ::Google::Protobuf::MessageExts::ClassMethods
97116
end
98117

118+
# Destinations also known as [Marketing
119+
# methods](https://support.google.com/merchants/answer/15130232) selections.
120+
# @!attribute [rw] destination
121+
# @return [::Google::Shopping::Type::Destination::DestinationEnum]
122+
# [Marketing methods](https://support.google.com/merchants/answer/15130232)
123+
# (also known as destination) selections.
124+
# @!attribute [rw] state
125+
# @return [::Google::Shopping::Merchant::DataSources::V1beta::PrimaryProductDataSource::Destination::State]
126+
# The state of the destination.
127+
class Destination
128+
include ::Google::Protobuf::MessageExts
129+
extend ::Google::Protobuf::MessageExts::ClassMethods
130+
131+
# The state of the destination.
132+
module State
133+
# Not specified.
134+
STATE_UNSPECIFIED = 0
135+
136+
# Indicates that the destination is enabled.
137+
ENABLED = 1
138+
139+
# Indicates that the destination is disabled.
140+
DISABLED = 2
141+
end
142+
end
143+
99144
# Data Source Channel.
100145
#
101146
# Channel is used to distinguish between data sources for different product

0 commit comments

Comments
 (0)