software.amazon.awscdk.services.apprunner.alpha.ServiceProps Maven / Gradle / Ivy
Show all versions of apprunner-alpha Show documentation
package software.amazon.awscdk.services.apprunner.alpha;
/**
* (experimental) Properties of the AppRunner Service.
*
* Example:
*
*
* import software.amazon.awscdk.services.iam.*;
* Service service = Service.Builder.create(this, "Service")
* .source(Source.fromEcrPublic(EcrPublicProps.builder()
* .imageConfiguration(ImageConfiguration.builder().port(8000).build())
* .imageIdentifier("public.ecr.aws/aws-containers/hello-app-runner:latest")
* .build()))
* .build();
* service.addToRolePolicy(PolicyStatement.Builder.create()
* .effect(Effect.ALLOW)
* .actions(List.of("s3:GetObject"))
* .resources(List.of("*"))
* .build());
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-12-17T21:37:41.243Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.apprunner.alpha.$Module.class, fqn = "@aws-cdk/aws-apprunner-alpha.ServiceProps")
@software.amazon.jsii.Jsii.Proxy(ServiceProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface ServiceProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) The source of the repository for the service.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apprunner.alpha.Source getSource();
/**
* (experimental) The IAM role that grants the App Runner service access to a source repository.
*
* It's required for ECR image repositories (but not for ECR Public repositories).
*
* The role must be assumable by the 'build.apprunner.amazonaws.com' service principal.
*
* Default: - generate a new access role.
*
* @see https://docs.aws.amazon.com/apprunner/latest/dg/security_iam_service-with-iam.html#security_iam_service-with-iam-roles-service.access
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.iam.IRole getAccessRole() {
return null;
}
/**
* (experimental) Specifies whether to enable continuous integration from the source repository.
*
* If true, continuous integration from the source repository is enabled for the App Runner service.
* Each repository change (including any source code commit or new image version) starts a deployment.
* By default, App Runner sets to false for a source image that uses an ECR Public repository or an ECR repository that's in an AWS account other than the one that the service is in.
* App Runner sets to true in all other cases (which currently include a source code repository or a source image using a same-account ECR repository).
*
* Default: - no value will be passed.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getAutoDeploymentsEnabled() {
return null;
}
/**
* (experimental) Specifies an App Runner Auto Scaling Configuration.
*
* A default configuration is either the AWS recommended configuration,
* or the configuration you set as the default.
*
* Default: - the latest revision of a default auto scaling configuration is used.
*
* @see https://docs.aws.amazon.com/apprunner/latest/dg/manage-autoscaling.html
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.apprunner.alpha.IAutoScalingConfiguration getAutoScalingConfiguration() {
return null;
}
/**
* (experimental) The number of CPU units reserved for each instance of your App Runner service.
*
* Default: Cpu.ONE_VCPU
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.apprunner.alpha.Cpu getCpu() {
return null;
}
/**
* (experimental) Settings for the health check that AWS App Runner performs to monitor the health of a service.
*
* You can specify it by static methods HealthCheck.http
or HealthCheck.tcp
.
*
* Default: - no health check configuration
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.apprunner.alpha.HealthCheck getHealthCheck() {
return null;
}
/**
* (experimental) The IAM role that provides permissions to your App Runner service.
*
* These are permissions that your code needs when it calls any AWS APIs.
*
* The role must be assumable by the 'tasks.apprunner.amazonaws.com' service principal.
*
* Default: - generate a new instance role.
*
* @see https://docs.aws.amazon.com/apprunner/latest/dg/security_iam_service-with-iam.html#security_iam_service-with-iam-roles-service.instance
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.iam.IRole getInstanceRole() {
return null;
}
/**
* (experimental) The IP address type for your incoming public network configuration.
*
* Default: - IpAddressType.IPV4
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.apprunner.alpha.IpAddressType getIpAddressType() {
return null;
}
/**
* (experimental) Specifies whether your App Runner service is publicly accessible.
*
* If you use VpcIngressConnection
, you must set this property to false
.
*
* Default: true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getIsPubliclyAccessible() {
return null;
}
/**
* (experimental) The customer managed key that AWS App Runner uses to encrypt copies of the source repository and service logs.
*
* Default: - Use an AWS managed key
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.kms.IKey getKmsKey() {
return null;
}
/**
* (experimental) The amount of memory reserved for each instance of your App Runner service.
*
* Default: Memory.TWO_GB
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.apprunner.alpha.Memory getMemory() {
return null;
}
/**
* (experimental) Settings for an App Runner observability configuration.
*
* Default: - no observability configuration resource is associated with the service.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.apprunner.alpha.IObservabilityConfiguration getObservabilityConfiguration() {
return null;
}
/**
* (experimental) Name of the service.
*
* Default: - auto-generated if undefined.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getServiceName() {
return null;
}
/**
* (experimental) Settings for an App Runner VPC connector to associate with the service.
*
* Default: - no VPC connector, uses the DEFAULT egress type instead
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.apprunner.alpha.IVpcConnector getVpcConnector() {
return null;
}
/**
* @return a {@link Builder} of {@link ServiceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ServiceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
software.amazon.awscdk.services.apprunner.alpha.Source source;
software.amazon.awscdk.services.iam.IRole accessRole;
java.lang.Boolean autoDeploymentsEnabled;
software.amazon.awscdk.services.apprunner.alpha.IAutoScalingConfiguration autoScalingConfiguration;
software.amazon.awscdk.services.apprunner.alpha.Cpu cpu;
software.amazon.awscdk.services.apprunner.alpha.HealthCheck healthCheck;
software.amazon.awscdk.services.iam.IRole instanceRole;
software.amazon.awscdk.services.apprunner.alpha.IpAddressType ipAddressType;
java.lang.Boolean isPubliclyAccessible;
software.amazon.awscdk.services.kms.IKey kmsKey;
software.amazon.awscdk.services.apprunner.alpha.Memory memory;
software.amazon.awscdk.services.apprunner.alpha.IObservabilityConfiguration observabilityConfiguration;
java.lang.String serviceName;
software.amazon.awscdk.services.apprunner.alpha.IVpcConnector vpcConnector;
/**
* Sets the value of {@link ServiceProps#getSource}
* @param source The source of the repository for the service. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder source(software.amazon.awscdk.services.apprunner.alpha.Source source) {
this.source = source;
return this;
}
/**
* Sets the value of {@link ServiceProps#getAccessRole}
* @param accessRole The IAM role that grants the App Runner service access to a source repository.
* It's required for ECR image repositories (but not for ECR Public repositories).
*
* The role must be assumable by the 'build.apprunner.amazonaws.com' service principal.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder accessRole(software.amazon.awscdk.services.iam.IRole accessRole) {
this.accessRole = accessRole;
return this;
}
/**
* Sets the value of {@link ServiceProps#getAutoDeploymentsEnabled}
* @param autoDeploymentsEnabled Specifies whether to enable continuous integration from the source repository.
* If true, continuous integration from the source repository is enabled for the App Runner service.
* Each repository change (including any source code commit or new image version) starts a deployment.
* By default, App Runner sets to false for a source image that uses an ECR Public repository or an ECR repository that's in an AWS account other than the one that the service is in.
* App Runner sets to true in all other cases (which currently include a source code repository or a source image using a same-account ECR repository).
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder autoDeploymentsEnabled(java.lang.Boolean autoDeploymentsEnabled) {
this.autoDeploymentsEnabled = autoDeploymentsEnabled;
return this;
}
/**
* Sets the value of {@link ServiceProps#getAutoScalingConfiguration}
* @param autoScalingConfiguration Specifies an App Runner Auto Scaling Configuration.
* A default configuration is either the AWS recommended configuration,
* or the configuration you set as the default.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder autoScalingConfiguration(software.amazon.awscdk.services.apprunner.alpha.IAutoScalingConfiguration autoScalingConfiguration) {
this.autoScalingConfiguration = autoScalingConfiguration;
return this;
}
/**
* Sets the value of {@link ServiceProps#getCpu}
* @param cpu The number of CPU units reserved for each instance of your App Runner service.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder cpu(software.amazon.awscdk.services.apprunner.alpha.Cpu cpu) {
this.cpu = cpu;
return this;
}
/**
* Sets the value of {@link ServiceProps#getHealthCheck}
* @param healthCheck Settings for the health check that AWS App Runner performs to monitor the health of a service.
* You can specify it by static methods HealthCheck.http
or HealthCheck.tcp
.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder healthCheck(software.amazon.awscdk.services.apprunner.alpha.HealthCheck healthCheck) {
this.healthCheck = healthCheck;
return this;
}
/**
* Sets the value of {@link ServiceProps#getInstanceRole}
* @param instanceRole The IAM role that provides permissions to your App Runner service.
* These are permissions that your code needs when it calls any AWS APIs.
*
* The role must be assumable by the 'tasks.apprunner.amazonaws.com' service principal.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder instanceRole(software.amazon.awscdk.services.iam.IRole instanceRole) {
this.instanceRole = instanceRole;
return this;
}
/**
* Sets the value of {@link ServiceProps#getIpAddressType}
* @param ipAddressType The IP address type for your incoming public network configuration.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder ipAddressType(software.amazon.awscdk.services.apprunner.alpha.IpAddressType ipAddressType) {
this.ipAddressType = ipAddressType;
return this;
}
/**
* Sets the value of {@link ServiceProps#getIsPubliclyAccessible}
* @param isPubliclyAccessible Specifies whether your App Runner service is publicly accessible.
* If you use VpcIngressConnection
, you must set this property to false
.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder isPubliclyAccessible(java.lang.Boolean isPubliclyAccessible) {
this.isPubliclyAccessible = isPubliclyAccessible;
return this;
}
/**
* Sets the value of {@link ServiceProps#getKmsKey}
* @param kmsKey The customer managed key that AWS App Runner uses to encrypt copies of the source repository and service logs.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder kmsKey(software.amazon.awscdk.services.kms.IKey kmsKey) {
this.kmsKey = kmsKey;
return this;
}
/**
* Sets the value of {@link ServiceProps#getMemory}
* @param memory The amount of memory reserved for each instance of your App Runner service.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder memory(software.amazon.awscdk.services.apprunner.alpha.Memory memory) {
this.memory = memory;
return this;
}
/**
* Sets the value of {@link ServiceProps#getObservabilityConfiguration}
* @param observabilityConfiguration Settings for an App Runner observability configuration.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder observabilityConfiguration(software.amazon.awscdk.services.apprunner.alpha.IObservabilityConfiguration observabilityConfiguration) {
this.observabilityConfiguration = observabilityConfiguration;
return this;
}
/**
* Sets the value of {@link ServiceProps#getServiceName}
* @param serviceName Name of the service.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder serviceName(java.lang.String serviceName) {
this.serviceName = serviceName;
return this;
}
/**
* Sets the value of {@link ServiceProps#getVpcConnector}
* @param vpcConnector Settings for an App Runner VPC connector to associate with the service.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder vpcConnector(software.amazon.awscdk.services.apprunner.alpha.IVpcConnector vpcConnector) {
this.vpcConnector = vpcConnector;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link ServiceProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public ServiceProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link ServiceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ServiceProps {
private final software.amazon.awscdk.services.apprunner.alpha.Source source;
private final software.amazon.awscdk.services.iam.IRole accessRole;
private final java.lang.Boolean autoDeploymentsEnabled;
private final software.amazon.awscdk.services.apprunner.alpha.IAutoScalingConfiguration autoScalingConfiguration;
private final software.amazon.awscdk.services.apprunner.alpha.Cpu cpu;
private final software.amazon.awscdk.services.apprunner.alpha.HealthCheck healthCheck;
private final software.amazon.awscdk.services.iam.IRole instanceRole;
private final software.amazon.awscdk.services.apprunner.alpha.IpAddressType ipAddressType;
private final java.lang.Boolean isPubliclyAccessible;
private final software.amazon.awscdk.services.kms.IKey kmsKey;
private final software.amazon.awscdk.services.apprunner.alpha.Memory memory;
private final software.amazon.awscdk.services.apprunner.alpha.IObservabilityConfiguration observabilityConfiguration;
private final java.lang.String serviceName;
private final software.amazon.awscdk.services.apprunner.alpha.IVpcConnector vpcConnector;
/**
* 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.source = software.amazon.jsii.Kernel.get(this, "source", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.Source.class));
this.accessRole = software.amazon.jsii.Kernel.get(this, "accessRole", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class));
this.autoDeploymentsEnabled = software.amazon.jsii.Kernel.get(this, "autoDeploymentsEnabled", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.autoScalingConfiguration = software.amazon.jsii.Kernel.get(this, "autoScalingConfiguration", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.IAutoScalingConfiguration.class));
this.cpu = software.amazon.jsii.Kernel.get(this, "cpu", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.Cpu.class));
this.healthCheck = software.amazon.jsii.Kernel.get(this, "healthCheck", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.HealthCheck.class));
this.instanceRole = software.amazon.jsii.Kernel.get(this, "instanceRole", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class));
this.ipAddressType = software.amazon.jsii.Kernel.get(this, "ipAddressType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.IpAddressType.class));
this.isPubliclyAccessible = software.amazon.jsii.Kernel.get(this, "isPubliclyAccessible", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.kmsKey = software.amazon.jsii.Kernel.get(this, "kmsKey", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.kms.IKey.class));
this.memory = software.amazon.jsii.Kernel.get(this, "memory", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.Memory.class));
this.observabilityConfiguration = software.amazon.jsii.Kernel.get(this, "observabilityConfiguration", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.IObservabilityConfiguration.class));
this.serviceName = software.amazon.jsii.Kernel.get(this, "serviceName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.vpcConnector = software.amazon.jsii.Kernel.get(this, "vpcConnector", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.IVpcConnector.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.source = java.util.Objects.requireNonNull(builder.source, "source is required");
this.accessRole = builder.accessRole;
this.autoDeploymentsEnabled = builder.autoDeploymentsEnabled;
this.autoScalingConfiguration = builder.autoScalingConfiguration;
this.cpu = builder.cpu;
this.healthCheck = builder.healthCheck;
this.instanceRole = builder.instanceRole;
this.ipAddressType = builder.ipAddressType;
this.isPubliclyAccessible = builder.isPubliclyAccessible;
this.kmsKey = builder.kmsKey;
this.memory = builder.memory;
this.observabilityConfiguration = builder.observabilityConfiguration;
this.serviceName = builder.serviceName;
this.vpcConnector = builder.vpcConnector;
}
@Override
public final software.amazon.awscdk.services.apprunner.alpha.Source getSource() {
return this.source;
}
@Override
public final software.amazon.awscdk.services.iam.IRole getAccessRole() {
return this.accessRole;
}
@Override
public final java.lang.Boolean getAutoDeploymentsEnabled() {
return this.autoDeploymentsEnabled;
}
@Override
public final software.amazon.awscdk.services.apprunner.alpha.IAutoScalingConfiguration getAutoScalingConfiguration() {
return this.autoScalingConfiguration;
}
@Override
public final software.amazon.awscdk.services.apprunner.alpha.Cpu getCpu() {
return this.cpu;
}
@Override
public final software.amazon.awscdk.services.apprunner.alpha.HealthCheck getHealthCheck() {
return this.healthCheck;
}
@Override
public final software.amazon.awscdk.services.iam.IRole getInstanceRole() {
return this.instanceRole;
}
@Override
public final software.amazon.awscdk.services.apprunner.alpha.IpAddressType getIpAddressType() {
return this.ipAddressType;
}
@Override
public final java.lang.Boolean getIsPubliclyAccessible() {
return this.isPubliclyAccessible;
}
@Override
public final software.amazon.awscdk.services.kms.IKey getKmsKey() {
return this.kmsKey;
}
@Override
public final software.amazon.awscdk.services.apprunner.alpha.Memory getMemory() {
return this.memory;
}
@Override
public final software.amazon.awscdk.services.apprunner.alpha.IObservabilityConfiguration getObservabilityConfiguration() {
return this.observabilityConfiguration;
}
@Override
public final java.lang.String getServiceName() {
return this.serviceName;
}
@Override
public final software.amazon.awscdk.services.apprunner.alpha.IVpcConnector getVpcConnector() {
return this.vpcConnector;
}
@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("source", om.valueToTree(this.getSource()));
if (this.getAccessRole() != null) {
data.set("accessRole", om.valueToTree(this.getAccessRole()));
}
if (this.getAutoDeploymentsEnabled() != null) {
data.set("autoDeploymentsEnabled", om.valueToTree(this.getAutoDeploymentsEnabled()));
}
if (this.getAutoScalingConfiguration() != null) {
data.set("autoScalingConfiguration", om.valueToTree(this.getAutoScalingConfiguration()));
}
if (this.getCpu() != null) {
data.set("cpu", om.valueToTree(this.getCpu()));
}
if (this.getHealthCheck() != null) {
data.set("healthCheck", om.valueToTree(this.getHealthCheck()));
}
if (this.getInstanceRole() != null) {
data.set("instanceRole", om.valueToTree(this.getInstanceRole()));
}
if (this.getIpAddressType() != null) {
data.set("ipAddressType", om.valueToTree(this.getIpAddressType()));
}
if (this.getIsPubliclyAccessible() != null) {
data.set("isPubliclyAccessible", om.valueToTree(this.getIsPubliclyAccessible()));
}
if (this.getKmsKey() != null) {
data.set("kmsKey", om.valueToTree(this.getKmsKey()));
}
if (this.getMemory() != null) {
data.set("memory", om.valueToTree(this.getMemory()));
}
if (this.getObservabilityConfiguration() != null) {
data.set("observabilityConfiguration", om.valueToTree(this.getObservabilityConfiguration()));
}
if (this.getServiceName() != null) {
data.set("serviceName", om.valueToTree(this.getServiceName()));
}
if (this.getVpcConnector() != null) {
data.set("vpcConnector", om.valueToTree(this.getVpcConnector()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-apprunner-alpha.ServiceProps"));
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;
ServiceProps.Jsii$Proxy that = (ServiceProps.Jsii$Proxy) o;
if (!source.equals(that.source)) return false;
if (this.accessRole != null ? !this.accessRole.equals(that.accessRole) : that.accessRole != null) return false;
if (this.autoDeploymentsEnabled != null ? !this.autoDeploymentsEnabled.equals(that.autoDeploymentsEnabled) : that.autoDeploymentsEnabled != null) return false;
if (this.autoScalingConfiguration != null ? !this.autoScalingConfiguration.equals(that.autoScalingConfiguration) : that.autoScalingConfiguration != null) return false;
if (this.cpu != null ? !this.cpu.equals(that.cpu) : that.cpu != null) return false;
if (this.healthCheck != null ? !this.healthCheck.equals(that.healthCheck) : that.healthCheck != null) return false;
if (this.instanceRole != null ? !this.instanceRole.equals(that.instanceRole) : that.instanceRole != null) return false;
if (this.ipAddressType != null ? !this.ipAddressType.equals(that.ipAddressType) : that.ipAddressType != null) return false;
if (this.isPubliclyAccessible != null ? !this.isPubliclyAccessible.equals(that.isPubliclyAccessible) : that.isPubliclyAccessible != null) return false;
if (this.kmsKey != null ? !this.kmsKey.equals(that.kmsKey) : that.kmsKey != null) return false;
if (this.memory != null ? !this.memory.equals(that.memory) : that.memory != null) return false;
if (this.observabilityConfiguration != null ? !this.observabilityConfiguration.equals(that.observabilityConfiguration) : that.observabilityConfiguration != null) return false;
if (this.serviceName != null ? !this.serviceName.equals(that.serviceName) : that.serviceName != null) return false;
return this.vpcConnector != null ? this.vpcConnector.equals(that.vpcConnector) : that.vpcConnector == null;
}
@Override
public final int hashCode() {
int result = this.source.hashCode();
result = 31 * result + (this.accessRole != null ? this.accessRole.hashCode() : 0);
result = 31 * result + (this.autoDeploymentsEnabled != null ? this.autoDeploymentsEnabled.hashCode() : 0);
result = 31 * result + (this.autoScalingConfiguration != null ? this.autoScalingConfiguration.hashCode() : 0);
result = 31 * result + (this.cpu != null ? this.cpu.hashCode() : 0);
result = 31 * result + (this.healthCheck != null ? this.healthCheck.hashCode() : 0);
result = 31 * result + (this.instanceRole != null ? this.instanceRole.hashCode() : 0);
result = 31 * result + (this.ipAddressType != null ? this.ipAddressType.hashCode() : 0);
result = 31 * result + (this.isPubliclyAccessible != null ? this.isPubliclyAccessible.hashCode() : 0);
result = 31 * result + (this.kmsKey != null ? this.kmsKey.hashCode() : 0);
result = 31 * result + (this.memory != null ? this.memory.hashCode() : 0);
result = 31 * result + (this.observabilityConfiguration != null ? this.observabilityConfiguration.hashCode() : 0);
result = 31 * result + (this.serviceName != null ? this.serviceName.hashCode() : 0);
result = 31 * result + (this.vpcConnector != null ? this.vpcConnector.hashCode() : 0);
return result;
}
}
}