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

software.amazon.awssdk.services.apprunner.model.VpcIngressConnection Maven / Gradle / Ivy

Go to download

The AWS Java SDK for App Runner module holds the client classes that are used for communicating with App Runner.

There is a newer version: 2.28.4
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.apprunner.model;

import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* The App Runner resource that specifies an App Runner endpoint for incoming traffic. It establishes a connection * between a VPC interface endpoint and a App Runner service, to make your App Runner service accessible from only * within an Amazon VPC. *

*/ @Generated("software.amazon.awssdk:codegen") public final class VpcIngressConnection implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField VPC_INGRESS_CONNECTION_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("VpcIngressConnectionArn").getter(getter(VpcIngressConnection::vpcIngressConnectionArn)) .setter(setter(Builder::vpcIngressConnectionArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcIngressConnectionArn").build()) .build(); private static final SdkField VPC_INGRESS_CONNECTION_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("VpcIngressConnectionName").getter(getter(VpcIngressConnection::vpcIngressConnectionName)) .setter(setter(Builder::vpcIngressConnectionName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcIngressConnectionName").build()) .build(); private static final SdkField SERVICE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ServiceArn").getter(getter(VpcIngressConnection::serviceArn)).setter(setter(Builder::serviceArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServiceArn").build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Status") .getter(getter(VpcIngressConnection::statusAsString)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build(); private static final SdkField ACCOUNT_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AccountId").getter(getter(VpcIngressConnection::accountId)).setter(setter(Builder::accountId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AccountId").build()).build(); private static final SdkField DOMAIN_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("DomainName").getter(getter(VpcIngressConnection::domainName)).setter(setter(Builder::domainName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DomainName").build()).build(); private static final SdkField INGRESS_VPC_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("IngressVpcConfiguration") .getter(getter(VpcIngressConnection::ingressVpcConfiguration)).setter(setter(Builder::ingressVpcConfiguration)) .constructor(IngressVpcConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IngressVpcConfiguration").build()) .build(); private static final SdkField CREATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreatedAt").getter(getter(VpcIngressConnection::createdAt)).setter(setter(Builder::createdAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedAt").build()).build(); private static final SdkField DELETED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("DeletedAt").getter(getter(VpcIngressConnection::deletedAt)).setter(setter(Builder::deletedAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DeletedAt").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList( VPC_INGRESS_CONNECTION_ARN_FIELD, VPC_INGRESS_CONNECTION_NAME_FIELD, SERVICE_ARN_FIELD, STATUS_FIELD, ACCOUNT_ID_FIELD, DOMAIN_NAME_FIELD, INGRESS_VPC_CONFIGURATION_FIELD, CREATED_AT_FIELD, DELETED_AT_FIELD)); private static final long serialVersionUID = 1L; private final String vpcIngressConnectionArn; private final String vpcIngressConnectionName; private final String serviceArn; private final String status; private final String accountId; private final String domainName; private final IngressVpcConfiguration ingressVpcConfiguration; private final Instant createdAt; private final Instant deletedAt; private VpcIngressConnection(BuilderImpl builder) { this.vpcIngressConnectionArn = builder.vpcIngressConnectionArn; this.vpcIngressConnectionName = builder.vpcIngressConnectionName; this.serviceArn = builder.serviceArn; this.status = builder.status; this.accountId = builder.accountId; this.domainName = builder.domainName; this.ingressVpcConfiguration = builder.ingressVpcConfiguration; this.createdAt = builder.createdAt; this.deletedAt = builder.deletedAt; } /** *

* The Amazon Resource Name (ARN) of the VPC Ingress Connection. *

* * @return The Amazon Resource Name (ARN) of the VPC Ingress Connection. */ public final String vpcIngressConnectionArn() { return vpcIngressConnectionArn; } /** *

* The customer-provided VPC Ingress Connection name. *

* * @return The customer-provided VPC Ingress Connection name. */ public final String vpcIngressConnectionName() { return vpcIngressConnectionName; } /** *

* The Amazon Resource Name (ARN) of the service associated with the VPC Ingress Connection. *

* * @return The Amazon Resource Name (ARN) of the service associated with the VPC Ingress Connection. */ public final String serviceArn() { return serviceArn; } /** *

* The current status of the VPC Ingress Connection. The VPC Ingress Connection displays one of the following * statuses: AVAILABLE, PENDING_CREATION, PENDING_UPDATE, * PENDING_DELETION,FAILED_CREATION, FAILED_UPDATE, * FAILED_DELETION, and DELETED.. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link VpcIngressConnectionStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #statusAsString}. *

* * @return The current status of the VPC Ingress Connection. The VPC Ingress Connection displays one of the * following statuses: AVAILABLE, PENDING_CREATION, PENDING_UPDATE, * PENDING_DELETION,FAILED_CREATION, FAILED_UPDATE, * FAILED_DELETION, and DELETED.. * @see VpcIngressConnectionStatus */ public final VpcIngressConnectionStatus status() { return VpcIngressConnectionStatus.fromValue(status); } /** *

* The current status of the VPC Ingress Connection. The VPC Ingress Connection displays one of the following * statuses: AVAILABLE, PENDING_CREATION, PENDING_UPDATE, * PENDING_DELETION,FAILED_CREATION, FAILED_UPDATE, * FAILED_DELETION, and DELETED.. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link VpcIngressConnectionStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #statusAsString}. *

* * @return The current status of the VPC Ingress Connection. The VPC Ingress Connection displays one of the * following statuses: AVAILABLE, PENDING_CREATION, PENDING_UPDATE, * PENDING_DELETION,FAILED_CREATION, FAILED_UPDATE, * FAILED_DELETION, and DELETED.. * @see VpcIngressConnectionStatus */ public final String statusAsString() { return status; } /** *

* The Account Id you use to create the VPC Ingress Connection resource. *

* * @return The Account Id you use to create the VPC Ingress Connection resource. */ public final String accountId() { return accountId; } /** *

* The domain name associated with the VPC Ingress Connection resource. *

* * @return The domain name associated with the VPC Ingress Connection resource. */ public final String domainName() { return domainName; } /** *

* Specifications for the customer’s VPC and related PrivateLink VPC endpoint that are used to associate with the * VPC Ingress Connection resource. *

* * @return Specifications for the customer’s VPC and related PrivateLink VPC endpoint that are used to associate * with the VPC Ingress Connection resource. */ public final IngressVpcConfiguration ingressVpcConfiguration() { return ingressVpcConfiguration; } /** *

* The time when the VPC Ingress Connection was created. It's in the Unix time stamp format. *

*
    *
  • *

    * Type: Timestamp *

    *
  • *
  • *

    * Required: Yes *

    *
  • *
* * @return The time when the VPC Ingress Connection was created. It's in the Unix time stamp format.

*
    *
  • *

    * Type: Timestamp *

    *
  • *
  • *

    * Required: Yes *

    *
  • */ public final Instant createdAt() { return createdAt; } /** *

    * The time when the App Runner service was deleted. It's in the Unix time stamp format. *

    *
      *
    • *

      * Type: Timestamp *

      *
    • *
    • *

      * Required: No *

      *
    • *
    * * @return The time when the App Runner service was deleted. It's in the Unix time stamp format.

    *
      *
    • *

      * Type: Timestamp *

      *
    • *
    • *

      * Required: No *

      *
    • */ public final Instant deletedAt() { return deletedAt; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(vpcIngressConnectionArn()); hashCode = 31 * hashCode + Objects.hashCode(vpcIngressConnectionName()); hashCode = 31 * hashCode + Objects.hashCode(serviceArn()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(accountId()); hashCode = 31 * hashCode + Objects.hashCode(domainName()); hashCode = 31 * hashCode + Objects.hashCode(ingressVpcConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(createdAt()); hashCode = 31 * hashCode + Objects.hashCode(deletedAt()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof VpcIngressConnection)) { return false; } VpcIngressConnection other = (VpcIngressConnection) obj; return Objects.equals(vpcIngressConnectionArn(), other.vpcIngressConnectionArn()) && Objects.equals(vpcIngressConnectionName(), other.vpcIngressConnectionName()) && Objects.equals(serviceArn(), other.serviceArn()) && Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(accountId(), other.accountId()) && Objects.equals(domainName(), other.domainName()) && Objects.equals(ingressVpcConfiguration(), other.ingressVpcConfiguration()) && Objects.equals(createdAt(), other.createdAt()) && Objects.equals(deletedAt(), other.deletedAt()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("VpcIngressConnection").add("VpcIngressConnectionArn", vpcIngressConnectionArn()) .add("VpcIngressConnectionName", vpcIngressConnectionName()).add("ServiceArn", serviceArn()) .add("Status", statusAsString()).add("AccountId", accountId()).add("DomainName", domainName()) .add("IngressVpcConfiguration", ingressVpcConfiguration()).add("CreatedAt", createdAt()) .add("DeletedAt", deletedAt()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "VpcIngressConnectionArn": return Optional.ofNullable(clazz.cast(vpcIngressConnectionArn())); case "VpcIngressConnectionName": return Optional.ofNullable(clazz.cast(vpcIngressConnectionName())); case "ServiceArn": return Optional.ofNullable(clazz.cast(serviceArn())); case "Status": return Optional.ofNullable(clazz.cast(statusAsString())); case "AccountId": return Optional.ofNullable(clazz.cast(accountId())); case "DomainName": return Optional.ofNullable(clazz.cast(domainName())); case "IngressVpcConfiguration": return Optional.ofNullable(clazz.cast(ingressVpcConfiguration())); case "CreatedAt": return Optional.ofNullable(clazz.cast(createdAt())); case "DeletedAt": return Optional.ofNullable(clazz.cast(deletedAt())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((VpcIngressConnection) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

      * The Amazon Resource Name (ARN) of the VPC Ingress Connection. *

      * * @param vpcIngressConnectionArn * The Amazon Resource Name (ARN) of the VPC Ingress Connection. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcIngressConnectionArn(String vpcIngressConnectionArn); /** *

      * The customer-provided VPC Ingress Connection name. *

      * * @param vpcIngressConnectionName * The customer-provided VPC Ingress Connection name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcIngressConnectionName(String vpcIngressConnectionName); /** *

      * The Amazon Resource Name (ARN) of the service associated with the VPC Ingress Connection. *

      * * @param serviceArn * The Amazon Resource Name (ARN) of the service associated with the VPC Ingress Connection. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceArn(String serviceArn); /** *

      * The current status of the VPC Ingress Connection. The VPC Ingress Connection displays one of the following * statuses: AVAILABLE, PENDING_CREATION, PENDING_UPDATE, * PENDING_DELETION,FAILED_CREATION, FAILED_UPDATE, * FAILED_DELETION, and DELETED.. *

      * * @param status * The current status of the VPC Ingress Connection. The VPC Ingress Connection displays one of the * following statuses: AVAILABLE, PENDING_CREATION, PENDING_UPDATE * , PENDING_DELETION,FAILED_CREATION, FAILED_UPDATE, * FAILED_DELETION, and DELETED.. * @see VpcIngressConnectionStatus * @return Returns a reference to this object so that method calls can be chained together. * @see VpcIngressConnectionStatus */ Builder status(String status); /** *

      * The current status of the VPC Ingress Connection. The VPC Ingress Connection displays one of the following * statuses: AVAILABLE, PENDING_CREATION, PENDING_UPDATE, * PENDING_DELETION,FAILED_CREATION, FAILED_UPDATE, * FAILED_DELETION, and DELETED.. *

      * * @param status * The current status of the VPC Ingress Connection. The VPC Ingress Connection displays one of the * following statuses: AVAILABLE, PENDING_CREATION, PENDING_UPDATE * , PENDING_DELETION,FAILED_CREATION, FAILED_UPDATE, * FAILED_DELETION, and DELETED.. * @see VpcIngressConnectionStatus * @return Returns a reference to this object so that method calls can be chained together. * @see VpcIngressConnectionStatus */ Builder status(VpcIngressConnectionStatus status); /** *

      * The Account Id you use to create the VPC Ingress Connection resource. *

      * * @param accountId * The Account Id you use to create the VPC Ingress Connection resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder accountId(String accountId); /** *

      * The domain name associated with the VPC Ingress Connection resource. *

      * * @param domainName * The domain name associated with the VPC Ingress Connection resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder domainName(String domainName); /** *

      * Specifications for the customer’s VPC and related PrivateLink VPC endpoint that are used to associate with * the VPC Ingress Connection resource. *

      * * @param ingressVpcConfiguration * Specifications for the customer’s VPC and related PrivateLink VPC endpoint that are used to associate * with the VPC Ingress Connection resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ingressVpcConfiguration(IngressVpcConfiguration ingressVpcConfiguration); /** *

      * Specifications for the customer’s VPC and related PrivateLink VPC endpoint that are used to associate with * the VPC Ingress Connection resource. *

      * This is a convenience method that creates an instance of the {@link IngressVpcConfiguration.Builder} avoiding * the need to create one manually via {@link IngressVpcConfiguration#builder()}. * *

      * When the {@link Consumer} completes, {@link IngressVpcConfiguration.Builder#build()} is called immediately * and its result is passed to {@link #ingressVpcConfiguration(IngressVpcConfiguration)}. * * @param ingressVpcConfiguration * a consumer that will call methods on {@link IngressVpcConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #ingressVpcConfiguration(IngressVpcConfiguration) */ default Builder ingressVpcConfiguration(Consumer ingressVpcConfiguration) { return ingressVpcConfiguration(IngressVpcConfiguration.builder().applyMutation(ingressVpcConfiguration).build()); } /** *

      * The time when the VPC Ingress Connection was created. It's in the Unix time stamp format. *

      *
        *
      • *

        * Type: Timestamp *

        *
      • *
      • *

        * Required: Yes *

        *
      • *
      * * @param createdAt * The time when the VPC Ingress Connection was created. It's in the Unix time stamp format.

      *
        *
      • *

        * Type: Timestamp *

        *
      • *
      • *

        * Required: Yes *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdAt(Instant createdAt); /** *

        * The time when the App Runner service was deleted. It's in the Unix time stamp format. *

        *
          *
        • *

          * Type: Timestamp *

          *
        • *
        • *

          * Required: No *

          *
        • *
        * * @param deletedAt * The time when the App Runner service was deleted. It's in the Unix time stamp format.

        *
          *
        • *

          * Type: Timestamp *

          *
        • *
        • *

          * Required: No *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. */ Builder deletedAt(Instant deletedAt); } static final class BuilderImpl implements Builder { private String vpcIngressConnectionArn; private String vpcIngressConnectionName; private String serviceArn; private String status; private String accountId; private String domainName; private IngressVpcConfiguration ingressVpcConfiguration; private Instant createdAt; private Instant deletedAt; private BuilderImpl() { } private BuilderImpl(VpcIngressConnection model) { vpcIngressConnectionArn(model.vpcIngressConnectionArn); vpcIngressConnectionName(model.vpcIngressConnectionName); serviceArn(model.serviceArn); status(model.status); accountId(model.accountId); domainName(model.domainName); ingressVpcConfiguration(model.ingressVpcConfiguration); createdAt(model.createdAt); deletedAt(model.deletedAt); } public final String getVpcIngressConnectionArn() { return vpcIngressConnectionArn; } public final void setVpcIngressConnectionArn(String vpcIngressConnectionArn) { this.vpcIngressConnectionArn = vpcIngressConnectionArn; } @Override public final Builder vpcIngressConnectionArn(String vpcIngressConnectionArn) { this.vpcIngressConnectionArn = vpcIngressConnectionArn; return this; } public final String getVpcIngressConnectionName() { return vpcIngressConnectionName; } public final void setVpcIngressConnectionName(String vpcIngressConnectionName) { this.vpcIngressConnectionName = vpcIngressConnectionName; } @Override public final Builder vpcIngressConnectionName(String vpcIngressConnectionName) { this.vpcIngressConnectionName = vpcIngressConnectionName; return this; } public final String getServiceArn() { return serviceArn; } public final void setServiceArn(String serviceArn) { this.serviceArn = serviceArn; } @Override public final Builder serviceArn(String serviceArn) { this.serviceArn = serviceArn; return this; } public final String getStatus() { return status; } public final void setStatus(String status) { this.status = status; } @Override public final Builder status(String status) { this.status = status; return this; } @Override public final Builder status(VpcIngressConnectionStatus status) { this.status(status == null ? null : status.toString()); return this; } public final String getAccountId() { return accountId; } public final void setAccountId(String accountId) { this.accountId = accountId; } @Override public final Builder accountId(String accountId) { this.accountId = accountId; return this; } public final String getDomainName() { return domainName; } public final void setDomainName(String domainName) { this.domainName = domainName; } @Override public final Builder domainName(String domainName) { this.domainName = domainName; return this; } public final IngressVpcConfiguration.Builder getIngressVpcConfiguration() { return ingressVpcConfiguration != null ? ingressVpcConfiguration.toBuilder() : null; } public final void setIngressVpcConfiguration(IngressVpcConfiguration.BuilderImpl ingressVpcConfiguration) { this.ingressVpcConfiguration = ingressVpcConfiguration != null ? ingressVpcConfiguration.build() : null; } @Override public final Builder ingressVpcConfiguration(IngressVpcConfiguration ingressVpcConfiguration) { this.ingressVpcConfiguration = ingressVpcConfiguration; return this; } public final Instant getCreatedAt() { return createdAt; } public final void setCreatedAt(Instant createdAt) { this.createdAt = createdAt; } @Override public final Builder createdAt(Instant createdAt) { this.createdAt = createdAt; return this; } public final Instant getDeletedAt() { return deletedAt; } public final void setDeletedAt(Instant deletedAt) { this.deletedAt = deletedAt; } @Override public final Builder deletedAt(Instant deletedAt) { this.deletedAt = deletedAt; return this; } @Override public VpcIngressConnection build() { return new VpcIngressConnection(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy