Class PlaneIndex

java.lang.Object
software.amazon.smithy.aws.traits.PlaneIndex
All Implemented Interfaces:
software.amazon.smithy.model.knowledge.KnowledgeIndex

public final class PlaneIndex extends Object implements software.amazon.smithy.model.knowledge.KnowledgeIndex
Determines if a service, resource, or operation are considered part of the data plane or control plane.

The plane is inherited from the top-down and can be overridden per shape. For example, if a service shape has the aws.api#controlPlane shape, then every shape within the closure of the service inherits this property. If a resource shape defines a aws.api#controlPlane or aws.api#dataPlane trait, then all shapes within the closure of the resource inherit it. If an operation is marked with the aws.api#dataPlane trait, it overrides any plane traits of the service or resource its bound within.

  • Constructor Summary

    Constructors
    Constructor
    Description
    PlaneIndex(software.amazon.smithy.model.Model model)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isControlPlane(software.amazon.smithy.model.shapes.ToShapeId service)
    Checks if the given service shape is part of the control plane.
    boolean
    isControlPlane(software.amazon.smithy.model.shapes.ToShapeId service, software.amazon.smithy.model.shapes.ToShapeId operationOrResource)
    Checks if the given shape within a service is part of the control plane.
    boolean
    isDataPlane(software.amazon.smithy.model.shapes.ToShapeId service)
    Checks if the given service shape is part of the data plane.
    boolean
    isDataPlane(software.amazon.smithy.model.shapes.ToShapeId service, software.amazon.smithy.model.shapes.ToShapeId operationOrResource)
    Checks if the given shape within a service is part of the data plane.
    boolean
    isPlaneDefined(software.amazon.smithy.model.shapes.ToShapeId service)
    Checks if the given service shape has defined its plane.
    boolean
    isPlaneDefined(software.amazon.smithy.model.shapes.ToShapeId service, software.amazon.smithy.model.shapes.ToShapeId operationOrResource)
    Checks if the given shape within a service has a resolvable plane.
    static PlaneIndex
    of(software.amazon.smithy.model.Model model)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlaneIndex

      public PlaneIndex(software.amazon.smithy.model.Model model)
  • Method Details

    • of

      public static PlaneIndex of(software.amazon.smithy.model.Model model)
    • isControlPlane

      public boolean isControlPlane(software.amazon.smithy.model.shapes.ToShapeId service)
      Checks if the given service shape is part of the control plane.
      Parameters:
      service - Service to check.
      Returns:
      Returns true if the service is part of the control plane.
    • isControlPlane

      public boolean isControlPlane(software.amazon.smithy.model.shapes.ToShapeId service, software.amazon.smithy.model.shapes.ToShapeId operationOrResource)
      Checks if the given shape within a service is part of the control plane.
      Parameters:
      service - Service to check.
      operationOrResource - Operation or resource within the service to check.
      Returns:
      Returns true if the shape is part of the control plane.
    • isDataPlane

      public boolean isDataPlane(software.amazon.smithy.model.shapes.ToShapeId service)
      Checks if the given service shape is part of the data plane.
      Parameters:
      service - Service to check.
      Returns:
      Returns true if the service is part of the data plane.
    • isDataPlane

      public boolean isDataPlane(software.amazon.smithy.model.shapes.ToShapeId service, software.amazon.smithy.model.shapes.ToShapeId operationOrResource)
      Checks if the given shape within a service is part of the data plane.
      Parameters:
      service - Service to check.
      operationOrResource - Operation or resource within the service to check.
      Returns:
      Returns true if the shape is part of the data plane.
    • isPlaneDefined

      public boolean isPlaneDefined(software.amazon.smithy.model.shapes.ToShapeId service)
      Checks if the given service shape has defined its plane.
      Parameters:
      service - Service to check.
      Returns:
      Returns true if the service has defined its plane.
    • isPlaneDefined

      public boolean isPlaneDefined(software.amazon.smithy.model.shapes.ToShapeId service, software.amazon.smithy.model.shapes.ToShapeId operationOrResource)
      Checks if the given shape within a service has a resolvable plane.
      Parameters:
      service - Service to check.
      operationOrResource - Operation or resource within the service to check.
      Returns:
      Returns true if the shape has a resolvable plane.