1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* Kubernetes
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.27.5+k3s1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// IoCattleManagementv3ClusterRoleTemplateBinding : ClusterRoleTemplateBinding is the object representing membership of a subject in a cluster with permissions specified by a given role template.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct IoCattleManagementv3ClusterRoleTemplateBinding {
/// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
#[serde(rename = "apiVersion", skip_serializing_if = "Option::is_none")]
pub api_version: Option<String>,
/// ClusterName is the metadata.name of the cluster to which a subject is added. Must match the namespace. Immutable.
#[serde(rename = "clusterName")]
pub cluster_name: String,
/// GroupName is the name of the group subject added to the cluster. Immutable.
#[serde(rename = "groupName", skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
/// GroupPrincipalName is the name of the group principal subject added to the cluster. Immutable.
#[serde(rename = "groupPrincipalName", skip_serializing_if = "Option::is_none")]
pub group_principal_name: Option<String>,
/// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
#[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
#[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
pub metadata: Option<kube::api::ObjectMeta>,
/// RoleTemplateName is the name of the role template that defines permissions to perform actions on resources in the cluster. Immutable.
#[serde(rename = "roleTemplateName")]
pub role_template_name: String,
/// UserName is the name of the user subject added to the cluster. Immutable.
#[serde(rename = "userName", skip_serializing_if = "Option::is_none")]
pub user_name: Option<String>,
/// UserPrincipalName is the name of the user principal subject added to the cluster. Immutable.
#[serde(rename = "userPrincipalName", skip_serializing_if = "Option::is_none")]
pub user_principal_name: Option<String>,
}
impl IoCattleManagementv3ClusterRoleTemplateBinding {
/// ClusterRoleTemplateBinding is the object representing membership of a subject in a cluster with permissions specified by a given role template.
pub fn new(cluster_name: String, role_template_name: String) -> IoCattleManagementv3ClusterRoleTemplateBinding {
IoCattleManagementv3ClusterRoleTemplateBinding {
api_version: None,
cluster_name,
group_name: None,
group_principal_name: None,
kind: None,
metadata: None,
role_template_name,
user_name: None,
user_principal_name: None,
}
}
}