com.cloudsnorkel.cdk.github.runners.EcsRunnerProviderProps Maven / Gradle / Ivy
Show all versions of cdk.github.runners Show documentation
package com.cloudsnorkel.cdk.github.runners;
/**
* (experimental) Properties for EcsRunnerProvider.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-14T02:42:19.417Z")
@software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.github.runners.$Module.class, fqn = "@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps")
@software.amazon.jsii.Jsii.Proxy(EcsRunnerProviderProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface EcsRunnerProviderProps extends software.amazon.jsii.JsiiSerializable, com.cloudsnorkel.cdk.github.runners.RunnerProviderProps {
/**
* (experimental) Assign public IP to the runner task.
*
* Make sure the task will have access to GitHub. A public IP might be required unless you have NAT gateway.
*
* Default: true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getAssignPublicIp() {
return null;
}
/**
* (experimental) Existing capacity provider to use.
*
* Make sure the AMI used by the capacity provider is compatible with ECS.
*
* Default: new capacity provider
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ecs.AsgCapacityProvider getCapacityProvider() {
return null;
}
/**
* (experimental) Existing ECS cluster to use.
*
* Default: a new cluster
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ecs.Cluster getCluster() {
return null;
}
/**
* (experimental) The number of cpu units used by the task.
*
* 1024 units is 1 vCPU. Fractions of a vCPU are supported.
*
* Default: 1024
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getCpu() {
return null;
}
/**
* (experimental) Support building and running Docker images by enabling Docker-in-Docker (dind) and the required CodeBuild privileged mode.
*
* Disabling this can
* speed up provisioning of CodeBuild runners. If you don't intend on running or building Docker images, disable this for faster start-up times.
*
* Default: true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getDockerInDocker() {
return null;
}
/**
* (experimental) Runner image builder used to build Docker images containing GitHub Runner and all requirements.
*
* The image builder determines the OS and architecture of the runner.
*
* Default: EcsRunnerProvider.imageBuilder()
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.IRunnerImageBuilder getImageBuilder() {
return null;
}
/**
* (experimental) Instance type of ECS cluster instances.
*
* Only used when creating a new cluster.
*
* Default: m6i.large or m6g.large
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.InstanceType getInstanceType() {
return null;
}
/**
* (experimental) GitHub Actions labels used for this provider.
*
* These labels are used to identify which provider should spawn a new on-demand runner. Every job sends a webhook with the labels it's looking for
* based on runs-on. We match the labels from the webhook with the labels specified here. If all the labels specified here are present in the
* job's labels, this provider will be chosen and spawn a new runner.
*
* Default: ['ecs']
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getLabels() {
return null;
}
/**
* (experimental) The maximum number of instances to run in the cluster.
*
* Only used when creating a new cluster.
*
* Default: 5
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getMaxInstances() {
return null;
}
/**
* (experimental) The amount (in MiB) of memory used by the task.
*
* Default: 3500, unless `memoryReservationMiB` is used and then it's undefined
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getMemoryLimitMiB() {
return null;
}
/**
* (experimental) The soft limit (in MiB) of memory to reserve for the container.
*
* Default: undefined
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getMemoryReservationMiB() {
return null;
}
/**
* (experimental) The minimum number of instances to run in the cluster.
*
* Only used when creating a new cluster.
*
* Default: 0
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getMinInstances() {
return null;
}
/**
* (experimental) Security groups to assign to the task.
*
* Default: a new security group
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getSecurityGroups() {
return null;
}
/**
* (experimental) Use spot capacity.
*
* Default: false (true if spotMaxPrice is specified)
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getSpot() {
return null;
}
/**
* (experimental) Maximum price for spot instances.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getSpotMaxPrice() {
return null;
}
/**
* (experimental) Size of volume available for launched cluster instances.
*
* This modifies the boot volume size and doesn't add any additional volumes.
*
* Each instance can be used by multiple runners, so make sure there is enough space for all of them.
*
* Default: default size for AMI (usually 30GB for Linux and 50GB for Windows)
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.Size getStorageSize() {
return null;
}
/**
* (experimental) Subnets to run the runners in.
*
* Default: ECS default
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.SubnetSelection getSubnetSelection() {
return null;
}
/**
* (experimental) VPC to launch the runners in.
*
* Default: default account VPC
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.IVpc getVpc() {
return null;
}
/**
* @return a {@link Builder} of {@link EcsRunnerProviderProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link EcsRunnerProviderProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Boolean assignPublicIp;
software.amazon.awscdk.services.ecs.AsgCapacityProvider capacityProvider;
software.amazon.awscdk.services.ecs.Cluster cluster;
java.lang.Number cpu;
java.lang.Boolean dockerInDocker;
com.cloudsnorkel.cdk.github.runners.IRunnerImageBuilder imageBuilder;
software.amazon.awscdk.services.ec2.InstanceType instanceType;
java.util.List labels;
java.lang.Number maxInstances;
java.lang.Number memoryLimitMiB;
java.lang.Number memoryReservationMiB;
java.lang.Number minInstances;
java.util.List securityGroups;
java.lang.Boolean spot;
java.lang.String spotMaxPrice;
software.amazon.awscdk.Size storageSize;
software.amazon.awscdk.services.ec2.SubnetSelection subnetSelection;
software.amazon.awscdk.services.ec2.IVpc vpc;
software.amazon.awscdk.services.logs.RetentionDays logRetention;
com.cloudsnorkel.cdk.github.runners.ProviderRetryOptions retryOptions;
/**
* Sets the value of {@link EcsRunnerProviderProps#getAssignPublicIp}
* @param assignPublicIp Assign public IP to the runner task.
* Make sure the task will have access to GitHub. A public IP might be required unless you have NAT gateway.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder assignPublicIp(java.lang.Boolean assignPublicIp) {
this.assignPublicIp = assignPublicIp;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getCapacityProvider}
* @param capacityProvider Existing capacity provider to use.
* Make sure the AMI used by the capacity provider is compatible with ECS.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder capacityProvider(software.amazon.awscdk.services.ecs.AsgCapacityProvider capacityProvider) {
this.capacityProvider = capacityProvider;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getCluster}
* @param cluster Existing ECS cluster to use.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder cluster(software.amazon.awscdk.services.ecs.Cluster cluster) {
this.cluster = cluster;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getCpu}
* @param cpu The number of cpu units used by the task.
* 1024 units is 1 vCPU. Fractions of a vCPU are supported.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder cpu(java.lang.Number cpu) {
this.cpu = cpu;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getDockerInDocker}
* @param dockerInDocker Support building and running Docker images by enabling Docker-in-Docker (dind) and the required CodeBuild privileged mode.
* Disabling this can
* speed up provisioning of CodeBuild runners. If you don't intend on running or building Docker images, disable this for faster start-up times.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder dockerInDocker(java.lang.Boolean dockerInDocker) {
this.dockerInDocker = dockerInDocker;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getImageBuilder}
* @param imageBuilder Runner image builder used to build Docker images containing GitHub Runner and all requirements.
* The image builder determines the OS and architecture of the runner.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder imageBuilder(com.cloudsnorkel.cdk.github.runners.IRunnerImageBuilder imageBuilder) {
this.imageBuilder = imageBuilder;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getInstanceType}
* @param instanceType Instance type of ECS cluster instances.
* Only used when creating a new cluster.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder instanceType(software.amazon.awscdk.services.ec2.InstanceType instanceType) {
this.instanceType = instanceType;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getLabels}
* @param labels GitHub Actions labels used for this provider.
* These labels are used to identify which provider should spawn a new on-demand runner. Every job sends a webhook with the labels it's looking for
* based on runs-on. We match the labels from the webhook with the labels specified here. If all the labels specified here are present in the
* job's labels, this provider will be chosen and spawn a new runner.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder labels(java.util.List labels) {
this.labels = labels;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getMaxInstances}
* @param maxInstances The maximum number of instances to run in the cluster.
* Only used when creating a new cluster.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder maxInstances(java.lang.Number maxInstances) {
this.maxInstances = maxInstances;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getMemoryLimitMiB}
* @param memoryLimitMiB The amount (in MiB) of memory used by the task.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder memoryLimitMiB(java.lang.Number memoryLimitMiB) {
this.memoryLimitMiB = memoryLimitMiB;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getMemoryReservationMiB}
* @param memoryReservationMiB The soft limit (in MiB) of memory to reserve for the container.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder memoryReservationMiB(java.lang.Number memoryReservationMiB) {
this.memoryReservationMiB = memoryReservationMiB;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getMinInstances}
* @param minInstances The minimum number of instances to run in the cluster.
* Only used when creating a new cluster.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder minInstances(java.lang.Number minInstances) {
this.minInstances = minInstances;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getSecurityGroups}
* @param securityGroups Security groups to assign to the task.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder securityGroups(java.util.List extends software.amazon.awscdk.services.ec2.ISecurityGroup> securityGroups) {
this.securityGroups = (java.util.List)securityGroups;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getSpot}
* @param spot Use spot capacity.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder spot(java.lang.Boolean spot) {
this.spot = spot;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getSpotMaxPrice}
* @param spotMaxPrice Maximum price for spot instances.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder spotMaxPrice(java.lang.String spotMaxPrice) {
this.spotMaxPrice = spotMaxPrice;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getStorageSize}
* @param storageSize Size of volume available for launched cluster instances.
* This modifies the boot volume size and doesn't add any additional volumes.
*
* Each instance can be used by multiple runners, so make sure there is enough space for all of them.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder storageSize(software.amazon.awscdk.Size storageSize) {
this.storageSize = storageSize;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getSubnetSelection}
* @param subnetSelection Subnets to run the runners in.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder subnetSelection(software.amazon.awscdk.services.ec2.SubnetSelection subnetSelection) {
this.subnetSelection = subnetSelection;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getVpc}
* @param vpc VPC to launch the runners in.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder vpc(software.amazon.awscdk.services.ec2.IVpc vpc) {
this.vpc = vpc;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getLogRetention}
* @param logRetention The number of days log events are kept in CloudWatch Logs.
* When updating
* this property, unsetting it doesn't remove the log retention policy. To
* remove the retention policy, set the value to INFINITE
.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder logRetention(software.amazon.awscdk.services.logs.RetentionDays logRetention) {
this.logRetention = logRetention;
return this;
}
/**
* Sets the value of {@link EcsRunnerProviderProps#getRetryOptions}
* @param retryOptions the value to be set.
* @return {@code this}
* @deprecated use {@link retryOptions } on {@link GitHubRunners } instead
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder retryOptions(com.cloudsnorkel.cdk.github.runners.ProviderRetryOptions retryOptions) {
this.retryOptions = retryOptions;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link EcsRunnerProviderProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public EcsRunnerProviderProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link EcsRunnerProviderProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements EcsRunnerProviderProps {
private final java.lang.Boolean assignPublicIp;
private final software.amazon.awscdk.services.ecs.AsgCapacityProvider capacityProvider;
private final software.amazon.awscdk.services.ecs.Cluster cluster;
private final java.lang.Number cpu;
private final java.lang.Boolean dockerInDocker;
private final com.cloudsnorkel.cdk.github.runners.IRunnerImageBuilder imageBuilder;
private final software.amazon.awscdk.services.ec2.InstanceType instanceType;
private final java.util.List labels;
private final java.lang.Number maxInstances;
private final java.lang.Number memoryLimitMiB;
private final java.lang.Number memoryReservationMiB;
private final java.lang.Number minInstances;
private final java.util.List securityGroups;
private final java.lang.Boolean spot;
private final java.lang.String spotMaxPrice;
private final software.amazon.awscdk.Size storageSize;
private final software.amazon.awscdk.services.ec2.SubnetSelection subnetSelection;
private final software.amazon.awscdk.services.ec2.IVpc vpc;
private final software.amazon.awscdk.services.logs.RetentionDays logRetention;
private final com.cloudsnorkel.cdk.github.runners.ProviderRetryOptions retryOptions;
/**
* 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.assignPublicIp = software.amazon.jsii.Kernel.get(this, "assignPublicIp", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.capacityProvider = software.amazon.jsii.Kernel.get(this, "capacityProvider", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.AsgCapacityProvider.class));
this.cluster = software.amazon.jsii.Kernel.get(this, "cluster", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.Cluster.class));
this.cpu = software.amazon.jsii.Kernel.get(this, "cpu", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.dockerInDocker = software.amazon.jsii.Kernel.get(this, "dockerInDocker", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.imageBuilder = software.amazon.jsii.Kernel.get(this, "imageBuilder", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.IRunnerImageBuilder.class));
this.instanceType = software.amazon.jsii.Kernel.get(this, "instanceType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.InstanceType.class));
this.labels = software.amazon.jsii.Kernel.get(this, "labels", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.maxInstances = software.amazon.jsii.Kernel.get(this, "maxInstances", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.memoryLimitMiB = software.amazon.jsii.Kernel.get(this, "memoryLimitMiB", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.memoryReservationMiB = software.amazon.jsii.Kernel.get(this, "memoryReservationMiB", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.minInstances = software.amazon.jsii.Kernel.get(this, "minInstances", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.securityGroups = software.amazon.jsii.Kernel.get(this, "securityGroups", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISecurityGroup.class)));
this.spot = software.amazon.jsii.Kernel.get(this, "spot", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.spotMaxPrice = software.amazon.jsii.Kernel.get(this, "spotMaxPrice", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.storageSize = software.amazon.jsii.Kernel.get(this, "storageSize", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Size.class));
this.subnetSelection = software.amazon.jsii.Kernel.get(this, "subnetSelection", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.SubnetSelection.class));
this.vpc = software.amazon.jsii.Kernel.get(this, "vpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class));
this.logRetention = software.amazon.jsii.Kernel.get(this, "logRetention", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.logs.RetentionDays.class));
this.retryOptions = software.amazon.jsii.Kernel.get(this, "retryOptions", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.ProviderRetryOptions.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.assignPublicIp = builder.assignPublicIp;
this.capacityProvider = builder.capacityProvider;
this.cluster = builder.cluster;
this.cpu = builder.cpu;
this.dockerInDocker = builder.dockerInDocker;
this.imageBuilder = builder.imageBuilder;
this.instanceType = builder.instanceType;
this.labels = builder.labels;
this.maxInstances = builder.maxInstances;
this.memoryLimitMiB = builder.memoryLimitMiB;
this.memoryReservationMiB = builder.memoryReservationMiB;
this.minInstances = builder.minInstances;
this.securityGroups = (java.util.List)builder.securityGroups;
this.spot = builder.spot;
this.spotMaxPrice = builder.spotMaxPrice;
this.storageSize = builder.storageSize;
this.subnetSelection = builder.subnetSelection;
this.vpc = builder.vpc;
this.logRetention = builder.logRetention;
this.retryOptions = builder.retryOptions;
}
@Override
public final java.lang.Boolean getAssignPublicIp() {
return this.assignPublicIp;
}
@Override
public final software.amazon.awscdk.services.ecs.AsgCapacityProvider getCapacityProvider() {
return this.capacityProvider;
}
@Override
public final software.amazon.awscdk.services.ecs.Cluster getCluster() {
return this.cluster;
}
@Override
public final java.lang.Number getCpu() {
return this.cpu;
}
@Override
public final java.lang.Boolean getDockerInDocker() {
return this.dockerInDocker;
}
@Override
public final com.cloudsnorkel.cdk.github.runners.IRunnerImageBuilder getImageBuilder() {
return this.imageBuilder;
}
@Override
public final software.amazon.awscdk.services.ec2.InstanceType getInstanceType() {
return this.instanceType;
}
@Override
public final java.util.List getLabels() {
return this.labels;
}
@Override
public final java.lang.Number getMaxInstances() {
return this.maxInstances;
}
@Override
public final java.lang.Number getMemoryLimitMiB() {
return this.memoryLimitMiB;
}
@Override
public final java.lang.Number getMemoryReservationMiB() {
return this.memoryReservationMiB;
}
@Override
public final java.lang.Number getMinInstances() {
return this.minInstances;
}
@Override
public final java.util.List getSecurityGroups() {
return this.securityGroups;
}
@Override
public final java.lang.Boolean getSpot() {
return this.spot;
}
@Override
public final java.lang.String getSpotMaxPrice() {
return this.spotMaxPrice;
}
@Override
public final software.amazon.awscdk.Size getStorageSize() {
return this.storageSize;
}
@Override
public final software.amazon.awscdk.services.ec2.SubnetSelection getSubnetSelection() {
return this.subnetSelection;
}
@Override
public final software.amazon.awscdk.services.ec2.IVpc getVpc() {
return this.vpc;
}
@Override
public final software.amazon.awscdk.services.logs.RetentionDays getLogRetention() {
return this.logRetention;
}
@Override
public final com.cloudsnorkel.cdk.github.runners.ProviderRetryOptions getRetryOptions() {
return this.retryOptions;
}
@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.getAssignPublicIp() != null) {
data.set("assignPublicIp", om.valueToTree(this.getAssignPublicIp()));
}
if (this.getCapacityProvider() != null) {
data.set("capacityProvider", om.valueToTree(this.getCapacityProvider()));
}
if (this.getCluster() != null) {
data.set("cluster", om.valueToTree(this.getCluster()));
}
if (this.getCpu() != null) {
data.set("cpu", om.valueToTree(this.getCpu()));
}
if (this.getDockerInDocker() != null) {
data.set("dockerInDocker", om.valueToTree(this.getDockerInDocker()));
}
if (this.getImageBuilder() != null) {
data.set("imageBuilder", om.valueToTree(this.getImageBuilder()));
}
if (this.getInstanceType() != null) {
data.set("instanceType", om.valueToTree(this.getInstanceType()));
}
if (this.getLabels() != null) {
data.set("labels", om.valueToTree(this.getLabels()));
}
if (this.getMaxInstances() != null) {
data.set("maxInstances", om.valueToTree(this.getMaxInstances()));
}
if (this.getMemoryLimitMiB() != null) {
data.set("memoryLimitMiB", om.valueToTree(this.getMemoryLimitMiB()));
}
if (this.getMemoryReservationMiB() != null) {
data.set("memoryReservationMiB", om.valueToTree(this.getMemoryReservationMiB()));
}
if (this.getMinInstances() != null) {
data.set("minInstances", om.valueToTree(this.getMinInstances()));
}
if (this.getSecurityGroups() != null) {
data.set("securityGroups", om.valueToTree(this.getSecurityGroups()));
}
if (this.getSpot() != null) {
data.set("spot", om.valueToTree(this.getSpot()));
}
if (this.getSpotMaxPrice() != null) {
data.set("spotMaxPrice", om.valueToTree(this.getSpotMaxPrice()));
}
if (this.getStorageSize() != null) {
data.set("storageSize", om.valueToTree(this.getStorageSize()));
}
if (this.getSubnetSelection() != null) {
data.set("subnetSelection", om.valueToTree(this.getSubnetSelection()));
}
if (this.getVpc() != null) {
data.set("vpc", om.valueToTree(this.getVpc()));
}
if (this.getLogRetention() != null) {
data.set("logRetention", om.valueToTree(this.getLogRetention()));
}
if (this.getRetryOptions() != null) {
data.set("retryOptions", om.valueToTree(this.getRetryOptions()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps"));
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;
EcsRunnerProviderProps.Jsii$Proxy that = (EcsRunnerProviderProps.Jsii$Proxy) o;
if (this.assignPublicIp != null ? !this.assignPublicIp.equals(that.assignPublicIp) : that.assignPublicIp != null) return false;
if (this.capacityProvider != null ? !this.capacityProvider.equals(that.capacityProvider) : that.capacityProvider != null) return false;
if (this.cluster != null ? !this.cluster.equals(that.cluster) : that.cluster != null) return false;
if (this.cpu != null ? !this.cpu.equals(that.cpu) : that.cpu != null) return false;
if (this.dockerInDocker != null ? !this.dockerInDocker.equals(that.dockerInDocker) : that.dockerInDocker != null) return false;
if (this.imageBuilder != null ? !this.imageBuilder.equals(that.imageBuilder) : that.imageBuilder != null) return false;
if (this.instanceType != null ? !this.instanceType.equals(that.instanceType) : that.instanceType != null) return false;
if (this.labels != null ? !this.labels.equals(that.labels) : that.labels != null) return false;
if (this.maxInstances != null ? !this.maxInstances.equals(that.maxInstances) : that.maxInstances != null) return false;
if (this.memoryLimitMiB != null ? !this.memoryLimitMiB.equals(that.memoryLimitMiB) : that.memoryLimitMiB != null) return false;
if (this.memoryReservationMiB != null ? !this.memoryReservationMiB.equals(that.memoryReservationMiB) : that.memoryReservationMiB != null) return false;
if (this.minInstances != null ? !this.minInstances.equals(that.minInstances) : that.minInstances != null) return false;
if (this.securityGroups != null ? !this.securityGroups.equals(that.securityGroups) : that.securityGroups != null) return false;
if (this.spot != null ? !this.spot.equals(that.spot) : that.spot != null) return false;
if (this.spotMaxPrice != null ? !this.spotMaxPrice.equals(that.spotMaxPrice) : that.spotMaxPrice != null) return false;
if (this.storageSize != null ? !this.storageSize.equals(that.storageSize) : that.storageSize != null) return false;
if (this.subnetSelection != null ? !this.subnetSelection.equals(that.subnetSelection) : that.subnetSelection != null) return false;
if (this.vpc != null ? !this.vpc.equals(that.vpc) : that.vpc != null) return false;
if (this.logRetention != null ? !this.logRetention.equals(that.logRetention) : that.logRetention != null) return false;
return this.retryOptions != null ? this.retryOptions.equals(that.retryOptions) : that.retryOptions == null;
}
@Override
public final int hashCode() {
int result = this.assignPublicIp != null ? this.assignPublicIp.hashCode() : 0;
result = 31 * result + (this.capacityProvider != null ? this.capacityProvider.hashCode() : 0);
result = 31 * result + (this.cluster != null ? this.cluster.hashCode() : 0);
result = 31 * result + (this.cpu != null ? this.cpu.hashCode() : 0);
result = 31 * result + (this.dockerInDocker != null ? this.dockerInDocker.hashCode() : 0);
result = 31 * result + (this.imageBuilder != null ? this.imageBuilder.hashCode() : 0);
result = 31 * result + (this.instanceType != null ? this.instanceType.hashCode() : 0);
result = 31 * result + (this.labels != null ? this.labels.hashCode() : 0);
result = 31 * result + (this.maxInstances != null ? this.maxInstances.hashCode() : 0);
result = 31 * result + (this.memoryLimitMiB != null ? this.memoryLimitMiB.hashCode() : 0);
result = 31 * result + (this.memoryReservationMiB != null ? this.memoryReservationMiB.hashCode() : 0);
result = 31 * result + (this.minInstances != null ? this.minInstances.hashCode() : 0);
result = 31 * result + (this.securityGroups != null ? this.securityGroups.hashCode() : 0);
result = 31 * result + (this.spot != null ? this.spot.hashCode() : 0);
result = 31 * result + (this.spotMaxPrice != null ? this.spotMaxPrice.hashCode() : 0);
result = 31 * result + (this.storageSize != null ? this.storageSize.hashCode() : 0);
result = 31 * result + (this.subnetSelection != null ? this.subnetSelection.hashCode() : 0);
result = 31 * result + (this.vpc != null ? this.vpc.hashCode() : 0);
result = 31 * result + (this.logRetention != null ? this.logRetention.hashCode() : 0);
result = 31 * result + (this.retryOptions != null ? this.retryOptions.hashCode() : 0);
return result;
}
}
}