package org.onap.clamp.clds.model;
+import com.google.gson.annotations.Expose;
+
import java.util.List;
import javax.ws.rs.BadRequestException;
public static final String EVENT_UNDEPLOYMENT = "undeployment";
public static final String ARTIFACT_NAME_SUFFIX = ".yml";
+ @Expose
private String event;
- private String serviceUUID;
- private String resourceUUID;
+ @Expose
+ private String serviceUuid;
+ @Expose
+ private String resourceUuid;
+ @Expose
private String artifactName; // controlName.yml
+ @Expose
private List<CldsModelInstance> instances;
/**
- * Transform a DCAE Event Action to a CldsEvent.actionCd
+ * Transform a DCAE Event Action to a CldsEvent.actionCd.
*
- * @return
+ * @return The clds action.
*/
public String getCldsActionCd() {
if (event == null || event.length() == 0) {
return artifactName.substring(0, artifactName.length() - ARTIFACT_NAME_SUFFIX.length());
} else {
throw new BadRequestException("artifactName value not valid (expecting it to end with "
- + ARTIFACT_NAME_SUFFIX + "): " + artifactName);
+ + ARTIFACT_NAME_SUFFIX + "): " + artifactName);
}
}
/**
+ * Get the event.
+ *
* @return the event
*/
public String getEvent() {
}
/**
- * @param event
- * the event to set
+ * Set the event.
+ *
+ * @param event the event to set
*/
public void setEvent(String event) {
this.event = event;
}
/**
+ * Get the serviceUUID.
+ *
* @return the serviceUUID
*/
public String getServiceUUID() {
- return serviceUUID;
+ return serviceUuid;
}
/**
- * @param serviceUUID
- * the serviceUUID to set
+ * Set the serviceUUID.
+ *
+ * @param serviceUUID the serviceUUID to set
*/
- public void setServiceUUID(String serviceUUID) {
- this.serviceUUID = serviceUUID;
+ public void setServiceUUID(String serviceUuid) {
+ this.serviceUuid = serviceUuid;
}
/**
+ * Get the resourceUUID.
+ *
* @return the resourceUUID
*/
public String getResourceUUID() {
- return resourceUUID;
+ return resourceUuid;
}
/**
- * @param resourceUUID
- * the resourceUUID to set
+ * Set the resourceUUID.
+ *
+ * @param resourceUUID the resourceUUID to set
*/
- public void setResourceUUID(String resourceUUID) {
- this.resourceUUID = resourceUUID;
+ public void setResourceUUID(String resourceUuid) {
+ this.resourceUuid = resourceUuid;
}
/**
+ * Get the artifact name.
+ *
* @return the artifactName
*/
public String getArtifactName() {
}
/**
- * @param artifactName
- * the artifactName to set
+ * Set the artifact name.
+ *
+ * @param artifactName the artifactName to set
*/
public void setArtifactName(String artifactName) {
this.artifactName = artifactName;
}
+ /**
+ * Get the list of instances.
+ *
+ * @return The list of model instances
+ */
public List<CldsModelInstance> getInstances() {
return instances;
}
+ /**
+ * Set the list of model instances.
+ *
+ * @param instances The list of model instances to set
+ */
public void setInstances(List<CldsModelInstance> instances) {
this.instances = instances;
}