/*
 * 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.cloudbuild.v1alpha1.model;

/**
 * ApprovalResult describes the decision and associated metadata of a manual approval of a build.
 *
 * <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 Cloud Build 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 ApprovalResult extends com.google.api.client.json.GenericJson {

  /**
   * Output only. The time when the approval decision was made.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String approvalTime;

  /**
   * Output only. Email of the user that called the ApproveBuild API to approve or reject a build at
   * the time that the API was called.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String approverAccount;

  /**
   * Optional. An optional comment for this manual approval result.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String comment;

  /**
   * Required. The decision of this manual approval.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String decision;

  /**
   * Optional. An optional URL tied to this manual approval result. This field is essentially the
   * same as comment, except that it will be rendered by the UI differently. An example use case is
   * a link to an external job that approved this Build.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String url;

  /**
   * Output only. The time when the approval decision was made.
   * @return value or {@code null} for none
   */
  public String getApprovalTime() {
    return approvalTime;
  }

  /**
   * Output only. The time when the approval decision was made.
   * @param approvalTime approvalTime or {@code null} for none
   */
  public ApprovalResult setApprovalTime(String approvalTime) {
    this.approvalTime = approvalTime;
    return this;
  }

  /**
   * Output only. Email of the user that called the ApproveBuild API to approve or reject a build at
   * the time that the API was called.
   * @return value or {@code null} for none
   */
  public java.lang.String getApproverAccount() {
    return approverAccount;
  }

  /**
   * Output only. Email of the user that called the ApproveBuild API to approve or reject a build at
   * the time that the API was called.
   * @param approverAccount approverAccount or {@code null} for none
   */
  public ApprovalResult setApproverAccount(java.lang.String approverAccount) {
    this.approverAccount = approverAccount;
    return this;
  }

  /**
   * Optional. An optional comment for this manual approval result.
   * @return value or {@code null} for none
   */
  public java.lang.String getComment() {
    return comment;
  }

  /**
   * Optional. An optional comment for this manual approval result.
   * @param comment comment or {@code null} for none
   */
  public ApprovalResult setComment(java.lang.String comment) {
    this.comment = comment;
    return this;
  }

  /**
   * Required. The decision of this manual approval.
   * @return value or {@code null} for none
   */
  public java.lang.String getDecision() {
    return decision;
  }

  /**
   * Required. The decision of this manual approval.
   * @param decision decision or {@code null} for none
   */
  public ApprovalResult setDecision(java.lang.String decision) {
    this.decision = decision;
    return this;
  }

  /**
   * Optional. An optional URL tied to this manual approval result. This field is essentially the
   * same as comment, except that it will be rendered by the UI differently. An example use case is
   * a link to an external job that approved this Build.
   * @return value or {@code null} for none
   */
  public java.lang.String getUrl() {
    return url;
  }

  /**
   * Optional. An optional URL tied to this manual approval result. This field is essentially the
   * same as comment, except that it will be rendered by the UI differently. An example use case is
   * a link to an external job that approved this Build.
   * @param url url or {@code null} for none
   */
  public ApprovalResult setUrl(java.lang.String url) {
    this.url = url;
    return this;
  }

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

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

}
