16 package org.openkilda.messaging.command.switches;
22 import com.fasterxml.jackson.annotation.JsonCreator;
23 import com.fasterxml.jackson.annotation.JsonInclude;
24 import com.fasterxml.jackson.annotation.JsonProperty;
27 import java.util.Objects;
30 @JsonInclude(JsonInclude.Include.NON_NULL)
33 @JsonProperty(
"switch_id")
36 @JsonProperty(
"delete_rules")
42 @JsonProperty(
"criteria")
54 @JsonProperty(
"switch_id")
SwitchId switchId,
58 this.switchId = Objects.requireNonNull(switchId,
"switch_id must not be null");
60 throw new IllegalArgumentException(
"switch_id has invalid value");
63 this.deleteRulesAction = deleteRulesAction;
65 this.criteria = deleteRulesAction == null ? Objects.requireNonNull(criteria) : criteria;
static boolean validateSwitchId(SwitchId switchId)
SwitchRulesDeleteRequest( @JsonProperty("switch_id") SwitchId switchId, @JsonProperty("delete_rules") DeleteRulesAction deleteRulesAction, @JsonProperty("criteria") DeleteRulesCriteria criteria)