16 package org.openkilda.messaging.command.switches;
18 import static com.google.common.base.MoreObjects.toStringHelper;
25 import com.fasterxml.jackson.annotation.JsonCreator;
26 import com.fasterxml.jackson.annotation.JsonInclude;
27 import com.fasterxml.jackson.annotation.JsonProperty;
29 import java.util.Objects;
31 @JsonInclude(JsonInclude.Include.NON_NULL)
34 @JsonProperty(
"switch_id")
37 @JsonProperty(
"install_rules")
48 @JsonProperty(
"switch_id")
SwitchId switchId,
51 this.switchId = Objects.requireNonNull(switchId,
"switch_id must not be null");
53 throw new IllegalArgumentException(
"switch_id has invalid value");
56 this.installRulesAction = Objects.requireNonNull(installRulesAction);
64 return installRulesAction;
69 return toStringHelper(
this)
70 .add(TIMESTAMP, timestamp)
71 .add(
"switch_id", switchId)
72 .add(
"install_rules", installRulesAction)
static boolean validateSwitchId(SwitchId switchId)
SwitchRulesInstallRequest( @JsonProperty("switch_id") SwitchId switchId, @JsonProperty("install_rules") InstallRulesAction installRulesAction)
InstallRulesAction getInstallRulesAction()
static final String TIMESTAMP