software.amazon.awscdk.services.iottwinmaker.CfnWorkspaceProps Maven / Gradle / Ivy
package software.amazon.awscdk.services.iottwinmaker;
/**
* Properties for defining a `CfnWorkspace`.
*
* Example:
*
*
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.services.iottwinmaker.*;
* CfnWorkspaceProps cfnWorkspaceProps = CfnWorkspaceProps.builder()
* .role("role")
* .s3Location("s3Location")
* .workspaceId("workspaceId")
* // the properties below are optional
* .description("description")
* .tags(Map.of(
* "tagsKey", "tags"))
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.65.1 (build b0947e4)", date = "2022-08-30T21:28:28.199Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.iottwinmaker.$Module.class, fqn = "@aws-cdk/aws-iottwinmaker.CfnWorkspaceProps")
@software.amazon.jsii.Jsii.Proxy(CfnWorkspaceProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface CfnWorkspaceProps extends software.amazon.jsii.JsiiSerializable {
/**
* The ARN of the execution role associated with the workspace.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getRole();
/**
* The ARN of the S3 bucket where resources associated with the workspace are stored.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getS3Location();
/**
* The ID of the workspace.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getWorkspaceId();
/**
* The description of the workspace.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getDescription() {
return null;
}
/**
* Metadata that you can use to manage the workspace.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.Map getTags() {
return null;
}
/**
* @return a {@link Builder} of {@link CfnWorkspaceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnWorkspaceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String role;
java.lang.String s3Location;
java.lang.String workspaceId;
java.lang.String description;
java.util.Map tags;
/**
* Sets the value of {@link CfnWorkspaceProps#getRole}
* @param role The ARN of the execution role associated with the workspace. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder role(java.lang.String role) {
this.role = role;
return this;
}
/**
* Sets the value of {@link CfnWorkspaceProps#getS3Location}
* @param s3Location The ARN of the S3 bucket where resources associated with the workspace are stored. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder s3Location(java.lang.String s3Location) {
this.s3Location = s3Location;
return this;
}
/**
* Sets the value of {@link CfnWorkspaceProps#getWorkspaceId}
* @param workspaceId The ID of the workspace. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder workspaceId(java.lang.String workspaceId) {
this.workspaceId = workspaceId;
return this;
}
/**
* Sets the value of {@link CfnWorkspaceProps#getDescription}
* @param description The description of the workspace.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder description(java.lang.String description) {
this.description = description;
return this;
}
/**
* Sets the value of {@link CfnWorkspaceProps#getTags}
* @param tags Metadata that you can use to manage the workspace.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder tags(java.util.Map tags) {
this.tags = tags;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnWorkspaceProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public CfnWorkspaceProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CfnWorkspaceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnWorkspaceProps {
private final java.lang.String role;
private final java.lang.String s3Location;
private final java.lang.String workspaceId;
private final java.lang.String description;
private final java.util.Map tags;
/**
* 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.role = software.amazon.jsii.Kernel.get(this, "role", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.s3Location = software.amazon.jsii.Kernel.get(this, "s3Location", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.workspaceId = software.amazon.jsii.Kernel.get(this, "workspaceId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.tags = software.amazon.jsii.Kernel.get(this, "tags", software.amazon.jsii.NativeType.mapOf(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.role = java.util.Objects.requireNonNull(builder.role, "role is required");
this.s3Location = java.util.Objects.requireNonNull(builder.s3Location, "s3Location is required");
this.workspaceId = java.util.Objects.requireNonNull(builder.workspaceId, "workspaceId is required");
this.description = builder.description;
this.tags = builder.tags;
}
@Override
public final java.lang.String getRole() {
return this.role;
}
@Override
public final java.lang.String getS3Location() {
return this.s3Location;
}
@Override
public final java.lang.String getWorkspaceId() {
return this.workspaceId;
}
@Override
public final java.lang.String getDescription() {
return this.description;
}
@Override
public final java.util.Map getTags() {
return this.tags;
}
@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("role", om.valueToTree(this.getRole()));
data.set("s3Location", om.valueToTree(this.getS3Location()));
data.set("workspaceId", om.valueToTree(this.getWorkspaceId()));
if (this.getDescription() != null) {
data.set("description", om.valueToTree(this.getDescription()));
}
if (this.getTags() != null) {
data.set("tags", om.valueToTree(this.getTags()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-iottwinmaker.CfnWorkspaceProps"));
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;
CfnWorkspaceProps.Jsii$Proxy that = (CfnWorkspaceProps.Jsii$Proxy) o;
if (!role.equals(that.role)) return false;
if (!s3Location.equals(that.s3Location)) return false;
if (!workspaceId.equals(that.workspaceId)) return false;
if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false;
return this.tags != null ? this.tags.equals(that.tags) : that.tags == null;
}
@Override
public final int hashCode() {
int result = this.role.hashCode();
result = 31 * result + (this.s3Location.hashCode());
result = 31 * result + (this.workspaceId.hashCode());
result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
result = 31 * result + (this.tags != null ? this.tags.hashCode() : 0);
return result;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy