com.huawei.openstack4j.openstack.senlin.domain.SenlinAction Maven / Gradle / Ivy
/*******************************************************************************
* Copyright 2016 ContainX and OpenStack4j
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*******************************************************************************/
package com.huawei.openstack4j.openstack.senlin.domain;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.huawei.openstack4j.model.senlin.Action;
import com.huawei.openstack4j.openstack.common.ListResult;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* This is a model of a senlinAction. It uses Jackson annotations for
* (de)serialization into JSON format
*
* @author lion
*
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonRootName("action")
public class SenlinAction implements Action {
private static final long serialVersionUID = -1125919503657762374L;
@JsonProperty("action")
private String action;
@JsonProperty("cause")
private String cause;
@JsonProperty("context")
private Map context;
@JsonProperty("created_at")
private Date createdAt;
@JsonProperty("depended_by")
private List dependedBy;
@JsonProperty("depended_on")
private List dependedOn;
@JsonProperty("end_time")
private Float endTime;
@JsonProperty("id")
private String id;
@JsonProperty("inputs")
private Map inputs;
@JsonProperty("interval")
private Integer interval;
@JsonProperty("name")
private String name;
@JsonProperty("outputs")
private Map outputs;
@JsonProperty("owner")
private String owner;
@JsonProperty("start_time")
private Float startTime;
@JsonProperty("status")
private String status;
@JsonProperty("status_reason")
private String statusReason;
@JsonProperty("target")
private String target;
@JsonProperty("timeout")
private Integer timeout;
@JsonProperty("updated_at")
private Date updatedAt;
@Override
public String getId() {
return id;
}
@Override
public String getName() {
return name;
}
@Override
public Map getContext() {
return context;
}
@Override
public String getAction() {
return action;
}
@Override
public Date getUpdatedAt() {
return updatedAt;
}
@Override
public String getCause() {
return cause;
}
@Override
public Date getCreatedAt() {
return createdAt;
}
@Override
public List getDependedBy() {
return dependedBy;
}
@Override
public List getDependedOn() {
return dependedOn;
}
@Override
public Float getEndTime() {
return endTime;
}
@Override
public Map getInputs() {
return inputs;
}
@Override
public Integer getInterval() {
return interval;
}
@Override
public Map getOutputs() {
return outputs;
}
@Override
public String getOwner() {
return owner;
}
@Override
public Float getStartTime() {
return startTime;
}
@Override
public String getStatus() {
return status;
}
@Override
public String getStatusReason() {
return statusReason;
}
@Override
public String getTarget() {
return target;
}
@Override
public Integer getTimeout() {
return timeout;
}
@Override
public String toString() {
return "SenlinAction{" +
"action='" + action + '\'' +
", cause='" + cause + '\'' +
", context=" + context +
", createdAt=" + createdAt +
", dependedBy=" + dependedBy +
", dependedOn=" + dependedOn +
", endTime=" + endTime +
", id='" + id + '\'' +
", inputs=" + inputs +
", interval=" + interval +
", name='" + name + '\'' +
", outputs=" + outputs +
", owner='" + owner + '\'' +
", startTime=" + startTime +
", status='" + status + '\'' +
", statusReason='" + statusReason + '\'' +
", target='" + target + '\'' +
", timeout=" + timeout +
", updatedAt=" + updatedAt +
'}';
}
/**
* An inner class for representing lists of senlinAction
*
* @author lion
*
*/
public static class Action extends ListResult {
private static final long serialVersionUID = 298037693459165073L;
@JsonProperty("actions")
private List list;
protected List value() {
return list;
}
}
}