Implant vid-app-common org.onap.vid.job (main and test)
[vid.git] / vid-app-common / src / main / java / org / onap / vid / mso / rest / AsyncRequestStatus.java
index f47e16f..61e0d3a 100644 (file)
@@ -2,14 +2,14 @@
  * ============LICENSE_START=======================================================
  * VID
  * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * 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.
 
 package org.onap.vid.mso.rest;
 
-//import java.util.HashMap;
-//import java.util.Map;
-//import javax.annotation.Generated;
 
-import org.onap.vid.domain.mso.InstanceIds;
-import org.onap.vid.domain.mso.RequestStatus;
-//import com.fasterxml.jackson.annotation.JsonAnyGetter;
-//import com.fasterxml.jackson.annotation.JsonAnySetter;
-//import com.fasterxml.jackson.annotation.JsonCreator;
-//import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-//import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-//import com.fasterxml.jackson.annotation.JsonValue;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
 
 /**
- * request structure.
+ * Represent response for: GET orchestrationRequests
  */
 @JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class AsyncRequestStatus  {
 
-public class AsyncRequestStatus extends org.onap.vid.domain.mso.AsyncRequestStatus {
-
-    
-    /** The instance ids. */
-    private InstanceIds instanceIds;
-   
-    /** The request status. */
-    private RequestStatus requestStatus;
+    public Request request;
 
-    /* (non-Javadoc)
-     * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#getInstanceIds()
-     */
-    public InstanceIds getInstanceIds() {
-        return instanceIds;
+    public AsyncRequestStatus(Request request) {
+        this.request = request;
     }
 
-    /**
-     * Sets the instance ids.
-     *
-     * @param instanceIds the new instance ids
-     */
-    public void setInstanceIds(InstanceIds instanceIds) {
-        this.instanceIds = instanceIds;
-    }
+    public AsyncRequestStatus() {
 
-    
-    /**
-     * (Required).
-     *
-     * @return     The requestStatus
-     */
-    @JsonProperty("requestStatus")
-    public RequestStatus getRequestStatus() {
-        return requestStatus;
     }
 
-    /**
-     * (Required).
-     *
-     * @param requestStatus     The requestStatus
-     */
-    @JsonProperty("requestStatus")
-    public void setRequestStatus(RequestStatus requestStatus) {
-        this.requestStatus = requestStatus;
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class Request {
+
+        public Request(RequestStatus requestStatus) {
+            this.requestStatus = requestStatus;
+        }
+
+        public Request() {
+        }
+
+        public String requestId;
+        public String requestScope;
+        public String requestType;
+
+        /**
+         * The instance ids.
+         */
+        public InstanceReferences instanceReferences;
+
+
+        /**
+         * The request details.
+         */
+        public RequestDetails requestDetails;
+
+        /**
+         * The request status.
+         */
+        public RequestStatus requestStatus;
+
+        /**
+         * The time of start.
+         */
+        public String startTime;
+
     }
-    
-    /* (non-Javadoc)
-     * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#toString()
-     */
-    @Override
-    public String toString() {
-        return ToStringBuilder.reflectionToString(this);
+
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class InstanceReferences {
+
+        public String serviceInstanceId;
     }
 
-    /* (non-Javadoc)
-     * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(getCorrelator()).append(getFinishTime()).append(instanceIds).append(getRequestId()).append(getRequestScope()).append(getRequestStatus()).append(getRequestType()).append(getStartTime()).append(getAdditionalProperties()).toHashCode();
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class RequestDetails {
+
+        public RequestInfo requestInfo;
     }
 
-    /* (non-Javadoc)
-     * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof AsyncRequestStatus) == false) {
-            return false;
-        }
-        AsyncRequestStatus rhs = ((AsyncRequestStatus) other);
-        return new EqualsBuilder().append(getCorrelator(), rhs.getCorrelator()).append(getFinishTime(), rhs.getFinishTime()).append(instanceIds, rhs.instanceIds).append(getRequestId(), rhs.getRequestId()).append(getRequestScope(), rhs.getRequestScope()).append(getRequestStatus(), rhs.getRequestStatus()).append(getRequestType(), rhs.getRequestType()).append(getStartTime(), rhs.getStartTime()).append(getAdditionalProperties(), rhs.getAdditionalProperties()).isEquals();
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class RequestInfo {
+
+        public String instanceName;
     }
+
+
+
 }