[−][src]Struct aiven_rs::ticket::TicketApi
Implementations
impl TicketApi
[src]
pub async fn create<T: Serialize + ?Sized, '_, '_, '_>(
&'_ self,
project: &'_ str,
json_body: &'_ T
) -> Result<Ticket, AivenError>
[src]
&'_ self,
project: &'_ str,
json_body: &'_ T
) -> Result<Ticket, AivenError>
Create a support ticket.
https://api.aiven.io/doc/#operation/ProjectTicketCreate
Examples
Basic usage:
use std::collections::HashMap; #[tokio::main] async fn main()-> Result<(), Box<dyn std::error::Error>>{ let client = aiven_rs::AivenClient::new("https://api.aiven.io", "v1"); let mut json_body: HashMap<&str, String> = HashMap::new(); json_body.insert("description", "some description about ticket".to_owned()); json_body.insert("service_name", "service_name".to_owned()); // severity values can be critical, high or low json_body.insert("severity", "critical".to_owned()); json_body.insert("title", "some short description".to_owned()); let output = client.ticket().create("project-name", &json_body).await?; Ok(()) }
pub async fn get<'_, '_>(
&'_ self,
project: &'_ str
) -> Result<Ticket, AivenError>
[src]
&'_ self,
project: &'_ str
) -> Result<Ticket, AivenError>
List support tickets.
https://api.aiven.io/doc/#operation/ProjectTicketList.
Examples
Basic usage:
use std::collections::HashMap; #[tokio::main] async fn main()-> Result<(), Box<dyn std::error::Error>>{ let client = aiven_rs::AivenClient::new("https://api.aiven.io", "v1"); let output = client.ticket().get("some-project-name").await?; Ok(()) }
pub async fn invite_user<'_, '_, '_, '_>(
&'_ self,
project: &'_ str,
ticket_id: &'_ str,
user_email: &'_ str
) -> Result<(), AivenError>
[src]
&'_ self,
project: &'_ str,
ticket_id: &'_ str,
user_email: &'_ str
) -> Result<(), AivenError>
Invite a user to a ticket.
https://api.aiven.io/doc/#operation/ProjectTicketInvite.
Examples
Basic usage:
use std::collections::HashMap; #[tokio::main] async fn main()-> Result<(), Box<dyn std::error::Error>>{ let client = aiven_rs::AivenClient::new("https://api.aiven.io", "v1"); let output = client.ticket().invite_user("some-project-name", "some-ticket-id", "user-email") .await?; Ok(()) }
Auto Trait Implementations
impl !RefUnwindSafe for TicketApi
impl Send for TicketApi
impl Sync for TicketApi
impl Unpin for TicketApi
impl !UnwindSafe for TicketApi
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> 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, U> TryInto<U> 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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,