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

import (
	"time"

	core "github.com/meshery/schemas/models/core"
)

// Key Represents an authorization key used for access control.
type Key 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"`

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

	// Function Operation permitted by the key.
	Function string `db:"function" json:"function" yaml:"function"`

	// Category Category for the key.
	Category string `db:"category" json:"category" yaml:"category"`

	// Subcategory Subcategory for the key.
	Subcategory string `db:"subcategory" json:"subcategory" yaml:"subcategory"`

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

	// CreatedAt Timestamp when the key was created.
	CreatedAt time.Time `db:"created_at" json:"createdAt" yaml:"createdAt"`

	// UpdatedAt Timestamp when the key was last updated.
	UpdatedAt time.Time `db:"updated_at" json:"updatedAt" yaml:"updatedAt"`

	// DeletedAt Timestamp when the key was soft-deleted.
	DeletedAt *core.NullTime `db:"deleted_at" json:"deletedAt,omitempty" yaml:"deletedAt,omitempty"`
}

// KeyPage A paginated list of authorization keys.
type KeyPage struct {
	// Page Zero-based page index returned in this response.
	Page int `json:"page" yaml:"page"`

	// PageSize Maximum number of items returned on each page.
	PageSize int `json:"pageSize" yaml:"pageSize"`

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

	// Keys Keys returned on the current page.
	Keys []Key `json:"keys" yaml:"keys"`
}

// KeyPayload Payload for creating or updating a key.
type KeyPayload 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"`

	// Function Operation permitted by the key.
	Function *string `json:"function,omitempty" yaml:"function,omitempty"`

	// Category Category for the key.
	Category *string `json:"category,omitempty" yaml:"category,omitempty"`

	// Subcategory Subcategory for the key.
	Subcategory *string `json:"subcategory,omitempty" yaml:"subcategory,omitempty"`

	// Description Human readable description of the key.
	Description *string `json:"description,omitempty" yaml:"description,omitempty"`
}

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

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

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