Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.aliyun.ros.cdk.bastionhost;
/**
* This class is a base encapsulation around the ROS resource type ALIYUN::BastionHost::Instance, which is used to create a bastion host.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.85.0 (build 08ee592)", date = "2024-06-21T05:59:07.579Z")
@software.amazon.jsii.Jsii(module = com.aliyun.ros.cdk.bastionhost.$Module.class, fqn = "@alicloud/ros-cdk-bastionhost.RosInstance")
public class RosInstance extends com.aliyun.ros.cdk.core.RosResource {
protected RosInstance(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected RosInstance(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
ROS_RESOURCE_TYPE_NAME = software.amazon.jsii.JsiiObject.jsiiStaticGet(com.aliyun.ros.cdk.bastionhost.RosInstance.class, "ROS_RESOURCE_TYPE_NAME", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* @param scope
scope in which this resource is defined.
This parameter is required.
* @param id
scoped id of the resource.
This parameter is required.
* @param props
resource properties.
This parameter is required.
* @param enableResourcePropertyConstraint This parameter is required.
*/
public RosInstance(final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.bastionhost.RosInstanceProps props, final @org.jetbrains.annotations.NotNull java.lang.Boolean enableResourcePropertyConstraint) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required"), java.util.Objects.requireNonNull(enableResourcePropertyConstraint, "enableResourcePropertyConstraint is required") });
}
@Override
protected @org.jetbrains.annotations.NotNull java.util.Map renderProperties(final @org.jetbrains.annotations.NotNull java.util.Map props) {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "renderProperties", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)), new Object[] { java.util.Objects.requireNonNull(props, "props is required") }));
}
/**
* The resource type name for this resource class.
*/
public final static java.lang.String ROS_RESOURCE_TYPE_NAME;
/**
*/
public @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable getAttrInstanceId() {
return software.amazon.jsii.Kernel.get(this, "attrInstanceId", software.amazon.jsii.NativeType.forClass(com.aliyun.ros.cdk.core.IResolvable.class));
}
@Override
protected @org.jetbrains.annotations.NotNull java.util.Map getRosProperties() {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "rosProperties", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))));
}
public @org.jetbrains.annotations.NotNull java.lang.Boolean getEnableResourcePropertyConstraint() {
return software.amazon.jsii.Kernel.get(this, "enableResourcePropertyConstraint", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
}
public void setEnableResourcePropertyConstraint(final @org.jetbrains.annotations.NotNull java.lang.Boolean value) {
software.amazon.jsii.Kernel.set(this, "enableResourcePropertyConstraint", java.util.Objects.requireNonNull(value, "enableResourcePropertyConstraint is required"));
}
/**
*/
public @org.jetbrains.annotations.NotNull java.lang.Object getExtendedStoragePlans() {
return software.amazon.jsii.Kernel.get(this, "extendedStoragePlans", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
public void setExtendedStoragePlans(final @org.jetbrains.annotations.NotNull java.lang.Number value) {
software.amazon.jsii.Kernel.set(this, "extendedStoragePlans", java.util.Objects.requireNonNull(value, "extendedStoragePlans is required"));
}
/**
*/
public void setExtendedStoragePlans(final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable value) {
software.amazon.jsii.Kernel.set(this, "extendedStoragePlans", java.util.Objects.requireNonNull(value, "extendedStoragePlans is required"));
}
/**
*/
public @org.jetbrains.annotations.NotNull java.lang.Object getExtraBandwidth() {
return software.amazon.jsii.Kernel.get(this, "extraBandwidth", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
public void setExtraBandwidth(final @org.jetbrains.annotations.NotNull java.lang.Number value) {
software.amazon.jsii.Kernel.set(this, "extraBandwidth", java.util.Objects.requireNonNull(value, "extraBandwidth is required"));
}
/**
*/
public void setExtraBandwidth(final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable value) {
software.amazon.jsii.Kernel.set(this, "extraBandwidth", java.util.Objects.requireNonNull(value, "extraBandwidth is required"));
}
/**
*/
public @org.jetbrains.annotations.NotNull java.lang.Object getPlan() {
return software.amazon.jsii.Kernel.get(this, "plan", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
public void setPlan(final @org.jetbrains.annotations.NotNull java.lang.Number value) {
software.amazon.jsii.Kernel.set(this, "plan", java.util.Objects.requireNonNull(value, "plan is required"));
}
/**
*/
public void setPlan(final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable value) {
software.amazon.jsii.Kernel.set(this, "plan", java.util.Objects.requireNonNull(value, "plan is required"));
}
/**
*/
public @org.jetbrains.annotations.NotNull java.lang.Object getStartInstanceParam() {
return software.amazon.jsii.Kernel.get(this, "startInstanceParam", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
public void setStartInstanceParam(final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable value) {
software.amazon.jsii.Kernel.set(this, "startInstanceParam", java.util.Objects.requireNonNull(value, "startInstanceParam is required"));
}
/**
*/
public void setStartInstanceParam(final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.bastionhost.RosInstance.StartInstanceParamProperty value) {
software.amazon.jsii.Kernel.set(this, "startInstanceParam", java.util.Objects.requireNonNull(value, "startInstanceParam is required"));
}
/**
*/
public @org.jetbrains.annotations.NotNull java.lang.Object getVersion() {
return software.amazon.jsii.Kernel.get(this, "version", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
public void setVersion(final @org.jetbrains.annotations.NotNull java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "version", java.util.Objects.requireNonNull(value, "version is required"));
}
/**
*/
public void setVersion(final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable value) {
software.amazon.jsii.Kernel.set(this, "version", java.util.Objects.requireNonNull(value, "version is required"));
}
/**
*/
public @org.jetbrains.annotations.Nullable java.lang.Object getAutoPay() {
return software.amazon.jsii.Kernel.get(this, "autoPay", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
public void setAutoPay(final @org.jetbrains.annotations.Nullable java.lang.Boolean value) {
software.amazon.jsii.Kernel.set(this, "autoPay", value);
}
/**
*/
public void setAutoPay(final @org.jetbrains.annotations.Nullable com.aliyun.ros.cdk.core.IResolvable value) {
software.amazon.jsii.Kernel.set(this, "autoPay", value);
}
/**
*/
public @org.jetbrains.annotations.Nullable java.lang.Object getAutoRenew() {
return software.amazon.jsii.Kernel.get(this, "autoRenew", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
public void setAutoRenew(final @org.jetbrains.annotations.Nullable java.lang.Boolean value) {
software.amazon.jsii.Kernel.set(this, "autoRenew", value);
}
/**
*/
public void setAutoRenew(final @org.jetbrains.annotations.Nullable com.aliyun.ros.cdk.core.IResolvable value) {
software.amazon.jsii.Kernel.set(this, "autoRenew", value);
}
/**
*/
public @org.jetbrains.annotations.Nullable java.lang.Object getPeriod() {
return software.amazon.jsii.Kernel.get(this, "period", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
public void setPeriod(final @org.jetbrains.annotations.Nullable java.lang.Number value) {
software.amazon.jsii.Kernel.set(this, "period", value);
}
/**
*/
public void setPeriod(final @org.jetbrains.annotations.Nullable com.aliyun.ros.cdk.core.IResolvable value) {
software.amazon.jsii.Kernel.set(this, "period", value);
}
/**
*/
public @org.jetbrains.annotations.Nullable java.lang.Object getPeriodUnit() {
return software.amazon.jsii.Kernel.get(this, "periodUnit", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
public void setPeriodUnit(final @org.jetbrains.annotations.Nullable java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "periodUnit", value);
}
/**
*/
public void setPeriodUnit(final @org.jetbrains.annotations.Nullable com.aliyun.ros.cdk.core.IResolvable value) {
software.amazon.jsii.Kernel.set(this, "periodUnit", value);
}
/**
*/
public @org.jetbrains.annotations.Nullable java.lang.Object getResourceGroupId() {
return software.amazon.jsii.Kernel.get(this, "resourceGroupId", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
public void setResourceGroupId(final @org.jetbrains.annotations.Nullable java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "resourceGroupId", value);
}
/**
*/
public void setResourceGroupId(final @org.jetbrains.annotations.Nullable com.aliyun.ros.cdk.core.IResolvable value) {
software.amazon.jsii.Kernel.set(this, "resourceGroupId", value);
}
/**
*/
@software.amazon.jsii.Jsii(module = com.aliyun.ros.cdk.bastionhost.$Module.class, fqn = "@alicloud/ros-cdk-bastionhost.RosInstance.StartInstanceParamProperty")
@software.amazon.jsii.Jsii.Proxy(StartInstanceParamProperty.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static interface StartInstanceParamProperty extends software.amazon.jsii.JsiiSerializable {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.Object getSecurityGroupIds();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.Object getVswitchId();
/**
* @return a {@link Builder} of {@link StartInstanceParamProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link StartInstanceParamProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Object securityGroupIds;
java.lang.Object vswitchId;
/**
* Sets the value of {@link StartInstanceParamProperty#getSecurityGroupIds}
* @param securityGroupIds the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder securityGroupIds(com.aliyun.ros.cdk.core.IResolvable securityGroupIds) {
this.securityGroupIds = securityGroupIds;
return this;
}
/**
* Sets the value of {@link StartInstanceParamProperty#getSecurityGroupIds}
* @param securityGroupIds the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder securityGroupIds(java.util.List extends java.lang.Object> securityGroupIds) {
this.securityGroupIds = securityGroupIds;
return this;
}
/**
* Sets the value of {@link StartInstanceParamProperty#getVswitchId}
* @param vswitchId the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vswitchId(java.lang.String vswitchId) {
this.vswitchId = vswitchId;
return this;
}
/**
* Sets the value of {@link StartInstanceParamProperty#getVswitchId}
* @param vswitchId the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vswitchId(com.aliyun.ros.cdk.core.IResolvable vswitchId) {
this.vswitchId = vswitchId;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link StartInstanceParamProperty}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public StartInstanceParamProperty build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link StartInstanceParamProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements StartInstanceParamProperty {
private final java.lang.Object securityGroupIds;
private final java.lang.Object vswitchId;
/**
* 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.securityGroupIds = software.amazon.jsii.Kernel.get(this, "securityGroupIds", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.vswitchId = software.amazon.jsii.Kernel.get(this, "vswitchId", software.amazon.jsii.NativeType.forClass(java.lang.Object.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.securityGroupIds = java.util.Objects.requireNonNull(builder.securityGroupIds, "securityGroupIds is required");
this.vswitchId = java.util.Objects.requireNonNull(builder.vswitchId, "vswitchId is required");
}
@Override
public final java.lang.Object getSecurityGroupIds() {
return this.securityGroupIds;
}
@Override
public final java.lang.Object getVswitchId() {
return this.vswitchId;
}
@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("securityGroupIds", om.valueToTree(this.getSecurityGroupIds()));
data.set("vswitchId", om.valueToTree(this.getVswitchId()));
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@alicloud/ros-cdk-bastionhost.RosInstance.StartInstanceParamProperty"));
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;
StartInstanceParamProperty.Jsii$Proxy that = (StartInstanceParamProperty.Jsii$Proxy) o;
if (!securityGroupIds.equals(that.securityGroupIds)) return false;
return this.vswitchId.equals(that.vswitchId);
}
@Override
public final int hashCode() {
int result = this.securityGroupIds.hashCode();
result = 31 * result + (this.vswitchId.hashCode());
return result;
}
}
}
/**
* A fluent builder for {@link com.aliyun.ros.cdk.bastionhost.RosInstance}.
*/
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope
scope in which this resource is defined.
This parameter is required.
* @param id
scoped id of the resource.
This parameter is required.
* @param enableResourcePropertyConstraint This parameter is required.
*/
public static Builder create(final com.aliyun.ros.cdk.core.Construct scope, final java.lang.String id, final java.lang.Boolean enableResourcePropertyConstraint) {
return new Builder(scope, id, enableResourcePropertyConstraint);
}
private final com.aliyun.ros.cdk.core.Construct scope;
private final java.lang.String id;
private final java.lang.Boolean enableResourcePropertyConstraint;
private final com.aliyun.ros.cdk.bastionhost.RosInstanceProps.Builder props;
private Builder(final com.aliyun.ros.cdk.core.Construct scope, final java.lang.String id, final java.lang.Boolean enableResourcePropertyConstraint) {
this.scope = scope;
this.id = id;
this.enableResourcePropertyConstraint = enableResourcePropertyConstraint;
this.props = new com.aliyun.ros.cdk.bastionhost.RosInstanceProps.Builder();
}
/**
* @return {@code this}
* @param extendedStoragePlans This parameter is required.
*/
public Builder extendedStoragePlans(final java.lang.Number extendedStoragePlans) {
this.props.extendedStoragePlans(extendedStoragePlans);
return this;
}
/**
* @return {@code this}
* @param extendedStoragePlans This parameter is required.
*/
public Builder extendedStoragePlans(final com.aliyun.ros.cdk.core.IResolvable extendedStoragePlans) {
this.props.extendedStoragePlans(extendedStoragePlans);
return this;
}
/**
* @return {@code this}
* @param extraBandwidth This parameter is required.
*/
public Builder extraBandwidth(final java.lang.Number extraBandwidth) {
this.props.extraBandwidth(extraBandwidth);
return this;
}
/**
* @return {@code this}
* @param extraBandwidth This parameter is required.
*/
public Builder extraBandwidth(final com.aliyun.ros.cdk.core.IResolvable extraBandwidth) {
this.props.extraBandwidth(extraBandwidth);
return this;
}
/**
* @return {@code this}
* @param plan This parameter is required.
*/
public Builder plan(final java.lang.Number plan) {
this.props.plan(plan);
return this;
}
/**
* @return {@code this}
* @param plan This parameter is required.
*/
public Builder plan(final com.aliyun.ros.cdk.core.IResolvable plan) {
this.props.plan(plan);
return this;
}
/**
* @return {@code this}
* @param startInstanceParam This parameter is required.
*/
public Builder startInstanceParam(final com.aliyun.ros.cdk.core.IResolvable startInstanceParam) {
this.props.startInstanceParam(startInstanceParam);
return this;
}
/**
* @return {@code this}
* @param startInstanceParam This parameter is required.
*/
public Builder startInstanceParam(final com.aliyun.ros.cdk.bastionhost.RosInstance.StartInstanceParamProperty startInstanceParam) {
this.props.startInstanceParam(startInstanceParam);
return this;
}
/**
* @return {@code this}
* @param version This parameter is required.
*/
public Builder version(final java.lang.String version) {
this.props.version(version);
return this;
}
/**
* @return {@code this}
* @param version This parameter is required.
*/
public Builder version(final com.aliyun.ros.cdk.core.IResolvable version) {
this.props.version(version);
return this;
}
/**
* @return {@code this}
* @param autoPay This parameter is required.
*/
public Builder autoPay(final java.lang.Boolean autoPay) {
this.props.autoPay(autoPay);
return this;
}
/**
* @return {@code this}
* @param autoPay This parameter is required.
*/
public Builder autoPay(final com.aliyun.ros.cdk.core.IResolvable autoPay) {
this.props.autoPay(autoPay);
return this;
}
/**
* @return {@code this}
* @param autoRenew This parameter is required.
*/
public Builder autoRenew(final java.lang.Boolean autoRenew) {
this.props.autoRenew(autoRenew);
return this;
}
/**
* @return {@code this}
* @param autoRenew This parameter is required.
*/
public Builder autoRenew(final com.aliyun.ros.cdk.core.IResolvable autoRenew) {
this.props.autoRenew(autoRenew);
return this;
}
/**
* @return {@code this}
* @param period This parameter is required.
*/
public Builder period(final java.lang.Number period) {
this.props.period(period);
return this;
}
/**
* @return {@code this}
* @param period This parameter is required.
*/
public Builder period(final com.aliyun.ros.cdk.core.IResolvable period) {
this.props.period(period);
return this;
}
/**
* @return {@code this}
* @param periodUnit This parameter is required.
*/
public Builder periodUnit(final java.lang.String periodUnit) {
this.props.periodUnit(periodUnit);
return this;
}
/**
* @return {@code this}
* @param periodUnit This parameter is required.
*/
public Builder periodUnit(final com.aliyun.ros.cdk.core.IResolvable periodUnit) {
this.props.periodUnit(periodUnit);
return this;
}
/**
* @return {@code this}
* @param resourceGroupId This parameter is required.
*/
public Builder resourceGroupId(final java.lang.String resourceGroupId) {
this.props.resourceGroupId(resourceGroupId);
return this;
}
/**
* @return {@code this}
* @param resourceGroupId This parameter is required.
*/
public Builder resourceGroupId(final com.aliyun.ros.cdk.core.IResolvable resourceGroupId) {
this.props.resourceGroupId(resourceGroupId);
return this;
}
/**
* @return a newly built instance of {@link com.aliyun.ros.cdk.bastionhost.RosInstance}.
*/
@Override
public com.aliyun.ros.cdk.bastionhost.RosInstance build() {
return new com.aliyun.ros.cdk.bastionhost.RosInstance(
this.scope,
this.id,
this.props.build(),
this.enableResourcePropertyConstraint
);
}
}
}