com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManagerProps 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.321Z")
@software.amazon.jsii.Jsii(module = com.pepperize.cdk.autoscaling_gitlab_runner.$Module.class, fqn = "@pepperize/cdk-autoscaling-gitlab-runner.GitlabRunnerAutoscalingManagerProps")
@software.amazon.jsii.Jsii.Proxy(GitlabRunnerAutoscalingManagerProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface GitlabRunnerAutoscalingManagerProps extends software.amazon.jsii.JsiiSerializable, com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManagerBaseProps {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.s3.IBucket getCacheBucket();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull com.pepperize.cdk.autoscaling_gitlab_runner.Network getNetwork();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.util.List getRunners();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull com.pepperize.cdk.security_group.SecurityGroup getRunnersSecurityGroup();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable com.pepperize.cdk.autoscaling_gitlab_runner.GlobalConfiguration getGlobalConfiguration() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.iam.IRole getRole() {
return null;
}
/**
* @return a {@link Builder} of {@link GitlabRunnerAutoscalingManagerProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link GitlabRunnerAutoscalingManagerProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
software.amazon.awscdk.services.s3.IBucket cacheBucket;
com.pepperize.cdk.autoscaling_gitlab_runner.Network network;
java.util.List runners;
com.pepperize.cdk.security_group.SecurityGroup runnersSecurityGroup;
com.pepperize.cdk.autoscaling_gitlab_runner.GlobalConfiguration globalConfiguration;
software.amazon.awscdk.services.iam.IRole role;
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 GitlabRunnerAutoscalingManagerProps#getCacheBucket}
* @param cacheBucket the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder cacheBucket(software.amazon.awscdk.services.s3.IBucket cacheBucket) {
this.cacheBucket = cacheBucket;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingManagerProps#getNetwork}
* @param network the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder network(com.pepperize.cdk.autoscaling_gitlab_runner.Network network) {
this.network = network;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingManagerProps#getRunners}
* @param runners the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder runners(java.util.List extends com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingJobRunner> runners) {
this.runners = (java.util.List)runners;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingManagerProps#getRunnersSecurityGroup}
* @param runnersSecurityGroup the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder runnersSecurityGroup(com.pepperize.cdk.security_group.SecurityGroup runnersSecurityGroup) {
this.runnersSecurityGroup = runnersSecurityGroup;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingManagerProps#getGlobalConfiguration}
* @param globalConfiguration the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder globalConfiguration(com.pepperize.cdk.autoscaling_gitlab_runner.GlobalConfiguration globalConfiguration) {
this.globalConfiguration = globalConfiguration;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingManagerProps#getRole}
* @param role the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder role(software.amazon.awscdk.services.iam.IRole role) {
this.role = role;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingManagerProps#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 GitlabRunnerAutoscalingManagerProps#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 GitlabRunnerAutoscalingManagerProps#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 GitlabRunnerAutoscalingManagerProps#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 GitlabRunnerAutoscalingManagerProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public GitlabRunnerAutoscalingManagerProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link GitlabRunnerAutoscalingManagerProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements GitlabRunnerAutoscalingManagerProps {
private final software.amazon.awscdk.services.s3.IBucket cacheBucket;
private final com.pepperize.cdk.autoscaling_gitlab_runner.Network network;
private final java.util.List runners;
private final com.pepperize.cdk.security_group.SecurityGroup runnersSecurityGroup;
private final com.pepperize.cdk.autoscaling_gitlab_runner.GlobalConfiguration globalConfiguration;
private final software.amazon.awscdk.services.iam.IRole role;
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.cacheBucket = software.amazon.jsii.Kernel.get(this, "cacheBucket", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.IBucket.class));
this.network = software.amazon.jsii.Kernel.get(this, "network", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.autoscaling_gitlab_runner.Network.class));
this.runners = software.amazon.jsii.Kernel.get(this, "runners", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingJobRunner.class)));
this.runnersSecurityGroup = software.amazon.jsii.Kernel.get(this, "runnersSecurityGroup", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.security_group.SecurityGroup.class));
this.globalConfiguration = software.amazon.jsii.Kernel.get(this, "globalConfiguration", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.autoscaling_gitlab_runner.GlobalConfiguration.class));
this.role = software.amazon.jsii.Kernel.get(this, "role", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class));
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}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.cacheBucket = java.util.Objects.requireNonNull(builder.cacheBucket, "cacheBucket is required");
this.network = java.util.Objects.requireNonNull(builder.network, "network is required");
this.runners = (java.util.List)java.util.Objects.requireNonNull(builder.runners, "runners is required");
this.runnersSecurityGroup = java.util.Objects.requireNonNull(builder.runnersSecurityGroup, "runnersSecurityGroup is required");
this.globalConfiguration = builder.globalConfiguration;
this.role = builder.role;
this.dockerMachineVersion = builder.dockerMachineVersion;
this.instanceType = builder.instanceType;
this.keyPairName = builder.keyPairName;
this.machineImage = builder.machineImage;
}
@Override
public final software.amazon.awscdk.services.s3.IBucket getCacheBucket() {
return this.cacheBucket;
}
@Override
public final com.pepperize.cdk.autoscaling_gitlab_runner.Network getNetwork() {
return this.network;
}
@Override
public final java.util.List getRunners() {
return this.runners;
}
@Override
public final com.pepperize.cdk.security_group.SecurityGroup getRunnersSecurityGroup() {
return this.runnersSecurityGroup;
}
@Override
public final com.pepperize.cdk.autoscaling_gitlab_runner.GlobalConfiguration getGlobalConfiguration() {
return this.globalConfiguration;
}
@Override
public final software.amazon.awscdk.services.iam.IRole getRole() {
return this.role;
}
@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();
data.set("cacheBucket", om.valueToTree(this.getCacheBucket()));
data.set("network", om.valueToTree(this.getNetwork()));
data.set("runners", om.valueToTree(this.getRunners()));
data.set("runnersSecurityGroup", om.valueToTree(this.getRunnersSecurityGroup()));
if (this.getGlobalConfiguration() != null) {
data.set("globalConfiguration", om.valueToTree(this.getGlobalConfiguration()));
}
if (this.getRole() != null) {
data.set("role", om.valueToTree(this.getRole()));
}
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.GitlabRunnerAutoscalingManagerProps"));
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;
GitlabRunnerAutoscalingManagerProps.Jsii$Proxy that = (GitlabRunnerAutoscalingManagerProps.Jsii$Proxy) o;
if (!cacheBucket.equals(that.cacheBucket)) return false;
if (!network.equals(that.network)) return false;
if (!runners.equals(that.runners)) return false;
if (!runnersSecurityGroup.equals(that.runnersSecurityGroup)) return false;
if (this.globalConfiguration != null ? !this.globalConfiguration.equals(that.globalConfiguration) : that.globalConfiguration != null) return false;
if (this.role != null ? !this.role.equals(that.role) : that.role != null) return false;
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.cacheBucket.hashCode();
result = 31 * result + (this.network.hashCode());
result = 31 * result + (this.runners.hashCode());
result = 31 * result + (this.runnersSecurityGroup.hashCode());
result = 31 * result + (this.globalConfiguration != null ? this.globalConfiguration.hashCode() : 0);
result = 31 * result + (this.role != null ? this.role.hashCode() : 0);
result = 31 * 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;
}
}
}