2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Samsung Electronics Co., Ltd. All rights reserved.
6 * Modifications Copyright (C) 2019 Nordix Foundation.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.onap.policy.controlloop.policy;
26 public class PolicyParam {
29 private String description;
31 private Map<String, String> payload;
32 private Target target;
33 private String recipe;
34 private Integer retries;
35 private Integer timeout;
37 public static PolicyParamBuilder builder() {
38 return new PolicyParamBuilder();
41 public String getId() {
45 public String getName() {
49 public String getDescription() {
53 public String getActor() {
57 public Map<String, String> getPayload() {
61 public Target getTarget() {
65 public String getRecipe() {
69 public Integer getRetries() {
73 public Integer getTimeout() {
77 public static class PolicyParamBuilder {
79 PolicyParam policyParm = new PolicyParam();
81 private PolicyParamBuilder() {
84 public PolicyParam build() {
88 public PolicyParamBuilder id(String id) {
93 public PolicyParamBuilder name(String name) {
94 policyParm.name = name;
98 public PolicyParamBuilder description(String description) {
99 policyParm.description = description;
103 public PolicyParamBuilder actor(String actor) {
104 policyParm.actor = actor;
108 public PolicyParamBuilder payload(Map<String, String> payload) {
109 policyParm.payload = payload;
113 public PolicyParamBuilder target(Target target) {
114 policyParm.target = target;
118 public PolicyParamBuilder recipe(String recipe) {
119 policyParm.recipe = recipe;
123 public PolicyParamBuilder retries(Integer retries) {
124 policyParm.retries = retries;
128 public PolicyParamBuilder timeout(Integer timeout) {
129 policyParm.timeout = timeout;