/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.13.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.cloudera.api.swagger.model;

import java.util.Objects;
import java.util.Arrays;
import com.cloudera.api.swagger.model.ApiHdfsReplicationArguments;
import com.cloudera.api.swagger.model.ApiHiveReplicationArguments;
import com.cloudera.api.swagger.model.ApiHiveTable;
import com.cloudera.api.swagger.model.ApiServiceRef;
import com.cloudera.api.swagger.model.ReplicationOption;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
 * Replication arguments for Hive services.
 */
@Schema(description = "Replication arguments for Hive services.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiHiveCloudReplicationArguments extends ApiHiveReplicationArguments {
  @SerializedName("exportFilesPrefix")
  private String exportFilesPrefix = null;

  @SerializedName("sourceAccount")
  private String sourceAccount = null;

  @SerializedName("destinationAccount")
  private String destinationAccount = null;

  @SerializedName("cloudRootPath")
  private String cloudRootPath = null;

  @SerializedName("replicationOption")
  private ReplicationOption replicationOption = null;

  public ApiHiveCloudReplicationArguments exportFilesPrefix(String exportFilesPrefix) {
    this.exportFilesPrefix = exportFilesPrefix;
    return this;
  }

   /**
   * When a Hive external cloud replication schedule was executed, then the exported files had the same name under the given cloud root path. Therefore, it was forbidden to concurrently execute multiple Hive external replications with the same cloud root path. &lt;br&gt;  This field is meant to lift this restriction: it contains a prefix name that will be prepended to every export file, by default it is set to a UUID for a replication schedule. &lt;br&gt;  &lt;b&gt;Note that this feature is available only if feature flag HIVE_ALLOW_CONCURRENT_REPLICATION_WITH_SAME_CLOUD_ROOT_PATH is enabled on both source and destination! It&#x27;s NOT supported for cloud backup only and cloud restore only replications.&lt;/b&gt; &lt;br&gt;  For instance if #cloudRootPath &#x3D;&#x3D; s3a://bucket/warehouse/external/my_db and #exportFilesPrefix &#x3D;&#x3D; ab58c108, then after a successful replication the following export files will be in the cloud: &lt;ul&gt; &lt;li&gt;s3a://bucket/warehouse/external/my_db/ab58c108export.json&lt;/li&gt; &lt;li&gt;s3a://bucket/warehouse/external/my_db/ab58c108.export.json.meta&lt;/li&gt; &lt;li&gt;s3a://bucket/warehouse/external/my_db/ab58c108sentry-export.json&lt;/li&gt; &lt;/ul&gt; In the next replication run the same UUID will be used for a certain schedule as before, so the same export files will be overwritten in the cloud. This way the cloud root path won&#x27;t be polluted.
   * @return exportFilesPrefix
  **/
  @Schema(description = "When a Hive external cloud replication schedule was executed, then the exported files had the same name under the given cloud root path. Therefore, it was forbidden to concurrently execute multiple Hive external replications with the same cloud root path. <br>  This field is meant to lift this restriction: it contains a prefix name that will be prepended to every export file, by default it is set to a UUID for a replication schedule. <br>  <b>Note that this feature is available only if feature flag HIVE_ALLOW_CONCURRENT_REPLICATION_WITH_SAME_CLOUD_ROOT_PATH is enabled on both source and destination! It's NOT supported for cloud backup only and cloud restore only replications.</b> <br>  For instance if #cloudRootPath == s3a://bucket/warehouse/external/my_db and #exportFilesPrefix == ab58c108, then after a successful replication the following export files will be in the cloud: <ul> <li>s3a://bucket/warehouse/external/my_db/ab58c108export.json</li> <li>s3a://bucket/warehouse/external/my_db/ab58c108.export.json.meta</li> <li>s3a://bucket/warehouse/external/my_db/ab58c108sentry-export.json</li> </ul> In the next replication run the same UUID will be used for a certain schedule as before, so the same export files will be overwritten in the cloud. This way the cloud root path won't be polluted.")
  public String getExportFilesPrefix() {
    return exportFilesPrefix;
  }

  public void setExportFilesPrefix(String exportFilesPrefix) {
    this.exportFilesPrefix = exportFilesPrefix;
  }

  public ApiHiveCloudReplicationArguments sourceAccount(String sourceAccount) {
    this.sourceAccount = sourceAccount;
    return this;
  }

   /**
   * Get sourceAccount
   * @return sourceAccount
  **/
  @Schema(description = "")
  public String getSourceAccount() {
    return sourceAccount;
  }

  public void setSourceAccount(String sourceAccount) {
    this.sourceAccount = sourceAccount;
  }

  public ApiHiveCloudReplicationArguments destinationAccount(String destinationAccount) {
    this.destinationAccount = destinationAccount;
    return this;
  }

   /**
   * Get destinationAccount
   * @return destinationAccount
  **/
  @Schema(description = "")
  public String getDestinationAccount() {
    return destinationAccount;
  }

  public void setDestinationAccount(String destinationAccount) {
    this.destinationAccount = destinationAccount;
  }

  public ApiHiveCloudReplicationArguments cloudRootPath(String cloudRootPath) {
    this.cloudRootPath = cloudRootPath;
    return this;
  }

   /**
   * Get cloudRootPath
   * @return cloudRootPath
  **/
  @Schema(description = "")
  public String getCloudRootPath() {
    return cloudRootPath;
  }

  public void setCloudRootPath(String cloudRootPath) {
    this.cloudRootPath = cloudRootPath;
  }

  public ApiHiveCloudReplicationArguments replicationOption(ReplicationOption replicationOption) {
    this.replicationOption = replicationOption;
    return this;
  }

   /**
   * Get replicationOption
   * @return replicationOption
  **/
  @Schema(description = "")
  public ReplicationOption getReplicationOption() {
    return replicationOption;
  }

  public void setReplicationOption(ReplicationOption replicationOption) {
    this.replicationOption = replicationOption;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiHiveCloudReplicationArguments apiHiveCloudReplicationArguments = (ApiHiveCloudReplicationArguments) o;
    return Objects.equals(this.exportFilesPrefix, apiHiveCloudReplicationArguments.exportFilesPrefix) &&
        Objects.equals(this.sourceAccount, apiHiveCloudReplicationArguments.sourceAccount) &&
        Objects.equals(this.destinationAccount, apiHiveCloudReplicationArguments.destinationAccount) &&
        Objects.equals(this.cloudRootPath, apiHiveCloudReplicationArguments.cloudRootPath) &&
        Objects.equals(this.replicationOption, apiHiveCloudReplicationArguments.replicationOption) &&
        super.equals(o);
  }

  @Override
  public int hashCode() {
    return Objects.hash(exportFilesPrefix, sourceAccount, destinationAccount, cloudRootPath, replicationOption, super.hashCode());
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiHiveCloudReplicationArguments {\n");
    sb.append("    ").append(toIndentedString(super.toString())).append("\n");
    sb.append("    exportFilesPrefix: ").append(toIndentedString(exportFilesPrefix)).append("\n");
    sb.append("    sourceAccount: ").append(toIndentedString(sourceAccount)).append("\n");
    sb.append("    destinationAccount: ").append(toIndentedString(destinationAccount)).append("\n");
    sb.append("    cloudRootPath: ").append(toIndentedString(cloudRootPath)).append("\n");
    sb.append("    replicationOption: ").append(toIndentedString(replicationOption)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
