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

com.volcengine.rocketmq.model.CreateTopicRequest Maven / Gradle / Ivy

There is a newer version: 0.1.144
Show newest version
/*
 * rocketmq
 * 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.rocketmq.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.rocketmq.model.AccessPolicyForCreateTopicInput;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;
/**
 * CreateTopicRequest
 */



public class CreateTopicRequest {
  @SerializedName("AccessPolicies")
  private List accessPolicies = null;

  @SerializedName("Description")
  private String description = null;

  @SerializedName("InstanceId")
  private String instanceId = null;

  @SerializedName("MessageType")
  private Integer messageType = null;

  @SerializedName("QueueNumber")
  private Integer queueNumber = null;

  @SerializedName("TopicName")
  private String topicName = null;

  public CreateTopicRequest accessPolicies(List accessPolicies) {
    this.accessPolicies = accessPolicies;
    return this;
  }

  public CreateTopicRequest addAccessPoliciesItem(AccessPolicyForCreateTopicInput accessPoliciesItem) {
    if (this.accessPolicies == null) {
      this.accessPolicies = new ArrayList();
    }
    this.accessPolicies.add(accessPoliciesItem);
    return this;
  }

   /**
   * Get accessPolicies
   * @return accessPolicies
  **/
  @Valid
  @Schema(description = "")
  public List getAccessPolicies() {
    return accessPolicies;
  }

  public void setAccessPolicies(List accessPolicies) {
    this.accessPolicies = accessPolicies;
  }

  public CreateTopicRequest description(String description) {
    this.description = description;
    return this;
  }

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

  public void setDescription(String description) {
    this.description = description;
  }

  public CreateTopicRequest instanceId(String instanceId) {
    this.instanceId = instanceId;
    return this;
  }

   /**
   * Get instanceId
   * @return instanceId
  **/
  @NotNull
  @Schema(required = true, description = "")
  public String getInstanceId() {
    return instanceId;
  }

  public void setInstanceId(String instanceId) {
    this.instanceId = instanceId;
  }

  public CreateTopicRequest messageType(Integer messageType) {
    this.messageType = messageType;
    return this;
  }

   /**
   * Get messageType
   * minimum: 0
   * maximum: 4
   * @return messageType
  **/
  @NotNull
 @Min(0) @Max(4)  @Schema(required = true, description = "")
  public Integer getMessageType() {
    return messageType;
  }

  public void setMessageType(Integer messageType) {
    this.messageType = messageType;
  }

  public CreateTopicRequest queueNumber(Integer queueNumber) {
    this.queueNumber = queueNumber;
    return this;
  }

   /**
   * Get queueNumber
   * minimum: 1
   * maximum: 120
   * @return queueNumber
  **/
  @NotNull
 @Min(1) @Max(120)  @Schema(required = true, description = "")
  public Integer getQueueNumber() {
    return queueNumber;
  }

  public void setQueueNumber(Integer queueNumber) {
    this.queueNumber = queueNumber;
  }

  public CreateTopicRequest topicName(String topicName) {
    this.topicName = topicName;
    return this;
  }

   /**
   * Get topicName
   * @return topicName
  **/
  @NotNull
 @Size(max=128)  @Schema(required = true, description = "")
  public String getTopicName() {
    return topicName;
  }

  public void setTopicName(String topicName) {
    this.topicName = topicName;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateTopicRequest createTopicRequest = (CreateTopicRequest) o;
    return Objects.equals(this.accessPolicies, createTopicRequest.accessPolicies) &&
        Objects.equals(this.description, createTopicRequest.description) &&
        Objects.equals(this.instanceId, createTopicRequest.instanceId) &&
        Objects.equals(this.messageType, createTopicRequest.messageType) &&
        Objects.equals(this.queueNumber, createTopicRequest.queueNumber) &&
        Objects.equals(this.topicName, createTopicRequest.topicName);
  }

  @Override
  public int hashCode() {
    return Objects.hash(accessPolicies, description, instanceId, messageType, queueNumber, topicName);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CreateTopicRequest {\n");
    
    sb.append("    accessPolicies: ").append(toIndentedString(accessPolicies)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    instanceId: ").append(toIndentedString(instanceId)).append("\n");
    sb.append("    messageType: ").append(toIndentedString(messageType)).append("\n");
    sb.append("    queueNumber: ").append(toIndentedString(queueNumber)).append("\n");
    sb.append("    topicName: ").append(toIndentedString(topicName)).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