// Package workspace 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 workspace

import (
	"github.com/meshery/schemas/models/core"
	patternv1beta1 "github.com/meshery/schemas/models/v1beta1/pattern"
	viewv1beta1 "github.com/meshery/schemas/models/v1beta1/view"
	"github.com/gofrs/uuid"
)

// AvailableWorkspace Workspace with resolved owner details, as returned in list and get responses.
type AvailableWorkspace struct {
	// CreatedAt Timestamp when the resource was created.
	CreatedAt core.CreatedAt `db:"created_at" json:"created_at,omitempty" yaml:"created_at,omitempty"`

	// DeletedAt Timestamp when the resource was deleted.
	DeletedAt core.DeletedAt `db:"deleted_at" json:"deleted_at,omitempty" yaml:"deleted_at,omitempty"`

	// Description Description of the workspace.
	Description string                 `db:"description" json:"description,omitempty" yaml:"description,omitempty"`
	ID          core.GeneralId `db:"id" json:"id" yaml:"id"`

	// Metadata Metadata associated with the workspace.
	Metadata core.Map `db:"metadata" json:"metadata,omitempty" yaml:"metadata,omitempty"`

	// Name Name of the workspace.
	Name string `db:"name" json:"name,omitempty" yaml:"name,omitempty"`

	// OrgName Name of the owning organization.
	OrgName string `db:"org_name" json:"org_name,omitempty" yaml:"org_name,omitempty"`

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

	// Owner Display name of the workspace owner.
	Owner *string `db:"owner" json:"owner,omitempty" yaml:"owner,omitempty"`

	// OwnerAvatar Avatar URL of the workspace owner.
	OwnerAvatar *string `db:"owner_avatar" json:"owner_avatar,omitempty" yaml:"owner_avatar,omitempty"`

	// OwnerEmail Email address of the workspace owner.
	OwnerEmail *string `db:"owner_email" json:"owner_email,omitempty" yaml:"owner_email,omitempty"`

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

	// UpdatedAt Timestamp when the resource was updated.
	UpdatedAt core.UpdatedAt `db:"updated_at" json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
}

// MesheryDesignPage Paginated list of designs.
type MesheryDesignPage struct {
	// Designs Designs in this page.
	Designs    []patternv1beta1.MesheryPattern `json:"designs,omitempty" yaml:"designs,omitempty"`
	Page       core.Number           `json:"page,omitempty" yaml:"page,omitempty"`
	PageSize   core.Number           `json:"page_size,omitempty" yaml:"page_size,omitempty"`
	TotalCount core.Number           `json:"total_count,omitempty" yaml:"total_count,omitempty"`
}

// MesheryView A view enriched with the workspace and organization it belongs to.
type MesheryView = viewv1beta1.MesheryViewWithLocation

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

// Workspace A workspace is a logical grouping of resources within an organization. Workspaces provide a way to organize environments, designs, teams, and views. Learn more at https://docs.meshery.io/concepts/logical/workspaces
type Workspace struct {
	// CreatedAt Timestamp when the resource was created.
	CreatedAt core.CreatedAt `db:"created_at" json:"created_at" yaml:"created_at"`

	// DeletedAt Timestamp when the resource was deleted.
	DeletedAt core.DeletedAt `db:"deleted_at" json:"deleted_at,omitempty" yaml:"deleted_at,omitempty"`

	// Description Description of the workspace.
	Description string                 `db:"description" json:"description,omitempty" yaml:"description,omitempty"`
	ID          core.GeneralId `db:"id" json:"id" yaml:"id"`

	// Metadata Metadata associated with the workspace.
	Metadata core.Map `db:"metadata" json:"metadata" yaml:"metadata"`

	// Name Name of the workspace.
	Name string `db:"name" json:"name,omitempty" yaml:"name,omitempty"`

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

	// 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,omitempty" yaml:"owner,omitempty"`

	// UpdatedAt Timestamp when the resource was updated.
	UpdatedAt core.UpdatedAt `db:"updated_at" json:"updated_at" yaml:"updated_at"`
}

