/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1 * User agent: apibuilder app.apibuilder.io/edsancha/medallia-api/0.0.1/http4s_0_22 */ package com.edsancha.medallia.api.v0.models { /** * Represents the question or fields to be filled by the user */ sealed trait ComponentUnion extends _root_.scala.Product with _root_.scala.Serializable { def componentUnionComponent: ComponentUnionComponent } /** * Defines the valid component values for the type ComponentUnion */ sealed trait ComponentUnionComponent extends _root_.scala.Product with _root_.scala.Serializable object ComponentUnionComponent { case object ComponentLabel extends ComponentUnionComponent { override def toString = "label" } case object ComponentImage extends ComponentUnionComponent { override def toString = "image" } case object ComponentNps extends ComponentUnionComponent { override def toString = "nps" } case object ComponentTextArea extends ComponentUnionComponent { override def toString = "textArea" } case object ComponentTextInput extends ComponentUnionComponent { override def toString = "textInput" } case object ComponentRadioSelector extends ComponentUnionComponent { override def toString = "radio" } case object ComponentCheckbox extends ComponentUnionComponent { override def toString = "checkbox" } case object ComponentDropdown extends ComponentUnionComponent { override def toString = "select" } case object ComponentGrading extends ComponentUnionComponent { override def toString = "grading" } case object ComponentGrading0to10 extends ComponentUnionComponent { override def toString = "grading0to10" } case object ComponentGrading1to10 extends ComponentUnionComponent { override def toString = "grading1to10" } final case class UNDEFINED(override val toString: String) extends ComponentUnionComponent val all: scala.List[ComponentUnionComponent] = scala.List(ComponentLabel, ComponentImage, ComponentNps, ComponentTextArea, ComponentTextInput, ComponentRadioSelector, ComponentCheckbox, ComponentDropdown, ComponentGrading, ComponentGrading0to10, ComponentGrading1to10) private val byName: Map[String, ComponentUnionComponent] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): ComponentUnionComponent = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[ComponentUnionComponent] = byName.get(value.toLowerCase) } /** * Represents the component or fields to be filled by the user */ sealed trait FeedbackUnion extends _root_.scala.Product with _root_.scala.Serializable { def feedbackUnionComponent: FeedbackUnionComponent } /** * Defines the valid component values for the type FeedbackUnion */ sealed trait FeedbackUnionComponent extends _root_.scala.Product with _root_.scala.Serializable object FeedbackUnionComponent { case object FeedbackNps extends FeedbackUnionComponent { override def toString = "nps" } case object FeedbackTextArea extends FeedbackUnionComponent { override def toString = "textArea" } case object FeedbackTextInput extends FeedbackUnionComponent { override def toString = "textInput" } case object FeedbackRadioSelector extends FeedbackUnionComponent { override def toString = "radio" } case object FeedbackCheckbox extends FeedbackUnionComponent { override def toString = "checkbox" } case object FeedbackDropdown extends FeedbackUnionComponent { override def toString = "select" } case object FeedbackGrading extends FeedbackUnionComponent { override def toString = "grading" } case object FeedbackGrading0to10 extends FeedbackUnionComponent { override def toString = "grading0to10" } case object FeedbackGrading1to10 extends FeedbackUnionComponent { override def toString = "grading1to10" } final case class UNDEFINED(override val toString: String) extends FeedbackUnionComponent val all: scala.List[FeedbackUnionComponent] = scala.List(FeedbackNps, FeedbackTextArea, FeedbackTextInput, FeedbackRadioSelector, FeedbackCheckbox, FeedbackDropdown, FeedbackGrading, FeedbackGrading0to10, FeedbackGrading1to10) private val byName: Map[String, FeedbackUnionComponent] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): FeedbackUnionComponent = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[FeedbackUnionComponent] = byName.get(value.toLowerCase) } /** * JWT Access Token to be used to access the APIe * * @param accessToken JWT Access Token to be used to access the API */ final case class AccessTokenWrapper( accessToken: String ) /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param required Component required * @param label Component label * @param options Maximum number of characters * @param description Component description */ final case class ComponentCheckbox( index: Int, id: Int, uniqueName: String, required: Boolean, label: String, options: Seq[String], description: _root_.scala.Option[String] = None ) extends ComponentUnion { override val componentUnionComponent: ComponentUnionComponent = ComponentUnionComponent.ComponentCheckbox } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param required Component required * @param placeholder Component placeholder * @param label Component label * @param options Maximum number of characters * @param description Component description */ final case class ComponentDropdown( index: Int, id: Int, uniqueName: String, required: Boolean, placeholder: String, label: String, options: Seq[String], description: _root_.scala.Option[String] = None ) extends ComponentUnion { override val componentUnionComponent: ComponentUnionComponent = ComponentUnionComponent.ComponentDropdown } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param required Component required * @param label Component label * @param ratingViewType Rating View Type * @param description Component description */ final case class ComponentGrading( index: Int, id: Int, uniqueName: String, required: Boolean, label: String, ratingViewType: com.edsancha.medallia.api.v0.models.RatingViewType = com.edsancha.medallia.api.v0.models.RatingViewType.GradingSlider, description: _root_.scala.Option[String] = None ) extends ComponentUnion { override val componentUnionComponent: ComponentUnionComponent = ComponentUnionComponent.ComponentGrading } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param required Component required * @param label Component label * @param ratingViewType Rating View Type * @param description Component description */ final case class ComponentGrading0to10( index: Int, id: Int, uniqueName: String, required: Boolean, label: String, ratingViewType: com.edsancha.medallia.api.v0.models.RatingViewType = com.edsancha.medallia.api.v0.models.RatingViewType.GradingSlider, description: _root_.scala.Option[String] = None ) extends ComponentUnion { override val componentUnionComponent: ComponentUnionComponent = ComponentUnionComponent.ComponentGrading0to10 } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param required Component required * @param label Component label * @param ratingViewType Rating View Type * @param description Component description */ final case class ComponentGrading1to10( index: Int, id: Int, uniqueName: String, required: Boolean, label: String, ratingViewType: com.edsancha.medallia.api.v0.models.RatingViewType = com.edsancha.medallia.api.v0.models.RatingViewType.GradingSlider, description: _root_.scala.Option[String] = None ) extends ComponentUnion { override val componentUnionComponent: ComponentUnionComponent = ComponentUnionComponent.ComponentGrading1to10 } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param imageObject Image Object uploaded to Medallia, if it's a copy of a previous survey this * field doesnt' show up * @param uploadedResource Image Object from a copied survey, it only shows when imageObject is not present */ final case class ComponentImage( index: Int, id: Int, uniqueName: String, imageObject: _root_.scala.Option[com.edsancha.medallia.api.v0.models.Image] = None, uploadedResource: _root_.scala.Option[com.edsancha.medallia.api.v0.models.Image] = None ) extends ComponentUnion { override val componentUnionComponent: ComponentUnionComponent = ComponentUnionComponent.ComponentImage } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param labelContent Label Content * @param numOfLines Label Number of Lines */ final case class ComponentLabel( index: Int, id: Int, uniqueName: String, labelContent: _root_.scala.Option[String] = None, numOfLines: Int = 2 ) extends ComponentUnion { override val componentUnionComponent: ComponentUnionComponent = ComponentUnionComponent.ComponentLabel } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param required Component required * @param label Component placeholder * @param description Component description * @param ratingViewType Rating View Type */ final case class ComponentNps( index: Int, id: Int, uniqueName: String, required: Boolean, label: String, description: _root_.scala.Option[String] = None, ratingViewType: com.edsancha.medallia.api.v0.models.RatingViewType = com.edsancha.medallia.api.v0.models.RatingViewType.Slide ) extends ComponentUnion { override val componentUnionComponent: ComponentUnionComponent = ComponentUnionComponent.ComponentNps } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param required Component required * @param label Component label * @param options Maximum number of characters * @param description Component description */ final case class ComponentRadioSelector( index: Int, id: Int, uniqueName: String, required: Boolean, label: String, options: Seq[String], description: _root_.scala.Option[String] = None ) extends ComponentUnion { override val componentUnionComponent: ComponentUnionComponent = ComponentUnionComponent.ComponentRadioSelector } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param required Component required * @param placeholder Component placeholder * @param label Component placeholder * @param numOfLines Number of lines, string parameter though (-‸ლ) * @param description Component description */ final case class ComponentTextArea( index: Int, id: Int, uniqueName: String, required: Boolean, placeholder: String, label: String, numOfLines: Int = 2, description: _root_.scala.Option[String] = None ) extends ComponentUnion { override val componentUnionComponent: ComponentUnionComponent = ComponentUnionComponent.ComponentTextArea } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param required Component required * @param placeholder Component placeholder * @param label Component label * @param maxChars Maximum number of characters * @param description Component description */ final case class ComponentTextInput( index: Int, id: Int, uniqueName: String, required: Boolean, placeholder: String, label: String, maxChars: Int = 200, description: _root_.scala.Option[String] = None ) extends ComponentUnion { override val componentUnionComponent: ComponentUnionComponent = ComponentUnionComponent.ComponentTextInput } /** * Configuration main object, including forms * * @param propertyId Account id * @param feedbackSubmitUrl url * @param forms Definition and configuration of forms that were created in the command center */ final case class Configuration( propertyId: Int, feedbackSubmitUrl: String, forms: Seq[com.edsancha.medallia.api.v0.models.Form] ) /** * @param index Component index * @param id Component id * @param required Component required * @param component Component type * @param uniqueName Component unique name * @param placeholder Component placeholder * @param label Component placeholder * @param description Component description * @param options Options available if required * @param imageObject Image if required */ final case class DynamicData( index: Int, id: Int, required: Boolean, component: String, uniqueName: String, placeholder: String, label: String, description: _root_.scala.Option[String] = None, options: _root_.scala.Option[Seq[String]] = None, imageObject: _root_.scala.Option[com.edsancha.medallia.api.v0.models.Image] = None ) /** * Feedback main object with survey's results * * @param formId The submitted form id (from the configuration). * @param dynamicData Survey Feedback Data */ final case class Feedback( formId: Int, dynamicData: com.edsancha.medallia.api.v0.models.FeedbackData ) /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param value Checkbox selected value * @param `type` Component feedback type */ final case class FeedbackCheckbox( index: Int, id: Int, uniqueName: String, value: Seq[Int], `type`: String = "checkbox" ) extends FeedbackUnion { override val feedbackUnionComponent: FeedbackUnionComponent = FeedbackUnionComponent.FeedbackCheckbox } /** * Object that will hold the form pages and custom parameters. * * @param customParams List of survey's pages results * @param pages List of survey's pages results */ final case class FeedbackData( customParams: _root_.scala.Option[_root_.io.circe.Json] = None, pages: Seq[com.edsancha.medallia.api.v0.models.FeedbackPage] ) /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param value Dropdown selected value * @param `type` Component feedback type */ final case class FeedbackDropdown( index: Int, id: Int, uniqueName: String, value: Int, `type`: String = "select" ) extends FeedbackUnion { override val feedbackUnionComponent: FeedbackUnionComponent = FeedbackUnionComponent.FeedbackDropdown } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param value Grading selected value * @param `type` Component feedback type */ final case class FeedbackGrading( index: Int, id: Int, uniqueName: String, value: Int, `type`: String = "grading" ) extends FeedbackUnion { override val feedbackUnionComponent: FeedbackUnionComponent = FeedbackUnionComponent.FeedbackGrading } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param value Grading selected value * @param `type` Component feedback type */ final case class FeedbackGrading0to10( index: Int, id: Int, uniqueName: String, value: Int, `type`: String = "grading0to10" ) extends FeedbackUnion { override val feedbackUnionComponent: FeedbackUnionComponent = FeedbackUnionComponent.FeedbackGrading0to10 } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param value Grading selected value * @param `type` Component feedback type */ final case class FeedbackGrading1to10( index: Int, id: Int, uniqueName: String, value: Int, `type`: String = "grading1to10" ) extends FeedbackUnion { override val feedbackUnionComponent: FeedbackUnionComponent = FeedbackUnionComponent.FeedbackGrading1to10 } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param value NPS selected value * @param `type` Component feedback type */ final case class FeedbackNps( index: Int, id: Int, uniqueName: String, value: Int, `type`: String = "nps" ) extends FeedbackUnion { override val feedbackUnionComponent: FeedbackUnionComponent = FeedbackUnionComponent.FeedbackNps } /** * Object that will hold the form page * * @param components List of survey's pages results */ final case class FeedbackPage( components: Seq[com.edsancha.medallia.api.v0.models.FeedbackUnion] ) /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param value Radio Selected Value * @param `type` Component feedback type */ final case class FeedbackRadioSelector( index: Int, id: Int, uniqueName: String, value: Int, `type`: String = "radio" ) extends FeedbackUnion { override val feedbackUnionComponent: FeedbackUnionComponent = FeedbackUnionComponent.FeedbackRadioSelector } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param value Text Area Content * @param `type` Component feedback type */ final case class FeedbackTextArea( index: Int, id: Int, uniqueName: String, value: String, `type`: String = "textArea" ) extends FeedbackUnion { override val feedbackUnionComponent: FeedbackUnionComponent = FeedbackUnionComponent.FeedbackTextArea } /** * @param index Component index * @param id Component id * @param uniqueName Unique name * @param value Text Area Content * @param `type` Component feedback type */ final case class FeedbackTextInput( index: Int, id: Int, uniqueName: String, value: String, `type`: String = "textInput" ) extends FeedbackUnion { override val feedbackUnionComponent: FeedbackUnionComponent = FeedbackUnionComponent.FeedbackTextInput } /** * @param formId Form Identifier * @param name Form name * @param title Form title * @param formType Form type * @param inviteData Invitation data * @param triggerData Invitation trigger conditions * @param formJson Wrapper around form data */ final case class Form( formId: Int, name: String, title: String, formType: com.edsancha.medallia.api.v0.models.FormType, inviteData: _root_.scala.Option[com.edsancha.medallia.api.v0.models.InviteData] = None, triggerData: _root_.scala.Option[com.edsancha.medallia.api.v0.models.TriggerData] = None, formJson: com.edsancha.medallia.api.v0.models.FormJson ) /** * @param pages Form Page */ final case class FormJson( pages: Seq[com.edsancha.medallia.api.v0.models.Page] ) /** * @param name Image Name * @param url Image Url */ final case class Image( name: String, url: String ) /** * @param invitationHeadline Invitation Headline * @param invitationText Invitation Text * @param provideButtonText Provide feedback button text * @param declineButtonText Decline provide feedback button text * @param laterButtonText Provide feedback later button text */ final case class InviteData( invitationHeadline: String, invitationText: String, provideButtonText: String, declineButtonText: String, laterButtonText: String ) /** * @param number Number of app sessions * @param compareString Compare String */ final case class NumberOfAppSession( number: String, compareString: com.edsancha.medallia.api.v0.models.CompareString ) /** * @param days Don't invite a visitor who submitted feedback in the past x days */ final case class NumberOfDays( days: String ) /** * @param name Page name * @param index Page index */ final case class Page( name: String, index: Int = 0, dynamicData: Seq[com.edsancha.medallia.api.v0.models.ComponentUnion] ) /** * @param prec Don't invite a visitor who submitted feedback in the past x days */ final case class PercentageOfSessions( prec: String ) /** * @param time Time in Foreground, in seconds * @param compareString Compare String */ final case class TimeInForeground( time: String, compareString: com.edsancha.medallia.api.v0.models.CompareString ) /** * @param numberOfAppSession Number of App Sessions to show the invite, with compare string * @param timeInForeground App Time in foreground in seconds to show the invite, with compare string * @param mobileappVersion Mobile App Versions * @param submitted Don't invite a visitor who submitted feedback in the past x days * @param declined Don't invite a visitor who declined an invitation in the past x days * @param mobileosVersion Mobile App Versions * @param percentageOfSessions Invite to this percentage of sessions * @param genericRule Set of generic rules creates in the invitation settings */ final case class TriggerData( numberOfAppSession: _root_.scala.Option[com.edsancha.medallia.api.v0.models.NumberOfAppSession] = None, timeInForeground: _root_.scala.Option[com.edsancha.medallia.api.v0.models.TimeInForeground] = None, mobileappVersion: _root_.scala.Option[Seq[String]] = None, submitted: _root_.scala.Option[com.edsancha.medallia.api.v0.models.NumberOfDays] = None, declined: _root_.scala.Option[com.edsancha.medallia.api.v0.models.NumberOfDays] = None, mobileosVersion: _root_.scala.Option[Seq[String]] = None, percentageOfSessions: _root_.scala.Option[com.edsancha.medallia.api.v0.models.PercentageOfSessions] = None, genericRule: _root_.scala.Option[String] = None ) /** * Provides future compatibility in clients - in the future, when a type is added * to the union ComponentUnion, it will need to be handled in the client code. This * implementation will deserialize these future types as an instance of this class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class ComponentUnionUndefinedType( description: String ) extends ComponentUnion { override val componentUnionComponent: ComponentUnionComponent = ComponentUnionComponent.UNDEFINED(description) } /** * Provides future compatibility in clients - in the future, when a type is added * to the union FeedbackUnion, it will need to be handled in the client code. This * implementation will deserialize these future types as an instance of this class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class FeedbackUnionUndefinedType( description: String ) extends FeedbackUnion { override val feedbackUnionComponent: FeedbackUnionComponent = FeedbackUnionComponent.UNDEFINED(description) } sealed trait CompareString extends _root_.scala.Product with _root_.scala.Serializable object CompareString { case object GreaterThan extends CompareString { override def toString = "greaterThan" } case object Equals extends CompareString { override def toString = "equals" } case object SmallerThan extends CompareString { override def toString = "smallerThan" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends CompareString /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[CompareString] = scala.List(GreaterThan, Equals, SmallerThan) private val byName: Map[String, CompareString] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): CompareString = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[CompareString] = byName.get(value.toLowerCase) } sealed trait FormType extends _root_.scala.Product with _root_.scala.Serializable object FormType { case object MobileInvitation extends FormType { override def toString = "mobileInvitation" } case object Code extends FormType { override def toString = "code" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends FormType /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[FormType] = scala.List(MobileInvitation, Code) private val byName: Map[String, FormType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): FormType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[FormType] = byName.get(value.toLowerCase) } sealed trait RatingViewType extends _root_.scala.Product with _root_.scala.Serializable object RatingViewType { case object Slide extends RatingViewType { override def toString = "slide" } case object NumbersSquare extends RatingViewType { override def toString = "numbersSquare" } case object GradingSlider extends RatingViewType { override def toString = "gradingSlider" } case object GradingDropdown extends RatingViewType { override def toString = "gradingDropdown" } case object Stars extends RatingViewType { override def toString = "stars" } case object Emoticons extends RatingViewType { override def toString = "emoticons" } case object Numbers extends RatingViewType { override def toString = "numbers" } case object Smilies extends RatingViewType { override def toString = "smilies" } case object Bars extends RatingViewType { override def toString = "bars" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends RatingViewType /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[RatingViewType] = scala.List(Slide, NumbersSquare, GradingSlider, GradingDropdown, Stars, Emoticons, Numbers, Smilies, Bars) private val byName: Map[String, RatingViewType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): RatingViewType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[RatingViewType] = byName.get(value.toLowerCase) } }