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

/**
 * Conceptually, timers are clocks that count down from an initial duration and notify when they
 * reach 0. In practice, as a timer is running, it holds a stable expiration time and computes the
 * remaining duration using the current time. When a timer is paused, it holds a stable remaining
 * duration.
 *
 * <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 Document AI Warehouse 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 QualityActionsTimer extends com.google.api.client.json.GenericJson {

  /**
   * The time when this timer was created
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private AssistantApiTimestamp creationTime;

  /**
   * Identifies the device this timer belongs to.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private AssistantApiSettingsDeviceSettings device;

  /**
   * When not paused: the time the timer is (or was) scheduled to expire, in milliseconds since the
   * Unix epoch. This should be deprecated and replaced by the expire_timer_time with DateTime type
   * once DateTime proto includes unix timestamp (b/63636831).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long expireTime;

  /**
   * This is currently being only used only for the response generation when the user describe the
   * expired datatime as a search constraint. We will used it for everything else once that for
   * filtering once DateTime proto includes unix timestamp (b/63636831) and expire_time is
   * deprecated.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpSemanticParsingDatetimeDateTime expireTimerTime;

  /**
   * A string key used as an identifier to this timer, unique for a given Provider.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String id;

  /**
   * The label, provided by a user, associated with this timer.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String label;

  /**
   * The time when this timer was last updated (creation, paused, resumed, etc.)
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private AssistantApiTimestamp lastUpdated;

  /**
   * The duration of the timer when it was started, in milliseconds.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long originalDuration;

  /**
   * The duration set for the timer. The DateTimeModifier field is ignored. This field is currently
   * only experimental until we switch the Dialog code and gramnar to the new format.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpSemanticParsingDatetimeDuration originalTimerDuration;

  /**
   * The provider that owns this alarm. For Android, this includes the app that owns this alarm,
   * where an intent should be sent to modify it.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private AssistantApiCoreTypesProvider provider;

  /**
   * When PAUSED: the remaining duration in milliseconds.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long remainingDuration;

  /**
   * The duration remained for the timer. This is needed because there is no expiration date for
   * paused timer. The DateTimeModifier field is ignored. This field is currently only experimental
   * until we switch the Dialog code and gramnar to the new format.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpSemanticParsingDatetimeDuration remainingTimerDuration;

  /**
   * The ringtone will be played when the timer fires, it will replace the beep sound if it is not
   * empty.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private QualityActionsRingtone ringtone;

  /**
   * Ringtone Task Metadata information used to generate sound for firing the timer.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private AssistantApiCoreTypesGovernedRingtoneTaskMetadata ringtoneTaskMetadata;

  /**
   * Contains info about the room the timer is in
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private QualityActionsRoom room;

  /**
   * The current status of the timer.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String status;

  /**
   * Whether or not the device will vibrate when the timer fires.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean vibrate;

  /**
   * The time when this timer was created
   * @return value or {@code null} for none
   */
  public AssistantApiTimestamp getCreationTime() {
    return creationTime;
  }

  /**
   * The time when this timer was created
   * @param creationTime creationTime or {@code null} for none
   */
  public QualityActionsTimer setCreationTime(AssistantApiTimestamp creationTime) {
    this.creationTime = creationTime;
    return this;
  }

  /**
   * Identifies the device this timer belongs to.
   * @return value or {@code null} for none
   */
  public AssistantApiSettingsDeviceSettings getDevice() {
    return device;
  }

  /**
   * Identifies the device this timer belongs to.
   * @param device device or {@code null} for none
   */
  public QualityActionsTimer setDevice(AssistantApiSettingsDeviceSettings device) {
    this.device = device;
    return this;
  }

  /**
   * When not paused: the time the timer is (or was) scheduled to expire, in milliseconds since the
   * Unix epoch. This should be deprecated and replaced by the expire_timer_time with DateTime type
   * once DateTime proto includes unix timestamp (b/63636831).
   * @return value or {@code null} for none
   */
  public java.lang.Long getExpireTime() {
    return expireTime;
  }

  /**
   * When not paused: the time the timer is (or was) scheduled to expire, in milliseconds since the
   * Unix epoch. This should be deprecated and replaced by the expire_timer_time with DateTime type
   * once DateTime proto includes unix timestamp (b/63636831).
   * @param expireTime expireTime or {@code null} for none
   */
  public QualityActionsTimer setExpireTime(java.lang.Long expireTime) {
    this.expireTime = expireTime;
    return this;
  }

  /**
   * This is currently being only used only for the response generation when the user describe the
   * expired datatime as a search constraint. We will used it for everything else once that for
   * filtering once DateTime proto includes unix timestamp (b/63636831) and expire_time is
   * deprecated.
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingDatetimeDateTime getExpireTimerTime() {
    return expireTimerTime;
  }

  /**
   * This is currently being only used only for the response generation when the user describe the
   * expired datatime as a search constraint. We will used it for everything else once that for
   * filtering once DateTime proto includes unix timestamp (b/63636831) and expire_time is
   * deprecated.
   * @param expireTimerTime expireTimerTime or {@code null} for none
   */
  public QualityActionsTimer setExpireTimerTime(NlpSemanticParsingDatetimeDateTime expireTimerTime) {
    this.expireTimerTime = expireTimerTime;
    return this;
  }

  /**
   * A string key used as an identifier to this timer, unique for a given Provider.
   * @return value or {@code null} for none
   */
  public java.lang.String getId() {
    return id;
  }

  /**
   * A string key used as an identifier to this timer, unique for a given Provider.
   * @param id id or {@code null} for none
   */
  public QualityActionsTimer setId(java.lang.String id) {
    this.id = id;
    return this;
  }

  /**
   * The label, provided by a user, associated with this timer.
   * @return value or {@code null} for none
   */
  public java.lang.String getLabel() {
    return label;
  }

  /**
   * The label, provided by a user, associated with this timer.
   * @param label label or {@code null} for none
   */
  public QualityActionsTimer setLabel(java.lang.String label) {
    this.label = label;
    return this;
  }

  /**
   * The time when this timer was last updated (creation, paused, resumed, etc.)
   * @return value or {@code null} for none
   */
  public AssistantApiTimestamp getLastUpdated() {
    return lastUpdated;
  }

  /**
   * The time when this timer was last updated (creation, paused, resumed, etc.)
   * @param lastUpdated lastUpdated or {@code null} for none
   */
  public QualityActionsTimer setLastUpdated(AssistantApiTimestamp lastUpdated) {
    this.lastUpdated = lastUpdated;
    return this;
  }

  /**
   * The duration of the timer when it was started, in milliseconds.
   * @return value or {@code null} for none
   */
  public java.lang.Long getOriginalDuration() {
    return originalDuration;
  }

  /**
   * The duration of the timer when it was started, in milliseconds.
   * @param originalDuration originalDuration or {@code null} for none
   */
  public QualityActionsTimer setOriginalDuration(java.lang.Long originalDuration) {
    this.originalDuration = originalDuration;
    return this;
  }

  /**
   * The duration set for the timer. The DateTimeModifier field is ignored. This field is currently
   * only experimental until we switch the Dialog code and gramnar to the new format.
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingDatetimeDuration getOriginalTimerDuration() {
    return originalTimerDuration;
  }

  /**
   * The duration set for the timer. The DateTimeModifier field is ignored. This field is currently
   * only experimental until we switch the Dialog code and gramnar to the new format.
   * @param originalTimerDuration originalTimerDuration or {@code null} for none
   */
  public QualityActionsTimer setOriginalTimerDuration(NlpSemanticParsingDatetimeDuration originalTimerDuration) {
    this.originalTimerDuration = originalTimerDuration;
    return this;
  }

  /**
   * The provider that owns this alarm. For Android, this includes the app that owns this alarm,
   * where an intent should be sent to modify it.
   * @return value or {@code null} for none
   */
  public AssistantApiCoreTypesProvider getProvider() {
    return provider;
  }

  /**
   * The provider that owns this alarm. For Android, this includes the app that owns this alarm,
   * where an intent should be sent to modify it.
   * @param provider provider or {@code null} for none
   */
  public QualityActionsTimer setProvider(AssistantApiCoreTypesProvider provider) {
    this.provider = provider;
    return this;
  }

  /**
   * When PAUSED: the remaining duration in milliseconds.
   * @return value or {@code null} for none
   */
  public java.lang.Long getRemainingDuration() {
    return remainingDuration;
  }

  /**
   * When PAUSED: the remaining duration in milliseconds.
   * @param remainingDuration remainingDuration or {@code null} for none
   */
  public QualityActionsTimer setRemainingDuration(java.lang.Long remainingDuration) {
    this.remainingDuration = remainingDuration;
    return this;
  }

  /**
   * The duration remained for the timer. This is needed because there is no expiration date for
   * paused timer. The DateTimeModifier field is ignored. This field is currently only experimental
   * until we switch the Dialog code and gramnar to the new format.
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingDatetimeDuration getRemainingTimerDuration() {
    return remainingTimerDuration;
  }

  /**
   * The duration remained for the timer. This is needed because there is no expiration date for
   * paused timer. The DateTimeModifier field is ignored. This field is currently only experimental
   * until we switch the Dialog code and gramnar to the new format.
   * @param remainingTimerDuration remainingTimerDuration or {@code null} for none
   */
  public QualityActionsTimer setRemainingTimerDuration(NlpSemanticParsingDatetimeDuration remainingTimerDuration) {
    this.remainingTimerDuration = remainingTimerDuration;
    return this;
  }

  /**
   * The ringtone will be played when the timer fires, it will replace the beep sound if it is not
   * empty.
   * @return value or {@code null} for none
   */
  public QualityActionsRingtone getRingtone() {
    return ringtone;
  }

  /**
   * The ringtone will be played when the timer fires, it will replace the beep sound if it is not
   * empty.
   * @param ringtone ringtone or {@code null} for none
   */
  public QualityActionsTimer setRingtone(QualityActionsRingtone ringtone) {
    this.ringtone = ringtone;
    return this;
  }

  /**
   * Ringtone Task Metadata information used to generate sound for firing the timer.
   * @return value or {@code null} for none
   */
  public AssistantApiCoreTypesGovernedRingtoneTaskMetadata getRingtoneTaskMetadata() {
    return ringtoneTaskMetadata;
  }

  /**
   * Ringtone Task Metadata information used to generate sound for firing the timer.
   * @param ringtoneTaskMetadata ringtoneTaskMetadata or {@code null} for none
   */
  public QualityActionsTimer setRingtoneTaskMetadata(AssistantApiCoreTypesGovernedRingtoneTaskMetadata ringtoneTaskMetadata) {
    this.ringtoneTaskMetadata = ringtoneTaskMetadata;
    return this;
  }

  /**
   * Contains info about the room the timer is in
   * @return value or {@code null} for none
   */
  public QualityActionsRoom getRoom() {
    return room;
  }

  /**
   * Contains info about the room the timer is in
   * @param room room or {@code null} for none
   */
  public QualityActionsTimer setRoom(QualityActionsRoom room) {
    this.room = room;
    return this;
  }

  /**
   * The current status of the timer.
   * @return value or {@code null} for none
   */
  public java.lang.String getStatus() {
    return status;
  }

  /**
   * The current status of the timer.
   * @param status status or {@code null} for none
   */
  public QualityActionsTimer setStatus(java.lang.String status) {
    this.status = status;
    return this;
  }

  /**
   * Whether or not the device will vibrate when the timer fires.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getVibrate() {
    return vibrate;
  }

  /**
   * Whether or not the device will vibrate when the timer fires.
   * @param vibrate vibrate or {@code null} for none
   */
  public QualityActionsTimer setVibrate(java.lang.Boolean vibrate) {
    this.vibrate = vibrate;
    return this;
  }

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

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

}
