Interface BaseSignRequest<PayloadT,IdentityT extends Identity>
-
- Type Parameters:
PayloadT- The type of payload of the request.IdentityT- The type of the identity.
- All Known Subinterfaces:
AsyncSignRequest<IdentityT>,SignRequest<IdentityT>
- All Known Implementing Classes:
DefaultAsyncSignRequest,DefaultSignRequest
@SdkPublicApi @Immutable @ThreadSafe public interface BaseSignRequest<PayloadT,IdentityT extends Identity>
Base interface to represent input parameters to sign a request usingHttpSigner, independent of payload type. See specific sub-interfacesSignRequestfor sync payload andAsyncSignRequestfor async payload.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceBaseSignRequest.Builder<B extends BaseSignRequest.Builder<B,PayloadT,IdentityT>,PayloadT,IdentityT extends Identity>A builder for aBaseSignRequest.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T> booleanhasProperty(SignerProperty<T> property)Ensure that theSignerPropertyis present in theBaseSignRequest.IdentityTidentity()Returns the identity.Optional<PayloadT>payload()Returns the body payload of the request.<T> Tproperty(SignerProperty<T> property)Returns the value of a property that theHttpSignercan use during signing.SdkHttpRequestrequest()Returns the HTTP request object, without the request body payload.default <T> TrequireProperty(SignerProperty<T> property)Ensure that theSignerPropertyis present in theBaseSignRequest.default <T> TrequireProperty(SignerProperty<T> property, T defaultValue)Ensure that theSignerPropertyis present in theBaseSignRequest.
-
-
-
Method Detail
-
request
SdkHttpRequest request()
Returns the HTTP request object, without the request body payload.
-
payload
Optional<PayloadT> payload()
Returns the body payload of the request. A payload is optional. By default, the payload will be empty.
-
identity
IdentityT identity()
Returns the identity.
-
property
<T> T property(SignerProperty<T> property)
Returns the value of a property that theHttpSignercan use during signing.
-
hasProperty
default <T> boolean hasProperty(SignerProperty<T> property)
Ensure that theSignerPropertyis present in theBaseSignRequest.The value,
BaseSignRequest, is return when present, and an exception is thrown otherwise.
-
requireProperty
default <T> T requireProperty(SignerProperty<T> property)
Ensure that theSignerPropertyis present in theBaseSignRequest.The value,
BaseSignRequest, is return when present, and an exception is thrown otherwise.
-
requireProperty
default <T> T requireProperty(SignerProperty<T> property, T defaultValue)
Ensure that theSignerPropertyis present in theBaseSignRequest.The value,
BaseSignRequest, is return when present, and the default is returned otherwise.
-
-