tapis-sk 0.3.0

The Tapis Security API provides for management of Security Kernel (SK) role-based authorization and secrets resources.
Documentation
/*
 * Tapis Security API
 *
 * The Tapis Security API provides for management of Security Kernel (SK) role-based authorization and secrets resources.
 *
 * The version of the OpenAPI document: 1.8.2
 * 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 ReqShareResource {
    #[serde(rename = "grantor")]
    pub grantor: String,
    #[serde(rename = "grantee")]
    pub grantee: String,
    #[serde(rename = "tenant")]
    pub tenant: String,
    #[serde(rename = "resourceType")]
    pub resource_type: String,
    #[serde(rename = "resourceId1")]
    pub resource_id1: String,
    #[serde(rename = "resourceId2", skip_serializing_if = "Option::is_none")]
    pub resource_id2: Option<String>,
    #[serde(rename = "privilege")]
    pub privilege: String,
}

impl ReqShareResource {
    pub fn new(
        grantor: String,
        grantee: String,
        tenant: String,
        resource_type: String,
        resource_id1: String,
        privilege: String,
    ) -> ReqShareResource {
        ReqShareResource {
            grantor,
            grantee,
            tenant,
            resource_type,
            resource_id1,
            resource_id2: None,
            privilege,
        }
    }
}