9f8f97960429be41960efd42a8575351a7641fd7
[oom/platform/cert-service.git] /
1 /*
2  * ============LICENSE_START=======================================================
3  * PROJECT
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.certification.configuration.model;
22
23 import org.bouncycastle.asn1.x500.X500Name;
24 import org.hibernate.validator.constraints.Length;
25 import org.onap.aaf.certservice.certification.configuration.validation.constraints.Cmpv2URL;
26
27 import javax.validation.Valid;
28
29 public class Cmpv2Server {
30
31     @Valid
32     private Authentication authentication;
33     private CaMode caMode;
34     @Length(min = 1, max = 128)
35     private String caName;
36     private X500Name issuerDN;
37     @Cmpv2URL
38     private String url;
39
40     public Authentication getAuthentication() {
41         return authentication;
42     }
43
44     public void setAuthentication(Authentication authentication) {
45         this.authentication = authentication;
46     }
47
48     public CaMode getCaMode() {
49         return caMode;
50     }
51
52     public void setCaMode(CaMode caMode) {
53         this.caMode = caMode;
54     }
55
56     public String getCaName() {
57         return caName;
58     }
59
60     public void setCaName(String caName) {
61         this.caName = caName;
62     }
63
64     public X500Name getIssuerDN() {
65         return issuerDN;
66     }
67
68     public void setIssuerDN(X500Name issuerDN) {
69         this.issuerDN = issuerDN;
70     }
71
72     public String getUrl() {
73         return url;
74     }
75
76     public void setUrl(String url) {
77         this.url = url;
78     }
79
80     @Override
81     public String toString() {
82         return "Cmpv2Server{" +
83                 "authentication=" + authentication +
84                 ", caMode=" + caMode +
85                 ", caName='" + caName + '\'' +
86                 ", issuerDN='" + issuerDN + '\'' +
87                 ", url='" + url + '\'' +
88                 '}';
89     }
90
91 }