Refactor SOL003 Adapter to organize its modules
[so.git] / adapters / etsi-sol003-adapter / etsi-sol003-lcm / etsi-sol003-lcm-adapter / src / main / java / org / onap / so / adapters / etsi / sol003 / adapter / lcm / extclients / vim / model / VimCredentials.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2019 Nordix Foundation.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * 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, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.so.adapters.etsi.sol003.adapter.lcm.extclients.vim.model;
22
23 import java.util.Objects;
24
25 public class VimCredentials {
26
27     protected String username;
28
29     protected String password;
30
31     public String getUsername() {
32         return username;
33     }
34
35     public void setUsername(final String value) {
36         username = value;
37     }
38
39     public String getPassword() {
40         return password;
41     }
42
43     public void setPassword(final String password) {
44         this.password = password;
45     }
46
47     @Override
48     public boolean equals(final java.lang.Object o) {
49         if (this == o) {
50             return true;
51         }
52         if (o == null || getClass() != o.getClass()) {
53             return false;
54         }
55         final VimCredentials vimCredentials = (VimCredentials) o;
56         return Objects.equals(this.username, vimCredentials.username)
57                 && Objects.equals(this.password, vimCredentials.password);
58     }
59
60     @Override
61     public int hashCode() {
62         return Objects.hash(username, password);
63     }
64
65     @Override
66     public String toString() {
67         final StringBuilder sb = new StringBuilder();
68         sb.append("class AccessInfo {\n");
69
70         sb.append("    username: ").append(toIndentedString(username)).append("\n");
71         sb.append("    password: ").append(toIndentedString(password)).append("\n");
72         sb.append("}");
73         return sb.toString();
74     }
75
76     /**
77      * Convert the given object to string with each line indented by 4 spaces (except the first line).
78      */
79     private String toIndentedString(final java.lang.Object o) {
80         if (o == null) {
81             return "null";
82         }
83         return o.toString().replace("\n", "\n    ");
84     }
85 }