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

import (
	"time"

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

// TokenPage A paginated list of tokens.
type TokenPage struct {
	// Tokens Tokens returned on the current page.
	Tokens []UserToken `json:"tokens" yaml:"tokens"`

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

	// Page Current page number (zero-based).
	Page int `json:"page" yaml:"page"`

	// PageSize Number of tokens per page.
	PageSize int `json:"pageSize" yaml:"pageSize"`
}

// UserToken Represents a user-owned API token or OAuth session.
type UserToken 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"`

	// Provider Authentication provider associated with the token.
	Provider string `db:"provider" json:"provider" yaml:"provider"`

	// AccessToken Access token value.
	AccessToken string `db:"access_token" json:"accessToken" yaml:"accessToken"`

	// RefreshToken Refresh token value when applicable.
	RefreshToken *string `db:"refresh_token" json:"refreshToken" yaml:"refreshToken"`

	// Name Human-readable token name.
	Name string `db:"name" json:"name" yaml:"name"`

	// Purpose Purpose for which the token was created.
	Purpose string `db:"purpose" json:"purpose" yaml:"purpose"`

	// IsOAuth Whether this entry represents an OAuth session.
	IsOAuth bool `db:"is_oauth" json:"isOauth" yaml:"isOauth"`

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

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

// IsOauth defines model for isOauth.
type IsOauth = bool

// Name defines model for name.
type Name = string

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

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

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

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

// ProviderQuery defines model for providerQuery.
type ProviderQuery = string

// Purpose defines model for purpose.
type Purpose = string

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

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

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

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