All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.cdklabs.cdk.codepipeline.extensions.ChangeControllerEvent Maven / Gradle / Ivy

Go to download

This project is for use in the workshop DOP 401: Get better at building AWS CDK constructs.

There is a newer version: 0.1.0
Show newest version
package io.github.cdklabs.cdk.codepipeline.extensions;

/**
 * (experimental) The event inputs required for the ChangeController lambda function.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.72.0 (build 4b8828b)", date = "2022-12-24T00:13:28.712Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.codepipeline.extensions.$Module.class, fqn = "@cdklabs/cdk-codepipeline-extensions.ChangeControllerEvent")
@software.amazon.jsii.Jsii.Proxy(ChangeControllerEvent.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface ChangeControllerEvent extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) The calendar used to determine whether a stage transition should be opened or closed.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.codepipeline.extensions.Calendar getCalendar();

    /**
     * (experimental) The name of the pipeline the Change Controller will be added to.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getPipelineName();

    /**
     * (experimental) The terms in alarm descriptions to seach for to determine if alarms should be checked.
     * 

* If any of the alarms matching these search terms are in ALARM state, the stage transition will be closed. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.util.List getSearchTerms(); /** * (experimental) The name of the stage the Change Controller will be added to. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getStageName(); /** * @return a {@link Builder} of {@link ChangeControllerEvent} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link ChangeControllerEvent} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { io.github.cdklabs.cdk.codepipeline.extensions.Calendar calendar; java.lang.String pipelineName; java.util.List searchTerms; java.lang.String stageName; /** * Sets the value of {@link ChangeControllerEvent#getCalendar} * @param calendar The calendar used to determine whether a stage transition should be opened or closed. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder calendar(io.github.cdklabs.cdk.codepipeline.extensions.Calendar calendar) { this.calendar = calendar; return this; } /** * Sets the value of {@link ChangeControllerEvent#getPipelineName} * @param pipelineName The name of the pipeline the Change Controller will be added to. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder pipelineName(java.lang.String pipelineName) { this.pipelineName = pipelineName; return this; } /** * Sets the value of {@link ChangeControllerEvent#getSearchTerms} * @param searchTerms The terms in alarm descriptions to seach for to determine if alarms should be checked. This parameter is required. * If any of the alarms matching these search terms are in ALARM state, the stage transition will be closed. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder searchTerms(java.util.List searchTerms) { this.searchTerms = searchTerms; return this; } /** * Sets the value of {@link ChangeControllerEvent#getStageName} * @param stageName The name of the stage the Change Controller will be added to. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder stageName(java.lang.String stageName) { this.stageName = stageName; return this; } /** * Builds the configured instance. * @return a new instance of {@link ChangeControllerEvent} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public ChangeControllerEvent build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link ChangeControllerEvent} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ChangeControllerEvent { private final io.github.cdklabs.cdk.codepipeline.extensions.Calendar calendar; private final java.lang.String pipelineName; private final java.util.List searchTerms; private final java.lang.String stageName; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.calendar = software.amazon.jsii.Kernel.get(this, "calendar", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.codepipeline.extensions.Calendar.class)); this.pipelineName = software.amazon.jsii.Kernel.get(this, "pipelineName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.searchTerms = software.amazon.jsii.Kernel.get(this, "searchTerms", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); this.stageName = software.amazon.jsii.Kernel.get(this, "stageName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.calendar = java.util.Objects.requireNonNull(builder.calendar, "calendar is required"); this.pipelineName = java.util.Objects.requireNonNull(builder.pipelineName, "pipelineName is required"); this.searchTerms = java.util.Objects.requireNonNull(builder.searchTerms, "searchTerms is required"); this.stageName = java.util.Objects.requireNonNull(builder.stageName, "stageName is required"); } @Override public final io.github.cdklabs.cdk.codepipeline.extensions.Calendar getCalendar() { return this.calendar; } @Override public final java.lang.String getPipelineName() { return this.pipelineName; } @Override public final java.util.List getSearchTerms() { return this.searchTerms; } @Override public final java.lang.String getStageName() { return this.stageName; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("calendar", om.valueToTree(this.getCalendar())); data.set("pipelineName", om.valueToTree(this.getPipelineName())); data.set("searchTerms", om.valueToTree(this.getSearchTerms())); data.set("stageName", om.valueToTree(this.getStageName())); final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@cdklabs/cdk-codepipeline-extensions.ChangeControllerEvent")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ChangeControllerEvent.Jsii$Proxy that = (ChangeControllerEvent.Jsii$Proxy) o; if (!calendar.equals(that.calendar)) return false; if (!pipelineName.equals(that.pipelineName)) return false; if (!searchTerms.equals(that.searchTerms)) return false; return this.stageName.equals(that.stageName); } @Override public final int hashCode() { int result = this.calendar.hashCode(); result = 31 * result + (this.pipelineName.hashCode()); result = 31 * result + (this.searchTerms.hashCode()); result = 31 * result + (this.stageName.hashCode()); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy