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

/**
 * The request for CreateInstanceConfigRequest.
 *
 * <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 CreateInstanceConfigRequest extends com.google.api.client.json.GenericJson {

  /**
   * Required. The InstanceConfig proto of the configuration to create. instance_config.name must be
   * `/instanceConfigs/`. instance_config.base_config must be a Google managed configuration name,
   * e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private InstanceConfig instanceConfig;

  /**
   * Required. The ID of the instance config to create. Valid identifiers are of the form
   * `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in length. The `custom-`
   * prefix is required to avoid name conflicts with Google managed configurations.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String instanceConfigId;

  /**
   * An option to validate, but not actually execute, a request, and provide the same response.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean validateOnly;

  /**
   * Required. The InstanceConfig proto of the configuration to create. instance_config.name must be
   * `/instanceConfigs/`. instance_config.base_config must be a Google managed configuration name,
   * e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3.
   * @return value or {@code null} for none
   */
  public InstanceConfig getInstanceConfig() {
    return instanceConfig;
  }

  /**
   * Required. The InstanceConfig proto of the configuration to create. instance_config.name must be
   * `/instanceConfigs/`. instance_config.base_config must be a Google managed configuration name,
   * e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3.
   * @param instanceConfig instanceConfig or {@code null} for none
   */
  public CreateInstanceConfigRequest setInstanceConfig(InstanceConfig instanceConfig) {
    this.instanceConfig = instanceConfig;
    return this;
  }

  /**
   * Required. The ID of the instance config to create. Valid identifiers are of the form
   * `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in length. The `custom-`
   * prefix is required to avoid name conflicts with Google managed configurations.
   * @return value or {@code null} for none
   */
  public java.lang.String getInstanceConfigId() {
    return instanceConfigId;
  }

  /**
   * Required. The ID of the instance config to create. Valid identifiers are of the form
   * `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in length. The `custom-`
   * prefix is required to avoid name conflicts with Google managed configurations.
   * @param instanceConfigId instanceConfigId or {@code null} for none
   */
  public CreateInstanceConfigRequest setInstanceConfigId(java.lang.String instanceConfigId) {
    this.instanceConfigId = instanceConfigId;
    return this;
  }

  /**
   * An option to validate, but not actually execute, a request, and provide the same response.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getValidateOnly() {
    return validateOnly;
  }

  /**
   * An option to validate, but not actually execute, a request, and provide the same response.
   * @param validateOnly validateOnly or {@code null} for none
   */
  public CreateInstanceConfigRequest setValidateOnly(java.lang.Boolean validateOnly) {
    this.validateOnly = validateOnly;
    return this;
  }

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

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

}
