// 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 (
	meshcore "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 meshcore.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 meshcore.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 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"`
}

// KeyPage defines model for KeyPage.
type KeyPage struct {
	Page       meshcore.Number `json:"page" yaml:"page"`
	PageSize   meshcore.Number `json:"page_size" yaml:"page_size"`
	TotalCount meshcore.Number `json:"total_count" yaml:"total_count"`

	// Keys The keys of the keypage.
	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 *meshcore.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 = 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

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