com.github.eladb.watchful.WatchfulAspectProps Maven / Gradle / Ivy
Show all versions of cdk-watchful Show documentation
package com.github.eladb.watchful;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.13.0 (build 385c325)", date = "2020-11-09T06:11:47.403Z")
@software.amazon.jsii.Jsii(module = com.github.eladb.watchful.$Module.class, fqn = "cdk-watchful.WatchfulAspectProps")
@software.amazon.jsii.Jsii.Proxy(WatchfulAspectProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface WatchfulAspectProps extends software.amazon.jsii.JsiiSerializable {
/**
* Automatically watch API Gateway APIs in the scope.
*
* Default: true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getApiGateway() {
return null;
}
/**
* Automatically watch all Amazon DynamoDB tables in the scope.
*
* Default: true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getDynamodb() {
return null;
}
/**
* Automatically watch ApplicationLoadBalanced EC2 Ecs Services in the scope (using ECS Pattern).
*
* Default: true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getEc2Ecs() {
return null;
}
/**
* Automatically watch ApplicationLoadBalanced Fargate Ecs Services in the scope (using ECS Pattern).
*
* Default: true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getFargateecs() {
return null;
}
/**
* Automatically watch AWS Lambda functions in the scope.
*
* Default: true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getLambda() {
return null;
}
/**
* Automatically watch RDS Aurora clusters in the scope.
*
* Default: true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getRdsaurora() {
return null;
}
/**
* @return a {@link Builder} of {@link WatchfulAspectProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link WatchfulAspectProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
private java.lang.Boolean apiGateway;
private java.lang.Boolean dynamodb;
private java.lang.Boolean ec2Ecs;
private java.lang.Boolean fargateecs;
private java.lang.Boolean lambda;
private java.lang.Boolean rdsaurora;
/**
* Sets the value of {@link WatchfulAspectProps#getApiGateway}
* @param apiGateway Automatically watch API Gateway APIs in the scope.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder apiGateway(java.lang.Boolean apiGateway) {
this.apiGateway = apiGateway;
return this;
}
/**
* Sets the value of {@link WatchfulAspectProps#getDynamodb}
* @param dynamodb Automatically watch all Amazon DynamoDB tables in the scope.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder dynamodb(java.lang.Boolean dynamodb) {
this.dynamodb = dynamodb;
return this;
}
/**
* Sets the value of {@link WatchfulAspectProps#getEc2Ecs}
* @param ec2Ecs Automatically watch ApplicationLoadBalanced EC2 Ecs Services in the scope (using ECS Pattern).
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder ec2Ecs(java.lang.Boolean ec2Ecs) {
this.ec2Ecs = ec2Ecs;
return this;
}
/**
* Sets the value of {@link WatchfulAspectProps#getFargateecs}
* @param fargateecs Automatically watch ApplicationLoadBalanced Fargate Ecs Services in the scope (using ECS Pattern).
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder fargateecs(java.lang.Boolean fargateecs) {
this.fargateecs = fargateecs;
return this;
}
/**
* Sets the value of {@link WatchfulAspectProps#getLambda}
* @param lambda Automatically watch AWS Lambda functions in the scope.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder lambda(java.lang.Boolean lambda) {
this.lambda = lambda;
return this;
}
/**
* Sets the value of {@link WatchfulAspectProps#getRdsaurora}
* @param rdsaurora Automatically watch RDS Aurora clusters in the scope.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder rdsaurora(java.lang.Boolean rdsaurora) {
this.rdsaurora = rdsaurora;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link WatchfulAspectProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public WatchfulAspectProps build() {
return new Jsii$Proxy(apiGateway, dynamodb, ec2Ecs, fargateecs, lambda, rdsaurora);
}
}
/**
* An implementation for {@link WatchfulAspectProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements WatchfulAspectProps {
private final java.lang.Boolean apiGateway;
private final java.lang.Boolean dynamodb;
private final java.lang.Boolean ec2Ecs;
private final java.lang.Boolean fargateecs;
private final java.lang.Boolean lambda;
private final java.lang.Boolean rdsaurora;
/**
* 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.apiGateway = this.jsiiGet("apiGateway", java.lang.Boolean.class);
this.dynamodb = this.jsiiGet("dynamodb", java.lang.Boolean.class);
this.ec2Ecs = this.jsiiGet("ec2ecs", java.lang.Boolean.class);
this.fargateecs = this.jsiiGet("fargateecs", java.lang.Boolean.class);
this.lambda = this.jsiiGet("lambda", java.lang.Boolean.class);
this.rdsaurora = this.jsiiGet("rdsaurora", java.lang.Boolean.class);
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
private Jsii$Proxy(final java.lang.Boolean apiGateway, final java.lang.Boolean dynamodb, final java.lang.Boolean ec2Ecs, final java.lang.Boolean fargateecs, final java.lang.Boolean lambda, final java.lang.Boolean rdsaurora) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.apiGateway = apiGateway;
this.dynamodb = dynamodb;
this.ec2Ecs = ec2Ecs;
this.fargateecs = fargateecs;
this.lambda = lambda;
this.rdsaurora = rdsaurora;
}
@Override
public java.lang.Boolean getApiGateway() {
return this.apiGateway;
}
@Override
public java.lang.Boolean getDynamodb() {
return this.dynamodb;
}
@Override
public java.lang.Boolean getEc2Ecs() {
return this.ec2Ecs;
}
@Override
public java.lang.Boolean getFargateecs() {
return this.fargateecs;
}
@Override
public java.lang.Boolean getLambda() {
return this.lambda;
}
@Override
public java.lang.Boolean getRdsaurora() {
return this.rdsaurora;
}
@Override
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();
if (this.getApiGateway() != null) {
data.set("apiGateway", om.valueToTree(this.getApiGateway()));
}
if (this.getDynamodb() != null) {
data.set("dynamodb", om.valueToTree(this.getDynamodb()));
}
if (this.getEc2Ecs() != null) {
data.set("ec2ecs", om.valueToTree(this.getEc2Ecs()));
}
if (this.getFargateecs() != null) {
data.set("fargateecs", om.valueToTree(this.getFargateecs()));
}
if (this.getLambda() != null) {
data.set("lambda", om.valueToTree(this.getLambda()));
}
if (this.getRdsaurora() != null) {
data.set("rdsaurora", om.valueToTree(this.getRdsaurora()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("cdk-watchful.WatchfulAspectProps"));
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 boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
WatchfulAspectProps.Jsii$Proxy that = (WatchfulAspectProps.Jsii$Proxy) o;
if (this.apiGateway != null ? !this.apiGateway.equals(that.apiGateway) : that.apiGateway != null) return false;
if (this.dynamodb != null ? !this.dynamodb.equals(that.dynamodb) : that.dynamodb != null) return false;
if (this.ec2Ecs != null ? !this.ec2Ecs.equals(that.ec2Ecs) : that.ec2Ecs != null) return false;
if (this.fargateecs != null ? !this.fargateecs.equals(that.fargateecs) : that.fargateecs != null) return false;
if (this.lambda != null ? !this.lambda.equals(that.lambda) : that.lambda != null) return false;
return this.rdsaurora != null ? this.rdsaurora.equals(that.rdsaurora) : that.rdsaurora == null;
}
@Override
public int hashCode() {
int result = this.apiGateway != null ? this.apiGateway.hashCode() : 0;
result = 31 * result + (this.dynamodb != null ? this.dynamodb.hashCode() : 0);
result = 31 * result + (this.ec2Ecs != null ? this.ec2Ecs.hashCode() : 0);
result = 31 * result + (this.fargateecs != null ? this.fargateecs.hashCode() : 0);
result = 31 * result + (this.lambda != null ? this.lambda.hashCode() : 0);
result = 31 * result + (this.rdsaurora != null ? this.rdsaurora.hashCode() : 0);
return result;
}
}
}