diff --git a/seed/go-fiber/bearer-token-environment-variable/.mock/definition/api.yml b/seed/go-fiber/bearer-token-environment-variable/.mock/definition/api.yml index 819d8807966..c5bfa0199c3 100644 --- a/seed/go-fiber/bearer-token-environment-variable/.mock/definition/api.yml +++ b/seed/go-fiber/bearer-token-environment-variable/.mock/definition/api.yml @@ -6,3 +6,7 @@ auth-schemes: token: name: apiKey env: COURIER_API_KEY +headers: + X-API-Version: + name: version + type: literal<"1.0.0"> diff --git a/seed/go-fiber/unions/.mock/definition/bigunion.yml b/seed/go-fiber/unions/.mock/definition/bigunion.yml new file mode 100644 index 00000000000..6302d0fc309 --- /dev/null +++ b/seed/go-fiber/unions/.mock/definition/bigunion.yml @@ -0,0 +1,176 @@ +types: + BigUnion: + base-properties: + id: string + created-at: datetime + archived-at: optional + union: + normalSweet: NormalSweet + thankfulFactor: ThankfulFactor + jumboEnd: JumboEnd + hastyPain: HastyPain + mistySnow: MistySnow + distinctFailure: DistinctFailure + practicalPrinciple: PracticalPrinciple + limpingStep: LimpingStep + vibrantExcitement: VibrantExcitement + activeDiamond: ActiveDiamond + popularLimit: PopularLimit + falseMirror: FalseMirror + primaryBlock: PrimaryBlock + rotatingRatio: RotatingRatio + colorfulCover: ColorfulCover + disloyalValue: DisloyalValue + gruesomeCoach: GruesomeCoach + totalWork: TotalWork + harmoniousPlay: HarmoniousPlay + uniqueStress: UniqueStress + unwillingSmoke: UnwillingSmoke + frozenSleep: FrozenSleep + diligentDeal: DiligentDeal + attractiveScript: AttractiveScript + hoarseMouse: HoarseMouse + circularCard: CircularCard + potableBad: PotableBad + triangularRepair: TriangularRepair + gaseousRoad: GaseousRoad + + NormalSweet: + properties: + value: string + + ThankfulFactor: + properties: + value: string + + JumboEnd: + properties: + value: string + + HastyPain: + properties: + value: string + + MistySnow: + properties: + value: string + + DistinctFailure: + properties: + value: string + + PracticalPrinciple: + properties: + value: string + + LimpingStep: + properties: + value: string + + VibrantExcitement: + properties: + value: string + + ActiveDiamond: + properties: + value: string + + PopularLimit: + properties: + value: string + + FalseMirror: + properties: + value: string + + PrimaryBlock: + properties: + value: string + + RotatingRatio: + properties: + value: string + + ColorfulCover: + properties: + value: string + + DisloyalValue: + properties: + value: string + + GruesomeCoach: + properties: + value: string + + TotalWork: + properties: + value: string + + HarmoniousPlay: + properties: + value: string + + UniqueStress: + properties: + value: string + + UnwillingSmoke: + properties: + value: string + + FrozenSleep: + properties: + value: string + + DiligentDeal: + properties: + value: string + + AttractiveScript: + properties: + value: string + + HoarseMouse: + properties: + value: string + + CircularCard: + properties: + value: string + + PotableBad: + properties: + value: string + + TriangularRepair: + properties: + value: string + + GaseousRoad: + properties: + value: string + +service: + auth: false + base-path: / + endpoints: + get: + path: /{id} + method: GET + path-parameters: + id: string + response: BigUnion + + update: + path: "" + method: PATCH + request: BigUnion + response: boolean + + update-many: + path: /many + method: PATCH + request: list + response: map + diff --git a/seed/go-fiber/unions/bigunion.go b/seed/go-fiber/unions/bigunion.go new file mode 100644 index 00000000000..84ce8fabdef --- /dev/null +++ b/seed/go-fiber/unions/bigunion.go @@ -0,0 +1,2000 @@ +// This file was auto-generated by Fern from our API Definition. + +package unions + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/unions/fern/internal" + time "time" +) + +type ActiveDiamond struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (a *ActiveDiamond) GetValue() string { + if a == nil { + return "" + } + return a.Value +} + +func (a *ActiveDiamond) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *ActiveDiamond) UnmarshalJSON(data []byte) error { + type unmarshaler ActiveDiamond + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = ActiveDiamond(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + return nil +} + +func (a *ActiveDiamond) String() string { + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AttractiveScript struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (a *AttractiveScript) GetValue() string { + if a == nil { + return "" + } + return a.Value +} + +func (a *AttractiveScript) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AttractiveScript) UnmarshalJSON(data []byte) error { + type unmarshaler AttractiveScript + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AttractiveScript(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + return nil +} + +func (a *AttractiveScript) String() string { + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type BigUnion struct { + Type string + Id string + CreatedAt time.Time + ArchivedAt *time.Time + NormalSweet *NormalSweet + ThankfulFactor *ThankfulFactor + JumboEnd *JumboEnd + HastyPain *HastyPain + MistySnow *MistySnow + DistinctFailure *DistinctFailure + PracticalPrinciple *PracticalPrinciple + LimpingStep *LimpingStep + VibrantExcitement *VibrantExcitement + ActiveDiamond *ActiveDiamond + PopularLimit *PopularLimit + FalseMirror *FalseMirror + PrimaryBlock *PrimaryBlock + RotatingRatio *RotatingRatio + ColorfulCover *ColorfulCover + DisloyalValue *DisloyalValue + GruesomeCoach *GruesomeCoach + TotalWork *TotalWork + HarmoniousPlay *HarmoniousPlay + UniqueStress *UniqueStress + UnwillingSmoke *UnwillingSmoke + FrozenSleep *FrozenSleep + DiligentDeal *DiligentDeal + AttractiveScript *AttractiveScript + HoarseMouse *HoarseMouse + CircularCard *CircularCard + PotableBad *PotableBad + TriangularRepair *TriangularRepair + GaseousRoad *GaseousRoad +} + +func NewBigUnionFromNormalSweet(value *NormalSweet) *BigUnion { + return &BigUnion{Type: "normalSweet", NormalSweet: value} +} + +func NewBigUnionFromThankfulFactor(value *ThankfulFactor) *BigUnion { + return &BigUnion{Type: "thankfulFactor", ThankfulFactor: value} +} + +func NewBigUnionFromJumboEnd(value *JumboEnd) *BigUnion { + return &BigUnion{Type: "jumboEnd", JumboEnd: value} +} + +func NewBigUnionFromHastyPain(value *HastyPain) *BigUnion { + return &BigUnion{Type: "hastyPain", HastyPain: value} +} + +func NewBigUnionFromMistySnow(value *MistySnow) *BigUnion { + return &BigUnion{Type: "mistySnow", MistySnow: value} +} + +func NewBigUnionFromDistinctFailure(value *DistinctFailure) *BigUnion { + return &BigUnion{Type: "distinctFailure", DistinctFailure: value} +} + +func NewBigUnionFromPracticalPrinciple(value *PracticalPrinciple) *BigUnion { + return &BigUnion{Type: "practicalPrinciple", PracticalPrinciple: value} +} + +func NewBigUnionFromLimpingStep(value *LimpingStep) *BigUnion { + return &BigUnion{Type: "limpingStep", LimpingStep: value} +} + +func NewBigUnionFromVibrantExcitement(value *VibrantExcitement) *BigUnion { + return &BigUnion{Type: "vibrantExcitement", VibrantExcitement: value} +} + +func NewBigUnionFromActiveDiamond(value *ActiveDiamond) *BigUnion { + return &BigUnion{Type: "activeDiamond", ActiveDiamond: value} +} + +func NewBigUnionFromPopularLimit(value *PopularLimit) *BigUnion { + return &BigUnion{Type: "popularLimit", PopularLimit: value} +} + +func NewBigUnionFromFalseMirror(value *FalseMirror) *BigUnion { + return &BigUnion{Type: "falseMirror", FalseMirror: value} +} + +func NewBigUnionFromPrimaryBlock(value *PrimaryBlock) *BigUnion { + return &BigUnion{Type: "primaryBlock", PrimaryBlock: value} +} + +func NewBigUnionFromRotatingRatio(value *RotatingRatio) *BigUnion { + return &BigUnion{Type: "rotatingRatio", RotatingRatio: value} +} + +func NewBigUnionFromColorfulCover(value *ColorfulCover) *BigUnion { + return &BigUnion{Type: "colorfulCover", ColorfulCover: value} +} + +func NewBigUnionFromDisloyalValue(value *DisloyalValue) *BigUnion { + return &BigUnion{Type: "disloyalValue", DisloyalValue: value} +} + +func NewBigUnionFromGruesomeCoach(value *GruesomeCoach) *BigUnion { + return &BigUnion{Type: "gruesomeCoach", GruesomeCoach: value} +} + +func NewBigUnionFromTotalWork(value *TotalWork) *BigUnion { + return &BigUnion{Type: "totalWork", TotalWork: value} +} + +func NewBigUnionFromHarmoniousPlay(value *HarmoniousPlay) *BigUnion { + return &BigUnion{Type: "harmoniousPlay", HarmoniousPlay: value} +} + +func NewBigUnionFromUniqueStress(value *UniqueStress) *BigUnion { + return &BigUnion{Type: "uniqueStress", UniqueStress: value} +} + +func NewBigUnionFromUnwillingSmoke(value *UnwillingSmoke) *BigUnion { + return &BigUnion{Type: "unwillingSmoke", UnwillingSmoke: value} +} + +func NewBigUnionFromFrozenSleep(value *FrozenSleep) *BigUnion { + return &BigUnion{Type: "frozenSleep", FrozenSleep: value} +} + +func NewBigUnionFromDiligentDeal(value *DiligentDeal) *BigUnion { + return &BigUnion{Type: "diligentDeal", DiligentDeal: value} +} + +func NewBigUnionFromAttractiveScript(value *AttractiveScript) *BigUnion { + return &BigUnion{Type: "attractiveScript", AttractiveScript: value} +} + +func NewBigUnionFromHoarseMouse(value *HoarseMouse) *BigUnion { + return &BigUnion{Type: "hoarseMouse", HoarseMouse: value} +} + +func NewBigUnionFromCircularCard(value *CircularCard) *BigUnion { + return &BigUnion{Type: "circularCard", CircularCard: value} +} + +func NewBigUnionFromPotableBad(value *PotableBad) *BigUnion { + return &BigUnion{Type: "potableBad", PotableBad: value} +} + +func NewBigUnionFromTriangularRepair(value *TriangularRepair) *BigUnion { + return &BigUnion{Type: "triangularRepair", TriangularRepair: value} +} + +func NewBigUnionFromGaseousRoad(value *GaseousRoad) *BigUnion { + return &BigUnion{Type: "gaseousRoad", GaseousRoad: value} +} + +func (b *BigUnion) GetType() string { + if b == nil { + return "" + } + return b.Type +} + +func (b *BigUnion) GetId() string { + if b == nil { + return "" + } + return b.Id +} + +func (b *BigUnion) GetCreatedAt() time.Time { + if b == nil { + return time.Time{} + } + return b.CreatedAt +} + +func (b *BigUnion) GetArchivedAt() *time.Time { + if b == nil { + return nil + } + return b.ArchivedAt +} + +func (b *BigUnion) GetNormalSweet() *NormalSweet { + if b == nil { + return nil + } + return b.NormalSweet +} + +func (b *BigUnion) GetThankfulFactor() *ThankfulFactor { + if b == nil { + return nil + } + return b.ThankfulFactor +} + +func (b *BigUnion) GetJumboEnd() *JumboEnd { + if b == nil { + return nil + } + return b.JumboEnd +} + +func (b *BigUnion) GetHastyPain() *HastyPain { + if b == nil { + return nil + } + return b.HastyPain +} + +func (b *BigUnion) GetMistySnow() *MistySnow { + if b == nil { + return nil + } + return b.MistySnow +} + +func (b *BigUnion) GetDistinctFailure() *DistinctFailure { + if b == nil { + return nil + } + return b.DistinctFailure +} + +func (b *BigUnion) GetPracticalPrinciple() *PracticalPrinciple { + if b == nil { + return nil + } + return b.PracticalPrinciple +} + +func (b *BigUnion) GetLimpingStep() *LimpingStep { + if b == nil { + return nil + } + return b.LimpingStep +} + +func (b *BigUnion) GetVibrantExcitement() *VibrantExcitement { + if b == nil { + return nil + } + return b.VibrantExcitement +} + +func (b *BigUnion) GetActiveDiamond() *ActiveDiamond { + if b == nil { + return nil + } + return b.ActiveDiamond +} + +func (b *BigUnion) GetPopularLimit() *PopularLimit { + if b == nil { + return nil + } + return b.PopularLimit +} + +func (b *BigUnion) GetFalseMirror() *FalseMirror { + if b == nil { + return nil + } + return b.FalseMirror +} + +func (b *BigUnion) GetPrimaryBlock() *PrimaryBlock { + if b == nil { + return nil + } + return b.PrimaryBlock +} + +func (b *BigUnion) GetRotatingRatio() *RotatingRatio { + if b == nil { + return nil + } + return b.RotatingRatio +} + +func (b *BigUnion) GetColorfulCover() *ColorfulCover { + if b == nil { + return nil + } + return b.ColorfulCover +} + +func (b *BigUnion) GetDisloyalValue() *DisloyalValue { + if b == nil { + return nil + } + return b.DisloyalValue +} + +func (b *BigUnion) GetGruesomeCoach() *GruesomeCoach { + if b == nil { + return nil + } + return b.GruesomeCoach +} + +func (b *BigUnion) GetTotalWork() *TotalWork { + if b == nil { + return nil + } + return b.TotalWork +} + +func (b *BigUnion) GetHarmoniousPlay() *HarmoniousPlay { + if b == nil { + return nil + } + return b.HarmoniousPlay +} + +func (b *BigUnion) GetUniqueStress() *UniqueStress { + if b == nil { + return nil + } + return b.UniqueStress +} + +func (b *BigUnion) GetUnwillingSmoke() *UnwillingSmoke { + if b == nil { + return nil + } + return b.UnwillingSmoke +} + +func (b *BigUnion) GetFrozenSleep() *FrozenSleep { + if b == nil { + return nil + } + return b.FrozenSleep +} + +func (b *BigUnion) GetDiligentDeal() *DiligentDeal { + if b == nil { + return nil + } + return b.DiligentDeal +} + +func (b *BigUnion) GetAttractiveScript() *AttractiveScript { + if b == nil { + return nil + } + return b.AttractiveScript +} + +func (b *BigUnion) GetHoarseMouse() *HoarseMouse { + if b == nil { + return nil + } + return b.HoarseMouse +} + +func (b *BigUnion) GetCircularCard() *CircularCard { + if b == nil { + return nil + } + return b.CircularCard +} + +func (b *BigUnion) GetPotableBad() *PotableBad { + if b == nil { + return nil + } + return b.PotableBad +} + +func (b *BigUnion) GetTriangularRepair() *TriangularRepair { + if b == nil { + return nil + } + return b.TriangularRepair +} + +func (b *BigUnion) GetGaseousRoad() *GaseousRoad { + if b == nil { + return nil + } + return b.GaseousRoad +} + +func (b *BigUnion) UnmarshalJSON(data []byte) error { + var unmarshaler struct { + Type string `json:"type"` + Id string `json:"id"` + CreatedAt time.Time `json:"created-at"` + ArchivedAt *time.Time `json:"archived-at,omitempty"` + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + b.Type = unmarshaler.Type + b.Id = unmarshaler.Id + b.CreatedAt = unmarshaler.CreatedAt + b.ArchivedAt = unmarshaler.ArchivedAt + if unmarshaler.Type == "" { + return fmt.Errorf("%T did not include discriminant type", b) + } + switch unmarshaler.Type { + case "normalSweet": + value := new(NormalSweet) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.NormalSweet = value + case "thankfulFactor": + value := new(ThankfulFactor) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.ThankfulFactor = value + case "jumboEnd": + value := new(JumboEnd) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.JumboEnd = value + case "hastyPain": + value := new(HastyPain) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.HastyPain = value + case "mistySnow": + value := new(MistySnow) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.MistySnow = value + case "distinctFailure": + value := new(DistinctFailure) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.DistinctFailure = value + case "practicalPrinciple": + value := new(PracticalPrinciple) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.PracticalPrinciple = value + case "limpingStep": + value := new(LimpingStep) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.LimpingStep = value + case "vibrantExcitement": + value := new(VibrantExcitement) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.VibrantExcitement = value + case "activeDiamond": + value := new(ActiveDiamond) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.ActiveDiamond = value + case "popularLimit": + value := new(PopularLimit) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.PopularLimit = value + case "falseMirror": + value := new(FalseMirror) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.FalseMirror = value + case "primaryBlock": + value := new(PrimaryBlock) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.PrimaryBlock = value + case "rotatingRatio": + value := new(RotatingRatio) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.RotatingRatio = value + case "colorfulCover": + value := new(ColorfulCover) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.ColorfulCover = value + case "disloyalValue": + value := new(DisloyalValue) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.DisloyalValue = value + case "gruesomeCoach": + value := new(GruesomeCoach) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.GruesomeCoach = value + case "totalWork": + value := new(TotalWork) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.TotalWork = value + case "harmoniousPlay": + value := new(HarmoniousPlay) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.HarmoniousPlay = value + case "uniqueStress": + value := new(UniqueStress) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.UniqueStress = value + case "unwillingSmoke": + value := new(UnwillingSmoke) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.UnwillingSmoke = value + case "frozenSleep": + value := new(FrozenSleep) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.FrozenSleep = value + case "diligentDeal": + value := new(DiligentDeal) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.DiligentDeal = value + case "attractiveScript": + value := new(AttractiveScript) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.AttractiveScript = value + case "hoarseMouse": + value := new(HoarseMouse) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.HoarseMouse = value + case "circularCard": + value := new(CircularCard) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.CircularCard = value + case "potableBad": + value := new(PotableBad) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.PotableBad = value + case "triangularRepair": + value := new(TriangularRepair) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.TriangularRepair = value + case "gaseousRoad": + value := new(GaseousRoad) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + b.GaseousRoad = value + } + return nil +} + +func (b BigUnion) MarshalJSON() ([]byte, error) { + if err := b.validate(); err != nil { + return nil, err + } + switch b.Type { + default: + return nil, fmt.Errorf("invalid type %s in %T", b.Type, b) + case "normalSweet": + return internal.MarshalJSONWithExtraProperty(b.NormalSweet, "type", "normalSweet") + case "thankfulFactor": + return internal.MarshalJSONWithExtraProperty(b.ThankfulFactor, "type", "thankfulFactor") + case "jumboEnd": + return internal.MarshalJSONWithExtraProperty(b.JumboEnd, "type", "jumboEnd") + case "hastyPain": + return internal.MarshalJSONWithExtraProperty(b.HastyPain, "type", "hastyPain") + case "mistySnow": + return internal.MarshalJSONWithExtraProperty(b.MistySnow, "type", "mistySnow") + case "distinctFailure": + return internal.MarshalJSONWithExtraProperty(b.DistinctFailure, "type", "distinctFailure") + case "practicalPrinciple": + return internal.MarshalJSONWithExtraProperty(b.PracticalPrinciple, "type", "practicalPrinciple") + case "limpingStep": + return internal.MarshalJSONWithExtraProperty(b.LimpingStep, "type", "limpingStep") + case "vibrantExcitement": + return internal.MarshalJSONWithExtraProperty(b.VibrantExcitement, "type", "vibrantExcitement") + case "activeDiamond": + return internal.MarshalJSONWithExtraProperty(b.ActiveDiamond, "type", "activeDiamond") + case "popularLimit": + return internal.MarshalJSONWithExtraProperty(b.PopularLimit, "type", "popularLimit") + case "falseMirror": + return internal.MarshalJSONWithExtraProperty(b.FalseMirror, "type", "falseMirror") + case "primaryBlock": + return internal.MarshalJSONWithExtraProperty(b.PrimaryBlock, "type", "primaryBlock") + case "rotatingRatio": + return internal.MarshalJSONWithExtraProperty(b.RotatingRatio, "type", "rotatingRatio") + case "colorfulCover": + return internal.MarshalJSONWithExtraProperty(b.ColorfulCover, "type", "colorfulCover") + case "disloyalValue": + return internal.MarshalJSONWithExtraProperty(b.DisloyalValue, "type", "disloyalValue") + case "gruesomeCoach": + return internal.MarshalJSONWithExtraProperty(b.GruesomeCoach, "type", "gruesomeCoach") + case "totalWork": + return internal.MarshalJSONWithExtraProperty(b.TotalWork, "type", "totalWork") + case "harmoniousPlay": + return internal.MarshalJSONWithExtraProperty(b.HarmoniousPlay, "type", "harmoniousPlay") + case "uniqueStress": + return internal.MarshalJSONWithExtraProperty(b.UniqueStress, "type", "uniqueStress") + case "unwillingSmoke": + return internal.MarshalJSONWithExtraProperty(b.UnwillingSmoke, "type", "unwillingSmoke") + case "frozenSleep": + return internal.MarshalJSONWithExtraProperty(b.FrozenSleep, "type", "frozenSleep") + case "diligentDeal": + return internal.MarshalJSONWithExtraProperty(b.DiligentDeal, "type", "diligentDeal") + case "attractiveScript": + return internal.MarshalJSONWithExtraProperty(b.AttractiveScript, "type", "attractiveScript") + case "hoarseMouse": + return internal.MarshalJSONWithExtraProperty(b.HoarseMouse, "type", "hoarseMouse") + case "circularCard": + return internal.MarshalJSONWithExtraProperty(b.CircularCard, "type", "circularCard") + case "potableBad": + return internal.MarshalJSONWithExtraProperty(b.PotableBad, "type", "potableBad") + case "triangularRepair": + return internal.MarshalJSONWithExtraProperty(b.TriangularRepair, "type", "triangularRepair") + case "gaseousRoad": + return internal.MarshalJSONWithExtraProperty(b.GaseousRoad, "type", "gaseousRoad") + } +} + +type BigUnionVisitor interface { + VisitNormalSweet(*NormalSweet) error + VisitThankfulFactor(*ThankfulFactor) error + VisitJumboEnd(*JumboEnd) error + VisitHastyPain(*HastyPain) error + VisitMistySnow(*MistySnow) error + VisitDistinctFailure(*DistinctFailure) error + VisitPracticalPrinciple(*PracticalPrinciple) error + VisitLimpingStep(*LimpingStep) error + VisitVibrantExcitement(*VibrantExcitement) error + VisitActiveDiamond(*ActiveDiamond) error + VisitPopularLimit(*PopularLimit) error + VisitFalseMirror(*FalseMirror) error + VisitPrimaryBlock(*PrimaryBlock) error + VisitRotatingRatio(*RotatingRatio) error + VisitColorfulCover(*ColorfulCover) error + VisitDisloyalValue(*DisloyalValue) error + VisitGruesomeCoach(*GruesomeCoach) error + VisitTotalWork(*TotalWork) error + VisitHarmoniousPlay(*HarmoniousPlay) error + VisitUniqueStress(*UniqueStress) error + VisitUnwillingSmoke(*UnwillingSmoke) error + VisitFrozenSleep(*FrozenSleep) error + VisitDiligentDeal(*DiligentDeal) error + VisitAttractiveScript(*AttractiveScript) error + VisitHoarseMouse(*HoarseMouse) error + VisitCircularCard(*CircularCard) error + VisitPotableBad(*PotableBad) error + VisitTriangularRepair(*TriangularRepair) error + VisitGaseousRoad(*GaseousRoad) error +} + +func (b *BigUnion) Accept(visitor BigUnionVisitor) error { + switch b.Type { + default: + return fmt.Errorf("invalid type %s in %T", b.Type, b) + case "normalSweet": + return visitor.VisitNormalSweet(b.NormalSweet) + case "thankfulFactor": + return visitor.VisitThankfulFactor(b.ThankfulFactor) + case "jumboEnd": + return visitor.VisitJumboEnd(b.JumboEnd) + case "hastyPain": + return visitor.VisitHastyPain(b.HastyPain) + case "mistySnow": + return visitor.VisitMistySnow(b.MistySnow) + case "distinctFailure": + return visitor.VisitDistinctFailure(b.DistinctFailure) + case "practicalPrinciple": + return visitor.VisitPracticalPrinciple(b.PracticalPrinciple) + case "limpingStep": + return visitor.VisitLimpingStep(b.LimpingStep) + case "vibrantExcitement": + return visitor.VisitVibrantExcitement(b.VibrantExcitement) + case "activeDiamond": + return visitor.VisitActiveDiamond(b.ActiveDiamond) + case "popularLimit": + return visitor.VisitPopularLimit(b.PopularLimit) + case "falseMirror": + return visitor.VisitFalseMirror(b.FalseMirror) + case "primaryBlock": + return visitor.VisitPrimaryBlock(b.PrimaryBlock) + case "rotatingRatio": + return visitor.VisitRotatingRatio(b.RotatingRatio) + case "colorfulCover": + return visitor.VisitColorfulCover(b.ColorfulCover) + case "disloyalValue": + return visitor.VisitDisloyalValue(b.DisloyalValue) + case "gruesomeCoach": + return visitor.VisitGruesomeCoach(b.GruesomeCoach) + case "totalWork": + return visitor.VisitTotalWork(b.TotalWork) + case "harmoniousPlay": + return visitor.VisitHarmoniousPlay(b.HarmoniousPlay) + case "uniqueStress": + return visitor.VisitUniqueStress(b.UniqueStress) + case "unwillingSmoke": + return visitor.VisitUnwillingSmoke(b.UnwillingSmoke) + case "frozenSleep": + return visitor.VisitFrozenSleep(b.FrozenSleep) + case "diligentDeal": + return visitor.VisitDiligentDeal(b.DiligentDeal) + case "attractiveScript": + return visitor.VisitAttractiveScript(b.AttractiveScript) + case "hoarseMouse": + return visitor.VisitHoarseMouse(b.HoarseMouse) + case "circularCard": + return visitor.VisitCircularCard(b.CircularCard) + case "potableBad": + return visitor.VisitPotableBad(b.PotableBad) + case "triangularRepair": + return visitor.VisitTriangularRepair(b.TriangularRepair) + case "gaseousRoad": + return visitor.VisitGaseousRoad(b.GaseousRoad) + } +} + +func (b *BigUnion) validate() error { + if b == nil { + return fmt.Errorf("type %T is nil", b) + } + var fields []string + if b.NormalSweet != nil { + fields = append(fields, "normalSweet") + } + if b.ThankfulFactor != nil { + fields = append(fields, "thankfulFactor") + } + if b.JumboEnd != nil { + fields = append(fields, "jumboEnd") + } + if b.HastyPain != nil { + fields = append(fields, "hastyPain") + } + if b.MistySnow != nil { + fields = append(fields, "mistySnow") + } + if b.DistinctFailure != nil { + fields = append(fields, "distinctFailure") + } + if b.PracticalPrinciple != nil { + fields = append(fields, "practicalPrinciple") + } + if b.LimpingStep != nil { + fields = append(fields, "limpingStep") + } + if b.VibrantExcitement != nil { + fields = append(fields, "vibrantExcitement") + } + if b.ActiveDiamond != nil { + fields = append(fields, "activeDiamond") + } + if b.PopularLimit != nil { + fields = append(fields, "popularLimit") + } + if b.FalseMirror != nil { + fields = append(fields, "falseMirror") + } + if b.PrimaryBlock != nil { + fields = append(fields, "primaryBlock") + } + if b.RotatingRatio != nil { + fields = append(fields, "rotatingRatio") + } + if b.ColorfulCover != nil { + fields = append(fields, "colorfulCover") + } + if b.DisloyalValue != nil { + fields = append(fields, "disloyalValue") + } + if b.GruesomeCoach != nil { + fields = append(fields, "gruesomeCoach") + } + if b.TotalWork != nil { + fields = append(fields, "totalWork") + } + if b.HarmoniousPlay != nil { + fields = append(fields, "harmoniousPlay") + } + if b.UniqueStress != nil { + fields = append(fields, "uniqueStress") + } + if b.UnwillingSmoke != nil { + fields = append(fields, "unwillingSmoke") + } + if b.FrozenSleep != nil { + fields = append(fields, "frozenSleep") + } + if b.DiligentDeal != nil { + fields = append(fields, "diligentDeal") + } + if b.AttractiveScript != nil { + fields = append(fields, "attractiveScript") + } + if b.HoarseMouse != nil { + fields = append(fields, "hoarseMouse") + } + if b.CircularCard != nil { + fields = append(fields, "circularCard") + } + if b.PotableBad != nil { + fields = append(fields, "potableBad") + } + if b.TriangularRepair != nil { + fields = append(fields, "triangularRepair") + } + if b.GaseousRoad != nil { + fields = append(fields, "gaseousRoad") + } + if len(fields) == 0 { + if b.Type != "" { + return fmt.Errorf("type %T defines a discriminant set to %q but the field is not set", b, b.Type) + } + return fmt.Errorf("type %T is empty", b) + } + if len(fields) > 1 { + return fmt.Errorf("type %T defines values for %s, but only one value is allowed", b, fields) + } + if b.Type != "" { + field := fields[0] + if b.Type != field { + return fmt.Errorf( + "type %T defines a discriminant set to %q, but it does not match the %T field; either remove or update the discriminant to match", + b, + b.Type, + b, + ) + } + } + return nil +} + +type CircularCard struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (c *CircularCard) GetValue() string { + if c == nil { + return "" + } + return c.Value +} + +func (c *CircularCard) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CircularCard) UnmarshalJSON(data []byte) error { + type unmarshaler CircularCard + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CircularCard(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + return nil +} + +func (c *CircularCard) String() string { + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type ColorfulCover struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (c *ColorfulCover) GetValue() string { + if c == nil { + return "" + } + return c.Value +} + +func (c *ColorfulCover) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *ColorfulCover) UnmarshalJSON(data []byte) error { + type unmarshaler ColorfulCover + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = ColorfulCover(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + return nil +} + +func (c *ColorfulCover) String() string { + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type DiligentDeal struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (d *DiligentDeal) GetValue() string { + if d == nil { + return "" + } + return d.Value +} + +func (d *DiligentDeal) GetExtraProperties() map[string]interface{} { + return d.extraProperties +} + +func (d *DiligentDeal) UnmarshalJSON(data []byte) error { + type unmarshaler DiligentDeal + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *d = DiligentDeal(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + return nil +} + +func (d *DiligentDeal) String() string { + if value, err := internal.StringifyJSON(d); err == nil { + return value + } + return fmt.Sprintf("%#v", d) +} + +type DisloyalValue struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (d *DisloyalValue) GetValue() string { + if d == nil { + return "" + } + return d.Value +} + +func (d *DisloyalValue) GetExtraProperties() map[string]interface{} { + return d.extraProperties +} + +func (d *DisloyalValue) UnmarshalJSON(data []byte) error { + type unmarshaler DisloyalValue + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *d = DisloyalValue(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + return nil +} + +func (d *DisloyalValue) String() string { + if value, err := internal.StringifyJSON(d); err == nil { + return value + } + return fmt.Sprintf("%#v", d) +} + +type DistinctFailure struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (d *DistinctFailure) GetValue() string { + if d == nil { + return "" + } + return d.Value +} + +func (d *DistinctFailure) GetExtraProperties() map[string]interface{} { + return d.extraProperties +} + +func (d *DistinctFailure) UnmarshalJSON(data []byte) error { + type unmarshaler DistinctFailure + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *d = DistinctFailure(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + return nil +} + +func (d *DistinctFailure) String() string { + if value, err := internal.StringifyJSON(d); err == nil { + return value + } + return fmt.Sprintf("%#v", d) +} + +type FalseMirror struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (f *FalseMirror) GetValue() string { + if f == nil { + return "" + } + return f.Value +} + +func (f *FalseMirror) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FalseMirror) UnmarshalJSON(data []byte) error { + type unmarshaler FalseMirror + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FalseMirror(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + return nil +} + +func (f *FalseMirror) String() string { + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FrozenSleep struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (f *FrozenSleep) GetValue() string { + if f == nil { + return "" + } + return f.Value +} + +func (f *FrozenSleep) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FrozenSleep) UnmarshalJSON(data []byte) error { + type unmarshaler FrozenSleep + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FrozenSleep(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + return nil +} + +func (f *FrozenSleep) String() string { + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type GaseousRoad struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (g *GaseousRoad) GetValue() string { + if g == nil { + return "" + } + return g.Value +} + +func (g *GaseousRoad) GetExtraProperties() map[string]interface{} { + return g.extraProperties +} + +func (g *GaseousRoad) UnmarshalJSON(data []byte) error { + type unmarshaler GaseousRoad + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *g = GaseousRoad(value) + extraProperties, err := internal.ExtractExtraProperties(data, *g) + if err != nil { + return err + } + g.extraProperties = extraProperties + return nil +} + +func (g *GaseousRoad) String() string { + if value, err := internal.StringifyJSON(g); err == nil { + return value + } + return fmt.Sprintf("%#v", g) +} + +type GruesomeCoach struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (g *GruesomeCoach) GetValue() string { + if g == nil { + return "" + } + return g.Value +} + +func (g *GruesomeCoach) GetExtraProperties() map[string]interface{} { + return g.extraProperties +} + +func (g *GruesomeCoach) UnmarshalJSON(data []byte) error { + type unmarshaler GruesomeCoach + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *g = GruesomeCoach(value) + extraProperties, err := internal.ExtractExtraProperties(data, *g) + if err != nil { + return err + } + g.extraProperties = extraProperties + return nil +} + +func (g *GruesomeCoach) String() string { + if value, err := internal.StringifyJSON(g); err == nil { + return value + } + return fmt.Sprintf("%#v", g) +} + +type HarmoniousPlay struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (h *HarmoniousPlay) GetValue() string { + if h == nil { + return "" + } + return h.Value +} + +func (h *HarmoniousPlay) GetExtraProperties() map[string]interface{} { + return h.extraProperties +} + +func (h *HarmoniousPlay) UnmarshalJSON(data []byte) error { + type unmarshaler HarmoniousPlay + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *h = HarmoniousPlay(value) + extraProperties, err := internal.ExtractExtraProperties(data, *h) + if err != nil { + return err + } + h.extraProperties = extraProperties + return nil +} + +func (h *HarmoniousPlay) String() string { + if value, err := internal.StringifyJSON(h); err == nil { + return value + } + return fmt.Sprintf("%#v", h) +} + +type HastyPain struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (h *HastyPain) GetValue() string { + if h == nil { + return "" + } + return h.Value +} + +func (h *HastyPain) GetExtraProperties() map[string]interface{} { + return h.extraProperties +} + +func (h *HastyPain) UnmarshalJSON(data []byte) error { + type unmarshaler HastyPain + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *h = HastyPain(value) + extraProperties, err := internal.ExtractExtraProperties(data, *h) + if err != nil { + return err + } + h.extraProperties = extraProperties + return nil +} + +func (h *HastyPain) String() string { + if value, err := internal.StringifyJSON(h); err == nil { + return value + } + return fmt.Sprintf("%#v", h) +} + +type HoarseMouse struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (h *HoarseMouse) GetValue() string { + if h == nil { + return "" + } + return h.Value +} + +func (h *HoarseMouse) GetExtraProperties() map[string]interface{} { + return h.extraProperties +} + +func (h *HoarseMouse) UnmarshalJSON(data []byte) error { + type unmarshaler HoarseMouse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *h = HoarseMouse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *h) + if err != nil { + return err + } + h.extraProperties = extraProperties + return nil +} + +func (h *HoarseMouse) String() string { + if value, err := internal.StringifyJSON(h); err == nil { + return value + } + return fmt.Sprintf("%#v", h) +} + +type JumboEnd struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (j *JumboEnd) GetValue() string { + if j == nil { + return "" + } + return j.Value +} + +func (j *JumboEnd) GetExtraProperties() map[string]interface{} { + return j.extraProperties +} + +func (j *JumboEnd) UnmarshalJSON(data []byte) error { + type unmarshaler JumboEnd + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *j = JumboEnd(value) + extraProperties, err := internal.ExtractExtraProperties(data, *j) + if err != nil { + return err + } + j.extraProperties = extraProperties + return nil +} + +func (j *JumboEnd) String() string { + if value, err := internal.StringifyJSON(j); err == nil { + return value + } + return fmt.Sprintf("%#v", j) +} + +type LimpingStep struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (l *LimpingStep) GetValue() string { + if l == nil { + return "" + } + return l.Value +} + +func (l *LimpingStep) GetExtraProperties() map[string]interface{} { + return l.extraProperties +} + +func (l *LimpingStep) UnmarshalJSON(data []byte) error { + type unmarshaler LimpingStep + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *l = LimpingStep(value) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + return nil +} + +func (l *LimpingStep) String() string { + if value, err := internal.StringifyJSON(l); err == nil { + return value + } + return fmt.Sprintf("%#v", l) +} + +type MistySnow struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (m *MistySnow) GetValue() string { + if m == nil { + return "" + } + return m.Value +} + +func (m *MistySnow) GetExtraProperties() map[string]interface{} { + return m.extraProperties +} + +func (m *MistySnow) UnmarshalJSON(data []byte) error { + type unmarshaler MistySnow + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *m = MistySnow(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + return nil +} + +func (m *MistySnow) String() string { + if value, err := internal.StringifyJSON(m); err == nil { + return value + } + return fmt.Sprintf("%#v", m) +} + +type NormalSweet struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (n *NormalSweet) GetValue() string { + if n == nil { + return "" + } + return n.Value +} + +func (n *NormalSweet) GetExtraProperties() map[string]interface{} { + return n.extraProperties +} + +func (n *NormalSweet) UnmarshalJSON(data []byte) error { + type unmarshaler NormalSweet + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *n = NormalSweet(value) + extraProperties, err := internal.ExtractExtraProperties(data, *n) + if err != nil { + return err + } + n.extraProperties = extraProperties + return nil +} + +func (n *NormalSweet) String() string { + if value, err := internal.StringifyJSON(n); err == nil { + return value + } + return fmt.Sprintf("%#v", n) +} + +type PopularLimit struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (p *PopularLimit) GetValue() string { + if p == nil { + return "" + } + return p.Value +} + +func (p *PopularLimit) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PopularLimit) UnmarshalJSON(data []byte) error { + type unmarshaler PopularLimit + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PopularLimit(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + return nil +} + +func (p *PopularLimit) String() string { + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +type PotableBad struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (p *PotableBad) GetValue() string { + if p == nil { + return "" + } + return p.Value +} + +func (p *PotableBad) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PotableBad) UnmarshalJSON(data []byte) error { + type unmarshaler PotableBad + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PotableBad(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + return nil +} + +func (p *PotableBad) String() string { + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +type PracticalPrinciple struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (p *PracticalPrinciple) GetValue() string { + if p == nil { + return "" + } + return p.Value +} + +func (p *PracticalPrinciple) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PracticalPrinciple) UnmarshalJSON(data []byte) error { + type unmarshaler PracticalPrinciple + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PracticalPrinciple(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + return nil +} + +func (p *PracticalPrinciple) String() string { + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +type PrimaryBlock struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (p *PrimaryBlock) GetValue() string { + if p == nil { + return "" + } + return p.Value +} + +func (p *PrimaryBlock) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PrimaryBlock) UnmarshalJSON(data []byte) error { + type unmarshaler PrimaryBlock + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PrimaryBlock(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + return nil +} + +func (p *PrimaryBlock) String() string { + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +type RotatingRatio struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (r *RotatingRatio) GetValue() string { + if r == nil { + return "" + } + return r.Value +} + +func (r *RotatingRatio) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RotatingRatio) UnmarshalJSON(data []byte) error { + type unmarshaler RotatingRatio + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RotatingRatio(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + return nil +} + +func (r *RotatingRatio) String() string { + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type ThankfulFactor struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (t *ThankfulFactor) GetValue() string { + if t == nil { + return "" + } + return t.Value +} + +func (t *ThankfulFactor) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *ThankfulFactor) UnmarshalJSON(data []byte) error { + type unmarshaler ThankfulFactor + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *t = ThankfulFactor(value) + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + return nil +} + +func (t *ThankfulFactor) String() string { + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +type TotalWork struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (t *TotalWork) GetValue() string { + if t == nil { + return "" + } + return t.Value +} + +func (t *TotalWork) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TotalWork) UnmarshalJSON(data []byte) error { + type unmarshaler TotalWork + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *t = TotalWork(value) + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + return nil +} + +func (t *TotalWork) String() string { + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +type TriangularRepair struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (t *TriangularRepair) GetValue() string { + if t == nil { + return "" + } + return t.Value +} + +func (t *TriangularRepair) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TriangularRepair) UnmarshalJSON(data []byte) error { + type unmarshaler TriangularRepair + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *t = TriangularRepair(value) + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + return nil +} + +func (t *TriangularRepair) String() string { + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +type UniqueStress struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (u *UniqueStress) GetValue() string { + if u == nil { + return "" + } + return u.Value +} + +func (u *UniqueStress) GetExtraProperties() map[string]interface{} { + return u.extraProperties +} + +func (u *UniqueStress) UnmarshalJSON(data []byte) error { + type unmarshaler UniqueStress + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *u = UniqueStress(value) + extraProperties, err := internal.ExtractExtraProperties(data, *u) + if err != nil { + return err + } + u.extraProperties = extraProperties + return nil +} + +func (u *UniqueStress) String() string { + if value, err := internal.StringifyJSON(u); err == nil { + return value + } + return fmt.Sprintf("%#v", u) +} + +type UnwillingSmoke struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (u *UnwillingSmoke) GetValue() string { + if u == nil { + return "" + } + return u.Value +} + +func (u *UnwillingSmoke) GetExtraProperties() map[string]interface{} { + return u.extraProperties +} + +func (u *UnwillingSmoke) UnmarshalJSON(data []byte) error { + type unmarshaler UnwillingSmoke + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *u = UnwillingSmoke(value) + extraProperties, err := internal.ExtractExtraProperties(data, *u) + if err != nil { + return err + } + u.extraProperties = extraProperties + return nil +} + +func (u *UnwillingSmoke) String() string { + if value, err := internal.StringifyJSON(u); err == nil { + return value + } + return fmt.Sprintf("%#v", u) +} + +type VibrantExcitement struct { + Value string `json:"value" url:"value"` + + extraProperties map[string]interface{} +} + +func (v *VibrantExcitement) GetValue() string { + if v == nil { + return "" + } + return v.Value +} + +func (v *VibrantExcitement) GetExtraProperties() map[string]interface{} { + return v.extraProperties +} + +func (v *VibrantExcitement) UnmarshalJSON(data []byte) error { + type unmarshaler VibrantExcitement + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *v = VibrantExcitement(value) + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { + return err + } + v.extraProperties = extraProperties + return nil +} + +func (v *VibrantExcitement) String() string { + if value, err := internal.StringifyJSON(v); err == nil { + return value + } + return fmt.Sprintf("%#v", v) +}