Skip to content

Commit

Permalink
Update golden files
Browse files Browse the repository at this point in the history
  • Loading branch information
theunrepentantgeek committed Jun 9, 2024
1 parent b3527f1 commit d2d4203
Show file tree
Hide file tree
Showing 32 changed files with 911 additions and 1,042 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,35 @@ package arm

import "github.com/Azure/azure-service-operator/v2/pkg/genruntime"

type Person_Spec_BOOMBABOOMBA struct {
type Person_Spec struct {
// Name: The name of the resource
Name string `json:"name,omitempty"`
Properties *PersonProperties_BOOMBABOOMBA `json:"properties,omitempty"`
Name string `json:"name,omitempty"`
Properties *PersonProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &Person_Spec_BOOMBABOOMBA{}
var _ genruntime.ARMResourceSpec = &Person_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always v2020
func (boombaboomba Person_Spec_BOOMBABOOMBA) GetAPIVersion() string {
func (person Person_Spec) GetAPIVersion() string {
return string(APIVersion_v2020)
}

// GetName returns the Name of the resource
func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetName() string {
return boombaboomba.Name
func (person *Person_Spec) GetName() string {
return person.Name
}

// GetType returns the ARM Type of the resource. This is always ""
func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetType() string {
func (person *Person_Spec) GetType() string {
return ""
}

type Person_STATUS_BOOMBABOOMBA struct {
type Person_STATUS struct {
// Status: Current status
Status string `json:"status,omitempty"`
}

type PersonProperties_BOOMBABOOMBA struct {
type PersonProperties struct {
// FamilyName: Shared name of the family
FamilyName *string `json:"familyName,omitempty" optionalConfigMapPair:"FamilyName"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package v20200101

import (
"fmt"
arm "github.com/Azure/azure-service-operator/testing/person/v20200101/arm"
"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -26,34 +27,6 @@ type PersonList struct {
Items []Person `json:"items"`
}

type Person_Spec_ARM struct {
// Name: The name of the resource
Name string `json:"name,omitempty"`
Properties *PersonProperties_ARM `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &Person_Spec_ARM{}

// GetAPIVersion returns the ARM API version of the resource. This is always v2020
func (person Person_Spec_ARM) GetAPIVersion() string {
return string(APIVersion_v2020)
}

// GetName returns the Name of the resource
func (person *Person_Spec_ARM) GetName() string {
return person.Name
}

// GetType returns the ARM Type of the resource. This is always ""
func (person *Person_Spec_ARM) GetType() string {
return ""
}

type Person_STATUS_ARM struct {
// Status: Current status
Status string `json:"status,omitempty"`
}

// +kubebuilder:validation:Enum={v2020}
type APIVersion string

Expand All @@ -73,7 +46,7 @@ func (person *Person_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolved
if person == nil {
return nil, nil
}
result := &Person_Spec_ARM{}
result := &arm.Person_Spec{}

// Set property "Name":
result.Name = resolved.Name
Expand All @@ -84,22 +57,22 @@ func (person *Person_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolved
if err != nil {
return nil, err
}
properties := *properties_ARM.(*PersonProperties_ARM)
properties := *properties_ARM.(*arm.PersonProperties)
result.Properties = &properties
}
return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (person *Person_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus {
return &Person_Spec_ARM{}
return &arm.Person_Spec{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (person *Person_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
typedInput, ok := armInput.(Person_Spec_ARM)
typedInput, ok := armInput.(arm.Person_Spec)
if !ok {
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Person_Spec_ARM, got %T", armInput)
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Person_Spec, got %T", armInput)
}

// Set property "AzureName":
Expand Down Expand Up @@ -129,14 +102,14 @@ var _ genruntime.FromARMConverter = &Person_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (person *Person_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
return &Person_STATUS_ARM{}
return &arm.Person_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (person *Person_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
typedInput, ok := armInput.(Person_STATUS_ARM)
typedInput, ok := armInput.(arm.Person_STATUS)
if !ok {
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Person_STATUS_ARM, got %T", armInput)
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Person_STATUS, got %T", armInput)
}

// Set property "Status":
Expand All @@ -146,20 +119,6 @@ func (person *Person_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerRefe
return nil
}

type PersonProperties_ARM struct {
// FamilyName: Shared name of the family
FamilyName *string `json:"familyName,omitempty" optionalConfigMapPair:"FamilyName"`

// FullName: As would be used to address mail
FullName string `json:"fullName,omitempty"`

// KnownAs: How the person is generally known
KnownAs string `json:"knownAs,omitempty"`

// RestrictedName: The name of the resource, restricted to max 25 character length
RestrictedName *string `json:"restrictedName,omitempty" optionalConfigMapPair:"RestrictedName"`
}

type PersonProperties struct {
// FamilyName: Shared name of the family
FamilyName *string `json:"familyName,omitempty" optionalConfigMapPair:"FamilyName"`
Expand Down Expand Up @@ -188,7 +147,7 @@ func (properties *PersonProperties) ConvertToARM(resolved genruntime.ConvertToAR
if properties == nil {
return nil, nil
}
result := &PersonProperties_ARM{}
result := &arm.PersonProperties{}

// Set property "FamilyName":
if properties.FamilyName != nil {
Expand Down Expand Up @@ -232,14 +191,14 @@ func (properties *PersonProperties) ConvertToARM(resolved genruntime.ConvertToAR

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (properties *PersonProperties) NewEmptyARMValue() genruntime.ARMResourceStatus {
return &PersonProperties_ARM{}
return &arm.PersonProperties{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (properties *PersonProperties) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
typedInput, ok := armInput.(PersonProperties_ARM)
typedInput, ok := armInput.(arm.PersonProperties)
if !ok {
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected PersonProperties_ARM, got %T", armInput)
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.PersonProperties, got %T", armInput)
}

// Set property "FamilyName":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,35 @@ package arm

import "github.com/Azure/azure-service-operator/v2/pkg/genruntime"

type Person_Spec_BOOMBABOOMBA struct {
type Person_Spec struct {
// Name: The name of the resource
Name string `json:"name,omitempty"`
Properties *PersonProperties_BOOMBABOOMBA `json:"properties,omitempty"`
Name string `json:"name,omitempty"`
Properties *PersonProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &Person_Spec_BOOMBABOOMBA{}
var _ genruntime.ARMResourceSpec = &Person_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always v2020
func (boombaboomba Person_Spec_BOOMBABOOMBA) GetAPIVersion() string {
func (person Person_Spec) GetAPIVersion() string {
return string(APIVersion_v2020)
}

// GetName returns the Name of the resource
func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetName() string {
return boombaboomba.Name
func (person *Person_Spec) GetName() string {
return person.Name
}

// GetType returns the ARM Type of the resource. This is always ""
func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetType() string {
func (person *Person_Spec) GetType() string {
return ""
}

type Person_STATUS_BOOMBABOOMBA struct {
type Person_STATUS struct {
// Status: Current status
Status string `json:"status,omitempty"`
}

type PersonProperties_BOOMBABOOMBA struct {
type PersonProperties struct {
// FamilyName: Shared name of the family
FamilyName string `json:"familyName,omitempty"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package v20200101

import (
"fmt"
arm "github.com/Azure/azure-service-operator/testing/person/v20200101/arm"
"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -26,34 +27,6 @@ type PersonList struct {
Items []Person `json:"items"`
}

type Person_Spec_ARM struct {
// Name: The name of the resource
Name string `json:"name,omitempty"`
Properties *PersonProperties_ARM `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &Person_Spec_ARM{}

// GetAPIVersion returns the ARM API version of the resource. This is always v2020
func (person Person_Spec_ARM) GetAPIVersion() string {
return string(APIVersion_v2020)
}

// GetName returns the Name of the resource
func (person *Person_Spec_ARM) GetName() string {
return person.Name
}

// GetType returns the ARM Type of the resource. This is always ""
func (person *Person_Spec_ARM) GetType() string {
return ""
}

type Person_STATUS_ARM struct {
// Status: Current status
Status string `json:"status,omitempty"`
}

// +kubebuilder:validation:Enum={v2020}
type APIVersion string

Expand All @@ -73,7 +46,7 @@ func (person *Person_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolved
if person == nil {
return nil, nil
}
result := &Person_Spec_ARM{}
result := &arm.Person_Spec{}

// Set property "Name":
result.Name = resolved.Name
Expand All @@ -84,22 +57,22 @@ func (person *Person_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolved
if err != nil {
return nil, err
}
properties := *properties_ARM.(*PersonProperties_ARM)
properties := *properties_ARM.(*arm.PersonProperties)
result.Properties = &properties
}
return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (person *Person_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus {
return &Person_Spec_ARM{}
return &arm.Person_Spec{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (person *Person_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
typedInput, ok := armInput.(Person_Spec_ARM)
typedInput, ok := armInput.(arm.Person_Spec)
if !ok {
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Person_Spec_ARM, got %T", armInput)
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Person_Spec, got %T", armInput)
}

// Set property "AzureName":
Expand Down Expand Up @@ -129,14 +102,14 @@ var _ genruntime.FromARMConverter = &Person_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (person *Person_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
return &Person_STATUS_ARM{}
return &arm.Person_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (person *Person_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
typedInput, ok := armInput.(Person_STATUS_ARM)
typedInput, ok := armInput.(arm.Person_STATUS)
if !ok {
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Person_STATUS_ARM, got %T", armInput)
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Person_STATUS, got %T", armInput)
}

// Set property "Status":
Expand All @@ -146,23 +119,6 @@ func (person *Person_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerRefe
return nil
}

type PersonProperties_ARM struct {
// FamilyName: Shared name of the family
FamilyName string `json:"familyName,omitempty"`

// FullName: As would be used to address mail
FullName string `json:"fullName,omitempty"`

// KnownAs: How the person is generally known
KnownAs string `json:"knownAs,omitempty"`

// SecretData: Secret data
SecretData map[string]string `json:"secretData,omitempty"`

// SecretSlice: Secret data
SecretSlice []string `json:"secretSlice,omitempty"`
}

type PersonProperties struct {
// FamilyName: Shared name of the family
FamilyName string `json:"familyName,omitempty"`
Expand All @@ -187,7 +143,7 @@ func (properties *PersonProperties) ConvertToARM(resolved genruntime.ConvertToAR
if properties == nil {
return nil, nil
}
result := &PersonProperties_ARM{}
result := &arm.PersonProperties{}

// Set property "FamilyName":
result.FamilyName = properties.FamilyName
Expand Down Expand Up @@ -226,14 +182,14 @@ func (properties *PersonProperties) ConvertToARM(resolved genruntime.ConvertToAR

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (properties *PersonProperties) NewEmptyARMValue() genruntime.ARMResourceStatus {
return &PersonProperties_ARM{}
return &arm.PersonProperties{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (properties *PersonProperties) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
typedInput, ok := armInput.(PersonProperties_ARM)
typedInput, ok := armInput.(arm.PersonProperties)
if !ok {
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected PersonProperties_ARM, got %T", armInput)
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.PersonProperties, got %T", armInput)
}

// Set property "FamilyName":
Expand Down
Loading

0 comments on commit d2d4203

Please sign in to comment.