All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.volcengine.dms.model.BasicConfigForCreateDataMigrateTaskInput Maven / Gradle / Ivy

There is a newer version: 0.1.144
Show newest version
/*
 * dms
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: common-version
 * 
 *
 * 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.volcengine.dms.model;

import java.util.Objects;
import java.util.Arrays;
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 com.volcengine.dms.model.ObjectMigrationPolicyForCreateDataMigrateTaskInput;
import com.volcengine.dms.model.OfflineMigrationPolicyForCreateDataMigrateTaskInput;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import javax.validation.constraints.*;
import javax.validation.Valid;
/**
 * BasicConfigForCreateDataMigrateTaskInput
 */



public class BasicConfigForCreateDataMigrateTaskInput {
  @SerializedName("Bandwidth")
  private Integer bandwidth = null;

  @SerializedName("EnableRangeCheck")
  private Boolean enableRangeCheck = null;

  @SerializedName("FailedNumToAbort")
  private Integer failedNumToAbort = null;

  @SerializedName("ObjectMigrationPolicy")
  private ObjectMigrationPolicyForCreateDataMigrateTaskInput objectMigrationPolicy = null;

  @SerializedName("OfflineMigrationPolicy")
  private OfflineMigrationPolicyForCreateDataMigrateTaskInput offlineMigrationPolicy = null;

  /**
   * Gets or Sets overwritePolicy
   */
  @JsonAdapter(OverwritePolicyEnum.Adapter.class)
  public enum OverwritePolicyEnum {
    @SerializedName("Force")
    FORCE("Force"),
    @SerializedName("None")
    NONE("None"),
    @SerializedName("LastModify")
    LASTMODIFY("LastModify");

    private String value;

    OverwritePolicyEnum(String value) {
      this.value = value;
    }
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    public static OverwritePolicyEnum fromValue(String input) {
      for (OverwritePolicyEnum b : OverwritePolicyEnum.values()) {
        if (b.value.equals(input)) {
          return b;
        }
      }
      return null;
    }
    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final OverwritePolicyEnum enumeration) throws IOException {
        jsonWriter.value(String.valueOf(enumeration.getValue()));
      }

