diff --git a/pkg/api/oas_json_gen.go b/pkg/api/oas_json_gen.go index 1fec134..bd971cb 100644 --- a/pkg/api/oas_json_gen.go +++ b/pkg/api/oas_json_gen.go @@ -1497,6 +1497,18 @@ func (s *Submission) encodeFields(e *jx.Encoder) { e.FieldStart("AssetVersion") e.Int64(s.AssetVersion) } + { + if s.ValidatedAssetID.Set { + e.FieldStart("ValidatedAssetID") + s.ValidatedAssetID.Encode(e) + } + } + { + if s.ValidatedAssetVersion.Set { + e.FieldStart("ValidatedAssetVersion") + s.ValidatedAssetVersion.Encode(e) + } + } { e.FieldStart("Completed") e.Bool(s.Completed) @@ -1517,7 +1529,7 @@ func (s *Submission) encodeFields(e *jx.Encoder) { } } -var jsonFieldsNameOfSubmission = [13]string{ +var jsonFieldsNameOfSubmission = [15]string{ 0: "ID", 1: "DisplayName", 2: "Creator", @@ -1527,10 +1539,12 @@ var jsonFieldsNameOfSubmission = [13]string{ 6: "Submitter", 7: "AssetID", 8: "AssetVersion", - 9: "Completed", - 10: "UploadedAssetID", - 11: "StatusID", - 12: "StatusMessage", + 9: "ValidatedAssetID", + 10: "ValidatedAssetVersion", + 11: "Completed", + 12: "UploadedAssetID", + 13: "StatusID", + 14: "StatusMessage", } // Decode decodes Submission from json. @@ -1650,8 +1664,28 @@ func (s *Submission) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"AssetVersion\"") } + case "ValidatedAssetID": + if err := func() error { + s.ValidatedAssetID.Reset() + if err := s.ValidatedAssetID.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"ValidatedAssetID\"") + } + case "ValidatedAssetVersion": + if err := func() error { + s.ValidatedAssetVersion.Reset() + if err := s.ValidatedAssetVersion.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"ValidatedAssetVersion\"") + } case "Completed": - requiredBitSet[1] |= 1 << 1 + requiredBitSet[1] |= 1 << 3 if err := func() error { v, err := d.Bool() s.Completed = bool(v) @@ -1673,7 +1707,7 @@ func (s *Submission) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"UploadedAssetID\"") } case "StatusID": - requiredBitSet[1] |= 1 << 3 + requiredBitSet[1] |= 1 << 5 if err := func() error { v, err := d.Int32() s.StatusID = int32(v) @@ -1685,7 +1719,7 @@ func (s *Submission) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"StatusID\"") } case "StatusMessage": - requiredBitSet[1] |= 1 << 4 + requiredBitSet[1] |= 1 << 6 if err := func() error { v, err := d.Str() s.StatusMessage = string(v) @@ -1707,7 +1741,7 @@ func (s *Submission) Decode(d *jx.Decoder) error { var failures []validate.FieldError for i, mask := range [2]uint8{ 0b11111111, - 0b00011011, + 0b01101001, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. diff --git a/pkg/api/oas_schemas_gen.go b/pkg/api/oas_schemas_gen.go index ce8774f..83270eb 100644 --- a/pkg/api/oas_schemas_gen.go +++ b/pkg/api/oas_schemas_gen.go @@ -623,19 +623,21 @@ type SetSubmissionCompletedNoContent struct{} // Ref: #/components/schemas/Submission type Submission struct { - ID int64 `json:"ID"` - DisplayName string `json:"DisplayName"` - Creator string `json:"Creator"` - GameID int32 `json:"GameID"` - CreatedAt int64 `json:"CreatedAt"` - UpdatedAt int64 `json:"UpdatedAt"` - Submitter int64 `json:"Submitter"` - AssetID int64 `json:"AssetID"` - AssetVersion int64 `json:"AssetVersion"` - Completed bool `json:"Completed"` - UploadedAssetID OptInt64 `json:"UploadedAssetID"` - StatusID int32 `json:"StatusID"` - StatusMessage string `json:"StatusMessage"` + ID int64 `json:"ID"` + DisplayName string `json:"DisplayName"` + Creator string `json:"Creator"` + GameID int32 `json:"GameID"` + CreatedAt int64 `json:"CreatedAt"` + UpdatedAt int64 `json:"UpdatedAt"` + Submitter int64 `json:"Submitter"` + AssetID int64 `json:"AssetID"` + AssetVersion int64 `json:"AssetVersion"` + ValidatedAssetID OptInt64 `json:"ValidatedAssetID"` + ValidatedAssetVersion OptInt64 `json:"ValidatedAssetVersion"` + Completed bool `json:"Completed"` + UploadedAssetID OptInt64 `json:"UploadedAssetID"` + StatusID int32 `json:"StatusID"` + StatusMessage string `json:"StatusMessage"` } // GetID returns the value of ID. @@ -683,6 +685,16 @@ func (s *Submission) GetAssetVersion() int64 { return s.AssetVersion } +// GetValidatedAssetID returns the value of ValidatedAssetID. +func (s *Submission) GetValidatedAssetID() OptInt64 { + return s.ValidatedAssetID +} + +// GetValidatedAssetVersion returns the value of ValidatedAssetVersion. +func (s *Submission) GetValidatedAssetVersion() OptInt64 { + return s.ValidatedAssetVersion +} + // GetCompleted returns the value of Completed. func (s *Submission) GetCompleted() bool { return s.Completed @@ -748,6 +760,16 @@ func (s *Submission) SetAssetVersion(val int64) { s.AssetVersion = val } +// SetValidatedAssetID sets the value of ValidatedAssetID. +func (s *Submission) SetValidatedAssetID(val OptInt64) { + s.ValidatedAssetID = val +} + +// SetValidatedAssetVersion sets the value of ValidatedAssetVersion. +func (s *Submission) SetValidatedAssetVersion(val OptInt64) { + s.ValidatedAssetVersion = val +} + // SetCompleted sets the value of Completed. func (s *Submission) SetCompleted(val bool) { s.Completed = val