Class Endpoint
- java.lang.Object
-
- software.amazon.smithy.rulesengine.language.Endpoint
-
- All Implemented Interfaces:
FromSourceLocation,ToNode,TypeCheck,ToSmithyBuilder<Endpoint>
public final class Endpoint extends java.lang.Object implements FromSourceLocation, ToNode, ToSmithyBuilder<Endpoint>, TypeCheck
An EndpointType as returned by EndpointRules.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEndpoint.BuilderBuilder forEndpoint.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Endpoint.Builderbuilder()Create a new EndpointType builder.booleanequals(java.lang.Object o)static EndpointfromNode(Node node)java.util.Map<java.lang.String,java.util.List<Expression>>getHeaders()Get the endpoint headers as a map ofStringto list ofExpressionvalues.java.util.Map<Identifier,Literal>getProperties()Get the endpoint properties as a map ofIdentifiertoLiteralvalues.SourceLocationgetSourceLocation()Gets the source location of a value.ExpressiongetUrl()Returns the EndpointType URL as an expression.inthashCode()Endpoint.BuildertoBuilder()Take this object and create a builder that contains all of the current property values of this object.NodetoNode()Converts a value to aNode.java.lang.StringtoString()TypetypeCheck(Scope<Type> scope)Checks whether the given types within a scope satisfy the constraints.
-
-
-
Method Detail
-
fromNode
public static Endpoint fromNode(Node node)
- Parameters:
node- the object node.- Returns:
- the node as an
Endpoint.
-
builder
public static Endpoint.Builder builder()
Create a new EndpointType builder.- Returns:
- EndpointType builder
-
getSourceLocation
public SourceLocation getSourceLocation()
Description copied from interface:FromSourceLocationGets the source location of a value.- Specified by:
getSourceLocationin interfaceFromSourceLocation- Returns:
- Returns the source location of the value.
-
getUrl
public Expression getUrl()
Returns the EndpointType URL as an expression.- Returns:
- the endpoint URL expression.
-
getHeaders
public java.util.Map<java.lang.String,java.util.List<Expression>> getHeaders()
Get the endpoint headers as a map ofStringto list ofExpressionvalues.- Returns:
- the endpoint headers.
-
getProperties
public java.util.Map<Identifier,Literal> getProperties()
Get the endpoint properties as a map ofIdentifiertoLiteralvalues.- Returns:
- the endpoint properties.
-
toBuilder
public Endpoint.Builder toBuilder()
Description copied from interface:ToSmithyBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToSmithyBuilder<Endpoint>- Returns:
- a builder for type T
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-