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

/**
 * The identity to configure a GCS bucket.
 *
 * <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 Document AI Warehouse 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 CloudAiPlatformTenantresourceGcsBucketConfig extends com.google.api.client.json.GenericJson {

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

  /**
   * Input/Output [Optional]. The name of a GCS bucket with max length of 63 chars. If not set, a
   * random UUID will be generated as bucket name.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String bucketName;

  /**
   * Input/Output [Optional]. Only needed for per-entity tenant GCP resources. During Deprovision
   * API, the on-demand deletion will only cover the tenant GCP resources with the specified entity
   * name.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String entityName;

  /**
   * Input/Output [Optional]. The KMS key name or the KMS grant name used for CMEK encryption. Only
   * set this field when provisioning new GCS bucket. For existing GCS bucket, this field will be
   * ignored because CMEK re-encryption is not supported.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String kmsKeyReference;

  /**
   * Input/Output [Optional]. Only needed when the content in bucket need to be garbage collected
   * within some amount of days.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer ttlDays;

  /**
   * Input/Output [Required]. IAM roles (viewer/admin) put on the bucket.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> viewers;

  /**
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getAdmins() {
    return admins;
  }

  /**
   * @param admins admins or {@code null} for none
   */
  public CloudAiPlatformTenantresourceGcsBucketConfig setAdmins(java.util.List<java.lang.String> admins) {
    this.admins = admins;
    return this;
  }

  /**
   * Input/Output [Optional]. The name of a GCS bucket with max length of 63 chars. If not set, a
   * random UUID will be generated as bucket name.
   * @return value or {@code null} for none
   */
  public java.lang.String getBucketName() {
    return bucketName;
  }

  /**
   * Input/Output [Optional]. The name of a GCS bucket with max length of 63 chars. If not set, a
   * random UUID will be generated as bucket name.
   * @param bucketName bucketName or {@code null} for none
   */
  public CloudAiPlatformTenantresourceGcsBucketConfig setBucketName(java.lang.String bucketName) {
    this.bucketName = bucketName;
    return this;
  }

  /**
   * Input/Output [Optional]. Only needed for per-entity tenant GCP resources. During Deprovision
   * API, the on-demand deletion will only cover the tenant GCP resources with the specified entity
   * name.
   * @return value or {@code null} for none
   */
  public java.lang.String getEntityName() {
    return entityName;
  }

  /**
   * Input/Output [Optional]. Only needed for per-entity tenant GCP resources. During Deprovision
   * API, the on-demand deletion will only cover the tenant GCP resources with the specified entity
   * name.
   * @param entityName entityName or {@code null} for none
   */
  public CloudAiPlatformTenantresourceGcsBucketConfig setEntityName(java.lang.String entityName) {
    this.entityName = entityName;
    return this;
  }

  /**
   * Input/Output [Optional]. The KMS key name or the KMS grant name used for CMEK encryption. Only
   * set this field when provisioning new GCS bucket. For existing GCS bucket, this field will be
   * ignored because CMEK re-encryption is not supported.
   * @return value or {@code null} for none
   */
  public java.lang.String getKmsKeyReference() {
    return kmsKeyReference;
  }

  /**
   * Input/Output [Optional]. The KMS key name or the KMS grant name used for CMEK encryption. Only
   * set this field when provisioning new GCS bucket. For existing GCS bucket, this field will be
   * ignored because CMEK re-encryption is not supported.
   * @param kmsKeyReference kmsKeyReference or {@code null} for none
   */
  public CloudAiPlatformTenantresourceGcsBucketConfig setKmsKeyReference(java.lang.String kmsKeyReference) {
    this.kmsKeyReference = kmsKeyReference;
    return this;
  }

  /**
   * Input/Output [Optional]. Only needed when the content in bucket need to be garbage collected
   * within some amount of days.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getTtlDays() {
    return ttlDays;
  }

  /**
   * Input/Output [Optional]. Only needed when the content in bucket need to be garbage collected
   * within some amount of days.
   * @param ttlDays ttlDays or {@code null} for none
   */
  public CloudAiPlatformTenantresourceGcsBucketConfig setTtlDays(java.lang.Integer ttlDays) {
    this.ttlDays = ttlDays;
    return this;
  }

  /**
   * Input/Output [Required]. IAM roles (viewer/admin) put on the bucket.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getViewers() {
    return viewers;
  }

  /**
   * Input/Output [Required]. IAM roles (viewer/admin) put on the bucket.
   * @param viewers viewers or {@code null} for none
   */
  public CloudAiPlatformTenantresourceGcsBucketConfig setViewers(java.util.List<java.lang.String> viewers) {
    this.viewers = viewers;
    return this;
  }

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

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

}
