// 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"
	openapi_types "github.com/oapi-codegen/runtime/types"
	"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:"createdAt,omitempty" yaml:"createdAt,omitempty"`

	// DeletedAt Timestamp when the resource was deleted.
	DeletedAt core.DeletedAt `db:"deleted_at" json:"deletedAt,omitempty" yaml:"deletedAt,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:"orgName,omitempty" yaml:"orgName,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:"organizationId,omitempty" yaml:"organizationId,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:"ownerAvatar,omitempty" yaml:"ownerAvatar,omitempty"`

	// OwnerEmail Email address of the workspace owner.
	OwnerEmail *openapi_types.Email `db:"owner_email" json:"ownerEmail,omitempty" yaml:"ownerEmail,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:"ownerId,omitempty" yaml:"ownerId,omitempty"`

	// UpdatedAt Timestamp when the resource was updated.
	UpdatedAt core.UpdatedAt `db:"updated_at" json:"updatedAt,omitempty" yaml:"updatedAt,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:"pageSize,omitempty" yaml:"pageSize,omitempty"`
	TotalCount core.Number           `json:"totalCount,omitempty" yaml:"totalCount,omitempty"`
}

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

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

// 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:"createdAt" yaml:"createdAt"`

	// DeletedAt Timestamp when the resource was deleted.
	DeletedAt core.DeletedAt `db:"deleted_at" json:"deletedAt,omitempty" yaml:"deletedAt,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:"organizationId,omitempty" yaml:"organizationId"`

	// 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:"updatedAt" yaml:"updatedAt"`
}

// WorkspacePage Paginated list of workspaces.
type WorkspacePage struct {
	Page       core.Number `json:"page,omitempty" yaml:"page,omitempty"`
	PageSize   core.Number `json:"pageSize,omitempty" yaml:"pageSize,omitempty"`
	TotalCount core.Number `json:"totalCount,omitempty" yaml:"totalCount,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:"organizationId,omitempty" yaml:"organizationId,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:"organizationId,omitempty" yaml:"organizationId,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:"createdAt,omitempty" yaml:"createdAt,omitempty"`

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

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

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

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

// WorkspacesDesignsMappingPage Paginated list of workspace-design mappings.
type WorkspacesDesignsMappingPage struct {
	Page       core.Number `json:"page,omitempty" yaml:"page,omitempty"`
	PageSize   core.Number `json:"pageSize,omitempty" yaml:"pageSize,omitempty"`
	TotalCount core.Number `json:"totalCount,omitempty" yaml:"totalCount,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:"createdAt,omitempty" yaml:"createdAt,omitempty"`

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

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

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

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

// WorkspacesEnvironmentsMappingPage Paginated list of workspace-environment mappings.
type WorkspacesEnvironmentsMappingPage struct {
	Page       core.Number `json:"page,omitempty" yaml:"page,omitempty"`
	PageSize   core.Number `json:"pageSize,omitempty" yaml:"pageSize,omitempty"`
	TotalCount core.Number `json:"totalCount,omitempty" yaml:"totalCount,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:"createdAt,omitempty" yaml:"createdAt,omitempty"`

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

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

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

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

// WorkspacesTeamsMappingPage Paginated list of workspace-team mappings.
type WorkspacesTeamsMappingPage struct {
	Page       core.Number `json:"page,omitempty" yaml:"page,omitempty"`
	PageSize   core.Number `json:"pageSize,omitempty" yaml:"pageSize,omitempty"`
	TotalCount core.Number `json:"totalCount,omitempty" yaml:"totalCount,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:"createdAt,omitempty" yaml:"createdAt,omitempty"`

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

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

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

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

// WorkspacesViewsMappingPage Paginated list of workspace-view mappings.
type WorkspacesViewsMappingPage struct {
	Page       core.Number `json:"page,omitempty" yaml:"page,omitempty"`
	PageSize   core.Number `json:"pageSize,omitempty" yaml:"pageSize,omitempty"`
	TotalCount core.Number `json:"totalCount,omitempty" yaml:"totalCount,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

// OrgIdQuery defines model for orgIdQuery.
type OrgIdQuery = uuid.UUID

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

// PageSize defines model for pageSize.
type PageSize = 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

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

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