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

import (
	"github.com/meshery/schemas/models/core"
	"github.com/gofrs/uuid"
)

// Credential Meshery Credentials store sensitive information such as API keys, tokens, and passwords used by connections to external systems.
type Credential 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"`

	// Name Human-readable name for the credential.
	Name string `db:"name" json:"name" yaml:"name"`

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

	// Type Credential type (e.g. token, basic, AWS).
	Type string `db:"type" json:"type" yaml:"type"`

	// Secret Key-value pairs containing the sensitive credential data.
	Secret core.Map `db:"secret" json:"secret,omitempty" yaml:"secret,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"`

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

// CredentialPage A paginated list of credentials.
type CredentialPage struct {
	// Credentials The credentials of the credentialpage.
	Credentials []Credential `json:"credentials" yaml:"credentials"`

	// TotalCount Total number of credentials 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 credentials per page.
	PageSize int `json:"page_size" yaml:"page_size"`
}

// 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 = uuid.UUID

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

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

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

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