// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChartTheme {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub created_by: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub created_at: ::core::option::Option<
        super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, optional, tag = "5")]
    pub updated_by: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "6")]
    pub updated_at: ::core::option::Option<
        super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(message, optional, tag = "7")]
    pub content: ::core::option::Option<ChartThemeContent>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChartThemeContent {
    #[prost(oneof = "chart_theme_content::ChartThemeContent", tags = "1")]
    pub chart_theme_content: ::core::option::Option<
        chart_theme_content::ChartThemeContent,
    >,
}
/// Nested message and enum types in `ChartThemeContent`.
pub mod chart_theme_content {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ChartThemeContent {
        #[prost(message, tag = "1")]
        V1(super::ChartThemeContentV1),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChartThemeContentV1 {
    #[prost(bool, tag = "1")]
    pub title_enabled: bool,
    #[prost(enumeration = "TextAlignment", tag = "2")]
    pub title_alignment: i32,
    #[prost(int32, tag = "3")]
    pub title_font_size: i32,
    #[prost(string, tag = "4")]
    pub title_font_color: ::prost::alloc::string::String,
    #[prost(bool, tag = "5")]
    pub caption_enabled: bool,
    #[prost(enumeration = "TextAlignment", tag = "6")]
    pub caption_alignment: i32,
    #[prost(int32, tag = "7")]
    pub caption_font_size: i32,
    #[prost(string, tag = "8")]
    pub caption_font_color: ::prost::alloc::string::String,
    #[prost(bool, tag = "9")]
    pub background_enabled: bool,
    #[prost(bool, tag = "10")]
    pub legend_enabled: bool,
    #[prost(enumeration = "LegendPosition", tag = "11")]
    pub legend_position: i32,
    #[prost(int32, tag = "12")]
    pub legend_font_size: i32,
    #[prost(string, tag = "13")]
    pub legend_font_color: ::prost::alloc::string::String,
    #[prost(enumeration = "LegendPlacement", tag = "14")]
    pub legend_placement: i32,
    #[prost(bool, tag = "15")]
    pub row_gap_enabled: bool,
    #[prost(int32, optional, tag = "16")]
    pub row_gap_size: ::core::option::Option<i32>,
    #[prost(int32, tag = "17")]
    pub aspect_ratio_width: i32,
    #[prost(int32, tag = "18")]
    pub aspect_ratio_height: i32,
    #[prost(message, optional, tag = "19")]
    pub chart_type_themes: ::core::option::Option<ChartTypeThemes>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChartTypeThemes {
    #[prost(message, optional, tag = "1")]
    pub time_series: ::core::option::Option<TimeSeriesChartTheme>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateChartThemeRequest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub content: ::core::option::Option<ChartThemeContent>,
    #[prost(string, optional, tag = "3")]
    pub workspace: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeSeriesChartTheme {
    #[prost(oneof = "time_series_chart_theme::TimeSeriesChartTheme", tags = "1")]
    pub time_series_chart_theme: ::core::option::Option<
        time_series_chart_theme::TimeSeriesChartTheme,
    >,
}
/// Nested message and enum types in `TimeSeriesChartTheme`.
pub mod time_series_chart_theme {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum TimeSeriesChartTheme {
        #[prost(message, tag = "1")]
        V1(super::TimeSeriesChartThemeV1),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeSeriesChartThemeV1 {
    #[prost(int32, tag = "1")]
    pub x_axis_tick_font_size: i32,
    #[prost(string, tag = "2")]
    pub x_axis_tick_font_color: ::prost::alloc::string::String,
    #[prost(int32, tag = "3")]
    pub y_axis_title_font_size: i32,
    #[prost(int32, tag = "4")]
    pub y_axis_tick_font_size: i32,
    #[prost(int32, optional, tag = "5")]
    pub threshold_line_width: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateChartThemeRequest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub content: ::core::option::Option<ChartThemeContent>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListChartThemesRequest {
    #[prost(string, repeated, tag = "1")]
    pub workspaces: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListChartThemesResponse {
    #[prost(message, repeated, tag = "1")]
    pub chart_themes: ::prost::alloc::vec::Vec<ChartTheme>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetChartThemeRequest {
    #[prost(string, tag = "1")]
    pub chart_theme_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetChartThemeResponse {
    #[prost(message, optional, tag = "1")]
    pub chart_theme: ::core::option::Option<ChartTheme>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateChartThemeResponse {
    #[prost(message, optional, tag = "1")]
    pub chart_theme: ::core::option::Option<ChartTheme>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateChartThemeRequestWrapper {
    #[prost(string, tag = "1")]
    pub chart_theme_rid: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub request: ::core::option::Option<UpdateChartThemeRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateChartThemeResponse {
    #[prost(message, optional, tag = "1")]
    pub chart_theme: ::core::option::Option<ChartTheme>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteChartThemeRequest {
    #[prost(string, tag = "1")]
    pub chart_theme_rid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteChartThemeResponse {}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LegendPlacement {
    Unspecified = 0,
    Outside = 1,
    Inside = 2,
}
impl LegendPlacement {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "LEGEND_PLACEMENT_UNSPECIFIED",
            Self::Outside => "OUTSIDE",
            Self::Inside => "INSIDE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "LEGEND_PLACEMENT_UNSPECIFIED" => Some(Self::Unspecified),
            "OUTSIDE" => Some(Self::Outside),
            "INSIDE" => Some(Self::Inside),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LegendPosition {
    Unspecified = 0,
    Top = 1,
    Bottom = 2,
    Left = 3,
    Right = 4,
}
impl LegendPosition {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "LEGEND_POSITION_UNSPECIFIED",
            Self::Top => "TOP",
            Self::Bottom => "BOTTOM",
            Self::Left => "LEFT",
            Self::Right => "RIGHT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "LEGEND_POSITION_UNSPECIFIED" => Some(Self::Unspecified),
            "TOP" => Some(Self::Top),
            "BOTTOM" => Some(Self::Bottom),
            "LEFT" => Some(Self::Left),
            "RIGHT" => Some(Self::Right),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TextAlignment {
    Unspecified = 0,
    Start = 1,
    End = 2,
    Center = 3,
    Justify = 4,
}
impl TextAlignment {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "TEXT_ALIGNMENT_UNSPECIFIED",
            Self::Start => "START",
            Self::End => "END",
            Self::Center => "CENTER",
            Self::Justify => "JUSTIFY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TEXT_ALIGNMENT_UNSPECIFIED" => Some(Self::Unspecified),
            "START" => Some(Self::Start),
            "END" => Some(Self::End),
            "CENTER" => Some(Self::Center),
            "JUSTIFY" => Some(Self::Justify),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TextDirection {
    Unspecified = 0,
    Horizontal = 1,
    Vertical = 2,
}
impl TextDirection {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "TEXT_DIRECTION_UNSPECIFIED",
            Self::Horizontal => "HORIZONTAL",
            Self::Vertical => "VERTICAL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TEXT_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
            "HORIZONTAL" => Some(Self::Horizontal),
            "VERTICAL" => Some(Self::Vertical),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ThemesError {
    ChartThemeNameConflict = 0,
    ChartThemeNotFound = 1,
    InvalidChartTheme = 2,
}
impl ThemesError {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::ChartThemeNameConflict => "THEMES_ERROR_CHART_THEME_NAME_CONFLICT",
            Self::ChartThemeNotFound => "THEMES_ERROR_CHART_THEME_NOT_FOUND",
            Self::InvalidChartTheme => "THEMES_ERROR_INVALID_CHART_THEME",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "THEMES_ERROR_CHART_THEME_NAME_CONFLICT" => {
                Some(Self::ChartThemeNameConflict)
            }
            "THEMES_ERROR_CHART_THEME_NOT_FOUND" => Some(Self::ChartThemeNotFound),
            "THEMES_ERROR_INVALID_CHART_THEME" => Some(Self::InvalidChartTheme),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod themes_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    #[derive(Debug, Clone)]
    pub struct ThemesServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl ThemesServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> ThemesServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> ThemesServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            ThemesServiceClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        pub async fn list_chart_themes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListChartThemesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListChartThemesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.themes.v1.ThemesService/ListChartThemes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("nominal.themes.v1.ThemesService", "ListChartThemes"),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn get_chart_theme(
            &mut self,
            request: impl tonic::IntoRequest<super::GetChartThemeRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetChartThemeResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.themes.v1.ThemesService/GetChartTheme",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("nominal.themes.v1.ThemesService", "GetChartTheme"),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn create_chart_theme(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateChartThemeRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CreateChartThemeResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.themes.v1.ThemesService/CreateChartTheme",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.themes.v1.ThemesService",
                        "CreateChartTheme",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn update_chart_theme(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateChartThemeRequestWrapper>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateChartThemeResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.themes.v1.ThemesService/UpdateChartTheme",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.themes.v1.ThemesService",
                        "UpdateChartTheme",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn delete_chart_theme(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteChartThemeRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DeleteChartThemeResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.themes.v1.ThemesService/DeleteChartTheme",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.themes.v1.ThemesService",
                        "DeleteChartTheme",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
