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

org.projectodd.openwhisk.model.Activation 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.ActivationResponse;

/**
 * Activation
 */

public class Activation {
  @JsonProperty("duration")
  private Integer duration = null;

  @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("subject")
  private String subject = null;

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

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

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

  @JsonProperty("response")
  private ActivationResponse response = null;

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

  public Activation duration(Integer duration) {
    this.duration = duration;
    return this;
  }

   /**
   * Duration of the item
   * @return duration
  **/
  @ApiModelProperty(value = "Duration of the item")
  public Integer getDuration() {
    return duration;
  }

  public void setDuration(Integer duration) {
    this.duration = duration;
  }

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

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

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

  public Activation 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 Activation 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 Activation 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 Activation subject(String subject) {
    this.subject = subject;
    return this;
  }

   /**
   * The subject that activated the item
   * @return subject
  **/
  @ApiModelProperty(required = true, value = "The subject that activated the item")
  public String getSubject() {
    return subject;
  }

  public void setSubject(String subject) {
    this.subject = subject;
  }

  public Activation activationId(String activationId) {
    this.activationId = activationId;
    return this;
  }

   /**
   * Id of the activation
   * @return activationId
  **/
  @ApiModelProperty(required = true, value = "Id of the activation")
  public String getActivationId() {
    return activationId;
  }

  public void setActivationId(String activationId) {
    this.activationId = activationId;
  }

  public Activation start(String start) {
    this.start = start;
    return this;
  }

   /**
   * Time when the activation began
   * @return start
  **/
  @ApiModelProperty(required = true, value = "Time when the activation began")
  public String getStart() {
    return start;
  }

  public void setStart(String start) {
    this.start = start;
  }

  public Activation end(String end) {
    this.end = end;
    return this;
  }

   /**
   * Time when the activation completed
   * @return end
  **/
  @ApiModelProperty(required = true, value = "Time when the activation completed")
  public String getEnd() {
    return end;
  }

  public void setEnd(String end) {
    this.end = end;
  }

  public Activation response(ActivationResponse response) {
    this.response = response;
    return this;
  }

   /**
   * Get response
   * @return response
  **/
  @ApiModelProperty(required = true, value = "")
  public ActivationResponse getResponse() {
    return response;
  }

  public void setResponse(ActivationResponse response) {
    this.response = response;
  }

  public Activation logs(List logs) {
    this.logs = logs;
    return this;
  }

  public Activation addLogsItem(String logsItem) {
    this.logs.add(logsItem);
    return this;
  }

   /**
   * Logs generated by the activation
   * @return logs
  **/
  @ApiModelProperty(required = true, value = "Logs generated by the activation")
  public List getLogs() {
    return logs;
  }

  public void setLogs(List logs) {
    this.logs = logs;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Activation activation = (Activation) o;
    return Objects.equals(this.duration, activation.duration) &&
        Objects.equals(this.namespace, activation.namespace) &&
        Objects.equals(this.name, activation.name) &&
        Objects.equals(this.version, activation.version) &&
        Objects.equals(this.publish, activation.publish) &&
        Objects.equals(this.subject, activation.subject) &&
        Objects.equals(this.activationId, activation.activationId) &&
        Objects.equals(this.start, activation.start) &&
        Objects.equals(this.end, activation.end) &&
        Objects.equals(this.response, activation.response) &&
        Objects.equals(this.logs, activation.logs);
  }

  @Override
  public int hashCode() {
    return Objects.hash(duration, namespace, name, version, publish, subject, activationId, start, end, response, logs);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Activation {\n");
    
    sb.append("    duration: ").append(toIndentedString(duration)).append("\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("    subject: ").append(toIndentedString(subject)).append("\n");
    sb.append("    activationId: ").append(toIndentedString(activationId)).append("\n");
    sb.append("    start: ").append(toIndentedString(start)).append("\n");
    sb.append("    end: ").append(toIndentedString(end)).append("\n");
    sb.append("    response: ").append(toIndentedString(response)).append("\n");
    sb.append("    logs: ").append(toIndentedString(logs)).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