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

com.volcengine.fwcenter.model.ModifyNatFirewallControlPolicyRequest Maven / Gradle / Ivy

There is a newer version: 0.1.144
Show newest version
/*
 * fwcenter
 * 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.fwcenter.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 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;
/**
 * ModifyNatFirewallControlPolicyRequest
 */



public class ModifyNatFirewallControlPolicyRequest {
  /**
   * Gets or Sets action
   */
  @JsonAdapter(ActionEnum.Adapter.class)
  public enum ActionEnum {
    @SerializedName("accept")
    ACCEPT("accept"),
    @SerializedName("deny")
    DENY("deny"),
    @SerializedName("monitor")
    MONITOR("monitor");

    private String value;

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

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

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

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

  @SerializedName("DestPort")
  private String destPort = null;

  /**
   * Gets or Sets destPortType
   */
  @JsonAdapter(DestPortTypeEnum.Adapter.class)
  public enum DestPortTypeEnum {
    @SerializedName("port")
    PORT("port"),
    @SerializedName("group")
    GROUP("group");

    private String value;

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

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

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

  @SerializedName("Destination")
  private String destination = null;

  /**
   * Gets or Sets destinationType
   */
  @JsonAdapter(DestinationTypeEnum.Adapter.class)
  public enum DestinationTypeEnum {
    @SerializedName("net")
    NET("net"),
    @SerializedName("location")
    LOCATION("location"),
    @SerializedName("group")
    GROUP("group"),
    @SerializedName("domain")
    DOMAIN("domain");

    private String value;

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

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

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

  /**
   * Gets or Sets direction
   */
  @JsonAdapter(DirectionEnum.Adapter.class)
  public enum DirectionEnum {
    @SerializedName("in")
    IN("in"),
    @SerializedName("out")
    OUT("out");

    private String value;

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

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

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

  @SerializedName("EndTime")
  private Integer endTime = null;

  @SerializedName("NatFirewallId")
  private String natFirewallId = null;

  /**
   * Gets or Sets proto
   */
  @JsonAdapter(ProtoEnum.Adapter.class)
  public enum ProtoEnum {
    @SerializedName("ICMP")
    ICMP("ICMP"),
    @SerializedName("TCP")
    TCP("TCP"),
    @SerializedName("UDP")
    UDP("UDP"),
    @SerializedName("ANY")
    ANY("ANY");

    private String value;

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

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

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

  @SerializedName("RepeatDays")
  private List repeatDays = null;

  @SerializedName("RepeatEndTime")
  private String repeatEndTime = null;

  @SerializedName("RepeatStartTime")
  private String repeatStartTime = null;

  /**
   * Gets or Sets repeatType
   */
  @JsonAdapter(RepeatTypeEnum.Adapter.class)
  public enum RepeatTypeEnum {
    @SerializedName("Permanent")
    PERMANENT("Permanent"),
    @SerializedName("Once")
    ONCE("Once"),
    @SerializedName("Daily")
    DAILY("Daily"),
    @SerializedName("Weekly")
    WEEKLY("Weekly"),
    @SerializedName("Monthly")
    MONTHLY("Monthly");

    private String value;

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

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

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

  @SerializedName("RuleId")
  private String ruleId = null;

  @SerializedName("Source")
  private String source = null;

  /**
   * Gets or Sets sourceType
   */
  @JsonAdapter(SourceTypeEnum.Adapter.class)
  public enum SourceTypeEnum {
    @SerializedName("net")
    NET("net"),
    @SerializedName("location")
    LOCATION("location"),
    @SerializedName("group")
    GROUP("group");

    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;

  @SerializedName("StartTime")
  private Integer startTime = null;

  @SerializedName("Status")
  private Boolean status = null;

  public ModifyNatFirewallControlPolicyRequest action(ActionEnum action) {
    this.action = action;
    return this;
  }

   /**
   * Get action
   * @return action
  **/
  @NotNull
  @Schema(required = true, description = "")
  public ActionEnum getAction() {
    return action;
  }

  public void setAction(ActionEnum action) {
    this.action = action;
  }

  public ModifyNatFirewallControlPolicyRequest 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 ModifyNatFirewallControlPolicyRequest destPort(String destPort) {
    this.destPort = destPort;
    return this;
  }

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

  public void setDestPort(String destPort) {
    this.destPort = destPort;
  }

  public ModifyNatFirewallControlPolicyRequest destPortType(DestPortTypeEnum destPortType) {
    this.destPortType = destPortType;
    return this;
  }

