def delete( self, uuid, ): """Delete. :param uuid: Id of the validation rule """ request_data = { 'uuid': uuid, } errors_mapping = {} errors_mapping[( 'IN_USE', None)] = InUse('The validation rule is used in a routing rule') errors_mapping[('MISSING_FIELDS', None)] = MissingFields( 'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields' ) errors_mapping[( 'NOT_FOUND', None)] = NotFound('The validation rule was not found.') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted( 'You are not permitted to delete the validation rule') query_data = { 'api': self._api, 'url': '/validate/delete', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return AsyncQueryO(**query_data)
def delete( self, uuid, ): """Delete. :param uuid: The anonymization profile uuid """ request_data = { 'uuid': uuid, } errors_mapping = {} errors_mapping[('IN_USE', None)] = InUse( 'The anonymization profile is connected to an account and cannot be removed' ) errors_mapping[('MISSING_FIELDS', None)] = MissingFields( 'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields' ) errors_mapping[( 'NOT_FOUND', None)] = NotFound('The anonymization profile can not be found') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted( 'You are not permitted to delete the anonymization profile') query_data = { 'api': self._api, 'url': '/anonymization/delete', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return AsyncQueryO(**query_data)
def delete( self, uuid, ): """Delete. :param uuid: The rule set uuid """ request_data = { 'uuid': uuid, } errors_mapping = {} errors_mapping[('IN_USE', None)] = InUse( 'The rule set contains study status timet rules and cannot be removed' ) errors_mapping[('MISSING_FIELDS', None)] = MissingFields( 'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields' ) errors_mapping[('NOT_FOUND', None)] = NotFound('The rule set can not be found') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted( 'You are not permitted to delete the rule set') query_data = { 'api': self._api, 'url': '/rule_set/delete', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return QueryO(**query_data)
def delete( self, uuid, ): """Delete. :param uuid: The role uuid """ request_data = { 'uuid': uuid, } errors_mapping = {} errors_mapping['IN_USE'] = InUse( 'The role is in use. The error_subtype holds a array of the objects that are using it' ) errors_mapping['MISSING_FIELDS'] = MissingFields( 'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields' ) errors_mapping['NOT_FOUND'] = NotFound('The role can not be found') errors_mapping['NOT_PERMITTED'] = NotPermitted( 'You are not permitted to delete this role') query_data = { 'api': self._api, 'url': '/role/delete', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return QueryO(**query_data)
def set( self, uuid, name=None, rules=None, ): """Set. :param uuid: The anonymization profile uuid :param name: Name of the anonymization profile (optional) :param rules: A JSON hash of anonymization rules to apply to retrieved studies (optional) """ request_data = { 'name': name, 'rules': rules, 'uuid': uuid, } errors_mapping = {} errors_mapping[('IN_USE', None)] = InUse( 'The anonymization profile is connected to an account, its rule set cannot be changed' ) errors_mapping[('MISSING_FIELDS', None)] = MissingFields( 'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields' ) errors_mapping[( 'NOT_FOUND', None)] = NotFound('The anonymization profile can not be found') errors_mapping[('NOT_HASH', None)] = NotHash('The rules field is not a hash') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted( 'You are not permitted to edit the anonymization profile') query_data = { 'api': self._api, 'url': '/anonymization/set', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return AsyncQueryO(**query_data)