Skip to main content

ApiGatewayV2httpRequestBuilder

Struct ApiGatewayV2httpRequestBuilder 

Source
pub struct ApiGatewayV2httpRequestBuilder<S: State = Empty> { /* private fields */ }
Available on crate feature apigw only.
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> ApiGatewayV2httpRequestBuilder<S>

Source

pub fn build(self) -> ApiGatewayV2httpRequest
where S: IsComplete,

Finish building and return the requested object

Source

pub fn kind(self, value: String) -> ApiGatewayV2httpRequestBuilder<SetKind<S>>
where S::Kind: IsUnset,

Optional (Some / Option setters). The type field from Custom Authorizer v1 requests.

This field is not present in standard HTTP API v2 requests. For Custom Authorizer v1 payloads, use ApiGatewayV2CustomAuthorizerV1Request instead.

Source

pub fn maybe_kind( self, value: Option<String>, ) -> ApiGatewayV2httpRequestBuilder<SetKind<S>>
where S::Kind: IsUnset,

Optional (Some / Option setters). The type field from Custom Authorizer v1 requests.

This field is not present in standard HTTP API v2 requests. For Custom Authorizer v1 payloads, use ApiGatewayV2CustomAuthorizerV1Request instead.

Source

pub fn method_arn( self, value: String, ) -> ApiGatewayV2httpRequestBuilder<SetMethodArn<S>>
where S::MethodArn: IsUnset,

Optional (Some / Option setters). The method ARN from Custom Authorizer v1 requests.

This field is not present in standard HTTP API v2 requests. For Custom Authorizer v1 payloads, use ApiGatewayV2CustomAuthorizerV1Request instead.

Source

pub fn maybe_method_arn( self, value: Option<String>, ) -> ApiGatewayV2httpRequestBuilder<SetMethodArn<S>>
where S::MethodArn: IsUnset,

Optional (Some / Option setters). The method ARN from Custom Authorizer v1 requests.

This field is not present in standard HTTP API v2 requests. For Custom Authorizer v1 payloads, use ApiGatewayV2CustomAuthorizerV1Request instead.

Source

pub fn http_method( self, value: Method, ) -> ApiGatewayV2httpRequestBuilder<SetHttpMethod<S>>
where S::HttpMethod: IsUnset,

Required.

The HTTP method field.

Warning: This field defaults to GET if not present in the payload, which may lead to incorrect behavior. For standard HTTP API v2 requests, this field is not present in the JSON payload.

Use request_context.http.method instead for standard HTTP API v2 requests, which contains the actual HTTP method for the request.

This top-level http_method field is only present in Custom Authorizer v1 requests. For those payloads, use ApiGatewayV2CustomAuthorizerV1Request instead.

Source

pub fn identity_source( self, value: String, ) -> ApiGatewayV2httpRequestBuilder<SetIdentitySource<S>>
where S::IdentitySource: IsUnset,

Optional (Some / Option setters). The identity source from Custom Authorizer v1 requests.

This field is not present in standard HTTP API v2 requests. For Custom Authorizer v1 payloads, use ApiGatewayV2CustomAuthorizerV1Request instead.

Source

pub fn maybe_identity_source( self, value: Option<String>, ) -> ApiGatewayV2httpRequestBuilder<SetIdentitySource<S>>
where S::IdentitySource: IsUnset,

Optional (Some / Option setters). The identity source from Custom Authorizer v1 requests.

This field is not present in standard HTTP API v2 requests. For Custom Authorizer v1 payloads, use ApiGatewayV2CustomAuthorizerV1Request instead.

Source

pub fn authorization_token( self, value: String, ) -> ApiGatewayV2httpRequestBuilder<SetAuthorizationToken<S>>
where S::AuthorizationToken: IsUnset,

Optional (Some / Option setters). The authorization token from Custom Authorizer v1 requests.

This field is not present in standard HTTP API v2 requests. For Custom Authorizer v1 payloads, use ApiGatewayV2CustomAuthorizerV1Request instead.

Source

pub fn maybe_authorization_token( self, value: Option<String>, ) -> ApiGatewayV2httpRequestBuilder<SetAuthorizationToken<S>>
where S::AuthorizationToken: IsUnset,

Optional (Some / Option setters). The authorization token from Custom Authorizer v1 requests.

This field is not present in standard HTTP API v2 requests. For Custom Authorizer v1 payloads, use ApiGatewayV2CustomAuthorizerV1Request instead.

Source

