com.pepperize.cdk.autoscaling_gitlab_runner.MachineOptions Maven / Gradle / Ivy
Show all versions of cdk-autoscaling-gitlab-runner Show documentation
package com.pepperize.cdk.autoscaling_gitlab_runner;
/**
* @see https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/blob/main/drivers/amazonec2/amazonec2.go
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.98.0 (build 00b106d)", date = "2024-05-01T02:44:42.327Z")
@software.amazon.jsii.Jsii(module = com.pepperize.cdk.autoscaling_gitlab_runner.$Module.class, fqn = "@pepperize/cdk-autoscaling-gitlab-runner.MachineOptions")
@software.amazon.jsii.Jsii.Proxy(MachineOptions.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface MachineOptions extends software.amazon.jsii.JsiiSerializable, com.pepperize.cdk.autoscaling_gitlab_runner.SharedCreateOptions {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getAmi() {
return null;
}
/**
* The amazonec2-block-duration-minutes parameter.
*
* AWS spot instance duration in minutes (60, 120, 180, 240, 300, or 360).
*
* @see https://docs.gitlab.com/runner/configuration/runner_autoscale_aws/#cutting-down-costs-with-amazon-ec2-spot-instances
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getBlockDurationMinutes() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getIamInstanceProfile() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getInstanceType() {
return null;
}
/**
* The amazonec2-keypair-name parameter.
*
* A set of security credentials that you use to prove your identity when connecting to an Amazon EC2 instance.
*
* using --amazonec2-keypair-name also requires --amazonec2-ssh-keypath
*
* @see https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/blob/main/drivers/amazonec2/amazonec2.go#L398
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getKeypairName() {
return null;
}
/**
* Whether the metadata token is required or optional.
*
* Default: required
*
* @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getMetadataToken() {
return null;
}
/**
* The number of network hops that the metadata token can travel.
*
* Default: 2
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getMetadataTokenResponseHopLimit() {
return null;
}
/**
* The amazonec2-private-address-only parameter.
*
* If true, your EC2 instance won’t get assigned a public IP. This is ok if your VPC is configured correctly with an Internet Gateway (IGW), NatGateway (NGW) and routing is fine, but it’s something to consider if you’ve got a more complex configuration.
*
* @see https://docs.gitlab.com/runner/configuration/runner_autoscale_aws/#the-runnersmachine-section
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getPrivateAddressOnly() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getRegion() {
return null;
}
/**
* The amazonec2-request-spot-instance parameter.
*
* Whether or not to request spot instances.
*
* Default: true
*
* @see https://aws.amazon.com/ec2/spot/
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getRequestSpotInstance() {
return null;
}
/**
* The root disk size of the instance (in GB).
*
* Default: 16
*
* @see https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/blob/main/docs/drivers/aws.md#options
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getRootSize() {
return null;
}
/**
* The SecurityGroup's GroupName, not the GroupId.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getSecurityGroup() {
return null;
}
/**
* The amazonec2-spot-price parameter.
*
* The bidding price for spot instances.
*
* Default: 0.03
*
* @see https://aws.amazon.com/ec2/spot/pricing/
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getSpotPrice() {
return null;
}
/**
* The amazonec2-ssh-keypath parameter.
*
* Default: /etc/gitlab-runner/ssh
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getSshKeypath() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getSubnetId() {
return null;
}
/**
* Create an EBS Optimized Instance, instance type must support it.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getUseEbsOptimizedInstance() {
return null;
}
/**
* Use the private IP address of Docker Machines, but still create a public IP address.
*
* Useful to keep the traffic internal and avoid extra costs.
*
* @see https://docs.gitlab.com/runner/configuration/runner_autoscale_aws/#the-runnersmachine-section
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getUsePrivateAddress() {
return null;
}
/**
* The path of the runner machine's userdata file on the manager instance used by the amazonec2 driver to create a new instance.
*
* Default: /etc/gitlab-runner/user_data_runners
*
* @see https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/blob/main/drivers/amazonec2/amazonec2.go
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getUserdata() {
return null;
}
/**
* The Amazon EBS volume type to be attached to the instance.
*
* Default: gp2
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getVolumeType() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getVpcId() {
return null;
}
/**
* Extract the availabilityZone last character for the needs of gitlab configuration.
*
* @see https://docs.gitlab.com/runners/configuration/runners_autoscale_aws/#the-runnerssmachine-section
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getZone() {
return null;
}
/**
* @return a {@link Builder} of {@link MachineOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link MachineOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String ami;
java.lang.Number blockDurationMinutes;
java.lang.String iamInstanceProfile;
java.lang.String instanceType;
java.lang.String keypairName;
java.lang.String metadataToken;
java.lang.Number metadataTokenResponseHopLimit;
java.lang.Boolean privateAddressOnly;
java.lang.String region;
java.lang.Boolean requestSpotInstance;
java.lang.Number rootSize;
java.lang.String securityGroup;
java.lang.Number spotPrice;
java.lang.String sshKeypath;
java.lang.String subnetId;
java.lang.Boolean useEbsOptimizedInstance;
java.lang.Boolean usePrivateAddress;
java.lang.String userdata;
java.lang.String volumeType;
java.lang.String vpcId;
java.lang.String zone;
java.lang.String engineInstallUrl;
/**
* Sets the value of {@link MachineOptions#getAmi}
* @param ami the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder ami(java.lang.String ami) {
this.ami = ami;
return this;
}
/**
* Sets the value of {@link MachineOptions#getBlockDurationMinutes}
* @param blockDurationMinutes The amazonec2-block-duration-minutes parameter.
* AWS spot instance duration in minutes (60, 120, 180, 240, 300, or 360).
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder blockDurationMinutes(java.lang.Number blockDurationMinutes) {
this.blockDurationMinutes = blockDurationMinutes;
return this;
}
/**
* Sets the value of {@link MachineOptions#getIamInstanceProfile}
* @param iamInstanceProfile the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder iamInstanceProfile(java.lang.String iamInstanceProfile) {
this.iamInstanceProfile = iamInstanceProfile;
return this;
}
/**
* Sets the value of {@link MachineOptions#getInstanceType}
* @param instanceType the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder instanceType(java.lang.String instanceType) {
this.instanceType = instanceType;
return this;
}
/**
* Sets the value of {@link MachineOptions#getKeypairName}
* @param keypairName The amazonec2-keypair-name parameter.
* A set of security credentials that you use to prove your identity when connecting to an Amazon EC2 instance.
*
* using --amazonec2-keypair-name also requires --amazonec2-ssh-keypath
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder keypairName(java.lang.String keypairName) {
this.keypairName = keypairName;
return this;
}
/**
* Sets the value of {@link MachineOptions#getMetadataToken}
* @param metadataToken Whether the metadata token is required or optional.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder metadataToken(java.lang.String metadataToken) {
this.metadataToken = metadataToken;
return this;
}
/**
* Sets the value of {@link MachineOptions#getMetadataTokenResponseHopLimit}
* @param metadataTokenResponseHopLimit The number of network hops that the metadata token can travel.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder metadataTokenResponseHopLimit(java.lang.Number metadataTokenResponseHopLimit) {
this.metadataTokenResponseHopLimit = metadataTokenResponseHopLimit;
return this;
}
/**
* Sets the value of {@link MachineOptions#getPrivateAddressOnly}
* @param privateAddressOnly The amazonec2-private-address-only parameter.
* If true, your EC2 instance won’t get assigned a public IP. This is ok if your VPC is configured correctly with an Internet Gateway (IGW), NatGateway (NGW) and routing is fine, but it’s something to consider if you’ve got a more complex configuration.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder privateAddressOnly(java.lang.Boolean privateAddressOnly) {
this.privateAddressOnly = privateAddressOnly;
return this;
}
/**
* Sets the value of {@link MachineOptions#getRegion}
* @param region the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder region(java.lang.String region) {
this.region = region;
return this;
}
/**
* Sets the value of {@link MachineOptions#getRequestSpotInstance}
* @param requestSpotInstance The amazonec2-request-spot-instance parameter.
* Whether or not to request spot instances.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder requestSpotInstance(java.lang.Boolean requestSpotInstance) {
this.requestSpotInstance = requestSpotInstance;
return this;
}
/**
* Sets the value of {@link MachineOptions#getRootSize}
* @param rootSize The root disk size of the instance (in GB).
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder rootSize(java.lang.Number rootSize) {
this.rootSize = rootSize;
return this;
}
/**
* Sets the value of {@link MachineOptions#getSecurityGroup}
* @param securityGroup The SecurityGroup's GroupName, not the GroupId.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder securityGroup(java.lang.String securityGroup) {
this.securityGroup = securityGroup;
return this;
}
/**
* Sets the value of {@link MachineOptions#getSpotPrice}
* @param spotPrice The amazonec2-spot-price parameter.
* The bidding price for spot instances.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder spotPrice(java.lang.Number spotPrice) {
this.spotPrice = spotPrice;
return this;
}
/**
* Sets the value of {@link MachineOptions#getSshKeypath}
* @param sshKeypath The amazonec2-ssh-keypath parameter.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder sshKeypath(java.lang.String sshKeypath) {
this.sshKeypath = sshKeypath;
return this;
}
/**
* Sets the value of {@link MachineOptions#getSubnetId}
* @param subnetId the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder subnetId(java.lang.String subnetId) {
this.subnetId = subnetId;
return this;
}
/**
* Sets the value of {@link MachineOptions#getUseEbsOptimizedInstance}
* @param useEbsOptimizedInstance Create an EBS Optimized Instance, instance type must support it.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder useEbsOptimizedInstance(java.lang.Boolean useEbsOptimizedInstance) {
this.useEbsOptimizedInstance = useEbsOptimizedInstance;
return this;
}
/**
* Sets the value of {@link MachineOptions#getUsePrivateAddress}
* @param usePrivateAddress Use the private IP address of Docker Machines, but still create a public IP address.
* Useful to keep the traffic internal and avoid extra costs.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder usePrivateAddress(java.lang.Boolean usePrivateAddress) {
this.usePrivateAddress = usePrivateAddress;
return this;
}
/**
* Sets the value of {@link MachineOptions#getUserdata}
* @param userdata The path of the runner machine's userdata file on the manager instance used by the amazonec2 driver to create a new instance.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder userdata(java.lang.String userdata) {
this.userdata = userdata;
return this;
}
/**
* Sets the value of {@link MachineOptions#getVolumeType}
* @param volumeType The Amazon EBS volume type to be attached to the instance.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder volumeType(java.lang.String volumeType) {
this.volumeType = volumeType;
return this;
}
/**
* Sets the value of {@link MachineOptions#getVpcId}
* @param vpcId the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vpcId(java.lang.String vpcId) {
this.vpcId = vpcId;
return this;
}
/**
* Sets the value of {@link MachineOptions#getZone}
* @param zone Extract the availabilityZone last character for the needs of gitlab configuration.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder zone(java.lang.String zone) {
this.zone = zone;
return this;
}
/**
* Sets the value of {@link MachineOptions#getEngineInstallUrl}
* @param engineInstallUrl Custom URL to use for engine installation.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder engineInstallUrl(java.lang.String engineInstallUrl) {
this.engineInstallUrl = engineInstallUrl;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link MachineOptions}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public MachineOptions build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link MachineOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements MachineOptions {
private final java.lang.String ami;
private final java.lang.Number blockDurationMinutes;
private final java.lang.String iamInstanceProfile;
private final java.lang.String instanceType;
private final java.lang.String keypairName;
private final java.lang.String metadataToken;
private final java.lang.Number metadataTokenResponseHopLimit;
private final java.lang.Boolean privateAddressOnly;
private final java.lang.String region;
private final java.lang.Boolean requestSpotInstance;
private final java.lang.Number rootSize;
private final java.lang.String securityGroup;
private final java.lang.Number spotPrice;
private final java.lang.String sshKeypath;
private final java.lang.String subnetId;
private final java.lang.Boolean useEbsOptimizedInstance;
private final java.lang.Boolean usePrivateAddress;
private final java.lang.String userdata;
private final java.lang.String volumeType;
private final java.lang.String vpcId;
private final java.lang.String zone;
private final java.lang.String engineInstallUrl;
/**
* 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.ami = software.amazon.jsii.Kernel.get(this, "ami", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.blockDurationMinutes = software.amazon.jsii.Kernel.get(this, "blockDurationMinutes", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.iamInstanceProfile = software.amazon.jsii.Kernel.get(this, "iamInstanceProfile", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.instanceType = software.amazon.jsii.Kernel.get(this, "instanceType", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.keypairName = software.amazon.jsii.Kernel.get(this, "keypairName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.metadataToken = software.amazon.jsii.Kernel.get(this, "metadataToken", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.metadataTokenResponseHopLimit = software.amazon.jsii.Kernel.get(this, "metadataTokenResponseHopLimit", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.privateAddressOnly = software.amazon.jsii.Kernel.get(this, "privateAddressOnly", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.region = software.amazon.jsii.Kernel.get(this, "region", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.requestSpotInstance = software.amazon.jsii.Kernel.get(this, "requestSpotInstance", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.rootSize = software.amazon.jsii.Kernel.get(this, "rootSize", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.securityGroup = software.amazon.jsii.Kernel.get(this, "securityGroup", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.spotPrice = software.amazon.jsii.Kernel.get(this, "spotPrice", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.sshKeypath = software.amazon.jsii.Kernel.get(this, "sshKeypath", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.subnetId = software.amazon.jsii.Kernel.get(this, "subnetId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.useEbsOptimizedInstance = software.amazon.jsii.Kernel.get(this, "useEbsOptimizedInstance", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.usePrivateAddress = software.amazon.jsii.Kernel.get(this, "usePrivateAddress", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.userdata = software.amazon.jsii.Kernel.get(this, "userdata", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.volumeType = software.amazon.jsii.Kernel.get(this, "volumeType", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.vpcId = software.amazon.jsii.Kernel.get(this, "vpcId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.zone = software.amazon.jsii.Kernel.get(this, "zone", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.engineInstallUrl = software.amazon.jsii.Kernel.get(this, "engineInstallUrl", 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.ami = builder.ami;
this.blockDurationMinutes = builder.blockDurationMinutes;
this.iamInstanceProfile = builder.iamInstanceProfile;
this.instanceType = builder.instanceType;
this.keypairName = builder.keypairName;
this.metadataToken = builder.metadataToken;
this.metadataTokenResponseHopLimit = builder.metadataTokenResponseHopLimit;
this.privateAddressOnly = builder.privateAddressOnly;
this.region = builder.region;
this.requestSpotInstance = builder.requestSpotInstance;
this.rootSize = builder.rootSize;
this.securityGroup = builder.securityGroup;
this.spotPrice = builder.spotPrice;
this.sshKeypath = builder.sshKeypath;
this.subnetId = builder.subnetId;
this.useEbsOptimizedInstance = builder.useEbsOptimizedInstance;
this.usePrivateAddress = builder.usePrivateAddress;
this.userdata = builder.userdata;
this.volumeType = builder.volumeType;
this.vpcId = builder.vpcId;
this.zone = builder.zone;
this.engineInstallUrl = builder.engineInstallUrl;
}
@Override
public final java.lang.String getAmi() {
return this.ami;
}
@Override
public final java.lang.Number getBlockDurationMinutes() {
return this.blockDurationMinutes;
}
@Override
public final java.lang.String getIamInstanceProfile() {
return this.iamInstanceProfile;
}
@Override
public final java.lang.String getInstanceType() {
return this.instanceType;
}
@Override
public final java.lang.String getKeypairName() {
return this.keypairName;
}
@Override
public final java.lang.String getMetadataToken() {
return this.metadataToken;
}
@Override
public final java.lang.Number getMetadataTokenResponseHopLimit() {
return this.metadataTokenResponseHopLimit;
}
@Override
public final java.lang.Boolean getPrivateAddressOnly() {
return this.privateAddressOnly;
}
@Override
public final java.lang.String getRegion() {
return this.region;
}
@Override
public final java.lang.Boolean getRequestSpotInstance() {
return this.requestSpotInstance;
}
@Override
public final java.lang.Number getRootSize() {
return this.rootSize;
}
@Override
public final java.lang.String getSecurityGroup() {
return this.securityGroup;
}
@Override
public final java.lang.Number getSpotPrice() {
return this.spotPrice;
}
@Override
public final java.lang.String getSshKeypath() {
return this.sshKeypath;
}
@Override
public final java.lang.String getSubnetId() {
return this.subnetId;
}
@Override
public final java.lang.Boolean getUseEbsOptimizedInstance() {
return this.useEbsOptimizedInstance;
}
@Override
public final java.lang.Boolean getUsePrivateAddress() {
return this.usePrivateAddress;
}
@Override
public final java.lang.String getUserdata() {
return this.userdata;
}
@Override
public final java.lang.String getVolumeType() {
return this.volumeType;
}
@Override
public final java.lang.String getVpcId() {
return this.vpcId;
}
@Override
public final java.lang.String getZone() {
return this.zone;
}
@Override
public final java.lang.String getEngineInstallUrl() {
return this.engineInstallUrl;
}
@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.getAmi() != null) {
data.set("ami", om.valueToTree(this.getAmi()));
}
if (this.getBlockDurationMinutes() != null) {
data.set("blockDurationMinutes", om.valueToTree(this.getBlockDurationMinutes()));
}
if (this.getIamInstanceProfile() != null) {
data.set("iamInstanceProfile", om.valueToTree(this.getIamInstanceProfile()));
}
if (this.getInstanceType() != null) {
data.set("instanceType", om.valueToTree(this.getInstanceType()));
}
if (this.getKeypairName() != null) {
data.set("keypairName", om.valueToTree(this.getKeypairName()));
}
if (this.getMetadataToken() != null) {
data.set("metadataToken", om.valueToTree(this.getMetadataToken()));
}
if (this.getMetadataTokenResponseHopLimit() != null) {
data.set("metadataTokenResponseHopLimit", om.valueToTree(this.getMetadataTokenResponseHopLimit()));
}
if (this.getPrivateAddressOnly() != null) {
data.set("privateAddressOnly", om.valueToTree(this.getPrivateAddressOnly()));
}
if (this.getRegion() != null) {
data.set("region", om.valueToTree(this.getRegion()));
}
if (this.getRequestSpotInstance() != null) {
data.set("requestSpotInstance", om.valueToTree(this.getRequestSpotInstance()));
}
if (this.getRootSize() != null) {
data.set("rootSize", om.valueToTree(this.getRootSize()));
}
if (this.getSecurityGroup() != null) {
data.set("securityGroup", om.valueToTree(this.getSecurityGroup()));
}
if (this.getSpotPrice() != null) {
data.set("spotPrice", om.valueToTree(this.getSpotPrice()));
}
if (this.getSshKeypath() != null) {
data.set("sshKeypath", om.valueToTree(this.getSshKeypath()));
}
if (this.getSubnetId() != null) {
data.set("subnetId", om.valueToTree(this.getSubnetId()));
}
if (this.getUseEbsOptimizedInstance() != null) {
data.set("useEbsOptimizedInstance", om.valueToTree(this.getUseEbsOptimizedInstance()));
}
if (this.getUsePrivateAddress() != null) {
data.set("usePrivateAddress", om.valueToTree(this.getUsePrivateAddress()));
}
if (this.getUserdata() != null) {
data.set("userdata", om.valueToTree(this.getUserdata()));
}
if (this.getVolumeType() != null) {
data.set("volumeType", om.valueToTree(this.getVolumeType()));
}
if (this.getVpcId() != null) {
data.set("vpcId", om.valueToTree(this.getVpcId()));
}
if (this.getZone() != null) {
data.set("zone", om.valueToTree(this.getZone()));
}
if (this.getEngineInstallUrl() != null) {
data.set("engineInstallUrl", om.valueToTree(this.getEngineInstallUrl()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@pepperize/cdk-autoscaling-gitlab-runner.MachineOptions"));
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;
MachineOptions.Jsii$Proxy that = (MachineOptions.Jsii$Proxy) o;
if (this.ami != null ? !this.ami.equals(that.ami) : that.ami != null) return false;
if (this.blockDurationMinutes != null ? !this.blockDurationMinutes.equals(that.blockDurationMinutes) : that.blockDurationMinutes != null) return false;
if (this.iamInstanceProfile != null ? !this.iamInstanceProfile.equals(that.iamInstanceProfile) : that.iamInstanceProfile != null) return false;
if (this.instanceType != null ? !this.instanceType.equals(that.instanceType) : that.instanceType != null) return false;
if (this.keypairName != null ? !this.keypairName.equals(that.keypairName) : that.keypairName != null) return false;
if (this.metadataToken != null ? !this.metadataToken.equals(that.metadataToken) : that.metadataToken != null) return false;
if (this.metadataTokenResponseHopLimit != null ? !this.metadataTokenResponseHopLimit.equals(that.metadataTokenResponseHopLimit) : that.metadataTokenResponseHopLimit != null) return false;
if (this.privateAddressOnly != null ? !this.privateAddressOnly.equals(that.privateAddressOnly) : that.privateAddressOnly != null) return false;
if (this.region != null ? !this.region.equals(that.region) : that.region != null) return false;
if (this.requestSpotInstance != null ? !this.requestSpotInstance.equals(that.requestSpotInstance) : that.requestSpotInstance != null) return false;
if (this.rootSize != null ? !this.rootSize.equals(that.rootSize) : that.rootSize != null) return false;
if (this.securityGroup != null ? !this.securityGroup.equals(that.securityGroup) : that.securityGroup != null) return false;
if (this.spotPrice != null ? !this.spotPrice.equals(that.spotPrice) : that.spotPrice != null) return false;
if (this.sshKeypath != null ? !this.sshKeypath.equals(that.sshKeypath) : that.sshKeypath != null) return false;
if (this.subnetId != null ? !this.subnetId.equals(that.subnetId) : that.subnetId != null) return false;
if (this.useEbsOptimizedInstance != null ? !this.useEbsOptimizedInstance.equals(that.useEbsOptimizedInstance) : that.useEbsOptimizedInstance != null) return false;
if (this.usePrivateAddress != null ? !this.usePrivateAddress.equals(that.usePrivateAddress) : that.usePrivateAddress != null) return false;
if (this.userdata != null ? !this.userdata.equals(that.userdata) : that.userdata != null) return false;
if (this.volumeType != null ? !this.volumeType.equals(that.volumeType) : that.volumeType != null) return false;
if (this.vpcId != null ? !this.vpcId.equals(that.vpcId) : that.vpcId != null) return false;
if (this.zone != null ? !this.zone.equals(that.zone) : that.zone != null) return false;
return this.engineInstallUrl != null ? this.engineInstallUrl.equals(that.engineInstallUrl) : that.engineInstallUrl == null;
}
@Override
public final int hashCode() {
int result = this.ami != null ? this.ami.hashCode() : 0;
result = 31 * result + (this.blockDurationMinutes != null ? this.blockDurationMinutes.hashCode() : 0);
result = 31 * result + (this.iamInstanceProfile != null ? this.iamInstanceProfile.hashCode() : 0);
result = 31 * result + (this.instanceType != null ? this.instanceType.hashCode() : 0);
result = 31 * result + (this.keypairName != null ? this.keypairName.hashCode() : 0);
result = 31 * result + (this.metadataToken != null ? this.metadataToken.hashCode() : 0);
result = 31 * result + (this.metadataTokenResponseHopLimit != null ? this.metadataTokenResponseHopLimit.hashCode() : 0);
result = 31 * result + (this.privateAddressOnly != null ? this.privateAddressOnly.hashCode() : 0);
result = 31 * result + (this.region != null ? this.region.hashCode() : 0);
result = 31 * result + (this.requestSpotInstance != null ? this.requestSpotInstance.hashCode() : 0);
result = 31 * result + (this.rootSize != null ? this.rootSize.hashCode() : 0);
result = 31 * result + (this.securityGroup != null ? this.securityGroup.hashCode() : 0);
result = 31 * result + (this.spotPrice != null ? this.spotPrice.hashCode() : 0);
result = 31 * result + (this.sshKeypath != null ? this.sshKeypath.hashCode() : 0);
result = 31 * result + (this.subnetId != null ? this.subnetId.hashCode() : 0);
result = 31 * result + (this.useEbsOptimizedInstance != null ? this.useEbsOptimizedInstance.hashCode() : 0);
result = 31 * result + (this.usePrivateAddress != null ? this.usePrivateAddress.hashCode() : 0);
result = 31 * result + (this.userdata != null ? this.userdata.hashCode() : 0);
result = 31 * result + (this.volumeType != null ? this.volumeType.hashCode() : 0);
result = 31 * result + (this.vpcId != null ? this.vpcId.hashCode() : 0);
result = 31 * result + (this.zone != null ? this.zone.hashCode() : 0);
result = 31 * result + (this.engineInstallUrl != null ? this.engineInstallUrl.hashCode() : 0);
return result;
}
}
}