Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [css] UpdateCssProduct is added to CssProductInput proto #5899

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/google-shopping-css/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Accounts_service.update_labels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-css/samples/generated/v1/accounts_service.update_labels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-css/samples/generated/v1/accounts_service.update_labels.js,packages/google-shopping-css/samples/README.md) |
| Css_product_inputs_service.delete_css_product_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-css/samples/generated/v1/css_product_inputs_service.delete_css_product_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-css/samples/generated/v1/css_product_inputs_service.delete_css_product_input.js,packages/google-shopping-css/samples/README.md) |
| Css_product_inputs_service.insert_css_product_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-css/samples/generated/v1/css_product_inputs_service.insert_css_product_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-css/samples/generated/v1/css_product_inputs_service.insert_css_product_input.js,packages/google-shopping-css/samples/README.md) |
| Css_product_inputs_service.update_css_product_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-css/samples/generated/v1/css_product_inputs_service.update_css_product_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-css/samples/generated/v1/css_product_inputs_service.update_css_product_input.js,packages/google-shopping-css/samples/README.md) |
| Css_products_service.get_css_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-css/samples/generated/v1/css_products_service.get_css_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-css/samples/generated/v1/css_products_service.get_css_product.js,packages/google-shopping-css/samples/README.md) |
| Css_products_service.list_css_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-css/samples/generated/v1/css_products_service.list_css_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-css/samples/generated/v1/css_products_service.list_css_products.js,packages/google-shopping-css/samples/README.md) |
| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-css/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-css/samples/quickstart.js,packages/google-shopping-css/samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ message ListChildAccountsRequest {

// Optional. The maximum number of accounts to return. The service may return
// fewer than this value. If unspecified, at most 50 accounts will be
// returned. The maximum value is 1000; values above 1000 will be coerced to
// 1000.
// returned. The maximum value is 100; values above 100 will be coerced to
// 100.
int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL];

// Optional. A page token, received from a previous `ListChildAccounts` call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ message Attributes {
// within the context of Product Ads.
optional string cpp_ads_redirect = 42;

// Low Price of the aggregate offer.
// Low Price of the CSS Product.
google.shopping.type.Price low_price = 3;

// High Price of the aggregate offer.
// High Price of the CSS Product.
google.shopping.type.Price high_price = 4;

// The number of aggregate offers.
// The number of CSS Products.
optional int64 number_of_offers = 5;

// Condition of the headline offer.
optional string headline_offer_condition = 6;

// Headline Price of the aggregate offer.
// Headline Price of the CSS Product.
google.shopping.type.Price headline_offer_price = 7;

