/*
 * 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.authorizedbuyersmarketplace.v1.model;

/**
 * Represents a proposal in the Marketplace. A proposal is the unit of negotiation between a seller
 * and a buyer.
 *
 * <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 Authorized Buyers Marketplace 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 Proposal extends com.google.api.client.json.GenericJson {

  /**
   * Output only. When the client field is populated, this field refers to the buyer who creates and
   * manages the client buyer and gets billed on behalf of the client buyer; when the buyer field is
   * populated, this field is the same value as buyer. Format : `buyers/{buyerAccountId}`
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String billedBuyer;

  /**
   * Output only. Refers to a buyer in The Realtime-bidding API. Format: `buyers/{buyerAccountId}`
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String buyer;

  /**
   * Contact information for the buyer.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<Contact> buyerContacts;

  static {
    // hack to force ProGuard to consider Contact used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(Contact.class);
  }

  /**
   * Buyer private data (hidden from seller).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private PrivateData buyerPrivateData;

  /**
   * Output only. Refers to a Client. Format: `buyers/{buyerAccountId}/clients/{clientAccountid}`
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String client;

  /**
   * Output only. Type of deal the proposal contains.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String dealType;

  /**
   * Output only. The descriptive name for the proposal. Maximum length of 255 unicode characters is
   * allowed. Control characters are not allowed. Buyers cannot update this field. Note: Not to be
   * confused with name, which is a unique identifier of the proposal.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String displayName;

  /**
   * Output only. True if the proposal was previously finalized and is now being renegotiated.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean isRenegotiating;

  /**
   * Output only. The role of the last user that either updated the proposal or left a comment.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String lastUpdaterOrCommentorRole;

  /**
   * Immutable. The name of the proposal serving as a unique identifier. Format:
   * buyers/{accountId}/proposals/{proposalId}
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * A list of notes from the buyer and the seller attached to this proposal.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<Note> notes;

  static {
    // hack to force ProGuard to consider Note used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(Note.class);
  }

  /**
   * Output only. Indicates whether the buyer/seller created the proposal.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String originatorRole;

  /**
   * Whether pausing is allowed for the proposal. This is a negotiable term between buyers and
   * publishers.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean pausingConsented;

  /**
   * Output only. The revision number for the proposal. Each update to the proposal or deal causes
   * the proposal revision number to auto-increment. The buyer keeps track of the last revision
   * number they know of and pass it in when making an update. If the head revision number on the
   * server has since incremented, then an ABORTED error is returned during the update operation to
   * let the buyer know that a subsequent update was made.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long proposalRevision;

  /**
   * Immutable. Reference to the seller on the proposal. Format:
   * `buyers/{buyerAccountId}/publisherProfiles/{publisherProfileId}` Note: This field may be set
   * only when creating the resource. Modifying this field while updating the resource will result
   * in an error.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String publisherProfile;

  /**
   * Output only. Contact information for the seller.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<Contact> sellerContacts;

  static {
    // hack to force ProGuard to consider Contact used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(Contact.class);
  }

  /**
   * Output only. Indicates the state of the proposal.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String state;

  /**
   * Output only. The terms and conditions associated with this proposal. Accepting a proposal
   * implies acceptance of this field. This is created by the seller, the buyer can only view it.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String termsAndConditions;

  /**
   * Output only. The time when the proposal was last revised.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String updateTime;

  /**
   * Output only. When the client field is populated, this field refers to the buyer who creates and
   * manages the client buyer and gets billed on behalf of the client buyer; when the buyer field is
   * populated, this field is the same value as buyer. Format : `buyers/{buyerAccountId}`
   * @return value or {@code null} for none
   */
  public java.lang.String getBilledBuyer() {
    return billedBuyer;
  }

  /**
   * Output only. When the client field is populated, this field refers to the buyer who creates and
   * manages the client buyer and gets billed on behalf of the client buyer; when the buyer field is
   * populated, this field is the same value as buyer. Format : `buyers/{buyerAccountId}`
   * @param billedBuyer billedBuyer or {@code null} for none
   */
  public Proposal setBilledBuyer(java.lang.String billedBuyer) {
    this.billedBuyer = billedBuyer;
    return this;
  }

  /**
   * Output only. Refers to a buyer in The Realtime-bidding API. Format: `buyers/{buyerAccountId}`
   * @return value or {@code null} for none
   */
  public java.lang.String getBuyer() {
    return buyer;
  }

  /**
   * Output only. Refers to a buyer in The Realtime-bidding API. Format: `buyers/{buyerAccountId}`
   * @param buyer buyer or {@code null} for none
   */
  public Proposal setBuyer(java.lang.String buyer) {
    this.buyer = buyer;
    return this;
  }

  /**
   * Contact information for the buyer.
   * @return value or {@code null} for none
   */
  public java.util.List<Contact> getBuyerContacts() {
    return buyerContacts;
  }

  /**
   * Contact information for the buyer.
   * @param buyerContacts buyerContacts or {@code null} for none
   */
  public Proposal setBuyerContacts(java.util.List<Contact> buyerContacts) {
    this.buyerContacts = buyerContacts;
    return this;
  }

  /**
   * Buyer private data (hidden from seller).
   * @return value or {@code null} for none
   */
  public PrivateData getBuyerPrivateData() {
    return buyerPrivateData;
  }

  /**
   * Buyer private data (hidden from seller).
   * @param buyerPrivateData buyerPrivateData or {@code null} for none
   */
  public Proposal setBuyerPrivateData(PrivateData buyerPrivateData) {
    this.buyerPrivateData = buyerPrivateData;
    return this;
  }

  /**
   * Output only. Refers to a Client. Format: `buyers/{buyerAccountId}/clients/{clientAccountid}`
   * @return value or {@code null} for none
   */
  public java.lang.String getClient() {
    return client;
  }

  /**
   * Output only. Refers to a Client. Format: `buyers/{buyerAccountId}/clients/{clientAccountid}`
   * @param client client or {@code null} for none
   */
  public Proposal setClient(java.lang.String client) {
    this.client = client;
    return this;
  }

  /**
   * Output only. Type of deal the proposal contains.
   * @return value or {@code null} for none
   */
  public java.lang.String getDealType() {
    return dealType;
  }

  /**
   * Output only. Type of deal the proposal contains.
   * @param dealType dealType or {@code null} for none
   */
  public Proposal setDealType(java.lang.String dealType) {
    this.dealType = dealType;
    return this;
  }

  /**
   * Output only. The descriptive name for the proposal. Maximum length of 255 unicode characters is
   * allowed. Control characters are not allowed. Buyers cannot update this field. Note: Not to be
   * confused with name, which is a unique identifier of the proposal.
   * @return value or {@code null} for none
   */
  public java.lang.String getDisplayName() {
    return displayName;
  }

  /**
   * Output only. The descriptive name for the proposal. Maximum length of 255 unicode characters is
   * allowed. Control characters are not allowed. Buyers cannot update this field. Note: Not to be
   * confused with name, which is a unique identifier of the proposal.
   * @param displayName displayName or {@code null} for none
   */
  public Proposal setDisplayName(java.lang.String displayName) {
    this.displayName = displayName;
    return this;
  }

  /**
   * Output only. True if the proposal was previously finalized and is now being renegotiated.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getIsRenegotiating() {
    return isRenegotiating;
  }

  /**
   * Output only. True if the proposal was previously finalized and is now being renegotiated.
   * @param isRenegotiating isRenegotiating or {@code null} for none
   */
  public Proposal setIsRenegotiating(java.lang.Boolean isRenegotiating) {
    this.isRenegotiating = isRenegotiating;
    return this;
  }

  /**
   * Output only. The role of the last user that either updated the proposal or left a comment.
   * @return value or {@code null} for none
   */
  public java.lang.String getLastUpdaterOrCommentorRole() {
    return lastUpdaterOrCommentorRole;
  }

  /**
   * Output only. The role of the last user that either updated the proposal or left a comment.
   * @param lastUpdaterOrCommentorRole lastUpdaterOrCommentorRole or {@code null} for none
   */
  public Proposal setLastUpdaterOrCommentorRole(java.lang.String lastUpdaterOrCommentorRole) {
    this.lastUpdaterOrCommentorRole = lastUpdaterOrCommentorRole;
    return this;
  }

  /**
   * Immutable. The name of the proposal serving as a unique identifier. Format:
   * buyers/{accountId}/proposals/{proposalId}
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * Immutable. The name of the proposal serving as a unique identifier. Format:
   * buyers/{accountId}/proposals/{proposalId}
   * @param name name or {@code null} for none
   */
  public Proposal setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * A list of notes from the buyer and the seller attached to this proposal.
   * @return value or {@code null} for none
   */
  public java.util.List<Note> getNotes() {
    return notes;
  }

  /**
   * A list of notes from the buyer and the seller attached to this proposal.
   * @param notes notes or {@code null} for none
   */
  public Proposal setNotes(java.util.List<Note> notes) {
    this.notes = notes;
    return this;
  }

  /**
   * Output only. Indicates whether the buyer/seller created the proposal.
   * @return value or {@code null} for none
   */
  public java.lang.String getOriginatorRole() {
    return originatorRole;
  }

  /**
   * Output only. Indicates whether the buyer/seller created the proposal.
   * @param originatorRole originatorRole or {@code null} for none
   */
  public Proposal setOriginatorRole(java.lang.String originatorRole) {
    this.originatorRole = originatorRole;
    return this;
  }

  /**
   * Whether pausing is allowed for the proposal. This is a negotiable term between buyers and
   * publishers.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getPausingConsented() {
    return pausingConsented;
  }

  /**
   * Whether pausing is allowed for the proposal. This is a negotiable term between buyers and
   * publishers.
   * @param pausingConsented pausingConsented or {@code null} for none
   */
  public Proposal setPausingConsented(java.lang.Boolean pausingConsented) {
    this.pausingConsented = pausingConsented;
    return this;
  }

  /**
   * Output only. The revision number for the proposal. Each update to the proposal or deal causes
   * the proposal revision number to auto-increment. The buyer keeps track of the last revision
   * number they know of and pass it in when making an update. If the head revision number on the
   * server has since incremented, then an ABORTED error is returned during the update operation to
   * let the buyer know that a subsequent update was made.
   * @return value or {@code null} for none
   */
  public java.lang.Long getProposalRevision() {
    return proposalRevision;
  }

  /**
   * Output only. The revision number for the proposal. Each update to the proposal or deal causes
   * the proposal revision number to auto-increment. The buyer keeps track of the last revision
   * number they know of and pass it in when making an update. If the head revision number on the
   * server has since incremented, then an ABORTED error is returned during the update operation to
   * let the buyer know that a subsequent update was made.
   * @param proposalRevision proposalRevision or {@code null} for none
   */
  public Proposal setProposalRevision(java.lang.Long proposalRevision) {
    this.proposalRevision = proposalRevision;
    return this;
  }

  /**
   * Immutable. Reference to the seller on the proposal. Format:
   * `buyers/{buyerAccountId}/publisherProfiles/{publisherProfileId}` Note: This field may be set
   * only when creating the resource. Modifying this field while updating the resource will result
   * in an error.
   * @return value or {@code null} for none
   */
  public java.lang.String getPublisherProfile() {
    return publisherProfile;
  }

  /**
   * Immutable. Reference to the seller on the proposal. Format:
   * `buyers/{buyerAccountId}/publisherProfiles/{publisherProfileId}` Note: This field may be set
   * only when creating the resource. Modifying this field while updating the resource will result
   * in an error.
   * @param publisherProfile publisherProfile or {@code null} for none
   */
  public Proposal setPublisherProfile(java.lang.String publisherProfile) {
    this.publisherProfile = publisherProfile;
    return this;
  }

  /**
   * Output only. Contact information for the seller.
   * @return value or {@code null} for none
   */
  public java.util.List<Contact> getSellerContacts() {
    return sellerContacts;
  }

  /**
   * Output only. Contact information for the seller.
   * @param sellerContacts sellerContacts or {@code null} for none
   */
  public Proposal setSellerContacts(java.util.List<Contact> sellerContacts) {
    this.sellerContacts = sellerContacts;
    return this;
  }

  /**
   * Output only. Indicates the state of the proposal.
   * @return value or {@code null} for none
   */
  public java.lang.String getState() {
    return state;
  }

  /**
   * Output only. Indicates the state of the proposal.
   * @param state state or {@code null} for none
   */
  public Proposal setState(java.lang.String state) {
    this.state = state;
    return this;
  }

  /**
   * Output only. The terms and conditions associated with this proposal. Accepting a proposal
   * implies acceptance of this field. This is created by the seller, the buyer can only view it.
   * @return value or {@code null} for none
   */
  public java.lang.String getTermsAndConditions() {
    return termsAndConditions;
  }

  /**
   * Output only. The terms and conditions associated with this proposal. Accepting a proposal
   * implies acceptance of this field. This is created by the seller, the buyer can only view it.
   * @param termsAndConditions termsAndConditions or {@code null} for none
   */
  public Proposal setTermsAndConditions(java.lang.String termsAndConditions) {
    this.termsAndConditions = termsAndConditions;
    return this;
  }

  /**
   * Output only. The time when the proposal was last revised.
   * @return value or {@code null} for none
   */
  public String getUpdateTime() {
    return updateTime;
  }

  /**
   * Output only. The time when the proposal was last revised.
   * @param updateTime updateTime or {@code null} for none
   */
  public Proposal setUpdateTime(String updateTime) {
    this.updateTime = updateTime;
    return this;
  }

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

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

}
