[][src]Struct aiven_rs::ticket::TicketApi

pub struct TicketApi { /* fields omitted */ }

Implementations

impl TicketApi[src]

pub async fn create<T: Serialize + ?Sized, '_, '_, '_>(
    &'_ self,
    project: &'_ str,
    json_body: &'_ T
) -> Result<Ticket, AivenError>
[src]

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]

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]

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,