// Link to the headline offer.
Expand All @@ -61,7 +61,7 @@ message Attributes {
// Mobile Link to the headline offer.
optional string headline_offer_mobile_link = 9;

// Headline Price of the aggregate offer.
// Headline Price of the CSS Product.
google.shopping.type.Price headline_offer_shipping_price = 41;

// Title of the item.
Expand Down Expand Up @@ -281,15 +281,15 @@ message CssProductStatus {
// The name of the destination
string destination = 1;

// List of country codes (ISO 3166-1 alpha-2) where the aggregate offer is
// List of country codes (ISO 3166-1 alpha-2) where the CSS Product is
// approved.
repeated string approved_countries = 2;

// List of country codes (ISO 3166-1 alpha-2) where the aggregate offer is
// List of country codes (ISO 3166-1 alpha-2) where the CSS Product is
// pending approval.
repeated string pending_countries = 3;

// List of country codes (ISO 3166-1 alpha-2) where the aggregate offer is
// List of country codes (ISO 3166-1 alpha-2) where the CSS Product is
// disapproved.
repeated string disapproved_countries = 4;
}
Expand All @@ -299,7 +299,7 @@ message CssProductStatus {
// The error code of the issue.
string code = 1;

// How this issue affects serving of the aggregate offer.
// How this issue affects serving of the CSS Product.
string servability = 2;

// Whether the issue can be resolved by the merchant.
Expand All @@ -321,7 +321,7 @@ message CssProductStatus {
string documentation = 8;

// List of country codes (ISO 3166-1 alpha-2) where issue applies to the
// aggregate offer.
// CSS Product.
repeated string applicable_countries = 9;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "google/shopping/css/v1/css_product_common.proto";
import "google/shopping/type/types.proto";
Expand Down Expand Up @@ -53,6 +54,19 @@ service CssProductInputsService {
};
}

// Updates the existing Css Product input in your CSS Center account.
//
// After inserting, updating, or deleting a CSS Product input, it may take
// several minutes before the processed Css Product can be retrieved.
rpc UpdateCssProductInput(UpdateCssProductInputRequest)
returns (CssProductInput) {
option (google.api.http) = {
patch: "/v1/{css_product_input.name=accounts/*/cssProductInputs/*}"
body: "css_product_input"
};
option (google.api.method_signature) = "css_product_input,update_mask";
}

// Deletes a CSS Product input from your CSS Center account.
//
// After a delete it may take several minutes until the input is no longer
Expand Down Expand Up @@ -105,6 +119,7 @@ message CssProductInput {
// valid region code. For example: 'DE' for Germany, 'FR' for France.
string feed_label = 5 [(google.api.field_behavior) = REQUIRED];

// DEPRECATED. Use expiration_date instead.
// Represents the existing version (freshness) of the CSS Product, which
// can be used to preserve the right order when multiple updates are done at
// the same time.
Expand All @@ -122,7 +137,7 @@ message CssProductInput {
//
// If the operation is prevented, the aborted exception will be
// thrown.
google.protobuf.Timestamp freshness_time = 6;
google.protobuf.Timestamp freshness_time = 6 [deprecated = true];

// A list of CSS Product attributes.
Attributes attributes = 7;
Expand Down Expand Up @@ -151,12 +166,40 @@ message InsertCssProductInputRequest {
CssProductInput css_product_input = 2
[(google.api.field_behavior) = REQUIRED];

// Required. The primary or supplemental feed id. If CSS Product already
// exists and feed id provided is different, then the CSS Product will be
// moved to a new feed. Note: For now, CSSs do not need to provide feed ids as
// we create feeds on the fly. We do not have supplemental feed support for
// CSS Products yet.
int64 feed_id = 3 [(google.api.field_behavior) = REQUIRED];
// Optional. DEPRECATED. Feed id is not required for CSS Products.
// The primary or supplemental feed id. If CSS Product already exists and
// feed id provided is different, then the CSS Product will be moved to a
// new feed.
// Note: For now, CSSs do not need to provide feed ids as we create
// feeds on the fly.
// We do not have supplemental feed support for CSS Products yet.
int64 feed_id = 3 [deprecated = true, (google.api.field_behavior) = OPTIONAL];
}

// Request message for the UpdateCssProductInput method.
message UpdateCssProductInputRequest {
// Required. The CSS product input resource to update. Information you submit
// will be applied to the processed CSS product as well.
CssProductInput css_product_input = 1
[(google.api.field_behavior) = REQUIRED];

// The list of CSS product attributes to be updated.
//
// If the update mask is omitted, then it is treated as implied field mask
// equivalent to all fields that are populated (have a non-empty value).
//
// Attributes specified in the update mask without a value specified in the
// body will be deleted from the CSS product.
//
// Update mask can only be specified for top level fields in
// attributes and custom attributes.
//
// To specify the update mask for custom attributes you need to add the
// `custom_attribute.` prefix.
//
// Providing special "*" value for full CSS product replacement is not
// supported.
google.protobuf.FieldMask update_mask = 2;
}

// Request message for the DeleteCssProductInput method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ message GetCssProductRequest {
];
}

// The processed CSS Product(a.k.a Aggregate Offer internally).
// The processed CSS Product.
message CssProduct {
option (google.api.resource) = {
type: "css.googleapis.com/CssProduct"
Expand Down
Loading
Loading