/*
 * Copyright 2020 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
 *
 *     https://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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/recommendationengine/v1beta1/user_event.proto

package com.google.cloud.recommendationengine.v1beta1;

public interface PurchaseTransactionOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.recommendationengine.v1beta1.PurchaseTransaction)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   * <pre>
   * Optional. The transaction ID with a length limit of 128 bytes.
   * </pre>
   *
   * <code>string id = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The id.
   */
  java.lang.String getId();
  /**
   *
   *
   * <pre>
   * Optional. The transaction ID with a length limit of 128 bytes.
   * </pre>
   *
   * <code>string id = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The bytes for id.
   */
  com.google.protobuf.ByteString getIdBytes();

  /**
   *
   *
   * <pre>
   * Required. Total revenue or grand total associated with the transaction.
   * This value include shipping, tax, or other adjustments to total revenue
   * that you want to include as part of your revenue calculations. This field
   * is not required if the event type is `refund`.
   * </pre>
   *
   * <code>float revenue = 2 [(.google.api.field_behavior) = REQUIRED];</code>
   *
   * @return The revenue.
   */
  float getRevenue();

  /**
   *
   *
   * <pre>
   * Optional. All the taxes associated with the transaction.
   * </pre>
   *
   * <code>map&lt;string, float&gt; taxes = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  int getTaxesCount();
  /**
   *
   *
   * <pre>
   * Optional. All the taxes associated with the transaction.
   * </pre>
   *
   * <code>map&lt;string, float&gt; taxes = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  boolean containsTaxes(java.lang.String key);
  /** Use {@link #getTaxesMap()} instead. */
  @java.lang.Deprecated
  java.util.Map<java.lang.String, java.lang.Float> getTaxes();
  /**
   *
   *
   * <pre>
   * Optional. All the taxes associated with the transaction.
   * </pre>
   *
   * <code>map&lt;string, float&gt; taxes = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  java.util.Map<java.lang.String, java.lang.Float> getTaxesMap();
  /**
   *
   *
   * <pre>
   * Optional. All the taxes associated with the transaction.
   * </pre>
   *
   * <code>map&lt;string, float&gt; taxes = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  float getTaxesOrDefault(java.lang.String key, float defaultValue);
  /**
   *
   *
   * <pre>
   * Optional. All the taxes associated with the transaction.
   * </pre>
   *
   * <code>map&lt;string, float&gt; taxes = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  float getTaxesOrThrow(java.lang.String key);

  /**
   *
   *
   * <pre>
   * Optional. All the costs associated with the product. These can be
   * manufacturing costs, shipping expenses not borne by the end user, or any
   * other costs.
   * Total product cost such that
   *   profit = revenue - (sum(taxes) + sum(costs))
   * If product_cost is not set, then
   *   profit = revenue - tax - shipping - sum(CatalogItem.costs).
   * If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
   * based profit *cannot* be calculated for this Transaction.
   * </pre>
   *
   * <code>map&lt;string, float&gt; costs = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  int getCostsCount();
  /**
   *
   *
   * <pre>
   * Optional. All the costs associated with the product. These can be
   * manufacturing costs, shipping expenses not borne by the end user, or any
   * other costs.
   * Total product cost such that
   *   profit = revenue - (sum(taxes) + sum(costs))
   * If product_cost is not set, then
   *   profit = revenue - tax - shipping - sum(CatalogItem.costs).
   * If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
   * based profit *cannot* be calculated for this Transaction.
   * </pre>
   *
   * <code>map&lt;string, float&gt; costs = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  boolean containsCosts(java.lang.String key);
  /** Use {@link #getCostsMap()} instead. */
  @java.lang.Deprecated
  java.util.Map<java.lang.String, java.lang.Float> getCosts();
  /**
   *
   *
   * <pre>
   * Optional. All the costs associated with the product. These can be
   * manufacturing costs, shipping expenses not borne by the end user, or any
   * other costs.
   * Total product cost such that
   *   profit = revenue - (sum(taxes) + sum(costs))
   * If product_cost is not set, then
   *   profit = revenue - tax - shipping - sum(CatalogItem.costs).
   * If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
   * based profit *cannot* be calculated for this Transaction.
   * </pre>
   *
   * <code>map&lt;string, float&gt; costs = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  java.util.Map<java.lang.String, java.lang.Float> getCostsMap();
  /**
   *
   *
   * <pre>
   * Optional. All the costs associated with the product. These can be
   * manufacturing costs, shipping expenses not borne by the end user, or any
   * other costs.
   * Total product cost such that
   *   profit = revenue - (sum(taxes) + sum(costs))
   * If product_cost is not set, then
   *   profit = revenue - tax - shipping - sum(CatalogItem.costs).
   * If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
   * based profit *cannot* be calculated for this Transaction.
   * </pre>
   *
   * <code>map&lt;string, float&gt; costs = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  float getCostsOrDefault(java.lang.String key, float defaultValue);
  /**
   *
   *
   * <pre>
   * Optional. All the costs associated with the product. These can be
   * manufacturing costs, shipping expenses not borne by the end user, or any
   * other costs.
   * Total product cost such that
   *   profit = revenue - (sum(taxes) + sum(costs))
   * If product_cost is not set, then
   *   profit = revenue - tax - shipping - sum(CatalogItem.costs).
   * If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
   * based profit *cannot* be calculated for this Transaction.
   * </pre>
   *
   * <code>map&lt;string, float&gt; costs = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  float getCostsOrThrow(java.lang.String key);

  /**
   *
   *
   * <pre>
   * Required. Currency code. Use three-character ISO-4217 code. This field
   * is not required if the event type is `refund`.
   * </pre>
   *
   * <code>string currency_code = 6 [(.google.api.field_behavior) = REQUIRED];</code>
   *
   * @return The currencyCode.
   */
  java.lang.String getCurrencyCode();
  /**
   *
   *
   * <pre>
   * Required. Currency code. Use three-character ISO-4217 code. This field
   * is not required if the event type is `refund`.
   * </pre>
   *
   * <code>string currency_code = 6 [(.google.api.field_behavior) = REQUIRED];</code>
   *
   * @return The bytes for currencyCode.
   */
  com.google.protobuf.ByteString getCurrencyCodeBytes();
}
