func NewCustomResourceKindResource(apiVersion, name string) meta.MeshResource {
	return NewMeshResource(apiVersion, KindCustomResourceKind, name)
}
NewCustomResourceKindResource returns a MeshResource with the custom resource kind
package resource
import (
	"github.com/megaease/easemeshctl/cmd/client/resource/meta"
)
const (
	DefaultAPIVersion = "mesh.megaease.com/v1alpha1"
	LoadBalanceRoundRobinPolicy = "roundRobin"
	DefaultSideIngressProtocol = "http"
	DefaultSideEgressProtocol = "http"
	DefaultSideIngressPort = 13001
	DefaultSideEgressPort = 13002
	KindMeshController = "MeshController"
	KindService = "Service"
	KindServiceInstance = "ServiceInstance"
	KindCanary = "Canary"
	KindObservabilityMetrics = "ObservabilityMetrics"
	KindObservabilityTracings = "ObservabilityTracings"
	KindObservabilityOutputServer = "ObservabilityOutputServer"
	KindTenant = "Tenant"
	KindLoadBalance = "LoadBalance"
	KindResilience = "Resilience"
	KindIngress = "Ingress"
	KindCustomResourceKind = "CustomResourceKind"
)
type (
	ObjectCreator interface {
		NewFromKind(meta.VersionKind) (meta.MeshObject, error)
		NewFromResource(meta.MeshResource) (meta.MeshObject, error)
	}
	objectCreator struct{}
)
func NewObjectCreator() ObjectCreator {
	return &objectCreator{}
}
func (oc *objectCreator) NewFromKind(kind meta.VersionKind) (meta.MeshObject, error) {
	return oc.new(kind, meta.MetaData{})
}
func (oc *objectCreator) NewFromResource(resource meta.MeshResource) (meta.MeshObject, error) {
	return oc.new(resource.VersionKind, resource.MetaData)
}
func (oc *objectCreator) new(kind meta.VersionKind, metaData meta.MetaData) (meta.MeshObject, error) {
	apiVersion := kind.APIVersion
	if apiVersion == "" {
		apiVersion = DefaultAPIVersion
	}
	switch kind.Kind {
	case KindMeshController:
		return &MeshController{
			MeshResource: NewMeshControllerResource(apiVersion, metaData.Name),
		}, nil
	case KindService:
		return &Service{
			MeshResource: NewServiceResource(apiVersion, metaData.Name),
		}, nil
	case KindServiceInstance:
		return &ServiceInstance{
			MeshResource: NewServiceInstanceResource(apiVersion, metaData.Name),
		}, nil
	case KindTenant:
		return &Tenant{
			MeshResource: NewTenantResource(apiVersion, metaData.Name),
		}, nil
	case KindLoadBalance:
		return &LoadBalance{
			MeshResource: NewLoadBalanceResource(apiVersion, metaData.Name),
		}, nil
	case KindCanary:
		return &Canary{
			MeshResource: NewCanaryResource(apiVersion, metaData.Name),
		}, nil
	case KindObservabilityTracings:
		return &ObservabilityTracings{
			MeshResource: NewObservabilityTracingsResource(apiVersion, metaData.Name),
		}, nil
	case KindObservabilityOutputServer:
		return &ObservabilityOutputServer{
			MeshResource: NewObservabilityOutputServerResource(apiVersion, metaData.Name),
		}, nil
	case KindObservabilityMetrics:
		return &ObservabilityMetrics{
			MeshResource: NewObservabilityMetricsResource(apiVersion, metaData.Name),
		}, nil
	case KindResilience:
		return &Resilience{
			MeshResource: NewResilienceResource(apiVersion, metaData.Name),
		}, nil
	case KindIngress:
		return &Ingress{
			MeshResource: NewIngressResource(apiVersion, metaData.Name),
		}, nil
	case KindCustomResourceKind:
		return &CustomResourceKind{
			MeshResource: NewCustomResourceKindResource(apiVersion, metaData.Name),
		}, nil
	default:
		return &CustomResource{
			MeshResource: NewMeshResource(apiVersion, kind.Kind, metaData.Name),
		}, nil
	}
}
func NewMeshControllerResource(apiVersion, name string) meta.MeshResource {
	return NewMeshResource(apiVersion, KindMeshController, name)
}
func NewIngressResource(apiVersion, name string) meta.MeshResource {
	return NewMeshResource(apiVersion, KindIngress, name)
}
func NewServiceResource(apiVersion, name string) meta.MeshResource {
	return NewMeshResource(apiVersion, KindService, name)
}
func NewServiceInstanceResource(apiVersion, name string) meta.MeshResource {
	return NewMeshResource(apiVersion, KindServiceInstance, name)
}
func NewCanaryResource(apiVersion, name string) meta.MeshResource {
	return NewMeshResource(apiVersion, KindCanary, name)
}
func NewLoadBalanceResource(apiVersion, name string) meta.MeshResource {
	return NewMeshResource(apiVersion, KindLoadBalance, name)
}
func NewResilienceResource(apiVersion, name string) meta.MeshResource {
	return NewMeshResource(apiVersion, KindResilience, name)
}
func NewObservabilityTracingsResource(apiVersion, name string) meta.MeshResource {
	return NewMeshResource(apiVersion, KindObservabilityTracings, name)
}
func NewObservabilityMetricsResource(apiVersion, name string) meta.MeshResource {
	return NewMeshResource(apiVersion, KindObservabilityMetrics, name)
}
func NewObservabilityOutputServerResource(apiVersion, name string) meta.MeshResource {
	return NewMeshResource(apiVersion, KindObservabilityOutputServer, name)
}
func NewTenantResource(apiVersion, name string) meta.MeshResource {
	return NewMeshResource(apiVersion, KindTenant, name)
}