Skip to content

Commit

Permalink
fix Left & Right errors
Browse files Browse the repository at this point in the history
  • Loading branch information
serena-ruan committed Sep 1, 2021
1 parent 2d65668 commit a94d4b8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ class RecognizeText(override val uid: String)
"printed text recognition is performed. If 'Handwritten' is specified," +
" handwriting recognition is performed",
{
case Left(_) => true
case Right(s) => Set("Printed", "Handwritten")(s)
case Left(s) => Set("Printed", "Handwritten")(s)
case Right(_) => true
}, isURLParam = true)

def getMode: String = getScalarParam(mode)
Expand Down Expand Up @@ -361,8 +361,8 @@ class ReadImage(override val uid: String)
" so only provide a language code if you would like to force the documented" +
" to be processed as that specific language.",
{
case Left(_) => true
case Right(s) => Set("en", "nl", "fr", "de", "it", "pt", "es")(s)
case Left(s) => Set("en", "nl", "fr", "de", "it", "pt", "es")(s)
case Right(_) => true
}, isURLParam = true)

def setLanguage(v: String): this.type = setScalarParam(language, v)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ trait HasModelID extends HasServiceParams {
trait HasLocale extends HasServiceParams {
val locale = new ServiceParam[String](this, "locale", "Locale of the receipt. Supported" +
" locales: en-AU, en-CA, en-GB, en-IN, en-US.", {
case Left(_) => true
case Right(s) => Set("en-AU", "en-CA", "en-GB", "en-IN", "en-US")(s)
case Left(s) => Set("en-AU", "en-CA", "en-GB", "en-IN", "en-US")(s)
case Right(_) => true
}, isURLParam = true)

def setLocale(v: String): this.type = setScalarParam(locale, v)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ class Translate(override val uid: String) extends TextTranslatorBase(uid)
val textType = new ServiceParam[String](this, "textType", "Defines whether the text being" +
" translated is plain text or HTML text. Any HTML needs to be a well-formed, complete element. Possible values" +
" are: plain (default) or html.", {
case Left(_) => true
case Right(s) => Set("plain", "html")(s)
case Left(s) => Set("plain", "html")(s)
case Right(_) => true
}, isURLParam = true)

def setTextType(v: String): this.type = setScalarParam(textType, v)
Expand All @@ -206,8 +206,8 @@ class Translate(override val uid: String) extends TextTranslatorBase(uid)
val profanityAction = new ServiceParam[String](this, "profanityAction", "Specifies how" +
" profanities should be treated in translations. Possible values are: NoAction (default), Marked or Deleted. ",
{
case Left(_) => true
case Right(s) => Set("NoAction", "Marked", "Deleted")(s)
case Left(s) => Set("NoAction", "Marked", "Deleted")(s)
case Right(_) => true
}, isURLParam = true)

def setProfanityAction(v: String): this.type = setScalarParam(profanityAction, v)
Expand All @@ -216,8 +216,8 @@ class Translate(override val uid: String) extends TextTranslatorBase(uid)

val profanityMarker = new ServiceParam[String](this, "profanityMarker", "Specifies how" +
" profanities should be marked in translations. Possible values are: Asterisk (default) or Tag.", {
case Left(_) => true
case Right(s) => Set("Asterisk", "Tag")(s)
case Left(s) => Set("Asterisk", "Tag")(s)
case Right(_) => true
}, isURLParam = true)

def setProfanityMarker(v: String): this.type = setScalarParam(profanityMarker, v)
Expand Down

0 comments on commit a94d4b8

Please sign in to comment.