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

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

// MesheryPatternResource Server-returned Meshery pattern resource as persisted by meshery-cloud
// (`meshery_pattern_resources` table). A pattern resource records the
// Kubernetes-addressable identity (name, namespace, type, OAM type) of a
// resource provisioned from a design, and is used by the design engine to
// deduplicate provisioned resources. This v1beta3 shape supersedes the
// legacy v1alpha2 snake_case wire form and corrects its `Namepace` typo
// to `namespace`.
type MesheryPatternResource 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" yaml:"id"`

	// 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:"userId" yaml:"userId"`

	// Name Name of the provisioned resource.
	Name string `json:"name" yaml:"name"`

	// Namespace Kubernetes namespace the resource was provisioned into. Corrects
	// the legacy v1alpha2 `Namepace` typo.
	Namespace string `json:"namespace" yaml:"namespace"`

	// Type Resource type discriminator (e.g. the Kubernetes kind).
	Type string `json:"type" yaml:"type"`

	// OAMType OAM (Open Application Model) categorization of the resource,
	// stored in the `oam_type` column (e.g. `workload`, `trait`,
	// `scope`).
	OAMType string `db:"oam_type" json:"oamType" yaml:"oamType"`

	// Deleted Soft-delete marker. Server-managed; rows are flagged rather than
	// removed so the design engine can reconcile prior provisions.
	Deleted   bool              `json:"deleted" yaml:"deleted"`
	CreatedAt core.Time `db:"created_at" json:"createdAt" yaml:"createdAt"`
	UpdatedAt core.Time `db:"updated_at" json:"updatedAt" yaml:"updatedAt"`
}

// MesheryPatternResourcePage Paginated collection of pattern resources.
type MesheryPatternResourcePage struct {
	// Page Current page number of the result set.
	Page *int `json:"page,omitempty" yaml:"page,omitempty"`

	// PageSize Number of items per page.
	PageSize *int `json:"pageSize,omitempty" yaml:"pageSize,omitempty"`

	// Resources Pattern resources included on this page of results.
	Resources *[]MesheryPatternResource `json:"resources,omitempty" yaml:"resources,omitempty"`

	// TotalCount Total number of items available.
	TotalCount *int `json:"totalCount,omitempty" yaml:"totalCount,omitempty"`
}

// MesheryPatternResourcePayload Payload for creating or updating a pattern resource via
// `POST /api/content/patterns/resource`. Contains only
// client-settable fields; the owning `userId` (derived from the
// authenticated session), the `deleted` marker, and the
// server-generated `createdAt` / `updatedAt` timestamps are
// intentionally excluded.
type MesheryPatternResourcePayload 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"`

	// Name Name of the provisioned resource.
	Name string `json:"name" yaml:"name"`

	// Namespace Kubernetes namespace the resource was provisioned into.
	Namespace string `json:"namespace" yaml:"namespace"`

	// OAMType OAM categorization of the resource (e.g. workload, trait, scope).
	OAMType string `json:"oamType" yaml:"oamType"`

	// Type Resource type discriminator (e.g. the Kubernetes kind).
	Type string `json:"type" yaml:"type"`
}

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

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

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