tembo_api_client/models/policy_input.rs
1/*
2 * Tembo Cloud
3 *
4 * Platform API for Tembo Cloud </br> </br> To find a Tembo Data API, please find it here: </br> </br> [AWS US East 1](https://api.data-1.use1.tembo.io/swagger-ui/)
5 *
6 * The version of the OpenAPI document: v1.0.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct PolicyInput {
15 /// A valid Action ID. Available Action IDs include 'CreateInstance' and 'ManagePermissions'. Find all available Actions on the Actions API.
16 #[serde(rename = "action")]
17 pub action: String,
18 /// Whether the Action is allowed or not for the Role
19 #[serde(rename = "allowed")]
20 pub allowed: bool,
21 /// A valid Role ID. Available Role IDs include 'admin' and 'basic_member'.
22 #[serde(rename = "role")]
23 pub role: String,
24}
25
26impl PolicyInput {
27 pub fn new(action: String, allowed: bool, role: String) -> PolicyInput {
28 PolicyInput {
29 action,
30 allowed,
31 role,
32 }
33 }
34}