doppler-rs 0.0.1

Unofficial client library for the Doppler API - secure secrets management platform
Documentation
/*
 * Core
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0-oas3.1
 * 
 * Generated by: https://openapi-generator.tech
 */

/*
 * Core
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0-oas3.1
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};
use chrono::{DateTime, NaiveDate, Utc};
/// AddProjectMemberRequest
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AddProjectMemberRequest {
    #[serde(rename = "type")]
    pub r#type: String ,
    /// Member's slug
    #[serde(rename = "slug")]
    pub slug: String ,
    /// Identifier of the project role
    #[serde(rename = "role", skip_serializing_if = "Option::is_none")]
    pub role: Option<String >,
    /// Environment slugs to grant the member access to
    #[serde(rename = "environments", skip_serializing_if = "Option::is_none")]
    pub environments: Option<Vec<String> >,
}

impl AddProjectMemberRequest {
    pub fn new(r#type: String , slug: String ) -> AddProjectMemberRequest {
        AddProjectMemberRequest {
            r#type: r#type,
            slug: slug,
            role: None,
            environments: None,
        }
    }
}
/// String enumeration
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "workplace_user")]
    WorkplaceUser,
    #[serde(rename = "group")]
    Group,
    #[serde(rename = "invite")]
    Invite,
    #[serde(rename = "service_account")]
    ServiceAccount,
}

impl Default for Type {
    fn default() -> Type {
        Self::WorkplaceUser
    }
}