Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.ApiModelProperty;
import org.apache.commons.lang3.ObjectUtils;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* CreateAlertRequest
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-13T16:12:27.505+03:00")
public class CreateAlertRequest {
@JsonProperty("user")
private String user = null;
@JsonProperty("note")
private String note = null;
@JsonProperty("source")
private String source = null;
@JsonProperty("message")
private String message = null;
@JsonProperty("alias")
private String alias = null;
@JsonProperty("description")
private String description = null;
@JsonProperty("teams")
private List teams = new ArrayList();
@JsonProperty("visibleTo")
private List visibleTo = new ArrayList();
@JsonProperty("actions")
private List actions = new ArrayList();
@JsonProperty("tags")
private List tags = new ArrayList();
@JsonProperty("details")
private Map details = new HashMap();
@JsonProperty("entity")
private String entity = null;
@JsonProperty("priority")
private PriorityEnum priority = null;
public CreateAlertRequest 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;
}
public CreateAlertRequest note(String note) {
this.note = note;
return this;
}
/**
* Additional note that will be added while creating the alert
*
* @return note
**/
@ApiModelProperty(value = "Additional note that will be added while creating the alert")
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public CreateAlertRequest source(String source) {
this.source = source;
return this;
}
/**
* Source field of the alert. Default value is IP address of the incoming request
*
* @return source
**/
@ApiModelProperty(value = "Source field of the alert. Default value is IP address of the incoming request")
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public CreateAlertRequest message(String message) {
this.message = message;
return this;
}
/**
* Message of the alert
*
* @return message
**/
@NotNull
@ApiModelProperty(required = true, value = "Message of the alert")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public CreateAlertRequest alias(String alias) {
this.alias = alias;
return this;
}
/**
* Client-defined identifier of the alert, that is also the key element of alert deduplication.
*
* @return alias
**/
@ApiModelProperty(value = "Client-defined identifier of the alert, that is also the key element of alert deduplication.")
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public CreateAlertRequest description(String description) {
this.description = description;
return this;
}
/**
* Description field of the alert that is generally used to provide a detailed information about the alert.
*
* @return description
**/
@ApiModelProperty(value = "Description field of the alert that is generally used to provide a detailed information about the alert.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public CreateAlertRequest teams(List teams) {
this.teams = teams;
return this;
}
public CreateAlertRequest addTeamsItem(TeamRecipient teamsItem) {
this.teams.add(teamsItem);
return this;
}
/**
* Teams that the alert will be routed to send notifications
*
* @return teams
**/
@ApiModelProperty(value = "Teams that the alert will be routed to send notifications")
public List getTeams() {
return teams;
}
public void setTeams(List teams) {
this.teams = teams;
}
public CreateAlertRequest visibleTo(List visibleTo) {
this.visibleTo = visibleTo;
return this;
}
public CreateAlertRequest addVisibleToItem(Recipient visibleToItem) {
this.visibleTo.add(visibleToItem);
return this;
}
/**
* Teams and users that the alert will become visible to without sending any notification
*
* @return visibleTo
**/
@ApiModelProperty(value = "Teams and users that the alert will become visible to without sending any notification")
public List getVisibleTo() {
return visibleTo;
}
public void setVisibleTo(List visibleTo) {
this.visibleTo = visibleTo;
}
public CreateAlertRequest actions(List actions) {
this.actions = actions;
return this;
}
public CreateAlertRequest addActionsItem(String actionsItem) {
this.actions.add(actionsItem);
return this;
}
/**
* Custom actions that will be available for the alert
*
* @return actions
**/
@ApiModelProperty(value = "Custom actions that will be available for the alert")
public List getActions() {
return actions;
}
public void setActions(List actions) {
this.actions = actions;
}
public CreateAlertRequest tags(List tags) {
this.tags = tags;
return this;
}
public CreateAlertRequest addTagsItem(String tagsItem) {
this.tags.add(tagsItem);
return this;
}
/**
* Tags of the alert
* @return tags
**/
@ApiModelProperty(value = "Tags of the alert")
public List getTags() {
return tags;
}
public void setTags(List tags) {
this.tags = tags;
}
public CreateAlertRequest details(Map details) {
this.details = details;
return this;
}
public CreateAlertRequest putDetailsItem(String key, String detailsItem) {
this.details.put(key, detailsItem);
return this;
}
/**
* Map of key-value pairs to use as custom properties of the alert
*
* @return details
**/
@ApiModelProperty(value = "Map of key-value pairs to use as custom properties of the alert")
public Map getDetails() {
return details;
}
public void setDetails(Map details) {
this.details = details;
}
public CreateAlertRequest entity(String entity) {
this.entity = entity;
return this;
}
/**
* Entity field of the alert that is generally used to specify which domain alert is related to
*
* @return entity
**/
@ApiModelProperty(value = "Entity field of the alert that is generally used to specify which domain alert is related to")
public String getEntity() {
return entity;
}
public void setEntity(String entity) {
this.entity = entity;
}
public CreateAlertRequest priority(PriorityEnum priority) {
this.priority = priority;
return this;
}
/**
* Priority level of the alert
* @return priority
**/
@ApiModelProperty(value = "Priority level of the alert")
public PriorityEnum getPriority() {
return priority;
}
public void setPriority(PriorityEnum priority) {
this.priority = priority;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateAlertRequest createAlertRequest = (CreateAlertRequest) o;
return ObjectUtils.equals(this.user, createAlertRequest.user) &&
ObjectUtils.equals(this.note, createAlertRequest.note) &&
ObjectUtils.equals(this.source, createAlertRequest.source) &&
ObjectUtils.equals(this.message, createAlertRequest.message) &&
ObjectUtils.equals(this.alias, createAlertRequest.alias) &&
ObjectUtils.equals(this.description, createAlertRequest.description) &&
ObjectUtils.equals(this.teams, createAlertRequest.teams) &&
ObjectUtils.equals(this.visibleTo, createAlertRequest.visibleTo) &&
ObjectUtils.equals(this.actions, createAlertRequest.actions) &&
ObjectUtils.equals(this.tags, createAlertRequest.tags) &&
ObjectUtils.equals(this.details, createAlertRequest.details) &&
ObjectUtils.equals(this.entity, createAlertRequest.entity) &&
ObjectUtils.equals(this.priority, createAlertRequest.priority);
}
@Override
public int hashCode() {
return ObjectUtils.hashCodeMulti(user, note, source, message, alias, description, teams, visibleTo, actions, tags, details, entity, priority);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateAlertRequest {\n");
sb.append(" user: ").append(toIndentedString(user)).append("\n");
sb.append(" note: ").append(toIndentedString(note)).append("\n");
sb.append(" source: ").append(toIndentedString(source)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" alias: ").append(toIndentedString(alias)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" teams: ").append(toIndentedString(teams)).append("\n");
sb.append(" visibleTo: ").append(toIndentedString(visibleTo)).append("\n");
sb.append(" actions: ").append(toIndentedString(actions)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" details: ").append(toIndentedString(details)).append("\n");
sb.append(" entity: ").append(toIndentedString(entity)).append("\n");
sb.append(" priority: ").append(toIndentedString(priority)).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 ");
}
/**
* Priority level of the alert
*/
public enum PriorityEnum {
P1("P1"),
P2("P2"),
P3("P3"),
P4("P4"),
P5("P5");
private String value;
PriorityEnum(String value) {
this.value = value;
}
@JsonCreator
public static PriorityEnum fromValue(String text) {
for (PriorityEnum b : PriorityEnum.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);
}
}
}