package v1alpha1

import (
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// VsphereBlueprintSpec defines the desired state of VsphereBlueprint
type VsphereBlueprintSpec struct {
	// vCenter address (e.g. vcenter.example.com)
	// +required
	VCenter string `json:"vCenter"`

	// Datacenter name (e.g. NL001)
	// +required
	Datacenter string `json:"datacenter"`

	// Folder path where VMs will be organized (e.g. "ICT Digitalisation - Rancher")
	// +required
	Folder string `json:"folder"`

	// ResourcePool path (e.g. "NL001 Development - Rancher/Resources")
	// +required
	ResourcePool string `json:"resourcePool"`

	// DatastoreCluster or Datastore name (e.g. "NL001 Development - Rancher SDRS")
	// +required
	Datastore string `json:"datastore"`

	// Network name to attach to (e.g. "nl001.vDS.Distri.Vlan.1542")
	// +required
	Network string `json:"network"`

	// Template is the VM template name to clone from
	// +required
	Template string `json:"template"`
}

// VsphereBlueprintStatus defines the observed state
type VsphereBlueprintStatus struct {
	Ready bool `json:"ready,omitempty"`
}

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:shortName=vbp

// VsphereBlueprint is the Schema for the vsphereblueprints API
type VsphereBlueprint struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   VsphereBlueprintSpec   `json:"spec,omitempty"`
	Status VsphereBlueprintStatus `json:"status,omitempty"`
}

// +kubebuilder:object:root=true

// VsphereBlueprintList contains a list of VsphereBlueprint
type VsphereBlueprintList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VsphereBlueprint `json:"items"`
}

func init() {
	SchemeBuilder.Register(&VsphereBlueprint{}, &VsphereBlueprintList{})
}
