openapi: generate
This commit is contained in:
parent
a048d713da
commit
8de5bcba68
@ -1497,6 +1497,18 @@ func (s *Submission) encodeFields(e *jx.Encoder) {
|
|||||||
e.FieldStart("AssetVersion")
|
e.FieldStart("AssetVersion")
|
||||||
e.Int64(s.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.FieldStart("Completed")
|
||||||
e.Bool(s.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",
|
0: "ID",
|
||||||
1: "DisplayName",
|
1: "DisplayName",
|
||||||
2: "Creator",
|
2: "Creator",
|
||||||
@ -1527,10 +1539,12 @@ var jsonFieldsNameOfSubmission = [13]string{
|
|||||||
6: "Submitter",
|
6: "Submitter",
|
||||||
7: "AssetID",
|
7: "AssetID",
|
||||||
8: "AssetVersion",
|
8: "AssetVersion",
|
||||||
9: "Completed",
|
9: "ValidatedAssetID",
|
||||||
10: "UploadedAssetID",
|
10: "ValidatedAssetVersion",
|
||||||
11: "StatusID",
|
11: "Completed",
|
||||||
12: "StatusMessage",
|
12: "UploadedAssetID",
|
||||||
|
13: "StatusID",
|
||||||
|
14: "StatusMessage",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decode decodes Submission from json.
|
// Decode decodes Submission from json.
|
||||||
@ -1650,8 +1664,28 @@ func (s *Submission) Decode(d *jx.Decoder) error {
|
|||||||
}(); err != nil {
|
}(); err != nil {
|
||||||
return errors.Wrap(err, "decode field \"AssetVersion\"")
|
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":
|
case "Completed":
|
||||||
requiredBitSet[1] |= 1 << 1
|
requiredBitSet[1] |= 1 << 3
|
||||||
if err := func() error {
|
if err := func() error {
|
||||||
v, err := d.Bool()
|
v, err := d.Bool()
|
||||||
s.Completed = bool(v)
|
s.Completed = bool(v)
|
||||||
@ -1673,7 +1707,7 @@ func (s *Submission) Decode(d *jx.Decoder) error {
|
|||||||
return errors.Wrap(err, "decode field \"UploadedAssetID\"")
|
return errors.Wrap(err, "decode field \"UploadedAssetID\"")
|
||||||
}
|
}
|
||||||
case "StatusID":
|
case "StatusID":
|
||||||
requiredBitSet[1] |= 1 << 3
|
requiredBitSet[1] |= 1 << 5
|
||||||
if err := func() error {
|
if err := func() error {
|
||||||
v, err := d.Int32()
|
v, err := d.Int32()
|
||||||
s.StatusID = int32(v)
|
s.StatusID = int32(v)
|
||||||
@ -1685,7 +1719,7 @@ func (s *Submission) Decode(d *jx.Decoder) error {
|
|||||||
return errors.Wrap(err, "decode field \"StatusID\"")
|
return errors.Wrap(err, "decode field \"StatusID\"")
|
||||||
}
|
}
|
||||||
case "StatusMessage":
|
case "StatusMessage":
|
||||||
requiredBitSet[1] |= 1 << 4
|
requiredBitSet[1] |= 1 << 6
|
||||||
if err := func() error {
|
if err := func() error {
|
||||||
v, err := d.Str()
|
v, err := d.Str()
|
||||||
s.StatusMessage = string(v)
|
s.StatusMessage = string(v)
|
||||||
@ -1707,7 +1741,7 @@ func (s *Submission) Decode(d *jx.Decoder) error {
|
|||||||
var failures []validate.FieldError
|
var failures []validate.FieldError
|
||||||
for i, mask := range [2]uint8{
|
for i, mask := range [2]uint8{
|
||||||
0b11111111,
|
0b11111111,
|
||||||
0b00011011,
|
0b01101001,
|
||||||
} {
|
} {
|
||||||
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
|
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
|
||||||
// Mask only required fields and check equality to mask using XOR.
|
// Mask only required fields and check equality to mask using XOR.
|
||||||
|
@ -623,19 +623,21 @@ type SetSubmissionCompletedNoContent struct{}
|
|||||||
|
|
||||||
// Ref: #/components/schemas/Submission
|
// Ref: #/components/schemas/Submission
|
||||||
type Submission struct {
|
type Submission struct {
|
||||||
ID int64 `json:"ID"`
|
ID int64 `json:"ID"`
|
||||||
DisplayName string `json:"DisplayName"`
|
DisplayName string `json:"DisplayName"`
|
||||||
Creator string `json:"Creator"`
|
Creator string `json:"Creator"`
|
||||||
GameID int32 `json:"GameID"`
|
GameID int32 `json:"GameID"`
|
||||||
CreatedAt int64 `json:"CreatedAt"`
|
CreatedAt int64 `json:"CreatedAt"`
|
||||||
UpdatedAt int64 `json:"UpdatedAt"`
|
UpdatedAt int64 `json:"UpdatedAt"`
|
||||||
Submitter int64 `json:"Submitter"`
|
Submitter int64 `json:"Submitter"`
|
||||||
AssetID int64 `json:"AssetID"`
|
AssetID int64 `json:"AssetID"`
|
||||||
AssetVersion int64 `json:"AssetVersion"`
|
AssetVersion int64 `json:"AssetVersion"`
|
||||||
Completed bool `json:"Completed"`
|
ValidatedAssetID OptInt64 `json:"ValidatedAssetID"`
|
||||||
UploadedAssetID OptInt64 `json:"UploadedAssetID"`
|
ValidatedAssetVersion OptInt64 `json:"ValidatedAssetVersion"`
|
||||||
StatusID int32 `json:"StatusID"`
|
Completed bool `json:"Completed"`
|
||||||
StatusMessage string `json:"StatusMessage"`
|
UploadedAssetID OptInt64 `json:"UploadedAssetID"`
|
||||||
|
StatusID int32 `json:"StatusID"`
|
||||||
|
StatusMessage string `json:"StatusMessage"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetID returns the value of ID.
|
// GetID returns the value of ID.
|
||||||
@ -683,6 +685,16 @@ func (s *Submission) GetAssetVersion() int64 {
|
|||||||
return s.AssetVersion
|
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.
|
// GetCompleted returns the value of Completed.
|
||||||
func (s *Submission) GetCompleted() bool {
|
func (s *Submission) GetCompleted() bool {
|
||||||
return s.Completed
|
return s.Completed
|
||||||
@ -748,6 +760,16 @@ func (s *Submission) SetAssetVersion(val int64) {
|
|||||||
s.AssetVersion = val
|
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.
|
// SetCompleted sets the value of Completed.
|
||||||
func (s *Submission) SetCompleted(val bool) {
|
func (s *Submission) SetCompleted(val bool) {
|
||||||
s.Completed = val
|
s.Completed = val
|
||||||
|
Loading…
x
Reference in New Issue
Block a user