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

import (
	"time"

	"github.com/meshery/schemas/models/core"
	openapi_types "github.com/oapi-codegen/runtime/types"
	"github.com/gofrs/uuid"
)

// Defines values for UserRoleNames.
const (
	UserRoleNamesAdmin             UserRoleNames = "admin"
	UserRoleNamesCurator           UserRoleNames = "curator"
	UserRoleNamesMeshmap           UserRoleNames = "meshmap"
	UserRoleNamesOrganizationAdmin UserRoleNames = "organization admin"
	UserRoleNamesTeamAdmin         UserRoleNames = "team admin"
	UserRoleNamesUser              UserRoleNames = "user"
	UserRoleNamesWorkspaceAdmin    UserRoleNames = "workspace admin"
	UserRoleNamesWorkspaceManager  UserRoleNames = "workspace manager"
)

// Defines values for UserStatus.
const (
	Active    UserStatus = "active"
	Anonymous UserStatus = "anonymous"
	Inactive  UserStatus = "inactive"
	Pending   UserStatus = "pending"
)

// Adapter Placeholder for Adapter struct definition.
type Adapter = map[string]interface{}

// Grafana defines model for Grafana.
type Grafana struct {
	// GrafanaAPIKey Grafana API key for the user configuration.
	GrafanaAPIKey *string `json:"grafanaAPIKey,omitempty" yaml:"grafanaAPIKey,omitempty"`

	// GrafanaURL Grafana URL for the user configuration.
	GrafanaURL *string `json:"grafanaURL,omitempty" yaml:"grafanaURL,omitempty"`

	// SelectedBoardsConfigs Selected Grafana board configurations for the user.
	SelectedBoardsConfigs *[]SelectedGrafanaConfig `json:"selectedBoardsConfigs,omitempty" yaml:"selectedBoardsConfigs,omitempty"`
}

// GrafanaBoard Placeholder for GrafanaBoard definition (define fields as needed)
type GrafanaBoard = map[string]interface{}

// LoadTestPreferences defines model for LoadTestPreferences.
type LoadTestPreferences struct {
	// C Concurrent requests
	C *int `json:"c,omitempty" yaml:"c,omitempty"`

	// Gen Load generator
	Gen *string `json:"gen,omitempty" yaml:"gen,omitempty"`

	// Qps Queries per second
	Qps *int `json:"qps,omitempty" yaml:"qps,omitempty"`

	// T Duration
	T *string `json:"t,omitempty" yaml:"t,omitempty"`
}

// OrganizationWithRoles An organization the user is a member of, together with the names of the roles assigned to that user within the organization. Returned as an item of User.organizations.organizations_with_roles. The role names are dynamic, user-generated values (no fixed enumeration).
type OrganizationWithRoles struct {
	CreatedAt core.Time `db:"created_at" json:"created_at" yaml:"created_at,omitempty"`

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

	// 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"`

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

	// RoleNames Names of the roles assigned to the user within this organization. Free-form, user-generated role names; not a fixed enumeration.
	RoleNames []string          `db:"role_names" json:"role_names" yaml:"role_names"`
	UpdatedAt core.Time `db:"updated_at" json:"updated_at" yaml:"updated_at,omitempty"`
}

// Panel Grafana panel structure imported from github.com/grafana-tools/sdk
type Panel = map[string]interface{}

