func (cs *CgroupStatus) UnmarshalJSON(b []byte) error {
	if strings.ToLower(string(b)) == "null" {
		*cs = CgroupStatusNone
		return nil
	}

	if b[0] != '"' || b[len(b)-1] != '"' {
		*cs = CgroupStatusNone
		return errors.New("resource status unmarshal: status must be a string or null; Got " + string(b))
	}

	strStatus := string(b[1 : len(b)-1])
	stat, ok := cgroupStatusMap[strStatus]
	if !ok {
		*cs = CgroupStatusNone
		return errors.New("resource status unmarshal: unrecognized status")
	}
	*cs = stat
	return nil
}
func (cs *CgroupStatus) UnmarshalJSON(b []byte) error {
	if strings.ToLower(string(b)) == "null" {
		*cs = CgroupStatusNone
		return nil
	}

	if b[0] != '"' || b[len(b)-1] != '"' {
		*cs = CgroupStatusNone
		return errors.New("resource status unmarshal: status must be a string or null; Got " + string(b))
	}

	strStatus := string(b[1 : len(b)-1])
	stat, ok := cgroupStatusMap[strStatus]
	if !ok {
		*cs = CgroupStatusNone
		return errors.New("resource status unmarshal: unrecognized status")
	}
	*cs = stat
	return nil
}
func ( cs * CgroupStatus ) UnmarshalJSON ( b [ ] byte ) error { if strings . ToLower ( string ( b ) ) == " " { * cs = CgroupStatusNone return nil } if b [ 0 ] != '"' || b [ len ( b ) - 1 ] != '"' { * cs = CgroupStatusNone return errors . New ( " " + string ( b ) ) } strStatus := string ( b [ 1 : len ( b ) - 1 ] ) stat , ok := cgroupStatusMap [ strStatus ] if ! ok { * cs = CgroupStatusNone return errors . New ( " " ) } * cs = stat return nil }
// UnmarshalJSON overrides the logic for parsing the JSON-encoded ResourceStatus data
UnmarshalJSON overrides the logic for parsing the JSON - encoded ResourceStatus data