nominal-api-proto 0.1506.0

Protobuf/gRPC API bindings for the Nominal platform
Documentation
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TemplateSearchQuery {
    #[prost(
        oneof = "template_search_query::Query",
        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15"
    )]
    pub query: ::core::option::Option<template_search_query::Query>,
}
/// Nested message and enum types in `TemplateSearchQuery`.
pub mod template_search_query {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct QueryList {
        #[prost(message, repeated, tag = "1")]
        pub queries: ::prost::alloc::vec::Vec<super::TemplateSearchQuery>,
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Query {
        #[prost(message, tag = "1")]
        And(QueryList),
        #[prost(message, tag = "2")]
        Or(QueryList),
        #[prost(message, tag = "3")]
        Not(::prost::alloc::boxed::Box<super::TemplateSearchQuery>),
        #[prost(string, tag = "4")]
        TitleContains(::prost::alloc::string::String),
        #[prost(string, tag = "5")]
        SearchText(::prost::alloc::string::String),
        #[prost(string, tag = "6")]
        Label(::prost::alloc::string::String),
        #[prost(message, tag = "7")]
        Labels(super::super::super::types::LabelsFilter),
        #[prost(message, tag = "8")]
        Property(super::super::super::types::Property),
        #[prost(message, tag = "9")]
        Properties(super::super::super::types::PropertiesFilter),
        #[prost(string, tag = "10")]
        AuthorRid(::prost::alloc::string::String),
        #[prost(bool, tag = "11")]
        IsArchived(bool),
        #[prost(bool, tag = "12")]
        IsPublished(bool),
        #[prost(string, tag = "13")]
        WorkspaceRid(::prost::alloc::string::String),
        #[prost(bool, tag = "14")]
        AuthoredByCaller(bool),
        #[prost(message, tag = "15")]
        Authors(super::super::super::types::UserRidsFilter),
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TemplateSortOptions {
    #[prost(bool, tag = "1")]
    pub is_descending: bool,
    #[prost(enumeration = "TemplateSortField", tag = "2")]
    pub field: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TemplateSortField {
    Unspecified = 0,
    Name = 1,
    CreatedAt = 2,
    UpdatedAt = 3,
    EditedAt = 4,
}
impl TemplateSortField {
    /// 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 => "TEMPLATE_SORT_FIELD_UNSPECIFIED",
            Self::Name => "TEMPLATE_SORT_FIELD_NAME",
            Self::CreatedAt => "TEMPLATE_SORT_FIELD_CREATED_AT",
            Self::UpdatedAt => "TEMPLATE_SORT_FIELD_UPDATED_AT",
            Self::EditedAt => "TEMPLATE_SORT_FIELD_EDITED_AT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TEMPLATE_SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
            "TEMPLATE_SORT_FIELD_NAME" => Some(Self::Name),
            "TEMPLATE_SORT_FIELD_CREATED_AT" => Some(Self::CreatedAt),
            "TEMPLATE_SORT_FIELD_UPDATED_AT" => Some(Self::UpdatedAt),
            "TEMPLATE_SORT_FIELD_EDITED_AT" => Some(Self::EditedAt),
            _ => None,
        }
    }
}