func (c *Role) UnmarshalYAML(unmarshal func(interface{}) error) error {
	if err := unmarshal((*string)(c)); err != nil {
		return err
	}
	switch *c {
	case RoleNode, RolePod, RoleService, RoleEndpoint, RoleIngress:
		return nil
	default:
		return errors.Errorf("unknown Kubernetes SD role %q", *c)
	}
}
func (c *Role) UnmarshalYAML(unmarshal func(interface{}) error) error {
	if err := unmarshal((*string)(c)); err != nil {
		return err
	}
	switch *c {
	case RoleNode, RolePod, RoleService, RoleEndpoint, RoleIngress:
		return nil
	default:
		return errors.Errorf("unknown Kubernetes SD role %q", *c)
	}
}
func ( c * Role ) UnmarshalYAML ( unmarshal func ( interface { } ) error ) error { if err := unmarshal ( ( * string ) ( c ) ) ; err != nil { return err } switch * c { case RoleNode , RolePod , RoleService , RoleEndpoint , RoleIngress : return nil default : return errors . Errorf ( " " , * c ) } }
// UnmarshalYAML implements the yaml.Unmarshaler interface.
UnmarshalYAML implements the yaml . Unmarshaler interface .