// Preference defines model for Preference.
type Preference struct {
	// AnonymousPerfResults The anonymous perf results of the preference.
	AnonymousPerfResults bool `json:"anonymousPerfResults" yaml:"anonymousPerfResults"`

	// AnonymousUsageStats The anonymous usage stats of the preference.
	AnonymousUsageStats bool `json:"anonymousUsageStats" yaml:"anonymousUsageStats"`

	// DashboardPreferences The dashboard preferences of the preference.
	DashboardPreferences map[string]interface{} `json:"dashboardPreferences" yaml:"dashboardPreferences"`
	Grafana              *Grafana               `json:"grafana,omitempty" yaml:"grafana,omitempty"`
	LoadTestPrefs        *LoadTestPreferences   `json:"loadTestPrefs,omitempty" yaml:"loadTestPrefs,omitempty"`

	// MeshAdapters The mesh adapters of the preference.
	MeshAdapters *[]Adapter  `json:"meshAdapters,omitempty" yaml:"meshAdapters,omitempty"`
	Prometheus   *Prometheus `json:"prometheus,omitempty" yaml:"prometheus,omitempty"`

	// RemoteProviderPreferences The remote provider preferences of the preference.
	RemoteProviderPreferences map[string]interface{} `json:"remoteProviderPreferences" yaml:"remoteProviderPreferences"`

	// SelectedOrganizationId ID of the associated selectedOrganization.
	SelectedOrganizationId uuid.UUID `json:"selectedOrganizationId" yaml:"selectedOrganizationId"`

	// SelectedWorkspaceForOrganizations The selected workspace for organizations of the preference.
	SelectedWorkspaceForOrganizations map[string]string `json:"selectedWorkspaceForOrganizations" yaml:"selectedWorkspaceForOrganizations"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updated_at" yaml:"updated_at"`

	// UsersExtensionPreferences The users extension preferences of the preference.
	UsersExtensionPreferences map[string]interface{} `json:"usersExtensionPreferences" yaml:"usersExtensionPreferences"`
}

// Prometheus defines model for Prometheus.
type Prometheus struct {
	// PrometheusURL The prometheus u r l of the prometheus.
	PrometheusURL *string `json:"prometheusURL,omitempty" yaml:"prometheusURL,omitempty"`

	// SelectedPrometheusBoardsConfigs The selected prometheus boards configs of the prometheus.
	SelectedPrometheusBoardsConfigs *[]SelectedGrafanaConfig `json:"selectedPrometheusBoardsConfigs,omitempty" yaml:"selectedPrometheusBoardsConfigs,omitempty"`
}

// SelectedGrafanaConfig defines model for SelectedGrafanaConfig.
type SelectedGrafanaConfig struct {
	// Board Placeholder for GrafanaBoard definition (define fields as needed)
	Board *GrafanaBoard `json:"board,omitempty" yaml:"board,omitempty"`

	// Panels Panels selected for the Grafana board configuration.
	Panels *[]Panel `json:"panels,omitempty" yaml:"panels,omitempty"`

	// TemplateVars Template variables applied to the selected Grafana board configuration.
	TemplateVars *[]string `json:"templateVars,omitempty" yaml:"templateVars,omitempty"`
}

// Social Various online profiles associated with the user account, like GitHub, LinkedIn, X, and so on.
type Social struct {
	// Link The link of the social.
	Link string `json:"link" yaml:"link"`

	// Site The site of the social.
	Site string `json:"site" yaml:"site"`
}

// TeamWithRoles A team the user is a member of, together with the names of the roles assigned to that user within the team. Returned as an item of User.teams.teams_with_roles. The role names are dynamic, user-generated values (no fixed enumeration).
type TeamWithRoles struct {
	CreatedAt core.Time `db:"created_at" json:"created_at" yaml:"created_at,omitempty"`

	// Description Human readable description of the team.
	Description *string `db:"description" json:"description" yaml:"description"`

	// 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"`

	// Name Name of the team.
	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,omitempty"`

	// RoleNames Names of the roles assigned to the user within this team. Free-form, user-generated role names; not a fixed enumeration.
	RoleNames []string          `db:"role_names" json:"role_names" yaml:"role_names"`
	UpdatedAt core.Time `db:"updated_at" json:"updated_at" yaml:"updated_at,omitempty"`
}

// User Represents a user
type User struct {
	AcceptedTermsAt core.Time `db:"accepted_terms_at" json:"accepted_terms_at" yaml:"accepted_terms_at,omitempty"`

	// AvatarUrl URL to user's avatar image
	AvatarUrl *string `db:"avatar_url" json:"avatar_url" yaml:"avatar_url"`

	// Bio User's biography or description
	Bio *string `db:"bio" json:"bio" yaml:"bio"`

	// Country User's country information stored as JSONB
	Country   core.Map          `db:"country" json:"country" yaml:"country"`
	CreatedAt core.Time `db:"created_at" json:"created_at" yaml:"created_at"`

	// DeletedAt Timestamp when the user record was soft-deleted (null if not deleted)
	DeletedAt *core.NullTime `db:"deleted_at" json:"deleted_at" yaml:"deleted_at"`

	// Email User's email address
	Email          openapi_types.Email `db:"email" json:"email" yaml:"email"`
	FirstLoginTime core.Time   `db:"first_login_time" json:"first_login_time" yaml:"first_login_time,omitempty"`

	// FirstName User's first name
	FirstName string `db:"first_name" json:"first_name" yaml:"first_name"`

	// 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"`
	LastLoginTime core.Time `db:"last_login_time" json:"last_login_time" yaml:"last_login_time"`

	// LastName User's last name
	LastName string `db:"last_name" json:"last_name" yaml:"last_name"`

	// Organizations Organizations the user belongs to with role information
	Organizations *struct {
		// OrganizationsWithRoles Organization memberships for the user with their assigned roles.
		OrganizationsWithRoles *[]OrganizationWithRoles `db:"organizations_with_roles" json:"organizations_with_roles" yaml:"organizations_with_roles"`

		// TotalCount Total number of organization memberships returned for the user.
		TotalCount *int `db:"total_count" json:"total_count" yaml:"total_count"`
	} `db:"organizations" json:"organizations" yaml:"organizations"`
	Preferences *Preference `db:"preferences" json:"preferences" yaml:"preferences,omitempty"`

	// Provider Authentication provider (e.g., Google, Github)
	Provider string `db:"provider" json:"provider" yaml:"provider"`

	// Region User's region information stored as JSONB
	Region core.Map `db:"region" json:"region" yaml:"region"`

	// RoleNames List of global roles assigned to the user
	RoleNames *[]UserRoleNames `db:"role_names" json:"role_names" yaml:"role_names"`

	// Socials Various online profiles associated with the user account
	Socials *UserSocials `db:"socials" json:"socials" yaml:"socials"`

	// Status User account status
	Status UserStatus `db:"status" json:"status" yaml:"status"`

	// Teams Teams the user belongs to with role information
	Teams *struct {
		// TeamsWithRoles Team memberships for the user with their assigned roles.
		TeamsWithRoles *[]TeamWithRoles `db:"teams_with_roles" json:"teams_with_roles" yaml:"teams_with_roles"`

		// TotalCount Total number of team memberships returned for the user.
		TotalCount *int `db:"total_count" json:"total_count" yaml:"total_count"`
	} `db:"teams" json:"teams" yaml:"teams"`
	UpdatedAt core.Time `db:"updated_at" json:"updated_at" yaml:"updated_at"`

	// UserId User identifier (username or external ID)
	UserId string `db:"user_id" json:"user_id" yaml:"user_id"`
}

// UserRoleNames defines model for User.RoleNames.
type UserRoleNames string

// UserStatus User account status
type UserStatus string

// UsersPageForAdmin Paginated list of users with organization and team role context
type UsersPageForAdmin struct {
	// Data The data of the userspageforadmin.
	Data *[]User `json:"data,omitempty" yaml:"data,omitempty"`

	// Page Current page number of the result set.
	Page *int `json:"page,omitempty" yaml:"page,omitempty"`

	// PageSize Number of items per page.
	PageSize *int `json:"page_size,omitempty" yaml:"page_size,omitempty"`

	// TotalCount Total number of items available.
	TotalCount *int `json:"total_count,omitempty" yaml:"total_count,omitempty"`
}

// UsersPageForNonAdmin Paginated list of public user records
type UsersPageForNonAdmin struct {
	// Data The data of the userspagefornonadmin.
	Data *[]User `json:"data,omitempty" yaml:"data,omitempty"`

	// Page Current page number of the result set.
	Page *int `json:"page,omitempty" yaml:"page,omitempty"`

	// PageSize Number of items per page.
	PageSize *int `json:"page_size,omitempty" yaml:"page_size,omitempty"`

	// TotalCount Total number of items available.
	TotalCount *int `json:"total_count,omitempty" yaml:"total_count,omitempty"`
}

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

// Id A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
// Id defines model for id.
type Id = uuid.UUID

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

// Page defines model for page.
type Page = 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
