ec22592c9545dcfe3b4ba388efedcaa7a0859380
[msb/apigateway.git] /
1 /*******************************************************************************
2  * Copyright 2016-2017 ZTE, Inc. and others.
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  * 
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  * 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  ******************************************************************************/
16 package org.onap.msb.apiroute.wrapper.dao.service.bean;
17
18 import com.fasterxml.jackson.annotation.JsonFormat;
19 import lombok.AllArgsConstructor;
20 import lombok.Getter;
21 import lombok.NoArgsConstructor;
22 import lombok.Setter;
23
24 import java.util.Date;
25 import java.util.HashMap;
26 import java.util.Map;
27
28 @AllArgsConstructor
29 @NoArgsConstructor
30 @Getter @Setter
31 public class Metadata {
32     private String name;
33     private String namespace;
34     private String uid = "";
35     //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
36     //private Date creationTimestamp;
37    // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
38     @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssXXX")
39     private Date updateTimestamp;
40     private Map labels = new HashMap();
41     //private String[] annotations = new String[]{};
42     private String[] annotations = null;
43
44     /*
45     @Override
46     public boolean equals(Object o) {
47         if (this == o) return true;
48         if (o == null || getClass() != o.getClass()) return false;
49         Metadata metadata = (Metadata) o;
50         return Objects.equals(name, metadata.name) &&
51                 Objects.equals(namespace, metadata.namespace) &&
52                 Objects.equals(uid, metadata.uid) &&
53                 //Objects.equals(creationTimestamp, metadata.creationTimestamp) &&
54                 Objects.equals(updateTimestamp, metadata.updateTimestamp) &&
55                 Objects.equals(labels, metadata.labels) &&
56                 Objects.equals(annotations, metadata.annotations);
57     }
58
59     @Override
60     public int hashCode() {
61         //return Objects.hash(name, namespace, uid, creationTimestamp, updateTimestamp, labels, annotations);
62         return Objects.hash(name, namespace, uid, updateTimestamp, labels, annotations);
63     }
64     */
65 }