// 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 (
	core "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 *core.Uuid `db:"id" json:"id,omitempty" yaml:"id,omitempty"`

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

	// Description Human-readable description of the role.
	Description string            `db:"description" json:"description" yaml:"description"`
	CreatedAt   core.Time `db:"created_at" json:"createdAt" yaml:"createdAt,omitempty"`
	UpdatedAt   core.Time `db:"updated_at" json:"updatedAt" yaml:"updatedAt,omitempty"`

	// DeletedAt SQL null Timestamp to handle null values of time.
	DeletedAt core.NullTime `db:"deleted_at" json:"deletedAt" yaml:"deletedAt,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"`
}

// RolePayload Payload for upserting a role. Includes only client-settable fields.
type RolePayload struct {
	// Description Human-readable description of the role.
	Description string `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 `json:"id,omitempty" yaml:"id,omitempty"`

	// RoleName Unique name of the role.
	RoleName string `json:"roleName" yaml:"roleName"`
}

// 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 core.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 core.Uuid `db:"keychain_id" json:"keychainId" yaml:"keychainId"`

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

	// DeletedAt SQL null Timestamp to handle null values of time.
	DeletedAt core.NullTime `db:"deleted_at" json:"deletedAt" yaml:"deletedAt,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:"pageSize" yaml:"pageSize"`

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

	// 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 *core.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 *core.Uuid `json:"userId" yaml:"userId,omitempty"`

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

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

	// FirstName First name of the user.
	FirstName *string `json:"firstName,omitempty" yaml:"firstName,omitempty"`

	// LastName Last name of the user.
	LastName *string `json:"lastName,omitempty" yaml:"lastName,omitempty"`

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

	// RoleNames Role names currently or newly assigned to the user.
	RoleNames *[]string         `json:"roleNames,omitempty" yaml:"roleNames,omitempty"`
	CreatedAt core.Time `json:"createdAt" yaml:"createdAt,omitempty"`
	UpdatedAt core.Time `json:"updatedAt" yaml:"updatedAt,omitempty"`

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

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

// KeychainId A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
type KeychainId = core.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 = core.Uuid

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

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

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

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

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

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