Aharoni, Pavel (pa0916) | ca3cb01 | 2018-10-22 15:29:57 +0300 | [diff] [blame] | 1 | /*-
|
| 2 | * ============LICENSE_START=======================================================
|
| 3 | * OSAM
|
| 4 | * ================================================================================
|
| 5 | * Copyright (C) 2018 AT&T
|
| 6 | * ================================================================================
|
| 7 | * Licensed under the Apache License, Version 2.0 (the "License");
|
| 8 | * you may not use this file except in compliance with the License.
|
| 9 | * You may obtain a copy of the License at
|
| 10 | *
|
| 11 | * http://www.apache.org/licenses/LICENSE-2.0
|
| 12 | *
|
| 13 | * Unless required by applicable law or agreed to in writing, software
|
| 14 | * distributed under the License is distributed on an "AS IS" BASIS,
|
| 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 16 | * See the License for the specific language governing permissions and
|
| 17 | * limitations under the License.
|
| 18 | * ============LICENSE_END=========================================================
|
| 19 | */
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 | package org.onap.osam.mso.rest;
|
| 24 |
|
| 25 | //import java.util.HashMap;
|
| 26 | //import java.util.Map;
|
| 27 | //import javax.annotation.Generated;
|
| 28 |
|
| 29 | import org.apache.commons.lang3.builder.HashCodeBuilder;
|
| 30 | import org.onap.osam.domain.mso.InstanceIds;
|
| 31 | import org.onap.osam.domain.mso.RequestStatus;
|
| 32 | //import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
| 33 | //import com.fasterxml.jackson.annotation.JsonAnySetter;
|
| 34 | //import com.fasterxml.jackson.annotation.JsonCreator;
|
| 35 | //import com.fasterxml.jackson.annotation.JsonIgnore;
|
| 36 | //import com.fasterxml.jackson.annotation.JsonInclude;
|
| 37 | import com.fasterxml.jackson.annotation.JsonProperty;
|
| 38 | //import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
| 39 | //import com.fasterxml.jackson.annotation.JsonValue;
|
| 40 | import org.apache.commons.lang.builder.EqualsBuilder;
|
| 41 | //import org.apache.commons.lang.builder.HashCodeBuilder;
|
| 42 | import org.apache.commons.lang.builder.ToStringBuilder;
|
| 43 |
|
| 44 |
|
| 45 | public class Request extends org.onap.osam.domain.mso.Request {
|
| 46 |
|
| 47 |
|
| 48 | private InstanceIds instanceIds;
|
| 49 |
|
| 50 | /** The request details. */
|
| 51 | private RequestDetails requestDetails;
|
| 52 |
|
| 53 | /** The request status. */
|
| 54 | private RequestStatus requestStatus;
|
| 55 |
|
| 56 |
|
| 57 | /* (non-Javadoc)
|
| 58 | * @see org.onap.vid.domain.mso.Request#getInstanceIds()
|
| 59 | */
|
| 60 | @JsonProperty("instanceIds")
|
| 61 | public InstanceIds getInstanceIds() {
|
| 62 | return instanceIds;
|
| 63 | }
|
| 64 |
|
| 65 | /**
|
| 66 | * Sets the instance ids.
|
| 67 | *
|
| 68 | * @param instanceIds The instanceIds
|
| 69 | */
|
| 70 | @JsonProperty("instanceIds")
|
| 71 | public void setInstanceIds(InstanceIds instanceIds) {
|
| 72 | this.instanceIds = instanceIds;
|
| 73 | }
|
| 74 |
|
| 75 | /**
|
| 76 | * (Required).
|
| 77 | *
|
| 78 | * @return The requestDetails
|
| 79 | */
|
| 80 | @JsonProperty("requestDetails")
|
| 81 | public RequestDetails getRequestDetails() {
|
| 82 | return requestDetails;
|
| 83 | }
|
| 84 |
|
| 85 | /**
|
| 86 | * (Required).
|
| 87 | *
|
| 88 | * @param requestDetails The requestDetails
|
| 89 | */
|
| 90 | @JsonProperty("requestDetails")
|
| 91 | public void setRequestDetails(RequestDetails requestDetails) {
|
| 92 | this.requestDetails = requestDetails;
|
| 93 | }
|
| 94 |
|
| 95 |
|
| 96 | /**
|
| 97 | * Gets the request status.
|
| 98 | *
|
| 99 | * @return The requestStatus
|
| 100 | */
|
| 101 | @JsonProperty("requestStatus")
|
| 102 | public RequestStatus getRequestStatus() {
|
| 103 | return requestStatus;
|
| 104 | }
|
| 105 |
|
| 106 | /**
|
| 107 | * Sets the request status.
|
| 108 | *
|
| 109 | * @param requestStatus The requestStatus
|
| 110 | */
|
| 111 | @JsonProperty("requestStatus")
|
| 112 | public void setRequestStatus(RequestStatus requestStatus) {
|
| 113 | this.requestStatus = requestStatus;
|
| 114 | }
|
| 115 |
|
| 116 |
|
| 117 | /* (non-Javadoc)
|
| 118 | * @see org.onap.vid.domain.mso.Request#toString()
|
| 119 | */
|
| 120 | @Override
|
| 121 | public String toString() {
|
| 122 | return ToStringBuilder.reflectionToString(this);
|
| 123 | }
|
| 124 |
|
| 125 | /* (non-Javadoc)
|
| 126 | * @see org.onap.vid.domain.mso.Request#equals(java.lang.Object)
|
| 127 | */
|
| 128 | @Override
|
| 129 | public boolean equals(Object other) {
|
| 130 | if (other == this) {
|
| 131 | return true;
|
| 132 | }
|
| 133 | if ((other instanceof Request) == false) {
|
| 134 | return false;
|
| 135 | }
|
| 136 | Request rhs = ((Request) other);
|
| 137 | return new EqualsBuilder().append(getFinishTime(), rhs.getFinishTime()).append(getInstanceIds(), rhs.getInstanceIds()).append(getRequestDetails(), rhs.getRequestDetails()).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();
|
| 138 | }
|
| 139 |
|
| 140 | @Override
|
| 141 | public int hashCode() {
|
| 142 | return new HashCodeBuilder(17, 37).append(getFinishTime()).append(getInstanceIds()).append(getRequestDetails()).append(getRequestId()).append(getRequestScope()).append(getRequestStatus()).append(getRequestType()).append(getStartTime()).append(getAdditionalProperties()).toHashCode();
|
| 143 | }
|
| 144 | }
|