/*
 * 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.osconfig.v1beta.model;

/**
 * Specifies a resource to be used in the recipe.
 *
 * <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 OS Config 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 SoftwareRecipeArtifact extends com.google.api.client.json.GenericJson {

  /**
   * Defaults to false. When false, recipes are subject to validations based on the artifact type:
   * Remote: A checksum must be specified, and only protocols with transport-layer security are
   * permitted. GCS: An object generation number must be specified.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean allowInsecure;

  /**
   * A Google Cloud Storage artifact.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private SoftwareRecipeArtifactGcs gcs;

  /**
   * Required. Id of the artifact, which the installation and update steps of this recipe can
   * reference. Artifacts in a recipe cannot have the same id.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String id;

  /**
   * A generic remote artifact.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private SoftwareRecipeArtifactRemote remote;

  /**
   * Defaults to false. When false, recipes are subject to validations based on the artifact type:
   * Remote: A checksum must be specified, and only protocols with transport-layer security are
   * permitted. GCS: An object generation number must be specified.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getAllowInsecure() {
    return allowInsecure;
  }

  /**
   * Defaults to false. When false, recipes are subject to validations based on the artifact type:
   * Remote: A checksum must be specified, and only protocols with transport-layer security are
   * permitted. GCS: An object generation number must be specified.
   * @param allowInsecure allowInsecure or {@code null} for none
   */
  public SoftwareRecipeArtifact setAllowInsecure(java.lang.Boolean allowInsecure) {
    this.allowInsecure = allowInsecure;
    return this;
  }

  /**
   * A Google Cloud Storage artifact.
   * @return value or {@code null} for none
   */
  public SoftwareRecipeArtifactGcs getGcs() {
    return gcs;
  }

  /**
   * A Google Cloud Storage artifact.
   * @param gcs gcs or {@code null} for none
   */
  public SoftwareRecipeArtifact setGcs(SoftwareRecipeArtifactGcs gcs) {
    this.gcs = gcs;
    return this;
  }

  /**
   * Required. Id of the artifact, which the installation and update steps of this recipe can
   * reference. Artifacts in a recipe cannot have the same id.
   * @return value or {@code null} for none
   */
  public java.lang.String getId() {
    return id;
  }

  /**
   * Required. Id of the artifact, which the installation and update steps of this recipe can
   * reference. Artifacts in a recipe cannot have the same id.
   * @param id id or {@code null} for none
   */
  public SoftwareRecipeArtifact setId(java.lang.String id) {
    this.id = id;
    return this;
  }

  /**
   * A generic remote artifact.
   * @return value or {@code null} for none
   */
  public SoftwareRecipeArtifactRemote getRemote() {
    return remote;
  }

  /**
   * A generic remote artifact.
   * @param remote remote or {@code null} for none
   */
  public SoftwareRecipeArtifact setRemote(SoftwareRecipeArtifactRemote remote) {
    this.remote = remote;
    return this;
  }

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

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

}
