Class EndpointValue
- java.lang.Object
-
- software.amazon.smithy.rulesengine.language.evaluation.value.Value
-
- software.amazon.smithy.rulesengine.language.evaluation.value.EndpointValue
-
- All Implemented Interfaces:
FromSourceLocation
,ToNode
public final class EndpointValue extends Value
An endpoint value, containing a URL as well as headers that MUST be sent.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EndpointValue.Builder
A builder used to create anEndpointValue
class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EndpointValue.Builder
builder()
Builder to create aEndpointValue
instance.boolean
equals(java.lang.Object o)
EndpointValue
expectEndpointValue()
Returns the current value as anArrayValue
, throwingRuntimeException
when the value is the wrong type.static EndpointValue
fromNode(Node node)
Creates anEndpointValue
instance from the given Node information.java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getHeaders()
Gets the headers to set when sending HTTP requests to the URL.java.util.Map<java.lang.String,Value>
getProperties()
Gets the properties of this endpoint.Type
getType()
java.lang.String
getUrl()
Gets the URL of this endpoint.int
hashCode()
Node
toNode()
Converts a value to aNode
.java.lang.String
toString()
-
Methods inherited from class software.amazon.smithy.rulesengine.language.evaluation.value.Value
arrayValue, booleanValue, emptyValue, endpointValue, expectArrayValue, expectBooleanValue, expectIntegerValue, expectRecordValue, expectStringValue, getSourceLocation, integerValue, isEmpty, recordValue, stringValue
-
-
-
-
Method Detail
-
builder
public static EndpointValue.Builder builder()
Builder to create aEndpointValue
instance.- Returns:
- returns a new Builder.
-
fromNode
public static EndpointValue fromNode(Node node)
Creates anEndpointValue
instance from the given Node information.- Parameters:
node
- the node to deserialize.- Returns:
- the created EndpointValue.
-
getProperties
public java.util.Map<java.lang.String,Value> getProperties()
Gets the properties of this endpoint.- Returns:
- the properties of this endpoint.
-
getUrl
public java.lang.String getUrl()
Gets the URL of this endpoint.- Returns:
- the URL of this endpoint.
-
getHeaders
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()
Gets the headers to set when sending HTTP requests to the URL.- Returns:
- a map of header names to a list of values to set on those headers.
-
expectEndpointValue
public EndpointValue expectEndpointValue()
Description copied from class:Value
Returns the current value as anArrayValue
, throwingRuntimeException
when the value is the wrong type.- Overrides:
expectEndpointValue
in classValue
- Returns:
- returns an endpoint value
-
toNode
public Node toNode()
Description copied from interface:ToNode
Converts a value to aNode
.- Returns:
- Returns the creates Node.
-
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
-
-