com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManagerBaseProps Maven / Gradle / Ivy
Show all versions of cdk-autoscaling-gitlab-runner Show documentation
package com.pepperize.cdk.autoscaling_gitlab_runner;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.98.0 (build 00b106d)", date = "2024-05-01T02:44:42.320Z")
@software.amazon.jsii.Jsii(module = com.pepperize.cdk.autoscaling_gitlab_runner.$Module.class, fqn = "@pepperize/cdk-autoscaling-gitlab-runner.GitlabRunnerAutoscalingManagerBaseProps")
@software.amazon.jsii.Jsii.Proxy(GitlabRunnerAutoscalingManagerBaseProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface GitlabRunnerAutoscalingManagerBaseProps extends software.amazon.jsii.JsiiSerializable {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable com.pepperize.cdk.autoscaling_gitlab_runner.DockerMachineVersion getDockerMachineVersion() {
return null;
}
/**
* Instance type for manager EC2 instance.
*
* It's a combination of a class and size.
*
* Default: InstanceType.of(InstanceClass.T3, InstanceSize.NANO)
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.InstanceType getInstanceType() {
return null;
}
/**
* A set of security credentials that you use to prove your identity when connecting to an Amazon EC2 instance.
*
* You won't be able to ssh into an instance without the Key Pair.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getKeyPairName() {
return null;
}
/**
* An Amazon Machine Image ID for the Manager EC2 instance.
*
* If empty the latest Amazon 2 Image will be looked up.
*
* Should be RHEL flavor like Amazon Linux 2 with yum available for instance initialization.
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-init.html
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.IMachineImage getMachineImage() {
return null;
}
/**
* @return a {@link Builder} of {@link GitlabRunnerAutoscalingManagerBaseProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link GitlabRunnerAutoscalingManagerBaseProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
com.pepperize.cdk.autoscaling_gitlab_runner.DockerMachineVersion dockerMachineVersion;
software.amazon.awscdk.services.ec2.InstanceType instanceType;
java.lang.String keyPairName;
software.amazon.awscdk.services.ec2.IMachineImage machineImage;
/**
* Sets the value of {@link GitlabRunnerAutoscalingManagerBaseProps#getDockerMachineVersion}
* @param dockerMachineVersion the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder dockerMachineVersion(com.pepperize.cdk.autoscaling_gitlab_runner.DockerMachineVersion dockerMachineVersion) {
this.dockerMachineVersion = dockerMachineVersion;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingManagerBaseProps#getInstanceType}
* @param instanceType Instance type for manager EC2 instance.
* It's a combination of a class and size.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder instanceType(software.amazon.awscdk.services.ec2.InstanceType instanceType) {
this.instanceType = instanceType;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingManagerBaseProps#getKeyPairName}
* @param keyPairName A set of security credentials that you use to prove your identity when connecting to an Amazon EC2 instance.
* You won't be able to ssh into an instance without the Key Pair.
* @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 GitlabRunnerAutoscalingManagerBaseProps#getMachineImage}
* @param machineImage An Amazon Machine Image ID for the Manager EC2 instance.
* If empty the latest Amazon 2 Image will be looked up.
*
* Should be RHEL flavor like Amazon Linux 2 with yum available for instance initialization.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder machineImage(software.amazon.awscdk.services.ec2.IMachineImage machineImage) {
this.machineImage = machineImage;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link GitlabRunnerAutoscalingManagerBaseProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public GitlabRunnerAutoscalingManagerBaseProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link GitlabRunnerAutoscalingManagerBaseProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements GitlabRunnerAutoscalingManagerBaseProps {
private final com.pepperize.cdk.autoscaling_gitlab_runner.DockerMachineVersion dockerMachineVersion;
private final software.amazon.awscdk.services.ec2.InstanceType instanceType;
private final java.lang.String keyPairName;
private final software.amazon.awscdk.services.ec2.IMachineImage machineImage;
/**
* 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.dockerMachineVersion = software.amazon.jsii.Kernel.get(this, "dockerMachineVersion", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.autoscaling_gitlab_runner.DockerMachineVersion.class));
this.instanceType = software.amazon.jsii.Kernel.get(this, "instanceType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.InstanceType.class));
this.keyPairName = software.amazon.jsii.Kernel.get(this, "keyPairName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.machineImage = software.amazon.jsii.Kernel.get(this, "machineImage", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IMachineImage.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.dockerMachineVersion = builder.dockerMachineVersion;
this.instanceType = builder.instanceType;
this.keyPairName = builder.keyPairName;
this.machineImage = builder.machineImage;
}
@Override
public final com.pepperize.cdk.autoscaling_gitlab_runner.DockerMachineVersion getDockerMachineVersion() {
return this.dockerMachineVersion;
}
@Override
public final software.amazon.awscdk.services.ec2.InstanceType getInstanceType() {
return this.instanceType;
}
@Override
public final java.lang.String getKeyPairName() {
return this.keyPairName;
}
@Override
public final software.amazon.awscdk.services.ec2.IMachineImage getMachineImage() {
return this.machineImage;
}
@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.getDockerMachineVersion() != null) {
data.set("dockerMachineVersion", om.valueToTree(this.getDockerMachineVersion()));
}
if (this.getInstanceType() != null) {
data.set("instanceType", om.valueToTree(this.getInstanceType()));
}
if (this.getKeyPairName() != null) {
data.set("keyPairName", om.valueToTree(this.getKeyPairName()));
}
if (this.getMachineImage() != null) {
data.set("machineImage", om.valueToTree(this.getMachineImage()));
}
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.GitlabRunnerAutoscalingManagerBaseProps"));
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;
GitlabRunnerAutoscalingManagerBaseProps.Jsii$Proxy that = (GitlabRunnerAutoscalingManagerBaseProps.Jsii$Proxy) o;
if (this.dockerMachineVersion != null ? !this.dockerMachineVersion.equals(that.dockerMachineVersion) : that.dockerMachineVersion != 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;
return this.machineImage != null ? this.machineImage.equals(that.machineImage) : that.machineImage == null;
}
@Override
public final int hashCode() {
int result = this.dockerMachineVersion != null ? this.dockerMachineVersion.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.machineImage != null ? this.machineImage.hashCode() : 0);
return result;
}
}
}