/* * Copyright 2018-2023 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 com.amazonaws.services.ec2.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Describes a target network associated with a Client VPN endpoint. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TargetNetwork implements Serializable, Cloneable { /** ** The ID of the association. *
*/ private String associationId; /** ** The ID of the VPC in which the target network (subnet) is located. *
*/ private String vpcId; /** ** The ID of the subnet specified as the target network. *
*/ private String targetNetworkId; /** ** The ID of the Client VPN endpoint with which the target network is associated. *
*/ private String clientVpnEndpointId; /** ** The current state of the target network association. *
*/ private AssociationStatus status; /** ** The IDs of the security groups applied to the target network association. *
*/ private com.amazonaws.internal.SdkInternalList* The ID of the association. *
* * @param associationId * The ID of the association. */ public void setAssociationId(String associationId) { this.associationId = associationId; } /** ** The ID of the association. *
* * @return The ID of the association. */ public String getAssociationId() { return this.associationId; } /** ** The ID of the association. *
* * @param associationId * The ID of the association. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetNetwork withAssociationId(String associationId) { setAssociationId(associationId); return this; } /** ** The ID of the VPC in which the target network (subnet) is located. *
* * @param vpcId * The ID of the VPC in which the target network (subnet) is located. */ public void setVpcId(String vpcId) { this.vpcId = vpcId; } /** ** The ID of the VPC in which the target network (subnet) is located. *
* * @return The ID of the VPC in which the target network (subnet) is located. */ public String getVpcId() { return this.vpcId; } /** ** The ID of the VPC in which the target network (subnet) is located. *
* * @param vpcId * The ID of the VPC in which the target network (subnet) is located. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetNetwork withVpcId(String vpcId) { setVpcId(vpcId); return this; } /** ** The ID of the subnet specified as the target network. *
* * @param targetNetworkId * The ID of the subnet specified as the target network. */ public void setTargetNetworkId(String targetNetworkId) { this.targetNetworkId = targetNetworkId; } /** ** The ID of the subnet specified as the target network. *
* * @return The ID of the subnet specified as the target network. */ public String getTargetNetworkId() { return this.targetNetworkId; } /** ** The ID of the subnet specified as the target network. *
* * @param targetNetworkId * The ID of the subnet specified as the target network. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetNetwork withTargetNetworkId(String targetNetworkId) { setTargetNetworkId(targetNetworkId); return this; } /** ** The ID of the Client VPN endpoint with which the target network is associated. *
* * @param clientVpnEndpointId * The ID of the Client VPN endpoint with which the target network is associated. */ public void setClientVpnEndpointId(String clientVpnEndpointId) { this.clientVpnEndpointId = clientVpnEndpointId; } /** ** The ID of the Client VPN endpoint with which the target network is associated. *
* * @return The ID of the Client VPN endpoint with which the target network is associated. */ public String getClientVpnEndpointId() { return this.clientVpnEndpointId; } /** ** The ID of the Client VPN endpoint with which the target network is associated. *
* * @param clientVpnEndpointId * The ID of the Client VPN endpoint with which the target network is associated. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetNetwork withClientVpnEndpointId(String clientVpnEndpointId) { setClientVpnEndpointId(clientVpnEndpointId); return this; } /** ** The current state of the target network association. *
* * @param status * The current state of the target network association. */ public void setStatus(AssociationStatus status) { this.status = status; } /** ** The current state of the target network association. *
* * @return The current state of the target network association. */ public AssociationStatus getStatus() { return this.status; } /** ** The current state of the target network association. *
* * @param status * The current state of the target network association. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetNetwork withStatus(AssociationStatus status) { setStatus(status); return this; } /** ** The IDs of the security groups applied to the target network association. *
* * @return The IDs of the security groups applied to the target network association. */ public java.util.List* The IDs of the security groups applied to the target network association. *
* * @param securityGroups * The IDs of the security groups applied to the target network association. */ public void setSecurityGroups(java.util.Collection* The IDs of the security groups applied to the target network association. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecurityGroups(java.util.Collection)} or {@link #withSecurityGroups(java.util.Collection)} if you want * to override the existing values. *
* * @param securityGroups * The IDs of the security groups applied to the target network association. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetNetwork withSecurityGroups(String... securityGroups) { if (this.securityGroups == null) { setSecurityGroups(new com.amazonaws.internal.SdkInternalList* The IDs of the security groups applied to the target network association. *
* * @param securityGroups * The IDs of the security groups applied to the target network association. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetNetwork withSecurityGroups(java.util.Collection