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

com.ziqni.admin.sdk.model.EntityChangeSubscriptionRequest Maven / Gradle / Ivy

There is a newer version: 1.0.21
Show newest version
/*
 * ZIQNI Admin API
 * Ziqni Application Services are used to manage and configure spaces.
 *
 * The version of the OpenAPI document: 3.0.1
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.ziqni.admin.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
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 com.fasterxml.jackson.annotation.JsonPropertyOrder;


/**
 * EntityChangeSubscriptionRequest
 */
@JsonPropertyOrder({
  EntityChangeSubscriptionRequest.JSON_PROPERTY_ENTITY_TYPE,
  EntityChangeSubscriptionRequest.JSON_PROPERTY_CONSTRAINTS,
  EntityChangeSubscriptionRequest.JSON_PROPERTY_CALLBACK,
  EntityChangeSubscriptionRequest.JSON_PROPERTY_ACTION
})
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class EntityChangeSubscriptionRequest {
  public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType";
  private String entityType;

  public static final String JSON_PROPERTY_CONSTRAINTS = "constraints";
  private List constraints = null;

  public static final String JSON_PROPERTY_CALLBACK = "callback";
  private String callback;

  /**
   * Either subscribe or unsubscribe from the data feed
   */
  public enum ActionEnum {
    SUBSCRIBE("Subscribe"),
    
    UNSUBSCRIBE("Unsubscribe");

    private String value;

    ActionEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static ActionEnum fromValue(String value) {
      for (ActionEnum b : ActionEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_ACTION = "action";
  private ActionEnum action;


  public EntityChangeSubscriptionRequest entityType(String entityType) {
    this.entityType = entityType;
    return this;
  }

   /**
   * What you are subscribing to, like Competition, Contest, Member, Award etc.
   * @return entityType
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "What you are subscribing to, like Competition, Contest, Member, Award etc.")
  @JsonProperty(JSON_PROPERTY_ENTITY_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getEntityType() {
    return entityType;
  }


  @JsonProperty(JSON_PROPERTY_ENTITY_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setEntityType(String entityType) {
    this.entityType = entityType;
  }


  public EntityChangeSubscriptionRequest constraints(List constraints) {
    this.constraints = constraints;
    return this;
  }

  public EntityChangeSubscriptionRequest addConstraintsItem(String constraintsItem) {
    if (this.constraints == null) {
      this.constraints = new ArrayList<>();
    }
    this.constraints.add(constraintsItem);
    return this;
  }

   /**
   * Constraints of this subscription.
   * @return constraints
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Constraints of this subscription.")
  @JsonProperty(JSON_PROPERTY_CONSTRAINTS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List getConstraints() {
    return constraints;
  }


  @JsonProperty(JSON_PROPERTY_CONSTRAINTS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setConstraints(List constraints) {
    this.constraints = constraints;
  }


  public EntityChangeSubscriptionRequest callback(String callback) {
    this.callback = callback;
    return this;
  }

   /**
   * The callback operation you are subscribing too. Like entityChanged or entityStateChanged
   * @return callback
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "The callback operation you are subscribing too. Like entityChanged or entityStateChanged")
  @JsonProperty(JSON_PROPERTY_CALLBACK)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getCallback() {
    return callback;
  }


  @JsonProperty(JSON_PROPERTY_CALLBACK)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCallback(String callback) {
    this.callback = callback;
  }


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

   /**
   * Either subscribe or unsubscribe from the data feed
   * @return action
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "Either subscribe or unsubscribe from the data feed")
  @JsonProperty(JSON_PROPERTY_ACTION)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public ActionEnum getAction() {
    return action;
  }


  @JsonProperty(JSON_PROPERTY_ACTION)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setAction(ActionEnum action) {
    this.action = action;
  }


  /**
   * Return true if this EntityChangeSubscriptionRequest object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    EntityChangeSubscriptionRequest entityChangeSubscriptionRequest = (EntityChangeSubscriptionRequest) o;
    return Objects.equals(this.entityType, entityChangeSubscriptionRequest.entityType) &&
        Objects.equals(this.constraints, entityChangeSubscriptionRequest.constraints) &&
        Objects.equals(this.callback, entityChangeSubscriptionRequest.callback) &&
        Objects.equals(this.action, entityChangeSubscriptionRequest.action);
  }

  @Override
  public int hashCode() {
    return Objects.hash(entityType, constraints, callback, action);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class EntityChangeSubscriptionRequest {\n");
    sb.append("    entityType: ").append(toIndentedString(entityType)).append("\n");
    sb.append("    constraints: ").append(toIndentedString(constraints)).append("\n");
    sb.append("    callback: ").append(toIndentedString(callback)).append("\n");
    sb.append("    action: ").append(toIndentedString(action)).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(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy