fastly_api/models/
invitation_data_attributes.rs

1/*
2 * Fastly API
3 *
4 * Via the Fastly API you can perform any of the operations that are possible within the management console,  including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/) 
5 *
6 */
7
8
9
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct InvitationDataAttributes {
13    /// The email address of the invitee.
14    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
15    pub email: Option<String>,
16    /// Indicates the user has limited access to the customer's services.
17    #[serde(rename = "limit_services", skip_serializing_if = "Option::is_none")]
18    pub limit_services: Option<bool>,
19    #[serde(rename = "role", skip_serializing_if = "Option::is_none")]
20    pub role: Option<crate::models::RoleUser>,
21    /// Indicates whether or not the invitation is active.
22    #[serde(rename = "status_code", skip_serializing_if = "Option::is_none")]
23    pub status_code: Option<StatusCode>,
24}
25
26impl InvitationDataAttributes {
27    pub fn new() -> InvitationDataAttributes {
28        InvitationDataAttributes {
29            email: None,
30            limit_services: None,
31            role: None,
32            status_code: None,
33        }
34    }
35}
36
37/// Indicates whether or not the invitation is active.
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
39pub enum StatusCode {
40    #[serde(rename = "0")]
41    StatusCodeInactive,
42    #[serde(rename = "1")]
43    StatusCodeActive,
44}
45
46impl Default for StatusCode {
47    fn default() -> StatusCode {
48        Self::StatusCodeInactive
49    }
50}
51