• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2021 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.retail.v2alpha;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/protobuf/timestamp.proto";
22
23option csharp_namespace = "Google.Cloud.Retail.V2Alpha";
24option go_package = "cloud.google.com/go/retail/apiv2alpha/retailpb;retailpb";
25option java_multiple_files = true;
26option java_outer_classname = "MerchantCenterAccountLinkProto";
27option java_package = "com.google.cloud.retail.v2alpha";
28option objc_class_prefix = "RETAIL";
29option php_namespace = "Google\\Cloud\\Retail\\V2alpha";
30option ruby_package = "Google::Cloud::Retail::V2alpha";
31
32// Represents a link between a Merchant Center account and a branch.
33// Once a link is established, products from the linked merchant center account
34// will be streamed to the linked branch.
35message MerchantCenterAccountLink {
36  option (google.api.resource) = {
37    type: "retail.googleapis.com/MerchantCenterAccountLink"
38    pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/merchantCenterAccountLinks/{merchant_center_account_link}"
39  };
40
41  // Merchant Center Feed filter criterion.
42  message MerchantCenterFeedFilter {
43    // Merchant Center primary feed ID.
44    int64 primary_feed_id = 1;
45
46    // Merchant Center primary feed name. The name is used for the display
47    // purposes only.
48    string primary_feed_name = 2;
49  }
50
51  // The state of the link.
52  enum State {
53    // Default value.
54    STATE_UNSPECIFIED = 0;
55
56    // Link is created and LRO is not complete.
57    PENDING = 1;
58
59    // Link is active.
60    ACTIVE = 2;
61
62    // Link creation failed.
63    FAILED = 3;
64  }
65
66  // Output only. Immutable. Full resource name of the Merchant Center Account
67  // Link, such as
68  // `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/merchant_center_account_link`.
69  string name = 1 [
70    (google.api.field_behavior) = IMMUTABLE,
71    (google.api.field_behavior) = OUTPUT_ONLY
72  ];
73
74  // Output only. Immutable.
75  // [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink]
76  // identifier, which is the final component of
77  // [name][google.cloud.retail.v2alpha.MerchantCenterAccountLink.name]. This
78  // field is auto generated and follows the convention:
79  // `BranchId_MerchantCenterAccountId`.
80  // `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/id_1`.
81  string id = 8 [
82    (google.api.field_behavior) = IMMUTABLE,
83    (google.api.field_behavior) = OUTPUT_ONLY
84  ];
85
86  // Required. The linked [Merchant center account
87  // id](https://developers.google.com/shopping-content/guides/accountstatuses).
88  // The account must be a standalone account or a sub-account of a MCA.
89  int64 merchant_center_account_id = 2 [(google.api.field_behavior) = REQUIRED];
90
91  // Required. The branch id (e.g. 0/1/2) within the catalog that products from
92  // merchant_center_account_id are streamed to. When updating this field, an
93  // empty value will use the currently configured default branch. However,
94  // changing the default branch later on won't change the linked branch here.
95  //
96  // A single branch id can only have one linked merchant center account id.
97  string branch_id = 3 [(google.api.field_behavior) = REQUIRED];
98
99  // The FeedLabel used to perform filtering.
100  // Note: this replaces
101  // [region_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label).
102  //
103  // Example value: `US`.
104  // Example value: `FeedLabel1`.
105  string feed_label = 4;
106
107  // Language of the title/description and other string attributes. Use language
108  // tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
109  // ISO 639-1.
110  //
111  // This specifies the language of offers in Merchant Center that will be
112  // accepted. If empty, no language filtering will be performed.
113  //
114  // Example value: `en`.
115  string language_code = 5;
116
117  // Criteria for the Merchant Center feeds to be ingested via the link.
118  // All offers will be ingested if the list is empty.
119  // Otherwise the offers will be ingested from selected feeds.
120  repeated MerchantCenterFeedFilter feed_filters = 6;
121
122  // Output only. Represents the state of the link.
123  State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
124
125  // Output only. GCP project ID.
126  string project_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
127}
128
129// Common metadata related to the progress of the operations.
130message CreateMerchantCenterAccountLinkMetadata {
131  // Operation create time.
132  google.protobuf.Timestamp create_time = 1;
133
134  // Operation last update time. If the operation is done, this is also the
135  // finish time.
136  google.protobuf.Timestamp update_time = 2;
137}
138