# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. # typed: true # frozen_string_literal: true require 'sorbet-runtime' require 'faraday' module StackOne module Shared # NoteValue - The visibility of the notes. class NoteValue < T::Enum enums do PRIVATE = new('private') PUBLIC = new('public') end end # Visibility of the note class NoteVisibility < ::StackOne::Utils::FieldAugmented extend T::Sig # The source value of the notes visibility. field :source_value, T.nilable(Object), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('source_value') } } # The visibility of the notes. field :value, T.nilable(Shared::NoteValue), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::NoteValue, true) } } sig { params(source_value: T.nilable(Object), value: T.nilable(Shared::NoteValue)).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end class Note < ::StackOne::Utils::FieldAugmented extend T::Sig field :id, String, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('id') } } # Unique identifier of the author field :author_id, T.nilable(String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('author_id') } } field :content, T.nilable(T::Array[Shared::NoteContentApiModel]), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('content') } } # Date of creation field :created_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } } # Date of Deletion field :deleted_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('deleted_at'), 'decoder': Utils.datetime_from_iso_format(true) } } # Date of last update field :updated_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(true) } } # Visibility of the note field :visibility, T.nilable(Shared::NoteVisibility), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('visibility') } } sig { params(id: String, author_id: T.nilable(String), content: T.nilable(T::Array[Shared::NoteContentApiModel]), created_at: T.nilable(DateTime), deleted_at: T.nilable(DateTime), updated_at: T.nilable(DateTime), visibility: T.nilable(Shared::NoteVisibility)).void } def initialize(id: nil, author_id: nil, content: nil, created_at: nil, deleted_at: nil, updated_at: nil, visibility: nil) @id = id @author_id = author_id @content = content @created_at = created_at @deleted_at = deleted_at @updated_at = updated_at @visibility = visibility end end end end