      @Override
      public OverwritePolicyEnum read(final JsonReader jsonReader) throws IOException {
        Object value = jsonReader.nextString();
        return OverwritePolicyEnum.fromValue((String)(value));
      }
    }
  }  @SerializedName("OverwritePolicy")
  private OverwritePolicyEnum overwritePolicy = null;

  /**
   * Gets or Sets sourceType
   */
  @JsonAdapter(SourceTypeEnum.Adapter.class)
  public enum SourceTypeEnum {
    @SerializedName("StorageTypeObject")
    STORAGETYPEOBJECT("StorageTypeObject"),
    @SerializedName("StorageTypeUrl")
    STORAGETYPEURL("StorageTypeUrl");

    private String value;

    SourceTypeEnum(String value) {
      this.value = value;
    }
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    public static SourceTypeEnum fromValue(String input) {
      for (SourceTypeEnum b : SourceTypeEnum.values()) {
        if (b.value.equals(input)) {
          return b;
        }
      }
      return null;
    }
    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final SourceTypeEnum enumeration) throws IOException {
        jsonWriter.value(String.valueOf(enumeration.getValue()));
      }

      @Override
      public SourceTypeEnum read(final JsonReader jsonReader) throws IOException {
        Object value = jsonReader.nextString();
        return SourceTypeEnum.fromValue((String)(value));
      }
    }
  }  @SerializedName("SourceType")
  private SourceTypeEnum sourceType = null;

  /**
   * Gets or Sets storageClass
   */
  @JsonAdapter(StorageClassEnum.Adapter.class)
  public enum StorageClassEnum {
    @SerializedName("Standard")
    STANDARD("Standard"),
    @SerializedName("InheritSource")
    INHERITSOURCE("InheritSource"),
    @SerializedName("Ia")
    IA("Ia"),
    @SerializedName("ArchiveFr")
    ARCHIVEFR("ArchiveFr"),
    @SerializedName("IntelligentTiering")
    INTELLIGENTTIERING("IntelligentTiering"),
    @SerializedName("ColdArchive")
    COLDARCHIVE("ColdArchive"),
    @SerializedName("Archive")
    ARCHIVE("Archive"),
    @SerializedName("DeepColdArchive")
    DEEPCOLDARCHIVE("DeepColdArchive");

    private String value;

    StorageClassEnum(String value) {
      this.value = value;
    }
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    public static StorageClassEnum fromValue(String input) {
      for (StorageClassEnum b : StorageClassEnum.values()) {
        if (b.value.equals(input)) {
          return b;
        }
      }
      return null;
    }
    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final StorageClassEnum enumeration) throws IOException {
        jsonWriter.value(String.valueOf(enumeration.getValue()));
      }

      @Override
      public StorageClassEnum read(final JsonReader jsonReader) throws IOException {
        Object value = jsonReader.nextString();
        return StorageClassEnum.fromValue((String)(value));
      }
    }
  }  @SerializedName("StorageClass")
  private StorageClassEnum storageClass = null;

  @SerializedName("TaskName")
  private String taskName = null;

  public BasicConfigForCreateDataMigrateTaskInput bandwidth(Integer bandwidth) {
    this.bandwidth = bandwidth;
    return this;
  }

   /**
   * Get bandwidth
   * minimum: 1
   * maximum: 1073741824
   * @return bandwidth
  **/
 @Min(1) @Max(1073741824)  @Schema(description = "")
  public Integer getBandwidth() {
    return bandwidth;
  }

  public void setBandwidth(Integer bandwidth) {
    this.bandwidth = bandwidth;
  }

  public BasicConfigForCreateDataMigrateTaskInput enableRangeCheck(Boolean enableRangeCheck) {
    this.enableRangeCheck = enableRangeCheck;
    return this;
  }

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

  public void setEnableRangeCheck(Boolean enableRangeCheck) {
    this.enableRangeCheck = enableRangeCheck;
  }

  public BasicConfigForCreateDataMigrateTaskInput failedNumToAbort(Integer failedNumToAbort) {
    this.failedNumToAbort = failedNumToAbort;
    return this;
  }

   /**
   * Get failedNumToAbort
   * minimum: -1
   * @return failedNumToAbort
  **/
 @Min(-1)  @Schema(description = "")
  public Integer getFailedNumToAbort() {
    return failedNumToAbort;
  }

  public void setFailedNumToAbort(Integer failedNumToAbort) {
    this.failedNumToAbort = failedNumToAbort;
  }

  public BasicConfigForCreateDataMigrateTaskInput objectMigrationPolicy(ObjectMigrationPolicyForCreateDataMigrateTaskInput objectMigrationPolicy) {
    this.objectMigrationPolicy = objectMigrationPolicy;
    return this;
  }

   /**
   * Get objectMigrationPolicy
   * @return objectMigrationPolicy
  **/
  @Valid
  @Schema(description = "")
  public ObjectMigrationPolicyForCreateDataMigrateTaskInput getObjectMigrationPolicy() {
    return objectMigrationPolicy;
  }

  public void setObjectMigrationPolicy(ObjectMigrationPolicyForCreateDataMigrateTaskInput objectMigrationPolicy) {
    this.objectMigrationPolicy = objectMigrationPolicy;
  }

  public BasicConfigForCreateDataMigrateTaskInput offlineMigrationPolicy(OfflineMigrationPolicyForCreateDataMigrateTaskInput offlineMigrationPolicy) {
    this.offlineMigrationPolicy = offlineMigrationPolicy;
    return this;
  }

   /**
   * Get offlineMigrationPolicy
   * @return offlineMigrationPolicy
  **/
  @Valid
  @Schema(description = "")
  public OfflineMigrationPolicyForCreateDataMigrateTaskInput getOfflineMigrationPolicy() {
    return offlineMigrationPolicy;
  }

  public void setOfflineMigrationPolicy(OfflineMigrationPolicyForCreateDataMigrateTaskInput offlineMigrationPolicy) {
    this.offlineMigrationPolicy = offlineMigrationPolicy;
  }

  public BasicConfigForCreateDataMigrateTaskInput overwritePolicy(OverwritePolicyEnum overwritePolicy) {
    this.overwritePolicy = overwritePolicy;
    return this;
  }

   /**
   * Get overwritePolicy
   * @return overwritePolicy
  **/
  @Schema(description = "")
  public OverwritePolicyEnum getOverwritePolicy() {
    return overwritePolicy;
  }

  public void setOverwritePolicy(OverwritePolicyEnum overwritePolicy) {
    this.overwritePolicy = overwritePolicy;
  }

  public BasicConfigForCreateDataMigrateTaskInput sourceType(SourceTypeEnum sourceType) {
    this.sourceType = sourceType;
    return this;
  }

   /**
   * Get sourceType
   * @return sourceType
  **/
  @Schema(description = "")
  public SourceTypeEnum getSourceType() {
    return sourceType;
  }

  public void setSourceType(SourceTypeEnum sourceType) {
    this.sourceType = sourceType;
  }

  public BasicConfigForCreateDataMigrateTaskInput storageClass(StorageClassEnum storageClass) {
    this.storageClass = storageClass;
    return this;
  }

   /**
   * Get storageClass
   * @return storageClass
  **/
  @Schema(description = "")
  public StorageClassEnum getStorageClass() {
    return storageClass;
  }

  public void setStorageClass(StorageClassEnum storageClass) {
    this.storageClass = storageClass;
  }

  public BasicConfigForCreateDataMigrateTaskInput taskName(String taskName) {
    this.taskName = taskName;
    return this;
  }

   /**
   * Get taskName
   * @return taskName
  **/
 @Size(min=3,max=32)  @Schema(description = "")
  public String getTaskName() {
    return taskName;
  }

  public void setTaskName(String taskName) {
    this.taskName = taskName;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BasicConfigForCreateDataMigrateTaskInput basicConfigForCreateDataMigrateTaskInput = (BasicConfigForCreateDataMigrateTaskInput) o;
    return Objects.equals(this.bandwidth, basicConfigForCreateDataMigrateTaskInput.bandwidth) &&
        Objects.equals(this.enableRangeCheck, basicConfigForCreateDataMigrateTaskInput.enableRangeCheck) &&
        Objects.equals(this.failedNumToAbort, basicConfigForCreateDataMigrateTaskInput.failedNumToAbort) &&
        Objects.equals(this.objectMigrationPolicy, basicConfigForCreateDataMigrateTaskInput.objectMigrationPolicy) &&
        Objects.equals(this.offlineMigrationPolicy, basicConfigForCreateDataMigrateTaskInput.offlineMigrationPolicy) &&
        Objects.equals(this.overwritePolicy, basicConfigForCreateDataMigrateTaskInput.overwritePolicy) &&
        Objects.equals(this.sourceType, basicConfigForCreateDataMigrateTaskInput.sourceType) &&
        Objects.equals(this.storageClass, basicConfigForCreateDataMigrateTaskInput.storageClass) &&
        Objects.equals(this.taskName, basicConfigForCreateDataMigrateTaskInput.taskName);
  }

  @Override
  public int hashCode() {
    return Objects.hash(bandwidth, enableRangeCheck, failedNumToAbort, objectMigrationPolicy, offlineMigrationPolicy, overwritePolicy, sourceType, storageClass, taskName);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BasicConfigForCreateDataMigrateTaskInput {\n");
    
    sb.append("    bandwidth: ").append(toIndentedString(bandwidth)).append("\n");
    sb.append("    enableRangeCheck: ").append(toIndentedString(enableRangeCheck)).append("\n");
    sb.append("    failedNumToAbort: ").append(toIndentedString(failedNumToAbort)).append("\n");
    sb.append("    objectMigrationPolicy: ").append(toIndentedString(objectMigrationPolicy)).append("\n");
    sb.append("    offlineMigrationPolicy: ").append(toIndentedString(offlineMigrationPolicy)).append("\n");
    sb.append("    overwritePolicy: ").append(toIndentedString(overwritePolicy)).append("\n");
    sb.append("    sourceType: ").append(toIndentedString(sourceType)).append("\n");
    sb.append("    storageClass: ").append(toIndentedString(storageClass)).append("\n");
    sb.append("    taskName: ").append(toIndentedString(taskName)).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    ");
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy