io.github.cdklabs.generative_ai_cdk_constructs.WebCrawlerProps Maven / Gradle / Ivy
package io.github.cdklabs.generative_ai_cdk_constructs;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-07T16:14:00.629Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.generative_ai_cdk_constructs.$Module.class, fqn = "@cdklabs/generative-ai-cdk-constructs.WebCrawlerProps")
@software.amazon.jsii.Jsii.Proxy(WebCrawlerProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface WebCrawlerProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) Optional user provided props to override the default props for the S3 Bucket.
*
* Providing both this and existingOutputBucketObj
will cause an error.
*
* Default: - Default props are used
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.s3.BucketProps getBucketOutputProps() {
return null;
}
/**
* (experimental) Deploy Lambda crawler.
*
* Default: - false
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getEnableLambdaCrawler() {
return null;
}
/**
* (experimental) Existing instance of S3 Bucket object, providing both this and bucketOutputProps
will cause an error.
*
* Default: - None
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.s3.IBucket getExistingOutputBucketObj() {
return null;
}
/**
* (experimental) Optional An existing VPC in which to deploy the construct.
*
* Providing both this and
* vpcProps is an error.
*
* Default: - none
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.IVpc getExistingVpc() {
return null;
}
/**
* (experimental) Enable observability.
*
* Warning: associated cost with the services
* used. Best practice to enable by default.
*
* Default: - true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getObservability() {
return null;
}
/**
* (experimental) Value will be appended to resources name.
*
* Default: - _dev
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getStage() {
return null;
}
/**
* (experimental) Targets to be crawled.
*
* Default: - none
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getTargets() {
return null;
}
/**
* (experimental) Optional custom properties for a VPC the construct will create.
*
* This VPC will
* be used by the compute resources the construct creates. Providing
* both this and existingVpc is an error.
*
* Default: - none
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.VpcProps getVpcProps() {
return null;
}
/**
* @return a {@link Builder} of {@link WebCrawlerProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link WebCrawlerProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
software.amazon.awscdk.services.s3.BucketProps bucketOutputProps;
java.lang.Boolean enableLambdaCrawler;
software.amazon.awscdk.services.s3.IBucket existingOutputBucketObj;
software.amazon.awscdk.services.ec2.IVpc existingVpc;
java.lang.Boolean observability;
java.lang.String stage;
java.util.List targets;
software.amazon.awscdk.services.ec2.VpcProps vpcProps;
/**
* Sets the value of {@link WebCrawlerProps#getBucketOutputProps}
* @param bucketOutputProps Optional user provided props to override the default props for the S3 Bucket.
* Providing both this and existingOutputBucketObj
will cause an error.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder bucketOutputProps(software.amazon.awscdk.services.s3.BucketProps bucketOutputProps) {
this.bucketOutputProps = bucketOutputProps;
return this;
}
/**
* Sets the value of {@link WebCrawlerProps#getEnableLambdaCrawler}
* @param enableLambdaCrawler Deploy Lambda crawler.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder enableLambdaCrawler(java.lang.Boolean enableLambdaCrawler) {
this.enableLambdaCrawler = enableLambdaCrawler;
return this;
}
/**
* Sets the value of {@link WebCrawlerProps#getExistingOutputBucketObj}
* @param existingOutputBucketObj Existing instance of S3 Bucket object, providing both this and bucketOutputProps
will cause an error.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder existingOutputBucketObj(software.amazon.awscdk.services.s3.IBucket existingOutputBucketObj) {
this.existingOutputBucketObj = existingOutputBucketObj;
return this;
}
/**
* Sets the value of {@link WebCrawlerProps#getExistingVpc}
* @param existingVpc Optional An existing VPC in which to deploy the construct.
* Providing both this and
* vpcProps is an error.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder existingVpc(software.amazon.awscdk.services.ec2.IVpc existingVpc) {
this.existingVpc = existingVpc;
return this;
}
/**
* Sets the value of {@link WebCrawlerProps#getObservability}
* @param observability Enable observability.
* Warning: associated cost with the services
* used. Best practice to enable by default.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder observability(java.lang.Boolean observability) {
this.observability = observability;
return this;
}
/**
* Sets the value of {@link WebCrawlerProps#getStage}
* @param stage Value will be appended to resources name.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder stage(java.lang.String stage) {
this.stage = stage;
return this;
}
/**
* Sets the value of {@link WebCrawlerProps#getTargets}
* @param targets Targets to be crawled.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder targets(java.util.List extends io.github.cdklabs.generative_ai_cdk_constructs.CrawlerTarget> targets) {
this.targets = (java.util.List)targets;
return this;
}
/**
* Sets the value of {@link WebCrawlerProps#getVpcProps}
* @param vpcProps Optional custom properties for a VPC the construct will create.
* This VPC will
* be used by the compute resources the construct creates. Providing
* both this and existingVpc is an error.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder vpcProps(software.amazon.awscdk.services.ec2.VpcProps vpcProps) {
this.vpcProps = vpcProps;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link WebCrawlerProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public WebCrawlerProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link WebCrawlerProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements WebCrawlerProps {
private final software.amazon.awscdk.services.s3.BucketProps bucketOutputProps;
private final java.lang.Boolean enableLambdaCrawler;
private final software.amazon.awscdk.services.s3.IBucket existingOutputBucketObj;
private final software.amazon.awscdk.services.ec2.IVpc existingVpc;
private final java.lang.Boolean observability;
private final java.lang.String stage;
private final java.util.List targets;
private final software.amazon.awscdk.services.ec2.VpcProps vpcProps;
/**
* 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.bucketOutputProps = software.amazon.jsii.Kernel.get(this, "bucketOutputProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.BucketProps.class));
this.enableLambdaCrawler = software.amazon.jsii.Kernel.get(this, "enableLambdaCrawler", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.existingOutputBucketObj = software.amazon.jsii.Kernel.get(this, "existingOutputBucketObj", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.IBucket.class));
this.existingVpc = software.amazon.jsii.Kernel.get(this, "existingVpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class));
this.observability = software.amazon.jsii.Kernel.get(this, "observability", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.stage = software.amazon.jsii.Kernel.get(this, "stage", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.targets = software.amazon.jsii.Kernel.get(this, "targets", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.CrawlerTarget.class)));
this.vpcProps = software.amazon.jsii.Kernel.get(this, "vpcProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.VpcProps.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.bucketOutputProps = builder.bucketOutputProps;
this.enableLambdaCrawler = builder.enableLambdaCrawler;
this.existingOutputBucketObj = builder.existingOutputBucketObj;
this.existingVpc = builder.existingVpc;
this.observability = builder.observability;
this.stage = builder.stage;
this.targets = (java.util.List)builder.targets;
this.vpcProps = builder.vpcProps;
}
@Override
public final software.amazon.awscdk.services.s3.BucketProps getBucketOutputProps() {
return this.bucketOutputProps;
}
@Override
public final java.lang.Boolean getEnableLambdaCrawler() {
return this.enableLambdaCrawler;
}
@Override
public final software.amazon.awscdk.services.s3.IBucket getExistingOutputBucketObj() {
return this.existingOutputBucketObj;
}
@Override
public final software.amazon.awscdk.services.ec2.IVpc getExistingVpc() {
return this.existingVpc;
}
@Override
public final java.lang.Boolean getObservability() {
return this.observability;
}
@Override
public final java.lang.String getStage() {
return this.stage;
}
@Override
public final java.util.List getTargets() {
return this.targets;
}
@Override
public final software.amazon.awscdk.services.ec2.VpcProps getVpcProps() {
return this.vpcProps;
}
@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();
if (this.getBucketOutputProps() != null) {
data.set("bucketOutputProps", om.valueToTree(this.getBucketOutputProps()));
}
if (this.getEnableLambdaCrawler() != null) {
data.set("enableLambdaCrawler", om.valueToTree(this.getEnableLambdaCrawler()));
}
if (this.getExistingOutputBucketObj() != null) {
data.set("existingOutputBucketObj", om.valueToTree(this.getExistingOutputBucketObj()));
}
if (this.getExistingVpc() != null) {
data.set("existingVpc", om.valueToTree(this.getExistingVpc()));
}
if (this.getObservability() != null) {
data.set("observability", om.valueToTree(this.getObservability()));
}
if (this.getStage() != null) {
data.set("stage", om.valueToTree(this.getStage()));
}
if (this.getTargets() != null) {
data.set("targets", om.valueToTree(this.getTargets()));
}
if (this.getVpcProps() != null) {
data.set("vpcProps", om.valueToTree(this.getVpcProps()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@cdklabs/generative-ai-cdk-constructs.WebCrawlerProps"));
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;
WebCrawlerProps.Jsii$Proxy that = (WebCrawlerProps.Jsii$Proxy) o;
if (this.bucketOutputProps != null ? !this.bucketOutputProps.equals(that.bucketOutputProps) : that.bucketOutputProps != null) return false;
if (this.enableLambdaCrawler != null ? !this.enableLambdaCrawler.equals(that.enableLambdaCrawler) : that.enableLambdaCrawler != null) return false;
if (this.existingOutputBucketObj != null ? !this.existingOutputBucketObj.equals(that.existingOutputBucketObj) : that.existingOutputBucketObj != null) return false;
if (this.existingVpc != null ? !this.existingVpc.equals(that.existingVpc) : that.existingVpc != null) return false;
if (this.observability != null ? !this.observability.equals(that.observability) : that.observability != null) return false;
if (this.stage != null ? !this.stage.equals(that.stage) : that.stage != null) return false;
if (this.targets != null ? !this.targets.equals(that.targets) : that.targets != null) return false;
return this.vpcProps != null ? this.vpcProps.equals(that.vpcProps) : that.vpcProps == null;
}
@Override
public final int hashCode() {
int result = this.bucketOutputProps != null ? this.bucketOutputProps.hashCode() : 0;
result = 31 * result + (this.enableLambdaCrawler != null ? this.enableLambdaCrawler.hashCode() : 0);
result = 31 * result + (this.existingOutputBucketObj != null ? this.existingOutputBucketObj.hashCode() : 0);
result = 31 * result + (this.existingVpc != null ? this.existingVpc.hashCode() : 0);
result = 31 * result + (this.observability != null ? this.observability.hashCode() : 0);
result = 31 * result + (this.stage != null ? this.stage.hashCode() : 0);
result = 31 * result + (this.targets != null ? this.targets.hashCode() : 0);
result = 31 * result + (this.vpcProps != null ? this.vpcProps.hashCode() : 0);
return result;
}
}
}