2024-11-26 01:22:45 +00:00
|
|
|
// Code generated by ogen, DO NOT EDIT.
|
|
|
|
|
|
|
|
package api
|
2024-11-27 23:38:17 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"bytes"
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"github.com/go-faster/jx"
|
|
|
|
|
|
|
|
ht "github.com/ogen-go/ogen/http"
|
|
|
|
)
|
|
|
|
|
2024-12-06 00:36:15 +00:00
|
|
|
func encodeCreateScriptRequest(
|
2024-12-06 02:48:26 +00:00
|
|
|
req *ScriptCreate,
|
2024-12-06 00:36:15 +00:00
|
|
|
r *http.Request,
|
|
|
|
) error {
|
|
|
|
const contentType = "application/json"
|
|
|
|
e := new(jx.Encoder)
|
|
|
|
{
|
2024-12-06 02:48:26 +00:00
|
|
|
req.Encode(e)
|
2024-12-06 00:36:15 +00:00
|
|
|
}
|
|
|
|
encoded := e.Bytes()
|
|
|
|
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func encodeCreateScriptPolicyRequest(
|
2024-12-06 02:48:26 +00:00
|
|
|
req *ScriptPolicyCreate,
|
2024-12-06 00:36:15 +00:00
|
|
|
r *http.Request,
|
|
|
|
) error {
|
|
|
|
const contentType = "application/json"
|
|
|
|
e := new(jx.Encoder)
|
|
|
|
{
|
2024-12-06 02:48:26 +00:00
|
|
|
req.Encode(e)
|
2024-12-06 00:36:15 +00:00
|
|
|
}
|
|
|
|
encoded := e.Bytes()
|
|
|
|
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2024-11-27 23:38:17 +00:00
|
|
|
func encodeCreateSubmissionRequest(
|
2024-12-06 02:48:26 +00:00
|
|
|
req *SubmissionCreate,
|
2024-11-27 23:38:17 +00:00
|
|
|
r *http.Request,
|
|
|
|
) error {
|
|
|
|
const contentType = "application/json"
|
|
|
|
e := new(jx.Encoder)
|
|
|
|
{
|
2024-12-06 02:48:26 +00:00
|
|
|
req.Encode(e)
|
2024-11-27 23:38:17 +00:00
|
|
|
}
|
|
|
|
encoded := e.Bytes()
|
|
|
|
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-06 00:36:15 +00:00
|
|
|
|
2024-12-14 06:43:32 +00:00
|
|
|
func encodeListScriptPolicyRequest(
|
|
|
|
req *ListScriptPolicyReq,
|
|
|
|
r *http.Request,
|
|
|
|
) error {
|
|
|
|
const contentType = "application/json"
|
|
|
|
e := new(jx.Encoder)
|
|
|
|
{
|
|
|
|
req.Encode(e)
|
|
|
|
}
|
|
|
|
encoded := e.Bytes()
|
|
|
|
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func encodeListSubmissionsRequest(
|
|
|
|
req *ListSubmissionsReq,
|
|
|
|
r *http.Request,
|
|
|
|
) error {
|
|
|
|
const contentType = "application/json"
|
|
|
|
e := new(jx.Encoder)
|
|
|
|
{
|
|
|
|
req.Encode(e)
|
|
|
|
}
|
|
|
|
encoded := e.Bytes()
|
|
|
|
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2024-12-06 00:36:15 +00:00
|
|
|
func encodeUpdateScriptRequest(
|
2024-12-06 02:48:26 +00:00
|
|
|
req *ScriptUpdate,
|
2024-12-06 00:36:15 +00:00
|
|
|
r *http.Request,
|
|
|
|
) error {
|
|
|
|
const contentType = "application/json"
|
|
|
|
e := new(jx.Encoder)
|
|
|
|
{
|
2024-12-06 02:48:26 +00:00
|
|
|
req.Encode(e)
|
2024-12-06 00:36:15 +00:00
|
|
|
}
|
|
|
|
encoded := e.Bytes()
|
|
|
|
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func encodeUpdateScriptPolicyRequest(
|
2024-12-06 02:48:26 +00:00
|
|
|
req *ScriptPolicyUpdate,
|
2024-12-06 00:36:15 +00:00
|
|
|
r *http.Request,
|
|
|
|
) error {
|
|
|
|
const contentType = "application/json"
|
|
|
|
e := new(jx.Encoder)
|
|
|
|
{
|
2024-12-06 02:48:26 +00:00
|
|
|
req.Encode(e)
|
2024-12-06 00:36:15 +00:00
|
|
|
}
|
|
|
|
encoded := e.Bytes()
|
|
|
|
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
|
|
|
return nil
|
|
|
|
}
|