Class AwsArn
- java.lang.Object
-
- software.amazon.smithy.rulesengine.aws.language.functions.AwsArn
-
- All Implemented Interfaces:
ToSmithyBuilder<AwsArn>
public final class AwsArn extends java.lang.Object implements ToSmithyBuilder<AwsArn>
An AWS ARN.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AwsArn.Builder
A builder used to create anAwsArn
class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AwsArn.Builder
builder()
Builder to create anAwsArn
instance.boolean
equals(java.lang.Object o)
java.lang.String
getAccountId()
Gets the ARN's accountId.java.lang.String
getPartition()
Gets the ARN's partition.java.lang.String
getRegion()
Gets the ARN's region.java.util.List<java.lang.String>
getResource()
Gets the ARN's resource components.java.lang.String
getService()
Gets the ARN's service.int
hashCode()
static java.util.Optional<AwsArn>
parse(java.lang.String arn)
Parses and returns the ARN components if the provided value is a valid AWS ARN.AwsArn.Builder
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.java.lang.String
toString()
-
-
-
Method Detail
-
parse
public static java.util.Optional<AwsArn> parse(java.lang.String arn)
Parses and returns the ARN components if the provided value is a valid AWS ARN.- Parameters:
arn
- the value to parse.- Returns:
- the optional ARN.
-
builder
public static AwsArn.Builder builder()
Builder to create anAwsArn
instance.- Returns:
- returns a new Builder.
-
getPartition
public java.lang.String getPartition()
Gets the ARN's partition.- Returns:
- returns the ARN's partition.
-
getService
public java.lang.String getService()
Gets the ARN's service.- Returns:
- returns the ARN's service.
-
getRegion
public java.lang.String getRegion()
Gets the ARN's region.- Returns:
- returns the ARN's region.
-
getAccountId
public java.lang.String getAccountId()
Gets the ARN's accountId.- Returns:
- returns the ARN's accountId.
-
getResource
public java.util.List<java.lang.String> getResource()
Gets the ARN's resource components.- Returns:
- returns the ARN's resource components.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toBuilder
public AwsArn.Builder toBuilder()
Description copied from interface:ToSmithyBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToSmithyBuilder<AwsArn>
- Returns:
- a builder for type T
-
-