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

/**
 * Model definition for GoogleCloudApigeeV1Deployment.
 *
 * <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 Apigee 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 GoogleCloudApigeeV1Deployment extends com.google.api.client.json.GenericJson {

  /**
   * API proxy.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String apiProxy;

  /**
   * Time the API proxy was marked `deployed` in the control plane in millisconds since epoch.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long deployStartTime;

  /**
   * Environment.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String environment;

  /**
   * Errors reported for this deployment. Populated only when state == ERROR. **Note**: This field
   * is displayed only when viewing deployment status.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GoogleRpcStatus> errors;

  /**
   * Status reported by each runtime instance. **Note**: This field is displayed only when viewing
   * deployment status.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GoogleCloudApigeeV1InstanceDeploymentStatus> instances;

  /**
   * Status reported by runtime pods. **Note**: **This field is deprecated**. Runtime versions 1.3
   * and above report instance level status rather than pod status.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GoogleCloudApigeeV1PodStatus> pods;

  /**
   * Output only. The type of the deployment (standard or extensible) Deployed proxy revision will
   * be marked as extensible in following 2 cases. 1. The deployed proxy revision uses extensible
   * policies. 2. If a environment supports flowhooks and flow hook is configured.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String proxyDeploymentType;

  /**
   * API proxy revision.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String revision;

  /**
   * Conflicts in the desired state routing configuration. The presence of conflicts does not cause
   * the state to be `ERROR`, but it will mean that some of the deployment's base paths are not
   * routed to its environment. If the conflicts change, the state will transition to `PROGRESSING`
   * until the latest configuration is rolled out to all instances. **Note**: This field is
   * displayed only when viewing deployment status.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GoogleCloudApigeeV1DeploymentChangeReportRoutingConflict> routeConflicts;

  /**
   * The full resource name of Cloud IAM Service Account that this deployment is using, eg,
   * `projects/-/serviceAccounts/{email}`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String serviceAccount;

  /**
   * Current state of the deployment. **Note**: This field is displayed only when viewing deployment
   * status.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String state;

  /**
   * API proxy.
   * @return value or {@code null} for none
   */
  public java.lang.String getApiProxy() {
    return apiProxy;
  }

  /**
   * API proxy.
   * @param apiProxy apiProxy or {@code null} for none
   */
  public GoogleCloudApigeeV1Deployment setApiProxy(java.lang.String apiProxy) {
    this.apiProxy = apiProxy;
    return this;
  }

  /**
   * Time the API proxy was marked `deployed` in the control plane in millisconds since epoch.
   * @return value or {@code null} for none
   */
  public java.lang.Long getDeployStartTime() {
    return deployStartTime;
  }

  /**
   * Time the API proxy was marked `deployed` in the control plane in millisconds since epoch.
   * @param deployStartTime deployStartTime or {@code null} for none
   */
  public GoogleCloudApigeeV1Deployment setDeployStartTime(java.lang.Long deployStartTime) {
    this.deployStartTime = deployStartTime;
    return this;
  }

  /**
   * Environment.
   * @return value or {@code null} for none
   */
  public java.lang.String getEnvironment() {
    return environment;
  }

  /**
   * Environment.
   * @param environment environment or {@code null} for none
   */
  public GoogleCloudApigeeV1Deployment setEnvironment(java.lang.String environment) {
    this.environment = environment;
    return this;
  }

  /**
   * Errors reported for this deployment. Populated only when state == ERROR. **Note**: This field
   * is displayed only when viewing deployment status.
   * @return value or {@code null} for none
   */
  public java.util.List<GoogleRpcStatus> getErrors() {
    return errors;
  }

  /**
   * Errors reported for this deployment. Populated only when state == ERROR. **Note**: This field
   * is displayed only when viewing deployment status.
   * @param errors errors or {@code null} for none
   */
  public GoogleCloudApigeeV1Deployment setErrors(java.util.List<GoogleRpcStatus> errors) {
    this.errors = errors;
    return this;
  }

  /**
   * Status reported by each runtime instance. **Note**: This field is displayed only when viewing
   * deployment status.
   * @return value or {@code null} for none
   */
  public java.util.List<GoogleCloudApigeeV1InstanceDeploymentStatus> getInstances() {
    return instances;
  }

  /**
   * Status reported by each runtime instance. **Note**: This field is displayed only when viewing
   * deployment status.
   * @param instances instances or {@code null} for none
   */
  public GoogleCloudApigeeV1Deployment setInstances(java.util.List<GoogleCloudApigeeV1InstanceDeploymentStatus> instances) {
    this.instances = instances;
    return this;
  }

  /**
   * Status reported by runtime pods. **Note**: **This field is deprecated**. Runtime versions 1.3
   * and above report instance level status rather than pod status.
   * @return value or {@code null} for none
   */
  public java.util.List<GoogleCloudApigeeV1PodStatus> getPods() {
    return pods;
  }

  /**
   * Status reported by runtime pods. **Note**: **This field is deprecated**. Runtime versions 1.3
   * and above report instance level status rather than pod status.
   * @param pods pods or {@code null} for none
   */
  public GoogleCloudApigeeV1Deployment setPods(java.util.List<GoogleCloudApigeeV1PodStatus> pods) {
    this.pods = pods;
    return this;
  }

  /**
   * Output only. The type of the deployment (standard or extensible) Deployed proxy revision will
   * be marked as extensible in following 2 cases. 1. The deployed proxy revision uses extensible
   * policies. 2. If a environment supports flowhooks and flow hook is configured.
   * @return value or {@code null} for none
   */
  public java.lang.String getProxyDeploymentType() {
    return proxyDeploymentType;
  }

  /**
   * Output only. The type of the deployment (standard or extensible) Deployed proxy revision will
   * be marked as extensible in following 2 cases. 1. The deployed proxy revision uses extensible
   * policies. 2. If a environment supports flowhooks and flow hook is configured.
   * @param proxyDeploymentType proxyDeploymentType or {@code null} for none
   */
  public GoogleCloudApigeeV1Deployment setProxyDeploymentType(java.lang.String proxyDeploymentType) {
    this.proxyDeploymentType = proxyDeploymentType;
    return this;
  }

  /**
   * API proxy revision.
   * @return value or {@code null} for none
   */
  public java.lang.String getRevision() {
    return revision;
  }

  /**
   * API proxy revision.
   * @param revision revision or {@code null} for none
   */
  public GoogleCloudApigeeV1Deployment setRevision(java.lang.String revision) {
    this.revision = revision;
    return this;
  }

  /**
   * Conflicts in the desired state routing configuration. The presence of conflicts does not cause
   * the state to be `ERROR`, but it will mean that some of the deployment's base paths are not
   * routed to its environment. If the conflicts change, the state will transition to `PROGRESSING`
   * until the latest configuration is rolled out to all instances. **Note**: This field is
   * displayed only when viewing deployment status.
   * @return value or {@code null} for none
   */
  public java.util.List<GoogleCloudApigeeV1DeploymentChangeReportRoutingConflict> getRouteConflicts() {
    return routeConflicts;
  }

  /**
   * Conflicts in the desired state routing configuration. The presence of conflicts does not cause
   * the state to be `ERROR`, but it will mean that some of the deployment's base paths are not
   * routed to its environment. If the conflicts change, the state will transition to `PROGRESSING`
   * until the latest configuration is rolled out to all instances. **Note**: This field is
   * displayed only when viewing deployment status.
   * @param routeConflicts routeConflicts or {@code null} for none
   */
  public GoogleCloudApigeeV1Deployment setRouteConflicts(java.util.List<GoogleCloudApigeeV1DeploymentChangeReportRoutingConflict> routeConflicts) {
    this.routeConflicts = routeConflicts;
    return this;
  }

  /**
   * The full resource name of Cloud IAM Service Account that this deployment is using, eg,
   * `projects/-/serviceAccounts/{email}`.
   * @return value or {@code null} for none
   */
  public java.lang.String getServiceAccount() {
    return serviceAccount;
  }

  /**
   * The full resource name of Cloud IAM Service Account that this deployment is using, eg,
   * `projects/-/serviceAccounts/{email}`.
   * @param serviceAccount serviceAccount or {@code null} for none
   */
  public GoogleCloudApigeeV1Deployment setServiceAccount(java.lang.String serviceAccount) {
    this.serviceAccount = serviceAccount;
    return this;
  }

  /**
   * Current state of the deployment. **Note**: This field is displayed only when viewing deployment
   * status.
   * @return value or {@code null} for none
   */
  public java.lang.String getState() {
    return state;
  }

  /**
   * Current state of the deployment. **Note**: This field is displayed only when viewing deployment
   * status.
   * @param state state or {@code null} for none
   */
  public GoogleCloudApigeeV1Deployment setState(java.lang.String state) {
    this.state = state;
    return this;
  }

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

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

}
