(self, case_id, date_modified=None, user_id=undefined,
                 owner_id=undefined, external_id=undefined, case_type=undefined,
                 case_name=undefined, create=False, date_opened=undefined, update=None,
                 close=False, index=None, strict=True, date_opened_deprecated_behavior=False)
When `date_opened_deprecated_behavior`, a date_opened YYYY-MM-DD value is inserted on new cases.
        This is deprecated behavior, because it prevents the superior default behavior from kicking in.
When `date_opened_deprecated_behavior`, a date_opened YYYY-MM-DD value is inserted on new cases.
        This is deprecated behavior, because it prevents the superior default behavior from kicking in.
When date_opened_deprecated_behavior a date_opened YYYY - MM - DD value is inserted on new cases . This is deprecated behavior because it prevents the superior default behavior from kicking in .
def __init__(self, case_id, date_modified=None, user_id=undefined,
                 owner_id=undefined, external_id=undefined, case_type=undefined,
                 case_name=undefined, create=False, date_opened=undefined, update=None,
                 close=False, index=None, strict=True, date_opened_deprecated_behavior=False):
        """
        When `date_opened_deprecated_behavior`, a date_opened YYYY-MM-DD value is inserted on new cases.
        This is deprecated behavior, because it prevents the superior default behavior from kicking in.
        """
        if isinstance(case_id, bytes):
            case_id = case_id.decode('utf-8')
        if isinstance(user_id, bytes):
            user_id = user_id.decode('utf-8')
        # todo: can we use None instead of CaseBlock.undefined, throughout?
        owner_id = CaseBlock.undefined if owner_id is None else owner_id
        self.update = copy.copy(update) if update else {}
        now = datetime.utcnow()
        self.date_modified = date_modified or now
        if date_opened_deprecated_behavior:
            self.date_opened = (now.date() if create and date_opened is CaseBlock.undefined
                                else date_opened)
        else:
            self.date_opened = date_opened
        self.case_type = case_type
        self.case_name = case_name
        self.owner_id = owner_id
        self.close = close
        self.case_id = case_id
        self.user_id = user_id
        self.external_id = external_id
        self.create = create
        if strict:
            self._check_for_duplicate_properties()
        self.index = {key: self._make_index_attrs(value)
                      for key, value in index.items()} if index else {}
def __init__ ( self , case_id , date_modified = None , user_id = undefined , owner_id = undefined , external_id = undefined , case_type = undefined , case_name = undefined , create = False , date_opened = undefined , update = None , close = False , index = None , strict = True , date_opened_deprecated_behavior = False ) : if isinstance ( case_id , bytes ) : case_id = case_id . decode ( 'utf-8' ) if isinstance ( user_id , bytes ) : user_id = user_id . decode ( 'utf-8' ) # todo: can we use None instead of CaseBlock.undefined, throughout? owner_id = CaseBlock . undefined if owner_id is None else owner_id self . update = copy . copy ( update ) if update else { } now = datetime . utcnow ( ) self . date_modified = date_modified or now if date_opened_deprecated_behavior : self . date_opened = ( now . date ( ) if create and date_opened is CaseBlock . undefined else date_opened ) else : self . date_opened = date_opened self . case_type = case_type self . case_name = case_name self . owner_id = owner_id self . close = close self . case_id = case_id self . user_id = user_id self . external_id = external_id self . create = create if strict : self . _check_for_duplicate_properties ( ) self . index = { key : self . _make_index_attrs ( value ) for key , value in index . items ( ) } if index else { }