// Package organization provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
package organization

import (
	"time"

	"github.com/meshery/schemas/models/core"
	"github.com/gofrs/uuid"
)

// Defines values for OrgTeamActionPayloadAction.
const (
	Delete OrgTeamActionPayloadAction = "delete"
)

// AuthBranding Optional per-organization branding overrides for the auth pages: carousel slides and FAQ entries. Stored as JSON inside organization.metadata.preferences, so no dedicated column backs it. Empty or omitted fields fall back to the platform defaults.
type AuthBranding struct {
	// Carousel Ordered slides rendered in the auth-page feature carousel.
	Carousel *[]CarouselSlide `json:"carousel,omitempty" yaml:"carousel,omitempty"`

	// Faqs FAQ entries rendered on the auth pages.
	Faqs *[]FAQ `json:"faqs,omitempty" yaml:"faqs,omitempty"`
}

// AvailableOrganization Organization listing record used in list and get responses.
type AvailableOrganization struct {
	Country     Text         `json:"country,omitempty" yaml:"country,omitempty"`
	CreatedAt   Time         `json:"createdAt,omitempty" yaml:"createdAt,omitempty"`
	DeletedAt   NullableTime `json:"deletedAt,omitempty" yaml:"deletedAt,omitempty"`
	Description Text         `json:"description,omitempty" yaml:"description,omitempty"`
	Domain      Text         `json:"domain,omitempty" yaml:"domain,omitempty"`

	// Id A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	ID *UUID `json:"id,omitempty" yaml:"id,omitempty"`

	// Metadata Free-form metadata associated with an organization, including preferences.
	Metadata  *OrgMetadata `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Name      Text         `json:"name,omitempty" yaml:"name,omitempty"`
	Owner     Text         `json:"owner,omitempty" yaml:"owner,omitempty"`
	Region    Text         `json:"region,omitempty" yaml:"region,omitempty"`
	UpdatedAt Time         `json:"updatedAt,omitempty" yaml:"updatedAt,omitempty"`
}

// AvailableTeam Team listing record used in team listings associated with an organization.
type AvailableTeam struct {
	CreatedAt   Time                   `json:"createdAt,omitempty" yaml:"createdAt,omitempty"`
	DeletedAt   NullableTime           `json:"deletedAt,omitempty" yaml:"deletedAt,omitempty"`
	Description Text                   `json:"description,omitempty" yaml:"description,omitempty"`
	ID          core.GeneralId `db:"id" json:"id" yaml:"id"`
	Metadata    MapObject              `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Name        Text                   `json:"name,omitempty" yaml:"name,omitempty"`
	Owner       Text                   `json:"owner,omitempty" yaml:"owner,omitempty"`
	UpdatedAt   Time                   `json:"updatedAt,omitempty" yaml:"updatedAt,omitempty"`
}

// CarouselSlide A single slide in the auth-page feature carousel.
type CarouselSlide struct {
	// Description Slide description text.
	Description string `json:"description" yaml:"description"`

	// ImageURL URL of the slide image asset.
	ImageURL string `json:"imageUrl" yaml:"imageUrl"`

	// Title Slide title.
	Title string `json:"title" yaml:"title"`
}

// DashboardPrefs Preferences specific to dashboard behavior.
type DashboardPrefs map[string]interface{}

// FAQ A single question/answer pair for the auth-page FAQ section.
type FAQ struct {
	// Answer The answer text.
	Answer string `json:"answer" yaml:"answer"`

	// Question The question text.
	Question string `json:"question" yaml:"question"`
}

// Links Per-organization overrides for the legal and support links shown on the auth pages and the error page. termsOfService and privacy are the named legal links; support is an open-ended set of named support contacts/links. Empty or omitted fields fall back to the platform defaults.
type Links struct {
	// Privacy URL of the organization's Privacy Policy page.
	Privacy *string `json:"privacy,omitempty" yaml:"privacy,omitempty"`

	// Support Open-ended set of named support contacts/links rendered on the auth and error pages, keyed by display name with a value that is a URL, a mailto:/tel: link, or free text. For example a "slack" entry pointing at https://slack.meshery.io, a "discussion forum" entry, or a "support desk" entry holding a phone number.
	Support *map[string]string `json:"support,omitempty" yaml:"support,omitempty"`

	// TermsOfService URL of the organization's Terms of Service page.
	TermsOfService *string `json:"termsOfService,omitempty" yaml:"termsOfService,omitempty"`
}

