Merge "Reorder modifiers"
[so.git] / adapters / mso-adapter-utils / src / main / java / org / openecomp / mso / cloud / authentication / models / RackspaceAuthentication.java
1 /*
2  * ============LICENSE_START==========================================
3  * ===================================================================
4  * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
5  * ===================================================================
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *        http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  * ============LICENSE_END============================================
18  *
19  * ECOMP and OpenECOMP are trademarks
20  * and service marks of AT&T Intellectual Property.
21  *
22  */
23
24 package org.openecomp.mso.cloud.authentication.models;
25
26 import com.fasterxml.jackson.annotation.JsonIgnore;
27 import com.fasterxml.jackson.annotation.JsonProperty;
28 import com.fasterxml.jackson.annotation.JsonRootName;
29 import com.woorea.openstack.keystone.model.Authentication;
30
31 @JsonRootName("auth")
32 public class RackspaceAuthentication extends Authentication {
33                 
34         private static final long serialVersionUID = 5451283386875662918L;
35
36         public static final class Token {
37                 
38                 private String username;
39                 private String apiKey;
40
41                 /**
42                  * @return the username
43                  */
44                 public String getUsername() {
45                         return username;
46                 }
47                 /**
48                  * @param username the username to set
49                  */
50                 public void setUsername(String username) {
51                         this.username = username;
52                 }
53                 /**
54                  * @return the apiKey
55                  */
56                 public String getApiKey() {
57                         return apiKey;
58                 }
59                 /**
60                  * @param apiKey the apiKey to set
61                  */
62                 public void setApiKey(String apiKey) {
63                         this.apiKey = apiKey;
64                 }
65         }
66         
67         @JsonProperty("RAX-KSKEY:apiKeyCredentials")
68         private Token token = new Token();
69         
70         public RackspaceAuthentication (String username, String apiKey) {
71                 this.token.username = username;
72                 this.token.apiKey = apiKey;
73         
74         }
75
76         /**
77          * @return the token
78          */
79         public Token getToken() {
80                 return token;
81         }
82
83         /**
84          * @param token the token to set
85          */
86         public void setToken(Token token) {
87                 this.token = token;
88         }
89         
90 }