S3ResultItem: de_S3ResultItem()

in clients/client-backupsearch/src/protocols/Aws_restJson1.ts [1028:1168]


      S3ResultItem: de_S3ResultItem(output.S3ResultItem, context),
    };
  }
  return { $unknown: Object.entries(output)[0] };
};

/**
 * deserializeAws_restJson1Results
 */
const de_Results = (output: any, context: __SerdeContext): ResultItem[] => {
  const retVal = (output || [])
    .filter((e: any) => e != null)
    .map((entry: any) => {
      return de_ResultItem(__expectUnion(entry), context);
    });
  return retVal;
};

// de_S3ExportSpecification omitted.

/**
 * deserializeAws_restJson1S3ItemFilter
 */
const de_S3ItemFilter = (output: any, context: __SerdeContext): S3ItemFilter => {
  return take(output, {
    CreationTimes: (_: any) => de_TimeConditionList(_, context),
    ETags: _json,
    ObjectKeys: _json,
    Sizes: _json,
    VersionIds: _json,
  }) as any;
};

/**
 * deserializeAws_restJson1S3ItemFilters
 */
const de_S3ItemFilters = (output: any, context: __SerdeContext): S3ItemFilter[] => {
  const retVal = (output || [])
    .filter((e: any) => e != null)
    .map((entry: any) => {
      return de_S3ItemFilter(entry, context);
    });
  return retVal;
};

/**
 * deserializeAws_restJson1S3ResultItem
 */
const de_S3ResultItem = (output: any, context: __SerdeContext): S3ResultItem => {
  return take(output, {
    BackupResourceArn: __expectString,
    BackupVaultName: __expectString,
    CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
    ETag: __expectString,
    ObjectKey: __expectString,
    ObjectSize: __expectLong,
    SourceResourceArn: __expectString,
    VersionId: __expectString,
  }) as any;
};

/**
 * deserializeAws_restJson1SearchJobBackupsResult
 */
const de_SearchJobBackupsResult = (output: any, context: __SerdeContext): SearchJobBackupsResult => {
  return take(output, {
    BackupCreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
    BackupResourceArn: __expectString,
    IndexCreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
    ResourceType: __expectString,
    SourceResourceArn: __expectString,
    Status: __expectString,
    StatusMessage: __expectString,
  }) as any;
};

/**
 * deserializeAws_restJson1SearchJobBackupsResults
 */
const de_SearchJobBackupsResults = (output: any, context: __SerdeContext): SearchJobBackupsResult[] => {
  const retVal = (output || [])
    .filter((e: any) => e != null)
    .map((entry: any) => {
      return de_SearchJobBackupsResult(entry, context);
    });
  return retVal;
};

/**
 * deserializeAws_restJson1SearchJobs
 */
const de_SearchJobs = (output: any, context: __SerdeContext): SearchJobSummary[] => {
  const retVal = (output || [])
    .filter((e: any) => e != null)
    .map((entry: any) => {
      return de_SearchJobSummary(entry, context);
    });
  return retVal;
};

/**
 * deserializeAws_restJson1SearchJobSummary
 */
const de_SearchJobSummary = (output: any, context: __SerdeContext): SearchJobSummary => {
  return take(output, {
    CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
    CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
    Name: __expectString,
    SearchJobArn: __expectString,
    SearchJobIdentifier: __expectString,
    SearchScopeSummary: _json,
    Status: __expectString,
    StatusMessage: __expectString,
  }) as any;
};

/**
 * deserializeAws_restJson1SearchScope
 */
const de_SearchScope = (output: any, context: __SerdeContext): SearchScope => {
  return take(output, {
    BackupResourceArns: _json,
    BackupResourceCreationTime: (_: any) => de_BackupCreationTimeFilter(_, context),
    BackupResourceTags: (_: any) => de_TagMap(_, context),
    BackupResourceTypes: _json,
    SourceResourceArns: _json,
  }) as any;
};

// de_SearchScopeSummary omitted.

// de_StringCondition omitted.

// de_StringConditionList omitted.

/**
 * deserializeAws_restJson1TagMap
 */
const de_TagMap = (output: any, context: __SerdeContext): Record<string, string> => {
  return Object.entries(output).reduce((acc: Record<string, string>, [key, value]: [string, any]) => {
    if (value === null) {