   /**
   * Get destPortType
   * @return destPortType
  **/
  @Schema(description = "")
  public DestPortTypeEnum getDestPortType() {
    return destPortType;
  }

  public void setDestPortType(DestPortTypeEnum destPortType) {
    this.destPortType = destPortType;
  }

  public ModifyNatFirewallControlPolicyRequest destination(String destination) {
    this.destination = destination;
    return this;
  }

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

  public void setDestination(String destination) {
    this.destination = destination;
  }

  public ModifyNatFirewallControlPolicyRequest destinationType(DestinationTypeEnum destinationType) {
    this.destinationType = destinationType;
    return this;
  }

   /**
   * Get destinationType
   * @return destinationType
  **/
  @NotNull
  @Schema(required = true, description = "")
  public DestinationTypeEnum getDestinationType() {
    return destinationType;
  }

  public void setDestinationType(DestinationTypeEnum destinationType) {
    this.destinationType = destinationType;
  }

  public ModifyNatFirewallControlPolicyRequest direction(DirectionEnum direction) {
    this.direction = direction;
    return this;
  }

   /**
   * Get direction
   * @return direction
  **/
  @NotNull
  @Schema(required = true, description = "")
  public DirectionEnum getDirection() {
    return direction;
  }

  public void setDirection(DirectionEnum direction) {
    this.direction = direction;
  }

  public ModifyNatFirewallControlPolicyRequest endTime(Integer endTime) {
    this.endTime = endTime;
    return this;
  }

   /**
   * Get endTime
   * @return endTime
  **/
  @Schema(description = "")
  public Integer getEndTime() {
    return endTime;
  }

  public void setEndTime(Integer endTime) {
    this.endTime = endTime;
  }

  public ModifyNatFirewallControlPolicyRequest natFirewallId(String natFirewallId) {
    this.natFirewallId = natFirewallId;
    return this;
  }

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

  public void setNatFirewallId(String natFirewallId) {
    this.natFirewallId = natFirewallId;
  }

  public ModifyNatFirewallControlPolicyRequest proto(ProtoEnum proto) {
    this.proto = proto;
    return this;
  }

   /**
   * Get proto
   * @return proto
  **/
  @NotNull
  @Schema(required = true, description = "")
  public ProtoEnum getProto() {
    return proto;
  }

  public void setProto(ProtoEnum proto) {
    this.proto = proto;
  }

  public ModifyNatFirewallControlPolicyRequest repeatDays(List repeatDays) {
    this.repeatDays = repeatDays;
    return this;
  }

  public ModifyNatFirewallControlPolicyRequest addRepeatDaysItem(Integer repeatDaysItem) {
    if (this.repeatDays == null) {
      this.repeatDays = new ArrayList();
    }
    this.repeatDays.add(repeatDaysItem);
    return this;
  }

   /**
   * Get repeatDays
   * @return repeatDays
  **/
  @Schema(description = "")
  public List getRepeatDays() {
    return repeatDays;
  }

  public void setRepeatDays(List repeatDays) {
    this.repeatDays = repeatDays;
  }

  public ModifyNatFirewallControlPolicyRequest repeatEndTime(String repeatEndTime) {
    this.repeatEndTime = repeatEndTime;
    return this;
  }

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

  public void setRepeatEndTime(String repeatEndTime) {
    this.repeatEndTime = repeatEndTime;
  }

  public ModifyNatFirewallControlPolicyRequest repeatStartTime(String repeatStartTime) {
    this.repeatStartTime = repeatStartTime;
    return this;
  }

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

  public void setRepeatStartTime(String repeatStartTime) {
    this.repeatStartTime = repeatStartTime;
  }

  public ModifyNatFirewallControlPolicyRequest repeatType(RepeatTypeEnum repeatType) {
    this.repeatType = repeatType;
    return this;
  }

   /**
   * Get repeatType
   * @return repeatType
  **/
  @Schema(description = "")
  public RepeatTypeEnum getRepeatType() {
    return repeatType;
  }

  public void setRepeatType(RepeatTypeEnum repeatType) {
    this.repeatType = repeatType;
  }

  public ModifyNatFirewallControlPolicyRequest ruleId(String ruleId) {
    this.ruleId = ruleId;
    return this;
  }

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

  public void setRuleId(String ruleId) {
    this.ruleId = ruleId;
  }

  public ModifyNatFirewallControlPolicyRequest source(String source) {
    this.source = source;
    return this;
  }

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