// Location Image asset anchored to a named location within an organization theme.
type Location struct {
	// Location Named location of the asset (e.g. header, footer).
	Location string `json:"location" yaml:"location"`

	// Svg SVG markup for the asset.
	Svg string `json:"svg" yaml:"svg"`
}

// Logo Themed logo assets used across light and dark, desktop and mobile presentations.
type Logo struct {
	// DarkDesktopView Image asset anchored to a named location within an organization theme.
	DarkDesktopView Location `json:"darkDesktopView" yaml:"darkDesktopView"`

	// DarkMobileView Image asset anchored to a named location within an organization theme.
	DarkMobileView Location `json:"darkMobileView" yaml:"darkMobileView"`

	// DesktopView Image asset anchored to a named location within an organization theme.
	DesktopView Location `json:"desktopView" yaml:"desktopView"`

	// MobileView Image asset anchored to a named location within an organization theme.
	MobileView Location `json:"mobileView" yaml:"mobileView"`
}

// MapObject defines model for MapObject.
type MapObject = core.MapObject

// NullableTime defines model for NullableTime.
type NullableTime = core.SqlNullTime

// OrgMetadata Free-form metadata associated with an organization, including preferences.
type OrgMetadata struct {
	// Preferences Organization-level user experience preferences.
	Preferences Preferences `json:"preferences" yaml:"preferences"`
}

// OrgTeamActionPayload Optional action payload for POST on /api/identity/orgs/{orgId}/teams/{teamId}.
type OrgTeamActionPayload struct {
	// Action Internal action to perform on the team resource.
	Action *OrgTeamActionPayloadAction `json:"action,omitempty" yaml:"action,omitempty"`
}

// OrgTeamActionPayloadAction Internal action to perform on the team resource.
type OrgTeamActionPayloadAction string

// Organization An organization in Meshery Cloud. Organizations are the top-level tenancy boundary and own teams, workspaces, environments, designs, and other resources. Learn more at https://docs.meshery.io/concepts/logical/organizations
type Organization struct {
	// Country Country of the organization.
	Country string `db:"country" json:"country" yaml:"country"`

	// CreatedAt Timestamp when the organization was created.
	CreatedAt time.Time `db:"created_at" json:"createdAt" yaml:"createdAt"`

	// DeletedAt Timestamp when the organization was soft-deleted. Null while the organization is active.
	DeletedAt core.NullTime `db:"deleted_at" json:"deletedAt,omitempty" yaml:"deletedAt,omitempty"`

	// Description Description of the organization.
	Description string `db:"description" json:"description" yaml:"description"`

	// Domain Domain of the organization.
	Domain *string `db:"domain" json:"domain,omitempty" yaml:"domain,omitempty"`

	// Id A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	ID core.Uuid `db:"id" json:"id" yaml:"id"`

	// Metadata Free-form metadata associated with the organization, including preferences.
	Metadata OrgMetadata `db:"metadata" json:"metadata" yaml:"metadata"`

	// Name Name of the organization.
	Name string `db:"name" json:"name" yaml:"name"`

	// Owner A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	Owner core.Uuid `db:"owner" json:"owner" yaml:"owner"`

	// Region Region of the organization.
	Region string `db:"region" json:"region" yaml:"region"`

	// UpdatedAt Timestamp when the organization was last updated.
	UpdatedAt time.Time `db:"updated_at" json:"updatedAt" yaml:"updatedAt"`
}