// WorkspacePage Paginated list of workspaces.
type WorkspacePage struct {
	Page       core.Number `json:"page,omitempty" yaml:"page,omitempty"`
	PageSize   core.Number `json:"page_size,omitempty" yaml:"page_size,omitempty"`
	TotalCount core.Number `json:"total_count,omitempty" yaml:"total_count,omitempty"`

	// Workspaces List of workspaces with resolved owner details.
	Workspaces []AvailableWorkspace `json:"workspaces,omitempty" yaml:"workspaces,omitempty"`
}

// WorkspacePayload Payload for creating a workspace.
type WorkspacePayload struct {
	// Description Description of the workspace.
	Description string `json:"description,omitempty" yaml:"description,omitempty"`

	// Metadata Metadata associated with the workspace.
	Metadata core.Map `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	// Name Name of the workspace.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`

	// OrganizationID Organization ID.
	OrganizationID uuid.UUID `json:"organization_id,omitempty" yaml:"organization_id,omitempty"`
}

// WorkspaceUpdatePayload Payload for updating a workspace.
type WorkspaceUpdatePayload struct {
	// Description Description of the workspace.
	Description string `json:"description,omitempty" yaml:"description,omitempty"`

	// Metadata Metadata associated with the workspace.
	Metadata core.Map `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	// Name Name of the workspace.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`

	// OrganizationID Organization ID.
	OrganizationID uuid.UUID `json:"organization_id,omitempty" yaml:"organization_id,omitempty"`
}

// WorkspacesDesignsMapping Junction record linking a workspace to a design.
type WorkspacesDesignsMapping struct {
	// CreatedAt Timestamp when the resource was created.
	CreatedAt core.CreatedAt `db:"created_at" json:"created_at,omitempty" yaml:"created_at,omitempty"`

	// DeletedAt Timestamp when the resource was deleted.
	DeletedAt core.DeletedAt `db:"deleted_at" json:"deleted_at,omitempty" yaml:"deleted_at,omitempty"`
	DesignId  core.DesignId  `db:"design_id" json:"design_id" yaml:"design_id"`
	ID        core.GeneralId `db:"id" json:"id" yaml:"id"`

	// UpdatedAt Timestamp when the resource was updated.
	UpdatedAt   core.UpdatedAt   `db:"updated_at" json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
	WorkspaceId core.WorkspaceId `db:"workspace_id" json:"workspace_id" yaml:"workspace_id"`
}

// WorkspacesDesignsMappingPage Paginated list of workspace-design mappings.
type WorkspacesDesignsMappingPage struct {
	Page       core.Number `json:"page,omitempty" yaml:"page,omitempty"`
	PageSize   core.Number `json:"page_size,omitempty" yaml:"page_size,omitempty"`
	TotalCount core.Number `json:"total_count,omitempty" yaml:"total_count,omitempty"`

	// WorkspacesDesignsMapping Workspace-design mapping entries.
	WorkspacesDesignsMapping []WorkspacesDesignsMapping `json:"workspacesDesignsMapping,omitempty" yaml:"workspacesDesignsMapping,omitempty"`
}

// WorkspacesEnvironmentsMapping Junction record linking a workspace to an environment.
type WorkspacesEnvironmentsMapping struct {
	// CreatedAt Timestamp when the resource was created.
	CreatedAt core.CreatedAt `db:"created_at" json:"created_at,omitempty" yaml:"created_at,omitempty"`

	// DeletedAt Timestamp when the resource was deleted.
	DeletedAt     core.DeletedAt     `db:"deleted_at" json:"deleted_at,omitempty" yaml:"deleted_at,omitempty"`
	EnvironmentId core.EnvironmentId `db:"environment_id" json:"environment_id" yaml:"environment_id"`
	ID            core.GeneralId     `db:"id" json:"id" yaml:"id"`

	// UpdatedAt Timestamp when the resource was updated.
	UpdatedAt   core.UpdatedAt   `db:"updated_at" json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
	WorkspaceId core.WorkspaceId `db:"workspace_id" json:"workspace_id" yaml:"workspace_id"`
}

