Skip to content

Commit d29f467

Browse files
committed
response: add command response for login and logout command classes
Signed-off-by: Rohit Yadav <[email protected]>
1 parent bd2898e commit d29f467

3 files changed

Lines changed: 214 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package org.apache.cloudstack.api.response;
18+
19+
import org.apache.cloudstack.api.BaseResponse;
20+
21+
public class AuthenticationCmdResponse extends BaseResponse {
22+
}
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package org.apache.cloudstack.api.response;
18+
19+
import com.cloud.serializer.Param;
20+
import com.google.gson.annotations.SerializedName;
21+
import org.apache.cloudstack.api.ApiConstants;
22+
23+
public class LoginCmdResponse extends AuthenticationCmdResponse {
24+
25+
@SerializedName(value = ApiConstants.USERNAME)
26+
@Param(description = "Username")
27+
private String username;
28+
29+
@SerializedName(value = ApiConstants.USER_ID)
30+
@Param(description = "User ID")
31+
private String userId;
32+
33+
@SerializedName(value = ApiConstants.DOMAIN_ID)
34+
@Param(description = "Domain ID that the user belongs to")
35+
private String domainId;
36+
37+
@SerializedName(value = ApiConstants.TIMEOUT)
38+
@Param(description = "the time period before the session has expired")
39+
private Integer timeout;
40+
41+
@SerializedName(value = ApiConstants.ACCOUNT)
42+
@Param(description = "the account name the user belongs to")
43+
private String account;
44+
45+
@SerializedName(value = ApiConstants.FIRSTNAME)
46+
@Param(description = "first name of the user")
47+
private String firstName;
48+
49+
@SerializedName(value = ApiConstants.LASTNAME)
50+
@Param(description = "last name of the user")
51+
private String lastName;
52+
53+
@SerializedName(value = ApiConstants.TYPE)
54+
@Param(description = "the account type (admin, domain-admin, read-only-admin, user)")
55+
private String type;
56+
57+
@SerializedName(value = ApiConstants.TIMEZONE)
58+
@Param(description = "user time zone")
59+
private String timeZone;
60+
61+
@SerializedName(value = ApiConstants.REGISTERED)
62+
@Param(description = "Is user registered")
63+
private String registered;
64+
65+
@SerializedName(value = ApiConstants.SESSIONKEY)
66+
@Param(description = "Session key that can be passed in subsequent Query command calls")
67+
private String sessionKey;
68+
69+
public String getUsername() {
70+
return username;
71+
}
72+
73+
public void setUsername(String username) {
74+
this.username = username;
75+
}
76+
77+
public String getUserId() {
78+
return userId;
79+
}
80+
81+
public void setUserId(String userId) {
82+
this.userId = userId;
83+
}
84+
85+
public String getDomainId() {
86+
return domainId;
87+
}
88+
89+
public void setDomainId(String domainId) {
90+
this.domainId = domainId;
91+
}
92+
93+
public Integer getTimeout() {
94+
return timeout;
95+
}
96+
97+
public void setTimeout(Integer timeout) {
98+
this.timeout = timeout;
99+
}
100+
101+
public String getAccount() {
102+
return account;
103+
}
104+
105+
public void setAccount(String account) {
106+
this.account = account;
107+
}
108+
109+
public String getFirstName() {
110+
return firstName;
111+
}
112+
113+
public void setFirstName(String firstName) {
114+
this.firstName = firstName;
115+
}
116+
117+
public String getLastName() {
118+
return lastName;
119+
}
120+
121+
public void setLastName(String lastName) {
122+
this.lastName = lastName;
123+
}
124+
125+
public String getType() {
126+
return type;
127+
}
128+
129+
public void setType(String type) {
130+
this.type = type;
131+
}
132+
133+
public String getTimeZone() {
134+
return timeZone;
135+
}
136+
137+
public void setTimeZone(String timeZone) {
138+
this.timeZone = timeZone;
139+
}
140+
141+
public String getRegistered() {
142+
return registered;
143+
}
144+
145+
public void setRegistered(String registered) {
146+
this.registered = registered;
147+
}
148+
149+
public String getSessionKey() {
150+
return sessionKey;
151+
}
152+
153+
public void setSessionKey(String sessionKey) {
154+
this.sessionKey = sessionKey;
155+
}
156+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package org.apache.cloudstack.api.response;
18+
19+
import com.cloud.serializer.Param;
20+
import com.google.gson.annotations.SerializedName;
21+
import org.apache.cloudstack.api.ApiConstants;
22+
23+
@SuppressWarnings("unused")
24+
public class LogoutCmdResponse extends AuthenticationCmdResponse {
25+
@SerializedName(value = ApiConstants.DESCRIPTION)
26+
@Param(description = "Response description")
27+
private String description;
28+
29+
public String getDescription() {
30+
return this.description;
31+
}
32+
33+
public void setDescription(String description) {
34+
this.description = description;
35+
}
36+
}

0 commit comments

Comments
 (0)