/*
 * 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.dataform.v1beta1.model;

/**
 * Represents the result of compiling a Dataform project.
 *
 * <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 Dataform 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 CompilationResult extends com.google.api.client.json.GenericJson {

  /**
   * Immutable. If set, fields of `code_compilation_config` override the default compilation
   * settings that are specified in dataform.json.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private CodeCompilationConfig codeCompilationConfig;

  /**
   * Output only. Errors encountered during project compilation.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<CompilationError> compilationErrors;

  static {
    // hack to force ProGuard to consider CompilationError 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(CompilationError.class);
  }

  /**
   * Output only. The version of `@dataform/core` that was used for compilation.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String dataformCoreVersion;

  /**
   * Immutable. Git commit/tag/branch name at which the repository should be compiled. Must exist in
   * the remote repository. Examples: - a commit SHA: `12ade345` - a tag: `tag1` - a branch name:
   * `branch1`
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String gitCommitish;

  /**
   * Output only. The compilation result's name.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * Immutable. The name of the release config to compile. The release config's
   * 'current_compilation_result' field will be updated to this compilation result. Must be in the
   * format `projects/locations/repositories/releaseConfigs`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String releaseConfig;

  /**
   * Output only. The fully resolved Git commit SHA of the code that was compiled. Not set for
   * compilation results whose source is a workspace.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String resolvedGitCommitSha;

  /**
   * Immutable. The name of the workspace to compile. Must be in the format
   * `projects/locations/repositories/workspaces`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String workspace;

  /**
   * Immutable. If set, fields of `code_compilation_config` override the default compilation
   * settings that are specified in dataform.json.
   * @return value or {@code null} for none
   */
  public CodeCompilationConfig getCodeCompilationConfig() {
    return codeCompilationConfig;
  }

  /**
   * Immutable. If set, fields of `code_compilation_config` override the default compilation
   * settings that are specified in dataform.json.
   * @param codeCompilationConfig codeCompilationConfig or {@code null} for none
   */
  public CompilationResult setCodeCompilationConfig(CodeCompilationConfig codeCompilationConfig) {
    this.codeCompilationConfig = codeCompilationConfig;
    return this;
  }

  /**
   * Output only. Errors encountered during project compilation.
   * @return value or {@code null} for none
   */
  public java.util.List<CompilationError> getCompilationErrors() {
    return compilationErrors;
  }

  /**
   * Output only. Errors encountered during project compilation.
   * @param compilationErrors compilationErrors or {@code null} for none
   */
  public CompilationResult setCompilationErrors(java.util.List<CompilationError> compilationErrors) {
    this.compilationErrors = compilationErrors;
    return this;
  }

  /**
   * Output only. The version of `@dataform/core` that was used for compilation.
   * @return value or {@code null} for none
   */
  public java.lang.String getDataformCoreVersion() {
    return dataformCoreVersion;
  }

  /**
   * Output only. The version of `@dataform/core` that was used for compilation.
   * @param dataformCoreVersion dataformCoreVersion or {@code null} for none
   */
  public CompilationResult setDataformCoreVersion(java.lang.String dataformCoreVersion) {
    this.dataformCoreVersion = dataformCoreVersion;
    return this;
  }

  /**
   * Immutable. Git commit/tag/branch name at which the repository should be compiled. Must exist in
   * the remote repository. Examples: - a commit SHA: `12ade345` - a tag: `tag1` - a branch name:
   * `branch1`
   * @return value or {@code null} for none
   */
  public java.lang.String getGitCommitish() {
    return gitCommitish;
  }

  /**
   * Immutable. Git commit/tag/branch name at which the repository should be compiled. Must exist in
   * the remote repository. Examples: - a commit SHA: `12ade345` - a tag: `tag1` - a branch name:
   * `branch1`
   * @param gitCommitish gitCommitish or {@code null} for none
   */
  public CompilationResult setGitCommitish(java.lang.String gitCommitish) {
    this.gitCommitish = gitCommitish;
    return this;
  }

  /**
   * Output only. The compilation result's name.
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * Output only. The compilation result's name.
   * @param name name or {@code null} for none
   */
  public CompilationResult setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * Immutable. The name of the release config to compile. The release config's
   * 'current_compilation_result' field will be updated to this compilation result. Must be in the
   * format `projects/locations/repositories/releaseConfigs`.
   * @return value or {@code null} for none
   */
  public java.lang.String getReleaseConfig() {
    return releaseConfig;
  }

  /**
   * Immutable. The name of the release config to compile. The release config's
   * 'current_compilation_result' field will be updated to this compilation result. Must be in the
   * format `projects/locations/repositories/releaseConfigs`.
   * @param releaseConfig releaseConfig or {@code null} for none
   */
  public CompilationResult setReleaseConfig(java.lang.String releaseConfig) {
    this.releaseConfig = releaseConfig;
    return this;
  }

  /**
   * Output only. The fully resolved Git commit SHA of the code that was compiled. Not set for
   * compilation results whose source is a workspace.
   * @return value or {@code null} for none
   */
  public java.lang.String getResolvedGitCommitSha() {
    return resolvedGitCommitSha;
  }

  /**
   * Output only. The fully resolved Git commit SHA of the code that was compiled. Not set for
   * compilation results whose source is a workspace.
   * @param resolvedGitCommitSha resolvedGitCommitSha or {@code null} for none
   */
  public CompilationResult setResolvedGitCommitSha(java.lang.String resolvedGitCommitSha) {
    this.resolvedGitCommitSha = resolvedGitCommitSha;
    return this;
  }

  /**
   * Immutable. The name of the workspace to compile. Must be in the format
   * `projects/locations/repositories/workspaces`.
   * @return value or {@code null} for none
   */
  public java.lang.String getWorkspace() {
    return workspace;
  }

  /**
   * Immutable. The name of the workspace to compile. Must be in the format
   * `projects/locations/repositories/workspaces`.
   * @param workspace workspace or {@code null} for none
   */
  public CompilationResult setWorkspace(java.lang.String workspace) {
    this.workspace = workspace;
    return this;
  }

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

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

}
