// Code generated by apbr generate. DO NOT EDIT.
// versions:
// 	apbr generate v1.2

//go:build !codeanalysis

package model

import (
	"github.com/apibrew/apibrew/pkg/model"
	"github.com/apibrew/apibrew/pkg/util"
	"google.golang.org/protobuf/types/known/structpb"
)

var ActionResource = &model.Resource{
	Name:        "Action",
	Namespace:   "nano",
	Title:       util.Pointer("Action"),
	Description: util.Pointer("Action"),
	Types: []*model.ResourceSubType{
		{
			Name:        "Property",
			Title:       "Property",
			Description: "Property is a type that represents a property of a resource. It is like an API properties or properties of class in a programming language",
			Properties: []*model.ResourceProperty{
				{
					Name:         "type",
					Type:         model.ResourceProperty_ENUM,
					Required:     true,
					ExampleValue: structpb.NewStringValue("STRING"),
					EnumValues:   []string{"BOOL", "STRING", "FLOAT32", "FLOAT64", "INT32", "INT64", "BYTES", "UUID", "DATE", "TIME", "TIMESTAMP", "OBJECT", "MAP", "LIST", "REFERENCE", "ENUM", "STRUCT"},
				},
				{
					Name:         "typeRef",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("BookPublishingDetails"),
				},
				{
					Name:         "primary",
					Type:         model.ResourceProperty_BOOL,
					Required:     true,
					DefaultValue: structpb.NewBoolValue(false),
				},
				{
					Name:         "required",
					Type:         model.ResourceProperty_BOOL,
					Required:     true,
					DefaultValue: structpb.NewBoolValue(false),
				},
				{
					Name:         "unique",
					Type:         model.ResourceProperty_BOOL,
					Required:     true,
					DefaultValue: structpb.NewBoolValue(false),
				},
				{
					Name:         "immutable",
					Type:         model.ResourceProperty_BOOL,
					Required:     true,
					DefaultValue: structpb.NewBoolValue(false),
				},
				{
					Name:         "virtual",
					Type:         model.ResourceProperty_BOOL,
					Required:     true,
					DefaultValue: structpb.NewBoolValue(false),
				},
				{
					Name:         "length",
					Type:         model.ResourceProperty_INT32,
					Required:     true,
					DefaultValue: structpb.NewNumberValue(256),
					ExampleValue: structpb.NewNumberValue(256),
				},
				{
					Name:         "item",
					Type:         model.ResourceProperty_STRUCT,
					TypeRef:      util.Pointer("Property"),
					ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"type": structpb.NewStringValue("STRING")}}),
				},
				{
					Name:         "reference",
					Type:         model.ResourceProperty_STRING,
					ExampleValue: structpb.NewStringValue("Book"),
				},
				{
					Name:         "backReference",
					Type:         model.ResourceProperty_STRING,
					ExampleValue: structpb.NewStringValue("Book"),
				},
				{
					Name:         "defaultValue",
					Type:         model.ResourceProperty_OBJECT,
					ExampleValue: structpb.NewStringValue("Lord of the Rings"),
				},
				{
					Name: "enumValues",
					Type: model.ResourceProperty_LIST,
					Item: &model.ResourceProperty{
						Name: "",
						Type: model.ResourceProperty_STRING,
					},
					ExampleValue: structpb.NewListValue(&structpb.ListValue{Values: []*structpb.Value{structpb.NewStringValue("UNKNOWN"), structpb.NewStringValue("ASC"), structpb.NewStringValue("DESC")}}),
				},
				{
					Name:         "exampleValue",
					Type:         model.ResourceProperty_OBJECT,
					ExampleValue: structpb.NewStringValue("no-book-name"),
				},
				{
					Name:         "title",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("Book Title"),
				},
				{
					Name:         "description",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("Book Title is a property of Book Resource. It represents the title of the book."),
				},
				{
					Name: "annotations",
					Type: model.ResourceProperty_MAP,
					Item: &model.ResourceProperty{
						Name: "",
						Type: model.ResourceProperty_STRING,
					},
					ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"CheckVersion": structpb.NewStringValue("true"), "IgnoreIfExists": structpb.NewStringValue("true"), "CommonType": structpb.NewStringValue("testType")}}),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "meta",
			},
		},
		{
			Name:        "AuditData",
			Title:       "Audit Data",
			Description: "Audit Data is a type that represents the audit data of a resource/record. ",
			Properties: []*model.ResourceProperty{
				{
					Name:         "createdBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "createdOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("2024-05-13T14:49:06+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					ExampleValue: structpb.NewStringValue("2024-05-13T14:49:06+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "meta",
			},
		},
	},
	Properties: []*model.ResourceProperty{
		{
			Name:         "id",
			Type:         model.ResourceProperty_UUID,
			Primary:      true,
			Required:     true,
			Immutable:    true,
			ExampleValue: structpb.NewStringValue("a39621a4-6d48-11ee-b962-0242ac120002"),

			Annotations: map[string]string{
				"SpecialProperty": "true",
				"SourceMatchKey":  "93ae987a4d33",
			},
		},
		{
			Name:         "language",
			Type:         model.ResourceProperty_ENUM,
			Required:     true,
			DefaultValue: structpb.NewStringValue("JAVASCRIPT"),
			EnumValues:   []string{"JAVASCRIPT", "TYPESCRIPT"},

			Annotations: map[string]string{
				"SourceMatchKey": "588d185dc18a",
			},
		},
		{
			Name:     "source",
			Type:     model.ResourceProperty_STRING,
			Length:   64000,
			Required: true,

			Annotations: map[string]string{
				"SQLType":        "TEXT",
				"SourceMatchKey": "38b3fea4b479",
			},
		},
		{
			Name:         "contentFormat",
			Type:         model.ResourceProperty_ENUM,
			Required:     true,
			DefaultValue: structpb.NewStringValue("TEXT"),
			EnumValues:   []string{"TEXT", "TAR", "TAR_GZ"},

			Annotations: map[string]string{
				"SourceMatchKey": "fcca1ae8d8f8",
			},
		},
		{
			Name: "annotations",
			Type: model.ResourceProperty_MAP,
			Item: &model.ResourceProperty{
				Name: "",
				Type: model.ResourceProperty_STRING,
			},

			Annotations: map[string]string{
				"SourceMatchKey": "3c90d26fc8f4",
			},
		},
		{
			Name:      "name",
			Type:      model.ResourceProperty_STRING,
			Length:    255,
			Required:  true,
			Unique:    true,
			Immutable: true,

			Annotations: map[string]string{
				"SourceMatchKey": "90e649ffd1a9",
			},
		},
		{
			Name: "outputSchema",
			Type: model.ResourceProperty_MAP,
			Item: &model.ResourceProperty{
				Name:    "",
				Type:    model.ResourceProperty_STRUCT,
				TypeRef: util.Pointer("Property"),
			},

			Annotations: map[string]string{
				"SourceMatchKey": "b40ef2307e39",
			},
		},
		{
			Name: "inputSchema",
			Type: model.ResourceProperty_MAP,
			Item: &model.ResourceProperty{
				Name:    "",
				Type:    model.ResourceProperty_STRUCT,
				TypeRef: util.Pointer("Property"),
			},

			Annotations: map[string]string{
				"SourceMatchKey": "17aa46b0acc9",
			},
		},
		{
			Name:     "restPath",
			Type:     model.ResourceProperty_STRING,
			Length:   255,
			Required: false,
			Unique:   false,

			Annotations: map[string]string{
				"SourceMatchKey": "318f4023e862",
			},
		},
		{
			Name:      "resource",
			Type:      model.ResourceProperty_REFERENCE,
			Reference: &model.Reference{Resource: "Resource", Namespace: "system"},

			Annotations: map[string]string{
				"SourceMatchKey": "44bc23ddc72d",
			},
		},
		{
			Name:         "version",
			Type:         model.ResourceProperty_INT32,
			Required:     true,
			DefaultValue: structpb.NewNumberValue(1),
			ExampleValue: structpb.NewNumberValue(1),

			Annotations: map[string]string{
				"AllowEmptyPrimitive": "true",
				"SourceMatchKey":      "7e645d401d21",
				"SpecialProperty":     "true",
			},
		},
		{
			Name:         "auditData",
			Type:         model.ResourceProperty_STRUCT,
			TypeRef:      util.Pointer("AuditData"),
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"createdBy": structpb.NewStringValue("admin"), "updatedBy": structpb.NewStringValue("admin"), "createdOn": structpb.NewStringValue("2024-05-13T14:49:06+04:00"), "updatedOn": structpb.NewStringValue("2024-05-13T14:49:06+04:00")}}),

			Annotations: map[string]string{
				"SpecialProperty": "true",
				"SourceMatchKey":  "8d062573b9ba",
			},
		},
	},

	Annotations: map[string]string{
		"EnableAudit":  "true",
		"OpenApiGroup": "meta",
	},
}
