def __init__(self, json=None, **kwargs):
    if ((json is None) and (not kwargs)):
        raise ValueError('No data or kwargs present')
    class_name = 'JobResult'
    create_error = '{cls}: unable to create {prop} from value: {val}: {err}'
    required_error = '{cls}: missing required property {prop}'
    data = (json or kwargs)
    property_name = 'data'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [str]
        try:
            self.data = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'id'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [str]
        try:
            self.id = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'level'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [int]
        try:
            self.level = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'name'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [EnumJobResultName]
        try:
            self.name = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'startTime'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [int]
        try:
            self.startTime = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'state'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [EnumJobResultState]
        try:
            self.state = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'stderr'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [str]
        try:
            self.stderr = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'stdout'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [str]
        try:
            self.stdout = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
def __init__(self, json=None, **kwargs):
    if ((json is None) and (not kwargs)):
        raise ValueError('No data or kwargs present')
    class_name = 'JobResult'
    create_error = '{cls}: unable to create {prop} from value: {val}: {err}'
    required_error = '{cls}: missing required property {prop}'
    data = (json or kwargs)
    property_name = 'data'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [str]
        try:
            self.data = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'id'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [str]
        try:
            self.id = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'level'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [int]
        try:
            self.level = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'name'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [EnumJobResultName]
        try:
            self.name = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'startTime'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [int]
        try:
            self.startTime = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'state'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [EnumJobResultState]
        try:
            self.state = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'stderr'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [str]
        try:
            self.stderr = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))
    property_name = 'stdout'
    val = data.get(property_name)
    if (val is not None):
        datatypes = [str]
        try:
            self.stdout = client_support.val_factory(val, datatypes)
        except ValueError as err:
            raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
    else:
        raise ValueError(required_error.format(cls=class_name, prop=property_name))