// 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 (
	core "github.com/meshery/schemas/models/core"
)

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

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

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

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

// 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,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 `db:"owner" json:"user_id,omitempty" yaml:"user_id,omitempty"`

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

	// AccessToken Access token value.
	AccessToken *string `db:"access_token" json:"access_token,omitempty" yaml:"access_token,omitempty"`

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

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

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

	// IsOauth Whether this entry represents an OAuth session.
	IsOauth *bool `db:"is_oauth" json:"is_oauth,omitempty" yaml:"is_oauth,omitempty"`

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

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

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

// 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 = string

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

// Provider defines model for provider.
type Provider = string

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

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

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