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

/**
 * A single insertion order.
 *
 * <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 Display & Video 360 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 InsertionOrder extends com.google.api.client.json.GenericJson {

  /**
   * Output only. The unique ID of the advertiser the insertion order belongs to.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long advertiserId;

  /**
   * The bidding strategy of the insertion order. By default, fixed_bid is set.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private BiddingStrategy bidStrategy;

  /**
   * Immutable. The billable outcome of the insertion order.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String billableOutcome;

  /**
   * Required. The budget allocation settings of the insertion order.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private InsertionOrderBudget budget;

  /**
   * Required. Immutable. The unique ID of the campaign that the insertion order belongs to.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long campaignId;

  /**
   * Required. The display name of the insertion order. Must be UTF-8 encoded with a maximum size of
   * 240 bytes.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String displayName;

  /**
   * Required. Controls whether or not the insertion order can spend its budget and bid on
   * inventory. * For CreateInsertionOrder method, only `ENTITY_STATUS_DRAFT` is allowed. To
   * activate an insertion order, use UpdateInsertionOrder method and update the status to
   * `ENTITY_STATUS_ACTIVE` after creation. * An insertion order cannot be changed back to
   * `ENTITY_STATUS_DRAFT` status from any other status. * An insertion order cannot be set to
   * `ENTITY_STATUS_ACTIVE` if its parent campaign is not active.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String entityStatus;

  /**
   * Required. The frequency capping setting of the insertion order.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private FrequencyCap frequencyCap;

  /**
   * Output only. The unique ID of the insertion order. Assigned by the system.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long insertionOrderId;

  /**
   * The type of insertion order. If this field is unspecified in creation, the value defaults to
   * `RTB`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String insertionOrderType;

  /**
   * Additional integration details of the insertion order.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private IntegrationDetails integrationDetails;

  /**
   * Output only. The resource name of the insertion order.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * Required. The budget spending speed setting of the insertion order.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Pacing pacing;

  /**
   * The partner costs associated with the insertion order. If absent or empty in
   * CreateInsertionOrder method, the newly created insertion order will inherit partner costs from
   * the partner settings.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<PartnerCost> partnerCosts;

  /**
   * Required. Performance goal of the insertion order.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private PerformanceGoal performanceGoal;

  /**
   * Output only. The reservation type of the insertion order.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String reservationType;

  /**
   * Output only. The timestamp when the insertion order was last updated. Assigned by the system.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String updateTime;

  /**
   * Output only. The unique ID of the advertiser the insertion order belongs to.
   * @return value or {@code null} for none
   */
  public java.lang.Long getAdvertiserId() {
    return advertiserId;
  }

  /**
   * Output only. The unique ID of the advertiser the insertion order belongs to.
   * @param advertiserId advertiserId or {@code null} for none
   */
  public InsertionOrder setAdvertiserId(java.lang.Long advertiserId) {
    this.advertiserId = advertiserId;
    return this;
  }

  /**
   * The bidding strategy of the insertion order. By default, fixed_bid is set.
   * @return value or {@code null} for none
   */
  public BiddingStrategy getBidStrategy() {
    return bidStrategy;
  }

  /**
   * The bidding strategy of the insertion order. By default, fixed_bid is set.
   * @param bidStrategy bidStrategy or {@code null} for none
   */
  public InsertionOrder setBidStrategy(BiddingStrategy bidStrategy) {
    this.bidStrategy = bidStrategy;
    return this;
  }

  /**
   * Immutable. The billable outcome of the insertion order.
   * @return value or {@code null} for none
   */
  public java.lang.String getBillableOutcome() {
    return billableOutcome;
  }

  /**
   * Immutable. The billable outcome of the insertion order.
   * @param billableOutcome billableOutcome or {@code null} for none
   */
  public InsertionOrder setBillableOutcome(java.lang.String billableOutcome) {
    this.billableOutcome = billableOutcome;
    return this;
  }

  /**
   * Required. The budget allocation settings of the insertion order.
   * @return value or {@code null} for none
   */
  public InsertionOrderBudget getBudget() {
    return budget;
  }

  /**
   * Required. The budget allocation settings of the insertion order.
   * @param budget budget or {@code null} for none
   */
  public InsertionOrder setBudget(InsertionOrderBudget budget) {
    this.budget = budget;
    return this;
  }

  /**
   * Required. Immutable. The unique ID of the campaign that the insertion order belongs to.
   * @return value or {@code null} for none
   */
  public java.lang.Long getCampaignId() {
    return campaignId;
  }

  /**
   * Required. Immutable. The unique ID of the campaign that the insertion order belongs to.
   * @param campaignId campaignId or {@code null} for none
   */
  public InsertionOrder setCampaignId(java.lang.Long campaignId) {
    this.campaignId = campaignId;
    return this;
  }

  /**
   * Required. The display name of the insertion order. Must be UTF-8 encoded with a maximum size of
   * 240 bytes.
   * @return value or {@code null} for none
   */
  public java.lang.String getDisplayName() {
    return displayName;
  }

  /**
   * Required. The display name of the insertion order. Must be UTF-8 encoded with a maximum size of
   * 240 bytes.
   * @param displayName displayName or {@code null} for none
   */
  public InsertionOrder setDisplayName(java.lang.String displayName) {
    this.displayName = displayName;
    return this;
  }

  /**
   * Required. Controls whether or not the insertion order can spend its budget and bid on
   * inventory. * For CreateInsertionOrder method, only `ENTITY_STATUS_DRAFT` is allowed. To
   * activate an insertion order, use UpdateInsertionOrder method and update the status to
   * `ENTITY_STATUS_ACTIVE` after creation. * An insertion order cannot be changed back to
   * `ENTITY_STATUS_DRAFT` status from any other status. * An insertion order cannot be set to
   * `ENTITY_STATUS_ACTIVE` if its parent campaign is not active.
   * @return value or {@code null} for none
   */
  public java.lang.String getEntityStatus() {
    return entityStatus;
  }

  /**
   * Required. Controls whether or not the insertion order can spend its budget and bid on
   * inventory. * For CreateInsertionOrder method, only `ENTITY_STATUS_DRAFT` is allowed. To
   * activate an insertion order, use UpdateInsertionOrder method and update the status to
   * `ENTITY_STATUS_ACTIVE` after creation. * An insertion order cannot be changed back to
   * `ENTITY_STATUS_DRAFT` status from any other status. * An insertion order cannot be set to
   * `ENTITY_STATUS_ACTIVE` if its parent campaign is not active.
   * @param entityStatus entityStatus or {@code null} for none
   */
  public InsertionOrder setEntityStatus(java.lang.String entityStatus) {
    this.entityStatus = entityStatus;
    return this;
  }

  /**
   * Required. The frequency capping setting of the insertion order.
   * @return value or {@code null} for none
   */
  public FrequencyCap getFrequencyCap() {
    return frequencyCap;
  }

  /**
   * Required. The frequency capping setting of the insertion order.
   * @param frequencyCap frequencyCap or {@code null} for none
   */
  public InsertionOrder setFrequencyCap(FrequencyCap frequencyCap) {
    this.frequencyCap = frequencyCap;
    return this;
  }

  /**
   * Output only. The unique ID of the insertion order. Assigned by the system.
   * @return value or {@code null} for none
   */
  public java.lang.Long getInsertionOrderId() {
    return insertionOrderId;
  }

  /**
   * Output only. The unique ID of the insertion order. Assigned by the system.
   * @param insertionOrderId insertionOrderId or {@code null} for none
   */
  public InsertionOrder setInsertionOrderId(java.lang.Long insertionOrderId) {
    this.insertionOrderId = insertionOrderId;
    return this;
  }

  /**
   * The type of insertion order. If this field is unspecified in creation, the value defaults to
   * `RTB`.
   * @return value or {@code null} for none
   */
  public java.lang.String getInsertionOrderType() {
    return insertionOrderType;
  }

  /**
   * The type of insertion order. If this field is unspecified in creation, the value defaults to
   * `RTB`.
   * @param insertionOrderType insertionOrderType or {@code null} for none
   */
  public InsertionOrder setInsertionOrderType(java.lang.String insertionOrderType) {
    this.insertionOrderType = insertionOrderType;
    return this;
  }

  /**
   * Additional integration details of the insertion order.
   * @return value or {@code null} for none
   */
  public IntegrationDetails getIntegrationDetails() {
    return integrationDetails;
  }

  /**
   * Additional integration details of the insertion order.
   * @param integrationDetails integrationDetails or {@code null} for none
   */
  public InsertionOrder setIntegrationDetails(IntegrationDetails integrationDetails) {
    this.integrationDetails = integrationDetails;
    return this;
  }

  /**
   * Output only. The resource name of the insertion order.
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * Output only. The resource name of the insertion order.
   * @param name name or {@code null} for none
   */
  public InsertionOrder setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * Required. The budget spending speed setting of the insertion order.
   * @return value or {@code null} for none
   */
  public Pacing getPacing() {
    return pacing;
  }

  /**
   * Required. The budget spending speed setting of the insertion order.
   * @param pacing pacing or {@code null} for none
   */
  public InsertionOrder setPacing(Pacing pacing) {
    this.pacing = pacing;
    return this;
  }

  /**
   * The partner costs associated with the insertion order. If absent or empty in
   * CreateInsertionOrder method, the newly created insertion order will inherit partner costs from
   * the partner settings.
   * @return value or {@code null} for none
   */
  public java.util.List<PartnerCost> getPartnerCosts() {
    return partnerCosts;
  }

  /**
   * The partner costs associated with the insertion order. If absent or empty in
   * CreateInsertionOrder method, the newly created insertion order will inherit partner costs from
   * the partner settings.
   * @param partnerCosts partnerCosts or {@code null} for none
   */
  public InsertionOrder setPartnerCosts(java.util.List<PartnerCost> partnerCosts) {
    this.partnerCosts = partnerCosts;
    return this;
  }

  /**
   * Required. Performance goal of the insertion order.
   * @return value or {@code null} for none
   */
  public PerformanceGoal getPerformanceGoal() {
    return performanceGoal;
  }

  /**
   * Required. Performance goal of the insertion order.
   * @param performanceGoal performanceGoal or {@code null} for none
   */
  public InsertionOrder setPerformanceGoal(PerformanceGoal performanceGoal) {
    this.performanceGoal = performanceGoal;
    return this;
  }

  /**
   * Output only. The reservation type of the insertion order.
   * @return value or {@code null} for none
   */
  public java.lang.String getReservationType() {
    return reservationType;
  }

  /**
   * Output only. The reservation type of the insertion order.
   * @param reservationType reservationType or {@code null} for none
   */
  public InsertionOrder setReservationType(java.lang.String reservationType) {
    this.reservationType = reservationType;
    return this;
  }

  /**
   * Output only. The timestamp when the insertion order was last updated. Assigned by the system.
   * @return value or {@code null} for none
   */
  public String getUpdateTime() {
    return updateTime;
  }

  /**
   * Output only. The timestamp when the insertion order was last updated. Assigned by the system.
   * @param updateTime updateTime or {@code null} for none
   */
  public InsertionOrder setUpdateTime(String updateTime) {
    this.updateTime = updateTime;
    return this;
  }

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

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

}
