io.github.cdklabs.dynamotableviewer.TableViewerProps Maven / Gradle / Ivy
Show all versions of cdk-dynamo-table-view Show documentation
package io.github.cdklabs.dynamotableviewer;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.84.0 (build 5404dcf)", date = "2023-07-01T00:16:58.424Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.dynamotableviewer.$Module.class, fqn = "cdk-dynamo-table-viewer.TableViewerProps")
@software.amazon.jsii.Jsii.Proxy(TableViewerProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface TableViewerProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) The DynamoDB table to view.
*
* Note that all contents of this table will be
* visible to the public.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.dynamodb.Table getTable();
/**
* (experimental) The endpoint type of the LambdaRestApi that will be created.
*
* Default: - EDGE
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.apigateway.EndpointType getEndpointType() {
return null;
}
/**
* (experimental) Name of the column to sort by, prefix with "-" for descending order.
*
* Default: - No sort
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getSortBy() {
return null;
}
/**
* (experimental) The web page title.
*
* Default: - No title
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getTitle() {
return null;
}
/**
* @return a {@link Builder} of {@link TableViewerProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link TableViewerProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
software.amazon.awscdk.services.dynamodb.Table table;
software.amazon.awscdk.services.apigateway.EndpointType endpointType;
java.lang.String sortBy;
java.lang.String title;
/**
* Sets the value of {@link TableViewerProps#getTable}
* @param table The DynamoDB table to view. This parameter is required.
* Note that all contents of this table will be
* visible to the public.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder table(software.amazon.awscdk.services.dynamodb.Table table) {
this.table = table;
return this;
}
/**
* Sets the value of {@link TableViewerProps#getEndpointType}
* @param endpointType The endpoint type of the LambdaRestApi that will be created.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder endpointType(software.amazon.awscdk.services.apigateway.EndpointType endpointType) {
this.endpointType = endpointType;
return this;
}
/**
* Sets the value of {@link TableViewerProps#getSortBy}
* @param sortBy Name of the column to sort by, prefix with "-" for descending order.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder sortBy(java.lang.String sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Sets the value of {@link TableViewerProps#getTitle}
* @param title The web page title.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder title(java.lang.String title) {
this.title = title;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link TableViewerProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public TableViewerProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link TableViewerProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements TableViewerProps {
private final software.amazon.awscdk.services.dynamodb.Table table;
private final software.amazon.awscdk.services.apigateway.EndpointType endpointType;
private final java.lang.String sortBy;
private final java.lang.String title;
/**
* 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.table = software.amazon.jsii.Kernel.get(this, "table", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.dynamodb.Table.class));
this.endpointType = software.amazon.jsii.Kernel.get(this, "endpointType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apigateway.EndpointType.class));
this.sortBy = software.amazon.jsii.Kernel.get(this, "sortBy", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.title = software.amazon.jsii.Kernel.get(this, "title", 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.table = java.util.Objects.requireNonNull(builder.table, "table is required");
this.endpointType = builder.endpointType;
this.sortBy = builder.sortBy;
this.title = builder.title;
}
@Override
public final software.amazon.awscdk.services.dynamodb.Table getTable() {
return this.table;
}
@Override
public final software.amazon.awscdk.services.apigateway.EndpointType getEndpointType() {
return this.endpointType;
}
@Override
public final java.lang.String getSortBy() {
return this.sortBy;
}
@Override
public final java.lang.String getTitle() {
return this.title;
}
@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("table", om.valueToTree(this.getTable()));
if (this.getEndpointType() != null) {
data.set("endpointType", om.valueToTree(this.getEndpointType()));
}
if (this.getSortBy() != null) {
data.set("sortBy", om.valueToTree(this.getSortBy()));
}
if (this.getTitle() != null) {
data.set("title", om.valueToTree(this.getTitle()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("cdk-dynamo-table-viewer.TableViewerProps"));
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;
TableViewerProps.Jsii$Proxy that = (TableViewerProps.Jsii$Proxy) o;
if (!table.equals(that.table)) return false;
if (this.endpointType != null ? !this.endpointType.equals(that.endpointType) : that.endpointType != null) return false;
if (this.sortBy != null ? !this.sortBy.equals(that.sortBy) : that.sortBy != null) return false;
return this.title != null ? this.title.equals(that.title) : that.title == null;
}
@Override
public final int hashCode() {
int result = this.table.hashCode();
result = 31 * result + (this.endpointType != null ? this.endpointType.hashCode() : 0);
result = 31 * result + (this.sortBy != null ? this.sortBy.hashCode() : 0);
result = 31 * result + (this.title != null ? this.title.hashCode() : 0);
return result;
}
}
}