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 class
Endpoint.Builder
Builder forEndpoint
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Endpoint.Builder
builder()
Create a new EndpointType builder.boolean
equals(java.lang.Object o)
static Endpoint
fromNode(Node node)
java.util.List<java.util.Map<Identifier,Literal>>
getEndpointAuthSchemes()
java.util.Map<java.lang.String,java.util.List<Expression>>
getHeaders()
Get the endpoint headers as a map ofString
to list ofExpression
values.java.util.Map<Identifier,Literal>
getProperties()
Get the endpoint properties as a map ofIdentifier
toLiteral
values.SourceLocation
getSourceLocation()
Gets the source location of a value.Expression
getUrl()
Returns the EndpointType URL as an expression.int
hashCode()
Endpoint.Builder
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.Node
toNode()
Converts a value to aNode
.java.lang.String
toString()
Type
typeCheck(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:FromSourceLocation
Gets the source location of a value.- Specified by:
getSourceLocation
in 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 ofString
to list ofExpression
values.- Returns:
- the endpoint headers.
-
getProperties
public java.util.Map<Identifier,Literal> getProperties()
Get the endpoint properties as a map ofIdentifier
toLiteral
values.- Returns:
- the endpoint properties.
-
getEndpointAuthSchemes
public java.util.List<java.util.Map<Identifier,Literal>> getEndpointAuthSchemes()
- Returns:
- the list of endpoint
authSchemes
.
-
toBuilder
public Endpoint.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<Endpoint>
- Returns:
- a builder for type T
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-