pub fn resource( self, value: String, ) -> ApiGatewayV2httpRequestBuilder<SetResource<S>>
where S::Resource: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_resource( self, value: Option<String>, ) -> ApiGatewayV2httpRequestBuilder<SetResource<S>>
where S::Resource: IsUnset,

Optional (Some / Option setters).

Source

pub fn version( self, value: String, ) -> ApiGatewayV2httpRequestBuilder<SetVersion<S>>
where S::Version: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_version( self, value: Option<String>, ) -> ApiGatewayV2httpRequestBuilder<SetVersion<S>>
where S::Version: IsUnset,

Optional (Some / Option setters).

Source

pub fn route_key( self, value: String, ) -> ApiGatewayV2httpRequestBuilder<SetRouteKey<S>>
where S::RouteKey: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_route_key( self, value: Option<String>, ) -> ApiGatewayV2httpRequestBuilder<SetRouteKey<S>>
where S::RouteKey: IsUnset,

Optional (Some / Option setters).

Source

pub fn raw_path( self, value: String, ) -> ApiGatewayV2httpRequestBuilder<SetRawPath<S>>
where S::RawPath: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_raw_path( self, value: Option<String>, ) -> ApiGatewayV2httpRequestBuilder<SetRawPath<S>>
where S::RawPath: IsUnset,

Optional (Some / Option setters).

Source

pub fn raw_query_string( self, value: String, ) -> ApiGatewayV2httpRequestBuilder<SetRawQueryString<S>>
where S::RawQueryString: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_raw_query_string( self, value: Option<String>, ) -> ApiGatewayV2httpRequestBuilder<SetRawQueryString<S>>
where S::RawQueryString: IsUnset,

Optional (Some / Option setters).

Source

pub fn cookies( self, value: Vec<String>, ) -> ApiGatewayV2httpRequestBuilder<SetCookies<S>>
where S::Cookies: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_cookies( self, value: Option<Vec<String>>, ) -> ApiGatewayV2httpRequestBuilder<SetCookies<S>>
where S::Cookies: IsUnset,

Optional (Some / Option setters).

Source

pub fn headers( self, value: HeaderMap, ) -> ApiGatewayV2httpRequestBuilder<SetHeaders<S>>
where S::Headers: IsUnset,

Required.

Source

pub fn query_string_parameters( self, value: QueryMap, ) -> ApiGatewayV2httpRequestBuilder<SetQueryStringParameters<S>>
where S::QueryStringParameters: IsUnset,

Required.

Source

pub fn path_parameters( self, value: HashMap<String, String>, ) -> ApiGatewayV2httpRequestBuilder<SetPathParameters<S>>
where S::PathParameters: IsUnset,

Required.

Source

pub fn request_context( self, value: ApiGatewayV2httpRequestContext, ) -> ApiGatewayV2httpRequestBuilder<SetRequestContext<S>>
where S::RequestContext: IsUnset,

Required.

Source

pub fn stage_variables( self, value: HashMap<String, String>, ) -> ApiGatewayV2httpRequestBuilder<SetStageVariables<S>>
where S::StageVariables: IsUnset,

Required.

Source

pub fn body(self, value: String) -> ApiGatewayV2httpRequestBuilder<SetBody<S>>
where S::Body: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_body( self, value: Option<String>, ) -> ApiGatewayV2httpRequestBuilder<SetBody<S>>
where S::Body: IsUnset,

Optional (Some / Option setters).

Source

pub fn is_base64_encoded( self, value: bool, ) -> ApiGatewayV2httpRequestBuilder<SetIsBase64Encoded<S>>
where S::IsBase64Encoded: IsUnset,

Required.

Source

pub fn other( self, value: Map<String, Value>, ) -> ApiGatewayV2httpRequestBuilder<SetOther<S>>
where S::Other: IsUnset,

Optional (Some / Option setters). Default: <serde_json::Map<String, Value> as Default>::default().

Catchall to catch any additional fields that were present but not explicitly defined by this struct. Enabled with Cargo feature catch-all-fields. If catch-all-fields is disabled, any additional fields that are present will be ignored.

Source

pub fn maybe_other( self, value: Option<Map<String, Value>>, ) -> ApiGatewayV2httpRequestBuilder<SetOther<S>>
where S::Other: IsUnset,

Optional (Some / Option setters). Default: <serde_json::Map<String, Value> as Default>::default().

Catchall to catch any additional fields that were present but not explicitly defined by this struct. Enabled with Cargo feature catch-all-fields. If catch-all-fields is disabled, any additional fields that are present will be ignored.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.