Class ServiceTrait

java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait
software.amazon.smithy.aws.traits.ServiceTrait
All Implemented Interfaces:
software.amazon.smithy.model.FromSourceLocation, software.amazon.smithy.model.node.ToNode, software.amazon.smithy.model.shapes.ToShapeId, software.amazon.smithy.model.traits.Trait, software.amazon.smithy.utils.ToSmithyBuilder<ServiceTrait>

public final class ServiceTrait extends software.amazon.smithy.model.traits.AbstractTrait implements software.amazon.smithy.utils.ToSmithyBuilder<ServiceTrait>
Registers a service as an AWS service. This trait is required for all AWS services modeled in Smithy.
  • Field Details

    • ID

      public static final software.amazon.smithy.model.shapes.ShapeId ID
  • Method Details

    • builder

      public static ServiceTrait.Builder builder()
      Returns:
      Creates a builder used to build a ServiceTrait.
    • getArnNamespace

      public String getArnNamespace()
      Get the AWS ARN service namespace of the service.

      If not set, this value defaults to the name of the service shape converted to lowercase. This value is combined with resources contained within the service to form ARNs for resources. Only resources that explicitly define the 'aws.api#arnTemplate' trait are assigned ARNs, and their relative ARNs are combined with the service's arnNamespace to form an ARN.

      Returns:
      Returns the ARN service name (e.g., "route53").
    • getCloudFormationName

      public String getCloudFormationName()
      Get the AWS CloudFormation service name.

      When not set, this value defaults to the name of the service shape.

      Returns:
      Returns the optionally present AWS CloudFormation type prefix.
    • getSdkId

      public String getSdkId()
      Get the SDK service ID.

      This value is used to generate SDK class names.

      Returns:
      Returns the AWS SDK service ID value.
    • getCloudTrailEventSource

      public String getCloudTrailEventSource()
      Returns the CloudTrail event source name of the service.
      Returns:
      Returns the event source name.
    • getEndpointPrefix

      public String getEndpointPrefix()
      Returns the endpoint prefix for the service. This value is not unique across services and it can change at any time. Therefore it MUST NOT be used to generate class names, namespaces, or for any other purpose that requires a static, unique identifier. The sdkId property should be used for those purposes.
      Returns:
      Returns the aws sdk endpoint prefix.
    • getAbbreviation

      @Deprecated public Optional<String> getAbbreviation()
      Deprecated.
    • toBuilder

      public ServiceTrait.Builder toBuilder()
      Specified by:
      toBuilder in interface software.amazon.smithy.utils.ToSmithyBuilder<ServiceTrait>
    • createNode

      protected software.amazon.smithy.model.node.Node createNode()
      Specified by:
      createNode in class software.amazon.smithy.model.traits.AbstractTrait
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class software.amazon.smithy.model.traits.AbstractTrait
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class software.amazon.smithy.model.traits.AbstractTrait