1ef9e2fdd386f799827fea81a1ff9512a7f5be07
[policy/clamp.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2021 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.policy.clamp.controlloop.participant.dcae.main.parameters;
22
23 import javax.validation.Valid;
24 import javax.validation.constraints.Min;
25 import javax.validation.constraints.NotBlank;
26 import javax.validation.constraints.NotNull;
27 import lombok.Getter;
28 import lombok.Setter;
29 import org.onap.policy.clamp.controlloop.participant.intermediary.parameters.ParticipantIntermediaryParameters;
30 import org.onap.policy.clamp.controlloop.participant.intermediary.parameters.ParticipantParameters;
31 import org.onap.policy.common.endpoints.parameters.RestClientParameters;
32 import org.onap.policy.common.parameters.validation.ParameterGroupConstraint;
33 import org.springframework.boot.context.properties.ConfigurationProperties;
34 import org.springframework.validation.annotation.Validated;
35
36 /**
37  * Class to hold all parameters needed for the participant dcae.
38  *
39  */
40 @Validated
41 @Getter
42 @Setter
43 @ConfigurationProperties(prefix = "participant")
44 public class ParticipantDcaeParameters  implements ParticipantParameters {
45
46     @NotNull
47     @Min(10)
48     private int checkCount = 10;
49
50     @NotNull
51     @Min(1)
52     private int secCount = 10;
53
54     @NotBlank
55     private String jsonBodyConsulPath;
56
57     @NotNull
58     @Valid
59     private ClampEndPoints clampClientEndPoints;
60
61     @NotNull
62     @Valid
63     private ConsulEndPoints consulClientEndPoints;
64
65     @NotNull
66     @ParameterGroupConstraint
67     private RestClientParameters clampClientParameters;
68
69     @NotNull
70     @ParameterGroupConstraint
71     private RestClientParameters consulClientParameters;
72
73     @NotNull
74     @Valid
75     private ParticipantIntermediaryParameters intermediaryParameters;
76 }