diff --git a/apis/null/v1alpha1/zz_generated.managedlist.go b/apis/null/v1alpha1/zz_generated.managedlist.go deleted file mode 100644 index f0cd875..0000000 --- a/apis/null/v1alpha1/zz_generated.managedlist.go +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-FileCopyrightText: 2023 The Crossplane Authors -// -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by angryjet. DO NOT EDIT. - -package v1alpha1 - -import resource "github.com/crossplane/crossplane-runtime/pkg/resource" - -// GetItems of this ResourceList. -func (l *ResourceList) GetItems() []resource.Managed { - items := make([]resource.Managed, len(l.Items)) - for i := range l.Items { - items[i] = &l.Items[i] - } - return items -} diff --git a/apis/null/v1alpha1/zz_generated_terraformed.go b/apis/null/v1alpha1/zz_generated_terraformed.go deleted file mode 100755 index f4aea42..0000000 --- a/apis/null/v1alpha1/zz_generated_terraformed.go +++ /dev/null @@ -1,98 +0,0 @@ -// SPDX-FileCopyrightText: 2023 The Crossplane Authors -// -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by upjet. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/pkg/errors" - - "github.com/crossplane/upjet/pkg/resource" - "github.com/crossplane/upjet/pkg/resource/json" -) - -// GetTerraformResourceType returns Terraform resource type for this Resource -func (mg *Resource) GetTerraformResourceType() string { - return "null_resource" -} - -// GetConnectionDetailsMapping for this Resource -func (tr *Resource) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this Resource -func (tr *Resource) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this Resource -func (tr *Resource) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this Resource -func (tr *Resource) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this Resource -func (tr *Resource) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this Resource -func (tr *Resource) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this Resource -func (tr *Resource) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// LateInitialize this Resource using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *Resource) LateInitialize(attrs []byte) (bool, error) { - params := &ResourceParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Resource) GetTerraformSchemaVersion() int { - return 0 -} diff --git a/apis/null/v1alpha1/zz_groupversion_info.go b/apis/null/v1alpha1/zz_groupversion_info.go deleted file mode 100755 index e35d0b9..0000000 --- a/apis/null/v1alpha1/zz_groupversion_info.go +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-FileCopyrightText: 2023 The Crossplane Authors -// -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by upjet. DO NOT EDIT. - -// +kubebuilder:object:generate=true -// +groupName=null.template.crossplane.io -// +versionName=v1alpha1 -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -// Package type metadata. -const ( - CRDGroup = "null.template.crossplane.io" - CRDVersion = "v1alpha1" -) - -var ( - // CRDGroupVersion is the API Group Version used to register the objects - CRDGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: CRDGroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme -) diff --git a/apis/zz_register.go b/apis/zz_register.go deleted file mode 100755 index 03061a6..0000000 --- a/apis/zz_register.go +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-FileCopyrightText: 2023 The Crossplane Authors -// -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by upjet. DO NOT EDIT. - -// Package apis contains Kubernetes API for the provider. -package apis - -import ( - "k8s.io/apimachinery/pkg/runtime" - - v1alpha1 "github.com/crossplane/upjet-provider-template/apis/null/v1alpha1" - v1alpha1apis "github.com/crossplane/upjet-provider-template/apis/v1alpha1" - v1beta1 "github.com/crossplane/upjet-provider-template/apis/v1beta1" -) - -func init() { - // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back - AddToSchemes = append(AddToSchemes, - v1alpha1.SchemeBuilder.AddToScheme, - v1alpha1apis.SchemeBuilder.AddToScheme, - v1beta1.SchemeBuilder.AddToScheme, - ) -} - -// AddToSchemes may be used to add all resources defined in the project to a Scheme -var AddToSchemes runtime.SchemeBuilder - -// AddToScheme adds all Resources to the Scheme -func AddToScheme(s *runtime.Scheme) error { - return AddToSchemes.AddToScheme(s) -}