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

org.projectodd.openwhisk.model.Trigger Maven / Gradle / Ivy

There is a newer version: 0.8
Show newest version
/*
 * OpenWhisk REST API
 * API for OpenWhisk
 *
 * OpenAPI spec version: 0.1.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.projectodd.openwhisk.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.projectodd.openwhisk.model.KeyValue;
import org.projectodd.openwhisk.model.TriggerLimits;

/**
 * Trigger
 */

public class Trigger {
  @JsonProperty("namespace")
  private String namespace = null;

  @JsonProperty("name")
  private String name = null;

  @JsonProperty("version")
  private String version = null;

  @JsonProperty("publish")
  private Boolean publish = null;

  @JsonProperty("annotations")
  private List annotations = null;

  @JsonProperty("parameters")
  private List parameters = new ArrayList<>();

  @JsonProperty("limits")
  private TriggerLimits limits = null;

  @JsonProperty("rules")
  private Object rules = null;

  public Trigger namespace(String namespace) {
    this.namespace = namespace;
    return this;
  }

   /**
   * Namespace of the item
   * @return namespace
  **/
  @ApiModelProperty(required = true, value = "Namespace of the item")
  public String getNamespace() {
    return namespace;
  }

  public void setNamespace(String namespace) {
    this.namespace = namespace;
  }

  public Trigger name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Name of the item
   * @return name
  **/
  @ApiModelProperty(required = true, value = "Name of the item")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Trigger version(String version) {
    this.version = version;
    return this;
  }

   /**
   * Semantic version of the item
   * @return version
  **/
  @ApiModelProperty(required = true, value = "Semantic version of the item")
  public String getVersion() {
    return version;
  }

  public void setVersion(String version) {
    this.version = version;
  }

  public Trigger publish(Boolean publish) {
    this.publish = publish;
    return this;
  }

   /**
   * Whether to publish the item or not
   * @return publish
  **/
  @ApiModelProperty(required = true, value = "Whether to publish the item or not")
  public Boolean isPublish() {
    return publish;
  }

  public void setPublish(Boolean publish) {
    this.publish = publish;
  }

  public Trigger annotations(List annotations) {
    this.annotations = annotations;
    return this;
  }

  public Trigger addAnnotationsItem(KeyValue annotationsItem) {
    if (this.annotations == null) {
      this.annotations = new ArrayList<>();
    }
    this.annotations.add(annotationsItem);
    return this;
  }

   /**
   * annotations on the item
   * @return annotations
  **/
  @ApiModelProperty(value = "annotations on the item")
  public List getAnnotations() {
    return annotations;
  }

  public void setAnnotations(List annotations) {
    this.annotations = annotations;
  }

  public Trigger parameters(List parameters) {
    this.parameters = parameters;
    return this;
  }

  public Trigger addParametersItem(KeyValue parametersItem) {
    this.parameters.add(parametersItem);
    return this;
  }

   /**
   * parameter bindings for the trigger
   * @return parameters
  **/
  @ApiModelProperty(required = true, value = "parameter bindings for the trigger")
  public List getParameters() {
    return parameters;
  }

  public void setParameters(List parameters) {
    this.parameters = parameters;
  }

  public Trigger limits(TriggerLimits limits) {
    this.limits = limits;
    return this;
  }

   /**
   * Get limits
   * @return limits
  **/
  @ApiModelProperty(required = true, value = "")
  public TriggerLimits getLimits() {
    return limits;
  }

  public void setLimits(TriggerLimits limits) {
    this.limits = limits;
  }

  public Trigger rules(Object rules) {
    this.rules = rules;
    return this;
  }

   /**
   * rules associated with the trigger
   * @return rules
  **/
  @ApiModelProperty(value = "rules associated with the trigger")
  public Object getRules() {
    return rules;
  }

  public void setRules(Object rules) {
    this.rules = rules;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Trigger trigger = (Trigger) o;
    return Objects.equals(this.namespace, trigger.namespace) &&
        Objects.equals(this.name, trigger.name) &&
        Objects.equals(this.version, trigger.version) &&
        Objects.equals(this.publish, trigger.publish) &&
        Objects.equals(this.annotations, trigger.annotations) &&
        Objects.equals(this.parameters, trigger.parameters) &&
        Objects.equals(this.limits, trigger.limits) &&
        Objects.equals(this.rules, trigger.rules);
  }

  @Override
  public int hashCode() {
    return Objects.hash(namespace, name, version, publish, annotations, parameters, limits, rules);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Trigger {\n");
    
    sb.append("    namespace: ").append(toIndentedString(namespace)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("    publish: ").append(toIndentedString(publish)).append("\n");
    sb.append("    annotations: ").append(toIndentedString(annotations)).append("\n");
    sb.append("    parameters: ").append(toIndentedString(parameters)).append("\n");
    sb.append("    limits: ").append(toIndentedString(limits)).append("\n");
    sb.append("    rules: ").append(toIndentedString(rules)).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