in parquet_flask/cdms_lambda_func/index_to_es/s3_stat_extractor.py [0:0]
def to_json(self):
out_dict = {
's3_url': self.s3_url,
}
if self.bucket is not None:
out_dict['bucket'] = self.bucket
if self.name is not None:
out_dict['name'] = self.name
if self.provider is not None:
out_dict[CDMSConstants.provider_col] = self.provider
if self.project is not None:
out_dict[CDMSConstants.project_col] = self.project
if self.platform_code is not None:
out_dict[CDMSConstants.platform_code_col] = self.platform_code
if self.geo_interval is not None:
out_dict[CDMSConstants.geo_spatial_interval_col] = self.geo_interval
if self.year is not None:
out_dict[CDMSConstants.year_col] = self.year
if self.month is not None:
out_dict[CDMSConstants.month_col] = self.month
return out_dict