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

/**
 * Request message for BigtableInstanceAdmin.CreateInstance.
 *
 * <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 Bigtable Admin 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 CreateInstanceRequest extends com.google.api.client.json.GenericJson {

  /**
   * Required. The clusters to be created within the instance, mapped by desired cluster ID, e.g.,
   * just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`.
   * Fields marked `OutputOnly` must be left blank. Currently, at most four clusters can be
   * specified.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.Map<String, Cluster> clusters;

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

  /**
   * Required. The instance to create. Fields marked `OutputOnly` must be left blank.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Instance instance;

  /**
   * Required. The ID to be used when referring to the new instance within its project, e.g., just
   * `myinstance` rather than `projects/myproject/instances/myinstance`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String instanceId;

  /**
   * Required. The unique name of the project in which to create the new instance. Values are of the
   * form `projects/{project}`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String parent;

  /**
   * Required. The clusters to be created within the instance, mapped by desired cluster ID, e.g.,
   * just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`.
   * Fields marked `OutputOnly` must be left blank. Currently, at most four clusters can be
   * specified.
   * @return value or {@code null} for none
   */
  public java.util.Map<String, Cluster> getClusters() {
    return clusters;
  }

  /**
   * Required. The clusters to be created within the instance, mapped by desired cluster ID, e.g.,
   * just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`.
   * Fields marked `OutputOnly` must be left blank. Currently, at most four clusters can be
   * specified.
   * @param clusters clusters or {@code null} for none
   */
  public CreateInstanceRequest setClusters(java.util.Map<String, Cluster> clusters) {
    this.clusters = clusters;
    return this;
  }

  /**
   * Required. The instance to create. Fields marked `OutputOnly` must be left blank.
   * @return value or {@code null} for none
   */
  public Instance getInstance() {
    return instance;
  }

  /**
   * Required. The instance to create. Fields marked `OutputOnly` must be left blank.
   * @param instance instance or {@code null} for none
   */
  public CreateInstanceRequest setInstance(Instance instance) {
    this.instance = instance;
    return this;
  }

  /**
   * Required. The ID to be used when referring to the new instance within its project, e.g., just
   * `myinstance` rather than `projects/myproject/instances/myinstance`.
   * @return value or {@code null} for none
   */
  public java.lang.String getInstanceId() {
    return instanceId;
  }

  /**
   * Required. The ID to be used when referring to the new instance within its project, e.g., just
   * `myinstance` rather than `projects/myproject/instances/myinstance`.
   * @param instanceId instanceId or {@code null} for none
   */
  public CreateInstanceRequest setInstanceId(java.lang.String instanceId) {
    this.instanceId = instanceId;
    return this;
  }

  /**
   * Required. The unique name of the project in which to create the new instance. Values are of the
   * form `projects/{project}`.
   * @return value or {@code null} for none
   */
  public java.lang.String getParent() {
    return parent;
  }

  /**
   * Required. The unique name of the project in which to create the new instance. Values are of the
   * form `projects/{project}`.
   * @param parent parent or {@code null} for none
   */
  public CreateInstanceRequest setParent(java.lang.String parent) {
    this.parent = parent;
    return this;
  }

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

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

}
