{
    "description": "TemplateInstance requests and records the instantiation of a Template. TemplateInstance is part of an experimental API. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).",
    "properties": {
        "apiVersion": {
            "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
            "type": "string"
        },
        "kind": {
            "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
            "type": "string"
        },
        "metadata": {
            "type": "object"
        },
        "spec": {
            "description": "spec describes the desired state of this TemplateInstance.",
            "properties": {
                "requester": {
                    "description": "requester holds the identity of the agent requesting the template instantiation.",
                    "properties": {
                        "extra": {
                            "additionalProperties": {
                                "description": "ExtraValue masks the value so protobuf can generate",
                                "items": {
                                    "type": "string"
                                },
                                "type": "array"
                            },
                            "description": "extra holds additional information provided by the authenticator.",
                            "type": "object"
                        },
                        "groups": {
                            "description": "groups represent the groups this user is a part of.",
                            "items": {
                                "type": "string"
                            },
                            "type": "array"
                        },
                        "uid": {
                            "description": "uid is a unique value that identifies this user across time; if this user is deleted and another user by the same name is added, they will have different UIDs.",
                            "type": "string"
                        },
                        "username": {
                            "description": "username uniquely identifies this user among all active users.",
                            "type": "string"
                        }
                    },
                    "type": "object",
                    "additionalProperties": false
                },
                "secret": {
                    "description": "secret is a reference to a Secret object containing the necessary template parameters.",
                    "properties": {
                        "name": {
                            "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?",
                            "type": "string"
                        }
                    },
                    "type": "object",
                    "additionalProperties": false
                },
                "template": {
                    "description": "template is a full copy of the template for instantiation.",
                    "properties": {
                        "apiVersion": {
                            "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
                            "type": "string"
                        },
                        "kind": {
                            "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
                            "type": "string"
                        },
                        "labels": {
                            "additionalProperties": {
                                "type": "string"
                            },
                            "description": "labels is a optional set of labels that are applied to every object during the Template to Config transformation.",
                            "type": "object"
                        },
                        "message": {
                            "description": "message is an optional instructional message that will be displayed when this template is instantiated. This field should inform the user how to utilize the newly created resources. Parameter substitution will be performed on the message before being displayed so that generated credentials and other parameters can be included in the output.",
                            "type": "string"
                        },
                        "metadata": {
                            "type": "object"
                        },
                        "objects": {
                            "description": "objects is an array of resources to include in this template. If a namespace value is hardcoded in the object, it will be removed during template instantiation, however if the namespace value is, or contains, a ${PARAMETER_REFERENCE}, the resolved value after parameter substitution will be respected and the object will be created in that namespace.",
                            "items": {
                                "type": "object"
                            },
                            "type": "array",
                            "x-kubernetes-preserve-unknown-fields": true
                        },
                        "parameters": {
                            "description": "parameters is an optional array of Parameters used during the Template to Config transformation.",
                            "items": {
                                "description": "Parameter defines a name/value variable that is to be processed during the Template to Config transformation.",
                                "properties": {
                                    "description": {
                                        "description": "Description of a parameter. Optional.",
                                        "type": "string"
                                    },
                                    "displayName": {
                                        "description": "Optional: The name that will show in UI instead of parameter 'Name'",
                                        "type": "string"
                                    },
                                    "from": {
                                        "description": "From is an input value for the generator. Optional.",
                                        "type": "string"
                                    },
                                    "generate": {
                                        "description": "generate specifies the generator to be used to generate random string from an input value specified by From field. The result string is stored into Value field. If empty, no generator is being used, leaving the result Value untouched. Optional. \n The only supported generator is \"expression\", which accepts a \"from\" value in the form of a simple regular expression containing the range expression \"[a-zA-Z0-9]\", and the length expression \"a{length}\". \n Examples: \n from             | value ----------------------------- \"test[0-9]{1}x\"  | \"test7x\" \"[0-1]{8}\"       | \"01001100\" \"0x[A-F0-9]{4}\"  | \"0xB3AF\" \"[a-zA-Z0-9]{8}\" | \"hW4yQU5i\"",
                                        "type": "string"
                                    },
                                    "name": {
                                        "description": "Name must be set and it can be referenced in Template Items using ${PARAMETER_NAME}. Required.",
                                        "type": "string"
                                    },
                                    "required": {
                                        "description": "Optional: Indicates the parameter must have a value.  Defaults to false.",
                                        "type": "boolean"
                                    },
                                    "value": {
                                        "description": "Value holds the Parameter data. If specified, the generator will be ignored. The value replaces all occurrences of the Parameter ${Name} expression during the Template to Config transformation. Optional.",
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "name"
                                ],
                                "type": "object",
                                "additionalProperties": false
                            },
                            "type": "array"
                        }
                    },
                    "required": [
                        "objects"
                    ],
                    "type": "object",
                    "additionalProperties": false
                }
            },
            "required": [
                "template"
            ],
            "type": "object",
            "additionalProperties": false
        },
        "status": {
            "description": "status describes the current state of this TemplateInstance.",
            "properties": {
                "conditions": {
                    "description": "conditions represent the latest available observations of a TemplateInstance's current state.",
                    "items": {
                        "description": "TemplateInstanceCondition contains condition information for a TemplateInstance.",
                        "properties": {
                            "lastTransitionTime": {
                                "description": "LastTransitionTime is the last time a condition status transitioned from one state to another.",
                                "format": "date-time",
                                "type": "string"
                            },
                            "message": {
                                "description": "Message is a human readable description of the details of the last transition, complementing reason.",
                                "type": "string"
                            },
                            "reason": {
                                "description": "Reason is a brief machine readable explanation for the condition's last transition.",
                                "type": "string"
                            },
                            "status": {
                                "description": "Status of the condition, one of True, False or Unknown.",
                                "type": "string"
                            },
                            "type": {
                                "description": "Type of the condition, currently Ready or InstantiateFailure.",
                                "type": "string"
                            }
                        },
                        "required": [
                            "lastTransitionTime",
                            "message",
                            "reason",
                            "status",
                            "type"
                        ],
                        "type": "object",
                        "additionalProperties": false
                    },
                    "type": "array"
                },
                "objects": {
                    "description": "Objects references the objects created by the TemplateInstance.",
                    "items": {
                        "description": "TemplateInstanceObject references an object created by a TemplateInstance.",
                        "properties": {
                            "ref": {
                                "description": "ref is a reference to the created object.  When used under .spec, only name and namespace are used; these can contain references to parameters which will be substituted following the usual rules.",
                                "properties": {
                                    "apiVersion": {
                                        "description": "API version of the referent.",
                                        "type": "string"
                                    },
                                    "fieldPath": {
                                        "description": "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.",
                                        "type": "string"
                                    },
                                    "kind": {
                                        "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
                                        "type": "string"
                                    },
                                    "name": {
                                        "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                                        "type": "string"
                                    },
                                    "namespace": {
                                        "description": "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
                                        "type": "string"
                                    },
                                    "resourceVersion": {
                                        "description": "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency",
                                        "type": "string"
                                    },
                                    "uid": {
                                        "description": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
                                        "type": "string"
                                    }
                                },
                                "type": "object",
                                "additionalProperties": false
                            }
                        },
                        "type": "object",
                        "additionalProperties": false
                    },
                    "type": "array"
                }
            },
            "type": "object",
            "additionalProperties": false
        }
    },
    "required": [
        "spec"
    ],
    "type": "object",
    "additionalProperties": false,
    "$schema": "http://json-schema.org/draft-04/schema#"
}
