jira_api_v2/models/
project_feature_toggle_request.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/// ProjectFeatureToggleRequest : Container for a request to toggle the state of the feature to ENABLED or DISABLED.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProjectFeatureToggleRequest {
17    /// The new state for the feature
18    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
19    pub state: Option<State>,
20}
21
22impl ProjectFeatureToggleRequest {
23    /// Container for a request to toggle the state of the feature to ENABLED or DISABLED.
24    pub fn new() -> ProjectFeatureToggleRequest {
25        ProjectFeatureToggleRequest {
26            state: None,
27        }
28    }
29}
30/// The new state for the feature
31#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
32pub enum State {
33    #[serde(rename = "ENABLED")]
34    Enabled,
35    #[serde(rename = "DISABLED")]
36    Disabled,
37    #[serde(rename = "COMING_SOON")]
38    ComingSoon,
39}
40
41impl Default for State {
42    fn default() -> State {
43        Self::Enabled
44    }
45}
46