// OrganizationPage Single-organization wrapper used by current meshery-cloud organization handlers.
type OrganizationPage struct {
	// Organizations Organizations returned in this single-item page wrapper.
	Organizations *[]AvailableOrganization `json:"organizations,omitempty" yaml:"organizations,omitempty"`

	// Page Zero-based page index returned in this response.
	Page *int `json:"page,omitempty" yaml:"page,omitempty"`

	// PageSize Maximum number of items returned on each page.
	PageSize *int `json:"pageSize,omitempty" yaml:"pageSize,omitempty"`

	// TotalCount Total number of items across all pages.
	TotalCount *int `json:"totalCount,omitempty" yaml:"totalCount,omitempty"`
}

// OrganizationPayload Payload for creating or updating an organization. Contains only client-settable fields.
type OrganizationPayload struct {
	Country     Text `json:"country,omitempty" yaml:"country,omitempty"`
	Description Text `json:"description,omitempty" yaml:"description,omitempty"`
	Name        Text `json:"name,omitempty" yaml:"name,omitempty"`

	// NotifyOrgUpdate Indicates whether organization members should be notified of this update.
	NotifyOrgUpdate *bool `json:"notifyOrgUpdate,omitempty" yaml:"notifyOrgUpdate,omitempty"`

	// Preferences Organization-level user experience preferences.
	Preferences *Preferences `json:"preferences,omitempty" yaml:"preferences,omitempty"`
	Region      Text         `json:"region,omitempty" yaml:"region,omitempty"`
}

// OrganizationsPage Paginated list of organizations.
type OrganizationsPage struct {
	// Organizations Organizations in this page.
	Organizations *[]AvailableOrganization `json:"organizations,omitempty" yaml:"organizations,omitempty"`

	// Page Zero-based page index returned in this response.
	Page *int `json:"page,omitempty" yaml:"page,omitempty"`

	// PageSize Maximum number of items returned on each page.
	PageSize *int `json:"pageSize,omitempty" yaml:"pageSize,omitempty"`

	// TotalCount Total number of items across all pages.
	TotalCount *int `json:"totalCount,omitempty" yaml:"totalCount,omitempty"`
}

// Preferences Organization-level user experience preferences.
type Preferences struct {
	// AuthBranding Optional per-organization branding overrides for the auth pages: carousel slides and FAQ entries. Stored as JSON inside organization.metadata.preferences, so no dedicated column backs it. Empty or omitted fields fall back to the platform defaults.
	AuthBranding *AuthBranding `json:"authBranding,omitempty" yaml:"authBranding,omitempty"`

	// Dashboard Preferences specific to dashboard behavior.
	Dashboard DashboardPrefs `json:"dashboard" yaml:"dashboard"`

	// Links Per-organization overrides for the legal and support links shown on the auth pages and the error page. termsOfService and privacy are the named legal links; support is an open-ended set of named support contacts/links. Empty or omitted fields fall back to the platform defaults.
	Links *Links `json:"links,omitempty" yaml:"links,omitempty"`

	// ShowAuthCarousel Whether the feature carousel renders on the organization's auth pages. Unset is treated as true (shown); set false to hide it.
	ShowAuthCarousel *bool `json:"showAuthCarousel,omitempty" yaml:"showAuthCarousel,omitempty"`

	// Theme UI theme configured for an organization.
	Theme Theme `json:"theme" yaml:"theme"`
}

// TeamsOrganizationsMapping Junction record linking a team to an organization.
type TeamsOrganizationsMapping struct {
	CreatedAt Time                   `db:"created_at" json:"createdAt,omitempty" yaml:"createdAt,omitempty"`
	DeletedAt NullableTime           `db:"deleted_at" json:"deletedAt,omitempty" yaml:"deletedAt,omitempty"`
	ID        core.GeneralId `db:"id" json:"id" yaml:"id"`

	// OrgId A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	OrgID *UUID `db:"org_id" json:"orgId" yaml:"orgId,omitempty"`

	// TeamId A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	TeamID    *UUID `db:"team_id" json:"teamId" yaml:"teamId,omitempty"`
	UpdatedAt Time  `db:"updated_at" json:"updatedAt,omitempty" yaml:"updatedAt,omitempty"`
}

