Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Return "Unnamed job" for null-valued Comprehend analysis job names for logging purposes #884

Merged
merged 1 commit into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion resources/comprehend_dominant_language_detection_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,9 @@ func (ce *ComprehendDominantLanguageDetectionJob) Properties() types.Properties
}

func (ce *ComprehendDominantLanguageDetectionJob) String() string {
return *ce.dominantLanguageDetectionJob.JobName
if ce.dominantLanguageDetectionJob.JobName == nil {
return "Unnamed job"
} else {
return *ce.dominantLanguageDetectionJob.JobName
}
}
6 changes: 5 additions & 1 deletion resources/comprehend_entities_detection_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,9 @@ func (ce *ComprehendEntitiesDetectionJob) Properties() types.Properties {
}

func (ce *ComprehendEntitiesDetectionJob) String() string {
return *ce.entitiesDetectionJob.JobName
if ce.entitiesDetectionJob.JobName == nil {
return "Unnamed job"
} else {
return *ce.entitiesDetectionJob.JobName
}
}
6 changes: 5 additions & 1 deletion resources/comprehend_key_phrases_detection_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,9 @@ func (ce *ComprehendKeyPhrasesDetectionJob) Properties() types.Properties {
}

func (ce *ComprehendKeyPhrasesDetectionJob) String() string {
return *ce.keyPhrasesDetectionJob.JobName
if ce.keyPhrasesDetectionJob.JobName == nil {
return "Unnamed job"
} else {
return *ce.keyPhrasesDetectionJob.JobName
}
}
6 changes: 5 additions & 1 deletion resources/comprehend_sentiment_detection_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,9 @@ func (ce *ComprehendSentimentDetectionJob) Properties() types.Properties {
}

func (ce *ComprehendSentimentDetectionJob) String() string {
return *ce.sentimentDetectionJob.JobName
if ce.sentimentDetectionJob.JobName == nil {
return "Unnamed job"
} else {
return *ce.sentimentDetectionJob.JobName
}
}