c5809d4a32609bed9ed9d78ca6ca83645092397e
[so.git] / cloudify-client / src / main / java / org / onap / so / cloudify / v3 / model / Token.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
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 package org.onap.so.cloudify.v3.model;
22
23 import java.io.Serializable;
24 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
25 import com.fasterxml.jackson.annotation.JsonProperty;
26
27 @JsonIgnoreProperties(ignoreUnknown = true)
28 // @JsonRootName("token")
29 // The Token object is returned without a root element
30 public class Token implements Serializable {
31
32     private static final long serialVersionUID = 1L;
33
34     @JsonProperty("role")
35     private String role;
36
37     @JsonProperty("value")
38     private String value;
39
40     // Any expiration? Maybe something in the Headers?
41
42     public String getRole() {
43         return role;
44     }
45
46     public void setRole(String role) {
47         this.role = role;
48     }
49
50     public String getValue() {
51         return value;
52     }
53
54     public void setValue(String value) {
55         this.value = value;
56     }
57
58
59     @Override
60     public String toString() {
61         return "Token{" + "role='" + role + '\'' + ", value='" + value + '\'' + '}';
62     }
63 }