org.symphonyoss.symphony.agent.model.ChannelSubscriptionResponse Maven / Gradle / Ivy
The newest version!
/*
* Agent API
* This document refers to Symphony API calls to send and receive messages and content. They need the on-premise Agent installed to perform decryption/encryption of content. - sessionToken and keyManagerToken can be obtained by calling the authenticationAPI on the symphony back end and the key manager respectively. Refer to the methods described in authenticatorAPI.yaml. - Actions are defined to be atomic, ie will succeed in their entirety or fail and have changed nothing. - If it returns a 40X status then it will have sent no message to any stream even if a request to aome subset of the requested streams would have succeeded. - If this contract cannot be met for any reason then this is an error and the response code will be 50X. - MessageML is a markup language for messages. See reference here: https://developers.symphony.com/documentation/message_format_reference
*
* OpenAPI spec version: 1.50.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 org.symphonyoss.symphony.agent.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.symphonyoss.symphony.agent.model.ChannelSubscriptionError;
/**
* ChannelSubscriptionResponse
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-03-13T13:44:51.568-04:00")
public class ChannelSubscriptionResponse {
@JsonProperty("requestedSubscription")
private Long requestedSubscription = null;
@JsonProperty("successfulSubscription")
private Long successfulSubscription = null;
@JsonProperty("failedSubscription")
private Long failedSubscription = null;
@JsonProperty("subscriptionErrors")
private List subscriptionErrors = null;
public ChannelSubscriptionResponse requestedSubscription(Long requestedSubscription) {
this.requestedSubscription = requestedSubscription;
return this;
}
/**
* The number of requested userIds to subscribe
* @return requestedSubscription
**/
@ApiModelProperty(value = "The number of requested userIds to subscribe")
public Long getRequestedSubscription() {
return requestedSubscription;
}
public void setRequestedSubscription(Long requestedSubscription) {
this.requestedSubscription = requestedSubscription;
}
public ChannelSubscriptionResponse successfulSubscription(Long successfulSubscription) {
this.successfulSubscription = successfulSubscription;
return this;
}
/**
* The number of successful subscriptions done
* @return successfulSubscription
**/
@ApiModelProperty(value = "The number of successful subscriptions done")
public Long getSuccessfulSubscription() {
return successfulSubscription;
}
public void setSuccessfulSubscription(Long successfulSubscription) {
this.successfulSubscription = successfulSubscription;
}
public ChannelSubscriptionResponse failedSubscription(Long failedSubscription) {
this.failedSubscription = failedSubscription;
return this;
}
/**
* The number of subscription failures
* @return failedSubscription
**/
@ApiModelProperty(value = "The number of subscription failures")
public Long getFailedSubscription() {
return failedSubscription;
}
public void setFailedSubscription(Long failedSubscription) {
this.failedSubscription = failedSubscription;
}
public ChannelSubscriptionResponse subscriptionErrors(List subscriptionErrors) {
this.subscriptionErrors = subscriptionErrors;
return this;
}
public ChannelSubscriptionResponse addSubscriptionErrorsItem(ChannelSubscriptionError subscriptionErrorsItem) {
if (this.subscriptionErrors == null) {
this.subscriptionErrors = new ArrayList();
}
this.subscriptionErrors.add(subscriptionErrorsItem);
return this;
}
/**
* Get subscriptionErrors
* @return subscriptionErrors
**/
@ApiModelProperty(value = "")
public List getSubscriptionErrors() {
return subscriptionErrors;
}
public void setSubscriptionErrors(List subscriptionErrors) {
this.subscriptionErrors = subscriptionErrors;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ChannelSubscriptionResponse channelSubscriptionResponse = (ChannelSubscriptionResponse) o;
return Objects.equals(this.requestedSubscription, channelSubscriptionResponse.requestedSubscription) &&
Objects.equals(this.successfulSubscription, channelSubscriptionResponse.successfulSubscription) &&
Objects.equals(this.failedSubscription, channelSubscriptionResponse.failedSubscription) &&
Objects.equals(this.subscriptionErrors, channelSubscriptionResponse.subscriptionErrors);
}
@Override
public int hashCode() {
return Objects.hash(requestedSubscription, successfulSubscription, failedSubscription, subscriptionErrors);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ChannelSubscriptionResponse {\n");
sb.append(" requestedSubscription: ").append(toIndentedString(requestedSubscription)).append("\n");
sb.append(" successfulSubscription: ").append(toIndentedString(successfulSubscription)).append("\n");
sb.append(" failedSubscription: ").append(toIndentedString(failedSubscription)).append("\n");
sb.append(" subscriptionErrors: ").append(toIndentedString(subscriptionErrors)).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 ");
}
}