com.ifountain.opsgenie.client.swagger.model.DeleteAlertAttachmentRequest Maven / Gradle / Ivy
/*
* OpsGenie REST API
* OpsGenie API Description
*
* OpenAPI spec version: 1.0.0
*
*
* 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.ifountain.opsgenie.client.swagger.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.ObjectUtils;
import javax.validation.constraints.NotNull;
/**
* Delete alert attachment for the given identifier
*/
@ApiModel(description = "Delete alert attachment for the given identifier")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-13T16:12:27.505+03:00")
public class DeleteAlertAttachmentRequest {
@JsonProperty("identifier")
private String identifier = null;
@JsonProperty("alertIdentifierType")
private AlertIdentifierTypeEnum alertIdentifierType = AlertIdentifierTypeEnum.ID;
@JsonProperty("attachmentId")
private Long attachmentId = null;
@JsonProperty("user")
private String user = null;
public DeleteAlertAttachmentRequest identifier(String identifier) {
this.identifier = identifier;
return this;
}
/**
* Identifier of alert which could be alert id, tiny id or alert alias
*
* @return identifier
**/
@NotNull
@ApiModelProperty(required = true, value = "Identifier of alert which could be alert id, tiny id or alert alias")
public String getIdentifier() {
return identifier;
}
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
public DeleteAlertAttachmentRequest alertIdentifierType(AlertIdentifierTypeEnum alertIdentifierType) {
this.alertIdentifierType = alertIdentifierType;
return this;
}
/**
* Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'
*
* @return alertIdentifierType
**/
@ApiModelProperty(value = "Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'")
public AlertIdentifierTypeEnum getAlertIdentifierType() {
return alertIdentifierType;
}
public void setAlertIdentifierType(AlertIdentifierTypeEnum alertIdentifierType) {
this.alertIdentifierType = alertIdentifierType;
}
public DeleteAlertAttachmentRequest attachmentId(Long attachmentId) {
this.attachmentId = attachmentId;
return this;
}
/**
* Identifier of alert attachment
*
* @return attachmentId
**/
@NotNull
@ApiModelProperty(required = true, value = "Identifier of alert attachment")
public Long getAttachmentId() {
return attachmentId;
}
public void setAttachmentId(Long attachmentId) {
this.attachmentId = attachmentId;
}
public DeleteAlertAttachmentRequest user(String user) {
this.user = user;
return this;
}
/**
* Display name of the request owner
*
* @return user
**/
@ApiModelProperty(value = "Display name of the request owner")
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeleteAlertAttachmentRequest deleteAlertAttachmentRequest = (DeleteAlertAttachmentRequest) o;
return ObjectUtils.equals(this.identifier, deleteAlertAttachmentRequest.identifier) &&
ObjectUtils.equals(this.alertIdentifierType, deleteAlertAttachmentRequest.alertIdentifierType) &&
ObjectUtils.equals(this.attachmentId, deleteAlertAttachmentRequest.attachmentId) &&
ObjectUtils.equals(this.user, deleteAlertAttachmentRequest.user);
}
@Override
public int hashCode() {
return ObjectUtils.hashCodeMulti(identifier, alertIdentifierType, attachmentId, user);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeleteAlertAttachmentRequest {\n");
sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n");
sb.append(" alertIdentifierType: ").append(toIndentedString(alertIdentifierType)).append("\n");
sb.append(" attachmentId: ").append(toIndentedString(attachmentId)).append("\n");
sb.append(" user: ").append(toIndentedString(user)).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 ");
}
/**
* Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'
*/
public enum AlertIdentifierTypeEnum {
ID("id"),
ALIAS("alias"),
TINY("tiny");
private String value;
AlertIdentifierTypeEnum(String value) {
this.value = value;
}
@JsonCreator
public static AlertIdentifierTypeEnum fromValue(String text) {
for (AlertIdentifierTypeEnum b : AlertIdentifierTypeEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public String getValue() {
return this.value;
}
@Override
public String toString() {
return String.valueOf(value);
}
}
}