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