// WorkspacesEnvironmentsMappingPage Paginated list of workspace-environment mappings.
type WorkspacesEnvironmentsMappingPage struct {
	Page       core.Number `json:"page,omitempty" yaml:"page,omitempty"`
	PageSize   core.Number `json:"page_size,omitempty" yaml:"page_size,omitempty"`
	TotalCount core.Number `json:"total_count,omitempty" yaml:"total_count,omitempty"`

	// WorkspacesEnvironmentsMapping Workspace-environment mapping entries.
	WorkspacesEnvironmentsMapping []WorkspacesEnvironmentsMapping `json:"workspacesEnvironmentsMapping,omitempty" yaml:"workspacesEnvironmentsMapping,omitempty"`
}

// WorkspacesTeamsMapping Junction record linking a workspace to a team.
type WorkspacesTeamsMapping struct {
	// CreatedAt Timestamp when the resource was created.
	CreatedAt core.CreatedAt `db:"created_at" json:"created_at,omitempty" yaml:"created_at,omitempty"`

	// DeletedAt Timestamp when the resource was deleted.
	DeletedAt core.DeletedAt `db:"deleted_at" json:"deleted_at,omitempty" yaml:"deleted_at,omitempty"`
	ID        core.GeneralId `db:"id" json:"id" yaml:"id"`
	TeamId    core.TeamId    `db:"team_id" json:"team_id" yaml:"team_id"`

	// UpdatedAt Timestamp when the resource was updated.
	UpdatedAt   core.UpdatedAt   `db:"updated_at" json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
	WorkspaceId core.WorkspaceId `db:"workspace_id" json:"workspace_id" yaml:"workspace_id"`
}

// WorkspacesTeamsMappingPage Paginated list of workspace-team mappings.
type WorkspacesTeamsMappingPage struct {
	Page       core.Number `json:"page,omitempty" yaml:"page,omitempty"`
	PageSize   core.Number `json:"page_size,omitempty" yaml:"page_size,omitempty"`
	TotalCount core.Number `json:"total_count,omitempty" yaml:"total_count,omitempty"`

	// WorkspacesTeamsMapping Workspace-team mapping entries.
	WorkspacesTeamsMapping []WorkspacesTeamsMapping `json:"workspacesTeamsMapping,omitempty" yaml:"workspacesTeamsMapping,omitempty"`
}

// WorkspacesViewsMapping Junction record linking a workspace to a view.
type WorkspacesViewsMapping struct {
	// CreatedAt Timestamp when the resource was created.
	CreatedAt core.CreatedAt `db:"created_at" json:"created_at,omitempty" yaml:"created_at,omitempty"`

	// DeletedAt Timestamp when the resource was deleted.
	DeletedAt core.DeletedAt `db:"deleted_at" json:"deleted_at,omitempty" yaml:"deleted_at,omitempty"`
	ID        core.GeneralId `db:"id" json:"id" yaml:"id"`

	// UpdatedAt Timestamp when the resource was updated.
	UpdatedAt   core.UpdatedAt   `db:"updated_at" json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
	ViewId      core.ViewId      `db:"view_id" json:"view_id" yaml:"view_id"`
	WorkspaceId core.WorkspaceId `db:"workspace_id" json:"workspace_id" yaml:"workspace_id"`
}

// WorkspacesViewsMappingPage Paginated list of workspace-view mappings.
type WorkspacesViewsMappingPage struct {
	Page       core.Number `json:"page,omitempty" yaml:"page,omitempty"`
	PageSize   core.Number `json:"page_size,omitempty" yaml:"page_size,omitempty"`
	TotalCount core.Number `json:"total_count,omitempty" yaml:"total_count,omitempty"`

	// WorkspacesViewsMapping Workspace-view mapping entries.
	WorkspacesViewsMapping []WorkspacesViewsMapping `json:"workspacesViewsMapping,omitempty" yaml:"workspacesViewsMapping,omitempty"`
}

// DesignId defines model for designId.
type DesignId = core.DesignId

// EnvironmentId defines model for environmentId.
type EnvironmentId = core.EnvironmentId

// Filter defines model for filter.
type Filter = string

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

// CorePage defines model for page.
type CorePage = string

// Pagesize defines model for pagesize.
type Pagesize = string

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

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

// ViewId defines model for viewId.
type ViewId = core.ViewId

// WorkspaceId defines model for workspaceId.
type WorkspaceId = core.WorkspaceId
