ebb968acbfdeda410e1508e56fb8880cd6d18ee2
[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
25 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
26 import com.fasterxml.jackson.annotation.JsonProperty;
27
28 @JsonIgnoreProperties(ignoreUnknown = true)
29 //@JsonRootName("token")
30 // The Token object is returned without a root element
31 public class Token implements Serializable {
32
33         private static final long serialVersionUID = 1L;
34
35         @JsonProperty("role")
36     private String role;
37
38     @JsonProperty("value")
39     private String value;
40     
41     //  Any expiration?  Maybe something in the Headers?
42     
43         public String getRole() {
44                 return role;
45         }
46
47         public void setRole(String role) {
48                 this.role = role;
49         }
50
51         public String getValue() {
52                 return value;
53         }
54
55         public void setValue(String value) {
56                 this.value = value;
57         }
58
59
60         @Override
61     public String toString() {
62         return "Token{" +
63                 "role='" + role + '\'' +
64                 ", value='" + value + '\'' +
65                 '}';
66     }
67 }