def set_aws_cf_client(self, aws_cf_client): if self.is_aws_cf_client_set(): raise OperationFailed('AWS CloudFront Client already set') self._aws_cf_client = aws_cf_client
def get_aws_cf_client(self): if not self.is_aws_cf_client_set(): raise OperationFailed('AWS CloudFront Client not set') return self._aws_cf_client
def get_aws_s3_client(self): if not self.is_aws_s3_client_set(): raise OperationFailed('AWS S3 Client not set') return self._aws_s3_client
def set_aws_s3_client(self, aws_s3_client): if self.is_aws_s3_client_set(): raise OperationFailed('AWS S3 Client already set') self._aws_s3_client = aws_s3_client
def get_mongo_client(self): """Gets the mongo client. Raises error if no mongo client set.""" if not self.is_mongo_client_set(): raise OperationFailed('MongoClient not set') return self._mongo_client
def set_mongo_client(self, mongo_client): """Set the mongo client. Raises error if already set.""" if self.is_mongo_client_set(): raise OperationFailed('MongoClient already set') self._mongo_client = mongo_client
def get_json_client(self): """Gets the JSON client. Raises error if no JSON client set.""" if not self.is_json_client_set(): raise OperationFailed('JSONClient not set') return self._json_client