All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cloudsnorkel.cdk.github.runners.GitHubRunnersProps Maven / Gradle / Ivy

Go to download

CDK construct to create GitHub Actions self-hosted runners. A webhook listens to events and creates ephemeral runners on the fly.

There is a newer version: 0.14.6
Show newest version
package com.cloudsnorkel.cdk.github.runners;

/**
 * (experimental) Properties for GitHubRunners.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-14T02:42:19.446Z")
@software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.github.runners.$Module.class, fqn = "@cloudsnorkel/cdk-github-runners.GitHubRunnersProps")
@software.amazon.jsii.Jsii.Proxy(GitHubRunnersProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface GitHubRunnersProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) Allow management functions to run in public subnets.
     * 

* Lambda Functions in a public subnet can NOT access the internet. *

* Default: false */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Boolean getAllowPublicSubnet() { return null; } /** * (experimental) Path to a directory containing a file named certs.pem containing any additional certificates required to trust GitHub Enterprise Server. Use this when GitHub Enterprise Server certificates are self-signed. *

* You may also want to use custom images for your runner providers that contain the same certificates. See {@link CodeBuildImageBuilder.addCertificates }. * ```java * const imageBuilder = CodeBuildRunnerProvider.imageBuilder(this, 'Image Builder with Certs'); * imageBuilder.addComponent(RunnerImageComponent.extraCertificates('path-to-my-extra-certs-folder/certs.pem', 'private-ca'); * const provider = new CodeBuildRunnerProvider(this, 'CodeBuild', { * imageBuilder: imageBuilder, * }); * new GitHubRunners( * this, * 'runners', * { * providers: [provider], * extraCertificates: 'path-to-my-extra-certs-folder', * } * ); * ``` */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getExtraCertificates() { return null; } /** * (experimental) Time to wait before stopping a runner that remains idle. *

* If the user cancelled the job, or if another runner stole it, this stops the runner to avoid wasting resources. *

* Default: 5 minutes */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.Duration getIdleTimeout() { return null; } /** * (experimental) Logging options for the state machine that manages the runners. *

* Default: no logs */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.LogOptions getLogOptions() { return null; } /** * (experimental) List of runner providers to use. *

* At least one provider is required. Provider will be selected when its label matches the labels requested by the workflow job. *

* Default: CodeBuild, Lambda and Fargate runners with all the defaults (no VPC or default account VPC) */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getProviders() { return null; } /** * (experimental) Whether to require the self-hosted label. *

* If true, the runner will only start if the workflow job explicitly requests the self-hosted label. *

* Be careful when setting this to false. Avoid setting up providers with generic label requirements like linux as they may match workflows that are not meant to run on self-hosted runners. *

* Default: true */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Boolean getRequireSelfHostedLabel() { return null; } /** * (experimental) Options to retry operation in case of failure like missing capacity, or API quota issues. *

* GitHub jobs time out after not being able to get a runner for 24 hours. You should not retry for more than 24 hours. *

* Total time spent waiting can be calculated with interval * (backoffRate ^ maxAttempts) / (backoffRate - 1). *

* Default: retry 23 times up to about 24 hours */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.ProviderRetryOptions getRetryOptions() { return null; } /** * (deprecated) Security group attached to all management functions. *

* Use this with to provide access to GitHub Enterprise Server hosted inside a VPC. *

* @deprecated use {@link securityGroups } instead */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.ISecurityGroup getSecurityGroup() { return null; } /** * (experimental) Security groups attached to all management functions. *

* Use this with to provide access to GitHub Enterprise Server hosted inside a VPC. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getSecurityGroups() { return null; } /** * (experimental) Access configuration for the setup function. *

* Once you finish the setup process, you can set this to LambdaAccess.noAccess() to remove access to the setup function. You can also use LambdaAccess.apiGateway({ allowedIps: ['my-ip/0']}) to limit access to your IP only. *

* Default: LambdaAccess.lambdaUrl() */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.LambdaAccess getSetupAccess() { return null; } /** * (experimental) Access configuration for the status function. *

* This function returns a lot of sensitive information about the runner, so you should only allow access to it from trusted IPs, if at all. *

* Default: LambdaAccess.noAccess() */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.LambdaAccess getStatusAccess() { return null; } /** * (experimental) VPC used for all management functions. Use this with GitHub Enterprise Server hosted that's inaccessible from outside the VPC. *

* Make sure the selected VPC and subnets have access to the following with either NAT Gateway or VPC Endpoints: *

*

    *
  • GitHub Enterprise Server
  • *
  • Secrets Manager
  • *
  • SQS
  • *
  • Step Functions
  • *
  • CloudFormation (status function only)
  • *
  • EC2 (status function only)
  • *
  • ECR (status function only)
  • *
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.IVpc getVpc() { return null; } /** * (experimental) VPC subnets used for all management functions. *

* Use this with GitHub Enterprise Server hosted that's inaccessible from outside the VPC. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.SubnetSelection getVpcSubnets() { return null; } /** * (experimental) Access configuration for the webhook function. *

* This function is called by GitHub when a new workflow job is scheduled. For an extra layer of security, you can set this to LambdaAccess.apiGateway({ allowedIps: LambdaAccess.githubWebhookIps() }). *

* You can also set this to LambdaAccess.apiGateway({allowedVpc: vpc, allowedIps: ['GHES.IP.ADDRESS/32']}) if your GitHub Enterprise Server is hosted in a VPC. This will create an API Gateway endpoint that's only accessible from within the VPC. *

* WARNING: changing access type may change the URL. When the URL changes, you must update GitHub as well. *

* Default: LambdaAccess.lambdaUrl() */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.LambdaAccess getWebhookAccess() { return null; } /** * @return a {@link Builder} of {@link GitHubRunnersProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link GitHubRunnersProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.lang.Boolean allowPublicSubnet; java.lang.String extraCertificates; software.amazon.awscdk.Duration idleTimeout; com.cloudsnorkel.cdk.github.runners.LogOptions logOptions; java.util.List providers; java.lang.Boolean requireSelfHostedLabel; com.cloudsnorkel.cdk.github.runners.ProviderRetryOptions retryOptions; software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup; java.util.List securityGroups; com.cloudsnorkel.cdk.github.runners.LambdaAccess setupAccess; com.cloudsnorkel.cdk.github.runners.LambdaAccess statusAccess; software.amazon.awscdk.services.ec2.IVpc vpc; software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets; com.cloudsnorkel.cdk.github.runners.LambdaAccess webhookAccess; /** * Sets the value of {@link GitHubRunnersProps#getAllowPublicSubnet} * @param allowPublicSubnet Allow management functions to run in public subnets. * Lambda Functions in a public subnet can NOT access the internet. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder allowPublicSubnet(java.lang.Boolean allowPublicSubnet) { this.allowPublicSubnet = allowPublicSubnet; return this; } /** * Sets the value of {@link GitHubRunnersProps#getExtraCertificates} * @param extraCertificates Path to a directory containing a file named certs.pem containing any additional certificates required to trust GitHub Enterprise Server. Use this when GitHub Enterprise Server certificates are self-signed. * You may also want to use custom images for your runner providers that contain the same certificates. See {@link CodeBuildImageBuilder.addCertificates }. * * ```java * const imageBuilder = CodeBuildRunnerProvider.imageBuilder(this, 'Image Builder with Certs'); * imageBuilder.addComponent(RunnerImageComponent.extraCertificates('path-to-my-extra-certs-folder/certs.pem', 'private-ca'); * * const provider = new CodeBuildRunnerProvider(this, 'CodeBuild', { * imageBuilder: imageBuilder, * }); * * new GitHubRunners( * this, * 'runners', * { * providers: [provider], * extraCertificates: 'path-to-my-extra-certs-folder', * } * ); * ``` * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder extraCertificates(java.lang.String extraCertificates) { this.extraCertificates = extraCertificates; return this; } /** * Sets the value of {@link GitHubRunnersProps#getIdleTimeout} * @param idleTimeout Time to wait before stopping a runner that remains idle. * If the user cancelled the job, or if another runner stole it, this stops the runner to avoid wasting resources. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder idleTimeout(software.amazon.awscdk.Duration idleTimeout) { this.idleTimeout = idleTimeout; return this; } /** * Sets the value of {@link GitHubRunnersProps#getLogOptions} * @param logOptions Logging options for the state machine that manages the runners. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder logOptions(com.cloudsnorkel.cdk.github.runners.LogOptions logOptions) { this.logOptions = logOptions; return this; } /** * Sets the value of {@link GitHubRunnersProps#getProviders} * @param providers List of runner providers to use. * At least one provider is required. Provider will be selected when its label matches the labels requested by the workflow job. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder providers(java.util.List providers) { this.providers = (java.util.List)providers; return this; } /** * Sets the value of {@link GitHubRunnersProps#getRequireSelfHostedLabel} * @param requireSelfHostedLabel Whether to require the self-hosted label. * If true, the runner will only start if the workflow job explicitly requests the self-hosted label. *

* Be careful when setting this to false. Avoid setting up providers with generic label requirements like linux as they may match workflows that are not meant to run on self-hosted runners. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder requireSelfHostedLabel(java.lang.Boolean requireSelfHostedLabel) { this.requireSelfHostedLabel = requireSelfHostedLabel; return this; } /** * Sets the value of {@link GitHubRunnersProps#getRetryOptions} * @param retryOptions Options to retry operation in case of failure like missing capacity, or API quota issues. * GitHub jobs time out after not being able to get a runner for 24 hours. You should not retry for more than 24 hours. *

* Total time spent waiting can be calculated with interval * (backoffRate ^ maxAttempts) / (backoffRate - 1). * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder retryOptions(com.cloudsnorkel.cdk.github.runners.ProviderRetryOptions retryOptions) { this.retryOptions = retryOptions; return this; } /** * Sets the value of {@link GitHubRunnersProps#getSecurityGroup} * @param securityGroup Security group attached to all management functions. * Use this with to provide access to GitHub Enterprise Server hosted inside a VPC. * @return {@code this} * @deprecated use {@link securityGroups } instead */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public Builder securityGroup(software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup) { this.securityGroup = securityGroup; return this; } /** * Sets the value of {@link GitHubRunnersProps#getSecurityGroups} * @param securityGroups Security groups attached to all management functions. * Use this with to provide access to GitHub Enterprise Server hosted inside a VPC. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder securityGroups(java.util.List securityGroups) { this.securityGroups = (java.util.List)securityGroups; return this; } /** * Sets the value of {@link GitHubRunnersProps#getSetupAccess} * @param setupAccess Access configuration for the setup function. * Once you finish the setup process, you can set this to LambdaAccess.noAccess() to remove access to the setup function. You can also use LambdaAccess.apiGateway({ allowedIps: ['my-ip/0']}) to limit access to your IP only. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder setupAccess(com.cloudsnorkel.cdk.github.runners.LambdaAccess setupAccess) { this.setupAccess = setupAccess; return this; } /** * Sets the value of {@link GitHubRunnersProps#getStatusAccess} * @param statusAccess Access configuration for the status function. * This function returns a lot of sensitive information about the runner, so you should only allow access to it from trusted IPs, if at all. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder statusAccess(com.cloudsnorkel.cdk.github.runners.LambdaAccess statusAccess) { this.statusAccess = statusAccess; return this; } /** * Sets the value of {@link GitHubRunnersProps#getVpc} * @param vpc VPC used for all management functions. Use this with GitHub Enterprise Server hosted that's inaccessible from outside the VPC. * Make sure the selected VPC and subnets have access to the following with either NAT Gateway or VPC Endpoints: *

*

    *
  • GitHub Enterprise Server
  • *
  • Secrets Manager
  • *
  • SQS
  • *
  • Step Functions
  • *
  • CloudFormation (status function only)
  • *
  • EC2 (status function only)
  • *
  • ECR (status function only)
  • *
* @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 GitHubRunnersProps#getVpcSubnets} * @param vpcSubnets VPC subnets used for all management functions. * Use this with GitHub Enterprise Server hosted that's inaccessible from outside the VPC. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder vpcSubnets(software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets) { this.vpcSubnets = vpcSubnets; return this; } /** * Sets the value of {@link GitHubRunnersProps#getWebhookAccess} * @param webhookAccess Access configuration for the webhook function. * This function is called by GitHub when a new workflow job is scheduled. For an extra layer of security, you can set this to LambdaAccess.apiGateway({ allowedIps: LambdaAccess.githubWebhookIps() }). *

* You can also set this to LambdaAccess.apiGateway({allowedVpc: vpc, allowedIps: ['GHES.IP.ADDRESS/32']}) if your GitHub Enterprise Server is hosted in a VPC. This will create an API Gateway endpoint that's only accessible from within the VPC. *

* WARNING: changing access type may change the URL. When the URL changes, you must update GitHub as well. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder webhookAccess(com.cloudsnorkel.cdk.github.runners.LambdaAccess webhookAccess) { this.webhookAccess = webhookAccess; return this; } /** * Builds the configured instance. * @return a new instance of {@link GitHubRunnersProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public GitHubRunnersProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link GitHubRunnersProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements GitHubRunnersProps { private final java.lang.Boolean allowPublicSubnet; private final java.lang.String extraCertificates; private final software.amazon.awscdk.Duration idleTimeout; private final com.cloudsnorkel.cdk.github.runners.LogOptions logOptions; private final java.util.List providers; private final java.lang.Boolean requireSelfHostedLabel; private final com.cloudsnorkel.cdk.github.runners.ProviderRetryOptions retryOptions; private final software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup; private final java.util.List securityGroups; private final com.cloudsnorkel.cdk.github.runners.LambdaAccess setupAccess; private final com.cloudsnorkel.cdk.github.runners.LambdaAccess statusAccess; private final software.amazon.awscdk.services.ec2.IVpc vpc; private final software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets; private final com.cloudsnorkel.cdk.github.runners.LambdaAccess webhookAccess; /** * 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.allowPublicSubnet = software.amazon.jsii.Kernel.get(this, "allowPublicSubnet", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.extraCertificates = software.amazon.jsii.Kernel.get(this, "extraCertificates", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.idleTimeout = software.amazon.jsii.Kernel.get(this, "idleTimeout", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Duration.class)); this.logOptions = software.amazon.jsii.Kernel.get(this, "logOptions", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.LogOptions.class)); this.providers = software.amazon.jsii.Kernel.get(this, "providers", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.IRunnerProvider.class))); this.requireSelfHostedLabel = software.amazon.jsii.Kernel.get(this, "requireSelfHostedLabel", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.retryOptions = software.amazon.jsii.Kernel.get(this, "retryOptions", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.ProviderRetryOptions.class)); this.securityGroup = software.amazon.jsii.Kernel.get(this, "securityGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISecurityGroup.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.setupAccess = software.amazon.jsii.Kernel.get(this, "setupAccess", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.LambdaAccess.class)); this.statusAccess = software.amazon.jsii.Kernel.get(this, "statusAccess", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.LambdaAccess.class)); this.vpc = software.amazon.jsii.Kernel.get(this, "vpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class)); this.vpcSubnets = software.amazon.jsii.Kernel.get(this, "vpcSubnets", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.SubnetSelection.class)); this.webhookAccess = software.amazon.jsii.Kernel.get(this, "webhookAccess", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.LambdaAccess.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.allowPublicSubnet = builder.allowPublicSubnet; this.extraCertificates = builder.extraCertificates; this.idleTimeout = builder.idleTimeout; this.logOptions = builder.logOptions; this.providers = (java.util.List)builder.providers; this.requireSelfHostedLabel = builder.requireSelfHostedLabel; this.retryOptions = builder.retryOptions; this.securityGroup = builder.securityGroup; this.securityGroups = (java.util.List)builder.securityGroups; this.setupAccess = builder.setupAccess; this.statusAccess = builder.statusAccess; this.vpc = builder.vpc; this.vpcSubnets = builder.vpcSubnets; this.webhookAccess = builder.webhookAccess; } @Override public final java.lang.Boolean getAllowPublicSubnet() { return this.allowPublicSubnet; } @Override public final java.lang.String getExtraCertificates() { return this.extraCertificates; } @Override public final software.amazon.awscdk.Duration getIdleTimeout() { return this.idleTimeout; } @Override public final com.cloudsnorkel.cdk.github.runners.LogOptions getLogOptions() { return this.logOptions; } @Override public final java.util.List getProviders() { return this.providers; } @Override public final java.lang.Boolean getRequireSelfHostedLabel() { return this.requireSelfHostedLabel; } @Override public final com.cloudsnorkel.cdk.github.runners.ProviderRetryOptions getRetryOptions() { return this.retryOptions; } @Override public final software.amazon.awscdk.services.ec2.ISecurityGroup getSecurityGroup() { return this.securityGroup; } @Override public final java.util.List getSecurityGroups() { return this.securityGroups; } @Override public final com.cloudsnorkel.cdk.github.runners.LambdaAccess getSetupAccess() { return this.setupAccess; } @Override public final com.cloudsnorkel.cdk.github.runners.LambdaAccess getStatusAccess() { return this.statusAccess; } @Override public final software.amazon.awscdk.services.ec2.IVpc getVpc() { return this.vpc; } @Override public final software.amazon.awscdk.services.ec2.SubnetSelection getVpcSubnets() { return this.vpcSubnets; } @Override public final com.cloudsnorkel.cdk.github.runners.LambdaAccess getWebhookAccess() { return this.webhookAccess; } @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.getAllowPublicSubnet() != null) { data.set("allowPublicSubnet", om.valueToTree(this.getAllowPublicSubnet())); } if (this.getExtraCertificates() != null) { data.set("extraCertificates", om.valueToTree(this.getExtraCertificates())); } if (this.getIdleTimeout() != null) { data.set("idleTimeout", om.valueToTree(this.getIdleTimeout())); } if (this.getLogOptions() != null) { data.set("logOptions", om.valueToTree(this.getLogOptions())); } if (this.getProviders() != null) { data.set("providers", om.valueToTree(this.getProviders())); } if (this.getRequireSelfHostedLabel() != null) { data.set("requireSelfHostedLabel", om.valueToTree(this.getRequireSelfHostedLabel())); } if (this.getRetryOptions() != null) { data.set("retryOptions", om.valueToTree(this.getRetryOptions())); } if (this.getSecurityGroup() != null) { data.set("securityGroup", om.valueToTree(this.getSecurityGroup())); } if (this.getSecurityGroups() != null) { data.set("securityGroups", om.valueToTree(this.getSecurityGroups())); } if (this.getSetupAccess() != null) { data.set("setupAccess", om.valueToTree(this.getSetupAccess())); } if (this.getStatusAccess() != null) { data.set("statusAccess", om.valueToTree(this.getStatusAccess())); } if (this.getVpc() != null) { data.set("vpc", om.valueToTree(this.getVpc())); } if (this.getVpcSubnets() != null) { data.set("vpcSubnets", om.valueToTree(this.getVpcSubnets())); } if (this.getWebhookAccess() != null) { data.set("webhookAccess", om.valueToTree(this.getWebhookAccess())); } 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.GitHubRunnersProps")); 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; GitHubRunnersProps.Jsii$Proxy that = (GitHubRunnersProps.Jsii$Proxy) o; if (this.allowPublicSubnet != null ? !this.allowPublicSubnet.equals(that.allowPublicSubnet) : that.allowPublicSubnet != null) return false; if (this.extraCertificates != null ? !this.extraCertificates.equals(that.extraCertificates) : that.extraCertificates != null) return false; if (this.idleTimeout != null ? !this.idleTimeout.equals(that.idleTimeout) : that.idleTimeout != null) return false; if (this.logOptions != null ? !this.logOptions.equals(that.logOptions) : that.logOptions != null) return false; if (this.providers != null ? !this.providers.equals(that.providers) : that.providers != null) return false; if (this.requireSelfHostedLabel != null ? !this.requireSelfHostedLabel.equals(that.requireSelfHostedLabel) : that.requireSelfHostedLabel != null) return false; if (this.retryOptions != null ? !this.retryOptions.equals(that.retryOptions) : that.retryOptions != null) return false; if (this.securityGroup != null ? !this.securityGroup.equals(that.securityGroup) : that.securityGroup != null) return false; if (this.securityGroups != null ? !this.securityGroups.equals(that.securityGroups) : that.securityGroups != null) return false; if (this.setupAccess != null ? !this.setupAccess.equals(that.setupAccess) : that.setupAccess != null) return false; if (this.statusAccess != null ? !this.statusAccess.equals(that.statusAccess) : that.statusAccess != null) return false; if (this.vpc != null ? !this.vpc.equals(that.vpc) : that.vpc != null) return false; if (this.vpcSubnets != null ? !this.vpcSubnets.equals(that.vpcSubnets) : that.vpcSubnets != null) return false; return this.webhookAccess != null ? this.webhookAccess.equals(that.webhookAccess) : that.webhookAccess == null; } @Override public final int hashCode() { int result = this.allowPublicSubnet != null ? this.allowPublicSubnet.hashCode() : 0; result = 31 * result + (this.extraCertificates != null ? this.extraCertificates.hashCode() : 0); result = 31 * result + (this.idleTimeout != null ? this.idleTimeout.hashCode() : 0); result = 31 * result + (this.logOptions != null ? this.logOptions.hashCode() : 0); result = 31 * result + (this.providers != null ? this.providers.hashCode() : 0); result = 31 * result + (this.requireSelfHostedLabel != null ? this.requireSelfHostedLabel.hashCode() : 0); result = 31 * result + (this.retryOptions != null ? this.retryOptions.hashCode() : 0); result = 31 * result + (this.securityGroup != null ? this.securityGroup.hashCode() : 0); result = 31 * result + (this.securityGroups != null ? this.securityGroups.hashCode() : 0); result = 31 * result + (this.setupAccess != null ? this.setupAccess.hashCode() : 0); result = 31 * result + (this.statusAccess != null ? this.statusAccess.hashCode() : 0); result = 31 * result + (this.vpc != null ? this.vpc.hashCode() : 0); result = 31 * result + (this.vpcSubnets != null ? this.vpcSubnets.hashCode() : 0); result = 31 * result + (this.webhookAccess != null ? this.webhookAccess.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy