[−][src]Struct approveapi_openapi::models::CreatePromptRequest
Fields
user: String
The user to send the approval request to. Can be either an email address or a phone number.
body: String
The body of the approval request to show the user.
title: Option<String>
The title of an approval request. Defaults to an empty string.
approve_text: Option<String>
The approve action text. Defaults to 'Approve'.
approve_redirect_url: Option<String>
An HTTPS URL to redirect the user to if the prompt is approved. This URL is kept secret until the user is redirected to it.
reject_text: Option<String>
The reject action text. If not specified the reject button will NOT be rendered, and the user will only see an approve action button.
reject_redirect_url: Option<String>
An HTTPS URL to redirect the user to if the prompt is rejected. This URL is kept secret until the user is redirected to it.
long_poll: Option<bool>
If true, the request waits (long-polls) until the user responds to the prompt or more than 10 minutes pass. Defaults to false.
expires_in: Option<f32>
The number of seconds until this request can no longer be answered.
metadata: Option<PromptMetadata>
internal_data: Option<HashMap<String, String>>
idempotency_key: Option<String>
Allows calling create_prompt
multiple times idempotently, such that a prompt is sent at-most once. This key should contain sufficient randomness. Idempotent requests are stored for 24 hours. After that time, the same key will create a new request.
Methods
impl CreatePromptRequest
[src]
pub fn new(user: String, body: String) -> CreatePromptRequest
[src]
Trait Implementations
impl Debug for CreatePromptRequest
[src]
impl Serialize for CreatePromptRequest
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for CreatePromptRequest
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for CreatePromptRequest
impl Sync for CreatePromptRequest
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,