com.volcengine.fwcenter.model.AddAddressBookRequest Maven / Gradle / Ivy
/*
* 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;
/**
* AddAddressBookRequest
*/
public class AddAddressBookRequest {
@SerializedName("AddressList")
private List addressList = null;
@SerializedName("Description")
private String description = null;
@SerializedName("GroupName")
private String groupName = null;
/**
* Gets or Sets groupType
*/
@JsonAdapter(GroupTypeEnum.Adapter.class)
public enum GroupTypeEnum {
@SerializedName("ip")
IP("ip"),
@SerializedName("domain")
DOMAIN("domain"),
@SerializedName("port")
PORT("port");
private String value;
GroupTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static GroupTypeEnum fromValue(String input) {
for (GroupTypeEnum b : GroupTypeEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final GroupTypeEnum enumeration) throws IOException {
jsonWriter.value(String.valueOf(enumeration.getValue()));
}
@Override
public GroupTypeEnum read(final JsonReader jsonReader) throws IOException {
Object value = jsonReader.nextString();
return GroupTypeEnum.fromValue((String)(value));
}
}
} @SerializedName("GroupType")
private GroupTypeEnum groupType = null;
public AddAddressBookRequest addressList(List addressList) {
this.addressList = addressList;
return this;
}
public AddAddressBookRequest addAddressListItem(String addressListItem) {
if (this.addressList == null) {
this.addressList = new ArrayList();
}
this.addressList.add(addressListItem);
return this;
}
/**
* Get addressList
* @return addressList
**/
@Schema(description = "")
public List getAddressList() {
return addressList;
}
public void setAddressList(List addressList) {
this.addressList = addressList;
}
public AddAddressBookRequest 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 AddAddressBookRequest groupName(String groupName) {
this.groupName = groupName;
return this;
}
/**
* Get groupName
* @return groupName
**/
@NotNull
@Size(max=64) @Schema(required = true, description = "")
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
}
public AddAddressBookRequest groupType(GroupTypeEnum groupType) {
this.groupType = groupType;
return this;
}
/**
* Get groupType
* @return groupType
**/
@NotNull
@Schema(required = true, description = "")
public GroupTypeEnum getGroupType() {
return groupType;
}
public void setGroupType(GroupTypeEnum groupType) {
this.groupType = groupType;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AddAddressBookRequest addAddressBookRequest = (AddAddressBookRequest) o;
return Objects.equals(this.addressList, addAddressBookRequest.addressList) &&
Objects.equals(this.description, addAddressBookRequest.description) &&
Objects.equals(this.groupName, addAddressBookRequest.groupName) &&
Objects.equals(this.groupType, addAddressBookRequest.groupType);
}
@Override
public int hashCode() {
return Objects.hash(addressList, description, groupName, groupType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AddAddressBookRequest {\n");
sb.append(" addressList: ").append(toIndentedString(addressList)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n");
sb.append(" groupType: ").append(toIndentedString(groupType)).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