From 8c905c20a65cd0d784dc667eaf7647e365abcf73 Mon Sep 17 00:00:00 2001 From: vlastahajek Date: Tue, 9 Jun 2020 13:46:08 +0200 Subject: [PATCH 1/2] chore: Updated to latest swagger, with a custom fix --- domain/client.gen.go | 2986 ++++++++++++++++++++++++++++++++++----- domain/swagger.yml | 3188 +++++++++++++++++++++++++++--------------- domain/types.gen.go | 616 +++++++- 3 files changed, 5283 insertions(+), 1507 deletions(-) diff --git a/domain/client.gen.go b/domain/client.gen.go index 40a31b11..e072df0f 100644 --- a/domain/client.gen.go +++ b/domain/client.gen.go @@ -9,11 +9,13 @@ import ( "encoding/json" "fmt" "github.com/deepmap/oapi-codegen/pkg/runtime" + "gopkg.in/yaml.v2" "io" "io/ioutil" "net/http" "net/url" "strings" + "time" ihttp "github.com/influxdata/influxdb-client-go/internal/http" ) @@ -230,6 +232,25 @@ type ClientInterface interface { // DeleteDashboardsIDOwnersID request DeleteDashboardsIDOwnersID(ctx context.Context, dashboardID string, userID string, params *DeleteDashboardsIDOwnersIDParams) (*http.Response, error) + // GetDBRPs request + GetDBRPs(ctx context.Context, params *GetDBRPsParams) (*http.Response, error) + + // PostDBRP request with any body + PostDBRPWithBody(ctx context.Context, params *PostDBRPParams, contentType string, body io.Reader) (*http.Response, error) + + PostDBRP(ctx context.Context, params *PostDBRPParams, body PostDBRPJSONRequestBody) (*http.Response, error) + + // DeleteDBRPID request + DeleteDBRPID(ctx context.Context, dbrpID string, params *DeleteDBRPIDParams) (*http.Response, error) + + // GetDBRPsID request + GetDBRPsID(ctx context.Context, dbrpID string, params *GetDBRPsIDParams) (*http.Response, error) + + // PatchDBRPID request with any body + PatchDBRPIDWithBody(ctx context.Context, dbrpID string, params *PatchDBRPIDParams, contentType string, body io.Reader) (*http.Response, error) + + PatchDBRPID(ctx context.Context, dbrpID string, params *PatchDBRPIDParams, body PatchDBRPIDJSONRequestBody) (*http.Response, error) + // PostDelete request with any body PostDeleteWithBody(ctx context.Context, params *PostDeleteParams, contentType string, body io.Reader) (*http.Response, error) @@ -265,6 +286,9 @@ type ClientInterface interface { // DeleteDocumentsTemplatesIDLabelsID request DeleteDocumentsTemplatesIDLabelsID(ctx context.Context, templateID string, labelID string, params *DeleteDocumentsTemplatesIDLabelsIDParams) (*http.Response, error) + // GetFlags request + GetFlags(ctx context.Context, params *GetFlagsParams) (*http.Response, error) + // GetHealth request GetHealth(ctx context.Context, params *GetHealthParams) (*http.Response, error) @@ -387,6 +411,17 @@ type ClientInterface interface { PatchOrgsID(ctx context.Context, orgID string, params *PatchOrgsIDParams, body PatchOrgsIDJSONRequestBody) (*http.Response, error) + // PostOrgsIDInvites request with any body + PostOrgsIDInvitesWithBody(ctx context.Context, orgID string, params *PostOrgsIDInvitesParams, contentType string, body io.Reader) (*http.Response, error) + + PostOrgsIDInvites(ctx context.Context, orgID string, params *PostOrgsIDInvitesParams, body PostOrgsIDInvitesJSONRequestBody) (*http.Response, error) + + // DeleteOrgsIDInviteID request + DeleteOrgsIDInviteID(ctx context.Context, orgID string, inviteID string, params *DeleteOrgsIDInviteIDParams) (*http.Response, error) + + // PostOrgsIDInviteIDResend request + PostOrgsIDInviteIDResend(ctx context.Context, orgID string, inviteID string, params *PostOrgsIDInviteIDResendParams) (*http.Response, error) + // GetOrgsIDLabels request GetOrgsIDLabels(ctx context.Context, orgID string, params *GetOrgsIDLabelsParams) (*http.Response, error) @@ -436,6 +471,12 @@ type ClientInterface interface { PostOrgsIDSecrets(ctx context.Context, orgID string, params *PostOrgsIDSecretsParams, body PostOrgsIDSecretsJSONRequestBody) (*http.Response, error) + // GetCloudUsers request + GetCloudUsers(ctx context.Context, orgID string, params *GetCloudUsersParams) (*http.Response, error) + + // DeleteOrgsIDCloudUserID request + DeleteOrgsIDCloudUserID(ctx context.Context, orgID string, userID string, params *DeleteOrgsIDCloudUserIDParams) (*http.Response, error) + // CreatePkg request with any body CreatePkgWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error) @@ -446,6 +487,20 @@ type ClientInterface interface { ApplyPkg(ctx context.Context, body ApplyPkgJSONRequestBody) (*http.Response, error) + // ListStacks request + ListStacks(ctx context.Context, params *ListStacksParams) (*http.Response, error) + + // CreateStack request with any body + CreateStackWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error) + + CreateStack(ctx context.Context, body CreateStackJSONRequestBody) (*http.Response, error) + + // DeleteStack request + DeleteStack(ctx context.Context, stackId string, params *DeleteStackParams) (*http.Response, error) + + // ExportStack request + ExportStack(ctx context.Context, stackId string, params *ExportStackParams) (*http.Response, error) + // PostQuery request with any body PostQueryWithBody(ctx context.Context, params *PostQueryParams, contentType string, body io.Reader) (*http.Response, error) @@ -535,6 +590,11 @@ type ClientInterface interface { PostSetup(ctx context.Context, params *PostSetupParams, body PostSetupJSONRequestBody) (*http.Response, error) + // PostSetupUser request with any body + PostSetupUserWithBody(ctx context.Context, params *PostSetupUserParams, contentType string, body io.Reader) (*http.Response, error) + + PostSetupUser(ctx context.Context, params *PostSetupUserParams, body PostSetupUserJSONRequestBody) (*http.Response, error) + // PostSignin request PostSignin(ctx context.Context, params *PostSigninParams) (*http.Response, error) @@ -1410,6 +1470,69 @@ func (c *Client) DeleteDashboardsIDOwnersID(ctx context.Context, dashboardID str return c.service.DoHttpRequestWithResponse(req, nil) } +func (c *Client) GetDBRPs(ctx context.Context, params *GetDBRPsParams) (*http.Response, error) { + req, err := NewGetDBRPsRequest(c.service.ServerApiUrl(), params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) PostDBRPWithBody(ctx context.Context, params *PostDBRPParams, contentType string, body io.Reader) (*http.Response, error) { + req, err := NewPostDBRPRequestWithBody(c.service.ServerApiUrl(), params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) PostDBRP(ctx context.Context, params *PostDBRPParams, body PostDBRPJSONRequestBody) (*http.Response, error) { + req, err := NewPostDBRPRequest(c.service.ServerApiUrl(), params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) DeleteDBRPID(ctx context.Context, dbrpID string, params *DeleteDBRPIDParams) (*http.Response, error) { + req, err := NewDeleteDBRPIDRequest(c.service.ServerApiUrl(), dbrpID, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) GetDBRPsID(ctx context.Context, dbrpID string, params *GetDBRPsIDParams) (*http.Response, error) { + req, err := NewGetDBRPsIDRequest(c.service.ServerApiUrl(), dbrpID, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) PatchDBRPIDWithBody(ctx context.Context, dbrpID string, params *PatchDBRPIDParams, contentType string, body io.Reader) (*http.Response, error) { + req, err := NewPatchDBRPIDRequestWithBody(c.service.ServerApiUrl(), dbrpID, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) PatchDBRPID(ctx context.Context, dbrpID string, params *PatchDBRPIDParams, body PatchDBRPIDJSONRequestBody) (*http.Response, error) { + req, err := NewPatchDBRPIDRequest(c.service.ServerApiUrl(), dbrpID, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + func (c *Client) PostDeleteWithBody(ctx context.Context, params *PostDeleteParams, contentType string, body io.Reader) (*http.Response, error) { req, err := NewPostDeleteRequestWithBody(c.service.ServerApiUrl(), params, contentType, body) if err != nil { @@ -1527,6 +1650,15 @@ func (c *Client) DeleteDocumentsTemplatesIDLabelsID(ctx context.Context, templat return c.service.DoHttpRequestWithResponse(req, nil) } +func (c *Client) GetFlags(ctx context.Context, params *GetFlagsParams) (*http.Response, error) { + req, err := NewGetFlagsRequest(c.service.ServerApiUrl(), params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + func (c *Client) GetHealth(ctx context.Context, params *GetHealthParams) (*http.Response, error) { req, err := NewGetHealthRequest(c.service.ServerUrl(), params) if err != nil { @@ -1932,6 +2064,42 @@ func (c *Client) PatchOrgsID(ctx context.Context, orgID string, params *PatchOrg return c.service.DoHttpRequestWithResponse(req, nil) } +func (c *Client) PostOrgsIDInvitesWithBody(ctx context.Context, orgID string, params *PostOrgsIDInvitesParams, contentType string, body io.Reader) (*http.Response, error) { + req, err := NewPostOrgsIDInvitesRequestWithBody(c.service.ServerApiUrl(), orgID, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) PostOrgsIDInvites(ctx context.Context, orgID string, params *PostOrgsIDInvitesParams, body PostOrgsIDInvitesJSONRequestBody) (*http.Response, error) { + req, err := NewPostOrgsIDInvitesRequest(c.service.ServerApiUrl(), orgID, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) DeleteOrgsIDInviteID(ctx context.Context, orgID string, inviteID string, params *DeleteOrgsIDInviteIDParams) (*http.Response, error) { + req, err := NewDeleteOrgsIDInviteIDRequest(c.service.ServerApiUrl(), orgID, inviteID, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) PostOrgsIDInviteIDResend(ctx context.Context, orgID string, inviteID string, params *PostOrgsIDInviteIDResendParams) (*http.Response, error) { + req, err := NewPostOrgsIDInviteIDResendRequest(c.service.ServerApiUrl(), orgID, inviteID, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + func (c *Client) GetOrgsIDLabels(ctx context.Context, orgID string, params *GetOrgsIDLabelsParams) (*http.Response, error) { req, err := NewGetOrgsIDLabelsRequest(c.service.ServerApiUrl(), orgID, params) if err != nil { @@ -2094,6 +2262,24 @@ func (c *Client) PostOrgsIDSecrets(ctx context.Context, orgID string, params *Po return c.service.DoHttpRequestWithResponse(req, nil) } +func (c *Client) GetCloudUsers(ctx context.Context, orgID string, params *GetCloudUsersParams) (*http.Response, error) { + req, err := NewGetCloudUsersRequest(c.service.ServerApiUrl(), orgID, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) DeleteOrgsIDCloudUserID(ctx context.Context, orgID string, userID string, params *DeleteOrgsIDCloudUserIDParams) (*http.Response, error) { + req, err := NewDeleteOrgsIDCloudUserIDRequest(c.service.ServerApiUrl(), orgID, userID, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + func (c *Client) CreatePkgWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error) { req, err := NewCreatePkgRequestWithBody(c.service.ServerApiUrl(), contentType, body) if err != nil { @@ -2130,6 +2316,51 @@ func (c *Client) ApplyPkg(ctx context.Context, body ApplyPkgJSONRequestBody) (*h return c.service.DoHttpRequestWithResponse(req, nil) } +func (c *Client) ListStacks(ctx context.Context, params *ListStacksParams) (*http.Response, error) { + req, err := NewListStacksRequest(c.service.ServerApiUrl(), params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) CreateStackWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error) { + req, err := NewCreateStackRequestWithBody(c.service.ServerApiUrl(), contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) CreateStack(ctx context.Context, body CreateStackJSONRequestBody) (*http.Response, error) { + req, err := NewCreateStackRequest(c.service.ServerApiUrl(), body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) DeleteStack(ctx context.Context, stackId string, params *DeleteStackParams) (*http.Response, error) { + req, err := NewDeleteStackRequest(c.service.ServerApiUrl(), stackId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) ExportStack(ctx context.Context, stackId string, params *ExportStackParams) (*http.Response, error) { + req, err := NewExportStackRequest(c.service.ServerApiUrl(), stackId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + func (c *Client) PostQueryWithBody(ctx context.Context, params *PostQueryParams, contentType string, body io.Reader) (*http.Response, error) { req, err := NewPostQueryRequestWithBody(c.service.ServerApiUrl(), params, contentType, body) if err != nil { @@ -2427,6 +2658,24 @@ func (c *Client) PostSetup(ctx context.Context, params *PostSetupParams, body Po return c.service.DoHttpRequestWithResponse(req, nil) } +func (c *Client) PostSetupUserWithBody(ctx context.Context, params *PostSetupUserParams, contentType string, body io.Reader) (*http.Response, error) { + req, err := NewPostSetupUserRequestWithBody(c.service.ServerApiUrl(), params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + +func (c *Client) PostSetupUser(ctx context.Context, params *PostSetupUserParams, body PostSetupUserJSONRequestBody) (*http.Response, error) { + req, err := NewPostSetupUserRequest(c.service.ServerApiUrl(), params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + return c.service.DoHttpRequestWithResponse(req, nil) +} + func (c *Client) PostSignin(ctx context.Context, params *PostSigninParams) (*http.Response, error) { req, err := NewPostSigninRequest(c.service.ServerApiUrl(), params) if err != nil { @@ -6124,19 +6373,8 @@ func NewDeleteDashboardsIDOwnersIDRequest(server string, dashboardID string, use return req, nil } -// NewPostDeleteRequest calls the generic PostDelete builder with application/json body -func NewPostDeleteRequest(server string, params *PostDeleteParams, body PostDeleteJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostDeleteRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostDeleteRequestWithBody generates requests for PostDelete with any type of body -func NewPostDeleteRequestWithBody(server string, params *PostDeleteParams, contentType string, body io.Reader) (*http.Request, error) { +// NewGetDBRPsRequest generates requests for GetDBRPs +func NewGetDBRPsRequest(server string, params *GetDBRPsParams) (*http.Request, error) { var err error queryUrl, err := url.Parse(server) @@ -6144,7 +6382,7 @@ func NewPostDeleteRequestWithBody(server string, params *PostDeleteParams, conte return nil, err } - basePath := fmt.Sprintf("/delete") + basePath := fmt.Sprintf("/dbrps") if basePath[0] == '/' { basePath = basePath[1:] } @@ -6156,9 +6394,21 @@ func NewPostDeleteRequestWithBody(server string, params *PostDeleteParams, conte queryValues := queryUrl.Query() - if params.Org != nil { + if queryFrag, err := runtime.StyleParam("form", true, "orgID", params.OrgID); 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 queryFrag, err := runtime.StyleParam("form", true, "org", *params.Org); err != nil { + if params.Id != nil { + + if queryFrag, err := runtime.StyleParam("form", true, "id", *params.Id); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6172,9 +6422,9 @@ func NewPostDeleteRequestWithBody(server string, params *PostDeleteParams, conte } - if params.Bucket != nil { + if params.BucketID != nil { - if queryFrag, err := runtime.StyleParam("form", true, "bucket", *params.Bucket); err != nil { + if queryFrag, err := runtime.StyleParam("form", true, "bucketID", *params.BucketID); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6188,9 +6438,9 @@ func NewPostDeleteRequestWithBody(server string, params *PostDeleteParams, conte } - if params.OrgID != nil { + if params.Default != nil { - if queryFrag, err := runtime.StyleParam("form", true, "orgID", *params.OrgID); err != nil { + if queryFrag, err := runtime.StyleParam("form", true, "default", *params.Default); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6204,9 +6454,25 @@ func NewPostDeleteRequestWithBody(server string, params *PostDeleteParams, conte } - if params.BucketID != nil { + if params.Db != nil { - if queryFrag, err := runtime.StyleParam("form", true, "bucketID", *params.BucketID); err != nil { + if queryFrag, err := runtime.StyleParam("form", true, "db", *params.Db); 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.Rp != nil { + + if queryFrag, err := runtime.StyleParam("form", true, "rp", *params.Rp); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6222,7 +6488,7 @@ func NewPostDeleteRequestWithBody(server string, params *PostDeleteParams, conte queryUrl.RawQuery = queryValues.Encode() - req, err := http.NewRequest("POST", queryUrl.String(), body) + req, err := http.NewRequest("GET", queryUrl.String(), nil) if err != nil { return nil, err } @@ -6238,12 +6504,22 @@ func NewPostDeleteRequestWithBody(server string, params *PostDeleteParams, conte req.Header.Add("Zap-Trace-Span", headerParam0) } - req.Header.Add("Content-Type", contentType) return req, nil } -// NewGetDocumentsTemplatesRequest generates requests for GetDocumentsTemplates -func NewGetDocumentsTemplatesRequest(server string, params *GetDocumentsTemplatesParams) (*http.Request, error) { +// NewPostDBRPRequest calls the generic PostDBRP builder with application/json body +func NewPostDBRPRequest(server string, params *PostDBRPParams, body PostDBRPJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostDBRPRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostDBRPRequestWithBody generates requests for PostDBRP with any type of body +func NewPostDBRPRequestWithBody(server string, params *PostDBRPParams, contentType string, body io.Reader) (*http.Request, error) { var err error queryUrl, err := url.Parse(server) @@ -6251,7 +6527,7 @@ func NewGetDocumentsTemplatesRequest(server string, params *GetDocumentsTemplate return nil, err } - basePath := fmt.Sprintf("/documents/templates") + basePath := fmt.Sprintf("/dbrps") if basePath[0] == '/' { basePath = basePath[1:] } @@ -6261,26 +6537,378 @@ func NewGetDocumentsTemplatesRequest(server string, params *GetDocumentsTemplate return nil, err } - queryValues := queryUrl.Query() + req, err := http.NewRequest("POST", queryUrl.String(), body) + if err != nil { + return nil, err + } - if params.Org != nil { + if params.ZapTraceSpan != nil { + var headerParam0 string - if queryFrag, err := runtime.StyleParam("form", true, "org", *params.Org); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } } + req.Header.Add("Zap-Trace-Span", headerParam0) } - if params.OrgID != nil { - + req.Header.Add("Content-Type", contentType) + return req, nil +} + +// NewDeleteDBRPIDRequest generates requests for DeleteDBRPID +func NewDeleteDBRPIDRequest(server string, dbrpID string, params *DeleteDBRPIDParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParam("simple", false, "dbrpID", dbrpID) + if err != nil { + return nil, err + } + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/dbrps/%s", pathParam0) + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + queryValues := queryUrl.Query() + + if queryFrag, err := runtime.StyleParam("form", true, "orgID", params.OrgID); 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 + } + + if params.ZapTraceSpan != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { + return nil, err + } + + req.Header.Add("Zap-Trace-Span", headerParam0) + } + + return req, nil +} + +// NewGetDBRPsIDRequest generates requests for GetDBRPsID +func NewGetDBRPsIDRequest(server string, dbrpID string, params *GetDBRPsIDParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParam("simple", false, "dbrpID", dbrpID) + if err != nil { + return nil, err + } + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/dbrps/%s", pathParam0) + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + queryValues := queryUrl.Query() + + if queryFrag, err := runtime.StyleParam("form", true, "orgID", params.OrgID); 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 + } + + if params.ZapTraceSpan != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { + return nil, err + } + + req.Header.Add("Zap-Trace-Span", headerParam0) + } + + return req, nil +} + +// NewPatchDBRPIDRequest calls the generic PatchDBRPID builder with application/json body +func NewPatchDBRPIDRequest(server string, dbrpID string, params *PatchDBRPIDParams, body PatchDBRPIDJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchDBRPIDRequestWithBody(server, dbrpID, params, "application/json", bodyReader) +} + +// NewPatchDBRPIDRequestWithBody generates requests for PatchDBRPID with any type of body +func NewPatchDBRPIDRequestWithBody(server string, dbrpID string, params *PatchDBRPIDParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParam("simple", false, "dbrpID", dbrpID) + if err != nil { + return nil, err + } + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/dbrps/%s", pathParam0) + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + queryValues := queryUrl.Query() + + if queryFrag, err := runtime.StyleParam("form", true, "orgID", params.OrgID); 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("PATCH", queryUrl.String(), body) + if err != nil { + return nil, err + } + + if params.ZapTraceSpan != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { + return nil, err + } + + req.Header.Add("Zap-Trace-Span", headerParam0) + } + + req.Header.Add("Content-Type", contentType) + return req, nil +} + +// NewPostDeleteRequest calls the generic PostDelete builder with application/json body +func NewPostDeleteRequest(server string, params *PostDeleteParams, body PostDeleteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostDeleteRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostDeleteRequestWithBody generates requests for PostDelete with any type of body +func NewPostDeleteRequestWithBody(server string, params *PostDeleteParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/delete") + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + queryValues := queryUrl.Query() + + if params.Org != nil { + + if queryFrag, err := runtime.StyleParam("form", true, "org", *params.Org); 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.Bucket != nil { + + if queryFrag, err := runtime.StyleParam("form", true, "bucket", *params.Bucket); 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.OrgID != nil { + + if queryFrag, err := runtime.StyleParam("form", true, "orgID", *params.OrgID); 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.BucketID != nil { + + if queryFrag, err := runtime.StyleParam("form", true, "bucketID", *params.BucketID); 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 + } + + if params.ZapTraceSpan != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { + return nil, err + } + + req.Header.Add("Zap-Trace-Span", headerParam0) + } + + req.Header.Add("Content-Type", contentType) + return req, nil +} + +// NewGetDocumentsTemplatesRequest generates requests for GetDocumentsTemplates +func NewGetDocumentsTemplatesRequest(server string, params *GetDocumentsTemplatesParams) (*http.Request, error) { + var err error + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/documents/templates") + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + queryValues := queryUrl.Query() + + if params.Org != nil { + + if queryFrag, err := runtime.StyleParam("form", true, "org", *params.Org); 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.OrgID != nil { + if queryFrag, err := runtime.StyleParam("form", true, "orgID", *params.OrgID); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { @@ -6667,6 +7295,44 @@ func NewDeleteDocumentsTemplatesIDLabelsIDRequest(server string, templateID stri return req, nil } +// NewGetFlagsRequest generates requests for GetFlags +func NewGetFlagsRequest(server string, params *GetFlagsParams) (*http.Request, error) { + var err error + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/flags") + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryUrl.String(), nil) + if err != nil { + return nil, err + } + + if params.ZapTraceSpan != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { + return nil, err + } + + req.Header.Add("Zap-Trace-Span", headerParam0) + } + + return req, nil +} + // NewGetHealthRequest generates requests for GetHealth func NewGetHealthRequest(server string, params *GetHealthParams) (*http.Request, error) { var err error @@ -8200,7 +8866,154 @@ func NewPostOrgsRequestWithBody(server string, params *PostOrgsParams, contentTy return nil, err } - req, err := http.NewRequest("POST", queryUrl.String(), body) + req, err := http.NewRequest("POST", queryUrl.String(), body) + if err != nil { + return nil, err + } + + if params.ZapTraceSpan != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { + return nil, err + } + + req.Header.Add("Zap-Trace-Span", headerParam0) + } + + req.Header.Add("Content-Type", contentType) + return req, nil +} + +// NewDeleteOrgsIDRequest generates requests for DeleteOrgsID +func NewDeleteOrgsIDRequest(server string, orgID string, params *DeleteOrgsIDParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParam("simple", false, "orgID", orgID) + if err != nil { + return nil, err + } + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/orgs/%s", pathParam0) + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryUrl.String(), nil) + if err != nil { + return nil, err + } + + if params.ZapTraceSpan != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { + return nil, err + } + + req.Header.Add("Zap-Trace-Span", headerParam0) + } + + return req, nil +} + +// NewGetOrgsIDRequest generates requests for GetOrgsID +func NewGetOrgsIDRequest(server string, orgID string, params *GetOrgsIDParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParam("simple", false, "orgID", orgID) + if err != nil { + return nil, err + } + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/orgs/%s", pathParam0) + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryUrl.String(), nil) + if err != nil { + return nil, err + } + + if params.ZapTraceSpan != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { + return nil, err + } + + req.Header.Add("Zap-Trace-Span", headerParam0) + } + + return req, nil +} + +// NewPatchOrgsIDRequest calls the generic PatchOrgsID builder with application/json body +func NewPatchOrgsIDRequest(server string, orgID string, params *PatchOrgsIDParams, body PatchOrgsIDJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrgsIDRequestWithBody(server, orgID, params, "application/json", bodyReader) +} + +// NewPatchOrgsIDRequestWithBody generates requests for PatchOrgsID with any type of body +func NewPatchOrgsIDRequestWithBody(server string, orgID string, params *PatchOrgsIDParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParam("simple", false, "orgID", orgID) + if err != nil { + return nil, err + } + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/orgs/%s", pathParam0) + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryUrl.String(), body) if err != nil { return nil, err } @@ -8220,8 +9033,19 @@ func NewPostOrgsRequestWithBody(server string, params *PostOrgsParams, contentTy return req, nil } -// NewDeleteOrgsIDRequest generates requests for DeleteOrgsID -func NewDeleteOrgsIDRequest(server string, orgID string, params *DeleteOrgsIDParams) (*http.Request, error) { +// NewPostOrgsIDInvitesRequest calls the generic PostOrgsIDInvites builder with application/json body +func NewPostOrgsIDInvitesRequest(server string, orgID string, params *PostOrgsIDInvitesParams, body PostOrgsIDInvitesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrgsIDInvitesRequestWithBody(server, orgID, params, "application/json", bodyReader) +} + +// NewPostOrgsIDInvitesRequestWithBody generates requests for PostOrgsIDInvites with any type of body +func NewPostOrgsIDInvitesRequestWithBody(server string, orgID string, params *PostOrgsIDInvitesParams, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -8236,7 +9060,7 @@ func NewDeleteOrgsIDRequest(server string, orgID string, params *DeleteOrgsIDPar return nil, err } - basePath := fmt.Sprintf("/orgs/%s", pathParam0) + basePath := fmt.Sprintf("/orgs/%s/invites", pathParam0) if basePath[0] == '/' { basePath = basePath[1:] } @@ -8246,7 +9070,7 @@ func NewDeleteOrgsIDRequest(server string, orgID string, params *DeleteOrgsIDPar return nil, err } - req, err := http.NewRequest("DELETE", queryUrl.String(), nil) + req, err := http.NewRequest("POST", queryUrl.String(), body) if err != nil { return nil, err } @@ -8262,11 +9086,12 @@ func NewDeleteOrgsIDRequest(server string, orgID string, params *DeleteOrgsIDPar req.Header.Add("Zap-Trace-Span", headerParam0) } + req.Header.Add("Content-Type", contentType) return req, nil } -// NewGetOrgsIDRequest generates requests for GetOrgsID -func NewGetOrgsIDRequest(server string, orgID string, params *GetOrgsIDParams) (*http.Request, error) { +// NewDeleteOrgsIDInviteIDRequest generates requests for DeleteOrgsIDInviteID +func NewDeleteOrgsIDInviteIDRequest(server string, orgID string, inviteID string, params *DeleteOrgsIDInviteIDParams) (*http.Request, error) { var err error var pathParam0 string @@ -8276,12 +9101,19 @@ func NewGetOrgsIDRequest(server string, orgID string, params *GetOrgsIDParams) ( return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParam("simple", false, "inviteID", inviteID) + if err != nil { + return nil, err + } + queryUrl, err := url.Parse(server) if err != nil { return nil, err } - basePath := fmt.Sprintf("/orgs/%s", pathParam0) + basePath := fmt.Sprintf("/orgs/%s/invites/%s", pathParam0, pathParam1) if basePath[0] == '/' { basePath = basePath[1:] } @@ -8291,7 +9123,7 @@ func NewGetOrgsIDRequest(server string, orgID string, params *GetOrgsIDParams) ( return nil, err } - req, err := http.NewRequest("GET", queryUrl.String(), nil) + req, err := http.NewRequest("DELETE", queryUrl.String(), nil) if err != nil { return nil, err } @@ -8310,19 +9142,8 @@ func NewGetOrgsIDRequest(server string, orgID string, params *GetOrgsIDParams) ( return req, nil } -// NewPatchOrgsIDRequest calls the generic PatchOrgsID builder with application/json body -func NewPatchOrgsIDRequest(server string, orgID string, params *PatchOrgsIDParams, body PatchOrgsIDJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchOrgsIDRequestWithBody(server, orgID, params, "application/json", bodyReader) -} - -// NewPatchOrgsIDRequestWithBody generates requests for PatchOrgsID with any type of body -func NewPatchOrgsIDRequestWithBody(server string, orgID string, params *PatchOrgsIDParams, contentType string, body io.Reader) (*http.Request, error) { +// NewPostOrgsIDInviteIDResendRequest generates requests for PostOrgsIDInviteIDResend +func NewPostOrgsIDInviteIDResendRequest(server string, orgID string, inviteID string, params *PostOrgsIDInviteIDResendParams) (*http.Request, error) { var err error var pathParam0 string @@ -8332,12 +9153,19 @@ func NewPatchOrgsIDRequestWithBody(server string, orgID string, params *PatchOrg return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParam("simple", false, "inviteID", inviteID) + if err != nil { + return nil, err + } + queryUrl, err := url.Parse(server) if err != nil { return nil, err } - basePath := fmt.Sprintf("/orgs/%s", pathParam0) + basePath := fmt.Sprintf("/orgs/%s/invites/%s/resend", pathParam0, pathParam1) if basePath[0] == '/' { basePath = basePath[1:] } @@ -8347,7 +9175,7 @@ func NewPatchOrgsIDRequestWithBody(server string, orgID string, params *PatchOrg return nil, err } - req, err := http.NewRequest("PATCH", queryUrl.String(), body) + req, err := http.NewRequest("POST", queryUrl.String(), nil) if err != nil { return nil, err } @@ -8363,7 +9191,6 @@ func NewPatchOrgsIDRequestWithBody(server string, orgID string, params *PatchOrg req.Header.Add("Zap-Trace-Span", headerParam0) } - req.Header.Add("Content-Type", contentType) return req, nil } @@ -8662,9 +9489,216 @@ func NewPostOrgsIDMembersRequest(server string, orgID string, params *PostOrgsID func NewPostOrgsIDMembersRequestWithBody(server string, orgID string, params *PostOrgsIDMembersParams, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string + var pathParam0 string + + pathParam0, err = runtime.StyleParam("simple", false, "orgID", orgID) + if err != nil { + return nil, err + } + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/orgs/%s/members", pathParam0) + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryUrl.String(), body) + if err != nil { + return nil, err + } + + if params.ZapTraceSpan != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { + return nil, err + } + + req.Header.Add("Zap-Trace-Span", headerParam0) + } + + req.Header.Add("Content-Type", contentType) + return req, nil +} + +// NewDeleteOrgsIDMembersIDRequest generates requests for DeleteOrgsIDMembersID +func NewDeleteOrgsIDMembersIDRequest(server string, orgID string, userID string, params *DeleteOrgsIDMembersIDParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParam("simple", false, "orgID", orgID) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParam("simple", false, "userID", userID) + if err != nil { + return nil, err + } + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/orgs/%s/members/%s", pathParam0, pathParam1) + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryUrl.String(), nil) + if err != nil { + return nil, err + } + + if params.ZapTraceSpan != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { + return nil, err + } + + req.Header.Add("Zap-Trace-Span", headerParam0) + } + + return req, nil +} + +// NewGetOrgsIDOwnersRequest generates requests for GetOrgsIDOwners +func NewGetOrgsIDOwnersRequest(server string, orgID string, params *GetOrgsIDOwnersParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParam("simple", false, "orgID", orgID) + if err != nil { + return nil, err + } + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/orgs/%s/owners", pathParam0) + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryUrl.String(), nil) + if err != nil { + return nil, err + } + + if params.ZapTraceSpan != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { + return nil, err + } + + req.Header.Add("Zap-Trace-Span", headerParam0) + } + + return req, nil +} + +// NewPostOrgsIDOwnersRequest calls the generic PostOrgsIDOwners builder with application/json body +func NewPostOrgsIDOwnersRequest(server string, orgID string, params *PostOrgsIDOwnersParams, body PostOrgsIDOwnersJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrgsIDOwnersRequestWithBody(server, orgID, params, "application/json", bodyReader) +} + +// NewPostOrgsIDOwnersRequestWithBody generates requests for PostOrgsIDOwners with any type of body +func NewPostOrgsIDOwnersRequestWithBody(server string, orgID string, params *PostOrgsIDOwnersParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParam("simple", false, "orgID", orgID) + if err != nil { + return nil, err + } + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/orgs/%s/owners", pathParam0) + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryUrl.String(), body) + if err != nil { + return nil, err + } + + if params.ZapTraceSpan != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { + return nil, err + } + + req.Header.Add("Zap-Trace-Span", headerParam0) + } + + req.Header.Add("Content-Type", contentType) + return req, nil +} + +// NewDeleteOrgsIDOwnersIDRequest generates requests for DeleteOrgsIDOwnersID +func NewDeleteOrgsIDOwnersIDRequest(server string, orgID string, userID string, params *DeleteOrgsIDOwnersIDParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParam("simple", false, "orgID", orgID) + if err != nil { + return nil, err + } + + var pathParam1 string - pathParam0, err = runtime.StyleParam("simple", false, "orgID", orgID) + pathParam1, err = runtime.StyleParam("simple", false, "userID", userID) if err != nil { return nil, err } @@ -8674,7 +9708,7 @@ func NewPostOrgsIDMembersRequestWithBody(server string, orgID string, params *Po return nil, err } - basePath := fmt.Sprintf("/orgs/%s/members", pathParam0) + basePath := fmt.Sprintf("/orgs/%s/owners/%s", pathParam0, pathParam1) if basePath[0] == '/' { basePath = basePath[1:] } @@ -8684,7 +9718,7 @@ func NewPostOrgsIDMembersRequestWithBody(server string, orgID string, params *Po return nil, err } - req, err := http.NewRequest("POST", queryUrl.String(), body) + req, err := http.NewRequest("DELETE", queryUrl.String(), nil) if err != nil { return nil, err } @@ -8700,12 +9734,11 @@ func NewPostOrgsIDMembersRequestWithBody(server string, orgID string, params *Po req.Header.Add("Zap-Trace-Span", headerParam0) } - req.Header.Add("Content-Type", contentType) return req, nil } -// NewDeleteOrgsIDMembersIDRequest generates requests for DeleteOrgsIDMembersID -func NewDeleteOrgsIDMembersIDRequest(server string, orgID string, userID string, params *DeleteOrgsIDMembersIDParams) (*http.Request, error) { +// NewGetOrgsIDSecretsRequest generates requests for GetOrgsIDSecrets +func NewGetOrgsIDSecretsRequest(server string, orgID string, params *GetOrgsIDSecretsParams) (*http.Request, error) { var err error var pathParam0 string @@ -8715,19 +9748,12 @@ func NewDeleteOrgsIDMembersIDRequest(server string, orgID string, userID string, return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParam("simple", false, "userID", userID) - if err != nil { - return nil, err - } - queryUrl, err := url.Parse(server) if err != nil { return nil, err } - basePath := fmt.Sprintf("/orgs/%s/members/%s", pathParam0, pathParam1) + basePath := fmt.Sprintf("/orgs/%s/secrets", pathParam0) if basePath[0] == '/' { basePath = basePath[1:] } @@ -8737,7 +9763,7 @@ func NewDeleteOrgsIDMembersIDRequest(server string, orgID string, userID string, return nil, err } - req, err := http.NewRequest("DELETE", queryUrl.String(), nil) + req, err := http.NewRequest("GET", queryUrl.String(), nil) if err != nil { return nil, err } @@ -8756,8 +9782,19 @@ func NewDeleteOrgsIDMembersIDRequest(server string, orgID string, userID string, return req, nil } -// NewGetOrgsIDOwnersRequest generates requests for GetOrgsIDOwners -func NewGetOrgsIDOwnersRequest(server string, orgID string, params *GetOrgsIDOwnersParams) (*http.Request, error) { +// NewPatchOrgsIDSecretsRequest calls the generic PatchOrgsIDSecrets builder with application/json body +func NewPatchOrgsIDSecretsRequest(server string, orgID string, params *PatchOrgsIDSecretsParams, body PatchOrgsIDSecretsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchOrgsIDSecretsRequestWithBody(server, orgID, params, "application/json", bodyReader) +} + +// NewPatchOrgsIDSecretsRequestWithBody generates requests for PatchOrgsIDSecrets with any type of body +func NewPatchOrgsIDSecretsRequestWithBody(server string, orgID string, params *PatchOrgsIDSecretsParams, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -8772,7 +9809,7 @@ func NewGetOrgsIDOwnersRequest(server string, orgID string, params *GetOrgsIDOwn return nil, err } - basePath := fmt.Sprintf("/orgs/%s/owners", pathParam0) + basePath := fmt.Sprintf("/orgs/%s/secrets", pathParam0) if basePath[0] == '/' { basePath = basePath[1:] } @@ -8782,7 +9819,7 @@ func NewGetOrgsIDOwnersRequest(server string, orgID string, params *GetOrgsIDOwn return nil, err } - req, err := http.NewRequest("GET", queryUrl.String(), nil) + req, err := http.NewRequest("PATCH", queryUrl.String(), body) if err != nil { return nil, err } @@ -8798,22 +9835,23 @@ func NewGetOrgsIDOwnersRequest(server string, orgID string, params *GetOrgsIDOwn req.Header.Add("Zap-Trace-Span", headerParam0) } + req.Header.Add("Content-Type", contentType) return req, nil } -// NewPostOrgsIDOwnersRequest calls the generic PostOrgsIDOwners builder with application/json body -func NewPostOrgsIDOwnersRequest(server string, orgID string, params *PostOrgsIDOwnersParams, body PostOrgsIDOwnersJSONRequestBody) (*http.Request, error) { +// NewPostOrgsIDSecretsRequest calls the generic PostOrgsIDSecrets builder with application/json body +func NewPostOrgsIDSecretsRequest(server string, orgID string, params *PostOrgsIDSecretsParams, body PostOrgsIDSecretsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostOrgsIDOwnersRequestWithBody(server, orgID, params, "application/json", bodyReader) + return NewPostOrgsIDSecretsRequestWithBody(server, orgID, params, "application/json", bodyReader) } -// NewPostOrgsIDOwnersRequestWithBody generates requests for PostOrgsIDOwners with any type of body -func NewPostOrgsIDOwnersRequestWithBody(server string, orgID string, params *PostOrgsIDOwnersParams, contentType string, body io.Reader) (*http.Request, error) { +// NewPostOrgsIDSecretsRequestWithBody generates requests for PostOrgsIDSecrets with any type of body +func NewPostOrgsIDSecretsRequestWithBody(server string, orgID string, params *PostOrgsIDSecretsParams, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -8828,7 +9866,7 @@ func NewPostOrgsIDOwnersRequestWithBody(server string, orgID string, params *Pos return nil, err } - basePath := fmt.Sprintf("/orgs/%s/owners", pathParam0) + basePath := fmt.Sprintf("/orgs/%s/secrets/delete", pathParam0) if basePath[0] == '/' { basePath = basePath[1:] } @@ -8858,8 +9896,8 @@ func NewPostOrgsIDOwnersRequestWithBody(server string, orgID string, params *Pos return req, nil } -// NewDeleteOrgsIDOwnersIDRequest generates requests for DeleteOrgsIDOwnersID -func NewDeleteOrgsIDOwnersIDRequest(server string, orgID string, userID string, params *DeleteOrgsIDOwnersIDParams) (*http.Request, error) { +// NewGetCloudUsersRequest generates requests for GetCloudUsers +func NewGetCloudUsersRequest(server string, orgID string, params *GetCloudUsersParams) (*http.Request, error) { var err error var pathParam0 string @@ -8869,19 +9907,12 @@ func NewDeleteOrgsIDOwnersIDRequest(server string, orgID string, userID string, return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParam("simple", false, "userID", userID) - if err != nil { - return nil, err - } - queryUrl, err := url.Parse(server) if err != nil { return nil, err } - basePath := fmt.Sprintf("/orgs/%s/owners/%s", pathParam0, pathParam1) + basePath := fmt.Sprintf("/orgs/%s/users", pathParam0) if basePath[0] == '/' { basePath = basePath[1:] } @@ -8891,7 +9922,7 @@ func NewDeleteOrgsIDOwnersIDRequest(server string, orgID string, userID string, return nil, err } - req, err := http.NewRequest("DELETE", queryUrl.String(), nil) + req, err := http.NewRequest("GET", queryUrl.String(), nil) if err != nil { return nil, err } @@ -8910,8 +9941,8 @@ func NewDeleteOrgsIDOwnersIDRequest(server string, orgID string, userID string, return req, nil } -// NewGetOrgsIDSecretsRequest generates requests for GetOrgsIDSecrets -func NewGetOrgsIDSecretsRequest(server string, orgID string, params *GetOrgsIDSecretsParams) (*http.Request, error) { +// NewDeleteOrgsIDCloudUserIDRequest generates requests for DeleteOrgsIDCloudUserID +func NewDeleteOrgsIDCloudUserIDRequest(server string, orgID string, userID string, params *DeleteOrgsIDCloudUserIDParams) (*http.Request, error) { var err error var pathParam0 string @@ -8921,12 +9952,19 @@ func NewGetOrgsIDSecretsRequest(server string, orgID string, params *GetOrgsIDSe return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParam("simple", false, "userID", userID) + if err != nil { + return nil, err + } + queryUrl, err := url.Parse(server) if err != nil { return nil, err } - basePath := fmt.Sprintf("/orgs/%s/secrets", pathParam0) + basePath := fmt.Sprintf("/orgs/%s/users/%s", pathParam0, pathParam1) if basePath[0] == '/' { basePath = basePath[1:] } @@ -8936,7 +9974,7 @@ func NewGetOrgsIDSecretsRequest(server string, orgID string, params *GetOrgsIDSe return nil, err } - req, err := http.NewRequest("GET", queryUrl.String(), nil) + req, err := http.NewRequest("DELETE", queryUrl.String(), nil) if err != nil { return nil, err } @@ -8955,34 +9993,27 @@ func NewGetOrgsIDSecretsRequest(server string, orgID string, params *GetOrgsIDSe return req, nil } -// NewPatchOrgsIDSecretsRequest calls the generic PatchOrgsIDSecrets builder with application/json body -func NewPatchOrgsIDSecretsRequest(server string, orgID string, params *PatchOrgsIDSecretsParams, body PatchOrgsIDSecretsJSONRequestBody) (*http.Request, error) { +// NewCreatePkgRequest calls the generic CreatePkg builder with application/json body +func NewCreatePkgRequest(server string, body CreatePkgJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchOrgsIDSecretsRequestWithBody(server, orgID, params, "application/json", bodyReader) + return NewCreatePkgRequestWithBody(server, "application/json", bodyReader) } -// NewPatchOrgsIDSecretsRequestWithBody generates requests for PatchOrgsIDSecrets with any type of body -func NewPatchOrgsIDSecretsRequestWithBody(server string, orgID string, params *PatchOrgsIDSecretsParams, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePkgRequestWithBody generates requests for CreatePkg with any type of body +func NewCreatePkgRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParam("simple", false, "orgID", orgID) - if err != nil { - return nil, err - } - queryUrl, err := url.Parse(server) if err != nil { return nil, err } - basePath := fmt.Sprintf("/orgs/%s/secrets", pathParam0) + basePath := fmt.Sprintf("/packages") if basePath[0] == '/' { basePath = basePath[1:] } @@ -8992,54 +10023,64 @@ func NewPatchOrgsIDSecretsRequestWithBody(server string, orgID string, params *P return nil, err } - req, err := http.NewRequest("PATCH", queryUrl.String(), body) + req, err := http.NewRequest("POST", queryUrl.String(), body) if err != nil { return nil, err } - if params.ZapTraceSpan != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) - if err != nil { - return nil, err - } - - req.Header.Add("Zap-Trace-Span", headerParam0) - } - req.Header.Add("Content-Type", contentType) return req, nil } -// NewPostOrgsIDSecretsRequest calls the generic PostOrgsIDSecrets builder with application/json body -func NewPostOrgsIDSecretsRequest(server string, orgID string, params *PostOrgsIDSecretsParams, body PostOrgsIDSecretsJSONRequestBody) (*http.Request, error) { +// NewApplyPkgRequest calls the generic ApplyPkg builder with application/json body +func NewApplyPkgRequest(server string, body ApplyPkgJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostOrgsIDSecretsRequestWithBody(server, orgID, params, "application/json", bodyReader) + return NewApplyPkgRequestWithBody(server, "application/json", bodyReader) } -// NewPostOrgsIDSecretsRequestWithBody generates requests for PostOrgsIDSecrets with any type of body -func NewPostOrgsIDSecretsRequestWithBody(server string, orgID string, params *PostOrgsIDSecretsParams, contentType string, body io.Reader) (*http.Request, error) { +// NewApplyPkgRequestWithBody generates requests for ApplyPkg with any type of body +func NewApplyPkgRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } - pathParam0, err = runtime.StyleParam("simple", false, "orgID", orgID) + basePath := fmt.Sprintf("/packages/apply") + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + 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 +} + +// NewListStacksRequest generates requests for ListStacks +func NewListStacksRequest(server string, params *ListStacksParams) (*http.Request, error) { + var err error + queryUrl, err := url.Parse(server) if err != nil { return nil, err } - basePath := fmt.Sprintf("/orgs/%s/secrets/delete", pathParam0) + basePath := fmt.Sprintf("/packages/stacks") if basePath[0] == '/' { basePath = basePath[1:] } @@ -9049,39 +10090,75 @@ func NewPostOrgsIDSecretsRequestWithBody(server string, orgID string, params *Po return nil, err } - req, err := http.NewRequest("POST", queryUrl.String(), body) - if err != nil { + queryValues := queryUrl.Query() + + if queryFrag, err := runtime.StyleParam("form", true, "orgID", params.OrgID); 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.ZapTraceSpan != nil { - var headerParam0 string + if params.Name != nil { - headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) - if err != nil { + if queryFrag, err := runtime.StyleParam("form", true, "name", *params.Name); 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) + } + } } - req.Header.Add("Zap-Trace-Span", headerParam0) } - req.Header.Add("Content-Type", contentType) + if params.StackID != nil { + + if queryFrag, err := runtime.StyleParam("form", true, "stackID", *params.StackID); 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 } -// NewCreatePkgRequest calls the generic CreatePkg builder with application/json body -func NewCreatePkgRequest(server string, body CreatePkgJSONRequestBody) (*http.Request, error) { +// NewCreateStackRequest calls the generic CreateStack builder with application/json body +func NewCreateStackRequest(server string, body CreateStackJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreatePkgRequestWithBody(server, "application/json", bodyReader) + return NewCreateStackRequestWithBody(server, "application/json", bodyReader) } -// NewCreatePkgRequestWithBody generates requests for CreatePkg with any type of body -func NewCreatePkgRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateStackRequestWithBody generates requests for CreateStack with any type of body +func NewCreateStackRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error queryUrl, err := url.Parse(server) @@ -9089,7 +10166,7 @@ func NewCreatePkgRequestWithBody(server string, contentType string, body io.Read return nil, err } - basePath := fmt.Sprintf("/packages") + basePath := fmt.Sprintf("/packages/stacks") if basePath[0] == '/' { basePath = basePath[1:] } @@ -9108,27 +10185,73 @@ func NewCreatePkgRequestWithBody(server string, contentType string, body io.Read return req, nil } -// NewApplyPkgRequest calls the generic ApplyPkg builder with application/json body -func NewApplyPkgRequest(server string, body ApplyPkgJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +// NewDeleteStackRequest generates requests for DeleteStack +func NewDeleteStackRequest(server string, stackId string, params *DeleteStackParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParam("simple", false, "stack_id", stackId) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewApplyPkgRequestWithBody(server, "application/json", bodyReader) + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/packages/stacks/%s", pathParam0) + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + queryValues := queryUrl.Query() + + if queryFrag, err := runtime.StyleParam("form", true, "orgID", params.OrgID); 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 } -// NewApplyPkgRequestWithBody generates requests for ApplyPkg with any type of body -func NewApplyPkgRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewExportStackRequest generates requests for ExportStack +func NewExportStackRequest(server string, stackId string, params *ExportStackParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParam("simple", false, "stack_id", stackId) + if err != nil { + return nil, err + } + queryUrl, err := url.Parse(server) if err != nil { return nil, err } - basePath := fmt.Sprintf("/packages/apply") + basePath := fmt.Sprintf("/packages/stacks/%s/export", pathParam0) if basePath[0] == '/' { basePath = basePath[1:] } @@ -9138,12 +10261,27 @@ func NewApplyPkgRequestWithBody(server string, contentType string, body io.Reade return nil, err } - req, err := http.NewRequest("POST", queryUrl.String(), body) + queryValues := queryUrl.Query() + + if queryFrag, err := runtime.StyleParam("form", true, "orgID", params.OrgID); 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 } - req.Header.Add("Content-Type", contentType) return req, nil } @@ -10415,6 +11553,56 @@ func NewPostSetupRequestWithBody(server string, params *PostSetupParams, content return req, nil } +// NewPostSetupUserRequest calls the generic PostSetupUser builder with application/json body +func NewPostSetupUserRequest(server string, params *PostSetupUserParams, body PostSetupUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostSetupUserRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewPostSetupUserRequestWithBody generates requests for PostSetupUser with any type of body +func NewPostSetupUserRequestWithBody(server string, params *PostSetupUserParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + queryUrl, err := url.Parse(server) + if err != nil { + return nil, err + } + + basePath := fmt.Sprintf("/setup/user") + if basePath[0] == '/' { + basePath = basePath[1:] + } + + queryUrl, err = queryUrl.Parse(basePath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryUrl.String(), body) + if err != nil { + return nil, err + } + + if params.ZapTraceSpan != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParam("simple", false, "Zap-Trace-Span", *params.ZapTraceSpan) + if err != nil { + return nil, err + } + + req.Header.Add("Zap-Trace-Span", headerParam0) + } + + req.Header.Add("Content-Type", contentType) + return req, nil +} + // NewPostSigninRequest generates requests for PostSignin func NewPostSigninRequest(server string, params *PostSigninParams) (*http.Request, error) { var err error @@ -15091,6 +16279,126 @@ func (r deleteDashboardsIDOwnersIDResponse) StatusCode() int { return 0 } +type getDBRPsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DBRPs + JSON400 *Error + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r getDBRPsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r getDBRPsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type postDBRPResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *DBRP + JSON400 *Error + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r postDBRPResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r postDBRPResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type deleteDBRPIDResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *Error + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r deleteDBRPIDResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r deleteDBRPIDResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type getDBRPsIDResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DBRP + JSON400 *Error + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r getDBRPsIDResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r getDBRPsIDResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type patchDBRPIDResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DBRP + JSON400 *Error + JSON404 *Error + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r patchDBRPIDResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r patchDBRPIDResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type postDeleteResponse struct { Body []byte HTTPResponse *http.Response @@ -15299,6 +16607,29 @@ func (r deleteDocumentsTemplatesIDLabelsIDResponse) StatusCode() int { return 0 } +type getFlagsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Flags + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r getFlagsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r getFlagsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type getHealthResponse struct { Body []byte HTTPResponse *http.Response @@ -15859,12 +17190,83 @@ func (r getNotificationRulesIDLabelsResponse) StatusCode() int { type postNotificationRuleIDLabelsResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *LabelResponse + JSON201 *LabelResponse + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r postNotificationRuleIDLabelsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r postNotificationRuleIDLabelsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type deleteNotificationRulesIDLabelsIDResponse struct { + Body []byte + HTTPResponse *http.Response + JSON404 *Error + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r deleteNotificationRulesIDLabelsIDResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r deleteNotificationRulesIDLabelsIDResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type getNotificationRulesIDQueryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *FluxResponse + JSON400 *Error + JSON404 *Error + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r getNotificationRulesIDQueryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r getNotificationRulesIDQueryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type getOrgsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Organizations JSONDefault *Error } // Status returns HTTPResponse.Status -func (r postNotificationRuleIDLabelsResponse) Status() string { +func (r getOrgsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15872,22 +17274,22 @@ func (r postNotificationRuleIDLabelsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r postNotificationRuleIDLabelsResponse) StatusCode() int { +func (r getOrgsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type deleteNotificationRulesIDLabelsIDResponse struct { +type postOrgsResponse struct { Body []byte HTTPResponse *http.Response - JSON404 *Error + JSON201 *Organization JSONDefault *Error } // Status returns HTTPResponse.Status -func (r deleteNotificationRulesIDLabelsIDResponse) Status() string { +func (r postOrgsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15895,24 +17297,22 @@ func (r deleteNotificationRulesIDLabelsIDResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r deleteNotificationRulesIDLabelsIDResponse) StatusCode() int { +func (r postOrgsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type getNotificationRulesIDQueryResponse struct { +type deleteOrgsIDResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *FluxResponse - JSON400 *Error JSON404 *Error JSONDefault *Error } // Status returns HTTPResponse.Status -func (r getNotificationRulesIDQueryResponse) Status() string { +func (r deleteOrgsIDResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15920,22 +17320,22 @@ func (r getNotificationRulesIDQueryResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r getNotificationRulesIDQueryResponse) StatusCode() int { +func (r deleteOrgsIDResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type getOrgsResponse struct { +type getOrgsIDResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Organizations + JSON200 *Organization JSONDefault *Error } // Status returns HTTPResponse.Status -func (r getOrgsResponse) Status() string { +func (r getOrgsIDResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15943,22 +17343,22 @@ func (r getOrgsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r getOrgsResponse) StatusCode() int { +func (r getOrgsIDResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type postOrgsResponse struct { +type patchOrgsIDResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *Organization + JSON200 *Organization JSONDefault *Error } // Status returns HTTPResponse.Status -func (r postOrgsResponse) Status() string { +func (r patchOrgsIDResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15966,22 +17366,22 @@ func (r postOrgsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r postOrgsResponse) StatusCode() int { +func (r patchOrgsIDResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type deleteOrgsIDResponse struct { +type postOrgsIDInvitesResponse struct { Body []byte HTTPResponse *http.Response - JSON404 *Error + JSON201 *Invite JSONDefault *Error } // Status returns HTTPResponse.Status -func (r deleteOrgsIDResponse) Status() string { +func (r postOrgsIDInvitesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15989,22 +17389,21 @@ func (r deleteOrgsIDResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r deleteOrgsIDResponse) StatusCode() int { +func (r postOrgsIDInvitesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type getOrgsIDResponse struct { +type deleteOrgsIDInviteIDResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Organization JSONDefault *Error } // Status returns HTTPResponse.Status -func (r getOrgsIDResponse) Status() string { +func (r deleteOrgsIDInviteIDResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -16012,22 +17411,22 @@ func (r getOrgsIDResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r getOrgsIDResponse) StatusCode() int { +func (r deleteOrgsIDInviteIDResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type patchOrgsIDResponse struct { +type postOrgsIDInviteIDResendResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Organization + JSON200 *Invite JSONDefault *Error } // Status returns HTTPResponse.Status -func (r patchOrgsIDResponse) Status() string { +func (r postOrgsIDInviteIDResendResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -16035,7 +17434,7 @@ func (r patchOrgsIDResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r patchOrgsIDResponse) StatusCode() int { +func (r postOrgsIDInviteIDResendResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -16339,10 +17738,56 @@ func (r postOrgsIDSecretsResponse) StatusCode() int { return 0 } +type getCloudUsersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CloudUsers + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r getCloudUsersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r getCloudUsersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type deleteOrgsIDCloudUserIDResponse struct { + Body []byte + HTTPResponse *http.Response + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r deleteOrgsIDCloudUserIDResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r deleteOrgsIDCloudUserIDResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type createPkgResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Pkg + YAML200 *Pkg JSONDefault *Error } @@ -16386,6 +17831,124 @@ func (r applyPkgResponse) StatusCode() int { return 0 } +type listStacksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + OrgID *string `json:"orgID,omitempty"` + Resources *struct { + ApiVersion *string `json:"apiVersion,omitempty"` + Associations *[]struct { + Kind *string `json:"kind,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + } `json:"associations,omitempty"` + Kind *string `json:"kind,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + ResourceID *string `json:"resourceID,omitempty"` + } `json:"resources,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + Urls *[]string `json:"urls,omitempty"` + } + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r listStacksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r listStacksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type createStackResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + OrgID *string `json:"orgID,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + Urls *[]string `json:"urls,omitempty"` + } + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r createStackResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r createStackResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type deleteStackResponse struct { + Body []byte + HTTPResponse *http.Response + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r deleteStackResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r deleteStackResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type exportStackResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Pkg + YAML200 *Pkg + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r exportStackResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r exportStackResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type postQueryResponse struct { Body []byte HTTPResponse *http.Response @@ -16909,6 +18472,29 @@ func (r postSetupResponse) StatusCode() int { return 0 } +type postSetupUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *OnboardingResponse + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r postSetupUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r postSetupUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type postSigninResponse struct { Body []byte HTTPResponse *http.Response @@ -18963,6 +20549,67 @@ func (c *ClientWithResponses) DeleteDashboardsIDOwnersIDWithResponse(ctx context return ParseDeleteDashboardsIDOwnersIDResponse(rsp) } +// GetDBRPsWithResponse request returning *GetDBRPsResponse +func (c *ClientWithResponses) GetDBRPsWithResponse(ctx context.Context, params *GetDBRPsParams) (*getDBRPsResponse, error) { + rsp, err := c.GetDBRPs(ctx, params) + if err != nil { + return nil, err + } + return ParseGetDBRPsResponse(rsp) +} + +// PostDBRPWithBodyWithResponse request with arbitrary body returning *PostDBRPResponse +func (c *ClientWithResponses) PostDBRPWithBodyWithResponse(ctx context.Context, params *PostDBRPParams, contentType string, body io.Reader) (*postDBRPResponse, error) { + rsp, err := c.PostDBRPWithBody(ctx, params, contentType, body) + if err != nil { + return nil, err + } + return ParsePostDBRPResponse(rsp) +} + +func (c *ClientWithResponses) PostDBRPWithResponse(ctx context.Context, params *PostDBRPParams, body PostDBRPJSONRequestBody) (*postDBRPResponse, error) { + rsp, err := c.PostDBRP(ctx, params, body) + if err != nil { + return nil, err + } + return ParsePostDBRPResponse(rsp) +} + +// DeleteDBRPIDWithResponse request returning *DeleteDBRPIDResponse +func (c *ClientWithResponses) DeleteDBRPIDWithResponse(ctx context.Context, dbrpID string, params *DeleteDBRPIDParams) (*deleteDBRPIDResponse, error) { + rsp, err := c.DeleteDBRPID(ctx, dbrpID, params) + if err != nil { + return nil, err + } + return ParseDeleteDBRPIDResponse(rsp) +} + +// GetDBRPsIDWithResponse request returning *GetDBRPsIDResponse +func (c *ClientWithResponses) GetDBRPsIDWithResponse(ctx context.Context, dbrpID string, params *GetDBRPsIDParams) (*getDBRPsIDResponse, error) { + rsp, err := c.GetDBRPsID(ctx, dbrpID, params) + if err != nil { + return nil, err + } + return ParseGetDBRPsIDResponse(rsp) +} + +// PatchDBRPIDWithBodyWithResponse request with arbitrary body returning *PatchDBRPIDResponse +func (c *ClientWithResponses) PatchDBRPIDWithBodyWithResponse(ctx context.Context, dbrpID string, params *PatchDBRPIDParams, contentType string, body io.Reader) (*patchDBRPIDResponse, error) { + rsp, err := c.PatchDBRPIDWithBody(ctx, dbrpID, params, contentType, body) + if err != nil { + return nil, err + } + return ParsePatchDBRPIDResponse(rsp) +} + +func (c *ClientWithResponses) PatchDBRPIDWithResponse(ctx context.Context, dbrpID string, params *PatchDBRPIDParams, body PatchDBRPIDJSONRequestBody) (*patchDBRPIDResponse, error) { + rsp, err := c.PatchDBRPID(ctx, dbrpID, params, body) + if err != nil { + return nil, err + } + return ParsePatchDBRPIDResponse(rsp) +} + // PostDeleteWithBodyWithResponse request with arbitrary body returning *PostDeleteResponse func (c *ClientWithResponses) PostDeleteWithBodyWithResponse(ctx context.Context, params *PostDeleteParams, contentType string, body io.Reader) (*postDeleteResponse, error) { rsp, err := c.PostDeleteWithBody(ctx, params, contentType, body) @@ -19076,6 +20723,15 @@ func (c *ClientWithResponses) DeleteDocumentsTemplatesIDLabelsIDWithResponse(ctx return ParseDeleteDocumentsTemplatesIDLabelsIDResponse(rsp) } +// GetFlagsWithResponse request returning *GetFlagsResponse +func (c *ClientWithResponses) GetFlagsWithResponse(ctx context.Context, params *GetFlagsParams) (*getFlagsResponse, error) { + rsp, err := c.GetFlags(ctx, params) + if err != nil { + return nil, err + } + return ParseGetFlagsResponse(rsp) +} + // GetHealthWithResponse request returning *GetHealthResponse func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, params *GetHealthParams) (*getHealthResponse, error) { rsp, err := c.GetHealth(ctx, params) @@ -19439,33 +21095,68 @@ func (c *ClientWithResponses) DeleteOrgsIDWithResponse(ctx context.Context, orgI if err != nil { return nil, err } - return ParseDeleteOrgsIDResponse(rsp) + return ParseDeleteOrgsIDResponse(rsp) +} + +// GetOrgsIDWithResponse request returning *GetOrgsIDResponse +func (c *ClientWithResponses) GetOrgsIDWithResponse(ctx context.Context, orgID string, params *GetOrgsIDParams) (*getOrgsIDResponse, error) { + rsp, err := c.GetOrgsID(ctx, orgID, params) + if err != nil { + return nil, err + } + return ParseGetOrgsIDResponse(rsp) +} + +// PatchOrgsIDWithBodyWithResponse request with arbitrary body returning *PatchOrgsIDResponse +func (c *ClientWithResponses) PatchOrgsIDWithBodyWithResponse(ctx context.Context, orgID string, params *PatchOrgsIDParams, contentType string, body io.Reader) (*patchOrgsIDResponse, error) { + rsp, err := c.PatchOrgsIDWithBody(ctx, orgID, params, contentType, body) + if err != nil { + return nil, err + } + return ParsePatchOrgsIDResponse(rsp) +} + +func (c *ClientWithResponses) PatchOrgsIDWithResponse(ctx context.Context, orgID string, params *PatchOrgsIDParams, body PatchOrgsIDJSONRequestBody) (*patchOrgsIDResponse, error) { + rsp, err := c.PatchOrgsID(ctx, orgID, params, body) + if err != nil { + return nil, err + } + return ParsePatchOrgsIDResponse(rsp) +} + +// PostOrgsIDInvitesWithBodyWithResponse request with arbitrary body returning *PostOrgsIDInvitesResponse +func (c *ClientWithResponses) PostOrgsIDInvitesWithBodyWithResponse(ctx context.Context, orgID string, params *PostOrgsIDInvitesParams, contentType string, body io.Reader) (*postOrgsIDInvitesResponse, error) { + rsp, err := c.PostOrgsIDInvitesWithBody(ctx, orgID, params, contentType, body) + if err != nil { + return nil, err + } + return ParsePostOrgsIDInvitesResponse(rsp) } -// GetOrgsIDWithResponse request returning *GetOrgsIDResponse -func (c *ClientWithResponses) GetOrgsIDWithResponse(ctx context.Context, orgID string, params *GetOrgsIDParams) (*getOrgsIDResponse, error) { - rsp, err := c.GetOrgsID(ctx, orgID, params) +func (c *ClientWithResponses) PostOrgsIDInvitesWithResponse(ctx context.Context, orgID string, params *PostOrgsIDInvitesParams, body PostOrgsIDInvitesJSONRequestBody) (*postOrgsIDInvitesResponse, error) { + rsp, err := c.PostOrgsIDInvites(ctx, orgID, params, body) if err != nil { return nil, err } - return ParseGetOrgsIDResponse(rsp) + return ParsePostOrgsIDInvitesResponse(rsp) } -// PatchOrgsIDWithBodyWithResponse request with arbitrary body returning *PatchOrgsIDResponse -func (c *ClientWithResponses) PatchOrgsIDWithBodyWithResponse(ctx context.Context, orgID string, params *PatchOrgsIDParams, contentType string, body io.Reader) (*patchOrgsIDResponse, error) { - rsp, err := c.PatchOrgsIDWithBody(ctx, orgID, params, contentType, body) +// DeleteOrgsIDInviteIDWithResponse request returning *DeleteOrgsIDInviteIDResponse +func (c *ClientWithResponses) DeleteOrgsIDInviteIDWithResponse(ctx context.Context, orgID string, inviteID string, params *DeleteOrgsIDInviteIDParams) (*deleteOrgsIDInviteIDResponse, error) { + rsp, err := c.DeleteOrgsIDInviteID(ctx, orgID, inviteID, params) if err != nil { return nil, err } - return ParsePatchOrgsIDResponse(rsp) + return ParseDeleteOrgsIDInviteIDResponse(rsp) } -func (c *ClientWithResponses) PatchOrgsIDWithResponse(ctx context.Context, orgID string, params *PatchOrgsIDParams, body PatchOrgsIDJSONRequestBody) (*patchOrgsIDResponse, error) { - rsp, err := c.PatchOrgsID(ctx, orgID, params, body) +// PostOrgsIDInviteIDResendWithResponse request returning *PostOrgsIDInviteIDResendResponse +func (c *ClientWithResponses) PostOrgsIDInviteIDResendWithResponse(ctx context.Context, orgID string, inviteID string, params *PostOrgsIDInviteIDResendParams) (*postOrgsIDInviteIDResendResponse, error) { + rsp, err := c.PostOrgsIDInviteIDResend(ctx, orgID, inviteID, params) if err != nil { return nil, err } - return ParsePatchOrgsIDResponse(rsp) + return ParsePostOrgsIDInviteIDResendResponse(rsp) } // GetOrgsIDLabelsWithResponse request returning *GetOrgsIDLabelsResponse @@ -19625,6 +21316,24 @@ func (c *ClientWithResponses) PostOrgsIDSecretsWithResponse(ctx context.Context, return ParsePostOrgsIDSecretsResponse(rsp) } +// GetCloudUsersWithResponse request returning *GetCloudUsersResponse +func (c *ClientWithResponses) GetCloudUsersWithResponse(ctx context.Context, orgID string, params *GetCloudUsersParams) (*getCloudUsersResponse, error) { + rsp, err := c.GetCloudUsers(ctx, orgID, params) + if err != nil { + return nil, err + } + return ParseGetCloudUsersResponse(rsp) +} + +// DeleteOrgsIDCloudUserIDWithResponse request returning *DeleteOrgsIDCloudUserIDResponse +func (c *ClientWithResponses) DeleteOrgsIDCloudUserIDWithResponse(ctx context.Context, orgID string, userID string, params *DeleteOrgsIDCloudUserIDParams) (*deleteOrgsIDCloudUserIDResponse, error) { + rsp, err := c.DeleteOrgsIDCloudUserID(ctx, orgID, userID, params) + if err != nil { + return nil, err + } + return ParseDeleteOrgsIDCloudUserIDResponse(rsp) +} + // CreatePkgWithBodyWithResponse request with arbitrary body returning *CreatePkgResponse func (c *ClientWithResponses) CreatePkgWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*createPkgResponse, error) { rsp, err := c.CreatePkgWithBody(ctx, contentType, body) @@ -19659,6 +21368,50 @@ func (c *ClientWithResponses) ApplyPkgWithResponse(ctx context.Context, body App return ParseApplyPkgResponse(rsp) } +// ListStacksWithResponse request returning *ListStacksResponse +func (c *ClientWithResponses) ListStacksWithResponse(ctx context.Context, params *ListStacksParams) (*listStacksResponse, error) { + rsp, err := c.ListStacks(ctx, params) + if err != nil { + return nil, err + } + return ParseListStacksResponse(rsp) +} + +// CreateStackWithBodyWithResponse request with arbitrary body returning *CreateStackResponse +func (c *ClientWithResponses) CreateStackWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*createStackResponse, error) { + rsp, err := c.CreateStackWithBody(ctx, contentType, body) + if err != nil { + return nil, err + } + return ParseCreateStackResponse(rsp) +} + +func (c *ClientWithResponses) CreateStackWithResponse(ctx context.Context, body CreateStackJSONRequestBody) (*createStackResponse, error) { + rsp, err := c.CreateStack(ctx, body) + if err != nil { + return nil, err + } + return ParseCreateStackResponse(rsp) +} + +// DeleteStackWithResponse request returning *DeleteStackResponse +func (c *ClientWithResponses) DeleteStackWithResponse(ctx context.Context, stackId string, params *DeleteStackParams) (*deleteStackResponse, error) { + rsp, err := c.DeleteStack(ctx, stackId, params) + if err != nil { + return nil, err + } + return ParseDeleteStackResponse(rsp) +} + +// ExportStackWithResponse request returning *ExportStackResponse +func (c *ClientWithResponses) ExportStackWithResponse(ctx context.Context, stackId string, params *ExportStackParams) (*exportStackResponse, error) { + rsp, err := c.ExportStack(ctx, stackId, params) + if err != nil { + return nil, err + } + return ParseExportStackResponse(rsp) +} + // PostQueryWithBodyWithResponse request with arbitrary body returning *PostQueryResponse func (c *ClientWithResponses) PostQueryWithBodyWithResponse(ctx context.Context, params *PostQueryParams, contentType string, body io.Reader) (*postQueryResponse, error) { rsp, err := c.PostQueryWithBody(ctx, params, contentType, body) @@ -19946,6 +21699,23 @@ func (c *ClientWithResponses) PostSetupWithResponse(ctx context.Context, params return ParsePostSetupResponse(rsp) } +// PostSetupUserWithBodyWithResponse request with arbitrary body returning *PostSetupUserResponse +func (c *ClientWithResponses) PostSetupUserWithBodyWithResponse(ctx context.Context, params *PostSetupUserParams, contentType string, body io.Reader) (*postSetupUserResponse, error) { + rsp, err := c.PostSetupUserWithBody(ctx, params, contentType, body) + if err != nil { + return nil, err + } + return ParsePostSetupUserResponse(rsp) +} + +func (c *ClientWithResponses) PostSetupUserWithResponse(ctx context.Context, params *PostSetupUserParams, body PostSetupUserJSONRequestBody) (*postSetupUserResponse, error) { + rsp, err := c.PostSetupUser(ctx, params, body) + if err != nil { + return nil, err + } + return ParsePostSetupUserResponse(rsp) +} + // PostSigninWithResponse request returning *PostSigninResponse func (c *ClientWithResponses) PostSigninWithResponse(ctx context.Context, params *PostSigninParams) (*postSigninResponse, error) { rsp, err := c.PostSignin(ctx, params) @@ -22113,27 +23883,218 @@ func ParsePatchDashboardsIDCellsIDViewResponse(rsp *http.Response) (*patchDashbo return response, nil } -// ParseGetDashboardsIDLabelsResponse parses an HTTP response from a GetDashboardsIDLabelsWithResponse call -func ParseGetDashboardsIDLabelsResponse(rsp *http.Response) (*getDashboardsIDLabelsResponse, error) { +// ParseGetDashboardsIDLabelsResponse parses an HTTP response from a GetDashboardsIDLabelsWithResponse call +func ParseGetDashboardsIDLabelsResponse(rsp *http.Response) (*getDashboardsIDLabelsResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &getDashboardsIDLabelsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest LabelsResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostDashboardsIDLabelsResponse parses an HTTP response from a PostDashboardsIDLabelsWithResponse call +func ParsePostDashboardsIDLabelsResponse(rsp *http.Response) (*postDashboardsIDLabelsResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &postDashboardsIDLabelsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest LabelResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseDeleteDashboardsIDLabelsIDResponse parses an HTTP response from a DeleteDashboardsIDLabelsIDWithResponse call +func ParseDeleteDashboardsIDLabelsIDResponse(rsp *http.Response) (*deleteDashboardsIDLabelsIDResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &deleteDashboardsIDLabelsIDResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetDashboardsIDLogsResponse parses an HTTP response from a GetDashboardsIDLogsWithResponse call +func ParseGetDashboardsIDLogsResponse(rsp *http.Response) (*getDashboardsIDLogsResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &getDashboardsIDLogsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest OperationLogs + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetDashboardsIDMembersResponse parses an HTTP response from a GetDashboardsIDMembersWithResponse call +func ParseGetDashboardsIDMembersResponse(rsp *http.Response) (*getDashboardsIDMembersResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &getDashboardsIDMembersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ResourceMembers + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostDashboardsIDMembersResponse parses an HTTP response from a PostDashboardsIDMembersWithResponse call +func ParsePostDashboardsIDMembersResponse(rsp *http.Response) (*postDashboardsIDMembersResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &postDashboardsIDMembersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ResourceMember + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseDeleteDashboardsIDMembersIDResponse parses an HTTP response from a DeleteDashboardsIDMembersIDWithResponse call +func ParseDeleteDashboardsIDMembersIDResponse(rsp *http.Response) (*deleteDashboardsIDMembersIDResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &getDashboardsIDLabelsResponse{ + response := &deleteDashboardsIDMembersIDResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest LabelsResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json"): var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22146,26 +24107,26 @@ func ParseGetDashboardsIDLabelsResponse(rsp *http.Response) (*getDashboardsIDLab return response, nil } -// ParsePostDashboardsIDLabelsResponse parses an HTTP response from a PostDashboardsIDLabelsWithResponse call -func ParsePostDashboardsIDLabelsResponse(rsp *http.Response) (*postDashboardsIDLabelsResponse, error) { +// ParseGetDashboardsIDOwnersResponse parses an HTTP response from a GetDashboardsIDOwnersWithResponse call +func ParseGetDashboardsIDOwnersResponse(rsp *http.Response) (*getDashboardsIDOwnersResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &postDashboardsIDLabelsResponse{ + response := &getDashboardsIDOwnersResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest LabelResponse + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ResourceOwners if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json"): var dest Error @@ -22179,26 +24140,26 @@ func ParsePostDashboardsIDLabelsResponse(rsp *http.Response) (*postDashboardsIDL return response, nil } -// ParseDeleteDashboardsIDLabelsIDResponse parses an HTTP response from a DeleteDashboardsIDLabelsIDWithResponse call -func ParseDeleteDashboardsIDLabelsIDResponse(rsp *http.Response) (*deleteDashboardsIDLabelsIDResponse, error) { +// ParsePostDashboardsIDOwnersResponse parses an HTTP response from a PostDashboardsIDOwnersWithResponse call +func ParsePostDashboardsIDOwnersResponse(rsp *http.Response) (*postDashboardsIDOwnersResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &deleteDashboardsIDLabelsIDResponse{ + response := &postDashboardsIDOwnersResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ResourceOwner if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json"): var dest Error @@ -22212,27 +24173,20 @@ func ParseDeleteDashboardsIDLabelsIDResponse(rsp *http.Response) (*deleteDashboa return response, nil } -// ParseGetDashboardsIDLogsResponse parses an HTTP response from a GetDashboardsIDLogsWithResponse call -func ParseGetDashboardsIDLogsResponse(rsp *http.Response) (*getDashboardsIDLogsResponse, error) { +// ParseDeleteDashboardsIDOwnersIDResponse parses an HTTP response from a DeleteDashboardsIDOwnersIDWithResponse call +func ParseDeleteDashboardsIDOwnersIDResponse(rsp *http.Response) (*deleteDashboardsIDOwnersIDResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &getDashboardsIDLogsResponse{ + response := &deleteDashboardsIDOwnersIDResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest OperationLogs - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json"): var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22245,27 +24199,34 @@ func ParseGetDashboardsIDLogsResponse(rsp *http.Response) (*getDashboardsIDLogsR return response, nil } -// ParseGetDashboardsIDMembersResponse parses an HTTP response from a GetDashboardsIDMembersWithResponse call -func ParseGetDashboardsIDMembersResponse(rsp *http.Response) (*getDashboardsIDMembersResponse, error) { +// ParseGetDBRPsResponse parses an HTTP response from a GetDBRPsWithResponse call +func ParseGetDBRPsResponse(rsp *http.Response) (*getDBRPsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &getDashboardsIDMembersResponse{ + response := &getDBRPsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ResourceMembers + var dest DBRPs if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22278,27 +24239,34 @@ func ParseGetDashboardsIDMembersResponse(rsp *http.Response) (*getDashboardsIDMe return response, nil } -// ParsePostDashboardsIDMembersResponse parses an HTTP response from a PostDashboardsIDMembersWithResponse call -func ParsePostDashboardsIDMembersResponse(rsp *http.Response) (*postDashboardsIDMembersResponse, error) { +// ParsePostDBRPResponse parses an HTTP response from a PostDBRPWithResponse call +func ParsePostDBRPResponse(rsp *http.Response) (*postDBRPResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &postDashboardsIDMembersResponse{ + response := &postDBRPResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ResourceMember + var dest DBRP if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22311,20 +24279,27 @@ func ParsePostDashboardsIDMembersResponse(rsp *http.Response) (*postDashboardsID return response, nil } -// ParseDeleteDashboardsIDMembersIDResponse parses an HTTP response from a DeleteDashboardsIDMembersIDWithResponse call -func ParseDeleteDashboardsIDMembersIDResponse(rsp *http.Response) (*deleteDashboardsIDMembersIDResponse, error) { +// ParseDeleteDBRPIDResponse parses an HTTP response from a DeleteDBRPIDWithResponse call +func ParseDeleteDBRPIDResponse(rsp *http.Response) (*deleteDBRPIDResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &deleteDashboardsIDMembersIDResponse{ + response := &deleteDBRPIDResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22337,27 +24312,34 @@ func ParseDeleteDashboardsIDMembersIDResponse(rsp *http.Response) (*deleteDashbo return response, nil } -// ParseGetDashboardsIDOwnersResponse parses an HTTP response from a GetDashboardsIDOwnersWithResponse call -func ParseGetDashboardsIDOwnersResponse(rsp *http.Response) (*getDashboardsIDOwnersResponse, error) { +// ParseGetDBRPsIDResponse parses an HTTP response from a GetDBRPsIDWithResponse call +func ParseGetDBRPsIDResponse(rsp *http.Response) (*getDBRPsIDResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &getDashboardsIDOwnersResponse{ + response := &getDBRPsIDResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ResourceOwners + var dest DBRP if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22370,53 +24352,41 @@ func ParseGetDashboardsIDOwnersResponse(rsp *http.Response) (*getDashboardsIDOwn return response, nil } -// ParsePostDashboardsIDOwnersResponse parses an HTTP response from a PostDashboardsIDOwnersWithResponse call -func ParsePostDashboardsIDOwnersResponse(rsp *http.Response) (*postDashboardsIDOwnersResponse, error) { +// ParsePatchDBRPIDResponse parses an HTTP response from a PatchDBRPIDWithResponse call +func ParsePatchDBRPIDResponse(rsp *http.Response) (*patchDBRPIDResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &postDashboardsIDOwnersResponse{ + response := &patchDBRPIDResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ResourceOwner + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DBRP if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSONDefault = &dest - - } - - return response, nil -} - -// ParseDeleteDashboardsIDOwnersIDResponse parses an HTTP response from a DeleteDashboardsIDOwnersIDWithResponse call -func ParseDeleteDashboardsIDOwnersIDResponse(rsp *http.Response) (*deleteDashboardsIDOwnersIDResponse, error) { - bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() - if err != nil { - return nil, err - } + response.JSON400 = &dest - response := &deleteDashboardsIDOwnersIDResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest - switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json"): var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22733,6 +24703,39 @@ func ParseDeleteDocumentsTemplatesIDLabelsIDResponse(rsp *http.Response) (*delet return response, nil } +// ParseGetFlagsResponse parses an HTTP response from a GetFlagsWithResponse call +func ParseGetFlagsResponse(rsp *http.Response) (*getFlagsResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &getFlagsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Flags + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + // ParseGetHealthResponse parses an HTTP response from a GetHealthWithResponse call func ParseGetHealthResponse(rsp *http.Response) (*getHealthResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) @@ -23647,13 +25650,112 @@ func ParseGetNotificationRulesIDQueryResponse(rsp *http.Response) (*getNotificat } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOrgsResponse parses an HTTP response from a GetOrgsWithResponse call +func ParseGetOrgsResponse(rsp *http.Response) (*getOrgsResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &getOrgsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Organizations + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostOrgsResponse parses an HTTP response from a PostOrgsWithResponse call +func ParsePostOrgsResponse(rsp *http.Response) (*postOrgsResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &postOrgsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Organization + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseDeleteOrgsIDResponse parses an HTTP response from a DeleteOrgsIDWithResponse call +func ParseDeleteOrgsIDResponse(rsp *http.Response) (*deleteOrgsIDResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &deleteOrgsIDResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23673,22 +25775,22 @@ func ParseGetNotificationRulesIDQueryResponse(rsp *http.Response) (*getNotificat return response, nil } -// ParseGetOrgsResponse parses an HTTP response from a GetOrgsWithResponse call -func ParseGetOrgsResponse(rsp *http.Response) (*getOrgsResponse, error) { +// ParseGetOrgsIDResponse parses an HTTP response from a GetOrgsIDWithResponse call +func ParseGetOrgsIDResponse(rsp *http.Response) (*getOrgsIDResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &getOrgsResponse{ + response := &getOrgsIDResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Organizations + var dest Organization if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23706,26 +25808,26 @@ func ParseGetOrgsResponse(rsp *http.Response) (*getOrgsResponse, error) { return response, nil } -// ParsePostOrgsResponse parses an HTTP response from a PostOrgsWithResponse call -func ParsePostOrgsResponse(rsp *http.Response) (*postOrgsResponse, error) { +// ParsePatchOrgsIDResponse parses an HTTP response from a PatchOrgsIDWithResponse call +func ParsePatchOrgsIDResponse(rsp *http.Response) (*patchOrgsIDResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &postOrgsResponse{ + response := &patchOrgsIDResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest Organization if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json"): var dest Error @@ -23739,26 +25841,26 @@ func ParsePostOrgsResponse(rsp *http.Response) (*postOrgsResponse, error) { return response, nil } -// ParseDeleteOrgsIDResponse parses an HTTP response from a DeleteOrgsIDWithResponse call -func ParseDeleteOrgsIDResponse(rsp *http.Response) (*deleteOrgsIDResponse, error) { +// ParsePostOrgsIDInvitesResponse parses an HTTP response from a PostOrgsIDInvitesWithResponse call +func ParsePostOrgsIDInvitesResponse(rsp *http.Response) (*postOrgsIDInvitesResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &deleteOrgsIDResponse{ + response := &postOrgsIDInvitesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Invite if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json"): var dest Error @@ -23772,27 +25874,20 @@ func ParseDeleteOrgsIDResponse(rsp *http.Response) (*deleteOrgsIDResponse, error return response, nil } -// ParseGetOrgsIDResponse parses an HTTP response from a GetOrgsIDWithResponse call -func ParseGetOrgsIDResponse(rsp *http.Response) (*getOrgsIDResponse, error) { +// ParseDeleteOrgsIDInviteIDResponse parses an HTTP response from a DeleteOrgsIDInviteIDWithResponse call +func ParseDeleteOrgsIDInviteIDResponse(rsp *http.Response) (*deleteOrgsIDInviteIDResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &getOrgsIDResponse{ + response := &deleteOrgsIDInviteIDResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Organization - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json"): var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23805,22 +25900,22 @@ func ParseGetOrgsIDResponse(rsp *http.Response) (*getOrgsIDResponse, error) { return response, nil } -// ParsePatchOrgsIDResponse parses an HTTP response from a PatchOrgsIDWithResponse call -func ParsePatchOrgsIDResponse(rsp *http.Response) (*patchOrgsIDResponse, error) { +// ParsePostOrgsIDInviteIDResendResponse parses an HTTP response from a PostOrgsIDInviteIDResendWithResponse call +func ParsePostOrgsIDInviteIDResendResponse(rsp *http.Response) (*postOrgsIDInviteIDResendResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &patchOrgsIDResponse{ + response := &postOrgsIDInviteIDResendResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Organization + var dest Invite if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24253,6 +26348,65 @@ func ParsePostOrgsIDSecretsResponse(rsp *http.Response) (*postOrgsIDSecretsRespo return response, nil } +// ParseGetCloudUsersResponse parses an HTTP response from a GetCloudUsersWithResponse call +func ParseGetCloudUsersResponse(rsp *http.Response) (*getCloudUsersResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &getCloudUsersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CloudUsers + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseDeleteOrgsIDCloudUserIDResponse parses an HTTP response from a DeleteOrgsIDCloudUserIDWithResponse call +func ParseDeleteOrgsIDCloudUserIDResponse(rsp *http.Response) (*deleteOrgsIDCloudUserIDResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &deleteOrgsIDCloudUserIDResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + // ParseCreatePkgResponse parses an HTTP response from a CreatePkgWithResponse call func ParseCreatePkgResponse(rsp *http.Response) (*createPkgResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) @@ -24272,7 +26426,7 @@ func ParseCreatePkgResponse(rsp *http.Response) (*createPkgResponse, error) { if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.YAML200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json"): var dest Error @@ -24281,6 +26435,13 @@ func ParseCreatePkgResponse(rsp *http.Response) (*createPkgResponse, error) { } response.JSONDefault = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "yaml") && rsp.StatusCode == 200: + var dest Pkg + if err := yaml.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.YAML200 = &dest + } return response, nil @@ -24326,6 +26487,164 @@ func ParseApplyPkgResponse(rsp *http.Response) (*applyPkgResponse, error) { return response, nil } +// ParseListStacksResponse parses an HTTP response from a ListStacksWithResponse call +func ParseListStacksResponse(rsp *http.Response) (*listStacksResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &listStacksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + OrgID *string `json:"orgID,omitempty"` + Resources *struct { + ApiVersion *string `json:"apiVersion,omitempty"` + Associations *[]struct { + Kind *string `json:"kind,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + } `json:"associations,omitempty"` + Kind *string `json:"kind,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + ResourceID *string `json:"resourceID,omitempty"` + } `json:"resources,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + Urls *[]string `json:"urls,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseCreateStackResponse parses an HTTP response from a CreateStackWithResponse call +func ParseCreateStackResponse(rsp *http.Response) (*createStackResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &createStackResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + OrgID *string `json:"orgID,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + Urls *[]string `json:"urls,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseDeleteStackResponse parses an HTTP response from a DeleteStackWithResponse call +func ParseDeleteStackResponse(rsp *http.Response) (*deleteStackResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &deleteStackResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseExportStackResponse parses an HTTP response from a ExportStackWithResponse call +func ParseExportStackResponse(rsp *http.Response) (*exportStackResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &exportStackResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Pkg + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.YAML200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "yaml") && rsp.StatusCode == 200: + var dest Pkg + if err := yaml.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.YAML200 = &dest + + } + + return response, nil +} + // ParsePostQueryResponse parses an HTTP response from a PostQueryWithResponse call func ParsePostQueryResponse(rsp *http.Response) (*postQueryResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) @@ -25043,6 +27362,39 @@ func ParsePostSetupResponse(rsp *http.Response) (*postSetupResponse, error) { return response, nil } +// ParsePostSetupUserResponse parses an HTTP response from a PostSetupUserWithResponse call +func ParsePostSetupUserResponse(rsp *http.Response) (*postSetupUserResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() + if err != nil { + return nil, err + } + + response := &postSetupUserResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest OnboardingResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json"): + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + // ParsePostSigninResponse parses an HTTP response from a PostSigninWithResponse call func ParsePostSigninResponse(rsp *http.Response) (*postSigninResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) diff --git a/domain/swagger.yml b/domain/swagger.yml index d9330468..61027fc1 100644 --- a/domain/swagger.yml +++ b/domain/swagger.yml @@ -12,17 +12,17 @@ paths: security: - BasicAuth: [] parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '204': + "204": description: Successfully authenticated - '401': + "401": description: Unauthorized access content: application/json: schema: $ref: "#/components/schemas/Error" - '403': + "403": description: user account is disabled content: application/json: @@ -39,11 +39,11 @@ paths: operationId: PostSignout summary: Expire the current session parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '204': + "204": description: Session successfully expired - '401': + "401": description: Unauthorized access content: application/json: @@ -60,7 +60,7 @@ paths: operationId: GetRoutes summary: Map of all top level routes available parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: default: description: All routes @@ -76,11 +76,10 @@ paths: summary: Check if database has default user, org, bucket description: Returns `true` if no default user, organization, or bucket has been created. parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': - description: - allowed true or false + "200": + description: allowed true or false content: application/json: schema: @@ -92,7 +91,7 @@ paths: summary: Set up initial user, org and bucket description: Post an onboarding request to set up initial user, org and bucket. parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Source to create required: true @@ -101,7 +100,36 @@ paths: schema: $ref: "#/components/schemas/OnboardingRequest" responses: - '201': + "201": + description: Created default user, bucket, org + content: + application/json: + schema: + $ref: "#/components/schemas/OnboardingResponse" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /setup/user: + post: + operationId: PostSetupUser + tags: + - Setup + summary: Set up a new user, org and bucket + description: Post an onboarding request to set up a new user, org and bucket. + parameters: + - $ref: "#/components/parameters/TraceSpan" + requestBody: + description: Source to create + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/OnboardingRequest" + responses: + "201": description: Created default user, bucket, org content: application/json: @@ -119,19 +147,19 @@ paths: tags: - Templates parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: org - description: Specifies the name of the organization of the template. - schema: - type: string - - in: query - name: orgID - description: Specifies the organization ID of the template. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: org + description: Specifies the name of the organization of the template. + schema: + type: string + - in: query + name: orgID + description: Specifies the organization ID of the template. + schema: + type: string responses: - '200': + "200": description: A list of template documents content: application/json: @@ -149,7 +177,7 @@ paths: - Templates summary: Create a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Template that will be created required: true @@ -158,7 +186,7 @@ paths: schema: $ref: "#/components/schemas/DocumentCreate" responses: - '201': + "201": description: Template created content: application/json: @@ -170,13 +198,13 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/documents/templates/{templateID}': + "/documents/templates/{templateID}": get: operationId: GetDocumentsTemplatesID tags: - Templates parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -184,7 +212,7 @@ paths: required: true description: The template ID. responses: - '200': + "200": description: The template requested content: application/json: @@ -201,7 +229,7 @@ paths: tags: - Templates parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -216,7 +244,7 @@ paths: schema: $ref: "#/components/schemas/DocumentUpdate" responses: - '200': + "200": description: The newly updated template content: application/json: @@ -234,7 +262,7 @@ paths: - Templates summary: Delete a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -242,7 +270,7 @@ paths: required: true description: The template ID. responses: - '204': + "204": description: Delete has been accepted default: description: Unexpected error @@ -250,14 +278,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/documents/templates/{templateID}/labels': + "/documents/templates/{templateID}/labels": get: operationId: GetDocumentsTemplatesIDLabels tags: - Templates summary: List all labels for a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -265,7 +293,7 @@ paths: required: true description: The template ID. responses: - '200': + "200": description: A list of all labels for a template content: application/json: @@ -283,7 +311,7 @@ paths: - Templates summary: Add a label to a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -298,7 +326,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label added to the template content: application/json: @@ -310,14 +338,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/documents/templates/{templateID}/labels/{labelID}': + "/documents/templates/{templateID}/labels/{labelID}": delete: operationId: DeleteDocumentsTemplatesIDLabelsID tags: - Templates summary: Delete a label from a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -331,9 +359,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Template not found content: application/json: @@ -345,18 +373,233 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" + /dbrps: + get: + operationId: GetDBRPs + tags: + - DBRPs + summary: List all database retention policy mappings + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: orgID + required: true + description: Specifies the organization ID to filter on + schema: + type: string + - in: query + name: id + description: Specifies the mapping ID to filter on + schema: + type: string + - in: query + name: bucketID + description: Specifies the bucket ID to filter on + schema: + type: string + - in: query + name: default + description: Specifies filtering on default + schema: + type: boolean + - in: query + name: db + description: Specifies the database to filter on + schema: + type: string + - in: query + name: rp + description: Specifies the retention policy to filter on + schema: + type: string + responses: + "200": + description: A list of all database retention policy mappings + content: + application/json: + schema: + $ref: "#/components/schemas/DBRPs" + "400": + description: if any of the parameter passed is invalid + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + post: + operationId: PostDBRP + tags: + - DBRPs + summary: Add a database retention policy mapping + parameters: + - $ref: "#/components/parameters/TraceSpan" + requestBody: + description: The database retention policy mapping to add + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/DBRP" + responses: + "201": + description: Database retention policy mapping created + content: + application/json: + schema: + $ref: "#/components/schemas/DBRP" + "400": + description: if any of the IDs in the mapping is invalid + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "/dbrps/{dbrpID}": + get: + operationId: GetDBRPsID + tags: + - DBRPs + summary: Retrieve a database retention policy mapping + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: orgID + required: true + description: Specifies the organization ID of the mapping + schema: + type: string + - in: path + name: dbrpID + schema: + type: string + required: true + description: The database retention policy mapping ID + responses: + "200": + description: The database retention policy requested + content: + application/json: + schema: + $ref: "#/components/schemas/DBRP" + "400": + description: if any of the IDs passed is invalid + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + patch: + operationId: PatchDBRPID + tags: + - DBRPs + summary: Update a database retention policy mapping + requestBody: + description: Database retention policy update to apply + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/DBRPUpdate" + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: orgID + required: true + description: Specifies the organization ID of the mapping + schema: + type: string + - in: path + name: dbrpID + schema: + type: string + required: true + description: The database retention policy mapping. + responses: + "200": + description: An updated mapping + content: + application/json: + schema: + $ref: "#/components/schemas/DBRP" + "404": + description: The mapping was not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "400": + description: if any of the IDs passed is invalid + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + delete: + operationId: DeleteDBRPID + tags: + - DBRPs + summary: Delete a database retention policy + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: orgID + required: true + description: Specifies the organization ID of the mapping + schema: + type: string + - in: path + name: dbrpID + schema: + type: string + required: true + description: The database retention policy mapping + responses: + "204": + description: Delete has been accepted + "400": + description: if any of the IDs passed is invalid + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /telegraf/plugins: get: operationId: GetTelegrafPlugins parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: type - description: The type of plugin desired. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: type + description: The type of plugin desired. + schema: + type: string responses: - '200': + "200": description: A list of Telegraf plugins. content: application/json: @@ -374,14 +617,14 @@ paths: tags: - Telegrafs parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - description: The organization ID the Telegraf config belongs to. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: orgID + description: The organization ID the Telegraf config belongs to. + schema: + type: string responses: - '200': + "200": description: A list of Telegraf configs content: application/json: @@ -399,7 +642,7 @@ paths: - Telegrafs summary: Create a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Telegraf config to create required: true @@ -408,7 +651,7 @@ paths: schema: $ref: "#/components/schemas/TelegrafRequest" responses: - '201': + "201": description: Telegraf config created content: application/json: @@ -420,14 +663,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}': + "/telegrafs/{telegrafID}": get: operationId: GetTelegrafsID tags: - Telegrafs summary: Retrieve a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -445,7 +688,7 @@ paths: - application/json - application/octet-stream responses: - '200': + "200": description: Telegraf config details content: application/toml: @@ -471,7 +714,7 @@ paths: - Telegrafs summary: Update a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -486,7 +729,7 @@ paths: schema: $ref: "#/components/schemas/TelegrafRequest" responses: - '200': + "200": description: An updated Telegraf config content: application/json: @@ -504,7 +747,7 @@ paths: - Telegrafs summary: Delete a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -512,7 +755,7 @@ paths: required: true description: The Telegraf config ID. responses: - '204': + "204": description: Delete has been accepted default: description: Unexpected error @@ -520,14 +763,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/labels': + "/telegrafs/{telegrafID}/labels": get: operationId: GetTelegrafsIDLabels tags: - Telegrafs summary: List all labels for a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -535,7 +778,7 @@ paths: required: true description: The Telegraf config ID. responses: - '200': + "200": description: A list of all labels for a Telegraf config content: application/json: @@ -553,7 +796,7 @@ paths: - Telegrafs summary: Add a label to a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -568,7 +811,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label added to the Telegraf config content: application/json: @@ -580,14 +823,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/labels/{labelID}': + "/telegrafs/{telegrafID}/labels/{labelID}": delete: operationId: DeleteTelegrafsIDLabelsID tags: - Telegrafs summary: Delete a label from a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -601,9 +844,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Telegraf config not found content: application/json: @@ -615,7 +858,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/members': + "/telegrafs/{telegrafID}/members": get: operationId: GetTelegrafsIDMembers tags: @@ -623,7 +866,7 @@ paths: - Telegrafs summary: List all users with member privileges for a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -631,7 +874,7 @@ paths: required: true description: The Telegraf config ID. responses: - '200': + "200": description: A list of Telegraf config members content: application/json: @@ -650,7 +893,7 @@ paths: - Telegrafs summary: Add a member to a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -665,7 +908,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Member added to Telegraf config content: application/json: @@ -677,7 +920,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/members/{userID}': + "/telegrafs/{telegrafID}/members/{userID}": delete: operationId: DeleteTelegrafsIDMembersID tags: @@ -685,7 +928,7 @@ paths: - Telegrafs summary: Remove a member from a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -699,7 +942,7 @@ paths: required: true description: The Telegraf config ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -707,7 +950,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/owners': + "/telegrafs/{telegrafID}/owners": get: operationId: GetTelegrafsIDOwners tags: @@ -715,7 +958,7 @@ paths: - Telegrafs summary: List all owners of a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -723,7 +966,7 @@ paths: required: true description: The Telegraf config ID. responses: - '200': + "200": description: A list of Telegraf config owners content: application/json: @@ -742,7 +985,7 @@ paths: - Telegrafs summary: Add an owner to a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -757,7 +1000,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Telegraf config owner added content: application/json: @@ -769,7 +1012,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/owners/{userID}': + "/telegrafs/{telegrafID}/owners/{userID}": delete: operationId: DeleteTelegrafsIDOwnersID tags: @@ -777,7 +1020,7 @@ paths: - Telegrafs summary: Remove an owner from a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -791,7 +1034,7 @@ paths: required: true description: The Telegraf config ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -806,31 +1049,31 @@ paths: - ScraperTargets summary: Get all scraper targets parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: name - description: Specifies the name of the scraper target. - schema: - type: string - - in: query - name: id - description: List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. - schema: - type: array - items: - type: string - - in: query - name: orgID - description: Specifies the organization ID of the scraper target. - schema: - type: string - - in: query - name: org - description: Specifies the organization name of the scraper target. - schema: + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: name + description: Specifies the name of the scraper target. + schema: + type: string + - in: query + name: id + description: List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. + schema: + type: array + items: type: string + - in: query + name: orgID + description: Specifies the organization ID of the scraper target. + schema: + type: string + - in: query + name: org + description: Specifies the organization name of the scraper target. + schema: + type: string responses: - '200': + "200": description: All scraper targets content: application/json: @@ -842,7 +1085,7 @@ paths: tags: - ScraperTargets parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Scraper target to create required: true @@ -851,7 +1094,7 @@ paths: schema: $ref: "#/components/schemas/ScraperTargetRequest" responses: - '201': + "201": description: Scraper target created content: application/json: @@ -863,14 +1106,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}': + "/scrapers/{scraperTargetID}": get: operationId: GetScrapersID tags: - ScraperTargets summary: Get a scraper target by ID parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID required: true @@ -878,7 +1121,7 @@ paths: type: string description: The scraper target ID. responses: - '200': + "200": description: Scraper target updated content: application/json: @@ -896,7 +1139,7 @@ paths: - ScraperTargets summary: Delete a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID required: true @@ -904,7 +1147,7 @@ paths: type: string description: The scraper target ID. responses: - '204': + "204": description: Scraper target deleted default: description: Internal server error @@ -918,7 +1161,7 @@ paths: tags: - ScraperTargets parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID required: true @@ -933,7 +1176,7 @@ paths: schema: $ref: "#/components/schemas/ScraperTargetRequest" responses: - '200': + "200": description: Scraper target updated content: application/json: @@ -945,14 +1188,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/labels': + "/scrapers/{scraperTargetID}/labels": get: operationId: GetScrapersIDLabels tags: - ScraperTargets summary: List all labels for a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -960,7 +1203,7 @@ paths: required: true description: The scraper target ID. responses: - '200': + "200": description: A list of all labels for a scraper target content: application/json: @@ -978,7 +1221,7 @@ paths: - ScraperTargets summary: Add a label to a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -993,7 +1236,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The newly added label content: application/json: @@ -1005,14 +1248,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/labels/{labelID}': + "/scrapers/{scraperTargetID}/labels/{labelID}": delete: operationId: DeleteScrapersIDLabelsID tags: - ScraperTargets summary: Delete a label from a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1026,9 +1269,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Scraper target not found content: application/json: @@ -1046,7 +1289,7 @@ paths: - ScraperTargets summary: Update a label on a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1067,9 +1310,9 @@ paths: schema: $ref: "#/components/schemas/Label" responses: - '200': + "200": description: Updated successfully - '404': + "404": description: Scraper target not found content: application/json: @@ -1081,7 +1324,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/members': + "/scrapers/{scraperTargetID}/members": get: operationId: GetScrapersIDMembers tags: @@ -1089,7 +1332,7 @@ paths: - ScraperTargets summary: List all users with member privileges for a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1097,7 +1340,7 @@ paths: required: true description: The scraper target ID. responses: - '200': + "200": description: A list of scraper target members content: application/json: @@ -1116,7 +1359,7 @@ paths: - ScraperTargets summary: Add a member to a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1131,7 +1374,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Member added to scraper targets content: application/json: @@ -1143,7 +1386,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/members/{userID}': + "/scrapers/{scraperTargetID}/members/{userID}": delete: operationId: DeleteScrapersIDMembersID tags: @@ -1151,7 +1394,7 @@ paths: - ScraperTargets summary: Remove a member from a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -1165,7 +1408,7 @@ paths: required: true description: The scraper target ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -1173,7 +1416,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/owners': + "/scrapers/{scraperTargetID}/owners": get: operationId: GetScrapersIDOwners tags: @@ -1181,7 +1424,7 @@ paths: - ScraperTargets summary: List all owners of a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1189,7 +1432,7 @@ paths: required: true description: The scraper target ID. responses: - '200': + "200": description: A list of scraper target owners content: application/json: @@ -1208,7 +1451,7 @@ paths: - ScraperTargets summary: Add an owner to a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1223,7 +1466,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Scraper target owner added content: application/json: @@ -1235,7 +1478,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/owners/{userID}': + "/scrapers/{scraperTargetID}/owners/{userID}": delete: operationId: DeleteScrapersIDOwnersID tags: @@ -1243,7 +1486,7 @@ paths: - ScraperTargets summary: Remove an owner from a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -1257,7 +1500,7 @@ paths: required: true description: The scraper target ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -1272,7 +1515,7 @@ paths: - Variables summary: Get all variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: org description: The organization name. @@ -1284,13 +1527,13 @@ paths: schema: type: string responses: - '200': + "200": description: All variables for an organization content: application/json: schema: $ref: "#/components/schemas/Variables" - '400': + "400": description: Invalid request content: application/json: @@ -1308,7 +1551,7 @@ paths: tags: - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Variable to create required: true @@ -1317,7 +1560,7 @@ paths: schema: $ref: "#/components/schemas/Variable" responses: - '201': + "201": description: Variable created content: application/json: @@ -1329,14 +1572,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/variables/{variableID}': + "/variables/{variableID}": get: operationId: GetVariablesID tags: - Variables summary: Get a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID required: true @@ -1344,13 +1587,13 @@ paths: type: string description: The variable ID. responses: - '200': + "200": description: Variable found content: application/json: schema: $ref: "#/components/schemas/Variable" - '404': + "404": description: Variable not found content: application/json: @@ -1368,7 +1611,7 @@ paths: - Variables summary: Delete a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID required: true @@ -1376,7 +1619,7 @@ paths: type: string description: The variable ID. responses: - '204': + "204": description: Variable deleted default: description: Internal server error @@ -1390,7 +1633,7 @@ paths: tags: - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID required: true @@ -1405,7 +1648,7 @@ paths: schema: $ref: "#/components/schemas/Variable" responses: - '200': + "200": description: Variable updated content: application/json: @@ -1423,7 +1666,7 @@ paths: tags: - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID required: true @@ -1438,7 +1681,7 @@ paths: schema: $ref: "#/components/schemas/Variable" responses: - '200': + "200": description: Variable updated content: application/json: @@ -1450,14 +1693,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/variables/{variableID}/labels': + "/variables/{variableID}/labels": get: operationId: GetVariablesIDLabels tags: - Variables summary: List all labels for a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID schema: @@ -1465,7 +1708,7 @@ paths: required: true description: The variable ID. responses: - '200': + "200": description: A list of all labels for a variable content: application/json: @@ -1483,7 +1726,7 @@ paths: - Variables summary: Add a label to a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID schema: @@ -1498,7 +1741,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The newly added label content: application/json: @@ -1510,14 +1753,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/variables/{variableID}/labels/{labelID}': + "/variables/{variableID}/labels/{labelID}": delete: operationId: DeleteVariablesIDLabelsID tags: - Variables summary: Delete a label from a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID schema: @@ -1531,9 +1774,9 @@ paths: required: true description: The label ID to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Variable not found content: application/json: @@ -1559,7 +1802,7 @@ paths: schema: type: string parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: header name: Content-Encoding description: When present, its value indicates to the database that compression is applied to the line-protocol body. @@ -1621,33 +1864,33 @@ paths: schema: $ref: "#/components/schemas/WritePrecision" responses: - '204': + "204": description: Write data is correctly formatted and accepted for writing to the bucket. - '400': + "400": description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written. content: application/json: schema: $ref: "#/components/schemas/LineProtocolError" - '401': + "401": description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist. content: application/json: schema: $ref: "#/components/schemas/Error" - '403': + "403": description: No token was sent and they are required. content: application/json: schema: $ref: "#/components/schemas/Error" - '413': + "413": description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written. content: application/json: schema: $ref: "#/components/schemas/LineProtocolLengthError" - '429': + "429": description: Token is temporarily over quota. The Retry-After header describes when to try the write again. headers: Retry-After: @@ -1655,7 +1898,7 @@ paths: schema: type: integer format: int32 - '503': + "503": description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again. headers: Retry-After: @@ -1673,14 +1916,14 @@ paths: post: summary: Delete time series data from InfluxDB requestBody: - description: Predicate delete request - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/DeletePredicateRequest" + description: Predicate delete request + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/DeletePredicateRequest" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: org description: Specifies the organization to delete data from. @@ -1705,21 +1948,21 @@ paths: type: string description: Only points from this bucket ID are deleted. responses: - '204': + "204": description: delete has been accepted - '400': + "400": description: invalid request. content: application/json: schema: $ref: "#/components/schemas/Error" - '404': + "404": description: the bucket or organization is not found. content: application/json: schema: $ref: "#/components/schemas/Error" - '403': + "403": description: no token was sent or does not have sufficient permissions. content: application/json: @@ -1733,16 +1976,16 @@ paths: $ref: "#/components/schemas/Error" /ready: servers: - - url: / + - url: / get: operationId: GetReady tags: - Ready summary: Get the readiness of an instance at startup parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: The instance is ready content: application/json: @@ -1756,22 +1999,22 @@ paths: $ref: "#/components/schemas/Error" /health: servers: - - url: / + - url: / get: operationId: GetHealth tags: - Health summary: Get the health of an instance parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: The instance is healthy content: application/json: schema: $ref: "#/components/schemas/HealthCheck" - '503': + "503": description: The instance is unhealthy content: application/json: @@ -1790,16 +2033,16 @@ paths: - Sources summary: Creates a source parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: - description: Source to create - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Source" + description: Source to create + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Source" responses: - '201': + "201": description: Created Source content: application/json: @@ -1817,14 +2060,14 @@ paths: - Sources summary: Get all sources parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: org - description: The organization name. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: org + description: The organization name. + schema: + type: string responses: - '200': + "200": description: All sources content: application/json: @@ -1843,7 +2086,7 @@ paths: - Sources summary: Delete a source parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: sourceID schema: @@ -1851,9 +2094,9 @@ paths: required: true description: The source ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: View not found content: application/json: @@ -1871,28 +2114,28 @@ paths: - Sources summary: Update a Source parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: sourceID - schema: - type: string - required: true - description: The source ID. - requestBody: - description: Source update + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: sourceID + schema: + type: string required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Source" + description: The source ID. + requestBody: + description: Source update + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Source" responses: - '200': + "200": description: Created Source content: application/json: schema: $ref: "#/components/schemas/Source" - '404': + "404": description: Source not found content: application/json: @@ -1910,21 +2153,21 @@ paths: - Sources summary: Get a source parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: sourceID - schema: - type: string - required: true - description: The source ID. + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: sourceID + schema: + type: string + required: true + description: The source ID. responses: - '200': + "200": description: A source content: application/json: schema: $ref: "#/components/schemas/Source" - '404': + "404": description: Source not found content: application/json: @@ -1943,21 +2186,21 @@ paths: - Sources summary: Get the health of a source parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: sourceID - schema: - type: string - required: true - description: The source ID. + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: sourceID + schema: + type: string + required: true + description: The source ID. responses: - '200': + "200": description: The source is healthy content: application/json: schema: $ref: "#/components/schemas/HealthCheck" - '503': + "503": description: The source is not healthy content: application/json: @@ -1977,26 +2220,26 @@ paths: - Buckets summary: Get buckets in a source parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: sourceID - schema: - type: string - required: true - description: The source ID. - - in: query - name: org - description: The organization name. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: sourceID + schema: + type: string + required: true + description: The source ID. + - in: query + name: org + description: The organization name. + schema: + type: string responses: - '200': + "200": description: A source content: application/json: schema: $ref: "#/components/schemas/Buckets" - '404': + "404": description: Source not found content: application/json: @@ -2015,14 +2258,14 @@ paths: - Labels summary: Create a label requestBody: - description: Label to create - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/LabelCreateRequest" + description: Label to create + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/LabelCreateRequest" responses: - '201': + "201": description: Added label content: application/json: @@ -2040,14 +2283,14 @@ paths: - Labels summary: Get all labels parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - description: The organization ID. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: orgID + description: The organization ID. + schema: + type: string responses: - '200': + "200": description: All labels content: application/json: @@ -2066,7 +2309,7 @@ paths: - Labels summary: Get a label parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: labelID schema: @@ -2074,7 +2317,7 @@ paths: required: true description: The ID of the label to update. responses: - '200': + "200": description: A label content: application/json: @@ -2092,14 +2335,14 @@ paths: - Labels summary: Update a label requestBody: - description: Label update - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/LabelUpdate" + description: Label update + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/LabelUpdate" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: labelID schema: @@ -2107,13 +2350,13 @@ paths: required: true description: The ID of the label to update. responses: - '200': + "200": description: Updated label content: application/json: schema: $ref: "#/components/schemas/LabelResponse" - '404': + "404": description: Label not found content: application/json: @@ -2131,7 +2374,7 @@ paths: - Labels summary: Delete a label parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: labelID schema: @@ -2139,9 +2382,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Label not found content: application/json: @@ -2160,16 +2403,16 @@ paths: - Dashboards summary: Create a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: - description: Dashboard to create - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CreateDashboardRequest" + description: Dashboard to create + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateDashboardRequest" responses: - '201': + "201": description: Added dashboard content: application/json: @@ -2189,40 +2432,40 @@ paths: - Dashboards summary: Get all dashboards parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: owner - description: The owner ID. - schema: - type: string - - in: query - name: sortBy - description: The column to sort by. - schema: - type: string - enum: - - "ID" - - "CreatedAt" - - "UpdatedAt" - - in: query - name: id - description: List of dashboard IDs to return. If both `id and `owner` are specified, only `id` is used. - schema: - type: array - items: - type: string - - in: query - name: orgID - description: The organization ID. - schema: - type: string - - in: query - name: org - description: The organization name. - schema: + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: owner + description: The owner ID. + schema: + type: string + - in: query + name: sortBy + description: The column to sort by. + schema: + type: string + enum: + - "ID" + - "CreatedAt" + - "UpdatedAt" + - in: query + name: id + description: List of dashboard IDs to return. If both `id and `owner` are specified, only `id` is used. + schema: + type: array + items: type: string + - in: query + name: orgID + description: The organization ID. + schema: + type: string + - in: query + name: org + description: The organization name. + schema: + type: string responses: - '200': + "200": description: All dashboards content: application/json: @@ -2234,63 +2477,73 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}': + "/dashboards/{dashboardID}": get: operationId: GetDashboardsID tags: - Dashboards summary: Get a Dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. - - in: query - name: include - required: false - schema: - type: string - enum: - - properties - description: Includes the cell view properties in the response if set to `properties` - responses: - '200': - description: Get a single dashboard - content: - application/json: - schema: - oneOf: - - $ref: "#/components/schemas/Dashboard" - - $ref: "#/components/schemas/DashboardWithViewProperties" - '404': - description: Dashboard not found - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - patch: - operationId: PatchDashboardsID - tags: - - Dashboards - summary: Update a dashboard - requestBody: - description: Patching of a dashboard + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: dashboardID + schema: + type: string required: true + description: The ID of the dashboard to update. + - in: query + name: include + required: false + schema: + type: string + enum: + - properties + description: Includes the cell view properties in the response if set to `properties` + responses: + "200": + description: Get a single dashboard content: application/json: schema: - $ref: "#/components/schemas/Dashboard" + oneOf: + - $ref: "#/components/schemas/Dashboard" + - $ref: "#/components/schemas/DashboardWithViewProperties" + "404": + description: Dashboard not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + patch: + operationId: PatchDashboardsID + tags: + - Dashboards + summary: Update a dashboard + requestBody: + description: Patching of a dashboard + required: true + content: + application/json: + schema: + type: object + properties: + name: + description: optional, when provided will replace the name + type: string + description: + description: optional, when provided will replace the description + type: string + cells: + description: optional, when provided will replace all existing cells with the cells provided + $ref: "#/components/schemas/CellWithViewProperties" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2298,13 +2551,13 @@ paths: required: true description: The ID of the dashboard to update. responses: - '200': + "200": description: Updated dashboard content: application/json: schema: $ref: "#/components/schemas/Dashboard" - '404': + "404": description: Dashboard not found content: application/json: @@ -2322,7 +2575,7 @@ paths: - Dashboards summary: Delete a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2330,9 +2583,9 @@ paths: required: true description: The ID of the dashboard to update. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Dashboard not found content: application/json: @@ -2344,7 +2597,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/cells': + "/dashboards/{dashboardID}/cells": put: operationId: PutDashboardsIDCells tags: @@ -2353,13 +2606,13 @@ paths: summary: Replace cells in a dashboard description: Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells. requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Cells" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Cells" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2367,13 +2620,13 @@ paths: required: true description: The ID of the dashboard to update. responses: - '201': + "201": description: Replaced dashboard cells content: application/json: schema: $ref: "#/components/schemas/Dashboard" - '404': + "404": description: Dashboard not found content: application/json: @@ -2392,14 +2645,14 @@ paths: - Dashboards summary: Create a dashboard cell requestBody: - description: Cell that will be added - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CreateCell" + description: Cell that will be added + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateCell" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2407,13 +2660,13 @@ paths: required: true description: The ID of the dashboard to update. responses: - '201': + "201": description: Cell successfully added content: application/json: schema: $ref: "#/components/schemas/Cell" - '404': + "404": description: Dashboard not found content: application/json: @@ -2425,7 +2678,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/cells/{cellID}': + "/dashboards/{dashboardID}/cells/{cellID}": patch: operationId: PatchDashboardsIDCellsID tags: @@ -2434,13 +2687,13 @@ paths: summary: Update the non-positional information related to a cell description: Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts. requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CellUpdate" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CellUpdate" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2454,13 +2707,13 @@ paths: required: true description: The ID of the cell to update. responses: - '200': + "200": description: Updated dashboard cell content: application/json: schema: $ref: "#/components/schemas/Cell" - '404': + "404": description: Cell or dashboard not found content: application/json: @@ -2479,7 +2732,7 @@ paths: - Dashboards summary: Delete a dashboard cell parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2493,9 +2746,9 @@ paths: required: true description: The ID of the cell to delete. responses: - '204': + "204": description: Cell successfully deleted - '404': + "404": description: Cell or dashboard not found content: application/json: @@ -2507,7 +2760,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/cells/{cellID}/view': + "/dashboards/{dashboardID}/cells/{cellID}/view": get: operationId: GetDashboardsIDCellsIDView tags: @@ -2516,7 +2769,7 @@ paths: - Views summary: Retrieve the view for a cell parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2530,13 +2783,13 @@ paths: required: true description: The cell ID. responses: - '200': + "200": description: A dashboard cells view content: application/json: schema: $ref: "#/components/schemas/View" - '404': + "404": description: Cell or dashboard not found content: application/json: @@ -2556,13 +2809,13 @@ paths: - Views summary: Update the view for a cell requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/View" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/View" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2576,13 +2829,13 @@ paths: required: true description: The ID of the cell to update. responses: - '200': + "200": description: Updated cell view content: application/json: schema: $ref: "#/components/schemas/View" - '404': + "404": description: Cell or dashboard not found content: application/json: @@ -2594,14 +2847,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/labels': + "/dashboards/{dashboardID}/labels": get: operationId: GetDashboardsIDLabels tags: - Dashboards summary: list all labels for a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2609,7 +2862,7 @@ paths: required: true description: The dashboard ID. responses: - '200': + "200": description: A list of all labels for a dashboard content: application/json: @@ -2627,7 +2880,7 @@ paths: - Dashboards summary: Add a label to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2642,7 +2895,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label added to the dashboard content: application/json: @@ -2654,14 +2907,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/labels/{labelID}': + "/dashboards/{dashboardID}/labels/{labelID}": delete: operationId: DeleteDashboardsIDLabelsID tags: - Dashboards summary: Delete a label from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2675,9 +2928,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Dashboard not found content: application/json: @@ -2689,7 +2942,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/members': + "/dashboards/{dashboardID}/members": get: operationId: GetDashboardsIDMembers tags: @@ -2697,7 +2950,7 @@ paths: - Dashboards summary: List all dashboard members parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2705,7 +2958,7 @@ paths: required: true description: The dashboard ID. responses: - '200': + "200": description: A list of users who have member privileges for a dashboard content: application/json: @@ -2724,7 +2977,7 @@ paths: - Dashboards summary: Add a member to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2739,7 +2992,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to dashboard members content: application/json: @@ -2751,7 +3004,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/members/{userID}': + "/dashboards/{dashboardID}/members/{userID}": delete: operationId: DeleteDashboardsIDMembersID tags: @@ -2759,7 +3012,7 @@ paths: - Dashboards summary: Remove a member from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -2773,7 +3026,7 @@ paths: required: true description: The dashboard ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -2781,7 +3034,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/owners': + "/dashboards/{dashboardID}/owners": get: operationId: GetDashboardsIDOwners tags: @@ -2789,7 +3042,7 @@ paths: - Dashboards summary: List all dashboard owners parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2797,7 +3050,7 @@ paths: required: true description: The dashboard ID. responses: - '200': + "200": description: A list of users who have owner privileges for a dashboard content: application/json: @@ -2816,7 +3069,7 @@ paths: - Dashboards summary: Add an owner to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2831,7 +3084,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to dashboard owners content: application/json: @@ -2843,7 +3096,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/owners/{userID}': + "/dashboards/{dashboardID}/owners/{userID}": delete: operationId: DeleteDashboardsIDOwnersID tags: @@ -2851,7 +3104,7 @@ paths: - Dashboards summary: Remove an owner from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -2865,7 +3118,7 @@ paths: required: true description: The dashboard ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -2873,7 +3126,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/logs': + "/dashboards/{dashboardID}/logs": get: operationId: GetDashboardsIDLogs tags: @@ -2881,9 +3134,9 @@ paths: - OperationLogs summary: Retrieve operation logs for a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: path name: dashboardID required: true @@ -2891,7 +3144,7 @@ paths: schema: type: string responses: - '200': + "200": description: Operation logs for the dashboard content: application/json: @@ -2910,13 +3163,13 @@ paths: tags: - Query parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: header - name: Content-Type - schema: - type: string - enum: - - application/json + - $ref: "#/components/parameters/TraceSpan" + - in: header + name: Content-Type + schema: + type: string + enum: + - application/json requestBody: description: Analyzed Flux query to generate abstract syntax tree. content: @@ -2924,7 +3177,7 @@ paths: schema: $ref: "#/components/schemas/LanguageRequest" responses: - '200': + "200": description: Abstract syntax tree of flux query. content: application/json: @@ -2942,9 +3195,9 @@ paths: tags: - Query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: Suggestions for next functions in call chain content: application/json: @@ -2956,13 +3209,13 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/query/suggestions/{name}': + "/query/suggestions/{name}": get: operationId: GetQuerySuggestionsName tags: - Query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: name schema: @@ -2970,7 +3223,7 @@ paths: required: true description: The name of the branching suggestion. responses: - '200': + "200": description: Suggestions for next functions in call chain content: application/json: @@ -2989,7 +3242,7 @@ paths: - Authorizations summary: List all authorizations parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: userID schema: @@ -3011,7 +3264,7 @@ paths: type: string description: Only show authorizations that belong to a organization name. responses: - '200': + "200": description: A list of authorizations content: application/json: @@ -3029,7 +3282,7 @@ paths: - Authorizations summary: Create an authorization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Authorization to create required: true @@ -3038,13 +3291,13 @@ paths: schema: $ref: "#/components/schemas/Authorization" responses: - '201': + "201": description: Authorization created content: application/json: schema: $ref: "#/components/schemas/Authorization" - '400': + "400": description: Invalid request content: application/json: @@ -3063,7 +3316,7 @@ paths: - Authorizations summary: Retrieve an authorization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: authID schema: @@ -3071,7 +3324,7 @@ paths: required: true description: The ID of the authorization to get. responses: - '200': + "200": description: Authorization details content: application/json: @@ -3096,7 +3349,7 @@ paths: schema: $ref: "#/components/schemas/AuthorizationUpdateRequest" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: authID schema: @@ -3104,7 +3357,7 @@ paths: required: true description: The ID of the authorization to update. responses: - '200': + "200": description: The active or inactie authorization content: application/json: @@ -3122,7 +3375,7 @@ paths: - Authorizations summary: Delete a authorization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: authID schema: @@ -3130,7 +3383,7 @@ paths: required: true description: The ID of the authorization to delete. responses: - '204': + "204": description: Authorization deleted default: description: Unexpected error @@ -3145,7 +3398,7 @@ paths: - Query summary: Analyze an InfluxQL or Flux query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: header name: Content-Type schema: @@ -3153,33 +3406,33 @@ paths: enum: - application/json requestBody: - description: Flux or InfluxQL query to analyze + description: Flux or InfluxQL query to analyze + content: + application/json: + schema: + $ref: "#/components/schemas/Query" + responses: + "200": + description: Query analyze results. Errors will be empty if the query is valid. content: application/json: schema: - $ref: "#/components/schemas/Query" - responses: - '200': - description: Query analyze results. Errors will be empty if the query is valid. - content: - application/json: - schema: - $ref: "#/components/schemas/AnalyzeQueryResponse" - default: - description: Internal server error - headers: - X-Influx-Error: - description: Error string describing the problem - schema: - type: string - X-Influx-Reference: - description: Reference code unique to the error type - schema: - type: integer - content: - application/json: - schema: - $ref: "#/components/schemas/Error" + $ref: "#/components/schemas/AnalyzeQueryResponse" + default: + description: Internal server error + headers: + X-Influx-Error: + description: Error string describing the problem + schema: + type: string + X-Influx-Reference: + description: Reference code unique to the error type + schema: + type: integer + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /query: post: operationId: PostQuery @@ -3187,7 +3440,7 @@ paths: - Query summary: Query InfluxDB parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: header name: Accept-Encoding description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand. @@ -3216,61 +3469,61 @@ paths: schema: type: string requestBody: - description: Flux query or specification to execute + description: Flux query or specification to execute + content: + application/json: + schema: + oneOf: + - $ref: "#/components/schemas/Query" + - $ref: "#/components/schemas/InfluxQLQuery" + application/vnd.flux: + schema: + type: string + responses: + "200": + description: Query results + headers: + Content-Encoding: + description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body + schema: + type: string + description: Specifies that the response in the body is encoded with gzip or not encoded with identity. + default: identity + enum: + - gzip + - identity + Trace-Id: + description: The Trace-Id header reports the request's trace ID, if one was generated. + schema: + type: string + description: Specifies the request's trace ID. content: - application/json: + text/csv: schema: - oneOf: - - $ref: "#/components/schemas/Query" - - $ref: "#/components/schemas/InfluxQLQuery" - application/vnd.flux: + type: string + example: > + result,table,_start,_stop,_time,region,host,_value + mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43 + mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25 + mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62 + application/vnd.influx.arrow: schema: type: string - responses: - '200': - description: Query results - headers: - Content-Encoding: - description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body - schema: - type: string - description: Specifies that the response in the body is encoded with gzip or not encoded with identity. - default: identity - enum: - - gzip - - identity - Trace-Id: - description: The Trace-Id header reports the request's trace ID, if one was generated. - schema: - type: string - description: Specifies the request's trace ID. - content: - text/csv: - schema: - type: string - example: > - result,table,_start,_stop,_time,region,host,_value - mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43 - mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25 - mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62 - application/vnd.influx.arrow: - schema: - type: string - format: binary - '429': - description: Token is temporarily over quota. The Retry-After header describes when to try the read again. - headers: - Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. - schema: - type: integer - format: int32 - default: - description: Error processing query - content: - application/json: - schema: - $ref: "#/components/schemas/Error" + format: binary + "429": + description: Token is temporarily over quota. The Retry-After header describes when to try the read again. + headers: + Retry-After: + description: A non-negative decimal integer indicating the seconds to delay after the response is received. + schema: + type: integer + format: int32 + default: + description: Error processing query + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /buckets: get: operationId: GetBuckets @@ -3278,26 +3531,26 @@ paths: - Buckets summary: List all buckets parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: "#/components/parameters/Offset" - - $ref: "#/components/parameters/Limit" - - in: query - name: org - description: The organization name. - schema: - type: string - - in: query - name: orgID - description: The organization ID. - schema: - type: string - - in: query - name: name - description: Only returns buckets with a specific name. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" + - in: query + name: org + description: The organization name. + schema: + type: string + - in: query + name: orgID + description: The organization ID. + schema: + type: string + - in: query + name: name + description: Only returns buckets with a specific name. + schema: + type: string responses: - '200': + "200": description: A list of buckets content: application/json: @@ -3315,7 +3568,7 @@ paths: - Buckets summary: Create a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Bucket to create required: true @@ -3324,7 +3577,7 @@ paths: schema: $ref: "#/components/schemas/PostBucketRequest" responses: - '201': + "201": description: Bucket created content: application/json: @@ -3342,14 +3595,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}': + "/buckets/{bucketID}": get: operationId: GetBucketsID tags: - Buckets summary: Retrieve a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3357,7 +3610,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: Bucket details content: application/json: @@ -3382,7 +3635,7 @@ paths: schema: $ref: "#/components/schemas/Bucket" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3390,7 +3643,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: An updated bucket content: application/json: @@ -3408,7 +3661,7 @@ paths: - Buckets summary: Delete a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3416,9 +3669,9 @@ paths: required: true description: The ID of the bucket to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Bucket not found content: application/json: @@ -3430,14 +3683,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/labels': + "/buckets/{bucketID}/labels": get: operationId: GetBucketsIDLabels tags: - Buckets summary: List all labels for a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3445,7 +3698,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: A list of all labels for a bucket content: application/json: @@ -3463,7 +3716,7 @@ paths: - Buckets summary: Add a label to a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3478,7 +3731,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The newly added label content: application/json: @@ -3490,14 +3743,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/labels/{labelID}': + "/buckets/{bucketID}/labels/{labelID}": delete: operationId: DeleteBucketsIDLabelsID tags: - Buckets summary: delete a label from a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3511,9 +3764,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Bucket not found content: application/json: @@ -3525,7 +3778,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/members': + "/buckets/{bucketID}/members": get: operationId: GetBucketsIDMembers tags: @@ -3533,7 +3786,7 @@ paths: - Buckets summary: List all users with member privileges for a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3541,7 +3794,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: A list of bucket members content: application/json: @@ -3560,7 +3813,7 @@ paths: - Buckets summary: Add a member to a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3575,7 +3828,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Member added to bucket content: application/json: @@ -3587,7 +3840,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/members/{userID}': + "/buckets/{bucketID}/members/{userID}": delete: operationId: DeleteBucketsIDMembersID tags: @@ -3595,7 +3848,7 @@ paths: - Buckets summary: Remove a member from a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -3609,7 +3862,7 @@ paths: required: true description: The bucket ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -3617,7 +3870,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/owners': + "/buckets/{bucketID}/owners": get: operationId: GetBucketsIDOwners tags: @@ -3625,7 +3878,7 @@ paths: - Buckets summary: List all owners of a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3633,7 +3886,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: A list of bucket owners content: application/json: @@ -3652,7 +3905,7 @@ paths: - Buckets summary: Add an owner to a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3667,7 +3920,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Bucket owner added content: application/json: @@ -3679,7 +3932,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/owners/{userID}': + "/buckets/{bucketID}/owners/{userID}": delete: operationId: DeleteBucketsIDOwnersID tags: @@ -3687,7 +3940,7 @@ paths: - Buckets summary: Remove an owner from a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -3701,7 +3954,7 @@ paths: required: true description: The bucket ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -3709,7 +3962,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/logs': + "/buckets/{bucketID}/logs": get: operationId: GetBucketsIDLogs tags: @@ -3717,9 +3970,9 @@ paths: - OperationLogs summary: Retrieve operation logs for a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: path name: bucketID required: true @@ -3727,7 +3980,7 @@ paths: schema: type: string responses: - '200': + "200": description: Operation logs for the bucket content: application/json: @@ -3746,7 +3999,7 @@ paths: - Organizations summary: List all organizations parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: org schema: @@ -3763,7 +4016,7 @@ paths: type: string description: Filter organizations to a specific user ID. responses: - '200': + "200": description: A list of organizations content: application/json: @@ -3781,7 +4034,7 @@ paths: - Organizations summary: Create an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Organization to create required: true @@ -3790,7 +4043,7 @@ paths: schema: $ref: "#/components/schemas/Organization" responses: - '201': + "201": description: Organization created content: application/json: @@ -3802,14 +4055,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}': + "/orgs/{orgID}": get: operationId: GetOrgsID tags: - Organizations summary: Retrieve an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3817,7 +4070,7 @@ paths: required: true description: The ID of the organization to get. responses: - '200': + "200": description: Organization details content: application/json: @@ -3842,7 +4095,7 @@ paths: schema: $ref: "#/components/schemas/Organization" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3850,7 +4103,7 @@ paths: required: true description: The ID of the organization to get. responses: - '200': + "200": description: Organization updated content: application/json: @@ -3868,7 +4121,7 @@ paths: - Organizations summary: Delete an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3876,9 +4129,9 @@ paths: required: true description: The ID of the organization to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Organization not found content: application/json: @@ -3890,14 +4143,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/labels': + "/orgs/{orgID}/labels": get: operationId: GetOrgsIDLabels tags: - Organizations summary: List all labels for a organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3905,7 +4158,7 @@ paths: required: true description: The organization ID. responses: - '200': + "200": description: A list of all labels for an organization content: application/json: @@ -3923,7 +4176,7 @@ paths: - Organizations summary: Add a label to an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3938,7 +4191,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: Returns the created label content: application/json: @@ -3950,14 +4203,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/labels/{labelID}': + "/orgs/{orgID}/labels/{labelID}": delete: operationId: DeleteOrgsIDLabelsID tags: - Organizations summary: Delete a label from an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3971,9 +4224,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Organization not found content: application/json: @@ -3985,7 +4238,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/secrets': + "/orgs/{orgID}/secrets": get: operationId: GetOrgsIDSecrets tags: @@ -3993,7 +4246,7 @@ paths: - Organizations summary: List all secret keys for an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4001,7 +4254,7 @@ paths: required: true description: The organization ID. responses: - '200': + "200": description: A list of all secret keys content: application/json: @@ -4020,7 +4273,7 @@ paths: - Organizations summary: Update secrets in an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4035,7 +4288,7 @@ paths: schema: $ref: "#/components/schemas/Secrets" responses: - '204': + "204": description: Keys successfully patched default: description: Unexpected error @@ -4043,7 +4296,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/secrets/delete': # had to make this because swagger wouldn't let me have a request body with a DELETE + "/orgs/{orgID}/secrets/delete": # had to make this because swagger wouldn't let me have a request body with a DELETE post: operationId: PostOrgsIDSecrets tags: @@ -4051,7 +4304,7 @@ paths: - Organizations summary: Delete secrets from an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4066,7 +4319,7 @@ paths: schema: $ref: "#/components/schemas/SecretKeys" responses: - '204': + "204": description: Keys successfully patched default: description: Unexpected error @@ -4074,7 +4327,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/members': + "/orgs/{orgID}/members": get: operationId: GetOrgsIDMembers tags: @@ -4082,7 +4335,7 @@ paths: - Organizations summary: List all members of an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4090,13 +4343,13 @@ paths: required: true description: The organization ID. responses: - '200': + "200": description: A list of organization members content: application/json: schema: $ref: "#/components/schemas/ResourceMembers" - '404': + "404": description: Organization not found content: application/json: @@ -4115,7 +4368,7 @@ paths: - Organizations summary: Add a member to an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4130,7 +4383,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to organization created content: application/json: @@ -4142,7 +4395,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/members/{userID}': + "/orgs/{orgID}/members/{userID}": delete: operationId: DeleteOrgsIDMembersID tags: @@ -4150,7 +4403,7 @@ paths: - Organizations summary: Remove a member from an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -4164,7 +4417,7 @@ paths: required: true description: The organization ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -4172,75 +4425,230 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/owners': + "/orgs/{orgID}/owners": get: operationId: GetOrgsIDOwners tags: - - Users - - Organizations - summary: List all owners of an organization + - Users + - Organizations + summary: List all owners of an organization + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: orgID + schema: + type: string + required: true + description: The organization ID. + responses: + "200": + description: A list of organization owners + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceOwners" + "404": + description: Organization not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + post: + operationId: PostOrgsIDOwners + tags: + - Users + - Organizations + summary: Add an owner to an organization + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: orgID + schema: + type: string + required: true + description: The organization ID. + requestBody: + description: User to add as owner + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/AddResourceMemberRequestBody" + responses: + "201": + description: Organization owner added + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceOwner" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "/orgs/{orgID}/invites": + post: + operationId: PostOrgsIDInvites + tags: + - Invites + - Organizations + summary: Creates an invite to an organization + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: orgID + schema: + type: string + required: true + description: The organization ID. + requestBody: + description: Invite to be sent + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Invite" + responses: + "201": + description: Invite sent + content: + application/json: + schema: + $ref: "#/components/schemas/Invite" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "/orgs/{orgID}/invites/{inviteID}": + delete: + operationId: DeleteOrgsIDInviteID + tags: + - Invites + - Organizations + summary: Remove an invite to an organization + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: inviteID + schema: + type: string + required: true + description: The ID of the invite to remove. + - in: path + name: orgID + schema: + type: string + required: true + description: The organization ID. + responses: + "204": + description: Invite removed + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "/orgs/{orgID}/invites/{inviteID}/resend": + post: + operationId: PostOrgsIDInviteIDResend + tags: + - Invites + - Organizations + summary: Resends an invite + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: inviteID + schema: + type: string + required: true + description: The ID of the invite to resend. + - in: path + name: orgID + schema: + type: string + required: true + description: The organization ID. + responses: + "200": + description: Invite resent + content: + application/json: + schema: + $ref: "#/components/schemas/Invite" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "/orgs/{orgID}/users": + get: + operationId: GetCloudUsers + tags: + - CloudUsers parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID + description: Specifies the organization ID of the CloudUser. + required: true schema: type: string - required: true - description: The organization ID. responses: - '200': - description: A list of organization owners - content: - application/json: - schema: - $ref: "#/components/schemas/ResourceOwners" - '404': - description: Organization not found + "200": + description: A list of cloud users content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: "#/components/schemas/CloudUsers" default: description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/Error" - post: - operationId: PostOrgsIDOwners + "/orgs/{orgID}/users/{userID}": + delete: + operationId: DeleteOrgsIDCloudUserID tags: - - Users + - CloudUsers - Organizations - summary: Add an owner to an organization + summary: Deletes a cloud user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: userID + schema: + type: string + required: true + description: The ID of the user to remove. - in: path name: orgID schema: type: string required: true description: The organization ID. - requestBody: - description: User to add as owner - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': - description: Organization owner added - content: - application/json: - schema: - $ref: "#/components/schemas/ResourceOwner" + "204": + description: User removed default: description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/owners/{userID}': + "/orgs/{orgID}/owners/{userID}": delete: operationId: DeleteOrgsIDOwnersID tags: @@ -4248,7 +4656,7 @@ paths: - Organizations summary: Remove an owner from an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -4262,7 +4670,7 @@ paths: required: true description: The organization ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -4270,7 +4678,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/logs': + "/orgs/{orgID}/logs": get: operationId: GetOrgsIDLogs tags: @@ -4278,9 +4686,9 @@ paths: - OperationLogs summary: Retrieve operation logs for an organization parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: path name: orgID required: true @@ -4288,7 +4696,7 @@ paths: schema: type: string responses: - '200': + "200": description: Operation logs for the organization content: application/json: @@ -4314,12 +4722,15 @@ paths: schema: $ref: "#/components/schemas/PkgCreate" responses: - '200': + "200": description: Influx package created content: application/json: schema: $ref: "#/components/schemas/Pkg" + application/x-yaml: + schema: + $ref: "#/components/schemas/Pkg" default: description: Unexpected error content: @@ -4345,7 +4756,7 @@ paths: schema: $ref: "#/components/schemas/PkgApply" responses: - '200': + "200": description: > Influx package dry-run successful, no new resources created. The provided diff and summary will not have IDs for resources @@ -4354,7 +4765,7 @@ paths: application/json: schema: $ref: "#/components/schemas/PkgSummary" - '201': + "201": description: > Influx package applied successfully. Newly created resources created available in summary. The diff compares the state of the world before @@ -4370,6 +4781,205 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" + /packages/stacks: + get: + operationId: ListStacks + tags: + - InfluxPackages + summary: Grab a list of installed Influx packages + parameters: + - in: query + name: orgID + required: true + schema: + type: string + description: The organization id of the stacks + - in: query + name: name + schema: + type: string + description: A collection of names to filter the list by. + - in: query + name: stackID + schema: + type: string + description: A collection of stackIDs to filter the list by. + responses: + "200": + description: Influx stacks found + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + orgID: + type: string + name: + type: string + description: + type: string + urls: + type: array + items: + type: string + createdAt: + type: string + format: date-time + readOnly: true + updatedAt: + type: string + format: date-time + readOnly: true + resources: + type: object + properties: + apiVersion: + type: string + resourceID: + type: string + kind: + type: string + pkgName: + type: string + associations: + type: array + items: + type: object + properties: + kind: + type: string + pkgName: + type: string + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + post: + operationId: CreateStack + tags: + - InfluxPackages + summary: Create a new Influx package + requestBody: + description: Influx package to create. + required: true + content: + application/json: + schema: + type: object + properties: + orgID: + type: string + name: + type: string + description: + type: string + urls: + type: array + items: + type: string + responses: + "201": + description: Influx stack created + content: + application/json: + schema: + type: object + properties: + id: + type: string + orgID: + type: string + name: + type: string + description: + type: string + urls: + type: array + items: + type: string + createdAt: + type: string + format: date-time + readOnly: true + updatedAt: + type: string + format: date-time + readOnly: true + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /packages/stacks/{stack_id}: + delete: + operationId: DeleteStack + tags: + - InfluxPackages + summary: Delete a stack and remove all its associated resources + parameters: + - in: path + name: stack_id + required: true + schema: + type: string + description: The stack id to be removed + - in: query + name: orgID + required: true + schema: + type: string + description: The organization id of the user + responses: + "204": + description: Stack and all its associated resources are deleted + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /packages/stacks/{stack_id}/export: + delete: + operationId: ExportStack + tags: + - InfluxPackages + summary: Export a stack's resources in the form of a package + parameters: + - in: path + name: stack_id + required: true + schema: + type: string + description: The stack id to be removed + - in: query + name: orgID + required: true + schema: + type: string + description: The organization id of the user + responses: + "200": + description: Stack and all its associated resources are deleted + content: + application/json: + schema: + $ref: "#/components/schemas/Pkg" + application/x-yaml: + schema: + $ref: "#/components/schemas/Pkg" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /tasks: get: operationId: GetTasks @@ -4377,7 +4987,7 @@ paths: - Tasks summary: List all tasks parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: name description: Returns task with a specific name. @@ -4420,7 +5030,7 @@ paths: default: 100 description: The number of tasks to return responses: - '200': + "200": description: A list of tasks content: application/json: @@ -4438,7 +5048,7 @@ paths: - Tasks summary: Create a new task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Task to create required: true @@ -4447,7 +5057,7 @@ paths: schema: $ref: "#/components/schemas/TaskCreateRequest" responses: - '201': + "201": description: Task created content: application/json: @@ -4459,14 +5069,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}': + "/tasks/{taskID}": get: operationId: GetTasksID tags: - Tasks summary: Retrieve a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4474,7 +5084,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: Task details content: application/json: @@ -4500,7 +5110,7 @@ paths: schema: $ref: "#/components/schemas/TaskUpdateRequest" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4508,7 +5118,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: Task updated content: application/json: @@ -4527,7 +5137,7 @@ paths: summary: Delete a task description: Deletes a task and all associated records parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4535,7 +5145,7 @@ paths: required: true description: The ID of the task to delete. responses: - '204': + "204": description: Task deleted default: description: Unexpected error @@ -4543,14 +5153,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/runs': + "/tasks/{taskID}/runs": get: operationId: GetTasksIDRuns tags: - Tasks summary: List runs for a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4583,7 +5193,7 @@ paths: format: date-time description: Filter runs to those scheduled before this time, RFC3339 responses: - '200': + "200": description: A list of task runs content: application/json: @@ -4601,7 +5211,7 @@ paths: - Tasks summary: Manually start a task run, overriding the current schedule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4613,7 +5223,7 @@ paths: schema: $ref: "#/components/schemas/RunManually" responses: - '201': + "201": description: Run scheduled to start content: application/json: @@ -4625,14 +5235,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/runs/{runID}': + "/tasks/{taskID}/runs/{runID}": get: operationId: GetTasksIDRunsID tags: - Tasks summary: Retrieve a single run for a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4646,7 +5256,7 @@ paths: required: true description: The run ID. responses: - '200': + "200": description: The run record content: application/json: @@ -4664,7 +5274,7 @@ paths: - Tasks summary: Cancel a running task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4678,7 +5288,7 @@ paths: required: true description: The run ID. responses: - '204': + "204": description: Delete has been accepted default: description: Unexpected error @@ -4686,14 +5296,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/runs/{runID}/retry': + "/tasks/{taskID}/runs/{runID}/retry": post: operationId: PostTasksIDRunsIDRetry tags: - Tasks summary: Retry a task run parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4707,7 +5317,7 @@ paths: required: true description: The run ID. responses: - '200': + "200": description: Run that has been queued content: application/json: @@ -4719,14 +5329,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/logs': + "/tasks/{taskID}/logs": get: operationId: GetTasksIDLogs tags: - Tasks summary: Retrieve all logs for a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4734,7 +5344,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: All logs for a task content: application/json: @@ -4746,14 +5356,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/runs/{runID}/logs': + "/tasks/{taskID}/runs/{runID}/logs": get: operationId: GetTasksIDRunsIDLogs tags: - Tasks summary: Retrieve all logs for a run parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4767,7 +5377,7 @@ paths: required: true description: ID of run to get logs for. responses: - '200': + "200": description: All logs for a run content: application/json: @@ -4779,14 +5389,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/labels': + "/tasks/{taskID}/labels": get: operationId: GetTasksIDLabels tags: - Tasks summary: List all labels for a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4794,7 +5404,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: A list of all labels for a task content: application/json: @@ -4812,7 +5422,7 @@ paths: - Tasks summary: Add a label to a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4827,7 +5437,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: A list of all labels for a task content: application/json: @@ -4839,14 +5449,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/labels/{labelID}': + "/tasks/{taskID}/labels/{labelID}": delete: operationId: DeleteTasksIDLabelsID tags: - Tasks summary: Delete a label from a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4860,9 +5470,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Task not found content: application/json: @@ -4874,6 +5484,27 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" + /flags: + get: + operationId: GetFlags + tags: + - Users + summary: Return the feature flags for the currently authenticated user + parameters: + - $ref: "#/components/parameters/TraceSpan" + responses: + "200": + description: Feature flags for the currently authenticated user + content: + application/json: + schema: + $ref: "#/components/schemas/Flags" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /me: get: operationId: GetMe @@ -4881,9 +5512,9 @@ paths: - Users summary: Return the current authenticated user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: Currently authenticated user content: application/json: @@ -4904,7 +5535,7 @@ paths: security: - BasicAuth: [] parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: New password required: true @@ -4913,7 +5544,7 @@ paths: schema: $ref: "#/components/schemas/PasswordResetBody" responses: - '204': + "204": description: Password successfully updated default: description: Unsuccessful authentication @@ -4921,7 +5552,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/members': + "/tasks/{taskID}/members": get: operationId: GetTasksIDMembers tags: @@ -4929,7 +5560,7 @@ paths: - Tasks summary: List all task members parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4937,7 +5568,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: A list of users who have member privileges for a task content: application/json: @@ -4956,7 +5587,7 @@ paths: - Tasks summary: Add a member to a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4971,7 +5602,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to task members content: application/json: @@ -4983,7 +5614,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/members/{userID}': + "/tasks/{taskID}/members/{userID}": delete: operationId: DeleteTasksIDMembersID tags: @@ -4991,7 +5622,7 @@ paths: - Tasks summary: Remove a member from a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5005,7 +5636,7 @@ paths: required: true description: The task ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -5013,7 +5644,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/owners': + "/tasks/{taskID}/owners": get: operationId: GetTasksIDOwners tags: @@ -5021,7 +5652,7 @@ paths: - Tasks summary: List all owners of a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -5029,7 +5660,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: A list of users who have owner privileges for a task content: application/json: @@ -5048,7 +5679,7 @@ paths: - Tasks summary: Add an owner to a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -5063,7 +5694,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to task owners content: application/json: @@ -5075,7 +5706,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/owners/{userID}': + "/tasks/{taskID}/owners/{userID}": delete: operationId: DeleteTasksIDOwnersID tags: @@ -5083,7 +5714,7 @@ paths: - Tasks summary: Remove an owner from a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5097,7 +5728,7 @@ paths: required: true description: The task ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -5112,9 +5743,9 @@ paths: - Users summary: List all users parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: A list of users content: application/json: @@ -5132,7 +5763,7 @@ paths: - Users summary: Create a user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: User to create required: true @@ -5141,7 +5772,7 @@ paths: schema: $ref: "#/components/schemas/User" responses: - '201': + "201": description: User created content: application/json: @@ -5153,14 +5784,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/users/{userID}': + "/users/{userID}": get: operationId: GetUsersID tags: - Users summary: Retrieve a user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5168,7 +5799,7 @@ paths: required: true description: The user ID. responses: - '200': + "200": description: User details content: application/json: @@ -5193,7 +5824,7 @@ paths: schema: $ref: "#/components/schemas/User" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5201,7 +5832,7 @@ paths: required: true description: The ID of the user to update. responses: - '200': + "200": description: User updated content: application/json: @@ -5219,7 +5850,7 @@ paths: - Users summary: Delete a user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5227,7 +5858,7 @@ paths: required: true description: The ID of the user to delete. responses: - '204': + "204": description: User deleted default: description: Unexpected error @@ -5235,7 +5866,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/users/{userID}/password': + "/users/{userID}/password": post: operationId: PostUsersIDPassword tags: @@ -5244,7 +5875,7 @@ paths: security: - BasicAuth: [] parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5259,7 +5890,7 @@ paths: schema: $ref: "#/components/schemas/PasswordResetBody" responses: - '204': + "204": description: Password successfully updated default: description: Unsuccessful authentication @@ -5267,7 +5898,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/users/{userID}/logs': + "/users/{userID}/logs": get: operationId: GetUsersIDLogs tags: @@ -5275,9 +5906,9 @@ paths: - OperationLogs summary: Retrieve operation logs for a user parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: path name: userID required: true @@ -5285,7 +5916,7 @@ paths: schema: type: string responses: - '200': + "200": description: Operation logs for the user content: application/json: @@ -5301,12 +5932,12 @@ paths: get: operationId: GetChecks tags: - - Checks + - Checks summary: Get all checks parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: query name: orgID required: true @@ -5314,7 +5945,7 @@ paths: schema: type: string responses: - '200': + "200": description: A list of checks content: application/json: @@ -5325,7 +5956,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: "#/components/schemas/Error" post: operationId: CreateCheck tags: @@ -5337,9 +5968,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PostCheck" + $ref: "#/components/schemas/PostCheck" responses: - '201': + "201": description: Check created content: application/json: @@ -5351,14 +5982,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/checks/{checkID}': + "/checks/{checkID}": get: operationId: GetChecksID tags: - Checks summary: Get a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5366,7 +5997,7 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: The check requested content: application/json: @@ -5391,7 +6022,7 @@ paths: schema: $ref: "#/components/schemas/Check" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5399,13 +6030,13 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: An updated check content: application/json: schema: $ref: "#/components/schemas/Check" - '404': + "404": description: The check was not found content: application/json: @@ -5428,9 +6059,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CheckPatch" + $ref: "#/components/schemas/CheckPatch" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5438,13 +6069,13 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: An updated check content: application/json: schema: $ref: "#/components/schemas/Check" - '404': + "404": description: The check was not found content: application/json: @@ -5462,7 +6093,7 @@ paths: - Checks summary: Delete a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5470,9 +6101,9 @@ paths: required: true description: The check ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: The check was not found content: application/json: @@ -5484,14 +6115,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/checks/{checkID}/labels': + "/checks/{checkID}/labels": get: operationId: GetChecksIDLabels tags: - Checks summary: List all labels for a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5499,7 +6130,7 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: A list of all labels for a check content: application/json: @@ -5517,7 +6148,7 @@ paths: - Checks summary: Add a label to a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5532,7 +6163,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label was added to the check content: application/json: @@ -5544,14 +6175,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/checks/{checkID}/labels/{labelID}': + "/checks/{checkID}/labels/{labelID}": delete: operationId: DeleteChecksIDLabelsID tags: - Checks summary: Delete label from a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5565,9 +6196,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Check or label not found content: application/json: @@ -5583,12 +6214,12 @@ paths: get: operationId: GetNotificationRules tags: - - NotificationRules + - NotificationRules summary: Get all notification rules parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: query name: orgID required: true @@ -5608,7 +6239,7 @@ paths: pattern: ^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$ example: env:prod responses: - '200': + "200": description: A list of notification rules content: application/json: @@ -5619,7 +6250,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: "#/components/schemas/Error" post: operationId: CreateNotificationRule tags: @@ -5633,7 +6264,7 @@ paths: schema: $ref: "#/components/schemas/PostNotificationRule" responses: - '201': + "201": description: Notification rule created content: application/json: @@ -5645,14 +6276,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/checks/{checkID}/query': + "/checks/{checkID}/query": get: operationId: GetChecksIDQuery tags: - Checks summary: Get a check query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5660,19 +6291,19 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: The check query requested content: application/json: schema: $ref: "#/components/schemas/FluxResponse" - '400': + "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/Error" - '404': + "404": description: Check not found content: application/json: @@ -5684,14 +6315,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationRules/{ruleID}': + "/notificationRules/{ruleID}": get: operationId: GetNotificationRulesID tags: - NotificationRules summary: Get a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5699,7 +6330,7 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: The notification rule requested content: application/json: @@ -5724,7 +6355,7 @@ paths: schema: $ref: "#/components/schemas/NotificationRule" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5732,13 +6363,13 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: An updated notification rule content: application/json: schema: $ref: "#/components/schemas/NotificationRule" - '404': + "404": description: The notification rule was not found content: application/json: @@ -5763,7 +6394,7 @@ paths: schema: $ref: "#/components/schemas/NotificationRuleUpdate" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5771,13 +6402,13 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: An updated notification rule content: application/json: schema: $ref: "#/components/schemas/NotificationRule" - '404': + "404": description: The notification rule was not found content: application/json: @@ -5795,7 +6426,7 @@ paths: - NotificationRules summary: Delete a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5803,9 +6434,9 @@ paths: required: true description: The notification rule ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: The check was not found content: application/json: @@ -5817,14 +6448,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationRules/{ruleID}/labels': + "/notificationRules/{ruleID}/labels": get: operationId: GetNotificationRulesIDLabels tags: - NotificationRules summary: List all labels for a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5832,7 +6463,7 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: A list of all labels for a notification rule content: application/json: @@ -5850,7 +6481,7 @@ paths: - NotificationRules summary: Add a label to a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5865,7 +6496,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label was added to the notification rule content: application/json: @@ -5877,14 +6508,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationRules/{ruleID}/labels/{labelID}': + "/notificationRules/{ruleID}/labels/{labelID}": delete: operationId: DeleteNotificationRulesIDLabelsID tags: - NotificationRules summary: Delete label from a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5898,9 +6529,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Rule or label not found content: application/json: @@ -5912,14 +6543,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationRules/{ruleID}/query': + "/notificationRules/{ruleID}/query": get: operationId: GetNotificationRulesIDQuery tags: - Rules summary: Get a notification rule query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5927,19 +6558,19 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: The notification rule query requested content: application/json: schema: $ref: "#/components/schemas/FluxResponse" - '400': + "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/Error" - '404': + "404": description: Notification rule not found content: application/json: @@ -5955,12 +6586,12 @@ paths: get: operationId: GetNotificationEndpoints tags: - - NotificationEndpoints + - NotificationEndpoints summary: Get all notification endpoints parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: query name: orgID required: true @@ -5968,7 +6599,7 @@ paths: schema: type: string responses: - '200': + "200": description: A list of notification endpoints content: application/json: @@ -5979,7 +6610,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: "#/components/schemas/Error" post: operationId: CreateNotificationEndpoint tags: @@ -5993,7 +6624,7 @@ paths: schema: $ref: "#/components/schemas/PostNotificationEndpoint" responses: - '201': + "201": description: Notification endpoint created content: application/json: @@ -6005,14 +6636,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationEndpoints/{endpointID}': + "/notificationEndpoints/{endpointID}": get: operationId: GetNotificationEndpointsID tags: - NotificationEndpoints summary: Get a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6020,7 +6651,7 @@ paths: required: true description: The notification endpoint ID. responses: - '200': + "200": description: The notification endpoint requested content: application/json: @@ -6045,7 +6676,7 @@ paths: schema: $ref: "#/components/schemas/NotificationEndpoint" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6053,13 +6684,13 @@ paths: required: true description: The notification endpoint ID. responses: - '200': + "200": description: An updated notification endpoint content: application/json: schema: $ref: "#/components/schemas/NotificationEndpoint" - '404': + "404": description: The notification endpoint was not found content: application/json: @@ -6084,7 +6715,7 @@ paths: schema: $ref: "#/components/schemas/NotificationEndpointUpdate" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6092,13 +6723,13 @@ paths: required: true description: The notification endpoint ID. responses: - '200': + "200": description: An updated notification endpoint content: application/json: schema: $ref: "#/components/schemas/NotificationEndpoint" - '404': + "404": description: The notification endpoint was not found content: application/json: @@ -6116,7 +6747,7 @@ paths: - NotificationEndpoints summary: Delete a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6124,9 +6755,9 @@ paths: required: true description: The notification endpoint ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: The endpoint was not found content: application/json: @@ -6138,14 +6769,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationEndpoints/{endpointID}/labels': + "/notificationEndpoints/{endpointID}/labels": get: operationId: GetNotificationEndpointsIDLabels tags: - NotificationEndpoints summary: List all labels for a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6153,7 +6784,7 @@ paths: required: true description: The notification endpoint ID. responses: - '200': + "200": description: A list of all labels for a notification endpoint content: application/json: @@ -6171,7 +6802,7 @@ paths: - NotificationEndpoints summary: Add a label to a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6186,7 +6817,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label was added to the notification endpoint content: application/json: @@ -6198,14 +6829,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationEndpoints/{endpointID}/labels/{labelID}': + "/notificationEndpoints/{endpointID}/labels/{labelID}": delete: operationId: DeleteNotificationEndpointsIDLabelsID tags: - NotificationEndpoints summary: Delete a label from a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6219,9 +6850,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Endpoint or label not found content: application/json: @@ -6269,8 +6900,8 @@ components: name: Zap-Trace-Span description: OpenTracing span context example: - trace_id: '1' - span_id: '1' + trace_id: "1" + span_id: "1" baggage: key: value required: false @@ -6543,7 +7174,7 @@ components: body: $ref: "#/components/schemas/Node" BinaryExpression: - description: uses binary operators to act on two operands in an expression + description: uses binary operators to act on two operands in an expression type: object properties: type: @@ -6759,42 +7390,42 @@ components: description: Type of AST node type: string Dialect: - description: Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions - type: object - properties: - header: - description: If true, the results will contain a header row - type: boolean - default: true - delimiter: - description: Separator between cells; the default is , - type: string - default: "," - maxLength: 1 - minLength: 1 - annotations: - description: Https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns - type: array - items: - type: string - enum: - - "group" - - "datatype" - - "default" - uniqueItems: true - commentPrefix: - description: Character prefixed to comment strings - type: string - default: "#" - maxLength: 1 - minLength: 0 - dateTimeFormat: - description: Format of timestamps - type: string - default: "RFC3339" - enum: - - RFC3339 - - RFC3339Nano + description: Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions + type: object + properties: + header: + description: If true, the results will contain a header row + type: boolean + default: true + delimiter: + description: Separator between cells; the default is , + type: string + default: "," + maxLength: 1 + minLength: 1 + annotations: + description: Https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns + type: array + items: + type: string + enum: + - "group" + - "datatype" + - "default" + uniqueItems: true + commentPrefix: + description: Character prefixed to comment strings + type: string + default: "#" + maxLength: 1 + minLength: 0 + dateTimeFormat: + description: Format of timestamps + type: string + default: "RFC3339" + enum: + - RFC3339 + - RFC3339Nano Permission: required: [action, resource] properties: @@ -6829,6 +7460,7 @@ components: - notificationRules - notificationEndpoints - checks + - dbrp id: type: string nullable: true @@ -7168,6 +7800,8 @@ components: type: boolean orgID: type: string + stackID: + type: string package: $ref: "#/components/schemas/Pkg" packages: @@ -7263,6 +7897,8 @@ components: PkgSummary: type: object properties: + stackID: + type: string summary: type: object properties: @@ -7275,6 +7911,8 @@ components: type: string orgID: type: string + pkgName: + type: string name: type: string description: @@ -7282,9 +7920,9 @@ components: retentionPeriod: type: integer labelAssociations: - type: array - items: - $ref: "#/components/schemas/PkgSummaryLabel" + type: array + items: + $ref: "#/components/schemas/PkgSummaryLabel" checks: type: array items: @@ -7292,6 +7930,8 @@ components: - $ref: "#/components/schemas/CheckDiscriminator" - type: object properties: + pkgName: + type: string labelAssociations: type: array items: @@ -7309,6 +7949,8 @@ components: type: "string" orgID: type: "string" + pkgName: + type: string name: type: "string" description: @@ -7326,12 +7968,18 @@ components: items: type: object properties: + status: + type: string + resourcePkgName: + type: string resourceName: type: string resourceID: type: string resourceType: type: string + labelPkgName: + type: string labelName: type: string labelID: @@ -7351,6 +7999,8 @@ components: - $ref: "#/components/schemas/NotificationEndpointDiscrimator" - type: object properties: + pkgName: + type: string labelAssociations: type: array items: @@ -7360,11 +8010,13 @@ components: items: type: object properties: + pkgName: + type: string name: type: string description: type: string - endpointName: + endpointPkgName: type: string endpointID: type: string @@ -7407,6 +8059,8 @@ components: items: type: object properties: + pkgName: + type: string id: type: string name: @@ -7430,6 +8084,8 @@ components: - $ref: "#/components/schemas/TelegrafRequest" - type: object properties: + pkgName: + type: string labelAssociations: type: array items: @@ -7439,6 +8095,8 @@ components: items: type: object properties: + pkgName: + type: string id: type: string orgID: @@ -7450,9 +8108,9 @@ components: arguments: $ref: "#/components/schemas/VariableProperties" labelAssociations: - type: array - items: - $ref: "#/components/schemas/PkgSummaryLabel" + type: array + items: + $ref: "#/components/schemas/PkgSummaryLabel" diff: type: object properties: @@ -7461,13 +8119,17 @@ components: items: type: object properties: + stateStatus: + type: string id: type: string - name: + pkgName: type: string new: type: object properties: + name: + type: string description: type: string retentionRules: @@ -7475,6 +8137,8 @@ components: old: type: object properties: + name: + type: string description: type: string retentionRules: @@ -7484,9 +8148,11 @@ components: items: type: object properties: + stateStatus: + type: string id: type: string - name: + pkgName: type: string new: $ref: "#/components/schemas/CheckDiscriminator" @@ -7497,26 +8163,50 @@ components: items: type: object properties: - name: + stateStatus: type: string - description: + id: type: string - charts: - type: array - items: - $ref: "#/components/schemas/PkgChart" + pkgName: + type: string + new: + type: object + properties: + name: + type: string + description: + type: string + charts: + type: array + items: + $ref: "#/components/schemas/PkgChart" + old: + type: object + properties: + name: + type: string + description: + type: string + charts: + type: array + items: + $ref: "#/components/schemas/PkgChart" labels: type: array items: type: object properties: + stateStatus: + type: string id: type: string - name: + pkgName: type: string new: type: object properties: + name: + type: string color: type: string description: @@ -7524,6 +8214,8 @@ components: old: type: object properties: + name: + type: string color: type: string description: @@ -7533,16 +8225,20 @@ components: items: type: object properties: - isNew: - type: boolean + status: + type: string resourceType: type: string resourceID: type: string + resourcePkgName: + type: string resourceName: type: string labelID: type: string + labelPkgName: + type: string labelName: type: string notificationEndpoints: @@ -7550,9 +8246,11 @@ components: items: type: object properties: + stateStatus: + type: string id: type: string - name: + pkgName: type: string new: $ref: "#/components/schemas/NotificationEndpointDiscrimator" @@ -7563,79 +8261,170 @@ components: items: type: object properties: - name: + stateStatus: type: string - description: - type: string - endpointName: - type: string - endpointID: - type: string - endpointType: - type: string - every: - type: string - offset: - type: string - messageTemplate: + id: type: string - status: + pkgName: type: string - statusRules: - type: array - items: - type: object - properties: - currentLevel: - type: string - previousLevel: - type: string - tagRules: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - operator: - type: string + new: + type: object + properties: + name: + type: string + description: + type: string + endpointName: + type: string + endpointID: + type: string + endpointType: + type: string + every: + type: string + offset: + type: string + messageTemplate: + type: string + status: + type: string + statusRules: + type: array + items: + type: object + properties: + currentLevel: + type: string + previousLevel: + type: string + tagRules: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + operator: + type: string + old: + type: object + properties: + name: + type: string + description: + type: string + endpointName: + type: string + endpointID: + type: string + endpointType: + type: string + every: + type: string + offset: + type: string + messageTemplate: + type: string + status: + type: string + statusRules: + type: array + items: + type: object + properties: + currentLevel: + type: string + previousLevel: + type: string + tagRules: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + operator: + type: string tasks: type: array items: type: object properties: - name: - type: string - cron: - type: string - description: - type: string - every: - type: string - offset: + stateStatus: type: string - query: + id: type: string - status: + pkgName: type: string + new: + type: object + properties: + name: + type: string + cron: + type: string + description: + type: string + every: + type: string + offset: + type: string + query: + type: string + status: + type: string + old: + type: object + properties: + name: + type: string + cron: + type: string + description: + type: string + every: + type: string + offset: + type: string + query: + type: string + status: + type: string telegrafConfigs: type: array items: - $ref: "#/components/schemas/TelegrafRequest" + type: object + properties: + stateStatus: + type: string + id: + type: string + pkgName: + type: string + new: + $ref: "#/components/schemas/TelegrafRequest" + old: + $ref: "#/components/schemas/TelegrafRequest" variables: type: array items: type: object properties: + stateStatus: + type: string id: type: string - name: + pkgName: type: string new: type: object properties: + name: + type: string description: type: string args: @@ -7643,6 +8432,8 @@ components: old: type: object properties: + name: + type: string description: type: string args: @@ -7671,6 +8462,8 @@ components: type: string orgID: type: string + pkgName: + type: string name: type: string description: @@ -7876,6 +8669,85 @@ components: TaskStatusType: type: string enum: [active, inactive] + Invite: + properties: + id: + description: the idpe id of the invite + readOnly: true + type: string + email: + type: string + role: + type: string + enum: + - member + - owner + expiresAt: + format: date-time + type: string + links: + type: object + readOnly: true + example: + self: "/api/v2/invites/1" + properties: + self: + type: string + format: uri + required: [id, email, role] + Invites: + type: object + properties: + links: + type: object + properties: + self: + type: string + format: uri + invites: + type: array + items: + $ref: "#/components/schemas/Invite" + CloudUser: + properties: + id: + description: the idpe id of the user + readOnly: true + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + role: + type: string + enum: + - member + - owner + links: + type: object + readOnly: true + example: + self: "/api/v2/cloud_users/1" + properties: + self: + type: string + format: uri + required: [id, email, role] + CloudUsers: + type: object + properties: + links: + type: object + properties: + self: + type: string + format: uri + users: + type: array + items: + $ref: "#/components/schemas/CloudUser" User: properties: id: @@ -7919,6 +8791,9 @@ components: type: array items: $ref: "#/components/schemas/User" + Flags: + type: object + additionalProperties: true ResourceMember: allOf: - $ref: "#/components/schemas/User" @@ -8004,6 +8879,9 @@ components: me: type: string format: uri + flags: + type: string + format: uri orgs: type: string format: uri @@ -8159,7 +9037,7 @@ components: description: Args are the arguments to the function type: array items: - $ref: '#/components/schemas/Field' + $ref: "#/components/schemas/Field" BuilderConfig: type: object properties: @@ -8170,11 +9048,11 @@ components: tags: type: array items: - $ref: '#/components/schemas/BuilderTagsType' + $ref: "#/components/schemas/BuilderTagsType" functions: type: array items: - $ref: '#/components/schemas/BuilderFunctionsType' + $ref: "#/components/schemas/BuilderFunctionsType" aggregateWindow: type: object properties: @@ -8190,10 +9068,10 @@ components: items: type: string aggregateFunctionType: - $ref: '#/components/schemas/BuilderAggregateFunctionType' + $ref: "#/components/schemas/BuilderAggregateFunctionType" BuilderAggregateFunctionType: type: string - enum: ['filter', 'group'] + enum: ["filter", "group"] BuilderFunctionsType: type: object properties: @@ -8206,14 +9084,14 @@ components: type: string description: The text of the Flux query. editMode: - $ref: '#/components/schemas/QueryEditMode' + $ref: "#/components/schemas/QueryEditMode" name: type: string builderConfig: - $ref: '#/components/schemas/BuilderConfig' + $ref: "#/components/schemas/BuilderConfig" QueryEditMode: type: string - enum: ['builder', 'advanced'] + enum: ["builder", "advanced"] Axis: type: object description: The description of a particular axis for a visualization. @@ -8239,13 +9117,13 @@ components: base: description: Base represents the radix for formatting axis values. type: string - enum: ['', '2', '10'] + enum: ["", "2", "10"] scale: - $ref: '#/components/schemas/AxisScale' + $ref: "#/components/schemas/AxisScale" AxisScale: description: 'Scale is the axis formatting scale. Supported: "log", "linear"' type: string - enum: ['log', 'linear'] + enum: ["log", "linear"] DashboardColor: type: object description: Defines an encoding of data value into color space. @@ -8320,16 +9198,16 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: description: If true, will display note when empty type: boolean axes: - $ref: '#/components/schemas/Axes' + $ref: "#/components/schemas/Axes" legend: - $ref: '#/components/schemas/Legend' + $ref: "#/components/schemas/Legend" xColumn: type: string yColumn: @@ -8340,7 +9218,7 @@ components: type: string enum: [overlaid, stacked] geom: - $ref: '#/components/schemas/XYGeom' + $ref: "#/components/schemas/XYGeom" XYGeom: type: string enum: [line, step, stacked, bar, monotoneX] @@ -8360,6 +9238,8 @@ components: - decimalPlaces - position properties: + timeFormat: + type: string type: type: string enum: [line-plus-single-stat] @@ -8374,16 +9254,16 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: description: If true, will display note when empty type: boolean axes: - $ref: '#/components/schemas/Axes' + $ref: "#/components/schemas/Axes" legend: - $ref: '#/components/schemas/Legend' + $ref: "#/components/schemas/Legend" xColumn: type: string yColumn: @@ -8398,7 +9278,7 @@ components: suffix: type: string decimalPlaces: - $ref: '#/components/schemas/DecimalPlaces' + $ref: "#/components/schemas/DecimalPlaces" ScatterViewProperties: type: object required: @@ -8437,7 +9317,7 @@ components: type: string shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8514,7 +9394,7 @@ components: type: string shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8578,7 +9458,7 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8593,7 +9473,7 @@ components: tickSuffix: type: string legend: - $ref: '#/components/schemas/Legend' + $ref: "#/components/schemas/Legend" decimalPlaces: $ref: "#/components/schemas/DecimalPlaces" HistogramViewProperties: @@ -8626,7 +9506,7 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8652,7 +9532,21 @@ components: type: integer GaugeViewProperties: type: object - required: [type, queries, colors, shape, note, showNoteWhenEmpty, prefix, tickPrefix, suffix, tickSuffix, legend, decimalPlaces] + required: + [ + type, + queries, + colors, + shape, + note, + showNoteWhenEmpty, + prefix, + tickPrefix, + suffix, + tickSuffix, + legend, + decimalPlaces, + ] properties: type: type: string @@ -8668,7 +9562,7 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8683,7 +9577,7 @@ components: tickSuffix: type: string legend: - $ref: '#/components/schemas/Legend' + $ref: "#/components/schemas/Legend" decimalPlaces: $ref: "#/components/schemas/DecimalPlaces" TableViewProperties: @@ -8714,7 +9608,7 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8747,14 +9641,14 @@ components: customization options type: array items: - $ref: '#/components/schemas/RenamableField' + $ref: "#/components/schemas/RenamableField" timeFormat: description: >- timeFormat describes the display format for time values according to moment.js date formatting type: string decimalPlaces: - $ref: '#/components/schemas/DecimalPlaces' + $ref: "#/components/schemas/DecimalPlaces" MarkdownViewProperties: type: object required: @@ -8767,7 +9661,7 @@ components: enum: [markdown] shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string CheckViewProperties: @@ -8784,11 +9678,11 @@ components: enum: [check] shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] checkID: type: string check: - $ref: '#/components/schemas/Check' + $ref: "#/components/schemas/Check" queries: type: array items: @@ -8797,16 +9691,16 @@ components: description: Colors define color encoding of data into a visualization type: array items: - type: string + $ref: "#/components/schemas/DashboardColor" Axes: description: The viewport for a View's visualizations type: object - required: ['x', 'y'] + required: ["x", "y"] properties: x: - $ref: '#/components/schemas/Axis' + $ref: "#/components/schemas/Axis" "y": # Quoted to prevent YAML parser from interpreting y as shorthand for true. - $ref: '#/components/schemas/Axis' + $ref: "#/components/schemas/Axis" Legend: description: Legend define encoding of data into a view's legend type: object @@ -8914,36 +9808,36 @@ components: type: object example: variables: - - id: '1221432' - name: ":ok:" - selected: - - hello - arguments: - type: constant - values: - - howdy - - hello - - hi - - yo - - oy - - id: '1221432' - name: ":ok:" - selected: - - c - arguments: - type: map - values: - a: fdjaklfdjkldsfjlkjdsa - b: dfaksjfkljekfajekdljfas - c: fdjksajfdkfeawfeea - - id: '1221432' - name: ":ok:" - selected: - - host - arguments: - type: query - query: 'from(bucket: "foo") |> showMeasurements()' - language: flux + - id: "1221432" + name: ":ok:" + selected: + - hello + arguments: + type: constant + values: + - howdy + - hello + - hi + - yo + - oy + - id: "1221432" + name: ":ok:" + selected: + - c + arguments: + type: map + values: + a: fdjaklfdjkldsfjlkjdsa + b: dfaksjfkljekfajekdljfas + c: fdjksajfdkfeawfeea + - id: "1221432" + name: ":ok:" + selected: + - host + arguments: + type: query + query: 'from(bucket: "foo") |> showMeasurements()' + language: flux properties: variables: type: array @@ -8984,7 +9878,7 @@ components: name: type: string properties: - $ref: '#/components/schemas/ViewProperties' + $ref: "#/components/schemas/ViewProperties" Views: type: object properties: @@ -9223,7 +10117,7 @@ components: type: string format: date-time cells: - $ref: "#/components/schemas/Cells" + $ref: "#/components/schemas/Cells" labels: $ref: "#/components/schemas/Labels" Dashboards: @@ -9259,7 +10153,7 @@ components: type: string type: type: string - enum: ["v1","v2","self"] + enum: ["v1", "v2", "self"] url: type: string format: uri @@ -9314,7 +10208,7 @@ components: url: type: string description: The URL of the metrics endpoint. - example: http://localhost:9090/metrics + example: http://localhost:9090/metrics orgID: type: string description: The organization ID. @@ -9488,20 +10382,20 @@ components: orgID: type: string TelegrafRequestPlugin: - oneOf: - - $ref: '#/components/schemas/TelegrafPluginInputCpu' - - $ref: '#/components/schemas/TelegrafPluginInputDisk' - - $ref: '#/components/schemas/TelegrafPluginInputDiskio' - - $ref: '#/components/schemas/TelegrafPluginInputDocker' - - $ref: '#/components/schemas/TelegrafPluginInputFile' - - $ref: '#/components/schemas/TelegrafPluginInputKubernetes' - - $ref: '#/components/schemas/TelegrafPluginInputLogParser' - - $ref: '#/components/schemas/TelegrafPluginInputProcstat' - - $ref: '#/components/schemas/TelegrafPluginInputPrometheus' - - $ref: '#/components/schemas/TelegrafPluginInputRedis' - - $ref: '#/components/schemas/TelegrafPluginInputSyslog' - - $ref: '#/components/schemas/TelegrafPluginOutputFile' - - $ref: '#/components/schemas/TelegrafPluginOutputInfluxDBV2' + oneOf: + - $ref: "#/components/schemas/TelegrafPluginInputCpu" + - $ref: "#/components/schemas/TelegrafPluginInputDisk" + - $ref: "#/components/schemas/TelegrafPluginInputDiskio" + - $ref: "#/components/schemas/TelegrafPluginInputDocker" + - $ref: "#/components/schemas/TelegrafPluginInputFile" + - $ref: "#/components/schemas/TelegrafPluginInputKubernetes" + - $ref: "#/components/schemas/TelegrafPluginInputLogParser" + - $ref: "#/components/schemas/TelegrafPluginInputProcstat" + - $ref: "#/components/schemas/TelegrafPluginInputPrometheus" + - $ref: "#/components/schemas/TelegrafPluginInputRedis" + - $ref: "#/components/schemas/TelegrafPluginInputSyslog" + - $ref: "#/components/schemas/TelegrafPluginOutputFile" + - $ref: "#/components/schemas/TelegrafPluginOutputInfluxDBV2" TelegrafPluginInputCpu: type: object required: @@ -9531,8 +10425,7 @@ components: comment: type: string TelegrafPluginInputDiskio: - type: - object + type: object required: - name - type @@ -9546,8 +10439,7 @@ components: comment: type: string TelegrafPluginInputDocker: - type: - object + type: object required: - name - type @@ -9562,10 +10454,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputDockerConfig' + $ref: "#/components/schemas/TelegrafPluginInputDockerConfig" TelegrafPluginInputFile: - type: - object + type: object required: - name - type @@ -9580,10 +10471,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputFileConfig' + $ref: "#/components/schemas/TelegrafPluginInputFileConfig" TelegrafPluginInputKernel: - type: - object + type: object required: - name - type @@ -9597,8 +10487,7 @@ components: comment: type: string TelegrafPluginInputKubernetes: - type: - object + type: object required: - name - type @@ -9613,10 +10502,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputKubernetesConfig' + $ref: "#/components/schemas/TelegrafPluginInputKubernetesConfig" TelegrafPluginInputLogParser: - type: - object + type: object required: - name - type @@ -9631,10 +10519,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputLogParserConfig' + $ref: "#/components/schemas/TelegrafPluginInputLogParserConfig" TelegrafPluginInputMem: - type: - object + type: object required: - name - type @@ -9648,8 +10535,7 @@ components: comment: type: string TelegrafPluginInputNetResponse: - type: - object + type: object required: - name - type @@ -9663,8 +10549,7 @@ components: comment: type: string TelegrafPluginInputNet: - type: - object + type: object required: - name - type @@ -9678,8 +10563,7 @@ components: comment: type: string TelegrafPluginInputNginx: - type: - object + type: object required: - name - type @@ -9693,8 +10577,7 @@ components: comment: type: string TelegrafPluginInputProcesses: - type: - object + type: object required: - name - type @@ -9708,8 +10591,7 @@ components: comment: type: string TelegrafPluginInputProcstat: - type: - object + type: object required: - name - type @@ -9724,10 +10606,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputProcstatConfig' + $ref: "#/components/schemas/TelegrafPluginInputProcstatConfig" TelegrafPluginInputPrometheus: - type: - object + type: object required: - name - type @@ -9742,10 +10623,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputPrometheusConfig' + $ref: "#/components/schemas/TelegrafPluginInputPrometheusConfig" TelegrafPluginInputRedis: - type: - object + type: object required: - name - type @@ -9760,10 +10640,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputRedisConfig' + $ref: "#/components/schemas/TelegrafPluginInputRedisConfig" TelegrafPluginInputSyslog: - type: - object + type: object required: - name - type @@ -9778,10 +10657,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputSyslogConfig' + $ref: "#/components/schemas/TelegrafPluginInputSyslogConfig" TelegrafPluginInputSwap: - type: - object + type: object required: - name - type @@ -9795,8 +10673,7 @@ components: comment: type: string TelegrafPluginInputSystem: - type: - object + type: object required: - name - type @@ -9810,8 +10687,7 @@ components: comment: type: string TelegrafPluginInputTail: - type: - object + type: object required: - name - type @@ -9825,8 +10701,7 @@ components: comment: type: string TelegrafPluginOutputFile: - type: - object + type: object required: - name - type @@ -9841,10 +10716,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginOutputFileConfig' + $ref: "#/components/schemas/TelegrafPluginOutputFileConfig" TelegrafPluginOutputInfluxDBV2: - type: - object + type: object required: - name - type @@ -9859,7 +10733,7 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginOutputInfluxDBV2Config' + $ref: "#/components/schemas/TelegrafPluginOutputInfluxDBV2Config" Telegraf: type: object allOf: @@ -10089,6 +10963,10 @@ components: enum: - pass - fail + version: + type: string + commit: + type: string Labels: type: array items: @@ -10109,7 +10987,7 @@ components: additionalProperties: type: string description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. - example: {"color": "ffb3b3", "description": "this is a description"} + example: { "color": "ffb3b3", "description": "this is a description" } LabelCreateRequest: type: object required: [orgID] @@ -10123,7 +11001,7 @@ components: additionalProperties: type: string description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. - example: {"color": "ffb3b3", "description": "this is a description"} + example: { "color": "ffb3b3", "description": "this is a description" } LabelUpdate: type: object properties: @@ -10131,8 +11009,10 @@ components: type: string properties: type: object + additionalProperties: + type: string description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. - example: {"color": "ffb3b3", "description": "this is a description"} + example: { "color": "ffb3b3", "description": "this is a description" } LabelMapping: type: object properties: @@ -10231,7 +11111,7 @@ components: discriminator: propertyName: type mapping: - deadman: "#/components/schemas/DeadmanCheck" + deadman: "#/components/schemas/DeadmanCheck" threshold: "#/components/schemas/ThresholdCheck" custom: "#/components/schemas/CustomCheck" Check: @@ -10361,7 +11241,7 @@ components: propertyName: type mapping: greater: "#/components/schemas/GreaterThreshold" - lesser: "#/components/schemas/LesserThreshold" + lesser: "#/components/schemas/LesserThreshold" range: "#/components/schemas/RangeThreshold" DeadmanCheck: allOf: @@ -10403,7 +11283,7 @@ components: description: The template used to generate and write a status message. type: string CustomCheck: - allOf: + allOf: - $ref: "#/components/schemas/CheckBase" - type: object properties: @@ -10414,7 +11294,7 @@ components: ThresholdBase: properties: level: - $ref: "#/components/schemas/CheckStatusLevel" + $ref: "#/components/schemas/CheckStatusLevel" allValues: description: If true, only alert if all values meet threshold. type: boolean @@ -10623,7 +11503,7 @@ components: type: string operator: type: string - enum: ["equal", "notequal", "equalregex","notequalregex"] + enum: ["equal", "notequal", "equalregex", "notequalregex"] StatusRule: type: object properties: @@ -10715,7 +11595,7 @@ components: propertyName: type mapping: slack: "#/components/schemas/SlackNotificationEndpoint" - pagerduty: "#/components/schemas/PagerDutyNotificationEndpoint" + pagerduty: "#/components/schemas/PagerDutyNotificationEndpoint" http: "#/components/schemas/HTTPNotificationEndpoint" NotificationEndpoint: allOf: @@ -10824,10 +11704,10 @@ components: type: string method: type: string - enum: ['POST', 'GET', 'PUT'] + enum: ["POST", "GET", "PUT"] authMethod: type: string - enum: ['none', 'basic', 'bearer'] + enum: ["none", "basic", "bearer"] contentTemplate: type: string headers: @@ -10837,7 +11717,59 @@ components: type: string NotificationEndpointType: type: string - enum: ['slack', 'pagerduty', 'http'] + enum: ["slack", "pagerduty", "http"] + DBRP: + required: + - orgID + - org + - bucketID + - database + - retention_policy + properties: + id: + type: string + description: the mapping identifier + readOnly: true + orgID: + type: string + description: the organization ID that owns this mapping. + org: + type: string + description: the organization that owns this mapping. + bucketID: + type: string + description: the bucket ID used as target for the translation. + database: + type: string + description: InfluxDB v1 database + retention_policy: + type: string + description: InfluxDB v1 retention policy + default: + type: boolean + description: Specify if this mapping represents the default retention policy for the database specificed. + links: + $ref: "#/components/schemas/Links" + DBRPs: + properties: + notificationEndpoints: + type: array + items: + $ref: "#/components/schemas/DBRP" + links: + $ref: "#/components/schemas/Links" + DBRPUpdate: + properties: + database: + type: string + description: InfluxDB v1 database + retention_policy: + type: string + description: InfluxDB v1 retention policy + default: + type: boolean + links: + $ref: "#/components/schemas/Links" securitySchemes: BasicAuth: type: http diff --git a/domain/types.gen.go b/domain/types.gen.go index c61da448..2dda946e 100644 --- a/domain/types.gen.go +++ b/domain/types.gen.go @@ -86,6 +86,13 @@ const ( CheckViewPropertiesTypeCheck CheckViewPropertiesType = "check" ) +// Defines values for CloudUserRole. +const ( + CloudUserRoleMember CloudUserRole = "member" + + CloudUserRoleOwner CloudUserRole = "owner" +) + // Defines values for ConstantVariablePropertiesType. const ( ConstantVariablePropertiesTypeConstant ConstantVariablePropertiesType = "constant" @@ -249,6 +256,13 @@ const ( InfluxQLQueryTypeInfluxql InfluxQLQueryType = "influxql" ) +// Defines values for InviteRole. +const ( + InviteRoleMember InviteRole = "member" + + InviteRoleOwner InviteRole = "owner" +) + // Defines values for LegendOrientation. const ( LegendOrientationBottom LegendOrientation = "bottom" @@ -465,6 +479,8 @@ const ( ResourceTypeDashboards ResourceType = "dashboards" + ResourceTypeDbrp ResourceType = "dbrp" + ResourceTypeDocuments ResourceType = "documents" ResourceTypeLabels ResourceType = "labels" @@ -1282,7 +1298,7 @@ type CheckViewProperties struct { CheckID string `json:"checkID"` // Colors define color encoding of data into a visualization - Colors []string `json:"colors"` + Colors []DashboardColor `json:"colors"` Queries []DashboardQuery `json:"queries"` Shape CheckViewPropertiesShape `json:"shape"` Type CheckViewPropertiesType `json:"type"` @@ -1300,6 +1316,31 @@ type Checks struct { Links *Links `json:"links,omitempty"` } +// CloudUser defines model for CloudUser. +type CloudUser struct { + Email string `json:"email"` + FirstName *string `json:"firstName,omitempty"` + + // the idpe id of the user + Id string `json:"id"` + LastName *string `json:"lastName,omitempty"` + Links *struct { + Self *string `json:"self,omitempty"` + } `json:"links,omitempty"` + Role CloudUserRole `json:"role"` +} + +// CloudUserRole defines model for CloudUser.Role. +type CloudUserRole string + +// CloudUsers defines model for CloudUsers. +type CloudUsers struct { + Links *struct { + Self *string `json:"self,omitempty"` + } `json:"links,omitempty"` + Users *[]CloudUser `json:"users,omitempty"` +} + // ConditionalExpression defines model for ConditionalExpression. type ConditionalExpression struct { Alternate *Expression `json:"alternate,omitempty"` @@ -1355,6 +1396,50 @@ type CustomCheck struct { // CustomCheckType defines model for CustomCheck.Type. type CustomCheckType string +// DBRP defines model for DBRP. +type DBRP struct { + + // the bucket ID used as target for the translation. + BucketID string `json:"bucketID"` + + // InfluxDB v1 database + Database string `json:"database"` + + // Specify if this mapping represents the default retention policy for the database specificed. + Default *bool `json:"default,omitempty"` + + // the mapping identifier + Id *string `json:"id,omitempty"` + Links *Links `json:"links,omitempty"` + + // the organization that owns this mapping. + Org string `json:"org"` + + // the organization ID that owns this mapping. + OrgID string `json:"orgID"` + + // InfluxDB v1 retention policy + RetentionPolicy string `json:"retention_policy"` +} + +// DBRPUpdate defines model for DBRPUpdate. +type DBRPUpdate struct { + + // InfluxDB v1 database + Database *string `json:"database,omitempty"` + Default *bool `json:"default,omitempty"` + Links *Links `json:"links,omitempty"` + + // InfluxDB v1 retention policy + RetentionPolicy *string `json:"retention_policy,omitempty"` +} + +// DBRPs defines model for DBRPs. +type DBRPs struct { + Links *Links `json:"links,omitempty"` + NotificationEndpoints *[]DBRP `json:"notificationEndpoints,omitempty"` +} + // Dashboard defines model for Dashboard. type Dashboard struct { // Embedded struct due to allOf(#/components/schemas/CreateDashboardRequest) @@ -1704,6 +1789,11 @@ type File struct { Type *NodeType `json:"type,omitempty"` } +// Flags defines model for Flags. +type Flags struct { + AdditionalProperties map[string]interface{} `json:"-"` +} + // FloatLiteral defines model for FloatLiteral. type FloatLiteral struct { @@ -1834,9 +1924,11 @@ type HTTPNotificationRuleBaseType string // HealthCheck defines model for HealthCheck. type HealthCheck struct { Checks *[]HealthCheck `json:"checks,omitempty"` + Commit *string `json:"commit,omitempty"` Message *string `json:"message,omitempty"` Name string `json:"name"` Status HealthCheckStatus `json:"status"` + Version *string `json:"version,omitempty"` } // HealthCheckStatus defines model for HealthCheck.Status. @@ -1957,6 +2049,30 @@ type IntegerLiteral struct { Value *string `json:"value,omitempty"` } +// Invite defines model for Invite. +type Invite struct { + Email string `json:"email"` + ExpiresAt *time.Time `json:"expiresAt,omitempty"` + + // the idpe id of the invite + Id string `json:"id"` + Links *struct { + Self *string `json:"self,omitempty"` + } `json:"links,omitempty"` + Role InviteRole `json:"role"` +} + +// InviteRole defines model for Invite.Role. +type InviteRole string + +// Invites defines model for Invites. +type Invites struct { + Invites *[]Invite `json:"invites,omitempty"` + Links *struct { + Self *string `json:"self,omitempty"` + } `json:"links,omitempty"` +} + // IsOnboarding defines model for IsOnboarding. type IsOnboarding struct { @@ -2009,7 +2125,12 @@ type LabelUpdate struct { Name *string `json:"name,omitempty"` // Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. - Properties *map[string]interface{} `json:"properties,omitempty"` + Properties *LabelUpdate_Properties `json:"properties,omitempty"` +} + +// LabelUpdate_Properties defines model for LabelUpdate.Properties. +type LabelUpdate_Properties struct { + AdditionalProperties map[string]string `json:"-"` } // Labels defines model for Labels. @@ -2080,6 +2201,7 @@ type LinePlusSingleStatProperties struct { // If true, will display note when empty ShowNoteWhenEmpty bool `json:"showNoteWhenEmpty"` Suffix string `json:"suffix"` + TimeFormat *string `json:"timeFormat,omitempty"` Type LinePlusSingleStatPropertiesType `json:"type"` XColumn *string `json:"xColumn,omitempty"` YColumn *string `json:"yColumn,omitempty"` @@ -2606,6 +2728,7 @@ type PkgApply struct { Url string `json:"url"` } `json:"remotes,omitempty"` Secrets *PkgApply_Secrets `json:"secrets,omitempty"` + StackID *string `json:"stackID,omitempty"` } // PkgApply_Secrets defines model for PkgApply.Secrets. @@ -2645,99 +2768,167 @@ type PkgCreateKind string type PkgSummary struct { Diff *struct { Buckets *[]struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - New *struct { + Id *string `json:"id,omitempty"` + New *struct { Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` // Rules to expire or retain data. No rules means data never expires. RetentionRules *RetentionRules `json:"retentionRules,omitempty"` } `json:"new,omitempty"` Old *struct { Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` // Rules to expire or retain data. No rules means data never expires. RetentionRules *RetentionRules `json:"retentionRules,omitempty"` } `json:"old,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + StateStatus *string `json:"stateStatus,omitempty"` } `json:"buckets,omitempty"` Checks *[]struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - New *CheckDiscriminator `json:"new,omitempty"` - Old *CheckDiscriminator `json:"old,omitempty"` + Id *string `json:"id,omitempty"` + New *CheckDiscriminator `json:"new,omitempty"` + Old *CheckDiscriminator `json:"old,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + StateStatus *string `json:"stateStatus,omitempty"` } `json:"checks,omitempty"` Dashboards *[]struct { - Charts *[]PkgChart `json:"charts,omitempty"` - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + Id *string `json:"id,omitempty"` + New *struct { + Charts *[]PkgChart `json:"charts,omitempty"` + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + } `json:"new,omitempty"` + Old *struct { + Charts *[]PkgChart `json:"charts,omitempty"` + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + } `json:"old,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + StateStatus *string `json:"stateStatus,omitempty"` } `json:"dashboards,omitempty"` LabelMappings *[]struct { - IsNew *bool `json:"isNew,omitempty"` - LabelID *string `json:"labelID,omitempty"` - LabelName *string `json:"labelName,omitempty"` - ResourceID *string `json:"resourceID,omitempty"` - ResourceName *string `json:"resourceName,omitempty"` - ResourceType *string `json:"resourceType,omitempty"` + LabelID *string `json:"labelID,omitempty"` + LabelName *string `json:"labelName,omitempty"` + LabelPkgName *string `json:"labelPkgName,omitempty"` + ResourceID *string `json:"resourceID,omitempty"` + ResourceName *string `json:"resourceName,omitempty"` + ResourcePkgName *string `json:"resourcePkgName,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Status *string `json:"status,omitempty"` } `json:"labelMappings,omitempty"` Labels *[]struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - New *struct { + Id *string `json:"id,omitempty"` + New *struct { Color *string `json:"color,omitempty"` Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` } `json:"new,omitempty"` Old *struct { Color *string `json:"color,omitempty"` Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` } `json:"old,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + StateStatus *string `json:"stateStatus,omitempty"` } `json:"labels,omitempty"` NotificationEndpoints *[]struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - New *NotificationEndpointDiscrimator `json:"new,omitempty"` - Old *NotificationEndpointDiscrimator `json:"old,omitempty"` + Id *string `json:"id,omitempty"` + New *NotificationEndpointDiscrimator `json:"new,omitempty"` + Old *NotificationEndpointDiscrimator `json:"old,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + StateStatus *string `json:"stateStatus,omitempty"` } `json:"notificationEndpoints,omitempty"` NotificationRules *[]struct { - Description *string `json:"description,omitempty"` - EndpointID *string `json:"endpointID,omitempty"` - EndpointName *string `json:"endpointName,omitempty"` - EndpointType *string `json:"endpointType,omitempty"` - Every *string `json:"every,omitempty"` - MessageTemplate *string `json:"messageTemplate,omitempty"` - Name *string `json:"name,omitempty"` - Offset *string `json:"offset,omitempty"` - Status *string `json:"status,omitempty"` - StatusRules *[]struct { - CurrentLevel *string `json:"currentLevel,omitempty"` - PreviousLevel *string `json:"previousLevel,omitempty"` - } `json:"statusRules,omitempty"` - TagRules *[]struct { - Key *string `json:"key,omitempty"` - Operator *string `json:"operator,omitempty"` - Value *string `json:"value,omitempty"` - } `json:"tagRules,omitempty"` + Id *string `json:"id,omitempty"` + New *struct { + Description *string `json:"description,omitempty"` + EndpointID *string `json:"endpointID,omitempty"` + EndpointName *string `json:"endpointName,omitempty"` + EndpointType *string `json:"endpointType,omitempty"` + Every *string `json:"every,omitempty"` + MessageTemplate *string `json:"messageTemplate,omitempty"` + Name *string `json:"name,omitempty"` + Offset *string `json:"offset,omitempty"` + Status *string `json:"status,omitempty"` + StatusRules *[]struct { + CurrentLevel *string `json:"currentLevel,omitempty"` + PreviousLevel *string `json:"previousLevel,omitempty"` + } `json:"statusRules,omitempty"` + TagRules *[]struct { + Key *string `json:"key,omitempty"` + Operator *string `json:"operator,omitempty"` + Value *string `json:"value,omitempty"` + } `json:"tagRules,omitempty"` + } `json:"new,omitempty"` + Old *struct { + Description *string `json:"description,omitempty"` + EndpointID *string `json:"endpointID,omitempty"` + EndpointName *string `json:"endpointName,omitempty"` + EndpointType *string `json:"endpointType,omitempty"` + Every *string `json:"every,omitempty"` + MessageTemplate *string `json:"messageTemplate,omitempty"` + Name *string `json:"name,omitempty"` + Offset *string `json:"offset,omitempty"` + Status *string `json:"status,omitempty"` + StatusRules *[]struct { + CurrentLevel *string `json:"currentLevel,omitempty"` + PreviousLevel *string `json:"previousLevel,omitempty"` + } `json:"statusRules,omitempty"` + TagRules *[]struct { + Key *string `json:"key,omitempty"` + Operator *string `json:"operator,omitempty"` + Value *string `json:"value,omitempty"` + } `json:"tagRules,omitempty"` + } `json:"old,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + StateStatus *string `json:"stateStatus,omitempty"` } `json:"notificationRules,omitempty"` Tasks *[]struct { - Cron *string `json:"cron,omitempty"` - Description *string `json:"description,omitempty"` - Every *string `json:"every,omitempty"` - Name *string `json:"name,omitempty"` - Offset *string `json:"offset,omitempty"` - Query *string `json:"query,omitempty"` - Status *string `json:"status,omitempty"` + Id *string `json:"id,omitempty"` + New *struct { + Cron *string `json:"cron,omitempty"` + Description *string `json:"description,omitempty"` + Every *string `json:"every,omitempty"` + Name *string `json:"name,omitempty"` + Offset *string `json:"offset,omitempty"` + Query *string `json:"query,omitempty"` + Status *string `json:"status,omitempty"` + } `json:"new,omitempty"` + Old *struct { + Cron *string `json:"cron,omitempty"` + Description *string `json:"description,omitempty"` + Every *string `json:"every,omitempty"` + Name *string `json:"name,omitempty"` + Offset *string `json:"offset,omitempty"` + Query *string `json:"query,omitempty"` + Status *string `json:"status,omitempty"` + } `json:"old,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + StateStatus *string `json:"stateStatus,omitempty"` } `json:"tasks,omitempty"` - TelegrafConfigs *[]TelegrafRequest `json:"telegrafConfigs,omitempty"` - Variables *[]struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - New *struct { + TelegrafConfigs *[]struct { + Id *string `json:"id,omitempty"` + New *TelegrafRequest `json:"new,omitempty"` + Old *TelegrafRequest `json:"old,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + StateStatus *string `json:"stateStatus,omitempty"` + } `json:"telegrafConfigs,omitempty"` + Variables *[]struct { + Id *string `json:"id,omitempty"` + New *struct { Args *VariableProperties `json:"args,omitempty"` Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` } `json:"new,omitempty"` Old *struct { Args *VariableProperties `json:"args,omitempty"` Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` } `json:"old,omitempty"` + PkgName *string `json:"pkgName,omitempty"` + StateStatus *string `json:"stateStatus,omitempty"` } `json:"variables,omitempty"` } `json:"diff,omitempty"` Errors *[]struct { @@ -2746,6 +2937,7 @@ type PkgSummary struct { Kind *string `json:"kind,omitempty"` Reason *string `json:"reason,omitempty"` } `json:"errors,omitempty"` + StackID *string `json:"stackID,omitempty"` Summary *struct { Buckets *[]struct { Description *string `json:"description,omitempty"` @@ -2753,6 +2945,7 @@ type PkgSummary struct { LabelAssociations *[]PkgSummaryLabel `json:"labelAssociations,omitempty"` Name *string `json:"name,omitempty"` OrgID *string `json:"orgID,omitempty"` + PkgName *string `json:"pkgName,omitempty"` RetentionPeriod *int `json:"retentionPeriod,omitempty"` } `json:"buckets,omitempty"` Checks *[]struct { @@ -2760,6 +2953,7 @@ type PkgSummary struct { CheckDiscriminator // Embedded fields due to inline allOf schema LabelAssociations *[]PkgSummaryLabel `json:"labelAssociations,omitempty"` + PkgName *string `json:"pkgName,omitempty"` } `json:"checks,omitempty"` Dashboards *[]struct { Charts *[]PkgChart `json:"charts,omitempty"` @@ -2768,13 +2962,17 @@ type PkgSummary struct { LabelAssociations *[]PkgSummaryLabel `json:"labelAssociations,omitempty"` Name *string `json:"name,omitempty"` OrgID *string `json:"orgID,omitempty"` + PkgName *string `json:"pkgName,omitempty"` } `json:"dashboards,omitempty"` LabelMappings *[]struct { - LabelID *string `json:"labelID,omitempty"` - LabelName *string `json:"labelName,omitempty"` - ResourceID *string `json:"resourceID,omitempty"` - ResourceName *string `json:"resourceName,omitempty"` - ResourceType *string `json:"resourceType,omitempty"` + LabelID *string `json:"labelID,omitempty"` + LabelName *string `json:"labelName,omitempty"` + LabelPkgName *string `json:"labelPkgName,omitempty"` + ResourceID *string `json:"resourceID,omitempty"` + ResourceName *string `json:"resourceName,omitempty"` + ResourcePkgName *string `json:"resourcePkgName,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Status *string `json:"status,omitempty"` } `json:"labelMappings,omitempty"` Labels *[]PkgSummaryLabel `json:"labels,omitempty"` MissingEnvRefs *[]string `json:"missingEnvRefs,omitempty"` @@ -2784,17 +2982,19 @@ type PkgSummary struct { NotificationEndpointDiscrimator // Embedded fields due to inline allOf schema LabelAssociations *[]PkgSummaryLabel `json:"labelAssociations,omitempty"` + PkgName *string `json:"pkgName,omitempty"` } `json:"notificationEndpoints,omitempty"` NotificationRules *[]struct { Description *string `json:"description,omitempty"` EndpointID *string `json:"endpointID,omitempty"` - EndpointName *string `json:"endpointName,omitempty"` + EndpointPkgName *string `json:"endpointPkgName,omitempty"` EndpointType *string `json:"endpointType,omitempty"` Every *string `json:"every,omitempty"` LabelAssociations *[]PkgSummaryLabel `json:"labelAssociations,omitempty"` MessageTemplate *string `json:"messageTemplate,omitempty"` Name *string `json:"name,omitempty"` Offset *string `json:"offset,omitempty"` + PkgName *string `json:"pkgName,omitempty"` Status *string `json:"status,omitempty"` StatusRules *[]struct { CurrentLevel *string `json:"currentLevel,omitempty"` @@ -2813,6 +3013,7 @@ type PkgSummary struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Offset *string `json:"offset,omitempty"` + PkgName *string `json:"pkgName,omitempty"` Query *string `json:"query,omitempty"` Status *string `json:"status,omitempty"` } `json:"tasks,omitempty"` @@ -2821,6 +3022,7 @@ type PkgSummary struct { TelegrafRequest // Embedded fields due to inline allOf schema LabelAssociations *[]PkgSummaryLabel `json:"labelAssociations,omitempty"` + PkgName *string `json:"pkgName,omitempty"` } `json:"telegrafConfigs,omitempty"` Variables *[]struct { Arguments *VariableProperties `json:"arguments,omitempty"` @@ -2829,6 +3031,7 @@ type PkgSummary struct { LabelAssociations *[]PkgSummaryLabel `json:"labelAssociations,omitempty"` Name *string `json:"name,omitempty"` OrgID *string `json:"orgID,omitempty"` + PkgName *string `json:"pkgName,omitempty"` } `json:"variables,omitempty"` } `json:"summary,omitempty"` } @@ -2839,6 +3042,7 @@ type PkgSummaryLabel struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` OrgID *string `json:"orgID,omitempty"` + PkgName *string `json:"pkgName,omitempty"` RetentionPeriod *string `json:"retentionPeriod,omitempty"` } @@ -3053,6 +3257,7 @@ type Routes struct { External *struct { StatusFeed *string `json:"statusFeed,omitempty"` } `json:"external,omitempty"` + Flags *string `json:"flags,omitempty"` Me *string `json:"me,omitempty"` Orgs *string `json:"orgs,omitempty"` Query *struct { @@ -4502,7 +4707,15 @@ type GetDashboardsIDParams struct { type GetDashboardsIDParamsInclude string // PatchDashboardsIDJSONBody defines parameters for PatchDashboardsID. -type PatchDashboardsIDJSONBody Dashboard +type PatchDashboardsIDJSONBody struct { + Cells *CellWithViewProperties `json:"cells,omitempty"` + + // optional, when provided will replace the description + Description *string `json:"description,omitempty"` + + // optional, when provided will replace the name + Name *string `json:"name,omitempty"` +} // PatchDashboardsIDParams defines parameters for PatchDashboardsID. type PatchDashboardsIDParams struct { @@ -4646,6 +4859,74 @@ type DeleteDashboardsIDOwnersIDParams struct { ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` } +// GetDBRPsParams defines parameters for GetDBRPs. +type GetDBRPsParams struct { + + // Specifies the organization ID to filter on + OrgID string `json:"orgID"` + + // Specifies the mapping ID to filter on + Id *string `json:"id,omitempty"` + + // Specifies the bucket ID to filter on + BucketID *string `json:"bucketID,omitempty"` + + // Specifies filtering on default + Default *bool `json:"default,omitempty"` + + // Specifies the database to filter on + Db *string `json:"db,omitempty"` + + // Specifies the retention policy to filter on + Rp *string `json:"rp,omitempty"` + + // OpenTracing span context + ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` +} + +// PostDBRPJSONBody defines parameters for PostDBRP. +type PostDBRPJSONBody DBRP + +// PostDBRPParams defines parameters for PostDBRP. +type PostDBRPParams struct { + + // OpenTracing span context + ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` +} + +// DeleteDBRPIDParams defines parameters for DeleteDBRPID. +type DeleteDBRPIDParams struct { + + // Specifies the organization ID of the mapping + OrgID string `json:"orgID"` + + // OpenTracing span context + ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` +} + +// GetDBRPsIDParams defines parameters for GetDBRPsID. +type GetDBRPsIDParams struct { + + // Specifies the organization ID of the mapping + OrgID string `json:"orgID"` + + // OpenTracing span context + ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` +} + +// PatchDBRPIDJSONBody defines parameters for PatchDBRPID. +type PatchDBRPIDJSONBody DBRPUpdate + +// PatchDBRPIDParams defines parameters for PatchDBRPID. +type PatchDBRPIDParams struct { + + // Specifies the organization ID of the mapping + OrgID string `json:"orgID"` + + // OpenTracing span context + ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` +} + // PostDeleteJSONBody defines parameters for PostDelete. type PostDeleteJSONBody DeletePredicateRequest @@ -4739,6 +5020,13 @@ type DeleteDocumentsTemplatesIDLabelsIDParams struct { ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` } +// GetFlagsParams defines parameters for GetFlags. +type GetFlagsParams struct { + + // OpenTracing span context + ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` +} + // GetHealthParams defines parameters for GetHealth. type GetHealthParams struct { @@ -5009,6 +5297,30 @@ type PatchOrgsIDParams struct { ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` } +// PostOrgsIDInvitesJSONBody defines parameters for PostOrgsIDInvites. +type PostOrgsIDInvitesJSONBody Invite + +// PostOrgsIDInvitesParams defines parameters for PostOrgsIDInvites. +type PostOrgsIDInvitesParams struct { + + // OpenTracing span context + ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` +} + +// DeleteOrgsIDInviteIDParams defines parameters for DeleteOrgsIDInviteID. +type DeleteOrgsIDInviteIDParams struct { + + // OpenTracing span context + ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` +} + +// PostOrgsIDInviteIDResendParams defines parameters for PostOrgsIDInviteIDResend. +type PostOrgsIDInviteIDResendParams struct { + + // OpenTracing span context + ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` +} + // GetOrgsIDLabelsParams defines parameters for GetOrgsIDLabels. type GetOrgsIDLabelsParams struct { @@ -5117,12 +5429,61 @@ type PostOrgsIDSecretsParams struct { ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` } +// GetCloudUsersParams defines parameters for GetCloudUsers. +type GetCloudUsersParams struct { + + // OpenTracing span context + ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` +} + +// DeleteOrgsIDCloudUserIDParams defines parameters for DeleteOrgsIDCloudUserID. +type DeleteOrgsIDCloudUserIDParams struct { + + // OpenTracing span context + ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` +} + // CreatePkgJSONBody defines parameters for CreatePkg. type CreatePkgJSONBody PkgCreate // ApplyPkgJSONBody defines parameters for ApplyPkg. type ApplyPkgJSONBody PkgApply +// ListStacksParams defines parameters for ListStacks. +type ListStacksParams struct { + + // The organization id of the stacks + OrgID string `json:"orgID"` + + // A collection of names to filter the list by. + Name *string `json:"name,omitempty"` + + // A collection of stackIDs to filter the list by. + StackID *string `json:"stackID,omitempty"` +} + +// CreateStackJSONBody defines parameters for CreateStack. +type CreateStackJSONBody struct { + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + OrgID *string `json:"orgID,omitempty"` + Urls *[]string `json:"urls,omitempty"` +} + +// DeleteStackParams defines parameters for DeleteStack. +type DeleteStackParams struct { + + // The organization id of the user + OrgID string `json:"orgID"` +} + +// ExportStackParams defines parameters for ExportStack. +type ExportStackParams struct { + + // The organization id of the user + OrgID string `json:"orgID"` +} + // PostQueryJSONBody defines parameters for PostQuery. type PostQueryJSONBody interface{} @@ -5350,6 +5711,16 @@ type PostSetupParams struct { ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` } +// PostSetupUserJSONBody defines parameters for PostSetupUser. +type PostSetupUserJSONBody OnboardingRequest + +// PostSetupUserParams defines parameters for PostSetupUser. +type PostSetupUserParams struct { + + // OpenTracing span context + ZapTraceSpan *TraceSpan `json:"Zap-Trace-Span,omitempty"` +} + // PostSigninParams defines parameters for PostSignin. type PostSigninParams struct { @@ -5997,6 +6368,12 @@ type PostDashboardsIDMembersJSONRequestBody PostDashboardsIDMembersJSONBody // PostDashboardsIDOwnersRequestBody defines body for PostDashboardsIDOwners for application/json ContentType. type PostDashboardsIDOwnersJSONRequestBody PostDashboardsIDOwnersJSONBody +// PostDBRPRequestBody defines body for PostDBRP for application/json ContentType. +type PostDBRPJSONRequestBody PostDBRPJSONBody + +// PatchDBRPIDRequestBody defines body for PatchDBRPID for application/json ContentType. +type PatchDBRPIDJSONRequestBody PatchDBRPIDJSONBody + // PostDeleteRequestBody defines body for PostDelete for application/json ContentType. type PostDeleteJSONRequestBody PostDeleteJSONBody @@ -6048,6 +6425,9 @@ type PostOrgsJSONRequestBody PostOrgsJSONBody // PatchOrgsIDRequestBody defines body for PatchOrgsID for application/json ContentType. type PatchOrgsIDJSONRequestBody PatchOrgsIDJSONBody +// PostOrgsIDInvitesRequestBody defines body for PostOrgsIDInvites for application/json ContentType. +type PostOrgsIDInvitesJSONRequestBody PostOrgsIDInvitesJSONBody + // PostOrgsIDLabelsRequestBody defines body for PostOrgsIDLabels for application/json ContentType. type PostOrgsIDLabelsJSONRequestBody PostOrgsIDLabelsJSONBody @@ -6069,6 +6449,9 @@ type CreatePkgJSONRequestBody CreatePkgJSONBody // ApplyPkgRequestBody defines body for ApplyPkg for application/json ContentType. type ApplyPkgJSONRequestBody ApplyPkgJSONBody +// CreateStackRequestBody defines body for CreateStack for application/json ContentType. +type CreateStackJSONRequestBody CreateStackJSONBody + // PostQueryRequestBody defines body for PostQuery for application/json ContentType. type PostQueryJSONRequestBody PostQueryJSONBody @@ -6099,6 +6482,9 @@ type PostScrapersIDOwnersJSONRequestBody PostScrapersIDOwnersJSONBody // PostSetupRequestBody defines body for PostSetup for application/json ContentType. type PostSetupJSONRequestBody PostSetupJSONBody +// PostSetupUserRequestBody defines body for PostSetupUser for application/json ContentType. +type PostSetupUserJSONRequestBody PostSetupUserJSONBody + // PostSourcesRequestBody defines body for PostSources for application/json ContentType. type PostSourcesJSONRequestBody PostSourcesJSONBody @@ -6159,6 +6545,59 @@ type PutVariablesIDJSONRequestBody PutVariablesIDJSONBody // PostVariablesIDLabelsRequestBody defines body for PostVariablesIDLabels for application/json ContentType. type PostVariablesIDLabelsJSONRequestBody PostVariablesIDLabelsJSONBody +// Getter for additional properties for Flags. Returns the specified +// element and whether it was found +func (a Flags) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for Flags +func (a *Flags) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for Flags to handle AdditionalProperties +func (a *Flags) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return errors.Wrap(err, fmt.Sprintf("error unmarshaling field %s", fieldName)) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for Flags to handle AdditionalProperties +func (a Flags) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, errors.Wrap(err, fmt.Sprintf("error marshaling '%s'", fieldName)) + } + } + return json.Marshal(object) +} + // Getter for additional properties for FluxSuggestion_Params. Returns the specified // element and whether it was found func (a FluxSuggestion_Params) Get(fieldName string) (value string, found bool) { @@ -6371,6 +6810,59 @@ func (a LabelCreateRequest_Properties) MarshalJSON() ([]byte, error) { return json.Marshal(object) } +// Getter for additional properties for LabelUpdate_Properties. Returns the specified +// element and whether it was found +func (a LabelUpdate_Properties) Get(fieldName string) (value string, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for LabelUpdate_Properties +func (a *LabelUpdate_Properties) Set(fieldName string, value string) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]string) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for LabelUpdate_Properties to handle AdditionalProperties +func (a *LabelUpdate_Properties) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]string) + for fieldName, fieldBuf := range object { + var fieldVal string + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return errors.Wrap(err, fmt.Sprintf("error unmarshaling field %s", fieldName)) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for LabelUpdate_Properties to handle AdditionalProperties +func (a LabelUpdate_Properties) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, errors.Wrap(err, fmt.Sprintf("error marshaling '%s'", fieldName)) + } + } + return json.Marshal(object) +} + // Getter for additional properties for MapVariableProperties_Values. Returns the specified // element and whether it was found func (a MapVariableProperties_Values) Get(fieldName string) (value string, found bool) { From a053c710c40f218a64370cc982d5701170e0c1a2 Mon Sep 17 00:00:00 2001 From: vlastahajek Date: Tue, 9 Jun 2020 13:48:33 +0200 Subject: [PATCH 2/2] feat: Adding Labels API --- CHANGELOG.md | 5 +- README.md | 1 + api/examples_test.go | 46 +++++++++ api/labels.go | 168 ++++++++++++++++++++++++++++++++ api/organizations.go | 69 ++++++++++++- client.go | 14 ++- client_e2e_test.go | 136 ++++++++++++++++++++++++++ go.mod | 1 + internal/examples/fakeclient.go | 4 + 9 files changed, 438 insertions(+), 6 deletions(-) create mode 100644 api/labels.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f522632..7cf6e693 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ -## 1.2.0 [2020-05-15] +## 1.3.0 [in progress] +### Features +1. [#131](https://github.com/influxdata/influxdb-client-go/pull/131) Labels API +## 1.2.0 [2020-05-15] ### Breaking Changes - [#107](https://github.com/influxdata/influxdb-client-go/pull/107) Renamed `InfluxDBClient` interface to `Client`, so the full name `influxdb2.Client` suits better to Go naming conventions - [#125](https://github.com/influxdata/influxdb-client-go/pull/125) `WriteApi`,`WriteApiBlocking`,`QueryApi` interfaces and related objects like `Point`, `FluxTableMetadata`, `FluxTableColumn`, `FluxRecord`, moved to the `api` ( and `api/write`, `api/query`) packages diff --git a/README.md b/README.md index fc10f1c6..9a38b8f7 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ This repository contains the reference Go client for InfluxDB 2. - InfluxDB 2 API - setup - ready + - ... ## Documentation diff --git a/api/examples_test.go b/api/examples_test.go index 7af30d29..1a6b94eb 100644 --- a/api/examples_test.go +++ b/api/examples_test.go @@ -323,3 +323,49 @@ func ExampleUsersApi() { // Ensures background processes finishes client.Close() } + +func ExampleLabelsApi() { + // Create influxdb client + client := influxdb2.NewClient("http://localhost:9999", "my-token") + + ctx := context.Background() + // Get Labels API client + labelsApi := client.LabelsApi() + // Get Organizations API client + orgsApi := client.OrganizationsApi() + + // Get organization that will own label + myorg, err := orgsApi.FindOrganizationByName(ctx, "my-org") + if err != nil { + panic(err) + } + + labelName := "Active State" + props := map[string]string{"color": "33ffdd", "description": "Marks org active"} + label, err := labelsApi.CreateLabelWithName(ctx, myorg, labelName, props) + if err != nil { + panic(err) + } + + // Get organization that will have the label + org, err := orgsApi.FindOrganizationByName(ctx, "IT") + if err != nil { + panic(err) + } + + // Add label to org + _, err = orgsApi.AddLabel(ctx, org, label) + if err != nil { + panic(err) + } + + // Change color property + label.Properties.AdditionalProperties = map[string]string{"color": "ff1122"} + label, err = labelsApi.UpdateLabel(ctx, label) + if err != nil { + panic(err) + } + + // Close the client + client.Close() +} diff --git a/api/labels.go b/api/labels.go new file mode 100644 index 00000000..3d127980 --- /dev/null +++ b/api/labels.go @@ -0,0 +1,168 @@ +// Copyright 2020 InfluxData, Inc. All rights reserved. +// Use of this source code is governed by MIT +// license that can be found in the LICENSE file. + +package api + +import ( + "context" + "fmt" + "github.com/influxdata/influxdb-client-go/domain" +) + +// LabelsApi provides methods for managing labels in a InfluxDB server. +type LabelsApi interface { + // GetLabels returns all labels. + GetLabels(ctx context.Context) (*[]domain.Label, error) + // FindLabelsByOrg returns labels belonging to organization org. + FindLabelsByOrg(ctx context.Context, org *domain.Organization) (*[]domain.Label, error) + // FindLabelsByOrgId returns labels belonging to organization with id orgId. + FindLabelsByOrgId(ctx context.Context, orgID string) (*[]domain.Label, error) + // FindLabelById returns a label with labelID. + FindLabelById(ctx context.Context, labelID string) (*domain.Label, error) + // FindLabelByName returns a label with name labelName under an organization orgId. + FindLabelByName(ctx context.Context, orgId, labelName string) (*domain.Label, error) + // CreateLabel creates a new label. + CreateLabel(ctx context.Context, label *domain.LabelCreateRequest) (*domain.Label, error) + // CreateLabelWithName creates a new label with label labelName and properties, under the organization org. + // Properties example: {"color": "ffb3b3", "description": "this is a description"}. + CreateLabelWithName(ctx context.Context, org *domain.Organization, labelName string, properties map[string]string) (*domain.Label, error) + // CreateLabelWithName creates a new label with label labelName and properties, under the organization with id orgId. + // Properties example: {"color": "ffb3b3", "description": "this is a description"}. + CreateLabelWithNameWithId(ctx context.Context, orgId, labelName string, properties map[string]string) (*domain.Label, error) + // UpdateLabel updates the label. + // Properties can be removed by sending an update with an empty value. + UpdateLabel(ctx context.Context, label *domain.Label) (*domain.Label, error) + // DeleteLabelWithId deletes a label with labelId. + DeleteLabelWithId(ctx context.Context, labelID string) error + // DeleteLabel deletes a label. + DeleteLabel(ctx context.Context, label *domain.Label) error +} + +type labelsApiImpl struct { + apiClient *domain.ClientWithResponses +} + +func NewLabelsApi(apiClient *domain.ClientWithResponses) LabelsApi { + return &labelsApiImpl{ + apiClient: apiClient, + } +} + +func (u *labelsApiImpl) GetLabels(ctx context.Context) (*[]domain.Label, error) { + params := &domain.GetLabelsParams{} + return u.getLabels(ctx, params) +} + +func (u *labelsApiImpl) getLabels(ctx context.Context, params *domain.GetLabelsParams) (*[]domain.Label, error) { + response, err := u.apiClient.GetLabelsWithResponse(ctx, params) + if err != nil { + return nil, err + } + if response.JSONDefault != nil { + return nil, domain.DomainErrorToError(response.JSONDefault, response.StatusCode()) + } + return (*[]domain.Label)(response.JSON200.Labels), nil +} + +func (u *labelsApiImpl) FindLabelsByOrg(ctx context.Context, org *domain.Organization) (*[]domain.Label, error) { + return u.FindLabelsByOrgId(ctx, *org.Id) +} + +func (u *labelsApiImpl) FindLabelsByOrgId(ctx context.Context, orgID string) (*[]domain.Label, error) { + params := &domain.GetLabelsParams{OrgID: &orgID} + return u.getLabels(ctx, params) +} + +func (u *labelsApiImpl) FindLabelById(ctx context.Context, labelID string) (*domain.Label, error) { + params := &domain.GetLabelsIDParams{} + response, err := u.apiClient.GetLabelsIDWithResponse(ctx, labelID, params) + if err != nil { + return nil, err + } + if response.JSONDefault != nil { + return nil, domain.DomainErrorToError(response.JSONDefault, response.StatusCode()) + } + return response.JSON200.Label, nil +} + +func (u *labelsApiImpl) FindLabelByName(ctx context.Context, orgId, labelName string) (*domain.Label, error) { + labels, err := u.FindLabelsByOrgId(ctx, orgId) + if err != nil { + return nil, err + } + var label *domain.Label + for _, u := range *labels { + if *u.Name == labelName { + label = &u + break + } + } + if label == nil { + return nil, fmt.Errorf("label '%s' not found", labelName) + } + return label, nil +} + +func (u *labelsApiImpl) CreateLabelWithName(ctx context.Context, org *domain.Organization, labelName string, properties map[string]string) (*domain.Label, error) { + return u.CreateLabelWithNameWithId(ctx, *org.Id, labelName, properties) +} + +func (u *labelsApiImpl) CreateLabelWithNameWithId(ctx context.Context, orgId, labelName string, properties map[string]string) (*domain.Label, error) { + props := &domain.LabelCreateRequest_Properties{AdditionalProperties: properties} + label := &domain.LabelCreateRequest{Name: &labelName, OrgID: orgId, Properties: props} + return u.CreateLabel(ctx, label) +} + +func (u *labelsApiImpl) CreateLabel(ctx context.Context, label *domain.LabelCreateRequest) (*domain.Label, error) { + response, err := u.apiClient.PostLabelsWithResponse(ctx, domain.PostLabelsJSONRequestBody(*label)) + if err != nil { + return nil, err + } + if response.JSONDefault != nil { + return nil, domain.DomainErrorToError(response.JSONDefault, response.StatusCode()) + } + return response.JSON201.Label, nil +} + +func (u *labelsApiImpl) UpdateLabel(ctx context.Context, label *domain.Label) (*domain.Label, error) { + var props *domain.LabelUpdate_Properties + params := &domain.PatchLabelsIDParams{} + if label.Properties != nil { + props = &domain.LabelUpdate_Properties{AdditionalProperties: label.Properties.AdditionalProperties} + } + body := &domain.LabelUpdate{ + Name: label.Name, + Properties: props, + } + response, err := u.apiClient.PatchLabelsIDWithResponse(ctx, *label.Id, params, domain.PatchLabelsIDJSONRequestBody(*body)) + if err != nil { + return nil, err + } + if response.JSON404 != nil { + return nil, domain.DomainErrorToError(response.JSON404, response.StatusCode()) + } + if response.JSONDefault != nil { + return nil, domain.DomainErrorToError(response.JSONDefault, response.StatusCode()) + } + return response.JSON200.Label, nil +} + +func (u *labelsApiImpl) DeleteLabel(ctx context.Context, label *domain.Label) error { + return u.DeleteLabelWithId(ctx, *label.Id) +} + +func (u *labelsApiImpl) DeleteLabelWithId(ctx context.Context, labelID string) error { + params := &domain.DeleteLabelsIDParams{} + response, err := u.apiClient.DeleteLabelsIDWithResponse(ctx, labelID, params) + if err != nil { + return err + } + if response.JSON404 != nil { + return domain.DomainErrorToError(response.JSON404, response.StatusCode()) + } + if response.JSONDefault != nil { + return domain.DomainErrorToError(response.JSONDefault, response.StatusCode()) + } + return nil +} diff --git a/api/organizations.go b/api/organizations.go index 8f2db11b..0e3e5d6e 100644 --- a/api/organizations.go +++ b/api/organizations.go @@ -35,11 +35,11 @@ type OrganizationsApi interface { GetMembersWithId(ctx context.Context, orgId string) (*[]domain.ResourceMember, error) // AddMember adds a member to an organization. AddMember(ctx context.Context, org *domain.Organization, user *domain.User) (*domain.ResourceMember, error) - // AddMember adds a member with id memberId to an organization with orgId. + // AddMemberWithId adds a member with id memberId to an organization with orgId. AddMemberWithId(ctx context.Context, orgId, memberId string) (*domain.ResourceMember, error) // RemoveMember removes a member from an organization. RemoveMember(ctx context.Context, org *domain.Organization, user *domain.User) error - // RemoveMember removes a member with id memberId from an organization with orgId. + // RemoveMemberWithId removes a member with id memberId from an organization with orgId. RemoveMemberWithId(ctx context.Context, orgId, memberId string) error // GetOwners returns owners of an organization. GetOwners(ctx context.Context, org *domain.Organization) (*[]domain.ResourceOwner, error) @@ -47,12 +47,24 @@ type OrganizationsApi interface { GetOwnersWithId(ctx context.Context, orgId string) (*[]domain.ResourceOwner, error) // AddOwner adds an owner to an organization. AddOwner(ctx context.Context, org *domain.Organization, user *domain.User) (*domain.ResourceOwner, error) - // AddOwner adds an owner with id memberId to an organization with orgId. + // AddOwnerWithId adds an owner with id memberId to an organization with orgId. AddOwnerWithId(ctx context.Context, orgId, memberId string) (*domain.ResourceOwner, error) // RemoveOwner removes an owner from an organization. RemoveOwner(ctx context.Context, org *domain.Organization, user *domain.User) error - // RemoveOwner removes an owner with id memberId from an organization with orgId. + // RemoveOwnerWithId removes an owner with id memberId from an organization with orgId. RemoveOwnerWithId(ctx context.Context, orgId, memberId string) error + // GetLabels returns labels of an organization. + GetLabels(ctx context.Context, org *domain.Organization) (*[]domain.Label, error) + // GetLabelsWithId returns labels of an organization with orgId. + GetLabelsWithId(ctx context.Context, orgId string) (*[]domain.Label, error) + // AddLabel adds a label to an organization. + AddLabel(ctx context.Context, org *domain.Organization, label *domain.Label) (*domain.Label, error) + // AddLabelWithId adds a label with id labelId to an organization with orgId. + AddLabelWithId(ctx context.Context, orgId, labelId string) (*domain.Label, error) + // RemoveLabel removes an label from an organization. + RemoveLabel(ctx context.Context, org *domain.Organization, label *domain.Label) error + // RemoveLabelWithId removes an label with id labelId from an organization with orgId. + RemoveLabelWithId(ctx context.Context, orgId, labelId string) error } type organizationsApiImpl struct { @@ -273,3 +285,52 @@ func (o *organizationsApiImpl) RemoveOwnerWithId(ctx context.Context, orgId, mem } return nil } + +func (o *organizationsApiImpl) GetLabels(ctx context.Context, org *domain.Organization) (*[]domain.Label, error) { + return o.GetLabelsWithId(ctx, *org.Id) +} + +func (o *organizationsApiImpl) GetLabelsWithId(ctx context.Context, orgId string) (*[]domain.Label, error) { + params := &domain.GetOrgsIDLabelsParams{} + response, err := o.apiClient.GetOrgsIDLabelsWithResponse(ctx, orgId, params) + if err != nil { + return nil, err + } + if response.JSONDefault != nil { + return nil, domain.DomainErrorToError(response.JSONDefault, response.StatusCode()) + } + return (*[]domain.Label)(response.JSON200.Labels), nil +} + +func (o *organizationsApiImpl) AddLabel(ctx context.Context, org *domain.Organization, label *domain.Label) (*domain.Label, error) { + return o.AddLabelWithId(ctx, *org.Id, *label.Id) +} + +func (o *organizationsApiImpl) AddLabelWithId(ctx context.Context, orgId, labelId string) (*domain.Label, error) { + params := &domain.PostOrgsIDLabelsParams{} + body := &domain.PostOrgsIDLabelsJSONRequestBody{LabelID: &labelId} + response, err := o.apiClient.PostOrgsIDLabelsWithResponse(ctx, orgId, params, *body) + if err != nil { + return nil, err + } + if response.JSONDefault != nil { + return nil, domain.DomainErrorToError(response.JSONDefault, response.StatusCode()) + } + return response.JSON201.Label, nil +} + +func (o *organizationsApiImpl) RemoveLabel(ctx context.Context, org *domain.Organization, label *domain.Label) error { + return o.RemoveLabelWithId(ctx, *org.Id, *label.Id) +} + +func (o *organizationsApiImpl) RemoveLabelWithId(ctx context.Context, orgId, memberId string) error { + params := &domain.DeleteOrgsIDLabelsIDParams{} + response, err := o.apiClient.DeleteOrgsIDLabelsIDWithResponse(ctx, orgId, memberId, params) + if err != nil { + return err + } + if response.JSONDefault != nil { + return domain.DomainErrorToError(response.JSONDefault, response.StatusCode()) + } + return nil +} diff --git a/client.go b/client.go index 838001ef..0f8719c7 100644 --- a/client.go +++ b/client.go @@ -51,8 +51,10 @@ type Client interface { UsersApi() api.UsersApi // DeleteApi returns Delete API client DeleteApi() api.DeleteApi - // BucketsApi returns Delete API client + // BucketsApi returns Buckets API client BucketsApi() api.BucketsApi + // LabelsApi returns Labels API client + LabelsApi() api.LabelsApi } // clientImpl implements Client interface @@ -68,6 +70,7 @@ type clientImpl struct { usersApi api.UsersApi deleteApi api.DeleteApi bucketsApi api.BucketsApi + labelsApi api.LabelsApi } // NewClient creates Client for connecting to given serverUrl with provided authentication token, with the default options. @@ -220,3 +223,12 @@ func (c *clientImpl) BucketsApi() api.BucketsApi { } return c.bucketsApi } + +func (c *clientImpl) LabelsApi() api.LabelsApi { + c.lock.Lock() + defer c.lock.Unlock() + if c.labelsApi == nil { + c.labelsApi = api.NewLabelsApi(c.apiClient) + } + return c.labelsApi +} diff --git a/client_e2e_test.go b/client_e2e_test.go index 937043e2..4030da02 100644 --- a/client_e2e_test.go +++ b/client_e2e_test.go @@ -702,3 +702,139 @@ func TestBuckets(t *testing.T) { _, err = bucketsApi.FindBucketsByOrgName(ctx, org.Name, api.PagingWithLimit(100)) assert.NotNil(t, err) } + +func TestLabels(t *testing.T) { + client := influxdb2.NewClientWithOptions("http://localhost:9999", authToken, influxdb2.DefaultOptions().SetLogLevel(3)) + labelsApi := client.LabelsApi() + orgApi := client.OrganizationsApi() + + ctx := context.Background() + + myorg, err := orgApi.FindOrganizationByName(ctx, "my-org") + require.Nil(t, err, err) + require.NotNil(t, myorg) + + labels, err := labelsApi.GetLabels(ctx) + require.Nil(t, err, err) + require.NotNil(t, labels) + assert.Len(t, *labels, 0) + + labelName := "Active State" + props := map[string]string{"color": "#33ffddd", "description": "Marks org active"} + label, err := labelsApi.CreateLabelWithName(ctx, myorg, labelName, props) + require.Nil(t, err, err) + require.NotNil(t, label) + assert.Equal(t, labelName, *label.Name) + require.NotNil(t, label.Properties) + assert.Equal(t, props, label.Properties.AdditionalProperties) + + //remove properties + label.Properties.AdditionalProperties = map[string]string{"color": "", "description": ""} + label2, err := labelsApi.UpdateLabel(ctx, label) + require.Nil(t, err, err) + require.NotNil(t, label2) + assert.Equal(t, labelName, *label2.Name) + assert.Nil(t, label2.Properties) + + label2, err = labelsApi.FindLabelById(ctx, *label.Id) + require.Nil(t, err, err) + require.NotNil(t, label2) + assert.Equal(t, labelName, *label2.Name) + + label2, err = labelsApi.FindLabelById(ctx, "000000000000000") + require.NotNil(t, err, err) + require.Nil(t, label2) + + label2, err = labelsApi.FindLabelByName(ctx, *myorg.Id, labelName) + require.Nil(t, err, err) + require.NotNil(t, label2) + assert.Equal(t, labelName, *label2.Name) + + label2, err = labelsApi.FindLabelByName(ctx, *myorg.Id, "wrong label") + require.NotNil(t, err, err) + require.Nil(t, label2) + + labels, err = labelsApi.GetLabels(ctx) + require.Nil(t, err, err) + require.NotNil(t, labels) + assert.Len(t, *labels, 1) + + labels, err = labelsApi.FindLabelsByOrg(ctx, myorg) + require.Nil(t, err, err) + require.NotNil(t, labels) + assert.Len(t, *labels, 1) + + labels, err = labelsApi.FindLabelsByOrgId(ctx, *myorg.Id) + require.Nil(t, err, err) + require.NotNil(t, labels) + assert.Len(t, *labels, 1) + + labels, err = labelsApi.FindLabelsByOrgId(ctx, "000000000000000") + require.NotNil(t, err, err) + require.Nil(t, labels) + + // duplicate label + label2, err = labelsApi.CreateLabelWithName(ctx, myorg, labelName, nil) + require.NotNil(t, err, err) + require.Nil(t, label2) + + labels, err = orgApi.GetLabels(ctx, myorg) + require.Nil(t, err, err) + require.NotNil(t, labels) + assert.Len(t, *labels, 0) + + org, err := orgApi.CreateOrganizationWithName(ctx, "org1") + require.Nil(t, err, err) + require.NotNil(t, org) + + labels, err = orgApi.GetLabels(ctx, org) + require.Nil(t, err, err) + require.NotNil(t, labels) + assert.Len(t, *labels, 0) + + labelx, err := orgApi.AddLabel(ctx, org, label) + require.Nil(t, err, err) + require.NotNil(t, labelx) + + labels, err = orgApi.GetLabels(ctx, org) + require.Nil(t, err, err) + require.NotNil(t, labels) + assert.Len(t, *labels, 1) + + err = orgApi.RemoveLabel(ctx, org, label) + require.Nil(t, err, err) + + labels, err = orgApi.GetLabels(ctx, org) + require.Nil(t, err, err) + require.NotNil(t, labels) + assert.Len(t, *labels, 0) + + labels, err = orgApi.GetLabelsWithId(ctx, "000000000000000") + require.NotNil(t, err, err) + require.Nil(t, labels) + + label2, err = orgApi.AddLabelWithId(ctx, *org.Id, "000000000000000") + require.NotNil(t, err, err) + require.Nil(t, label2) + + label2, err = orgApi.AddLabelWithId(ctx, "000000000000000", "000000000000000") + require.NotNil(t, err, err) + require.Nil(t, label2) + + err = orgApi.RemoveLabelWithId(ctx, *org.Id, "000000000000000") + require.NotNil(t, err, err) + require.Nil(t, label2) + + err = orgApi.RemoveLabelWithId(ctx, "000000000000000", "000000000000000") + require.NotNil(t, err, err) + require.Nil(t, label2) + + err = orgApi.DeleteOrganization(ctx, org) + assert.Nil(t, err, err) + + err = labelsApi.DeleteLabel(ctx, label) + require.Nil(t, err, err) + + err = labelsApi.DeleteLabel(ctx, label) + require.NotNil(t, err, err) +} diff --git a/go.mod b/go.mod index b7ffa94c..1827bd1d 100644 --- a/go.mod +++ b/go.mod @@ -7,4 +7,5 @@ require ( github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.4.0 // test dependency + gopkg.in/yaml.v2 v2.2.5 ) diff --git a/internal/examples/fakeclient.go b/internal/examples/fakeclient.go index 7eb0e84f..9d02c655 100644 --- a/internal/examples/fakeclient.go +++ b/internal/examples/fakeclient.go @@ -92,3 +92,7 @@ func (c *fakeClient) DeleteApi() api.DeleteApi { func (c *fakeClient) BucketsApi() api.BucketsApi { return nil } + +func (c *fakeClient) LabelsApi() api.LabelsApi { + return nil +}