func (property *PropertyDefinition) WithType(newType Type) *PropertyDefinition {
	if property.propertyType.Equals(newType) {
		return property
	}
	result := property.copy()
	result.propertyType = newType
	return result
}
WithType clones the property and returns it with a new type
package astmodel
import (
	"fmt"
	"sort"
	"strings"
	"github.com/Azure/k8s-infra/hack/generator/pkg/astbuilder"
	"github.com/dave/dst"
)
type PropertyName string
type PropertyDefinition struct {
	propertyName PropertyName
	propertyType Type
	description  string
	isRequired   bool
	tags         map[string][]string
}
var _ fmt.Stringer = &PropertyDefinition{}
func NewPropertyDefinition(propertyName PropertyName, jsonName string, propertyType Type) *PropertyDefinition {
	tags := make(map[string][]string)
	tags["json"] = []string{jsonName}
	return &PropertyDefinition{
		propertyName: propertyName,
		propertyType: propertyType,
		description:  "",
		tags:         tags,
	}
}
func (property *PropertyDefinition) PropertyName() PropertyName {
	return property.propertyName
}
func (property *PropertyDefinition) PropertyType() Type {
	return property.propertyType
}
func (property *PropertyDefinition) SetRequired(required bool) *PropertyDefinition {
	result := *property
	result.isRequired = required
	return &result
}
func (property *PropertyDefinition) WithDescription(description string) *PropertyDefinition {
	if description == property.description {
		return property
	}
	result := property.copy()
	result.description = description
	return result
}