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

import (
	"time"

	"github.com/lib/pq"
	"github.com/meshery/schemas/models/core"
	"github.com/gofrs/uuid"
)

// Defines values for InvitationStatus.
const (
	Disabled InvitationStatus = "disabled"
	Enabled  InvitationStatus = "enabled"
)

// Invitation Invitation entity schema.
type Invitation struct {
	// AcceptedBy List of user ids that have already accepted the invitation, null or empty string means the invitation has not been used yet
	AcceptedBy pq.StringArray `db:"accepted_by" json:"accepted_by" yaml:"accepted_by"`

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

	// DeletedAt Timestamp when the invitation was deleted, if applicable
	DeletedAt core.NullTime `db:"deleted_at" json:"deleted_at" yaml:"deleted_at"`

	// Description Description of the invitation, which can be used to provide additional information about the invitation, null or empty string means the invitation does not have a description
	Description string `json:"description" yaml:"description"`

	// Emails The emails of the invitation.
	Emails pq.StringArray `json:"emails" yaml:"emails"`

	// ExpiresAt Timestamp when the invitation expires, if applicable , null or empty string means the invitation does not expire
	ExpiresAt *time.Time `db:"expires_at" json:"expires_at" yaml:"expires_at"`

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

	// IsDefault Indicates whether the invitation is a default invitation (open invite), which can be used to assign users when signing up from fqdn or custom domain, a organization can only have one default invitation
	IsDefault *bool `db:"is_default" json:"is_default" yaml:"is_default"`

	// Name Name of the invitation, which can be used to identify the invitation, required and cant be empty string,
	Name string `json:"name" yaml:"name"`

	// OrgId A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	OrgId core.Uuid `db:"org_id" json:"org_id" yaml:"org_id"`

	// OwnerId A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	OwnerId core.Uuid `db:"owner_id" json:"owner_id" yaml:"owner_id"`

	// Quota Quota for the invitation, which can be used to limit the number of users that can accept the invitation, null or empty string means the invitation does not have a quota
	Quota *int `json:"quota,omitempty" yaml:"quota,omitempty"`

	// Roles The roles of the invitation.
	Roles pq.StringArray `json:"roles" yaml:"roles"`

	// Status Status of the invitation, where enabled means the invitation is active and can be used, disabled means the invitation is no longer valid and is temporarily inactive, disabled invitations can be re-enabled later.
	Status InvitationStatus `json:"status" yaml:"status"`

	// Teams The teams of the invitation.
	Teams pq.StringArray `json:"teams" yaml:"teams"`

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

// InvitationPayload Payload for creating or updating an invitation.
type InvitationPayload struct {
	// Description Description of the invitation.
	Description string `json:"description" yaml:"description"`

	// Emails The emails of the invitation.
	Emails pq.StringArray `json:"emails" yaml:"emails"`

	// ExpiresAt Timestamp when the invitation expires, if applicable.
	ExpiresAt *time.Time `db:"expires_at" json:"expires_at,omitempty" yaml:"expires_at,omitempty"`

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

	// IsDefault Indicates whether the invitation is a default invitation (open invite).
	IsDefault *bool `db:"is_default" json:"is_default,omitempty" yaml:"is_default,omitempty"`

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

	// OrgId ID of the organization to which the user is invited.
	OrgId uuid.UUID `db:"org_id" json:"org_id" yaml:"org_id"`

	// OwnerId A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	OwnerId *core.Uuid `db:"owner_id" json:"owner_id,omitempty" yaml:"owner_id,omitempty"`

	// Quota Quota for the invitation.
	Quota *int `json:"quota,omitempty" yaml:"quota,omitempty"`

	// Roles The roles of the invitation.
	Roles pq.StringArray `json:"roles" yaml:"roles"`

	// Status Status of the invitation, where enabled means the invitation is active and can be used, disabled means the invitation is no longer valid and is temporarily inactive, disabled invitations can be re-enabled later.
	Status InvitationStatus `json:"status" yaml:"status"`

	// Teams The teams of the invitation.
	Teams pq.StringArray `json:"teams" yaml:"teams"`
}

// InvitationStatus Status of the invitation, where enabled means the invitation is active and can be used, disabled means the invitation is no longer valid and is temporarily inactive, disabled invitations can be re-enabled later.
type InvitationStatus string

// InvitationsPage defines model for InvitationsPage.
type InvitationsPage struct {
	// Data List of invitations
	Data []Invitation `json:"data" yaml:"data"`

	// Total Total number of invitations available
	Total int `json:"total" yaml:"total"`
}

// SignupRequest defines model for SignupRequest.
type SignupRequest map[string]interface{}

// SignupRequestsPage defines model for SignupRequestsPage.
type SignupRequestsPage struct {
	// Data The data of the signuprequestspage.
	Data *[]SignupRequest `json:"data,omitempty" yaml:"data,omitempty"`

	// 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:"page_size,omitempty" yaml:"page_size,omitempty"`

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

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

// InvitationId defines model for invitation_id.
type InvitationId = string

// OrganizationId defines model for organization_id.
type OrganizationId = string
