def _add_to_batch(self, partition_key, row_key, request):
        '''
        Validates batch-specific rules.
        
        :param str partition_key:
            PartitionKey of the entity.
        :param str row_key:
            RowKey of the entity.
        :param request:
            the request to insert, update or delete entity
        '''
        # All same partition keys
        if self._partition_key:
            if self._partition_key != partition_key:
                raise AzureBatchValidationError(_ERROR_INCORRECT_PARTITION_KEY_IN_BATCH)
        else:
            self._partition_key = partition_key

        # All different row keys
        if row_key in self._row_keys:
            raise AzureBatchValidationError(_ERROR_DUPLICATE_ROW_KEY_IN_BATCH)
        else:
            self._row_keys.append(row_key)

        # 100 entities
        if len(self._requests) >= 100:
            raise AzureBatchValidationError(_ERROR_TOO_MANY_ENTITIES_IN_BATCH)

        # Add the request to the batch
        self._requests.append((row_key, request))
def _add_to_batch ( self , partition_key , row_key , request ) : if self . _partition_key : if self . _partition_key != partition_key : raise AzureBatchValidationError ( _ERROR_INCORRECT_PARTITION_KEY_IN_BATCH ) else : self . _partition_key = partition_key if row_key in self . _row_keys : raise AzureBatchValidationError ( _ERROR_DUPLICATE_ROW_KEY_IN_BATCH ) else : self . _row_keys . append ( row_key ) if len ( self . _requests ) >= 100 : raise AzureBatchValidationError ( _ERROR_TOO_MANY_ENTITIES_IN_BATCH ) self . _requests . append ( ( row_key , request ) )
Validates batch-specific rules.
        
        :param str partition_key:
            PartitionKey of the entity.
        :param str row_key:
            RowKey of the entity.
        :param request:
            the request to insert, update or delete entity