/*
 * 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;

/**
 * A file or script to execute.
 *
 * <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 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 ExecResourceExec extends com.google.api.client.json.GenericJson {

  /**
   * Exit codes that indicate success.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.Integer> allowedSuccessCodes;

  /**
   * Arguments to use.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> args;

  /**
   * A remote or local file.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private File file;

  /**
   * The script interpreter to use.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String interpreter;

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

  /**
   * Exit codes that indicate success.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.Integer> getAllowedSuccessCodes() {
    return allowedSuccessCodes;
  }

  /**
   * Exit codes that indicate success.
   * @param allowedSuccessCodes allowedSuccessCodes or {@code null} for none
   */
  public ExecResourceExec setAllowedSuccessCodes(java.util.List<java.lang.Integer> allowedSuccessCodes) {
    this.allowedSuccessCodes = allowedSuccessCodes;
    return this;
  }

  /**
   * Arguments to use.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getArgs() {
    return args;
  }

  /**
   * Arguments to use.
   * @param args args or {@code null} for none
   */
  public ExecResourceExec setArgs(java.util.List<java.lang.String> args) {
    this.args = args;
    return this;
  }

  /**
   * A remote or local file.
   * @return value or {@code null} for none
   */
  public File getFile() {
    return file;
  }

  /**
   * A remote or local file.
   * @param file file or {@code null} for none
   */
  public ExecResourceExec setFile(File file) {
    this.file = file;
    return this;
  }

  /**
   * The script interpreter to use.
   * @return value or {@code null} for none
   */
  public java.lang.String getInterpreter() {
    return interpreter;
  }

  /**
   * The script interpreter to use.
   * @param interpreter interpreter or {@code null} for none
   */
  public ExecResourceExec setInterpreter(java.lang.String interpreter) {
    this.interpreter = interpreter;
    return this;
  }

  /**
   * An inline script.
   * @return value or {@code null} for none
   */
  public java.lang.String getScript() {
    return script;
  }

  /**
   * An inline script.
   * @param script script or {@code null} for none
   */
  public ExecResourceExec setScript(java.lang.String script) {
    this.script = script;
    return this;
  }

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

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

}