  public void setSource(String source) {
    this.source = source;
  }

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

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

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

  public ModifyNatFirewallControlPolicyRequest startTime(Integer startTime) {
    this.startTime = startTime;
    return this;
  }

   /**
   * Get startTime
   * @return startTime
  **/
  @Schema(description = "")
  public Integer getStartTime() {
    return startTime;
  }

  public void setStartTime(Integer startTime) {
    this.startTime = startTime;
  }

  public ModifyNatFirewallControlPolicyRequest status(Boolean status) {
    this.status = status;
    return this;
  }

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

  public void setStatus(Boolean status) {
    this.status = status;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ModifyNatFirewallControlPolicyRequest modifyNatFirewallControlPolicyRequest = (ModifyNatFirewallControlPolicyRequest) o;
    return Objects.equals(this.action, modifyNatFirewallControlPolicyRequest.action) &&
        Objects.equals(this.description, modifyNatFirewallControlPolicyRequest.description) &&
        Objects.equals(this.destPort, modifyNatFirewallControlPolicyRequest.destPort) &&
        Objects.equals(this.destPortType, modifyNatFirewallControlPolicyRequest.destPortType) &&
        Objects.equals(this.destination, modifyNatFirewallControlPolicyRequest.destination) &&
        Objects.equals(this.destinationType, modifyNatFirewallControlPolicyRequest.destinationType) &&
        Objects.equals(this.direction, modifyNatFirewallControlPolicyRequest.direction) &&
        Objects.equals(this.endTime, modifyNatFirewallControlPolicyRequest.endTime) &&
        Objects.equals(this.natFirewallId, modifyNatFirewallControlPolicyRequest.natFirewallId) &&
        Objects.equals(this.proto, modifyNatFirewallControlPolicyRequest.proto) &&
        Objects.equals(this.repeatDays, modifyNatFirewallControlPolicyRequest.repeatDays) &&
        Objects.equals(this.repeatEndTime, modifyNatFirewallControlPolicyRequest.repeatEndTime) &&
        Objects.equals(this.repeatStartTime, modifyNatFirewallControlPolicyRequest.repeatStartTime) &&
        Objects.equals(this.repeatType, modifyNatFirewallControlPolicyRequest.repeatType) &&
        Objects.equals(this.ruleId, modifyNatFirewallControlPolicyRequest.ruleId) &&
        Objects.equals(this.source, modifyNatFirewallControlPolicyRequest.source) &&
        Objects.equals(this.sourceType, modifyNatFirewallControlPolicyRequest.sourceType) &&
        Objects.equals(this.startTime, modifyNatFirewallControlPolicyRequest.startTime) &&
        Objects.equals(this.status, modifyNatFirewallControlPolicyRequest.status);
  }

  @Override
  public int hashCode() {
    return Objects.hash(action, description, destPort, destPortType, destination, destinationType, direction, endTime, natFirewallId, proto, repeatDays, repeatEndTime, repeatStartTime, repeatType, ruleId, source, sourceType, startTime, status);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ModifyNatFirewallControlPolicyRequest {\n");
    
    sb.append("    action: ").append(toIndentedString(action)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    destPort: ").append(toIndentedString(destPort)).append("\n");
    sb.append("    destPortType: ").append(toIndentedString(destPortType)).append("\n");
    sb.append("    destination: ").append(toIndentedString(destination)).append("\n");
    sb.append("    destinationType: ").append(toIndentedString(destinationType)).append("\n");
    sb.append("    direction: ").append(toIndentedString(direction)).append("\n");
    sb.append("    endTime: ").append(toIndentedString(endTime)).append("\n");
    sb.append("    natFirewallId: ").append(toIndentedString(natFirewallId)).append("\n");
    sb.append("    proto: ").append(toIndentedString(proto)).append("\n");
    sb.append("    repeatDays: ").append(toIndentedString(repeatDays)).append("\n");
    sb.append("    repeatEndTime: ").append(toIndentedString(repeatEndTime)).append("\n");
    sb.append("    repeatStartTime: ").append(toIndentedString(repeatStartTime)).append("\n");
    sb.append("    repeatType: ").append(toIndentedString(repeatType)).append("\n");
    sb.append("    ruleId: ").append(toIndentedString(ruleId)).append("\n");
    sb.append("    source: ").append(toIndentedString(source)).append("\n");
    sb.append("    sourceType: ").append(toIndentedString(sourceType)).append("\n");
    sb.append("    startTime: ").append(toIndentedString(startTime)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).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