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

/**
 * Action information extracted from a DDL statement. This proto is used to display the brief info
 * of the DDL statement for the operation UpdateDatabaseDdl.
 *
 * <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 Spanner 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 DdlStatementActionInfo extends com.google.api.client.json.GenericJson {

  /**
   * The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT, etc. This field is a non-
   * empty string.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String action;

  /**
   * The entity name(s) being operated on the DDL statement. E.g. 1. For statement "CREATE TABLE
   * t1(...)", `entity_names` = ["t1"]. 2. For statement "GRANT ROLE r1, r2 ...", `entity_names` =
   * ["r1", "r2"]. 3. For statement "ANALYZE", `entity_names` = [].
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> entityNames;

  /**
   * The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc. This field can be empty
   * string for some DDL statement, e.g. for statement "ANALYZE", `entity_type` = "".
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String entityType;

  /**
   * The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT, etc. This field is a non-
   * empty string.
   * @return value or {@code null} for none
   */
  public java.lang.String getAction() {
    return action;
  }

  /**
   * The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT, etc. This field is a non-
   * empty string.
   * @param action action or {@code null} for none
   */
  public DdlStatementActionInfo setAction(java.lang.String action) {
    this.action = action;
    return this;
  }

  /**
   * The entity name(s) being operated on the DDL statement. E.g. 1. For statement "CREATE TABLE
   * t1(...)", `entity_names` = ["t1"]. 2. For statement "GRANT ROLE r1, r2 ...", `entity_names` =
   * ["r1", "r2"]. 3. For statement "ANALYZE", `entity_names` = [].
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getEntityNames() {
    return entityNames;
  }

  /**
   * The entity name(s) being operated on the DDL statement. E.g. 1. For statement "CREATE TABLE
   * t1(...)", `entity_names` = ["t1"]. 2. For statement "GRANT ROLE r1, r2 ...", `entity_names` =
   * ["r1", "r2"]. 3. For statement "ANALYZE", `entity_names` = [].
   * @param entityNames entityNames or {@code null} for none
   */
  public DdlStatementActionInfo setEntityNames(java.util.List<java.lang.String> entityNames) {
    this.entityNames = entityNames;
    return this;
  }

  /**
   * The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc. This field can be empty
   * string for some DDL statement, e.g. for statement "ANALYZE", `entity_type` = "".
   * @return value or {@code null} for none
   */
  public java.lang.String getEntityType() {
    return entityType;
  }

  /**
   * The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc. This field can be empty
   * string for some DDL statement, e.g. for statement "ANALYZE", `entity_type` = "".
   * @param entityType entityType or {@code null} for none
   */
  public DdlStatementActionInfo setEntityType(java.lang.String entityType) {
    this.entityType = entityType;
    return this;
  }

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

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

}