// TeamsOrganizationsMappingPage Paginated list of team-organization mappings.
type TeamsOrganizationsMappingPage struct {
	// Page Zero-based page index returned in this response.
	Page *int `json:"page,omitempty" yaml:"page,omitempty"`

	// PageSize Maximum number of items returned on each page.
	PageSize *int `json:"pageSize,omitempty" yaml:"pageSize,omitempty"`

	// TeamsOrganizationsMapping Team-organization mapping entries.
	TeamsOrganizationsMapping *[]TeamsOrganizationsMapping `json:"teamsOrganizationsMapping,omitempty" yaml:"teamsOrganizationsMapping,omitempty"`

	// TotalCount Total number of items across all pages.
	TotalCount *int `json:"totalCount,omitempty" yaml:"totalCount,omitempty"`
}

// TeamsPage Paginated list of teams.
type TeamsPage struct {
	// Page Zero-based page index returned in this response.
	Page *int `json:"page,omitempty" yaml:"page,omitempty"`

	// PageSize Maximum number of items returned on each page.
	PageSize *int `json:"pageSize,omitempty" yaml:"pageSize,omitempty"`

	// Teams Teams in this page.
	Teams *[]AvailableTeam `json:"teams,omitempty" yaml:"teams,omitempty"`

	// TotalCount Total number of items across all pages.
	TotalCount *int `json:"totalCount,omitempty" yaml:"totalCount,omitempty"`
}

// Text defines model for Text.
type Text = core.Text

// Theme UI theme configured for an organization.
type Theme struct {
	// Id Theme identifier.
	ID uuid.UUID `json:"id" yaml:"id"`

	// Logo Themed logo assets used across light and dark, desktop and mobile presentations.
	Logo Logo `json:"logo" yaml:"logo"`

	// Vars Arbitrary theme variables keyed by name.
	Vars *map[string]interface{} `json:"vars,omitempty" yaml:"vars,omitempty"`
}

// Time defines model for Time.
type Time = core.Time

// UUID A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
type UUID = core.Uuid

// UsersOrganizationsMapping Junction record linking a user to an organization, optionally carrying the role the user holds in that organization. Backed by the users_organizations_mappings table, whose user foreign-key column is named owner.
type UsersOrganizationsMapping struct {
	CreatedAt Time                   `db:"created_at" json:"createdAt,omitempty" yaml:"createdAt,omitempty"`
	DeletedAt NullableTime           `db:"deleted_at" json:"deletedAt,omitempty" yaml:"deletedAt,omitempty"`
	ID        core.GeneralId `db:"id" json:"id" yaml:"id"`

	// OrganizationId A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	OrganizationID *UUID `db:"organization_id" json:"organizationId" yaml:"organizationId,omitempty"`

	// RoleId A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	RoleID    *UUID `db:"role_id" json:"roleId,omitempty" yaml:"roleId,omitempty"`
	UpdatedAt Time  `db:"updated_at" json:"updatedAt,omitempty" yaml:"updatedAt,omitempty"`

	// UserId A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	UserID *UUID `db:"owner" json:"userId" yaml:"userId,omitempty"`
}

// UsersOrganizationsMappingPage Paginated list of user-organization mappings.
type UsersOrganizationsMappingPage struct {
	// Data User-organization mapping entries.
	Data *[]UsersOrganizationsMapping `json:"data,omitempty" yaml:"data,omitempty"`

	// Page Zero-based page index returned in this response.
	Page *int `json:"page,omitempty" yaml:"page,omitempty"`

	// PageSize Maximum number of items returned on each page.
	PageSize *int `json:"pageSize,omitempty" yaml:"pageSize,omitempty"`

	// TotalCount Total number of items across all pages.
	TotalCount *int `json:"totalCount,omitempty" yaml:"totalCount,omitempty"`
}

// All defines model for all.
type All = bool

// Order defines model for order.
type Order = string

// OrgId defines model for orgId.
type OrgId = core.OrganizationId

// Page defines model for page.
type Page = int

// PageSize defines model for pageSize.
type PageSize = int

// Search defines model for search.
type Search = string

// TeamId defines model for teamId.
type TeamId = core.TeamId

// UserId defines model for userId.
type UserId = core.UserUuid
