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

com.gammarer.cdk.aws.rds_database_running_scheduler.ScheduleProperty Maven / Gradle / Ivy

The newest version!
package com.gammarer.cdk.aws.rds_database_running_scheduler;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.98.0 (build 00b106d)", date = "2024-05-01T16:20:43.033Z")
@software.amazon.jsii.Jsii(module = com.gammarer.cdk.aws.rds_database_running_scheduler.$Module.class, fqn = "@gammarer/aws-rds-database-running-scheduler.ScheduleProperty")
@software.amazon.jsii.Jsii.Proxy(ScheduleProperty.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface ScheduleProperty extends software.amazon.jsii.JsiiSerializable {

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull java.lang.String getTimezone();

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    default @org.jetbrains.annotations.Nullable java.lang.String getHour() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    default @org.jetbrains.annotations.Nullable java.lang.String getMinute() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    default @org.jetbrains.annotations.Nullable java.lang.String getWeek() {
        return null;
    }

    /**
     * @return a {@link Builder} of {@link ScheduleProperty}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link ScheduleProperty}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public static final class Builder implements software.amazon.jsii.Builder {
        java.lang.String timezone;
        java.lang.String hour;
        java.lang.String minute;
        java.lang.String week;

        /**
         * Sets the value of {@link ScheduleProperty#getTimezone}
         * @param timezone the value to be set. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder timezone(java.lang.String timezone) {
            this.timezone = timezone;
            return this;
        }

        /**
         * Sets the value of {@link ScheduleProperty#getHour}
         * @param hour the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder hour(java.lang.String hour) {
            this.hour = hour;
            return this;
        }

        /**
         * Sets the value of {@link ScheduleProperty#getMinute}
         * @param minute the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder minute(java.lang.String minute) {
            this.minute = minute;
            return this;
        }

        /**
         * Sets the value of {@link ScheduleProperty#getWeek}
         * @param week the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder week(java.lang.String week) {
            this.week = week;
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link ScheduleProperty}
         * @throws NullPointerException if any required attribute was not provided
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        @Override
        public ScheduleProperty build() {
            return new Jsii$Proxy(this);
        }
    }

    /**
     * An implementation for {@link ScheduleProperty}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @software.amazon.jsii.Internal
    final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ScheduleProperty {
        private final java.lang.String timezone;
        private final java.lang.String hour;
        private final java.lang.String minute;
        private final java.lang.String week;

        /**
         * 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.timezone = software.amazon.jsii.Kernel.get(this, "timezone", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.hour = software.amazon.jsii.Kernel.get(this, "hour", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.minute = software.amazon.jsii.Kernel.get(this, "minute", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.week = software.amazon.jsii.Kernel.get(this, "week", 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.timezone = java.util.Objects.requireNonNull(builder.timezone, "timezone is required");
            this.hour = builder.hour;
            this.minute = builder.minute;
            this.week = builder.week;
        }

        @Override
        public final java.lang.String getTimezone() {
            return this.timezone;
        }

        @Override
        public final java.lang.String getHour() {
            return this.hour;
        }

        @Override
        public final java.lang.String getMinute() {
            return this.minute;
        }

        @Override
        public final java.lang.String getWeek() {
            return this.week;
        }

        @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("timezone", om.valueToTree(this.getTimezone()));
            if (this.getHour() != null) {
                data.set("hour", om.valueToTree(this.getHour()));
            }
            if (this.getMinute() != null) {
                data.set("minute", om.valueToTree(this.getMinute()));
            }
            if (this.getWeek() != null) {
                data.set("week", om.valueToTree(this.getWeek()));
            }

            final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
            struct.set("fqn", om.valueToTree("@gammarer/aws-rds-database-running-scheduler.ScheduleProperty"));
            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;

            ScheduleProperty.Jsii$Proxy that = (ScheduleProperty.Jsii$Proxy) o;

            if (!timezone.equals(that.timezone)) return false;
            if (this.hour != null ? !this.hour.equals(that.hour) : that.hour != null) return false;
            if (this.minute != null ? !this.minute.equals(that.minute) : that.minute != null) return false;
            return this.week != null ? this.week.equals(that.week) : that.week == null;
        }

        @Override
        public final int hashCode() {
            int result = this.timezone.hashCode();
            result = 31 * result + (this.hour != null ? this.hour.hashCode() : 0);
            result = 31 * result + (this.minute != null ? this.minute.hashCode() : 0);
            result = 31 * result + (this.week != null ? this.week.hashCode() : 0);
            return result;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy