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

import (
	meshcore "github.com/meshery/schemas/models/core"
	openapi_types "github.com/oapi-codegen/runtime/types"
)

// Preference User notification preferences.
type Preference struct {
	// WelcomeEmail Whether to send a welcome email to new users.
	WelcomeEmail bool `json:"welcomeEmail" yaml:"welcomeEmail"`

	// NotifyRoleChange Whether to notify the user of role changes.
	NotifyRoleChange bool `json:"notifyRoleChange" yaml:"notifyRoleChange"`
}

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

	// RoleName Unique name of the role.
	RoleName string `db:"role_name" json:"role_name" yaml:"role_name"`

	// Description Human-readable description of the role.
	Description string `db:"description" json:"description" yaml:"description"`

	// CreatedAt Timestamp when the resource was created.
	CreatedAt meshcore.CreatedAt `db:"created_at" json:"created_at,omitempty" yaml:"created_at,omitempty"`

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

	// DeletedAt SQL null Timestamp to handle null values of time.
	DeletedAt meshcore.NullTime `db:"deleted_at" json:"deleted_at,omitempty" yaml:"deleted_at,omitempty"`
}

// RoleHolderRequest Request body for assigning a role to a user.
type RoleHolderRequest struct {
	// Email Email of the user to assign roles to.
	Email openapi_types.Email `json:"email" yaml:"email"`

	// RoleNames List of role names to assign.
	RoleNames []string `json:"roleNames" yaml:"roleNames"`
}

// RolesKeychainsMapping Mapping between a role and a keychain.
type RolesKeychainsMapping struct {
	// Id A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	ID meshcore.Uuid `db:"id" json:"id" yaml:"id"`

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

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

	// CreatedAt Timestamp when the resource was created.
	CreatedAt meshcore.CreatedAt `db:"created_at" json:"created_at" yaml:"created_at"`

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

	// DeletedAt SQL null Timestamp to handle null values of time.
	DeletedAt meshcore.NullTime `db:"deleted_at" json:"deleted_at,omitempty" yaml:"deleted_at,omitempty"`
}

// RolesPage A paginated list of roles.
type RolesPage struct {
	// Page Current page number (zero-based).
	Page int `json:"page" yaml:"page"`

	// PageSize Number of roles per page.
	PageSize int `json:"page_size" yaml:"page_size"`

	// TotalCount Total number of roles across all pages.
	TotalCount int `json:"total_count" yaml:"total_count"`

	// Roles The roles of the rolespage.
	Roles []Role `json:"roles" yaml:"roles"`
}

// UserRoleUpdateRequest Request to update role assignments for a user.
type UserRoleUpdateRequest struct {
	// Id A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	ID *meshcore.Uuid `json:"id,omitempty" yaml:"id,omitempty"`

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

	// Username The username of the userroleupdaterequest.
	Username *string `json:"username,omitempty" yaml:"username,omitempty"`

	// Email Email address.
	Email *openapi_types.Email `json:"email,omitempty" yaml:"email,omitempty"`

	// FirstName The first name of the userroleupdaterequest.
	FirstName *string `json:"firstName,omitempty" yaml:"firstName,omitempty"`

	// LastName The last name of the userroleupdaterequest.
	LastName *string `json:"lastName,omitempty" yaml:"lastName,omitempty"`

	// Status Current status of the resource.
	Status *string `json:"status,omitempty" yaml:"status,omitempty"`

	// RoleNames The role names of the userroleupdaterequest.
	RoleNames *[]string         `json:"roleNames,omitempty" yaml:"roleNames,omitempty"`
	CreatedAt meshcore.Time `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	UpdatedAt meshcore.Time `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`

	// DeletedAt SQL null Timestamp to handle null values of time.
	DeletedAt meshcore.NullTime `json:"deleted_at,omitempty" yaml:"deleted_at,omitempty"`
}

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

// 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 = meshcore.Uuid

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

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

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

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

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

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

// Selector defines model for selector.
type Selector = string

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