diff --git a/api/golang/http_rest/client/rest_api_client.gen.go b/api/golang/http_rest/client/rest_api_client.gen.go new file mode 100644 index 0000000000..df58b466d3 --- /dev/null +++ b/api/golang/http_rest/client/rest_api_client.gen.go @@ -0,0 +1,4036 @@ +// Package core_rest_api provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version (devel) DO NOT EDIT. +package core_rest_api + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "github.com/deepmap/oapi-codegen/pkg/runtime" + . "github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types" +) + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // DeleteEnclaves request + DeleteEnclaves(ctx context.Context, params *DeleteEnclavesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclaves request + GetEnclaves(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostEnclaves request with any body + PostEnclavesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostEnclaves(ctx context.Context, body PostEnclavesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclavesHistory request + GetEnclavesHistory(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteEnclavesEnclaveIdentifier request + DeleteEnclavesEnclaveIdentifier(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclavesEnclaveIdentifier request + GetEnclavesEnclaveIdentifier(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclavesEnclaveIdentifierArtifacts request + GetEnclavesEnclaveIdentifierArtifacts(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostEnclavesEnclaveIdentifierArtifactsLocalFile request with any body + PostEnclavesEnclaveIdentifierArtifactsLocalFileWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostEnclavesEnclaveIdentifierArtifactsRemoteFile request with any body + PostEnclavesEnclaveIdentifierArtifactsRemoteFileWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx context.Context, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierArtifactsRemoteFileJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier request with any body + PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, body PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier request + GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier(ctx context.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload request + GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload(ctx context.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclavesEnclaveIdentifierLogs request + GetEnclavesEnclaveIdentifierLogs(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *GetEnclavesEnclaveIdentifierLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclavesEnclaveIdentifierServices request + GetEnclavesEnclaveIdentifierServices(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *GetEnclavesEnclaveIdentifierServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostEnclavesEnclaveIdentifierServicesConnection request with any body + PostEnclavesEnclaveIdentifierServicesConnectionWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostEnclavesEnclaveIdentifierServicesConnection(ctx context.Context, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclavesEnclaveIdentifierServicesHistory request + GetEnclavesEnclaveIdentifierServicesHistory(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclavesEnclaveIdentifierServicesServiceIdentifier request + GetEnclavesEnclaveIdentifierServicesServiceIdentifier(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand request with any body + PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, body PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability request + GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, portNumber PortNumber, params *GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs request + GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, params *GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclavesEnclaveIdentifierStarlark request + GetEnclavesEnclaveIdentifierStarlark(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostEnclavesEnclaveIdentifierStarlarkPackages request with any body + PostEnclavesEnclaveIdentifierStarlarkPackagesWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId request with any body + PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, packageId PackageId, params *PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId(ctx context.Context, enclaveIdentifier EnclaveIdentifier, packageId PackageId, params *PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams, body PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostEnclavesEnclaveIdentifierStarlarkScripts request with any body + PostEnclavesEnclaveIdentifierStarlarkScriptsWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *PostEnclavesEnclaveIdentifierStarlarkScriptsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostEnclavesEnclaveIdentifierStarlarkScripts(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *PostEnclavesEnclaveIdentifierStarlarkScriptsParams, body PostEnclavesEnclaveIdentifierStarlarkScriptsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEnclavesEnclaveIdentifierStatus request + GetEnclavesEnclaveIdentifierStatus(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostEnclavesEnclaveIdentifierStatus request with any body + PostEnclavesEnclaveIdentifierStatusWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostEnclavesEnclaveIdentifierStatus(ctx context.Context, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetEngineInfo request + GetEngineInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetStarlarkExecutionsStarlarkExecutionUuidLogs request + GetStarlarkExecutionsStarlarkExecutionUuidLogs(ctx context.Context, starlarkExecutionUuid StarlarkExecutionUuid, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) DeleteEnclaves(ctx context.Context, params *DeleteEnclavesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteEnclavesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclaves(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclaves(ctx context.Context, body PostEnclavesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclavesHistory(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesHistoryRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteEnclavesEnclaveIdentifier(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteEnclavesEnclaveIdentifierRequest(c.Server, enclaveIdentifier) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclavesEnclaveIdentifier(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesEnclaveIdentifierRequest(c.Server, enclaveIdentifier) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclavesEnclaveIdentifierArtifacts(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesEnclaveIdentifierArtifactsRequest(c.Server, enclaveIdentifier) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierArtifactsLocalFileWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierArtifactsLocalFileRequestWithBody(c.Server, enclaveIdentifier, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierArtifactsRemoteFileWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierArtifactsRemoteFileRequestWithBody(c.Server, enclaveIdentifier, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx context.Context, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierArtifactsRemoteFileJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierArtifactsRemoteFileRequest(c.Server, enclaveIdentifier, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierRequestWithBody(c.Server, enclaveIdentifier, serviceIdentifier, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, body PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierRequest(c.Server, enclaveIdentifier, serviceIdentifier, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier(ctx context.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierRequest(c.Server, enclaveIdentifier, artifactIdentifier) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload(ctx context.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadRequest(c.Server, enclaveIdentifier, artifactIdentifier) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclavesEnclaveIdentifierLogs(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *GetEnclavesEnclaveIdentifierLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesEnclaveIdentifierLogsRequest(c.Server, enclaveIdentifier, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclavesEnclaveIdentifierServices(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *GetEnclavesEnclaveIdentifierServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesEnclaveIdentifierServicesRequest(c.Server, enclaveIdentifier, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierServicesConnectionWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierServicesConnectionRequestWithBody(c.Server, enclaveIdentifier, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierServicesConnection(ctx context.Context, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierServicesConnectionRequest(c.Server, enclaveIdentifier, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclavesEnclaveIdentifierServicesHistory(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesEnclaveIdentifierServicesHistoryRequest(c.Server, enclaveIdentifier) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclavesEnclaveIdentifierServicesServiceIdentifier(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesEnclaveIdentifierServicesServiceIdentifierRequest(c.Server, enclaveIdentifier, serviceIdentifier) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandRequestWithBody(c.Server, enclaveIdentifier, serviceIdentifier, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, body PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandRequest(c.Server, enclaveIdentifier, serviceIdentifier, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, portNumber PortNumber, params *GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityRequest(c.Server, enclaveIdentifier, serviceIdentifier, portNumber, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, params *GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsRequest(c.Server, enclaveIdentifier, serviceIdentifier, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclavesEnclaveIdentifierStarlark(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesEnclaveIdentifierStarlarkRequest(c.Server, enclaveIdentifier) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierStarlarkPackagesWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierStarlarkPackagesRequestWithBody(c.Server, enclaveIdentifier, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, packageId PackageId, params *PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdRequestWithBody(c.Server, enclaveIdentifier, packageId, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId(ctx context.Context, enclaveIdentifier EnclaveIdentifier, packageId PackageId, params *PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams, body PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdRequest(c.Server, enclaveIdentifier, packageId, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierStarlarkScriptsWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *PostEnclavesEnclaveIdentifierStarlarkScriptsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierStarlarkScriptsRequestWithBody(c.Server, enclaveIdentifier, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierStarlarkScripts(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *PostEnclavesEnclaveIdentifierStarlarkScriptsParams, body PostEnclavesEnclaveIdentifierStarlarkScriptsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierStarlarkScriptsRequest(c.Server, enclaveIdentifier, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEnclavesEnclaveIdentifierStatus(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEnclavesEnclaveIdentifierStatusRequest(c.Server, enclaveIdentifier) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierStatusWithBody(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierStatusRequestWithBody(c.Server, enclaveIdentifier, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostEnclavesEnclaveIdentifierStatus(ctx context.Context, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostEnclavesEnclaveIdentifierStatusRequest(c.Server, enclaveIdentifier, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetEngineInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEngineInfoRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetStarlarkExecutionsStarlarkExecutionUuidLogs(ctx context.Context, starlarkExecutionUuid StarlarkExecutionUuid, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetStarlarkExecutionsStarlarkExecutionUuidLogsRequest(c.Server, starlarkExecutionUuid) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewDeleteEnclavesRequest generates requests for DeleteEnclaves +func NewDeleteEnclavesRequest(server string, params *DeleteEnclavesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.RemoveAll != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remove_all", runtime.ParamLocationQuery, *params.RemoveAll); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetEnclavesRequest generates requests for GetEnclaves +func NewGetEnclavesRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostEnclavesRequest calls the generic PostEnclaves builder with application/json body +func NewPostEnclavesRequest(server string, body PostEnclavesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostEnclavesRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostEnclavesRequestWithBody generates requests for PostEnclaves with any type of body +func NewPostEnclavesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetEnclavesHistoryRequest generates requests for GetEnclavesHistory +func NewGetEnclavesHistoryRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/history") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteEnclavesEnclaveIdentifierRequest generates requests for DeleteEnclavesEnclaveIdentifier +func NewDeleteEnclavesEnclaveIdentifierRequest(server string, enclaveIdentifier EnclaveIdentifier) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetEnclavesEnclaveIdentifierRequest generates requests for GetEnclavesEnclaveIdentifier +func NewGetEnclavesEnclaveIdentifierRequest(server string, enclaveIdentifier EnclaveIdentifier) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetEnclavesEnclaveIdentifierArtifactsRequest generates requests for GetEnclavesEnclaveIdentifierArtifacts +func NewGetEnclavesEnclaveIdentifierArtifactsRequest(server string, enclaveIdentifier EnclaveIdentifier) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/artifacts", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostEnclavesEnclaveIdentifierArtifactsLocalFileRequestWithBody generates requests for PostEnclavesEnclaveIdentifierArtifactsLocalFile with any type of body +func NewPostEnclavesEnclaveIdentifierArtifactsLocalFileRequestWithBody(server string, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/artifacts/local-file", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostEnclavesEnclaveIdentifierArtifactsRemoteFileRequest calls the generic PostEnclavesEnclaveIdentifierArtifactsRemoteFile builder with application/json body +func NewPostEnclavesEnclaveIdentifierArtifactsRemoteFileRequest(server string, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierArtifactsRemoteFileJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostEnclavesEnclaveIdentifierArtifactsRemoteFileRequestWithBody(server, enclaveIdentifier, "application/json", bodyReader) +} + +// NewPostEnclavesEnclaveIdentifierArtifactsRemoteFileRequestWithBody generates requests for PostEnclavesEnclaveIdentifierArtifactsRemoteFile with any type of body +func NewPostEnclavesEnclaveIdentifierArtifactsRemoteFileRequestWithBody(server string, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/artifacts/remote-file", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierRequest calls the generic PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier builder with application/json body +func NewPostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierRequest(server string, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, body PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierRequestWithBody(server, enclaveIdentifier, serviceIdentifier, "application/json", bodyReader) +} + +// NewPostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierRequestWithBody generates requests for PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier with any type of body +func NewPostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierRequestWithBody(server string, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, serviceIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/artifacts/services/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierRequest generates requests for GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier +func NewGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierRequest(server string, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "artifact_identifier", runtime.ParamLocationPath, artifactIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/artifacts/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadRequest generates requests for GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload +func NewGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadRequest(server string, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "artifact_identifier", runtime.ParamLocationPath, artifactIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/artifacts/%s/download", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetEnclavesEnclaveIdentifierLogsRequest generates requests for GetEnclavesEnclaveIdentifierLogs +func NewGetEnclavesEnclaveIdentifierLogsRequest(server string, enclaveIdentifier EnclaveIdentifier, params *GetEnclavesEnclaveIdentifierLogsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/logs", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service_uuid_set", runtime.ParamLocationQuery, params.ServiceUuidSet); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.FollowLogs != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "follow_logs", runtime.ParamLocationQuery, *params.FollowLogs); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ConjunctiveFilters != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "conjunctive_filters", runtime.ParamLocationQuery, *params.ConjunctiveFilters); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ReturnAllLogs != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "return_all_logs", runtime.ParamLocationQuery, *params.ReturnAllLogs); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NumLogLines != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "num_log_lines", runtime.ParamLocationQuery, *params.NumLogLines); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetEnclavesEnclaveIdentifierServicesRequest generates requests for GetEnclavesEnclaveIdentifierServices +func NewGetEnclavesEnclaveIdentifierServicesRequest(server string, enclaveIdentifier EnclaveIdentifier, params *GetEnclavesEnclaveIdentifierServicesParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/services", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.Services != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "services", runtime.ParamLocationQuery, *params.Services); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostEnclavesEnclaveIdentifierServicesConnectionRequest calls the generic PostEnclavesEnclaveIdentifierServicesConnection builder with application/json body +func NewPostEnclavesEnclaveIdentifierServicesConnectionRequest(server string, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostEnclavesEnclaveIdentifierServicesConnectionRequestWithBody(server, enclaveIdentifier, "application/json", bodyReader) +} + +// NewPostEnclavesEnclaveIdentifierServicesConnectionRequestWithBody generates requests for PostEnclavesEnclaveIdentifierServicesConnection with any type of body +func NewPostEnclavesEnclaveIdentifierServicesConnectionRequestWithBody(server string, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/services/connection", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetEnclavesEnclaveIdentifierServicesHistoryRequest generates requests for GetEnclavesEnclaveIdentifierServicesHistory +func NewGetEnclavesEnclaveIdentifierServicesHistoryRequest(server string, enclaveIdentifier EnclaveIdentifier) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/services/history", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetEnclavesEnclaveIdentifierServicesServiceIdentifierRequest generates requests for GetEnclavesEnclaveIdentifierServicesServiceIdentifier +func NewGetEnclavesEnclaveIdentifierServicesServiceIdentifierRequest(server string, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, serviceIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/services/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandRequest calls the generic PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand builder with application/json body +func NewPostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandRequest(server string, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, body PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandRequestWithBody(server, enclaveIdentifier, serviceIdentifier, "application/json", bodyReader) +} + +// NewPostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandRequestWithBody generates requests for PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand with any type of body +func NewPostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandRequestWithBody(server string, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, serviceIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/services/%s/command", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityRequest generates requests for GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability +func NewGetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityRequest(server string, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, portNumber PortNumber, params *GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, serviceIdentifier) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "port_number", runtime.ParamLocationPath, portNumber) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/services/%s/endpoints/%s/availability", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.HttpMethod != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "http_method", runtime.ParamLocationQuery, *params.HttpMethod); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Path != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "path", runtime.ParamLocationQuery, *params.Path); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InitialDelayMilliseconds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "initial_delay_milliseconds", runtime.ParamLocationQuery, *params.InitialDelayMilliseconds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Retries != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "retries", runtime.ParamLocationQuery, *params.Retries); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.RetriesDelayMilliseconds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "retries_delay_milliseconds", runtime.ParamLocationQuery, *params.RetriesDelayMilliseconds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ExpectedResponse != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "expected_response", runtime.ParamLocationQuery, *params.ExpectedResponse); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.RequestBody != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "request_body", runtime.ParamLocationQuery, *params.RequestBody); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsRequest generates requests for GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs +func NewGetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsRequest(server string, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, params *GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, serviceIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/services/%s/logs", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.FollowLogs != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "follow_logs", runtime.ParamLocationQuery, *params.FollowLogs); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ConjunctiveFilters != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "conjunctive_filters", runtime.ParamLocationQuery, *params.ConjunctiveFilters); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ReturnAllLogs != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "return_all_logs", runtime.ParamLocationQuery, *params.ReturnAllLogs); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NumLogLines != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "num_log_lines", runtime.ParamLocationQuery, *params.NumLogLines); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetEnclavesEnclaveIdentifierStarlarkRequest generates requests for GetEnclavesEnclaveIdentifierStarlark +func NewGetEnclavesEnclaveIdentifierStarlarkRequest(server string, enclaveIdentifier EnclaveIdentifier) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/starlark", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostEnclavesEnclaveIdentifierStarlarkPackagesRequestWithBody generates requests for PostEnclavesEnclaveIdentifierStarlarkPackages with any type of body +func NewPostEnclavesEnclaveIdentifierStarlarkPackagesRequestWithBody(server string, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/starlark/packages", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdRequest calls the generic PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId builder with application/json body +func NewPostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdRequest(server string, enclaveIdentifier EnclaveIdentifier, packageId PackageId, params *PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams, body PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdRequestWithBody(server, enclaveIdentifier, packageId, params, "application/json", bodyReader) +} + +// NewPostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdRequestWithBody generates requests for PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId with any type of body +func NewPostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdRequestWithBody(server string, enclaveIdentifier EnclaveIdentifier, packageId PackageId, params *PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "package_id", runtime.ParamLocationPath, packageId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/starlark/packages/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.RetrieveLogsAsync != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "retrieve_logs_async", runtime.ParamLocationQuery, *params.RetrieveLogsAsync); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostEnclavesEnclaveIdentifierStarlarkScriptsRequest calls the generic PostEnclavesEnclaveIdentifierStarlarkScripts builder with application/json body +func NewPostEnclavesEnclaveIdentifierStarlarkScriptsRequest(server string, enclaveIdentifier EnclaveIdentifier, params *PostEnclavesEnclaveIdentifierStarlarkScriptsParams, body PostEnclavesEnclaveIdentifierStarlarkScriptsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostEnclavesEnclaveIdentifierStarlarkScriptsRequestWithBody(server, enclaveIdentifier, params, "application/json", bodyReader) +} + +// NewPostEnclavesEnclaveIdentifierStarlarkScriptsRequestWithBody generates requests for PostEnclavesEnclaveIdentifierStarlarkScripts with any type of body +func NewPostEnclavesEnclaveIdentifierStarlarkScriptsRequestWithBody(server string, enclaveIdentifier EnclaveIdentifier, params *PostEnclavesEnclaveIdentifierStarlarkScriptsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/starlark/scripts", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.RetrieveLogsAsync != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "retrieve_logs_async", runtime.ParamLocationQuery, *params.RetrieveLogsAsync); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetEnclavesEnclaveIdentifierStatusRequest generates requests for GetEnclavesEnclaveIdentifierStatus +func NewGetEnclavesEnclaveIdentifierStatusRequest(server string, enclaveIdentifier EnclaveIdentifier) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/status", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostEnclavesEnclaveIdentifierStatusRequest calls the generic PostEnclavesEnclaveIdentifierStatus builder with application/json body +func NewPostEnclavesEnclaveIdentifierStatusRequest(server string, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierStatusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostEnclavesEnclaveIdentifierStatusRequestWithBody(server, enclaveIdentifier, "application/json", bodyReader) +} + +// NewPostEnclavesEnclaveIdentifierStatusRequestWithBody generates requests for PostEnclavesEnclaveIdentifierStatus with any type of body +func NewPostEnclavesEnclaveIdentifierStatusRequestWithBody(server string, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, enclaveIdentifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/enclaves/%s/status", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetEngineInfoRequest generates requests for GetEngineInfo +func NewGetEngineInfoRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/engine/info") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetStarlarkExecutionsStarlarkExecutionUuidLogsRequest generates requests for GetStarlarkExecutionsStarlarkExecutionUuidLogs +func NewGetStarlarkExecutionsStarlarkExecutionUuidLogsRequest(server string, starlarkExecutionUuid StarlarkExecutionUuid) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "starlark_execution_uuid", runtime.ParamLocationPath, starlarkExecutionUuid) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/starlark/executions/%s/logs", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // DeleteEnclaves request + DeleteEnclavesWithResponse(ctx context.Context, params *DeleteEnclavesParams, reqEditors ...RequestEditorFn) (*DeleteEnclavesResponse, error) + + // GetEnclaves request + GetEnclavesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEnclavesResponse, error) + + // PostEnclaves request with any body + PostEnclavesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesResponse, error) + + PostEnclavesWithResponse(ctx context.Context, body PostEnclavesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesResponse, error) + + // GetEnclavesHistory request + GetEnclavesHistoryWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEnclavesHistoryResponse, error) + + // DeleteEnclavesEnclaveIdentifier request + DeleteEnclavesEnclaveIdentifierWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*DeleteEnclavesEnclaveIdentifierResponse, error) + + // GetEnclavesEnclaveIdentifier request + GetEnclavesEnclaveIdentifierWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierResponse, error) + + // GetEnclavesEnclaveIdentifierArtifacts request + GetEnclavesEnclaveIdentifierArtifactsWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierArtifactsResponse, error) + + // PostEnclavesEnclaveIdentifierArtifactsLocalFile request with any body + PostEnclavesEnclaveIdentifierArtifactsLocalFileWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierArtifactsLocalFileResponse, error) + + // PostEnclavesEnclaveIdentifierArtifactsRemoteFile request with any body + PostEnclavesEnclaveIdentifierArtifactsRemoteFileWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse, error) + + PostEnclavesEnclaveIdentifierArtifactsRemoteFileWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierArtifactsRemoteFileJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse, error) + + // PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier request with any body + PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse, error) + + PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, body PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse, error) + + // GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier request + GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse, error) + + // GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload request + GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadResponse, error) + + // GetEnclavesEnclaveIdentifierLogs request + GetEnclavesEnclaveIdentifierLogsWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *GetEnclavesEnclaveIdentifierLogsParams, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierLogsResponse, error) + + // GetEnclavesEnclaveIdentifierServices request + GetEnclavesEnclaveIdentifierServicesWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *GetEnclavesEnclaveIdentifierServicesParams, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierServicesResponse, error) + + // PostEnclavesEnclaveIdentifierServicesConnection request with any body + PostEnclavesEnclaveIdentifierServicesConnectionWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierServicesConnectionResponse, error) + + PostEnclavesEnclaveIdentifierServicesConnectionWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierServicesConnectionResponse, error) + + // GetEnclavesEnclaveIdentifierServicesHistory request + GetEnclavesEnclaveIdentifierServicesHistoryWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierServicesHistoryResponse, error) + + // GetEnclavesEnclaveIdentifierServicesServiceIdentifier request + GetEnclavesEnclaveIdentifierServicesServiceIdentifierWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse, error) + + // PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand request with any body + PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse, error) + + PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, body PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse, error) + + // GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability request + GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, portNumber PortNumber, params *GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityResponse, error) + + // GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs request + GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, params *GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsResponse, error) + + // GetEnclavesEnclaveIdentifierStarlark request + GetEnclavesEnclaveIdentifierStarlarkWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierStarlarkResponse, error) + + // PostEnclavesEnclaveIdentifierStarlarkPackages request with any body + PostEnclavesEnclaveIdentifierStarlarkPackagesWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStarlarkPackagesResponse, error) + + // PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId request with any body + PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, packageId PackageId, params *PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse, error) + + PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, packageId PackageId, params *PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams, body PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse, error) + + // PostEnclavesEnclaveIdentifierStarlarkScripts request with any body + PostEnclavesEnclaveIdentifierStarlarkScriptsWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *PostEnclavesEnclaveIdentifierStarlarkScriptsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStarlarkScriptsResponse, error) + + PostEnclavesEnclaveIdentifierStarlarkScriptsWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *PostEnclavesEnclaveIdentifierStarlarkScriptsParams, body PostEnclavesEnclaveIdentifierStarlarkScriptsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStarlarkScriptsResponse, error) + + // GetEnclavesEnclaveIdentifierStatus request + GetEnclavesEnclaveIdentifierStatusWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierStatusResponse, error) + + // PostEnclavesEnclaveIdentifierStatus request with any body + PostEnclavesEnclaveIdentifierStatusWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStatusResponse, error) + + PostEnclavesEnclaveIdentifierStatusWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStatusResponse, error) + + // GetEngineInfo request + GetEngineInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEngineInfoResponse, error) + + // GetStarlarkExecutionsStarlarkExecutionUuidLogs request + GetStarlarkExecutionsStarlarkExecutionUuidLogsWithResponse(ctx context.Context, starlarkExecutionUuid StarlarkExecutionUuid, reqEditors ...RequestEditorFn) (*GetStarlarkExecutionsStarlarkExecutionUuidLogsResponse, error) +} + +type DeleteEnclavesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DeletionSummary + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r DeleteEnclavesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteEnclavesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *map[string]EnclaveInfo + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostEnclavesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EnclaveInfo + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r PostEnclavesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostEnclavesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesHistoryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]EnclaveIdentifiers + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesHistoryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesHistoryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteEnclavesEnclaveIdentifierResponse struct { + Body []byte + HTTPResponse *http.Response + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r DeleteEnclavesEnclaveIdentifierResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteEnclavesEnclaveIdentifierResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesEnclaveIdentifierResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EnclaveInfo + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesEnclaveIdentifierResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesEnclaveIdentifierResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesEnclaveIdentifierArtifactsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]FileArtifactReference + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesEnclaveIdentifierArtifactsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesEnclaveIdentifierArtifactsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostEnclavesEnclaveIdentifierArtifactsLocalFileResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *map[string]FileArtifactUploadResult + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r PostEnclavesEnclaveIdentifierArtifactsLocalFileResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostEnclavesEnclaveIdentifierArtifactsLocalFileResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *FileArtifactReference + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r PostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *FileArtifactReference + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]FileArtifactDescription + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadResponse struct { + Body []byte + HTTPResponse *http.Response + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesEnclaveIdentifierLogsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ServiceLogs + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesEnclaveIdentifierLogsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesEnclaveIdentifierLogsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesEnclaveIdentifierServicesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *map[string]ServiceInfo + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesEnclaveIdentifierServicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesEnclaveIdentifierServicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostEnclavesEnclaveIdentifierServicesConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r PostEnclavesEnclaveIdentifierServicesConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostEnclavesEnclaveIdentifierServicesConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesEnclaveIdentifierServicesHistoryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ServiceIdentifiers + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesEnclaveIdentifierServicesHistoryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesEnclaveIdentifierServicesHistoryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ServiceInfo + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ExecCommandResult + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityResponse struct { + Body []byte + HTTPResponse *http.Response + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ServiceLogs + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesEnclaveIdentifierStarlarkResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *StarlarkDescription + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesEnclaveIdentifierStarlarkResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesEnclaveIdentifierStarlarkResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostEnclavesEnclaveIdentifierStarlarkPackagesResponse struct { + Body []byte + HTTPResponse *http.Response + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r PostEnclavesEnclaveIdentifierStarlarkPackagesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostEnclavesEnclaveIdentifierStarlarkPackagesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *StarlarkRunResponse + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostEnclavesEnclaveIdentifierStarlarkScriptsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *StarlarkRunResponse + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r PostEnclavesEnclaveIdentifierStarlarkScriptsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostEnclavesEnclaveIdentifierStarlarkScriptsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEnclavesEnclaveIdentifierStatusResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EnclaveStatus + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEnclavesEnclaveIdentifierStatusResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEnclavesEnclaveIdentifierStatusResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostEnclavesEnclaveIdentifierStatusResponse struct { + Body []byte + HTTPResponse *http.Response + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r PostEnclavesEnclaveIdentifierStatusResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostEnclavesEnclaveIdentifierStatusResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetEngineInfoResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EngineInfo + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetEngineInfoResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetEngineInfoResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetStarlarkExecutionsStarlarkExecutionUuidLogsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]StarlarkRunResponseLine + JSONDefault *ResponseInfo +} + +// Status returns HTTPResponse.Status +func (r GetStarlarkExecutionsStarlarkExecutionUuidLogsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetStarlarkExecutionsStarlarkExecutionUuidLogsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// DeleteEnclavesWithResponse request returning *DeleteEnclavesResponse +func (c *ClientWithResponses) DeleteEnclavesWithResponse(ctx context.Context, params *DeleteEnclavesParams, reqEditors ...RequestEditorFn) (*DeleteEnclavesResponse, error) { + rsp, err := c.DeleteEnclaves(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteEnclavesResponse(rsp) +} + +// GetEnclavesWithResponse request returning *GetEnclavesResponse +func (c *ClientWithResponses) GetEnclavesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEnclavesResponse, error) { + rsp, err := c.GetEnclaves(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesResponse(rsp) +} + +// PostEnclavesWithBodyWithResponse request with arbitrary body returning *PostEnclavesResponse +func (c *ClientWithResponses) PostEnclavesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesResponse, error) { + rsp, err := c.PostEnclavesWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesResponse(rsp) +} + +func (c *ClientWithResponses) PostEnclavesWithResponse(ctx context.Context, body PostEnclavesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesResponse, error) { + rsp, err := c.PostEnclaves(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesResponse(rsp) +} + +// GetEnclavesHistoryWithResponse request returning *GetEnclavesHistoryResponse +func (c *ClientWithResponses) GetEnclavesHistoryWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEnclavesHistoryResponse, error) { + rsp, err := c.GetEnclavesHistory(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesHistoryResponse(rsp) +} + +// DeleteEnclavesEnclaveIdentifierWithResponse request returning *DeleteEnclavesEnclaveIdentifierResponse +func (c *ClientWithResponses) DeleteEnclavesEnclaveIdentifierWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*DeleteEnclavesEnclaveIdentifierResponse, error) { + rsp, err := c.DeleteEnclavesEnclaveIdentifier(ctx, enclaveIdentifier, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteEnclavesEnclaveIdentifierResponse(rsp) +} + +// GetEnclavesEnclaveIdentifierWithResponse request returning *GetEnclavesEnclaveIdentifierResponse +func (c *ClientWithResponses) GetEnclavesEnclaveIdentifierWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierResponse, error) { + rsp, err := c.GetEnclavesEnclaveIdentifier(ctx, enclaveIdentifier, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesEnclaveIdentifierResponse(rsp) +} + +// GetEnclavesEnclaveIdentifierArtifactsWithResponse request returning *GetEnclavesEnclaveIdentifierArtifactsResponse +func (c *ClientWithResponses) GetEnclavesEnclaveIdentifierArtifactsWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierArtifactsResponse, error) { + rsp, err := c.GetEnclavesEnclaveIdentifierArtifacts(ctx, enclaveIdentifier, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesEnclaveIdentifierArtifactsResponse(rsp) +} + +// PostEnclavesEnclaveIdentifierArtifactsLocalFileWithBodyWithResponse request with arbitrary body returning *PostEnclavesEnclaveIdentifierArtifactsLocalFileResponse +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierArtifactsLocalFileWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierArtifactsLocalFileResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierArtifactsLocalFileWithBody(ctx, enclaveIdentifier, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierArtifactsLocalFileResponse(rsp) +} + +// PostEnclavesEnclaveIdentifierArtifactsRemoteFileWithBodyWithResponse request with arbitrary body returning *PostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierArtifactsRemoteFileWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierArtifactsRemoteFileWithBody(ctx, enclaveIdentifier, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse(rsp) +} + +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierArtifactsRemoteFileWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierArtifactsRemoteFileJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx, enclaveIdentifier, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse(rsp) +} + +// PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierWithBodyWithResponse request with arbitrary body returning *PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierWithBody(ctx, enclaveIdentifier, serviceIdentifier, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse(rsp) +} + +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, body PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier(ctx, enclaveIdentifier, serviceIdentifier, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse(rsp) +} + +// GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierWithResponse request returning *GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse +func (c *ClientWithResponses) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse, error) { + rsp, err := c.GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier(ctx, enclaveIdentifier, artifactIdentifier, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse(rsp) +} + +// GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadWithResponse request returning *GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadResponse +func (c *ClientWithResponses) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadResponse, error) { + rsp, err := c.GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload(ctx, enclaveIdentifier, artifactIdentifier, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadResponse(rsp) +} + +// GetEnclavesEnclaveIdentifierLogsWithResponse request returning *GetEnclavesEnclaveIdentifierLogsResponse +func (c *ClientWithResponses) GetEnclavesEnclaveIdentifierLogsWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *GetEnclavesEnclaveIdentifierLogsParams, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierLogsResponse, error) { + rsp, err := c.GetEnclavesEnclaveIdentifierLogs(ctx, enclaveIdentifier, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesEnclaveIdentifierLogsResponse(rsp) +} + +// GetEnclavesEnclaveIdentifierServicesWithResponse request returning *GetEnclavesEnclaveIdentifierServicesResponse +func (c *ClientWithResponses) GetEnclavesEnclaveIdentifierServicesWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *GetEnclavesEnclaveIdentifierServicesParams, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierServicesResponse, error) { + rsp, err := c.GetEnclavesEnclaveIdentifierServices(ctx, enclaveIdentifier, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesEnclaveIdentifierServicesResponse(rsp) +} + +// PostEnclavesEnclaveIdentifierServicesConnectionWithBodyWithResponse request with arbitrary body returning *PostEnclavesEnclaveIdentifierServicesConnectionResponse +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierServicesConnectionWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierServicesConnectionResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierServicesConnectionWithBody(ctx, enclaveIdentifier, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierServicesConnectionResponse(rsp) +} + +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierServicesConnectionWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierServicesConnectionResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierServicesConnection(ctx, enclaveIdentifier, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierServicesConnectionResponse(rsp) +} + +// GetEnclavesEnclaveIdentifierServicesHistoryWithResponse request returning *GetEnclavesEnclaveIdentifierServicesHistoryResponse +func (c *ClientWithResponses) GetEnclavesEnclaveIdentifierServicesHistoryWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierServicesHistoryResponse, error) { + rsp, err := c.GetEnclavesEnclaveIdentifierServicesHistory(ctx, enclaveIdentifier, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesEnclaveIdentifierServicesHistoryResponse(rsp) +} + +// GetEnclavesEnclaveIdentifierServicesServiceIdentifierWithResponse request returning *GetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse +func (c *ClientWithResponses) GetEnclavesEnclaveIdentifierServicesServiceIdentifierWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse, error) { + rsp, err := c.GetEnclavesEnclaveIdentifierServicesServiceIdentifier(ctx, enclaveIdentifier, serviceIdentifier, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse(rsp) +} + +// PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandWithBodyWithResponse request with arbitrary body returning *PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandWithBody(ctx, enclaveIdentifier, serviceIdentifier, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse(rsp) +} + +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, body PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand(ctx, enclaveIdentifier, serviceIdentifier, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse(rsp) +} + +// GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityWithResponse request returning *GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityResponse +func (c *ClientWithResponses) GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, portNumber PortNumber, params *GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityResponse, error) { + rsp, err := c.GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability(ctx, enclaveIdentifier, serviceIdentifier, portNumber, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityResponse(rsp) +} + +// GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsWithResponse request returning *GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsResponse +func (c *ClientWithResponses) GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, params *GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsResponse, error) { + rsp, err := c.GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs(ctx, enclaveIdentifier, serviceIdentifier, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsResponse(rsp) +} + +// GetEnclavesEnclaveIdentifierStarlarkWithResponse request returning *GetEnclavesEnclaveIdentifierStarlarkResponse +func (c *ClientWithResponses) GetEnclavesEnclaveIdentifierStarlarkWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierStarlarkResponse, error) { + rsp, err := c.GetEnclavesEnclaveIdentifierStarlark(ctx, enclaveIdentifier, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesEnclaveIdentifierStarlarkResponse(rsp) +} + +// PostEnclavesEnclaveIdentifierStarlarkPackagesWithBodyWithResponse request with arbitrary body returning *PostEnclavesEnclaveIdentifierStarlarkPackagesResponse +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierStarlarkPackagesWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStarlarkPackagesResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierStarlarkPackagesWithBody(ctx, enclaveIdentifier, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierStarlarkPackagesResponse(rsp) +} + +// PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdWithBodyWithResponse request with arbitrary body returning *PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, packageId PackageId, params *PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdWithBody(ctx, enclaveIdentifier, packageId, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse(rsp) +} + +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, packageId PackageId, params *PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams, body PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId(ctx, enclaveIdentifier, packageId, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse(rsp) +} + +// PostEnclavesEnclaveIdentifierStarlarkScriptsWithBodyWithResponse request with arbitrary body returning *PostEnclavesEnclaveIdentifierStarlarkScriptsResponse +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierStarlarkScriptsWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *PostEnclavesEnclaveIdentifierStarlarkScriptsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStarlarkScriptsResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierStarlarkScriptsWithBody(ctx, enclaveIdentifier, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierStarlarkScriptsResponse(rsp) +} + +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierStarlarkScriptsWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, params *PostEnclavesEnclaveIdentifierStarlarkScriptsParams, body PostEnclavesEnclaveIdentifierStarlarkScriptsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStarlarkScriptsResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierStarlarkScripts(ctx, enclaveIdentifier, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierStarlarkScriptsResponse(rsp) +} + +// GetEnclavesEnclaveIdentifierStatusWithResponse request returning *GetEnclavesEnclaveIdentifierStatusResponse +func (c *ClientWithResponses) GetEnclavesEnclaveIdentifierStatusWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, reqEditors ...RequestEditorFn) (*GetEnclavesEnclaveIdentifierStatusResponse, error) { + rsp, err := c.GetEnclavesEnclaveIdentifierStatus(ctx, enclaveIdentifier, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEnclavesEnclaveIdentifierStatusResponse(rsp) +} + +// PostEnclavesEnclaveIdentifierStatusWithBodyWithResponse request with arbitrary body returning *PostEnclavesEnclaveIdentifierStatusResponse +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierStatusWithBodyWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStatusResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierStatusWithBody(ctx, enclaveIdentifier, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierStatusResponse(rsp) +} + +func (c *ClientWithResponses) PostEnclavesEnclaveIdentifierStatusWithResponse(ctx context.Context, enclaveIdentifier EnclaveIdentifier, body PostEnclavesEnclaveIdentifierStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostEnclavesEnclaveIdentifierStatusResponse, error) { + rsp, err := c.PostEnclavesEnclaveIdentifierStatus(ctx, enclaveIdentifier, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostEnclavesEnclaveIdentifierStatusResponse(rsp) +} + +// GetEngineInfoWithResponse request returning *GetEngineInfoResponse +func (c *ClientWithResponses) GetEngineInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEngineInfoResponse, error) { + rsp, err := c.GetEngineInfo(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetEngineInfoResponse(rsp) +} + +// GetStarlarkExecutionsStarlarkExecutionUuidLogsWithResponse request returning *GetStarlarkExecutionsStarlarkExecutionUuidLogsResponse +func (c *ClientWithResponses) GetStarlarkExecutionsStarlarkExecutionUuidLogsWithResponse(ctx context.Context, starlarkExecutionUuid StarlarkExecutionUuid, reqEditors ...RequestEditorFn) (*GetStarlarkExecutionsStarlarkExecutionUuidLogsResponse, error) { + rsp, err := c.GetStarlarkExecutionsStarlarkExecutionUuidLogs(ctx, starlarkExecutionUuid, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetStarlarkExecutionsStarlarkExecutionUuidLogsResponse(rsp) +} + +// ParseDeleteEnclavesResponse parses an HTTP response from a DeleteEnclavesWithResponse call +func ParseDeleteEnclavesResponse(rsp *http.Response) (*DeleteEnclavesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteEnclavesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DeletionSummary + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesResponse parses an HTTP response from a GetEnclavesWithResponse call +func ParseGetEnclavesResponse(rsp *http.Response) (*GetEnclavesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest map[string]EnclaveInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostEnclavesResponse parses an HTTP response from a PostEnclavesWithResponse call +func ParsePostEnclavesResponse(rsp *http.Response) (*PostEnclavesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostEnclavesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EnclaveInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesHistoryResponse parses an HTTP response from a GetEnclavesHistoryWithResponse call +func ParseGetEnclavesHistoryResponse(rsp *http.Response) (*GetEnclavesHistoryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesHistoryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []EnclaveIdentifiers + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseDeleteEnclavesEnclaveIdentifierResponse parses an HTTP response from a DeleteEnclavesEnclaveIdentifierWithResponse call +func ParseDeleteEnclavesEnclaveIdentifierResponse(rsp *http.Response) (*DeleteEnclavesEnclaveIdentifierResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteEnclavesEnclaveIdentifierResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesEnclaveIdentifierResponse parses an HTTP response from a GetEnclavesEnclaveIdentifierWithResponse call +func ParseGetEnclavesEnclaveIdentifierResponse(rsp *http.Response) (*GetEnclavesEnclaveIdentifierResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesEnclaveIdentifierResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EnclaveInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesEnclaveIdentifierArtifactsResponse parses an HTTP response from a GetEnclavesEnclaveIdentifierArtifactsWithResponse call +func ParseGetEnclavesEnclaveIdentifierArtifactsResponse(rsp *http.Response) (*GetEnclavesEnclaveIdentifierArtifactsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesEnclaveIdentifierArtifactsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []FileArtifactReference + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostEnclavesEnclaveIdentifierArtifactsLocalFileResponse parses an HTTP response from a PostEnclavesEnclaveIdentifierArtifactsLocalFileWithResponse call +func ParsePostEnclavesEnclaveIdentifierArtifactsLocalFileResponse(rsp *http.Response) (*PostEnclavesEnclaveIdentifierArtifactsLocalFileResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostEnclavesEnclaveIdentifierArtifactsLocalFileResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest map[string]FileArtifactUploadResult + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse parses an HTTP response from a PostEnclavesEnclaveIdentifierArtifactsRemoteFileWithResponse call +func ParsePostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse(rsp *http.Response) (*PostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest FileArtifactReference + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse parses an HTTP response from a PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierWithResponse call +func ParsePostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse(rsp *http.Response) (*PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest FileArtifactReference + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse parses an HTTP response from a GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierWithResponse call +func ParseGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse(rsp *http.Response) (*GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []FileArtifactDescription + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadResponse parses an HTTP response from a GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadWithResponse call +func ParseGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadResponse(rsp *http.Response) (*GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesEnclaveIdentifierLogsResponse parses an HTTP response from a GetEnclavesEnclaveIdentifierLogsWithResponse call +func ParseGetEnclavesEnclaveIdentifierLogsResponse(rsp *http.Response) (*GetEnclavesEnclaveIdentifierLogsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesEnclaveIdentifierLogsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ServiceLogs + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesEnclaveIdentifierServicesResponse parses an HTTP response from a GetEnclavesEnclaveIdentifierServicesWithResponse call +func ParseGetEnclavesEnclaveIdentifierServicesResponse(rsp *http.Response) (*GetEnclavesEnclaveIdentifierServicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesEnclaveIdentifierServicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest map[string]ServiceInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostEnclavesEnclaveIdentifierServicesConnectionResponse parses an HTTP response from a PostEnclavesEnclaveIdentifierServicesConnectionWithResponse call +func ParsePostEnclavesEnclaveIdentifierServicesConnectionResponse(rsp *http.Response) (*PostEnclavesEnclaveIdentifierServicesConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostEnclavesEnclaveIdentifierServicesConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesEnclaveIdentifierServicesHistoryResponse parses an HTTP response from a GetEnclavesEnclaveIdentifierServicesHistoryWithResponse call +func ParseGetEnclavesEnclaveIdentifierServicesHistoryResponse(rsp *http.Response) (*GetEnclavesEnclaveIdentifierServicesHistoryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesEnclaveIdentifierServicesHistoryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []ServiceIdentifiers + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse parses an HTTP response from a GetEnclavesEnclaveIdentifierServicesServiceIdentifierWithResponse call +func ParseGetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse(rsp *http.Response) (*GetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ServiceInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse parses an HTTP response from a PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandWithResponse call +func ParsePostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse(rsp *http.Response) (*PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ExecCommandResult + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityResponse parses an HTTP response from a GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityWithResponse call +func ParseGetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityResponse(rsp *http.Response) (*GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsResponse parses an HTTP response from a GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsWithResponse call +func ParseGetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsResponse(rsp *http.Response) (*GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ServiceLogs + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesEnclaveIdentifierStarlarkResponse parses an HTTP response from a GetEnclavesEnclaveIdentifierStarlarkWithResponse call +func ParseGetEnclavesEnclaveIdentifierStarlarkResponse(rsp *http.Response) (*GetEnclavesEnclaveIdentifierStarlarkResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesEnclaveIdentifierStarlarkResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest StarlarkDescription + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostEnclavesEnclaveIdentifierStarlarkPackagesResponse parses an HTTP response from a PostEnclavesEnclaveIdentifierStarlarkPackagesWithResponse call +func ParsePostEnclavesEnclaveIdentifierStarlarkPackagesResponse(rsp *http.Response) (*PostEnclavesEnclaveIdentifierStarlarkPackagesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostEnclavesEnclaveIdentifierStarlarkPackagesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse parses an HTTP response from a PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdWithResponse call +func ParsePostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse(rsp *http.Response) (*PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest StarlarkRunResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostEnclavesEnclaveIdentifierStarlarkScriptsResponse parses an HTTP response from a PostEnclavesEnclaveIdentifierStarlarkScriptsWithResponse call +func ParsePostEnclavesEnclaveIdentifierStarlarkScriptsResponse(rsp *http.Response) (*PostEnclavesEnclaveIdentifierStarlarkScriptsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostEnclavesEnclaveIdentifierStarlarkScriptsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest StarlarkRunResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEnclavesEnclaveIdentifierStatusResponse parses an HTTP response from a GetEnclavesEnclaveIdentifierStatusWithResponse call +func ParseGetEnclavesEnclaveIdentifierStatusResponse(rsp *http.Response) (*GetEnclavesEnclaveIdentifierStatusResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEnclavesEnclaveIdentifierStatusResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EnclaveStatus + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostEnclavesEnclaveIdentifierStatusResponse parses an HTTP response from a PostEnclavesEnclaveIdentifierStatusWithResponse call +func ParsePostEnclavesEnclaveIdentifierStatusResponse(rsp *http.Response) (*PostEnclavesEnclaveIdentifierStatusResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostEnclavesEnclaveIdentifierStatusResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetEngineInfoResponse parses an HTTP response from a GetEngineInfoWithResponse call +func ParseGetEngineInfoResponse(rsp *http.Response) (*GetEngineInfoResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetEngineInfoResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EngineInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetStarlarkExecutionsStarlarkExecutionUuidLogsResponse parses an HTTP response from a GetStarlarkExecutionsStarlarkExecutionUuidLogsWithResponse call +func ParseGetStarlarkExecutionsStarlarkExecutionUuidLogsResponse(rsp *http.Response) (*GetStarlarkExecutionsStarlarkExecutionUuidLogsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetStarlarkExecutionsStarlarkExecutionUuidLogsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []StarlarkRunResponseLine + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest ResponseInfo + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} diff --git a/api/openapi/generators/go_client.cfg.yaml b/api/openapi/generators/go_client.cfg.yaml new file mode 100644 index 0000000000..bbf13270bc --- /dev/null +++ b/api/openapi/generators/go_client.cfg.yaml @@ -0,0 +1,7 @@ +package: core_rest_api +generate: + client: true +additional-imports: + - package: github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types + alias: . +output: api/golang/http_rest/client/rest_api_client.gen.go diff --git a/api/openapi/scripts/build.sh b/api/openapi/scripts/build.sh index 1c033b20ec..fd8c4888ab 100755 --- a/api/openapi/scripts/build.sh +++ b/api/openapi/scripts/build.sh @@ -14,5 +14,8 @@ oapi-codegen --config="$openapi_root_dirpath/generators/engine_server.cfg.yaml" oapi-codegen --config="$openapi_root_dirpath/generators/core_server.cfg.yaml" "$openapi_root_dirpath/specs/kurtosis_api.yaml" oapi-codegen --config="$openapi_root_dirpath/generators/websocket_server.cfg.yaml" "$openapi_root_dirpath/specs/kurtosis_api.yaml" +echo "Generating Go client code for REST API " +oapi-codegen --config="$openapi_root_dirpath/generators/go_client.cfg.yaml" "$openapi_root_dirpath/specs/kurtosis_api.yaml" + echo "Generating Typescript client code for REST API " openapi-typescript "$openapi_root_dirpath/specs/kurtosis_api.yaml" -o "$api_root_dirpath/typescript/src/engine/rest_api_bindings/types.d.ts" \ No newline at end of file