fastly_api/models/service_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 ServiceInvitationDataAttributes {
13 /// The permission the accepting user will have in relation to the service.
14 #[serde(rename = "permission", skip_serializing_if = "Option::is_none")]
15 pub permission: Option<Permission>,
16}
17
18impl ServiceInvitationDataAttributes {
19 pub fn new() -> ServiceInvitationDataAttributes {
20 ServiceInvitationDataAttributes {
21 permission: None,
22 }
23 }
24}
25
26/// The permission the accepting user will have in relation to the service.
27#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
28pub enum Permission {
29 #[serde(rename = "full")]
30 Full,
31 #[serde(rename = "read_only")]
32 ReadOnly,
33 #[serde(rename = "purge_select")]
34 PurgeSelect,
35 #[serde(rename = "purge_all")]
36 PurgeAll,
37}
38
39impl Default for Permission {
40 fn default() -> Permission {
41 Self::Full
42 }
43}
44