// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.ads.datamanager.v1;

import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Ads.DataManager.V1";
option go_package = "google.golang.org/genproto/googleapis/ads/datamanager/v1;datamanager";
option java_multiple_files = true;
option java_outer_classname = "CartDataProto";
option java_package = "com.google.ads.datamanager.v1";
option php_namespace = "Google\\Ads\\DataManager\\V1";
option ruby_package = "Google::Ads::DataManager::V1";

// The cart data associated with the event.
message CartData {
  // Optional. The Merchant Center ID associated with the items.
  string merchant_id = 1 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The Merchant Center feed label associated with the feed of the
  // items.
  string merchant_feed_label = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The language code in ISO 639-1 associated with the Merchant
  // Center feed of the items.where your items are uploaded.
  string merchant_feed_language_code = 3
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. The sum of all discounts associated with the transaction.
  double transaction_discount = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The list of items associated with the event.
  repeated Item items = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Represents an item in the cart associated with the event.
message Item {
  // Optional. The product ID within the Merchant Center account.
  string merchant_product_id = 1 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The number of this item associated with the event.
  int64 quantity = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The unit price excluding tax, shipping, and any transaction level
  // discounts.
  double unit_price = 3 [(google.api.field_behavior) = OPTIONAL];
}
