/* * 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; /** *
* The EC2 Instance Connect Endpoint. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Ec2InstanceConnectEndpoint implements Serializable, Cloneable { /** ** The ID of the Amazon Web Services account that created the EC2 Instance Connect Endpoint. *
*/ private String ownerId; /** ** The ID of the EC2 Instance Connect Endpoint. *
*/ private String instanceConnectEndpointId; /** ** The Amazon Resource Name (ARN) of the EC2 Instance Connect Endpoint. *
*/ private String instanceConnectEndpointArn; /** ** The current state of the EC2 Instance Connect Endpoint. *
*/ private String state; /** ** The message for the current state of the EC2 Instance Connect Endpoint. Can include a failure message. *
*/ private String stateMessage; /** ** The DNS name of the EC2 Instance Connect Endpoint. *
*/ private String dnsName; /** */ private String fipsDnsName; /** ** The ID of the elastic network interface that Amazon EC2 automatically created when creating the EC2 Instance * Connect Endpoint. *
*/ private com.amazonaws.internal.SdkInternalList* The ID of the VPC in which the EC2 Instance Connect Endpoint was created. *
*/ private String vpcId; /** ** The Availability Zone of the EC2 Instance Connect Endpoint. *
*/ private String availabilityZone; /** ** The date and time that the EC2 Instance Connect Endpoint was created. *
*/ private java.util.Date createdAt; /** ** The ID of the subnet in which the EC2 Instance Connect Endpoint was created. *
*/ private String subnetId; /** *
* Indicates whether your client's IP address is preserved as the source. The value is true
or
* false
.
*
* If true
, your client's IP address is used when you connect to a resource.
*
* If false
, the elastic network interface IP address is used when you connect to a resource.
*
* Default: true
*
* The security groups associated with the endpoint. If you didn't specify a security group, the default security * group for your VPC is associated with the endpoint. *
*/ private com.amazonaws.internal.SdkInternalList* The tags assigned to the EC2 Instance Connect Endpoint. *
*/ private com.amazonaws.internal.SdkInternalList* The ID of the Amazon Web Services account that created the EC2 Instance Connect Endpoint. *
* * @param ownerId * The ID of the Amazon Web Services account that created the EC2 Instance Connect Endpoint. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** ** The ID of the Amazon Web Services account that created the EC2 Instance Connect Endpoint. *
* * @return The ID of the Amazon Web Services account that created the EC2 Instance Connect Endpoint. */ public String getOwnerId() { return this.ownerId; } /** ** The ID of the Amazon Web Services account that created the EC2 Instance Connect Endpoint. *
* * @param ownerId * The ID of the Amazon Web Services account that created the EC2 Instance Connect Endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** ** The ID of the EC2 Instance Connect Endpoint. *
* * @param instanceConnectEndpointId * The ID of the EC2 Instance Connect Endpoint. */ public void setInstanceConnectEndpointId(String instanceConnectEndpointId) { this.instanceConnectEndpointId = instanceConnectEndpointId; } /** ** The ID of the EC2 Instance Connect Endpoint. *
* * @return The ID of the EC2 Instance Connect Endpoint. */ public String getInstanceConnectEndpointId() { return this.instanceConnectEndpointId; } /** ** The ID of the EC2 Instance Connect Endpoint. *
* * @param instanceConnectEndpointId * The ID of the EC2 Instance Connect Endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withInstanceConnectEndpointId(String instanceConnectEndpointId) { setInstanceConnectEndpointId(instanceConnectEndpointId); return this; } /** ** The Amazon Resource Name (ARN) of the EC2 Instance Connect Endpoint. *
* * @param instanceConnectEndpointArn * The Amazon Resource Name (ARN) of the EC2 Instance Connect Endpoint. */ public void setInstanceConnectEndpointArn(String instanceConnectEndpointArn) { this.instanceConnectEndpointArn = instanceConnectEndpointArn; } /** ** The Amazon Resource Name (ARN) of the EC2 Instance Connect Endpoint. *
* * @return The Amazon Resource Name (ARN) of the EC2 Instance Connect Endpoint. */ public String getInstanceConnectEndpointArn() { return this.instanceConnectEndpointArn; } /** ** The Amazon Resource Name (ARN) of the EC2 Instance Connect Endpoint. *
* * @param instanceConnectEndpointArn * The Amazon Resource Name (ARN) of the EC2 Instance Connect Endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withInstanceConnectEndpointArn(String instanceConnectEndpointArn) { setInstanceConnectEndpointArn(instanceConnectEndpointArn); return this; } /** ** The current state of the EC2 Instance Connect Endpoint. *
* * @param state * The current state of the EC2 Instance Connect Endpoint. * @see Ec2InstanceConnectEndpointState */ public void setState(String state) { this.state = state; } /** ** The current state of the EC2 Instance Connect Endpoint. *
* * @return The current state of the EC2 Instance Connect Endpoint. * @see Ec2InstanceConnectEndpointState */ public String getState() { return this.state; } /** ** The current state of the EC2 Instance Connect Endpoint. *
* * @param state * The current state of the EC2 Instance Connect Endpoint. * @return Returns a reference to this object so that method calls can be chained together. * @see Ec2InstanceConnectEndpointState */ public Ec2InstanceConnectEndpoint withState(String state) { setState(state); return this; } /** ** The current state of the EC2 Instance Connect Endpoint. *
* * @param state * The current state of the EC2 Instance Connect Endpoint. * @return Returns a reference to this object so that method calls can be chained together. * @see Ec2InstanceConnectEndpointState */ public Ec2InstanceConnectEndpoint withState(Ec2InstanceConnectEndpointState state) { this.state = state.toString(); return this; } /** ** The message for the current state of the EC2 Instance Connect Endpoint. Can include a failure message. *
* * @param stateMessage * The message for the current state of the EC2 Instance Connect Endpoint. Can include a failure message. */ public void setStateMessage(String stateMessage) { this.stateMessage = stateMessage; } /** ** The message for the current state of the EC2 Instance Connect Endpoint. Can include a failure message. *
* * @return The message for the current state of the EC2 Instance Connect Endpoint. Can include a failure message. */ public String getStateMessage() { return this.stateMessage; } /** ** The message for the current state of the EC2 Instance Connect Endpoint. Can include a failure message. *
* * @param stateMessage * The message for the current state of the EC2 Instance Connect Endpoint. Can include a failure message. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withStateMessage(String stateMessage) { setStateMessage(stateMessage); return this; } /** ** The DNS name of the EC2 Instance Connect Endpoint. *
* * @param dnsName * The DNS name of the EC2 Instance Connect Endpoint. */ public void setDnsName(String dnsName) { this.dnsName = dnsName; } /** ** The DNS name of the EC2 Instance Connect Endpoint. *
* * @return The DNS name of the EC2 Instance Connect Endpoint. */ public String getDnsName() { return this.dnsName; } /** ** The DNS name of the EC2 Instance Connect Endpoint. *
* * @param dnsName * The DNS name of the EC2 Instance Connect Endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withDnsName(String dnsName) { setDnsName(dnsName); return this; } /** * * * @param fipsDnsName */ public void setFipsDnsName(String fipsDnsName) { this.fipsDnsName = fipsDnsName; } /** * * * @return */ public String getFipsDnsName() { return this.fipsDnsName; } /** * * * @param fipsDnsName * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withFipsDnsName(String fipsDnsName) { setFipsDnsName(fipsDnsName); return this; } /** ** The ID of the elastic network interface that Amazon EC2 automatically created when creating the EC2 Instance * Connect Endpoint. *
* * @return The ID of the elastic network interface that Amazon EC2 automatically created when creating the EC2 * Instance Connect Endpoint. */ public java.util.List* The ID of the elastic network interface that Amazon EC2 automatically created when creating the EC2 Instance * Connect Endpoint. *
* * @param networkInterfaceIds * The ID of the elastic network interface that Amazon EC2 automatically created when creating the EC2 * Instance Connect Endpoint. */ public void setNetworkInterfaceIds(java.util.Collection* The ID of the elastic network interface that Amazon EC2 automatically created when creating the EC2 Instance * Connect Endpoint. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setNetworkInterfaceIds(java.util.Collection)} or {@link #withNetworkInterfaceIds(java.util.Collection)} * if you want to override the existing values. *
* * @param networkInterfaceIds * The ID of the elastic network interface that Amazon EC2 automatically created when creating the EC2 * Instance Connect Endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withNetworkInterfaceIds(String... networkInterfaceIds) { if (this.networkInterfaceIds == null) { setNetworkInterfaceIds(new com.amazonaws.internal.SdkInternalList* The ID of the elastic network interface that Amazon EC2 automatically created when creating the EC2 Instance * Connect Endpoint. *
* * @param networkInterfaceIds * The ID of the elastic network interface that Amazon EC2 automatically created when creating the EC2 * Instance Connect Endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withNetworkInterfaceIds(java.util.Collection* The ID of the VPC in which the EC2 Instance Connect Endpoint was created. *
* * @param vpcId * The ID of the VPC in which the EC2 Instance Connect Endpoint was created. */ public void setVpcId(String vpcId) { this.vpcId = vpcId; } /** ** The ID of the VPC in which the EC2 Instance Connect Endpoint was created. *
* * @return The ID of the VPC in which the EC2 Instance Connect Endpoint was created. */ public String getVpcId() { return this.vpcId; } /** ** The ID of the VPC in which the EC2 Instance Connect Endpoint was created. *
* * @param vpcId * The ID of the VPC in which the EC2 Instance Connect Endpoint was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withVpcId(String vpcId) { setVpcId(vpcId); return this; } /** ** The Availability Zone of the EC2 Instance Connect Endpoint. *
* * @param availabilityZone * The Availability Zone of the EC2 Instance Connect Endpoint. */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } /** ** The Availability Zone of the EC2 Instance Connect Endpoint. *
* * @return The Availability Zone of the EC2 Instance Connect Endpoint. */ public String getAvailabilityZone() { return this.availabilityZone; } /** ** The Availability Zone of the EC2 Instance Connect Endpoint. *
* * @param availabilityZone * The Availability Zone of the EC2 Instance Connect Endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** ** The date and time that the EC2 Instance Connect Endpoint was created. *
* * @param createdAt * The date and time that the EC2 Instance Connect Endpoint was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** ** The date and time that the EC2 Instance Connect Endpoint was created. *
* * @return The date and time that the EC2 Instance Connect Endpoint was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** ** The date and time that the EC2 Instance Connect Endpoint was created. *
* * @param createdAt * The date and time that the EC2 Instance Connect Endpoint was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** ** The ID of the subnet in which the EC2 Instance Connect Endpoint was created. *
* * @param subnetId * The ID of the subnet in which the EC2 Instance Connect Endpoint was created. */ public void setSubnetId(String subnetId) { this.subnetId = subnetId; } /** ** The ID of the subnet in which the EC2 Instance Connect Endpoint was created. *
* * @return The ID of the subnet in which the EC2 Instance Connect Endpoint was created. */ public String getSubnetId() { return this.subnetId; } /** ** The ID of the subnet in which the EC2 Instance Connect Endpoint was created. *
* * @param subnetId * The ID of the subnet in which the EC2 Instance Connect Endpoint was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withSubnetId(String subnetId) { setSubnetId(subnetId); return this; } /** *
* Indicates whether your client's IP address is preserved as the source. The value is true
or
* false
.
*
* If true
, your client's IP address is used when you connect to a resource.
*
* If false
, the elastic network interface IP address is used when you connect to a resource.
*
* Default: true
*
true
or
* false
.
*
* If true
, your client's IP address is used when you connect to a resource.
*
* If false
, the elastic network interface IP address is used when you connect to a resource.
*
* Default: true
*/
public void setPreserveClientIp(Boolean preserveClientIp) {
this.preserveClientIp = preserveClientIp;
}
/**
*
* Indicates whether your client's IP address is preserved as the source. The value is true
or
* false
.
*
* If true
, your client's IP address is used when you connect to a resource.
*
* If false
, the elastic network interface IP address is used when you connect to a resource.
*
* Default: true
*
true
or
* false
.
*
* If true
, your client's IP address is used when you connect to a resource.
*
* If false
, the elastic network interface IP address is used when you connect to a resource.
*
* Default: true
*/
public Boolean getPreserveClientIp() {
return this.preserveClientIp;
}
/**
*
* Indicates whether your client's IP address is preserved as the source. The value is true
or
* false
.
*
* If true
, your client's IP address is used when you connect to a resource.
*
* If false
, the elastic network interface IP address is used when you connect to a resource.
*
* Default: true
*
true
or
* false
.
*
* If true
, your client's IP address is used when you connect to a resource.
*
* If false
, the elastic network interface IP address is used when you connect to a resource.
*
* Default: true
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Ec2InstanceConnectEndpoint withPreserveClientIp(Boolean preserveClientIp) {
setPreserveClientIp(preserveClientIp);
return this;
}
/**
*
* Indicates whether your client's IP address is preserved as the source. The value is true
or
* false
.
*
* If true
, your client's IP address is used when you connect to a resource.
*
* If false
, the elastic network interface IP address is used when you connect to a resource.
*
* Default: true
*
true
or
* false
.
*
* If true
, your client's IP address is used when you connect to a resource.
*
* If false
, the elastic network interface IP address is used when you connect to a resource.
*
* Default: true
*/
public Boolean isPreserveClientIp() {
return this.preserveClientIp;
}
/**
*
* The security groups associated with the endpoint. If you didn't specify a security group, the default security * group for your VPC is associated with the endpoint. *
* * @return The security groups associated with the endpoint. If you didn't specify a security group, the default * security group for your VPC is associated with the endpoint. */ public java.util.List* The security groups associated with the endpoint. If you didn't specify a security group, the default security * group for your VPC is associated with the endpoint. *
* * @param securityGroupIds * The security groups associated with the endpoint. If you didn't specify a security group, the default * security group for your VPC is associated with the endpoint. */ public void setSecurityGroupIds(java.util.Collection* The security groups associated with the endpoint. If you didn't specify a security group, the default security * group for your VPC is associated with the endpoint. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecurityGroupIds(java.util.Collection)} or {@link #withSecurityGroupIds(java.util.Collection)} if you * want to override the existing values. *
* * @param securityGroupIds * The security groups associated with the endpoint. If you didn't specify a security group, the default * security group for your VPC is associated with the endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withSecurityGroupIds(String... securityGroupIds) { if (this.securityGroupIds == null) { setSecurityGroupIds(new com.amazonaws.internal.SdkInternalList* The security groups associated with the endpoint. If you didn't specify a security group, the default security * group for your VPC is associated with the endpoint. *
* * @param securityGroupIds * The security groups associated with the endpoint. If you didn't specify a security group, the default * security group for your VPC is associated with the endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withSecurityGroupIds(java.util.Collection* The tags assigned to the EC2 Instance Connect Endpoint. *
* * @return The tags assigned to the EC2 Instance Connect Endpoint. */ public java.util.List* The tags assigned to the EC2 Instance Connect Endpoint. *
* * @param tags * The tags assigned to the EC2 Instance Connect Endpoint. */ public void setTags(java.util.Collection* The tags assigned to the EC2 Instance Connect Endpoint. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * The tags assigned to the EC2 Instance Connect Endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* The tags assigned to the EC2 Instance Connect Endpoint. *
* * @param tags * The tags assigned to the EC2 Instance Connect Endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceConnectEndpoint withTags(java.util.Collection