com.amazonaws.services.resiliencehub.model.PhysicalResourceId Maven / Gradle / Ivy
Show all versions of aws-java-sdk-resiliencehub Show documentation
/*
* Copyright 2019-2024 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.resiliencehub.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Defines a physical resource identifier.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class PhysicalResourceId implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Web Services account that owns the physical resource.
*
*/
private String awsAccountId;
/**
*
* The Amazon Web Services Region that the physical resource is located in.
*
*/
private String awsRegion;
/**
*
* Identifier of the physical resource.
*
*/
private String identifier;
/**
*
* Specifies the type of physical resource identifier.
*
*
* - Arn
* -
*
* The resource identifier is an Amazon Resource Name (ARN) and it can identify the following list of resources:
*
*
* -
*
* AWS::ECS::Service
*
*
* -
*
* AWS::EFS::FileSystem
*
*
* -
*
* AWS::ElasticLoadBalancingV2::LoadBalancer
*
*
* -
*
* AWS::Lambda::Function
*
*
* -
*
* AWS::SNS::Topic
*
*
*
*
* - Native
* -
*
* The resource identifier is an Resilience Hub-native identifier and it can identify the following list of
* resources:
*
*
* -
*
* AWS::ApiGateway::RestApi
*
*
* -
*
* AWS::ApiGatewayV2::Api
*
*
* -
*
* AWS::AutoScaling::AutoScalingGroup
*
*
* -
*
* AWS::DocDB::DBCluster
*
*
* -
*
* AWS::DocDB::DBGlobalCluster
*
*
* -
*
* AWS::DocDB::DBInstance
*
*
* -
*
* AWS::DynamoDB::GlobalTable
*
*
* -
*
* AWS::DynamoDB::Table
*
*
* -
*
* AWS::EC2::EC2Fleet
*
*
* -
*
* AWS::EC2::Instance
*
*
* -
*
* AWS::EC2::NatGateway
*
*
* -
*
* AWS::EC2::Volume
*
*
* -
*
* AWS::ElasticLoadBalancing::LoadBalancer
*
*
* -
*
* AWS::RDS::DBCluster
*
*
* -
*
* AWS::RDS::DBInstance
*
*
* -
*
* AWS::RDS::GlobalCluster
*
*
* -
*
* AWS::Route53::RecordSet
*
*
* -
*
* AWS::S3::Bucket
*
*
* -
*
* AWS::SQS::Queue
*
*
*
*
*
*/
private String type;
/**
*
* The Amazon Web Services account that owns the physical resource.
*
*
* @param awsAccountId
* The Amazon Web Services account that owns the physical resource.
*/
public void setAwsAccountId(String awsAccountId) {
this.awsAccountId = awsAccountId;
}
/**
*
* The Amazon Web Services account that owns the physical resource.
*
*
* @return The Amazon Web Services account that owns the physical resource.
*/
public String getAwsAccountId() {
return this.awsAccountId;
}
/**
*
* The Amazon Web Services account that owns the physical resource.
*
*
* @param awsAccountId
* The Amazon Web Services account that owns the physical resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PhysicalResourceId withAwsAccountId(String awsAccountId) {
setAwsAccountId(awsAccountId);
return this;
}
/**
*
* The Amazon Web Services Region that the physical resource is located in.
*
*
* @param awsRegion
* The Amazon Web Services Region that the physical resource is located in.
*/
public void setAwsRegion(String awsRegion) {
this.awsRegion = awsRegion;
}
/**
*
* The Amazon Web Services Region that the physical resource is located in.
*
*
* @return The Amazon Web Services Region that the physical resource is located in.
*/
public String getAwsRegion() {
return this.awsRegion;
}
/**
*
* The Amazon Web Services Region that the physical resource is located in.
*
*
* @param awsRegion
* The Amazon Web Services Region that the physical resource is located in.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PhysicalResourceId withAwsRegion(String awsRegion) {
setAwsRegion(awsRegion);
return this;
}
/**
*
* Identifier of the physical resource.
*
*
* @param identifier
* Identifier of the physical resource.
*/
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
/**
*
* Identifier of the physical resource.
*
*
* @return Identifier of the physical resource.
*/
public String getIdentifier() {
return this.identifier;
}
/**
*
* Identifier of the physical resource.
*
*
* @param identifier
* Identifier of the physical resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PhysicalResourceId withIdentifier(String identifier) {
setIdentifier(identifier);
return this;
}
/**
*
* Specifies the type of physical resource identifier.
*
*
* - Arn
* -
*
* The resource identifier is an Amazon Resource Name (ARN) and it can identify the following list of resources:
*
*
* -
*
* AWS::ECS::Service
*
*
* -
*
* AWS::EFS::FileSystem
*
*
* -
*
* AWS::ElasticLoadBalancingV2::LoadBalancer
*
*
* -
*
* AWS::Lambda::Function
*
*
* -
*
* AWS::SNS::Topic
*
*
*
*
* - Native
* -
*
* The resource identifier is an Resilience Hub-native identifier and it can identify the following list of
* resources:
*
*
* -
*
* AWS::ApiGateway::RestApi
*
*
* -
*
* AWS::ApiGatewayV2::Api
*
*
* -
*
* AWS::AutoScaling::AutoScalingGroup
*
*
* -
*
* AWS::DocDB::DBCluster
*
*
* -
*
* AWS::DocDB::DBGlobalCluster
*
*
* -
*
* AWS::DocDB::DBInstance
*
*
* -
*
* AWS::DynamoDB::GlobalTable
*
*
* -
*
* AWS::DynamoDB::Table
*
*
* -
*
* AWS::EC2::EC2Fleet
*
*
* -
*
* AWS::EC2::Instance
*
*
* -
*
* AWS::EC2::NatGateway
*
*
* -
*
* AWS::EC2::Volume
*
*
* -
*
* AWS::ElasticLoadBalancing::LoadBalancer
*
*
* -
*
* AWS::RDS::DBCluster
*
*
* -
*
* AWS::RDS::DBInstance
*
*
* -
*
* AWS::RDS::GlobalCluster
*
*
* -
*
* AWS::Route53::RecordSet
*
*
* -
*
* AWS::S3::Bucket
*
*
* -
*
* AWS::SQS::Queue
*
*
*
*
*
*
* @param type
* Specifies the type of physical resource identifier.
*
* - Arn
* -
*
* The resource identifier is an Amazon Resource Name (ARN) and it can identify the following list of
* resources:
*
*
* -
*
* AWS::ECS::Service
*
*
* -
*
* AWS::EFS::FileSystem
*
*
* -
*
* AWS::ElasticLoadBalancingV2::LoadBalancer
*
*
* -
*
* AWS::Lambda::Function
*
*
* -
*
* AWS::SNS::Topic
*
*
*
*
* - Native
* -
*
* The resource identifier is an Resilience Hub-native identifier and it can identify the following list of
* resources:
*
*
* -
*
* AWS::ApiGateway::RestApi
*
*
* -
*
* AWS::ApiGatewayV2::Api
*
*
* -
*
* AWS::AutoScaling::AutoScalingGroup
*
*
* -
*
* AWS::DocDB::DBCluster
*
*
* -
*
* AWS::DocDB::DBGlobalCluster
*
*
* -
*
* AWS::DocDB::DBInstance
*
*
* -
*
* AWS::DynamoDB::GlobalTable
*
*
* -
*
* AWS::DynamoDB::Table
*
*
* -
*
* AWS::EC2::EC2Fleet
*
*
* -
*
* AWS::EC2::Instance
*
*
* -
*
* AWS::EC2::NatGateway
*
*
* -
*
* AWS::EC2::Volume
*
*
* -
*
* AWS::ElasticLoadBalancing::LoadBalancer
*
*
* -
*
* AWS::RDS::DBCluster
*
*
* -
*
* AWS::RDS::DBInstance
*
*
* -
*
* AWS::RDS::GlobalCluster
*
*
* -
*
* AWS::Route53::RecordSet
*
*
* -
*
* AWS::S3::Bucket
*
*
* -
*
* AWS::SQS::Queue
*
*
*
*
* @see PhysicalIdentifierType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* Specifies the type of physical resource identifier.
*
*
* - Arn
* -
*
* The resource identifier is an Amazon Resource Name (ARN) and it can identify the following list of resources:
*
*
* -
*
* AWS::ECS::Service
*
*
* -
*
* AWS::EFS::FileSystem
*
*
* -
*
* AWS::ElasticLoadBalancingV2::LoadBalancer
*
*
* -
*
* AWS::Lambda::Function
*
*
* -
*
* AWS::SNS::Topic
*
*
*
*
* - Native
* -
*
* The resource identifier is an Resilience Hub-native identifier and it can identify the following list of
* resources:
*
*
* -
*
* AWS::ApiGateway::RestApi
*
*
* -
*
* AWS::ApiGatewayV2::Api
*
*
* -
*
* AWS::AutoScaling::AutoScalingGroup
*
*
* -
*
* AWS::DocDB::DBCluster
*
*
* -
*
* AWS::DocDB::DBGlobalCluster
*
*
* -
*
* AWS::DocDB::DBInstance
*
*
* -
*
* AWS::DynamoDB::GlobalTable
*
*
* -
*
* AWS::DynamoDB::Table
*
*
* -
*
* AWS::EC2::EC2Fleet
*
*
* -
*
* AWS::EC2::Instance
*
*
* -
*
* AWS::EC2::NatGateway
*
*
* -
*
* AWS::EC2::Volume
*
*
* -
*
* AWS::ElasticLoadBalancing::LoadBalancer
*
*
* -
*
* AWS::RDS::DBCluster
*
*
* -
*
* AWS::RDS::DBInstance
*
*
* -
*
* AWS::RDS::GlobalCluster
*
*
* -
*
* AWS::Route53::RecordSet
*
*
* -
*
* AWS::S3::Bucket
*
*
* -
*
* AWS::SQS::Queue
*
*
*
*
*
*
* @return Specifies the type of physical resource identifier.
*
* - Arn
* -
*
* The resource identifier is an Amazon Resource Name (ARN) and it can identify the following list of
* resources:
*
*
* -
*
* AWS::ECS::Service
*
*
* -
*
* AWS::EFS::FileSystem
*
*
* -
*
* AWS::ElasticLoadBalancingV2::LoadBalancer
*
*
* -
*
* AWS::Lambda::Function
*
*
* -
*
* AWS::SNS::Topic
*
*
*
*
* - Native
* -
*
* The resource identifier is an Resilience Hub-native identifier and it can identify the following list of
* resources:
*
*
* -
*
* AWS::ApiGateway::RestApi
*
*
* -
*
* AWS::ApiGatewayV2::Api
*
*
* -
*
* AWS::AutoScaling::AutoScalingGroup
*
*
* -
*
* AWS::DocDB::DBCluster
*
*
* -
*
* AWS::DocDB::DBGlobalCluster
*
*
* -
*
* AWS::DocDB::DBInstance
*
*
* -
*
* AWS::DynamoDB::GlobalTable
*
*
* -
*
* AWS::DynamoDB::Table
*
*
* -
*
* AWS::EC2::EC2Fleet
*
*
* -
*
* AWS::EC2::Instance
*
*
* -
*
* AWS::EC2::NatGateway
*
*
* -
*
* AWS::EC2::Volume
*
*
* -
*
* AWS::ElasticLoadBalancing::LoadBalancer
*
*
* -
*
* AWS::RDS::DBCluster
*
*
* -
*
* AWS::RDS::DBInstance
*
*
* -
*
* AWS::RDS::GlobalCluster
*
*
* -
*
* AWS::Route53::RecordSet
*
*
* -
*
* AWS::S3::Bucket
*
*
* -
*
* AWS::SQS::Queue
*
*
*
*
* @see PhysicalIdentifierType
*/
public String getType() {
return this.type;
}
/**
*
* Specifies the type of physical resource identifier.
*
*
* - Arn
* -
*
* The resource identifier is an Amazon Resource Name (ARN) and it can identify the following list of resources:
*
*
* -
*
* AWS::ECS::Service
*
*
* -
*
* AWS::EFS::FileSystem
*
*
* -
*
* AWS::ElasticLoadBalancingV2::LoadBalancer
*
*
* -
*
* AWS::Lambda::Function
*
*
* -
*
* AWS::SNS::Topic
*
*
*
*
* - Native
* -
*
* The resource identifier is an Resilience Hub-native identifier and it can identify the following list of
* resources:
*
*
* -
*
* AWS::ApiGateway::RestApi
*
*
* -
*
* AWS::ApiGatewayV2::Api
*
*
* -
*
* AWS::AutoScaling::AutoScalingGroup
*
*
* -
*
* AWS::DocDB::DBCluster
*
*
* -
*
* AWS::DocDB::DBGlobalCluster
*
*
* -
*
* AWS::DocDB::DBInstance
*
*
* -
*
* AWS::DynamoDB::GlobalTable
*
*
* -
*
* AWS::DynamoDB::Table
*
*
* -
*
* AWS::EC2::EC2Fleet
*
*
* -
*
* AWS::EC2::Instance
*
*
* -
*
* AWS::EC2::NatGateway
*
*
* -
*
* AWS::EC2::Volume
*
*
* -
*
* AWS::ElasticLoadBalancing::LoadBalancer
*
*
* -
*
* AWS::RDS::DBCluster
*
*
* -
*
* AWS::RDS::DBInstance
*
*
* -
*
* AWS::RDS::GlobalCluster
*
*
* -
*
* AWS::Route53::RecordSet
*
*
* -
*
* AWS::S3::Bucket
*
*
* -
*
* AWS::SQS::Queue
*
*
*
*
*
*
* @param type
* Specifies the type of physical resource identifier.
*
* - Arn
* -
*
* The resource identifier is an Amazon Resource Name (ARN) and it can identify the following list of
* resources:
*
*
* -
*
* AWS::ECS::Service
*
*
* -
*
* AWS::EFS::FileSystem
*
*
* -
*
* AWS::ElasticLoadBalancingV2::LoadBalancer
*
*
* -
*
* AWS::Lambda::Function
*
*
* -
*
* AWS::SNS::Topic
*
*
*
*
* - Native
* -
*
* The resource identifier is an Resilience Hub-native identifier and it can identify the following list of
* resources:
*
*
* -
*
* AWS::ApiGateway::RestApi
*
*
* -
*
* AWS::ApiGatewayV2::Api
*
*
* -
*
* AWS::AutoScaling::AutoScalingGroup
*
*
* -
*
* AWS::DocDB::DBCluster
*
*
* -
*
* AWS::DocDB::DBGlobalCluster
*
*
* -
*
* AWS::DocDB::DBInstance
*
*
* -
*
* AWS::DynamoDB::GlobalTable
*
*
* -
*
* AWS::DynamoDB::Table
*
*
* -
*
* AWS::EC2::EC2Fleet
*
*
* -
*
* AWS::EC2::Instance
*
*
* -
*
* AWS::EC2::NatGateway
*
*
* -
*
* AWS::EC2::Volume
*
*
* -
*
* AWS::ElasticLoadBalancing::LoadBalancer
*
*
* -
*
* AWS::RDS::DBCluster
*
*
* -
*
* AWS::RDS::DBInstance
*
*
* -
*
* AWS::RDS::GlobalCluster
*
*
* -
*
* AWS::Route53::RecordSet
*
*
* -
*
* AWS::S3::Bucket
*
*
* -
*
* AWS::SQS::Queue
*
*
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see PhysicalIdentifierType
*/
public PhysicalResourceId withType(String type) {
setType(type);
return this;
}
/**
*
* Specifies the type of physical resource identifier.
*
*
* - Arn
* -
*
* The resource identifier is an Amazon Resource Name (ARN) and it can identify the following list of resources:
*
*
* -
*
* AWS::ECS::Service
*
*
* -
*
* AWS::EFS::FileSystem
*
*
* -
*
* AWS::ElasticLoadBalancingV2::LoadBalancer
*
*
* -
*
* AWS::Lambda::Function
*
*
* -
*
* AWS::SNS::Topic
*
*
*
*
* - Native
* -
*
* The resource identifier is an Resilience Hub-native identifier and it can identify the following list of
* resources:
*
*
* -
*
* AWS::ApiGateway::RestApi
*
*
* -
*
* AWS::ApiGatewayV2::Api
*
*
* -
*
* AWS::AutoScaling::AutoScalingGroup
*
*
* -
*
* AWS::DocDB::DBCluster
*
*
* -
*
* AWS::DocDB::DBGlobalCluster
*
*
* -
*
* AWS::DocDB::DBInstance
*
*
* -
*
* AWS::DynamoDB::GlobalTable
*
*
* -
*
* AWS::DynamoDB::Table
*
*
* -
*
* AWS::EC2::EC2Fleet
*
*
* -
*
* AWS::EC2::Instance
*
*
* -
*
* AWS::EC2::NatGateway
*
*
* -
*
* AWS::EC2::Volume
*
*
* -
*
* AWS::ElasticLoadBalancing::LoadBalancer
*
*
* -
*
* AWS::RDS::DBCluster
*
*
* -
*
* AWS::RDS::DBInstance
*
*
* -
*
* AWS::RDS::GlobalCluster
*
*
* -
*
* AWS::Route53::RecordSet
*
*
* -
*
* AWS::S3::Bucket
*
*
* -
*
* AWS::SQS::Queue
*
*
*
*
*
*
* @param type
* Specifies the type of physical resource identifier.
*
* - Arn
* -
*
* The resource identifier is an Amazon Resource Name (ARN) and it can identify the following list of
* resources:
*
*
* -
*
* AWS::ECS::Service
*
*
* -
*
* AWS::EFS::FileSystem
*
*
* -
*
* AWS::ElasticLoadBalancingV2::LoadBalancer
*
*
* -
*
* AWS::Lambda::Function
*
*
* -
*
* AWS::SNS::Topic
*
*
*
*
* - Native
* -
*
* The resource identifier is an Resilience Hub-native identifier and it can identify the following list of
* resources:
*
*
* -
*
* AWS::ApiGateway::RestApi
*
*
* -
*
* AWS::ApiGatewayV2::Api
*
*
* -
*
* AWS::AutoScaling::AutoScalingGroup
*
*
* -
*
* AWS::DocDB::DBCluster
*
*
* -
*
* AWS::DocDB::DBGlobalCluster
*
*
* -
*
* AWS::DocDB::DBInstance
*
*
* -
*
* AWS::DynamoDB::GlobalTable
*
*
* -
*
* AWS::DynamoDB::Table
*
*
* -
*
* AWS::EC2::EC2Fleet
*
*
* -
*
* AWS::EC2::Instance
*
*
* -
*
* AWS::EC2::NatGateway
*
*
* -
*
* AWS::EC2::Volume
*
*
* -
*
* AWS::ElasticLoadBalancing::LoadBalancer
*
*
* -
*
* AWS::RDS::DBCluster
*
*
* -
*
* AWS::RDS::DBInstance
*
*
* -
*
* AWS::RDS::GlobalCluster
*
*
* -
*
* AWS::Route53::RecordSet
*
*
* -
*
* AWS::S3::Bucket
*
*
* -
*
* AWS::SQS::Queue
*
*
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see PhysicalIdentifierType
*/
public PhysicalResourceId withType(PhysicalIdentifierType type) {
this.type = type.toString();
return this;
}
/**
* 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.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getAwsAccountId() != null)
sb.append("AwsAccountId: ").append(getAwsAccountId()).append(",");
if (getAwsRegion() != null)
sb.append("AwsRegion: ").append(getAwsRegion()).append(",");
if (getIdentifier() != null)
sb.append("Identifier: ").append(getIdentifier()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof PhysicalResourceId == false)
return false;
PhysicalResourceId other = (PhysicalResourceId) obj;
if (other.getAwsAccountId() == null ^ this.getAwsAccountId() == null)
return false;
if (other.getAwsAccountId() != null && other.getAwsAccountId().equals(this.getAwsAccountId()) == false)
return false;
if (other.getAwsRegion() == null ^ this.getAwsRegion() == null)
return false;
if (other.getAwsRegion() != null && other.getAwsRegion().equals(this.getAwsRegion()) == false)
return false;
if (other.getIdentifier() == null ^ this.getIdentifier() == null)
return false;
if (other.getIdentifier() != null && other.getIdentifier().equals(this.getIdentifier()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAwsAccountId() == null) ? 0 : getAwsAccountId().hashCode());
hashCode = prime * hashCode + ((getAwsRegion() == null) ? 0 : getAwsRegion().hashCode());
hashCode = prime * hashCode + ((getIdentifier() == null) ? 0 : getIdentifier().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
return hashCode;
}
@Override
public PhysicalResourceId clone() {
try {
return (PhysicalResourceId) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.resiliencehub.model.transform.PhysicalResourceIdMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}