jira_api_v2/models/default_share_scope.rs
1/*
2 * The Jira Cloud platform REST API
3 *
4 * Jira Cloud platform REST API documentation
5 *
6 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT
7 * Contact: ecosystem@atlassian.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// DefaultShareScope : Details of the scope of the default sharing for new filters and dashboards.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DefaultShareScope {
17 /// The scope of the default sharing for new filters and dashboards: * `AUTHENTICATED` Shared with all logged-in users. * `GLOBAL` Shared with all logged-in users. This shows as `AUTHENTICATED` in the response. * `PRIVATE` Not shared with any users.
18 #[serde(rename = "scope")]
19 pub scope: Scope,
20}
21
22impl DefaultShareScope {
23 /// Details of the scope of the default sharing for new filters and dashboards.
24 pub fn new(scope: Scope) -> DefaultShareScope {
25 DefaultShareScope {
26 scope,
27 }
28 }
29}
30/// The scope of the default sharing for new filters and dashboards: * `AUTHENTICATED` Shared with all logged-in users. * `GLOBAL` Shared with all logged-in users. This shows as `AUTHENTICATED` in the response. * `PRIVATE` Not shared with any users.
31#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
32pub enum Scope {
33 #[serde(rename = "GLOBAL")]
34 Global,
35 #[serde(rename = "AUTHENTICATED")]
36 Authenticated,
37 #[serde(rename = "PRIVATE")]
38 Private,
39}
40
41impl Default for Scope {
42 fn default() -> Scope {
43 Self::Global
44 }
45}
46