/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.recaptchaenterprise.v1.model;

/**
 * Transaction data associated with a payment protected by reCAPTCHA Enterprise. All fields are
 * optional.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the reCAPTCHA Enterprise API. For a detailed explanation
 * see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GoogleCloudRecaptchaenterpriseV1TransactionData extends com.google.api.client.json.GenericJson {

  /**
   * Address associated with the payment method when applicable.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudRecaptchaenterpriseV1TransactionDataAddress billingAddress;

  /**
   * The Bank Identification Number - generally the first 6 or 8 digits of the card.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String cardBin;

  /**
   * The last four digits of the card.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String cardLastFour;

  /**
   * The currency code in ISO-4217 format.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String currencyCode;

  /**
   * Information about the payment gateway's response to the transaction.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo gatewayInfo;

  /**
   * Items purchased in this transaction.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GoogleCloudRecaptchaenterpriseV1TransactionDataItem> items;

  /**
   * Information about the user or users fulfilling the transaction.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GoogleCloudRecaptchaenterpriseV1TransactionDataUser> merchants;

  /**
   * The payment method for the transaction. The allowed values are: * credit-card * debit-card *
   * gift-card * processor-{name} (If a third-party is used, for example, processor-paypal) *
   * custom-{name} (If an alternative method is used, for example, custom-crypto)
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String paymentMethod;

  /**
   * Destination address if this transaction involves shipping a physical item.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudRecaptchaenterpriseV1TransactionDataAddress shippingAddress;

  /**
   * The value of shipping in the specified currency. 0 for free or no shipping.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Double shippingValue;

  /**
   * Unique identifier for the transaction. This custom identifier can be used to reference this
   * transaction in the future, for example, labeling a refund or chargeback event. Two attempts at
   * the same transaction should use the same transaction id.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String transactionId;

  /**
   * Information about the user paying/initiating the transaction.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudRecaptchaenterpriseV1TransactionDataUser user;

  /**
   * The decimal value of the transaction in the specified currency.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Double value;

  /**
   * Address associated with the payment method when applicable.
   * @return value or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionDataAddress getBillingAddress() {
    return billingAddress;
  }

  /**
   * Address associated with the payment method when applicable.
   * @param billingAddress billingAddress or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData setBillingAddress(GoogleCloudRecaptchaenterpriseV1TransactionDataAddress billingAddress) {
    this.billingAddress = billingAddress;
    return this;
  }

  /**
   * The Bank Identification Number - generally the first 6 or 8 digits of the card.
   * @return value or {@code null} for none
   */
  public java.lang.String getCardBin() {
    return cardBin;
  }

  /**
   * The Bank Identification Number - generally the first 6 or 8 digits of the card.
   * @param cardBin cardBin or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData setCardBin(java.lang.String cardBin) {
    this.cardBin = cardBin;
    return this;
  }

  /**
   * The last four digits of the card.
   * @return value or {@code null} for none
   */
  public java.lang.String getCardLastFour() {
    return cardLastFour;
  }

  /**
   * The last four digits of the card.
   * @param cardLastFour cardLastFour or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData setCardLastFour(java.lang.String cardLastFour) {
    this.cardLastFour = cardLastFour;
    return this;
  }

  /**
   * The currency code in ISO-4217 format.
   * @return value or {@code null} for none
   */
  public java.lang.String getCurrencyCode() {
    return currencyCode;
  }

  /**
   * The currency code in ISO-4217 format.
   * @param currencyCode currencyCode or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData setCurrencyCode(java.lang.String currencyCode) {
    this.currencyCode = currencyCode;
    return this;
  }

  /**
   * Information about the payment gateway's response to the transaction.
   * @return value or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo getGatewayInfo() {
    return gatewayInfo;
  }

  /**
   * Information about the payment gateway's response to the transaction.
   * @param gatewayInfo gatewayInfo or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData setGatewayInfo(GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo gatewayInfo) {
    this.gatewayInfo = gatewayInfo;
    return this;
  }

  /**
   * Items purchased in this transaction.
   * @return value or {@code null} for none
   */
  public java.util.List<GoogleCloudRecaptchaenterpriseV1TransactionDataItem> getItems() {
    return items;
  }

  /**
   * Items purchased in this transaction.
   * @param items items or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData setItems(java.util.List<GoogleCloudRecaptchaenterpriseV1TransactionDataItem> items) {
    this.items = items;
    return this;
  }

  /**
   * Information about the user or users fulfilling the transaction.
   * @return value or {@code null} for none
   */
  public java.util.List<GoogleCloudRecaptchaenterpriseV1TransactionDataUser> getMerchants() {
    return merchants;
  }

  /**
   * Information about the user or users fulfilling the transaction.
   * @param merchants merchants or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData setMerchants(java.util.List<GoogleCloudRecaptchaenterpriseV1TransactionDataUser> merchants) {
    this.merchants = merchants;
    return this;
  }

  /**
   * The payment method for the transaction. The allowed values are: * credit-card * debit-card *
   * gift-card * processor-{name} (If a third-party is used, for example, processor-paypal) *
   * custom-{name} (If an alternative method is used, for example, custom-crypto)
   * @return value or {@code null} for none
   */
  public java.lang.String getPaymentMethod() {
    return paymentMethod;
  }

  /**
   * The payment method for the transaction. The allowed values are: * credit-card * debit-card *
   * gift-card * processor-{name} (If a third-party is used, for example, processor-paypal) *
   * custom-{name} (If an alternative method is used, for example, custom-crypto)
   * @param paymentMethod paymentMethod or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData setPaymentMethod(java.lang.String paymentMethod) {
    this.paymentMethod = paymentMethod;
    return this;
  }

  /**
   * Destination address if this transaction involves shipping a physical item.
   * @return value or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionDataAddress getShippingAddress() {
    return shippingAddress;
  }

  /**
   * Destination address if this transaction involves shipping a physical item.
   * @param shippingAddress shippingAddress or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData setShippingAddress(GoogleCloudRecaptchaenterpriseV1TransactionDataAddress shippingAddress) {
    this.shippingAddress = shippingAddress;
    return this;
  }

  /**
   * The value of shipping in the specified currency. 0 for free or no shipping.
   * @return value or {@code null} for none
   */
  public java.lang.Double getShippingValue() {
    return shippingValue;
  }

  /**
   * The value of shipping in the specified currency. 0 for free or no shipping.
   * @param shippingValue shippingValue or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData setShippingValue(java.lang.Double shippingValue) {
    this.shippingValue = shippingValue;
    return this;
  }

  /**
   * Unique identifier for the transaction. This custom identifier can be used to reference this
   * transaction in the future, for example, labeling a refund or chargeback event. Two attempts at
   * the same transaction should use the same transaction id.
   * @return value or {@code null} for none
   */
  public java.lang.String getTransactionId() {
    return transactionId;
  }

  /**
   * Unique identifier for the transaction. This custom identifier can be used to reference this
   * transaction in the future, for example, labeling a refund or chargeback event. Two attempts at
   * the same transaction should use the same transaction id.
   * @param transactionId transactionId or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData setTransactionId(java.lang.String transactionId) {
    this.transactionId = transactionId;
    return this;
  }

  /**
   * Information about the user paying/initiating the transaction.
   * @return value or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionDataUser getUser() {
    return user;
  }

  /**
   * Information about the user paying/initiating the transaction.
   * @param user user or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData setUser(GoogleCloudRecaptchaenterpriseV1TransactionDataUser user) {
    this.user = user;
    return this;
  }

  /**
   * The decimal value of the transaction in the specified currency.
   * @return value or {@code null} for none
   */
  public java.lang.Double getValue() {
    return value;
  }

  /**
   * The decimal value of the transaction in the specified currency.
   * @param value value or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData setValue(java.lang.Double value) {
    this.value = value;
    return this;
  }

  @Override
  public GoogleCloudRecaptchaenterpriseV1TransactionData set(String fieldName, Object value) {
    return (GoogleCloudRecaptchaenterpriseV1TransactionData) super.set(fieldName, value);
  }

  @Override
  public GoogleCloudRecaptchaenterpriseV1TransactionData clone() {
    return (GoogleCloudRecaptchaenterpriseV1TransactionData) super.clone();
  }

}
