2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Samsung Electronics Co., Ltd. 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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.policy.controlloop.policy;
25 public class PolicyParam {
28 private String description;
30 private Map<String, String> payload;
31 private Target target;
32 private String recipe;
33 private Integer retries;
34 private Integer timeout;
36 public static PolicyParamBuilder builder() {
37 return new PolicyParamBuilder();
40 public String getId() {
44 public String getName() {
48 public String getDescription() {
52 public String getActor() {
56 public Map<String, String> getPayload() {
60 public Target getTarget() {
64 public String getRecipe() {
68 public Integer getRetries() {
72 public Integer getTimeout() {
76 public static class PolicyParamBuilder {
78 PolicyParam policyParm = new PolicyParam();
80 private PolicyParamBuilder() {
83 public PolicyParam build() {
87 public PolicyParamBuilder id(String id) {
92 public PolicyParamBuilder name(String name) {
93 policyParm.name = name;
97 public PolicyParamBuilder description(String description) {
98 policyParm.description = description;
102 public PolicyParamBuilder actor(String actor) {
103 policyParm.actor = actor;
107 public PolicyParamBuilder payload(Map<String, String> payload) {
108 policyParm.payload = payload;
112 public PolicyParamBuilder target(Target target) {
113 policyParm.target = target;
117 public PolicyParamBuilder recipe(String recipe) {
118 policyParm.recipe = recipe;
122 public PolicyParamBuilder retries(Integer retries) {
123 policyParm.retries = retries;
127 public PolicyParamBuilder timeout(Integer timeout) {
128 policyParm.timeout = timeout;