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

com.tencent.ads.model.TextRestriction Maven / Gradle / Ivy

/*
 * Marketing API
 * Marketing API
 *
 * OpenAPI spec version: 1.3
 *
 *
 * 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.tencent.ads.model;

import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;

/** 文本需满足的限制条件,仅当element_type是ELEMENT_TYPE_TEXT时返回 */
@ApiModel(description = "文本需满足的限制条件,仅当element_type是ELEMENT_TYPE_TEXT时返回")
public class TextRestriction {
  @SerializedName("min_length")
  private Long minLength = null;

  @SerializedName("max_length")
  private Long maxLength = null;

  @SerializedName("text_pattern")
  private String textPattern = null;

  public TextRestriction minLength(Long minLength) {
    this.minLength = minLength;
    return this;
  }

  /**
   * Get minLength
   *
   * @return minLength
   */
  @ApiModelProperty(value = "")
  public Long getMinLength() {
    return minLength;
  }

  public void setMinLength(Long minLength) {
    this.minLength = minLength;
  }

  public TextRestriction maxLength(Long maxLength) {
    this.maxLength = maxLength;
    return this;
  }

  /**
   * Get maxLength
   *
   * @return maxLength
   */
  @ApiModelProperty(value = "")
  public Long getMaxLength() {
    return maxLength;
  }

  public void setMaxLength(Long maxLength) {
    this.maxLength = maxLength;
  }

  public TextRestriction textPattern(String textPattern) {
    this.textPattern = textPattern;
    return this;
  }

  /**
   * Get textPattern
   *
   * @return textPattern
   */
  @ApiModelProperty(value = "")
  public String getTextPattern() {
    return textPattern;
  }

  public void setTextPattern(String textPattern) {
    this.textPattern = textPattern;
  }

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TextRestriction textRestriction = (TextRestriction) o;
    return Objects.equals(this.minLength, textRestriction.minLength)
        && Objects.equals(this.maxLength, textRestriction.maxLength)
        && Objects.equals(this.textPattern, textRestriction.textPattern);
  }

  @Override
  public int hashCode() {
    return Objects.hash(minLength, maxLength, textPattern);
  }

  @Override
  public String toString() {
    Gson gson = new Gson();
    return gson.toJson(this);
  }

  /**
   * 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 - 2025 Weber Informatics LLC | Privacy Policy