Automation adds INFO.yaml
[oom/platform/cert-service.git] / certServiceClient / src / main / java / org / onap / aaf / certservice / client / configuration / model / CsrConfiguration.java
1 /*
2  * ============LICENSE_START=======================================================
3  * aaf-certservice-client
4  * ================================================================================
5  * Copyright (C) 2020 Nokia. 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.aaf.certservice.client.configuration.model;
22
23
24 import org.onap.aaf.certservice.client.configuration.CsrConfigurationEnvs;
25
26 public class CsrConfiguration implements ConfigurationModel {
27
28     private String commonName;
29     private String organization;
30     private String state;
31     private String country;
32     private String organizationUnit;
33     private String location;
34     private String sans;
35
36
37     public String getCommonName() {
38         return commonName;
39     }
40
41     public CsrConfiguration setCommonName(String commonName) {
42         this.commonName = commonName;
43         return this;
44     }
45
46     public String getOrganization() {
47         return organization;
48     }
49
50     public CsrConfiguration setOrganization(String organization) {
51         this.organization = organization;
52         return this;
53     }
54
55     public String getState() {
56         return state;
57     }
58
59     public CsrConfiguration setState(String state) {
60         this.state = state;
61         return this;
62     }
63
64     public String getCountry() {
65         return country;
66     }
67
68     public CsrConfiguration setCountry(String country) {
69         this.country = country;
70         return this;
71     }
72
73     public String getOrganizationUnit() {
74         return organizationUnit;
75     }
76
77     public CsrConfiguration setOrganizationUnit(String organizationUnit) {
78         this.organizationUnit = organizationUnit;
79         return this;
80     }
81
82     public String getLocation() {
83         return location;
84     }
85
86     public CsrConfiguration setLocation(String location) {
87         this.location = location;
88         return this;
89     }
90
91     public String getSans() {
92         return sans;
93     }
94
95     public CsrConfiguration setSubjectAlternativeNames(String subjectAlternativeNames) {
96         this.sans = subjectAlternativeNames;
97         return this;
98     }
99
100     @Override
101     public String toString() {
102         return String.format("%s: %s, %s: %s, %s: %s, %s: %s, %s: %s, %s: %s, %s: %s",
103                 CsrConfigurationEnvs.COMMON_NAME, commonName,
104                 CsrConfigurationEnvs.COUNTRY, country,
105                 CsrConfigurationEnvs.STATE, state,
106                 CsrConfigurationEnvs.ORGANIZATION, organization,
107                 CsrConfigurationEnvs.ORGANIZATION_UNIT, organizationUnit,
108                 CsrConfigurationEnvs.LOCATION, location,
109                 CsrConfigurationEnvs.SANS, sans);
110     }
111 }