tapis-pgrest 0.3.1

The Tapis PgREST API provides a RESTful interface to a managed SQL-db-as-a-service.
Documentation
/*
 * Tapis PgREST API
 *
 * The Tapis PgREST API provides a RESTful interface to a managed SQL-db-as-a-service.
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: cicsupport@tacc.utexas.edu
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ManageRole {
    /// The username to manage role for.
    #[serde(rename = "username")]
    pub username: String,
    /// Whether to revoke or grant role
    #[serde(rename = "method")]
    pub method: Method,
}

impl ManageRole {
    pub fn new(username: String, method: Method) -> ManageRole {
        ManageRole { username, method }
    }
}
/// Whether to revoke or grant role
#[derive(
    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Default,
)]
pub enum Method {
    #[serde(rename = "grant")]
    #[default]
    Grant,
    #[serde(rename = "revoke")]
    Revoke,
}