2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright 2019 TechMahindra
\r
6 *=================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
20 package org.onap.dcaegen2.ves.domain.ves70;
\r
22 import java.util.ArrayList;
\r
23 import java.util.List;
\r
24 import com.fasterxml.jackson.annotation.JsonInclude;
\r
25 import com.fasterxml.jackson.annotation.JsonProperty;
\r
26 import com.fasterxml.jackson.annotation.JsonPropertyDescription;
\r
27 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
\r
28 import org.apache.commons.lang.builder.EqualsBuilder;
\r
29 import org.apache.commons.lang.builder.HashCodeBuilder;
\r
30 import org.apache.commons.lang.builder.ToStringBuilder;
\r
34 * meta-information about an instance of a jsonObject along with the actual object instance
\r
37 @JsonInclude(JsonInclude.Include.NON_NULL)
\r
38 @JsonPropertyOrder({
\r
41 "objectInstanceEpochMicrosec",
\r
44 public class ObjectInstance {
\r
47 * json object schema, name and other meta-information along with one or more object instances
\r
50 @JsonProperty("jsonObject")
\r
51 @JsonPropertyDescription("json object schema, name and other meta-information along with one or more object instances")
\r
52 private AdditionalObject jsonObject;
\r
54 * an instance conforming to the jsonObject objectSchema
\r
57 @JsonProperty("objectInstance")
\r
58 @JsonPropertyDescription("an instance conforming to the jsonObject objectSchema")
\r
59 private ObjectInstance objectInstance;
\r
61 * the unix time aka epoch time associated with this objectInstance--as microseconds elapsed since 1 Jan 1970 not including leap seconds
\r
64 @JsonProperty("objectInstanceEpochMicrosec")
\r
65 @JsonPropertyDescription("the unix time aka epoch time associated with this objectInstance--as microseconds elapsed since 1 Jan 1970 not including leap seconds")
\r
66 private Double objectInstanceEpochMicrosec;
\r
68 * an ordered set of keys that identifies this particular instance of jsonObject
\r
71 @JsonProperty("objectKeys")
\r
72 @JsonPropertyDescription("an ordered set of keys that identifies this particular instance of jsonObject")
\r
73 private List<ObjectKey> objectKeys = new ArrayList<ObjectKey>();
\r
76 * json object schema, name and other meta-information along with one or more object instances
\r
79 @JsonProperty("jsonObject")
\r
80 public AdditionalObject getJsonObject() {
\r
85 * json object schema, name and other meta-information along with one or more object instances
\r
88 @JsonProperty("jsonObject")
\r
89 public void setJsonObject(AdditionalObject jsonObject) {
\r
90 this.jsonObject = jsonObject;
\r
94 * an instance conforming to the jsonObject objectSchema
\r
97 @JsonProperty("objectInstance")
\r
98 public ObjectInstance getObjectInstance() {
\r
99 return objectInstance;
\r
103 * an instance conforming to the jsonObject objectSchema
\r
106 @JsonProperty("objectInstance")
\r
107 public void setObjectInstance(ObjectInstance objectInstance) {
\r
108 this.objectInstance = objectInstance;
\r
112 * the unix time aka epoch time associated with this objectInstance--as microseconds elapsed since 1 Jan 1970 not including leap seconds
\r
115 @JsonProperty("objectInstanceEpochMicrosec")
\r
116 public Double getObjectInstanceEpochMicrosec() {
\r
117 return objectInstanceEpochMicrosec;
\r
121 * the unix time aka epoch time associated with this objectInstance--as microseconds elapsed since 1 Jan 1970 not including leap seconds
\r
124 @JsonProperty("objectInstanceEpochMicrosec")
\r
125 public void setObjectInstanceEpochMicrosec(Double objectInstanceEpochMicrosec) {
\r
126 this.objectInstanceEpochMicrosec = objectInstanceEpochMicrosec;
\r
130 * an ordered set of keys that identifies this particular instance of jsonObject
\r
133 @JsonProperty("objectKeys")
\r
134 public List<ObjectKey> getObjectKeys() {
\r
139 * an ordered set of keys that identifies this particular instance of jsonObject
\r
142 @JsonProperty("objectKeys")
\r
143 public void setObjectKeys(List<ObjectKey> objectKeys) {
\r
144 this.objectKeys = objectKeys;
\r
148 public String toString() {
\r
149 return ToStringBuilder.reflectionToString(this);
\r
153 public int hashCode() {
\r
154 return new HashCodeBuilder().append(jsonObject).append(objectInstance).append(objectInstanceEpochMicrosec).append(objectKeys).toHashCode();
\r
158 public boolean equals(Object other) {
\r
159 if (other == this) {
\r
162 if ((other instanceof ObjectInstance) == false) {
\r
165 ObjectInstance rhs = ((ObjectInstance) other);
\r
166 return new EqualsBuilder().append(jsonObject, rhs.jsonObject).append(objectInstance, rhs.objectInstance).append(objectInstanceEpochMicrosec, rhs.objectInstanceEpochMicrosec).append(objectKeys, rhs.objectKeys).isEquals();
\r