/*
 * 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.ApiHiveTable;
import com.cloudera.api.swagger.model.ApiServiceRef;
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.ArrayList;
import java.util.HashMap;
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 ApiHiveReplicationArguments {
  @SerializedName("sourceService")
  private ApiServiceRef sourceService = null;

  @SerializedName("tableFilters")
  private List<ApiHiveTable> tableFilters = null;

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

  @SerializedName("force")
  private Boolean force = null;

  @SerializedName("replicateData")
  private Boolean replicateData = null;

  @SerializedName("hdfsArguments")
  private ApiHdfsReplicationArguments hdfsArguments = null;

  @SerializedName("replicateImpalaMetadata")
  private Boolean replicateImpalaMetadata = null;

  @SerializedName("runInvalidateMetadata")
  private Boolean runInvalidateMetadata = null;

  @SerializedName("dryRun")
  private Boolean dryRun = null;

  @SerializedName("numThreads")
  private java.math.BigDecimal numThreads = null;

  @SerializedName("sentryMigration")
  private Boolean sentryMigration = null;

  @SerializedName("skipUrlPermissions")
  private Boolean skipUrlPermissions = null;

  @SerializedName("atlasReplicationNeeded")
  private Boolean atlasReplicationNeeded = null;

  @SerializedName("sentryExportProperties")
  private Map<String, String> sentryExportProperties = null;

  @SerializedName("rangerImportProperties")
  private Map<String, String> rangerImportProperties = null;

  public ApiHiveReplicationArguments sourceService(ApiServiceRef sourceService) {
    this.sourceService = sourceService;
    return this;
  }

   /**
   * Get sourceService
   * @return sourceService
  **/
  @Schema(description = "")
  public ApiServiceRef getSourceService() {
    return sourceService;
  }

  public void setSourceService(ApiServiceRef sourceService) {
    this.sourceService = sourceService;
  }

  public ApiHiveReplicationArguments tableFilters(List<ApiHiveTable> tableFilters) {
    this.tableFilters = tableFilters;
    return this;
  }

  public ApiHiveReplicationArguments addTableFiltersItem(ApiHiveTable tableFiltersItem) {
    if (this.tableFilters == null) {
      this.tableFilters = new ArrayList<>();
    }
    this.tableFilters.add(tableFiltersItem);
    return this;
  }

   /**
   * Filters for tables to include in the replication. Optional. If not provided, include all tables in all databases.
   * @return tableFilters
  **/
  @Schema(description = "Filters for tables to include in the replication. Optional. If not provided, include all tables in all databases.")
  public List<ApiHiveTable> getTableFilters() {
    return tableFilters;
  }

  public void setTableFilters(List<ApiHiveTable> tableFilters) {
    this.tableFilters = tableFilters;
  }

  public ApiHiveReplicationArguments exportDir(String exportDir) {
    this.exportDir = exportDir;
    return this;
  }

   /**
   * Directory, in the HDFS service where the target Hive service&#x27;s data is stored, where the export file will be saved. Optional. If not provided, Cloudera Manager will pick a directory for storing the data.
   * @return exportDir
  **/
  @Schema(description = "Directory, in the HDFS service where the target Hive service's data is stored, where the export file will be saved. Optional. If not provided, Cloudera Manager will pick a directory for storing the data.")
  public String getExportDir() {
    return exportDir;
  }

  public void setExportDir(String exportDir) {
    this.exportDir = exportDir;
  }

  public ApiHiveReplicationArguments force(Boolean force) {
    this.force = force;
    return this;
  }

   /**
   * Whether to force overwriting of mismatched tables. Defaults to false.
   * @return force
  **/
  @Schema(description = "Whether to force overwriting of mismatched tables. Defaults to false.")
  public Boolean isForce() {
    return force;
  }

  public void setForce(Boolean force) {
    this.force = force;
  }

  public ApiHiveReplicationArguments replicateData(Boolean replicateData) {
    this.replicateData = replicateData;
    return this;
  }

   /**
   * Whether to replicate table data stored in HDFS. Defaults to false. &lt;p/&gt; If set, the \&quot;hdfsArguments\&quot; property must be set to configure the HDFS replication job.
   * @return replicateData
  **/
  @Schema(description = "Whether to replicate table data stored in HDFS. Defaults to false. <p/> If set, the \"hdfsArguments\" property must be set to configure the HDFS replication job.")
  public Boolean isReplicateData() {
    return replicateData;
  }

  public void setReplicateData(Boolean replicateData) {
    this.replicateData = replicateData;
  }

  public ApiHiveReplicationArguments hdfsArguments(ApiHdfsReplicationArguments hdfsArguments) {
    this.hdfsArguments = hdfsArguments;
    return this;
  }

   /**
   * Get hdfsArguments
   * @return hdfsArguments
  **/
  @Schema(description = "")
  public ApiHdfsReplicationArguments getHdfsArguments() {
    return hdfsArguments;
  }

  public void setHdfsArguments(ApiHdfsReplicationArguments hdfsArguments) {
    this.hdfsArguments = hdfsArguments;
  }

  public ApiHiveReplicationArguments replicateImpalaMetadata(Boolean replicateImpalaMetadata) {
    this.replicateImpalaMetadata = replicateImpalaMetadata;
    return this;
  }

   /**
   * Whether to replicate the impala metadata. (i.e. the metadata for impala UDFs and their corresponding binaries in HDFS).
   * @return replicateImpalaMetadata
  **/
  @Schema(description = "Whether to replicate the impala metadata. (i.e. the metadata for impala UDFs and their corresponding binaries in HDFS).")
  public Boolean isReplicateImpalaMetadata() {
    return replicateImpalaMetadata;
  }

  public void setReplicateImpalaMetadata(Boolean replicateImpalaMetadata) {
    this.replicateImpalaMetadata = replicateImpalaMetadata;
  }

  public ApiHiveReplicationArguments runInvalidateMetadata(Boolean runInvalidateMetadata) {
    this.runInvalidateMetadata = runInvalidateMetadata;
    return this;
  }

   /**
   * Whether to run invalidate metadata query or not
   * @return runInvalidateMetadata
  **/
  @Schema(description = "Whether to run invalidate metadata query or not")
  public Boolean isRunInvalidateMetadata() {
    return runInvalidateMetadata;
  }

  public void setRunInvalidateMetadata(Boolean runInvalidateMetadata) {
    this.runInvalidateMetadata = runInvalidateMetadata;
  }

  public ApiHiveReplicationArguments dryRun(Boolean dryRun) {
    this.dryRun = dryRun;
    return this;
  }

   /**
   * Whether to perform a dry run. Defaults to false
   * @return dryRun
  **/
  @Schema(description = "Whether to perform a dry run. Defaults to false")
  public Boolean isDryRun() {
    return dryRun;
  }

  public void setDryRun(Boolean dryRun) {
    this.dryRun = dryRun;
  }

  public ApiHiveReplicationArguments numThreads(java.math.BigDecimal numThreads) {
    this.numThreads = numThreads;
    return this;
  }

   /**
   * Number of threads to use in multi-threaded export/import phase
   * @return numThreads
  **/
  @Schema(description = "Number of threads to use in multi-threaded export/import phase")
  public java.math.BigDecimal getNumThreads() {
    return numThreads;
  }

  public void setNumThreads(java.math.BigDecimal numThreads) {
    this.numThreads = numThreads;
  }

  public ApiHiveReplicationArguments sentryMigration(Boolean sentryMigration) {
    this.sentryMigration = sentryMigration;
    return this;
  }

   /**
   * Get sentryMigration
   * @return sentryMigration
  **/
  @Schema(required = true, description = "")
  public Boolean isSentryMigration() {
    return sentryMigration;
  }

  public void setSentryMigration(Boolean sentryMigration) {
    this.sentryMigration = sentryMigration;
  }

  public ApiHiveReplicationArguments skipUrlPermissions(Boolean skipUrlPermissions) {
    this.skipUrlPermissions = skipUrlPermissions;
    return this;
  }

   /**
   * Is skipUrlPermissions on.
   * @return skipUrlPermissions
  **/
  @Schema(required = true, description = "Is skipUrlPermissions on.")
  public Boolean isSkipUrlPermissions() {
    return skipUrlPermissions;
  }

  public void setSkipUrlPermissions(Boolean skipUrlPermissions) {
    this.skipUrlPermissions = skipUrlPermissions;
  }

  public ApiHiveReplicationArguments atlasReplicationNeeded(Boolean atlasReplicationNeeded) {
    this.atlasReplicationNeeded = atlasReplicationNeeded;
    return this;
  }

   /**
   * Get atlasReplicationNeeded
   * @return atlasReplicationNeeded
  **/
  @Schema(description = "")
  public Boolean isAtlasReplicationNeeded() {
    return atlasReplicationNeeded;
  }

  public void setAtlasReplicationNeeded(Boolean atlasReplicationNeeded) {
    this.atlasReplicationNeeded = atlasReplicationNeeded;
  }

  public ApiHiveReplicationArguments sentryExportProperties(Map<String, String> sentryExportProperties) {
    this.sentryExportProperties = sentryExportProperties;
    return this;
  }

  public ApiHiveReplicationArguments putSentryExportPropertiesItem(String key, String sentryExportPropertiesItem) {
    if (this.sentryExportProperties == null) {
      this.sentryExportProperties = new HashMap<>();
    }
    this.sentryExportProperties.put(key, sentryExportPropertiesItem);
    return this;
  }

   /**
   * Additional properties to add or override in authorization-migration-site.xml for Sentry export, on the source.
   * @return sentryExportProperties
  **/
  @Schema(description = "Additional properties to add or override in authorization-migration-site.xml for Sentry export, on the source.")
  public Map<String, String> getSentryExportProperties() {
    return sentryExportProperties;
  }

  public void setSentryExportProperties(Map<String, String> sentryExportProperties) {
    this.sentryExportProperties = sentryExportProperties;
  }

  public ApiHiveReplicationArguments rangerImportProperties(Map<String, String> rangerImportProperties) {
    this.rangerImportProperties = rangerImportProperties;
    return this;
  }

  public ApiHiveReplicationArguments putRangerImportPropertiesItem(String key, String rangerImportPropertiesItem) {
    if (this.rangerImportProperties == null) {
      this.rangerImportProperties = new HashMap<>();
    }
    this.rangerImportProperties.put(key, rangerImportPropertiesItem);
    return this;
  }

   /**
   * Additional properties to add or override in authorization-migration-site.xml for Ranger import, on the destination.
   * @return rangerImportProperties
  **/
  @Schema(description = "Additional properties to add or override in authorization-migration-site.xml for Ranger import, on the destination.")
  public Map<String, String> getRangerImportProperties() {
    return rangerImportProperties;
  }

  public void setRangerImportProperties(Map<String, String> rangerImportProperties) {
    this.rangerImportProperties = rangerImportProperties;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiHiveReplicationArguments apiHiveReplicationArguments = (ApiHiveReplicationArguments) o;
    return Objects.equals(this.sourceService, apiHiveReplicationArguments.sourceService) &&
        Objects.equals(this.tableFilters, apiHiveReplicationArguments.tableFilters) &&
        Objects.equals(this.exportDir, apiHiveReplicationArguments.exportDir) &&
        Objects.equals(this.force, apiHiveReplicationArguments.force) &&
        Objects.equals(this.replicateData, apiHiveReplicationArguments.replicateData) &&
        Objects.equals(this.hdfsArguments, apiHiveReplicationArguments.hdfsArguments) &&
        Objects.equals(this.replicateImpalaMetadata, apiHiveReplicationArguments.replicateImpalaMetadata) &&
        Objects.equals(this.runInvalidateMetadata, apiHiveReplicationArguments.runInvalidateMetadata) &&
        Objects.equals(this.dryRun, apiHiveReplicationArguments.dryRun) &&
        Objects.equals(this.numThreads, apiHiveReplicationArguments.numThreads) &&
        Objects.equals(this.sentryMigration, apiHiveReplicationArguments.sentryMigration) &&
        Objects.equals(this.skipUrlPermissions, apiHiveReplicationArguments.skipUrlPermissions) &&
        Objects.equals(this.atlasReplicationNeeded, apiHiveReplicationArguments.atlasReplicationNeeded) &&
        Objects.equals(this.sentryExportProperties, apiHiveReplicationArguments.sentryExportProperties) &&
        Objects.equals(this.rangerImportProperties, apiHiveReplicationArguments.rangerImportProperties);
  }

  @Override
  public int hashCode() {
    return Objects.hash(sourceService, tableFilters, exportDir, force, replicateData, hdfsArguments, replicateImpalaMetadata, runInvalidateMetadata, dryRun, numThreads, sentryMigration, skipUrlPermissions, atlasReplicationNeeded, sentryExportProperties, rangerImportProperties);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiHiveReplicationArguments {\n");
    
    sb.append("    sourceService: ").append(toIndentedString(sourceService)).append("\n");
    sb.append("    tableFilters: ").append(toIndentedString(tableFilters)).append("\n");
    sb.append("    exportDir: ").append(toIndentedString(exportDir)).append("\n");
    sb.append("    force: ").append(toIndentedString(force)).append("\n");
    sb.append("    replicateData: ").append(toIndentedString(replicateData)).append("\n");
    sb.append("    hdfsArguments: ").append(toIndentedString(hdfsArguments)).append("\n");
    sb.append("    replicateImpalaMetadata: ").append(toIndentedString(replicateImpalaMetadata)).append("\n");
    sb.append("    runInvalidateMetadata: ").append(toIndentedString(runInvalidateMetadata)).append("\n");
    sb.append("    dryRun: ").append(toIndentedString(dryRun)).append("\n");
    sb.append("    numThreads: ").append(toIndentedString(numThreads)).append("\n");
    sb.append("    sentryMigration: ").append(toIndentedString(sentryMigration)).append("\n");
    sb.append("    skipUrlPermissions: ").append(toIndentedString(skipUrlPermissions)).append("\n");
    sb.append("    atlasReplicationNeeded: ").append(toIndentedString(atlasReplicationNeeded)).append("\n");
    sb.append("    sentryExportProperties: ").append(toIndentedString(sentryExportProperties)).append("\n");
    sb.append("    rangerImportProperties: ").append(toIndentedString(rangerImportProperties)).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    ");
  }

}
