diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_client.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_client.go index 58ad4ad40..6cb43611a 100644 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_client.go +++ b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_client.go @@ -68,10 +68,6 @@ type ClientService interface { CloudSpaceServiceCreateCloudSpace(params *CloudSpaceServiceCreateCloudSpaceParams, opts ...ClientOption) (*CloudSpaceServiceCreateCloudSpaceOK, error) - CloudSpaceServiceCreateCloudSpaceApp(params *CloudSpaceServiceCreateCloudSpaceAppParams, opts ...ClientOption) (*CloudSpaceServiceCreateCloudSpaceAppOK, error) - - CloudSpaceServiceCreateCloudSpaceAppInstance(params *CloudSpaceServiceCreateCloudSpaceAppInstanceParams, opts ...ClientOption) (*CloudSpaceServiceCreateCloudSpaceAppInstanceOK, error) - CloudSpaceServiceCreateCloudSpaceInstanceMetric(params *CloudSpaceServiceCreateCloudSpaceInstanceMetricParams, opts ...ClientOption) (*CloudSpaceServiceCreateCloudSpaceInstanceMetricOK, error) CloudSpaceServiceCreateCloudSpaceSession(params *CloudSpaceServiceCreateCloudSpaceSessionParams, opts ...ClientOption) (*CloudSpaceServiceCreateCloudSpaceSessionOK, error) @@ -82,12 +78,8 @@ type ClientService interface { CloudSpaceServiceCreateLightningRun(params *CloudSpaceServiceCreateLightningRunParams, opts ...ClientOption) (*CloudSpaceServiceCreateLightningRunOK, error) - CloudSpaceServiceCreateLightningRunInstance(params *CloudSpaceServiceCreateLightningRunInstanceParams, opts ...ClientOption) (*CloudSpaceServiceCreateLightningRunInstanceOK, error) - CloudSpaceServiceDeleteCloudSpace(params *CloudSpaceServiceDeleteCloudSpaceParams, opts ...ClientOption) (*CloudSpaceServiceDeleteCloudSpaceOK, error) - CloudSpaceServiceDeleteCloudSpaceApp(params *CloudSpaceServiceDeleteCloudSpaceAppParams, opts ...ClientOption) (*CloudSpaceServiceDeleteCloudSpaceAppOK, error) - CloudSpaceServiceDeleteCloudSpaceSession(params *CloudSpaceServiceDeleteCloudSpaceSessionParams, opts ...ClientOption) (*CloudSpaceServiceDeleteCloudSpaceSessionOK, error) CloudSpaceServiceDeleteCloudSpaceVersion(params *CloudSpaceServiceDeleteCloudSpaceVersionParams, opts ...ClientOption) (*CloudSpaceServiceDeleteCloudSpaceVersionOK, error) @@ -106,12 +98,8 @@ type ClientService interface { CloudSpaceServiceForkCloudSpace(params *CloudSpaceServiceForkCloudSpaceParams, opts ...ClientOption) (*CloudSpaceServiceForkCloudSpaceOK, error) - CloudSpaceServiceForkCloudSpaceAppInstance(params *CloudSpaceServiceForkCloudSpaceAppInstanceParams, opts ...ClientOption) (*CloudSpaceServiceForkCloudSpaceAppInstanceOK, error) - CloudSpaceServiceGetCloudSpace(params *CloudSpaceServiceGetCloudSpaceParams, opts ...ClientOption) (*CloudSpaceServiceGetCloudSpaceOK, error) - CloudSpaceServiceGetCloudSpaceApp(params *CloudSpaceServiceGetCloudSpaceAppParams, opts ...ClientOption) (*CloudSpaceServiceGetCloudSpaceAppOK, error) - CloudSpaceServiceGetCloudSpaceByCollabSession(params *CloudSpaceServiceGetCloudSpaceByCollabSessionParams, opts ...ClientOption) (*CloudSpaceServiceGetCloudSpaceByCollabSessionOK, error) CloudSpaceServiceGetCloudSpaceByName(params *CloudSpaceServiceGetCloudSpaceByNameParams, opts ...ClientOption) (*CloudSpaceServiceGetCloudSpaceByNameOK, error) @@ -154,8 +142,6 @@ type ClientService interface { CloudSpaceServiceListAvailablePlugins(params *CloudSpaceServiceListAvailablePluginsParams, opts ...ClientOption) (*CloudSpaceServiceListAvailablePluginsOK, error) - CloudSpaceServiceListCloudSpaceApps(params *CloudSpaceServiceListCloudSpaceAppsParams, opts ...ClientOption) (*CloudSpaceServiceListCloudSpaceAppsOK, error) - CloudSpaceServiceListCloudSpaceColdStartMetrics(params *CloudSpaceServiceListCloudSpaceColdStartMetricsParams, opts ...ClientOption) (*CloudSpaceServiceListCloudSpaceColdStartMetricsOK, error) CloudSpaceServiceListCloudSpaceInstances(params *CloudSpaceServiceListCloudSpaceInstancesParams, opts ...ClientOption) (*CloudSpaceServiceListCloudSpaceInstancesOK, error) @@ -214,8 +200,6 @@ type ClientService interface { CloudSpaceServiceUpdateCloudSpace(params *CloudSpaceServiceUpdateCloudSpaceParams, opts ...ClientOption) (*CloudSpaceServiceUpdateCloudSpaceOK, error) - CloudSpaceServiceUpdateCloudSpaceApp(params *CloudSpaceServiceUpdateCloudSpaceAppParams, opts ...ClientOption) (*CloudSpaceServiceUpdateCloudSpaceAppOK, error) - CloudSpaceServiceUpdateCloudSpaceCollab(params *CloudSpaceServiceUpdateCloudSpaceCollabParams, opts ...ClientOption) (*CloudSpaceServiceUpdateCloudSpaceCollabOK, error) CloudSpaceServiceUpdateCloudSpaceIde(params *CloudSpaceServiceUpdateCloudSpaceIdeParams, opts ...ClientOption) (*CloudSpaceServiceUpdateCloudSpaceIdeOK, error) @@ -452,90 +436,6 @@ func (a *Client) CloudSpaceServiceCreateCloudSpace(params *CloudSpaceServiceCrea return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -CloudSpaceServiceCreateCloudSpaceApp cloud space service create cloud space app API -*/ -func (a *Client) CloudSpaceServiceCreateCloudSpaceApp(params *CloudSpaceServiceCreateCloudSpaceAppParams, opts ...ClientOption) (*CloudSpaceServiceCreateCloudSpaceAppOK, error) { - // NOTE: parameters are not validated before sending - if params == nil { - params = NewCloudSpaceServiceCreateCloudSpaceAppParams() - } - op := &runtime.ClientOperation{ - ID: "CloudSpaceService_CreateCloudSpaceApp", - Method: "POST", - PathPattern: "/v1/cloudspaces/apps", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloudSpaceServiceCreateCloudSpaceAppReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - - // only one success response has to be checked - success, ok := result.(*CloudSpaceServiceCreateCloudSpaceAppOK) - if ok { - return success, nil - } - - // unexpected success response. - // - // a default response is provided: fill this and return an error - unexpectedSuccess := result.(*CloudSpaceServiceCreateCloudSpaceAppDefault) - - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CloudSpaceServiceCreateCloudSpaceAppInstance cloud space service create cloud space app instance API -*/ -func (a *Client) CloudSpaceServiceCreateCloudSpaceAppInstance(params *CloudSpaceServiceCreateCloudSpaceAppInstanceParams, opts ...ClientOption) (*CloudSpaceServiceCreateCloudSpaceAppInstanceOK, error) { - // NOTE: parameters are not validated before sending - if params == nil { - params = NewCloudSpaceServiceCreateCloudSpaceAppInstanceParams() - } - op := &runtime.ClientOperation{ - ID: "CloudSpaceService_CreateCloudSpaceAppInstance", - Method: "POST", - PathPattern: "/v1/projects/{projectId}/cloudspaces/{cloudspaceId}/apps/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloudSpaceServiceCreateCloudSpaceAppInstanceReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - - // only one success response has to be checked - success, ok := result.(*CloudSpaceServiceCreateCloudSpaceAppInstanceOK) - if ok { - return success, nil - } - - // unexpected success response. - // - // a default response is provided: fill this and return an error - unexpectedSuccess := result.(*CloudSpaceServiceCreateCloudSpaceAppInstanceDefault) - - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* CloudSpaceServiceCreateCloudSpaceInstanceMetric endpoints for collecting studio startup metrics */ @@ -746,48 +646,6 @@ func (a *Client) CloudSpaceServiceCreateLightningRun(params *CloudSpaceServiceCr return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -CloudSpaceServiceCreateLightningRunInstance cloud space service create lightning run instance API -*/ -func (a *Client) CloudSpaceServiceCreateLightningRunInstance(params *CloudSpaceServiceCreateLightningRunInstanceParams, opts ...ClientOption) (*CloudSpaceServiceCreateLightningRunInstanceOK, error) { - // NOTE: parameters are not validated before sending - if params == nil { - params = NewCloudSpaceServiceCreateLightningRunInstanceParams() - } - op := &runtime.ClientOperation{ - ID: "CloudSpaceService_CreateLightningRunInstance", - Method: "POST", - PathPattern: "/v1/projects/{projectId}/cloudspaces/{cloudspaceId}/runs/{id}/get", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloudSpaceServiceCreateLightningRunInstanceReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - - // only one success response has to be checked - success, ok := result.(*CloudSpaceServiceCreateLightningRunInstanceOK) - if ok { - return success, nil - } - - // unexpected success response. - // - // a default response is provided: fill this and return an error - unexpectedSuccess := result.(*CloudSpaceServiceCreateLightningRunInstanceDefault) - - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* CloudSpaceServiceDeleteCloudSpace cloud space service delete cloud space API */ @@ -830,48 +688,6 @@ func (a *Client) CloudSpaceServiceDeleteCloudSpace(params *CloudSpaceServiceDele return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -CloudSpaceServiceDeleteCloudSpaceApp cloud space service delete cloud space app API -*/ -func (a *Client) CloudSpaceServiceDeleteCloudSpaceApp(params *CloudSpaceServiceDeleteCloudSpaceAppParams, opts ...ClientOption) (*CloudSpaceServiceDeleteCloudSpaceAppOK, error) { - // NOTE: parameters are not validated before sending - if params == nil { - params = NewCloudSpaceServiceDeleteCloudSpaceAppParams() - } - op := &runtime.ClientOperation{ - ID: "CloudSpaceService_DeleteCloudSpaceApp", - Method: "DELETE", - PathPattern: "/v1/cloudspaces/apps/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloudSpaceServiceDeleteCloudSpaceAppReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - - // only one success response has to be checked - success, ok := result.(*CloudSpaceServiceDeleteCloudSpaceAppOK) - if ok { - return success, nil - } - - // unexpected success response. - // - // a default response is provided: fill this and return an error - unexpectedSuccess := result.(*CloudSpaceServiceDeleteCloudSpaceAppDefault) - - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* CloudSpaceServiceDeleteCloudSpaceSession cloud space service delete cloud space session API */ @@ -1250,48 +1066,6 @@ func (a *Client) CloudSpaceServiceForkCloudSpace(params *CloudSpaceServiceForkCl return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -CloudSpaceServiceForkCloudSpaceAppInstance cloud space service fork cloud space app instance API -*/ -func (a *Client) CloudSpaceServiceForkCloudSpaceAppInstance(params *CloudSpaceServiceForkCloudSpaceAppInstanceParams, opts ...ClientOption) (*CloudSpaceServiceForkCloudSpaceAppInstanceOK, error) { - // NOTE: parameters are not validated before sending - if params == nil { - params = NewCloudSpaceServiceForkCloudSpaceAppInstanceParams() - } - op := &runtime.ClientOperation{ - ID: "CloudSpaceService_ForkCloudSpaceAppInstance", - Method: "PUT", - PathPattern: "/v1/projects/{projectId}/cloudspaces/{cloudspaceId}/apps/{id}/fork", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloudSpaceServiceForkCloudSpaceAppInstanceReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - - // only one success response has to be checked - success, ok := result.(*CloudSpaceServiceForkCloudSpaceAppInstanceOK) - if ok { - return success, nil - } - - // unexpected success response. - // - // a default response is provided: fill this and return an error - unexpectedSuccess := result.(*CloudSpaceServiceForkCloudSpaceAppInstanceDefault) - - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* CloudSpaceServiceGetCloudSpace cloud space service get cloud space API */ @@ -1334,48 +1108,6 @@ func (a *Client) CloudSpaceServiceGetCloudSpace(params *CloudSpaceServiceGetClou return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -CloudSpaceServiceGetCloudSpaceApp cloud space service get cloud space app API -*/ -func (a *Client) CloudSpaceServiceGetCloudSpaceApp(params *CloudSpaceServiceGetCloudSpaceAppParams, opts ...ClientOption) (*CloudSpaceServiceGetCloudSpaceAppOK, error) { - // NOTE: parameters are not validated before sending - if params == nil { - params = NewCloudSpaceServiceGetCloudSpaceAppParams() - } - op := &runtime.ClientOperation{ - ID: "CloudSpaceService_GetCloudSpaceApp", - Method: "GET", - PathPattern: "/v1/cloudspaces/apps/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloudSpaceServiceGetCloudSpaceAppReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - - // only one success response has to be checked - success, ok := result.(*CloudSpaceServiceGetCloudSpaceAppOK) - if ok { - return success, nil - } - - // unexpected success response. - // - // a default response is provided: fill this and return an error - unexpectedSuccess := result.(*CloudSpaceServiceGetCloudSpaceAppDefault) - - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* CloudSpaceServiceGetCloudSpaceByCollabSession cloud space service get cloud space by collab session API */ @@ -2258,48 +1990,6 @@ func (a *Client) CloudSpaceServiceListAvailablePlugins(params *CloudSpaceService return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -CloudSpaceServiceListCloudSpaceApps cloud space service list cloud space apps API -*/ -func (a *Client) CloudSpaceServiceListCloudSpaceApps(params *CloudSpaceServiceListCloudSpaceAppsParams, opts ...ClientOption) (*CloudSpaceServiceListCloudSpaceAppsOK, error) { - // NOTE: parameters are not validated before sending - if params == nil { - params = NewCloudSpaceServiceListCloudSpaceAppsParams() - } - op := &runtime.ClientOperation{ - ID: "CloudSpaceService_ListCloudSpaceApps", - Method: "GET", - PathPattern: "/v1/cloudspaces/apps", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloudSpaceServiceListCloudSpaceAppsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - - // only one success response has to be checked - success, ok := result.(*CloudSpaceServiceListCloudSpaceAppsOK) - if ok { - return success, nil - } - - // unexpected success response. - // - // a default response is provided: fill this and return an error - unexpectedSuccess := result.(*CloudSpaceServiceListCloudSpaceAppsDefault) - - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* CloudSpaceServiceListCloudSpaceColdStartMetrics cloud space service list cloud space cold start metrics API */ @@ -3518,48 +3208,6 @@ func (a *Client) CloudSpaceServiceUpdateCloudSpace(params *CloudSpaceServiceUpda return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -CloudSpaceServiceUpdateCloudSpaceApp cloud space service update cloud space app API -*/ -func (a *Client) CloudSpaceServiceUpdateCloudSpaceApp(params *CloudSpaceServiceUpdateCloudSpaceAppParams, opts ...ClientOption) (*CloudSpaceServiceUpdateCloudSpaceAppOK, error) { - // NOTE: parameters are not validated before sending - if params == nil { - params = NewCloudSpaceServiceUpdateCloudSpaceAppParams() - } - op := &runtime.ClientOperation{ - ID: "CloudSpaceService_UpdateCloudSpaceApp", - Method: "PUT", - PathPattern: "/v1/cloudspaces/apps/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloudSpaceServiceUpdateCloudSpaceAppReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - - // only one success response has to be checked - success, ok := result.(*CloudSpaceServiceUpdateCloudSpaceAppOK) - if ok { - return success, nil - } - - // unexpected success response. - // - // a default response is provided: fill this and return an error - unexpectedSuccess := result.(*CloudSpaceServiceUpdateCloudSpaceAppDefault) - - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* CloudSpaceServiceUpdateCloudSpaceCollab cloud space service update cloud space collab API */ diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_cloud_space_app_instance_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_cloud_space_app_instance_parameters.go deleted file mode 100644 index 831672f8f..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_cloud_space_app_instance_parameters.go +++ /dev/null @@ -1,220 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" -) - -// NewCloudSpaceServiceCreateCloudSpaceAppInstanceParams creates a new CloudSpaceServiceCreateCloudSpaceAppInstanceParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCloudSpaceServiceCreateCloudSpaceAppInstanceParams() *CloudSpaceServiceCreateCloudSpaceAppInstanceParams { - return &CloudSpaceServiceCreateCloudSpaceAppInstanceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloudSpaceServiceCreateCloudSpaceAppInstanceParamsWithTimeout creates a new CloudSpaceServiceCreateCloudSpaceAppInstanceParams object -// with the ability to set a timeout on a request. -func NewCloudSpaceServiceCreateCloudSpaceAppInstanceParamsWithTimeout(timeout time.Duration) *CloudSpaceServiceCreateCloudSpaceAppInstanceParams { - return &CloudSpaceServiceCreateCloudSpaceAppInstanceParams{ - timeout: timeout, - } -} - -// NewCloudSpaceServiceCreateCloudSpaceAppInstanceParamsWithContext creates a new CloudSpaceServiceCreateCloudSpaceAppInstanceParams object -// with the ability to set a context for a request. -func NewCloudSpaceServiceCreateCloudSpaceAppInstanceParamsWithContext(ctx context.Context) *CloudSpaceServiceCreateCloudSpaceAppInstanceParams { - return &CloudSpaceServiceCreateCloudSpaceAppInstanceParams{ - Context: ctx, - } -} - -// NewCloudSpaceServiceCreateCloudSpaceAppInstanceParamsWithHTTPClient creates a new CloudSpaceServiceCreateCloudSpaceAppInstanceParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloudSpaceServiceCreateCloudSpaceAppInstanceParamsWithHTTPClient(client *http.Client) *CloudSpaceServiceCreateCloudSpaceAppInstanceParams { - return &CloudSpaceServiceCreateCloudSpaceAppInstanceParams{ - HTTPClient: client, - } -} - -/* -CloudSpaceServiceCreateCloudSpaceAppInstanceParams contains all the parameters to send to the API endpoint - - for the cloud space service create cloud space app instance operation. - - Typically these are written to a http.Request. -*/ -type CloudSpaceServiceCreateCloudSpaceAppInstanceParams struct { - - // Body. - Body *models.CloudSpaceServiceCreateCloudSpaceAppInstanceBody - - /* CloudspaceID. - - the cloudspace ID the cloudspace app should be run in. - */ - CloudspaceID string - - /* ID. - - the ID of the cloudspace app to run. - */ - ID string - - /* ProjectID. - - the project ID the cloudspace lives in. - */ - ProjectID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cloud space service create cloud space app instance params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) WithDefaults() *CloudSpaceServiceCreateCloudSpaceAppInstanceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cloud space service create cloud space app instance params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) WithTimeout(timeout time.Duration) *CloudSpaceServiceCreateCloudSpaceAppInstanceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) WithContext(ctx context.Context) *CloudSpaceServiceCreateCloudSpaceAppInstanceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) WithHTTPClient(client *http.Client) *CloudSpaceServiceCreateCloudSpaceAppInstanceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) WithBody(body *models.CloudSpaceServiceCreateCloudSpaceAppInstanceBody) *CloudSpaceServiceCreateCloudSpaceAppInstanceParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) SetBody(body *models.CloudSpaceServiceCreateCloudSpaceAppInstanceBody) { - o.Body = body -} - -// WithCloudspaceID adds the cloudspaceID to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) WithCloudspaceID(cloudspaceID string) *CloudSpaceServiceCreateCloudSpaceAppInstanceParams { - o.SetCloudspaceID(cloudspaceID) - return o -} - -// SetCloudspaceID adds the cloudspaceId to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) SetCloudspaceID(cloudspaceID string) { - o.CloudspaceID = cloudspaceID -} - -// WithID adds the id to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) WithID(id string) *CloudSpaceServiceCreateCloudSpaceAppInstanceParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) SetID(id string) { - o.ID = id -} - -// WithProjectID adds the projectID to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) WithProjectID(projectID string) *CloudSpaceServiceCreateCloudSpaceAppInstanceParams { - o.SetProjectID(projectID) - return o -} - -// SetProjectID adds the projectId to the cloud space service create cloud space app instance params -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) SetProjectID(projectID string) { - o.ProjectID = projectID -} - -// WriteToRequest writes these params to a swagger request -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - // path param cloudspaceId - if err := r.SetPathParam("cloudspaceId", o.CloudspaceID); err != nil { - return err - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param projectId - if err := r.SetPathParam("projectId", o.ProjectID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_cloud_space_app_instance_responses.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_cloud_space_app_instance_responses.go deleted file mode 100644 index 5c53660f6..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_cloud_space_app_instance_responses.go +++ /dev/null @@ -1,192 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - stderrors "errors" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" -) - -// CloudSpaceServiceCreateCloudSpaceAppInstanceReader is a Reader for the CloudSpaceServiceCreateCloudSpaceAppInstance structure. -type CloudSpaceServiceCreateCloudSpaceAppInstanceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { - switch response.Code() { - case 200: - result := NewCloudSpaceServiceCreateCloudSpaceAppInstanceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloudSpaceServiceCreateCloudSpaceAppInstanceDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCloudSpaceServiceCreateCloudSpaceAppInstanceOK creates a CloudSpaceServiceCreateCloudSpaceAppInstanceOK with default headers values -func NewCloudSpaceServiceCreateCloudSpaceAppInstanceOK() *CloudSpaceServiceCreateCloudSpaceAppInstanceOK { - return &CloudSpaceServiceCreateCloudSpaceAppInstanceOK{} -} - -/* -CloudSpaceServiceCreateCloudSpaceAppInstanceOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type CloudSpaceServiceCreateCloudSpaceAppInstanceOK struct { - Payload *models.V1CreateCloudSpaceAppInstanceResponse -} - -// IsSuccess returns true when this cloud space service create cloud space app instance o k response has a 2xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cloud space service create cloud space app instance o k response has a 3xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cloud space service create cloud space app instance o k response has a 4xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this cloud space service create cloud space app instance o k response has a 5xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceOK) IsServerError() bool { - return false -} - -// IsCode returns true when this cloud space service create cloud space app instance o k response a status code equal to that given -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the cloud space service create cloud space app instance o k response -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceOK) Code() int { - return 200 -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/projects/{projectId}/cloudspaces/{cloudspaceId}/apps/{id}][%d] cloudSpaceServiceCreateCloudSpaceAppInstanceOK %s", 200, payload) -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/projects/{projectId}/cloudspaces/{cloudspaceId}/apps/{id}][%d] cloudSpaceServiceCreateCloudSpaceAppInstanceOK %s", 200, payload) -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceOK) GetPayload() *models.V1CreateCloudSpaceAppInstanceResponse { - return o.Payload -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.V1CreateCloudSpaceAppInstanceResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} - -// NewCloudSpaceServiceCreateCloudSpaceAppInstanceDefault creates a CloudSpaceServiceCreateCloudSpaceAppInstanceDefault with default headers values -func NewCloudSpaceServiceCreateCloudSpaceAppInstanceDefault(code int) *CloudSpaceServiceCreateCloudSpaceAppInstanceDefault { - return &CloudSpaceServiceCreateCloudSpaceAppInstanceDefault{ - _statusCode: code, - } -} - -/* -CloudSpaceServiceCreateCloudSpaceAppInstanceDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type CloudSpaceServiceCreateCloudSpaceAppInstanceDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this cloud space service create cloud space app instance default response has a 2xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cloud space service create cloud space app instance default response has a 3xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cloud space service create cloud space app instance default response has a 4xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cloud space service create cloud space app instance default response has a 5xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cloud space service create cloud space app instance default response a status code equal to that given -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cloud space service create cloud space app instance default response -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceDefault) Code() int { - return o._statusCode -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/projects/{projectId}/cloudspaces/{cloudspaceId}/apps/{id}][%d] CloudSpaceService_CreateCloudSpaceAppInstance default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/projects/{projectId}/cloudspaces/{cloudspaceId}/apps/{id}][%d] CloudSpaceService_CreateCloudSpaceAppInstance default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppInstanceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_cloud_space_app_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_cloud_space_app_parameters.go deleted file mode 100644 index 5eab8cf83..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_cloud_space_app_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" -) - -// NewCloudSpaceServiceCreateCloudSpaceAppParams creates a new CloudSpaceServiceCreateCloudSpaceAppParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCloudSpaceServiceCreateCloudSpaceAppParams() *CloudSpaceServiceCreateCloudSpaceAppParams { - return &CloudSpaceServiceCreateCloudSpaceAppParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloudSpaceServiceCreateCloudSpaceAppParamsWithTimeout creates a new CloudSpaceServiceCreateCloudSpaceAppParams object -// with the ability to set a timeout on a request. -func NewCloudSpaceServiceCreateCloudSpaceAppParamsWithTimeout(timeout time.Duration) *CloudSpaceServiceCreateCloudSpaceAppParams { - return &CloudSpaceServiceCreateCloudSpaceAppParams{ - timeout: timeout, - } -} - -// NewCloudSpaceServiceCreateCloudSpaceAppParamsWithContext creates a new CloudSpaceServiceCreateCloudSpaceAppParams object -// with the ability to set a context for a request. -func NewCloudSpaceServiceCreateCloudSpaceAppParamsWithContext(ctx context.Context) *CloudSpaceServiceCreateCloudSpaceAppParams { - return &CloudSpaceServiceCreateCloudSpaceAppParams{ - Context: ctx, - } -} - -// NewCloudSpaceServiceCreateCloudSpaceAppParamsWithHTTPClient creates a new CloudSpaceServiceCreateCloudSpaceAppParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloudSpaceServiceCreateCloudSpaceAppParamsWithHTTPClient(client *http.Client) *CloudSpaceServiceCreateCloudSpaceAppParams { - return &CloudSpaceServiceCreateCloudSpaceAppParams{ - HTTPClient: client, - } -} - -/* -CloudSpaceServiceCreateCloudSpaceAppParams contains all the parameters to send to the API endpoint - - for the cloud space service create cloud space app operation. - - Typically these are written to a http.Request. -*/ -type CloudSpaceServiceCreateCloudSpaceAppParams struct { - - // Body. - Body *models.V1CloudSpaceApp - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cloud space service create cloud space app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceCreateCloudSpaceAppParams) WithDefaults() *CloudSpaceServiceCreateCloudSpaceAppParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cloud space service create cloud space app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceCreateCloudSpaceAppParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cloud space service create cloud space app params -func (o *CloudSpaceServiceCreateCloudSpaceAppParams) WithTimeout(timeout time.Duration) *CloudSpaceServiceCreateCloudSpaceAppParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cloud space service create cloud space app params -func (o *CloudSpaceServiceCreateCloudSpaceAppParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cloud space service create cloud space app params -func (o *CloudSpaceServiceCreateCloudSpaceAppParams) WithContext(ctx context.Context) *CloudSpaceServiceCreateCloudSpaceAppParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cloud space service create cloud space app params -func (o *CloudSpaceServiceCreateCloudSpaceAppParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cloud space service create cloud space app params -func (o *CloudSpaceServiceCreateCloudSpaceAppParams) WithHTTPClient(client *http.Client) *CloudSpaceServiceCreateCloudSpaceAppParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cloud space service create cloud space app params -func (o *CloudSpaceServiceCreateCloudSpaceAppParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the cloud space service create cloud space app params -func (o *CloudSpaceServiceCreateCloudSpaceAppParams) WithBody(body *models.V1CloudSpaceApp) *CloudSpaceServiceCreateCloudSpaceAppParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the cloud space service create cloud space app params -func (o *CloudSpaceServiceCreateCloudSpaceAppParams) SetBody(body *models.V1CloudSpaceApp) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CloudSpaceServiceCreateCloudSpaceAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_cloud_space_app_responses.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_cloud_space_app_responses.go deleted file mode 100644 index f4c4e4bda..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_cloud_space_app_responses.go +++ /dev/null @@ -1,192 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - stderrors "errors" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" -) - -// CloudSpaceServiceCreateCloudSpaceAppReader is a Reader for the CloudSpaceServiceCreateCloudSpaceApp structure. -type CloudSpaceServiceCreateCloudSpaceAppReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloudSpaceServiceCreateCloudSpaceAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { - switch response.Code() { - case 200: - result := NewCloudSpaceServiceCreateCloudSpaceAppOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloudSpaceServiceCreateCloudSpaceAppDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCloudSpaceServiceCreateCloudSpaceAppOK creates a CloudSpaceServiceCreateCloudSpaceAppOK with default headers values -func NewCloudSpaceServiceCreateCloudSpaceAppOK() *CloudSpaceServiceCreateCloudSpaceAppOK { - return &CloudSpaceServiceCreateCloudSpaceAppOK{} -} - -/* -CloudSpaceServiceCreateCloudSpaceAppOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type CloudSpaceServiceCreateCloudSpaceAppOK struct { - Payload *models.V1CloudSpaceApp -} - -// IsSuccess returns true when this cloud space service create cloud space app o k response has a 2xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cloud space service create cloud space app o k response has a 3xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cloud space service create cloud space app o k response has a 4xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this cloud space service create cloud space app o k response has a 5xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppOK) IsServerError() bool { - return false -} - -// IsCode returns true when this cloud space service create cloud space app o k response a status code equal to that given -func (o *CloudSpaceServiceCreateCloudSpaceAppOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the cloud space service create cloud space app o k response -func (o *CloudSpaceServiceCreateCloudSpaceAppOK) Code() int { - return 200 -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/cloudspaces/apps][%d] cloudSpaceServiceCreateCloudSpaceAppOK %s", 200, payload) -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/cloudspaces/apps][%d] cloudSpaceServiceCreateCloudSpaceAppOK %s", 200, payload) -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppOK) GetPayload() *models.V1CloudSpaceApp { - return o.Payload -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.V1CloudSpaceApp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} - -// NewCloudSpaceServiceCreateCloudSpaceAppDefault creates a CloudSpaceServiceCreateCloudSpaceAppDefault with default headers values -func NewCloudSpaceServiceCreateCloudSpaceAppDefault(code int) *CloudSpaceServiceCreateCloudSpaceAppDefault { - return &CloudSpaceServiceCreateCloudSpaceAppDefault{ - _statusCode: code, - } -} - -/* -CloudSpaceServiceCreateCloudSpaceAppDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type CloudSpaceServiceCreateCloudSpaceAppDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this cloud space service create cloud space app default response has a 2xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cloud space service create cloud space app default response has a 3xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cloud space service create cloud space app default response has a 4xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cloud space service create cloud space app default response has a 5xx status code -func (o *CloudSpaceServiceCreateCloudSpaceAppDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cloud space service create cloud space app default response a status code equal to that given -func (o *CloudSpaceServiceCreateCloudSpaceAppDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cloud space service create cloud space app default response -func (o *CloudSpaceServiceCreateCloudSpaceAppDefault) Code() int { - return o._statusCode -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/cloudspaces/apps][%d] CloudSpaceService_CreateCloudSpaceApp default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/cloudspaces/apps][%d] CloudSpaceService_CreateCloudSpaceApp default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *CloudSpaceServiceCreateCloudSpaceAppDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_lightning_run_instance_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_lightning_run_instance_parameters.go deleted file mode 100644 index f9c0e79c1..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_lightning_run_instance_parameters.go +++ /dev/null @@ -1,211 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" -) - -// NewCloudSpaceServiceCreateLightningRunInstanceParams creates a new CloudSpaceServiceCreateLightningRunInstanceParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCloudSpaceServiceCreateLightningRunInstanceParams() *CloudSpaceServiceCreateLightningRunInstanceParams { - return &CloudSpaceServiceCreateLightningRunInstanceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloudSpaceServiceCreateLightningRunInstanceParamsWithTimeout creates a new CloudSpaceServiceCreateLightningRunInstanceParams object -// with the ability to set a timeout on a request. -func NewCloudSpaceServiceCreateLightningRunInstanceParamsWithTimeout(timeout time.Duration) *CloudSpaceServiceCreateLightningRunInstanceParams { - return &CloudSpaceServiceCreateLightningRunInstanceParams{ - timeout: timeout, - } -} - -// NewCloudSpaceServiceCreateLightningRunInstanceParamsWithContext creates a new CloudSpaceServiceCreateLightningRunInstanceParams object -// with the ability to set a context for a request. -func NewCloudSpaceServiceCreateLightningRunInstanceParamsWithContext(ctx context.Context) *CloudSpaceServiceCreateLightningRunInstanceParams { - return &CloudSpaceServiceCreateLightningRunInstanceParams{ - Context: ctx, - } -} - -// NewCloudSpaceServiceCreateLightningRunInstanceParamsWithHTTPClient creates a new CloudSpaceServiceCreateLightningRunInstanceParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloudSpaceServiceCreateLightningRunInstanceParamsWithHTTPClient(client *http.Client) *CloudSpaceServiceCreateLightningRunInstanceParams { - return &CloudSpaceServiceCreateLightningRunInstanceParams{ - HTTPClient: client, - } -} - -/* -CloudSpaceServiceCreateLightningRunInstanceParams contains all the parameters to send to the API endpoint - - for the cloud space service create lightning run instance operation. - - Typically these are written to a http.Request. -*/ -type CloudSpaceServiceCreateLightningRunInstanceParams struct { - - // Body. - Body *models.CloudSpaceServiceCreateLightningRunInstanceBody - - // CloudspaceID. - CloudspaceID string - - // ID. - ID string - - // ProjectID. - ProjectID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cloud space service create lightning run instance params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) WithDefaults() *CloudSpaceServiceCreateLightningRunInstanceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cloud space service create lightning run instance params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) WithTimeout(timeout time.Duration) *CloudSpaceServiceCreateLightningRunInstanceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) WithContext(ctx context.Context) *CloudSpaceServiceCreateLightningRunInstanceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) WithHTTPClient(client *http.Client) *CloudSpaceServiceCreateLightningRunInstanceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) WithBody(body *models.CloudSpaceServiceCreateLightningRunInstanceBody) *CloudSpaceServiceCreateLightningRunInstanceParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) SetBody(body *models.CloudSpaceServiceCreateLightningRunInstanceBody) { - o.Body = body -} - -// WithCloudspaceID adds the cloudspaceID to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) WithCloudspaceID(cloudspaceID string) *CloudSpaceServiceCreateLightningRunInstanceParams { - o.SetCloudspaceID(cloudspaceID) - return o -} - -// SetCloudspaceID adds the cloudspaceId to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) SetCloudspaceID(cloudspaceID string) { - o.CloudspaceID = cloudspaceID -} - -// WithID adds the id to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) WithID(id string) *CloudSpaceServiceCreateLightningRunInstanceParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) SetID(id string) { - o.ID = id -} - -// WithProjectID adds the projectID to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) WithProjectID(projectID string) *CloudSpaceServiceCreateLightningRunInstanceParams { - o.SetProjectID(projectID) - return o -} - -// SetProjectID adds the projectId to the cloud space service create lightning run instance params -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) SetProjectID(projectID string) { - o.ProjectID = projectID -} - -// WriteToRequest writes these params to a swagger request -func (o *CloudSpaceServiceCreateLightningRunInstanceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - // path param cloudspaceId - if err := r.SetPathParam("cloudspaceId", o.CloudspaceID); err != nil { - return err - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param projectId - if err := r.SetPathParam("projectId", o.ProjectID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_lightning_run_instance_responses.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_lightning_run_instance_responses.go deleted file mode 100644 index 2e918dcca..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_create_lightning_run_instance_responses.go +++ /dev/null @@ -1,192 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - stderrors "errors" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" -) - -// CloudSpaceServiceCreateLightningRunInstanceReader is a Reader for the CloudSpaceServiceCreateLightningRunInstance structure. -type CloudSpaceServiceCreateLightningRunInstanceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloudSpaceServiceCreateLightningRunInstanceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { - switch response.Code() { - case 200: - result := NewCloudSpaceServiceCreateLightningRunInstanceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloudSpaceServiceCreateLightningRunInstanceDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCloudSpaceServiceCreateLightningRunInstanceOK creates a CloudSpaceServiceCreateLightningRunInstanceOK with default headers values -func NewCloudSpaceServiceCreateLightningRunInstanceOK() *CloudSpaceServiceCreateLightningRunInstanceOK { - return &CloudSpaceServiceCreateLightningRunInstanceOK{} -} - -/* -CloudSpaceServiceCreateLightningRunInstanceOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type CloudSpaceServiceCreateLightningRunInstanceOK struct { - Payload *models.Externalv1LightningappInstance -} - -// IsSuccess returns true when this cloud space service create lightning run instance o k response has a 2xx status code -func (o *CloudSpaceServiceCreateLightningRunInstanceOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cloud space service create lightning run instance o k response has a 3xx status code -func (o *CloudSpaceServiceCreateLightningRunInstanceOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cloud space service create lightning run instance o k response has a 4xx status code -func (o *CloudSpaceServiceCreateLightningRunInstanceOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this cloud space service create lightning run instance o k response has a 5xx status code -func (o *CloudSpaceServiceCreateLightningRunInstanceOK) IsServerError() bool { - return false -} - -// IsCode returns true when this cloud space service create lightning run instance o k response a status code equal to that given -func (o *CloudSpaceServiceCreateLightningRunInstanceOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the cloud space service create lightning run instance o k response -func (o *CloudSpaceServiceCreateLightningRunInstanceOK) Code() int { - return 200 -} - -func (o *CloudSpaceServiceCreateLightningRunInstanceOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/projects/{projectId}/cloudspaces/{cloudspaceId}/runs/{id}/get][%d] cloudSpaceServiceCreateLightningRunInstanceOK %s", 200, payload) -} - -func (o *CloudSpaceServiceCreateLightningRunInstanceOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/projects/{projectId}/cloudspaces/{cloudspaceId}/runs/{id}/get][%d] cloudSpaceServiceCreateLightningRunInstanceOK %s", 200, payload) -} - -func (o *CloudSpaceServiceCreateLightningRunInstanceOK) GetPayload() *models.Externalv1LightningappInstance { - return o.Payload -} - -func (o *CloudSpaceServiceCreateLightningRunInstanceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Externalv1LightningappInstance) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} - -// NewCloudSpaceServiceCreateLightningRunInstanceDefault creates a CloudSpaceServiceCreateLightningRunInstanceDefault with default headers values -func NewCloudSpaceServiceCreateLightningRunInstanceDefault(code int) *CloudSpaceServiceCreateLightningRunInstanceDefault { - return &CloudSpaceServiceCreateLightningRunInstanceDefault{ - _statusCode: code, - } -} - -/* -CloudSpaceServiceCreateLightningRunInstanceDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type CloudSpaceServiceCreateLightningRunInstanceDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this cloud space service create lightning run instance default response has a 2xx status code -func (o *CloudSpaceServiceCreateLightningRunInstanceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cloud space service create lightning run instance default response has a 3xx status code -func (o *CloudSpaceServiceCreateLightningRunInstanceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cloud space service create lightning run instance default response has a 4xx status code -func (o *CloudSpaceServiceCreateLightningRunInstanceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cloud space service create lightning run instance default response has a 5xx status code -func (o *CloudSpaceServiceCreateLightningRunInstanceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cloud space service create lightning run instance default response a status code equal to that given -func (o *CloudSpaceServiceCreateLightningRunInstanceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cloud space service create lightning run instance default response -func (o *CloudSpaceServiceCreateLightningRunInstanceDefault) Code() int { - return o._statusCode -} - -func (o *CloudSpaceServiceCreateLightningRunInstanceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/projects/{projectId}/cloudspaces/{cloudspaceId}/runs/{id}/get][%d] CloudSpaceService_CreateLightningRunInstance default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceCreateLightningRunInstanceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/projects/{projectId}/cloudspaces/{cloudspaceId}/runs/{id}/get][%d] CloudSpaceService_CreateLightningRunInstance default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceCreateLightningRunInstanceDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *CloudSpaceServiceCreateLightningRunInstanceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_delete_cloud_space_app_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_delete_cloud_space_app_parameters.go deleted file mode 100644 index d66c02799..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_delete_cloud_space_app_parameters.go +++ /dev/null @@ -1,152 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewCloudSpaceServiceDeleteCloudSpaceAppParams creates a new CloudSpaceServiceDeleteCloudSpaceAppParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCloudSpaceServiceDeleteCloudSpaceAppParams() *CloudSpaceServiceDeleteCloudSpaceAppParams { - return &CloudSpaceServiceDeleteCloudSpaceAppParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloudSpaceServiceDeleteCloudSpaceAppParamsWithTimeout creates a new CloudSpaceServiceDeleteCloudSpaceAppParams object -// with the ability to set a timeout on a request. -func NewCloudSpaceServiceDeleteCloudSpaceAppParamsWithTimeout(timeout time.Duration) *CloudSpaceServiceDeleteCloudSpaceAppParams { - return &CloudSpaceServiceDeleteCloudSpaceAppParams{ - timeout: timeout, - } -} - -// NewCloudSpaceServiceDeleteCloudSpaceAppParamsWithContext creates a new CloudSpaceServiceDeleteCloudSpaceAppParams object -// with the ability to set a context for a request. -func NewCloudSpaceServiceDeleteCloudSpaceAppParamsWithContext(ctx context.Context) *CloudSpaceServiceDeleteCloudSpaceAppParams { - return &CloudSpaceServiceDeleteCloudSpaceAppParams{ - Context: ctx, - } -} - -// NewCloudSpaceServiceDeleteCloudSpaceAppParamsWithHTTPClient creates a new CloudSpaceServiceDeleteCloudSpaceAppParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloudSpaceServiceDeleteCloudSpaceAppParamsWithHTTPClient(client *http.Client) *CloudSpaceServiceDeleteCloudSpaceAppParams { - return &CloudSpaceServiceDeleteCloudSpaceAppParams{ - HTTPClient: client, - } -} - -/* -CloudSpaceServiceDeleteCloudSpaceAppParams contains all the parameters to send to the API endpoint - - for the cloud space service delete cloud space app operation. - - Typically these are written to a http.Request. -*/ -type CloudSpaceServiceDeleteCloudSpaceAppParams struct { - - // ID. - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cloud space service delete cloud space app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceDeleteCloudSpaceAppParams) WithDefaults() *CloudSpaceServiceDeleteCloudSpaceAppParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cloud space service delete cloud space app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceDeleteCloudSpaceAppParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cloud space service delete cloud space app params -func (o *CloudSpaceServiceDeleteCloudSpaceAppParams) WithTimeout(timeout time.Duration) *CloudSpaceServiceDeleteCloudSpaceAppParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cloud space service delete cloud space app params -func (o *CloudSpaceServiceDeleteCloudSpaceAppParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cloud space service delete cloud space app params -func (o *CloudSpaceServiceDeleteCloudSpaceAppParams) WithContext(ctx context.Context) *CloudSpaceServiceDeleteCloudSpaceAppParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cloud space service delete cloud space app params -func (o *CloudSpaceServiceDeleteCloudSpaceAppParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cloud space service delete cloud space app params -func (o *CloudSpaceServiceDeleteCloudSpaceAppParams) WithHTTPClient(client *http.Client) *CloudSpaceServiceDeleteCloudSpaceAppParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cloud space service delete cloud space app params -func (o *CloudSpaceServiceDeleteCloudSpaceAppParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the cloud space service delete cloud space app params -func (o *CloudSpaceServiceDeleteCloudSpaceAppParams) WithID(id string) *CloudSpaceServiceDeleteCloudSpaceAppParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cloud space service delete cloud space app params -func (o *CloudSpaceServiceDeleteCloudSpaceAppParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CloudSpaceServiceDeleteCloudSpaceAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_delete_cloud_space_app_responses.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_delete_cloud_space_app_responses.go deleted file mode 100644 index bee17408d..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_delete_cloud_space_app_responses.go +++ /dev/null @@ -1,190 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - stderrors "errors" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" -) - -// CloudSpaceServiceDeleteCloudSpaceAppReader is a Reader for the CloudSpaceServiceDeleteCloudSpaceApp structure. -type CloudSpaceServiceDeleteCloudSpaceAppReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloudSpaceServiceDeleteCloudSpaceAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { - switch response.Code() { - case 200: - result := NewCloudSpaceServiceDeleteCloudSpaceAppOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloudSpaceServiceDeleteCloudSpaceAppDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCloudSpaceServiceDeleteCloudSpaceAppOK creates a CloudSpaceServiceDeleteCloudSpaceAppOK with default headers values -func NewCloudSpaceServiceDeleteCloudSpaceAppOK() *CloudSpaceServiceDeleteCloudSpaceAppOK { - return &CloudSpaceServiceDeleteCloudSpaceAppOK{} -} - -/* -CloudSpaceServiceDeleteCloudSpaceAppOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type CloudSpaceServiceDeleteCloudSpaceAppOK struct { - Payload models.V1DeleteCloudSpaceAppResponse -} - -// IsSuccess returns true when this cloud space service delete cloud space app o k response has a 2xx status code -func (o *CloudSpaceServiceDeleteCloudSpaceAppOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cloud space service delete cloud space app o k response has a 3xx status code -func (o *CloudSpaceServiceDeleteCloudSpaceAppOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cloud space service delete cloud space app o k response has a 4xx status code -func (o *CloudSpaceServiceDeleteCloudSpaceAppOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this cloud space service delete cloud space app o k response has a 5xx status code -func (o *CloudSpaceServiceDeleteCloudSpaceAppOK) IsServerError() bool { - return false -} - -// IsCode returns true when this cloud space service delete cloud space app o k response a status code equal to that given -func (o *CloudSpaceServiceDeleteCloudSpaceAppOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the cloud space service delete cloud space app o k response -func (o *CloudSpaceServiceDeleteCloudSpaceAppOK) Code() int { - return 200 -} - -func (o *CloudSpaceServiceDeleteCloudSpaceAppOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/cloudspaces/apps/{id}][%d] cloudSpaceServiceDeleteCloudSpaceAppOK %s", 200, payload) -} - -func (o *CloudSpaceServiceDeleteCloudSpaceAppOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/cloudspaces/apps/{id}][%d] cloudSpaceServiceDeleteCloudSpaceAppOK %s", 200, payload) -} - -func (o *CloudSpaceServiceDeleteCloudSpaceAppOK) GetPayload() models.V1DeleteCloudSpaceAppResponse { - return o.Payload -} - -func (o *CloudSpaceServiceDeleteCloudSpaceAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} - -// NewCloudSpaceServiceDeleteCloudSpaceAppDefault creates a CloudSpaceServiceDeleteCloudSpaceAppDefault with default headers values -func NewCloudSpaceServiceDeleteCloudSpaceAppDefault(code int) *CloudSpaceServiceDeleteCloudSpaceAppDefault { - return &CloudSpaceServiceDeleteCloudSpaceAppDefault{ - _statusCode: code, - } -} - -/* -CloudSpaceServiceDeleteCloudSpaceAppDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type CloudSpaceServiceDeleteCloudSpaceAppDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this cloud space service delete cloud space app default response has a 2xx status code -func (o *CloudSpaceServiceDeleteCloudSpaceAppDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cloud space service delete cloud space app default response has a 3xx status code -func (o *CloudSpaceServiceDeleteCloudSpaceAppDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cloud space service delete cloud space app default response has a 4xx status code -func (o *CloudSpaceServiceDeleteCloudSpaceAppDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cloud space service delete cloud space app default response has a 5xx status code -func (o *CloudSpaceServiceDeleteCloudSpaceAppDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cloud space service delete cloud space app default response a status code equal to that given -func (o *CloudSpaceServiceDeleteCloudSpaceAppDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cloud space service delete cloud space app default response -func (o *CloudSpaceServiceDeleteCloudSpaceAppDefault) Code() int { - return o._statusCode -} - -func (o *CloudSpaceServiceDeleteCloudSpaceAppDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/cloudspaces/apps/{id}][%d] CloudSpaceService_DeleteCloudSpaceApp default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceDeleteCloudSpaceAppDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /v1/cloudspaces/apps/{id}][%d] CloudSpaceService_DeleteCloudSpaceApp default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceDeleteCloudSpaceAppDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *CloudSpaceServiceDeleteCloudSpaceAppDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_fork_cloud_space_app_instance_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_fork_cloud_space_app_instance_parameters.go deleted file mode 100644 index 87ee0293f..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_fork_cloud_space_app_instance_parameters.go +++ /dev/null @@ -1,211 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" -) - -// NewCloudSpaceServiceForkCloudSpaceAppInstanceParams creates a new CloudSpaceServiceForkCloudSpaceAppInstanceParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCloudSpaceServiceForkCloudSpaceAppInstanceParams() *CloudSpaceServiceForkCloudSpaceAppInstanceParams { - return &CloudSpaceServiceForkCloudSpaceAppInstanceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloudSpaceServiceForkCloudSpaceAppInstanceParamsWithTimeout creates a new CloudSpaceServiceForkCloudSpaceAppInstanceParams object -// with the ability to set a timeout on a request. -func NewCloudSpaceServiceForkCloudSpaceAppInstanceParamsWithTimeout(timeout time.Duration) *CloudSpaceServiceForkCloudSpaceAppInstanceParams { - return &CloudSpaceServiceForkCloudSpaceAppInstanceParams{ - timeout: timeout, - } -} - -// NewCloudSpaceServiceForkCloudSpaceAppInstanceParamsWithContext creates a new CloudSpaceServiceForkCloudSpaceAppInstanceParams object -// with the ability to set a context for a request. -func NewCloudSpaceServiceForkCloudSpaceAppInstanceParamsWithContext(ctx context.Context) *CloudSpaceServiceForkCloudSpaceAppInstanceParams { - return &CloudSpaceServiceForkCloudSpaceAppInstanceParams{ - Context: ctx, - } -} - -// NewCloudSpaceServiceForkCloudSpaceAppInstanceParamsWithHTTPClient creates a new CloudSpaceServiceForkCloudSpaceAppInstanceParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloudSpaceServiceForkCloudSpaceAppInstanceParamsWithHTTPClient(client *http.Client) *CloudSpaceServiceForkCloudSpaceAppInstanceParams { - return &CloudSpaceServiceForkCloudSpaceAppInstanceParams{ - HTTPClient: client, - } -} - -/* -CloudSpaceServiceForkCloudSpaceAppInstanceParams contains all the parameters to send to the API endpoint - - for the cloud space service fork cloud space app instance operation. - - Typically these are written to a http.Request. -*/ -type CloudSpaceServiceForkCloudSpaceAppInstanceParams struct { - - // Body. - Body *models.CloudSpaceServiceForkCloudSpaceAppInstanceBody - - // CloudspaceID. - CloudspaceID string - - // ID. - ID string - - // ProjectID. - ProjectID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cloud space service fork cloud space app instance params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) WithDefaults() *CloudSpaceServiceForkCloudSpaceAppInstanceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cloud space service fork cloud space app instance params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) WithTimeout(timeout time.Duration) *CloudSpaceServiceForkCloudSpaceAppInstanceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) WithContext(ctx context.Context) *CloudSpaceServiceForkCloudSpaceAppInstanceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) WithHTTPClient(client *http.Client) *CloudSpaceServiceForkCloudSpaceAppInstanceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) WithBody(body *models.CloudSpaceServiceForkCloudSpaceAppInstanceBody) *CloudSpaceServiceForkCloudSpaceAppInstanceParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) SetBody(body *models.CloudSpaceServiceForkCloudSpaceAppInstanceBody) { - o.Body = body -} - -// WithCloudspaceID adds the cloudspaceID to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) WithCloudspaceID(cloudspaceID string) *CloudSpaceServiceForkCloudSpaceAppInstanceParams { - o.SetCloudspaceID(cloudspaceID) - return o -} - -// SetCloudspaceID adds the cloudspaceId to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) SetCloudspaceID(cloudspaceID string) { - o.CloudspaceID = cloudspaceID -} - -// WithID adds the id to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) WithID(id string) *CloudSpaceServiceForkCloudSpaceAppInstanceParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) SetID(id string) { - o.ID = id -} - -// WithProjectID adds the projectID to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) WithProjectID(projectID string) *CloudSpaceServiceForkCloudSpaceAppInstanceParams { - o.SetProjectID(projectID) - return o -} - -// SetProjectID adds the projectId to the cloud space service fork cloud space app instance params -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) SetProjectID(projectID string) { - o.ProjectID = projectID -} - -// WriteToRequest writes these params to a swagger request -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - // path param cloudspaceId - if err := r.SetPathParam("cloudspaceId", o.CloudspaceID); err != nil { - return err - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param projectId - if err := r.SetPathParam("projectId", o.ProjectID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_fork_cloud_space_app_instance_responses.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_fork_cloud_space_app_instance_responses.go deleted file mode 100644 index 37b15fc6a..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_fork_cloud_space_app_instance_responses.go +++ /dev/null @@ -1,192 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - stderrors "errors" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" -) - -// CloudSpaceServiceForkCloudSpaceAppInstanceReader is a Reader for the CloudSpaceServiceForkCloudSpaceAppInstance structure. -type CloudSpaceServiceForkCloudSpaceAppInstanceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { - switch response.Code() { - case 200: - result := NewCloudSpaceServiceForkCloudSpaceAppInstanceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloudSpaceServiceForkCloudSpaceAppInstanceDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCloudSpaceServiceForkCloudSpaceAppInstanceOK creates a CloudSpaceServiceForkCloudSpaceAppInstanceOK with default headers values -func NewCloudSpaceServiceForkCloudSpaceAppInstanceOK() *CloudSpaceServiceForkCloudSpaceAppInstanceOK { - return &CloudSpaceServiceForkCloudSpaceAppInstanceOK{} -} - -/* -CloudSpaceServiceForkCloudSpaceAppInstanceOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type CloudSpaceServiceForkCloudSpaceAppInstanceOK struct { - Payload *models.Externalv1LightningappInstance -} - -// IsSuccess returns true when this cloud space service fork cloud space app instance o k response has a 2xx status code -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cloud space service fork cloud space app instance o k response has a 3xx status code -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cloud space service fork cloud space app instance o k response has a 4xx status code -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this cloud space service fork cloud space app instance o k response has a 5xx status code -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceOK) IsServerError() bool { - return false -} - -// IsCode returns true when this cloud space service fork cloud space app instance o k response a status code equal to that given -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the cloud space service fork cloud space app instance o k response -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceOK) Code() int { - return 200 -} - -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /v1/projects/{projectId}/cloudspaces/{cloudspaceId}/apps/{id}/fork][%d] cloudSpaceServiceForkCloudSpaceAppInstanceOK %s", 200, payload) -} - -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /v1/projects/{projectId}/cloudspaces/{cloudspaceId}/apps/{id}/fork][%d] cloudSpaceServiceForkCloudSpaceAppInstanceOK %s", 200, payload) -} - -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceOK) GetPayload() *models.Externalv1LightningappInstance { - return o.Payload -} - -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Externalv1LightningappInstance) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} - -// NewCloudSpaceServiceForkCloudSpaceAppInstanceDefault creates a CloudSpaceServiceForkCloudSpaceAppInstanceDefault with default headers values -func NewCloudSpaceServiceForkCloudSpaceAppInstanceDefault(code int) *CloudSpaceServiceForkCloudSpaceAppInstanceDefault { - return &CloudSpaceServiceForkCloudSpaceAppInstanceDefault{ - _statusCode: code, - } -} - -/* -CloudSpaceServiceForkCloudSpaceAppInstanceDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type CloudSpaceServiceForkCloudSpaceAppInstanceDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this cloud space service fork cloud space app instance default response has a 2xx status code -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cloud space service fork cloud space app instance default response has a 3xx status code -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cloud space service fork cloud space app instance default response has a 4xx status code -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cloud space service fork cloud space app instance default response has a 5xx status code -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cloud space service fork cloud space app instance default response a status code equal to that given -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cloud space service fork cloud space app instance default response -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceDefault) Code() int { - return o._statusCode -} - -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /v1/projects/{projectId}/cloudspaces/{cloudspaceId}/apps/{id}/fork][%d] CloudSpaceService_ForkCloudSpaceAppInstance default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /v1/projects/{projectId}/cloudspaces/{cloudspaceId}/apps/{id}/fork][%d] CloudSpaceService_ForkCloudSpaceAppInstance default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *CloudSpaceServiceForkCloudSpaceAppInstanceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_get_cloud_space_app_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_get_cloud_space_app_parameters.go deleted file mode 100644 index f109529c8..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_get_cloud_space_app_parameters.go +++ /dev/null @@ -1,152 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewCloudSpaceServiceGetCloudSpaceAppParams creates a new CloudSpaceServiceGetCloudSpaceAppParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCloudSpaceServiceGetCloudSpaceAppParams() *CloudSpaceServiceGetCloudSpaceAppParams { - return &CloudSpaceServiceGetCloudSpaceAppParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloudSpaceServiceGetCloudSpaceAppParamsWithTimeout creates a new CloudSpaceServiceGetCloudSpaceAppParams object -// with the ability to set a timeout on a request. -func NewCloudSpaceServiceGetCloudSpaceAppParamsWithTimeout(timeout time.Duration) *CloudSpaceServiceGetCloudSpaceAppParams { - return &CloudSpaceServiceGetCloudSpaceAppParams{ - timeout: timeout, - } -} - -// NewCloudSpaceServiceGetCloudSpaceAppParamsWithContext creates a new CloudSpaceServiceGetCloudSpaceAppParams object -// with the ability to set a context for a request. -func NewCloudSpaceServiceGetCloudSpaceAppParamsWithContext(ctx context.Context) *CloudSpaceServiceGetCloudSpaceAppParams { - return &CloudSpaceServiceGetCloudSpaceAppParams{ - Context: ctx, - } -} - -// NewCloudSpaceServiceGetCloudSpaceAppParamsWithHTTPClient creates a new CloudSpaceServiceGetCloudSpaceAppParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloudSpaceServiceGetCloudSpaceAppParamsWithHTTPClient(client *http.Client) *CloudSpaceServiceGetCloudSpaceAppParams { - return &CloudSpaceServiceGetCloudSpaceAppParams{ - HTTPClient: client, - } -} - -/* -CloudSpaceServiceGetCloudSpaceAppParams contains all the parameters to send to the API endpoint - - for the cloud space service get cloud space app operation. - - Typically these are written to a http.Request. -*/ -type CloudSpaceServiceGetCloudSpaceAppParams struct { - - // ID. - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cloud space service get cloud space app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceGetCloudSpaceAppParams) WithDefaults() *CloudSpaceServiceGetCloudSpaceAppParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cloud space service get cloud space app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceGetCloudSpaceAppParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cloud space service get cloud space app params -func (o *CloudSpaceServiceGetCloudSpaceAppParams) WithTimeout(timeout time.Duration) *CloudSpaceServiceGetCloudSpaceAppParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cloud space service get cloud space app params -func (o *CloudSpaceServiceGetCloudSpaceAppParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cloud space service get cloud space app params -func (o *CloudSpaceServiceGetCloudSpaceAppParams) WithContext(ctx context.Context) *CloudSpaceServiceGetCloudSpaceAppParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cloud space service get cloud space app params -func (o *CloudSpaceServiceGetCloudSpaceAppParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cloud space service get cloud space app params -func (o *CloudSpaceServiceGetCloudSpaceAppParams) WithHTTPClient(client *http.Client) *CloudSpaceServiceGetCloudSpaceAppParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cloud space service get cloud space app params -func (o *CloudSpaceServiceGetCloudSpaceAppParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the cloud space service get cloud space app params -func (o *CloudSpaceServiceGetCloudSpaceAppParams) WithID(id string) *CloudSpaceServiceGetCloudSpaceAppParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cloud space service get cloud space app params -func (o *CloudSpaceServiceGetCloudSpaceAppParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CloudSpaceServiceGetCloudSpaceAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_get_cloud_space_app_responses.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_get_cloud_space_app_responses.go deleted file mode 100644 index 1b2d9aa58..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_get_cloud_space_app_responses.go +++ /dev/null @@ -1,192 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - stderrors "errors" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" -) - -// CloudSpaceServiceGetCloudSpaceAppReader is a Reader for the CloudSpaceServiceGetCloudSpaceApp structure. -type CloudSpaceServiceGetCloudSpaceAppReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloudSpaceServiceGetCloudSpaceAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { - switch response.Code() { - case 200: - result := NewCloudSpaceServiceGetCloudSpaceAppOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloudSpaceServiceGetCloudSpaceAppDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCloudSpaceServiceGetCloudSpaceAppOK creates a CloudSpaceServiceGetCloudSpaceAppOK with default headers values -func NewCloudSpaceServiceGetCloudSpaceAppOK() *CloudSpaceServiceGetCloudSpaceAppOK { - return &CloudSpaceServiceGetCloudSpaceAppOK{} -} - -/* -CloudSpaceServiceGetCloudSpaceAppOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type CloudSpaceServiceGetCloudSpaceAppOK struct { - Payload *models.V1CloudSpaceApp -} - -// IsSuccess returns true when this cloud space service get cloud space app o k response has a 2xx status code -func (o *CloudSpaceServiceGetCloudSpaceAppOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cloud space service get cloud space app o k response has a 3xx status code -func (o *CloudSpaceServiceGetCloudSpaceAppOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cloud space service get cloud space app o k response has a 4xx status code -func (o *CloudSpaceServiceGetCloudSpaceAppOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this cloud space service get cloud space app o k response has a 5xx status code -func (o *CloudSpaceServiceGetCloudSpaceAppOK) IsServerError() bool { - return false -} - -// IsCode returns true when this cloud space service get cloud space app o k response a status code equal to that given -func (o *CloudSpaceServiceGetCloudSpaceAppOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the cloud space service get cloud space app o k response -func (o *CloudSpaceServiceGetCloudSpaceAppOK) Code() int { - return 200 -} - -func (o *CloudSpaceServiceGetCloudSpaceAppOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/cloudspaces/apps/{id}][%d] cloudSpaceServiceGetCloudSpaceAppOK %s", 200, payload) -} - -func (o *CloudSpaceServiceGetCloudSpaceAppOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/cloudspaces/apps/{id}][%d] cloudSpaceServiceGetCloudSpaceAppOK %s", 200, payload) -} - -func (o *CloudSpaceServiceGetCloudSpaceAppOK) GetPayload() *models.V1CloudSpaceApp { - return o.Payload -} - -func (o *CloudSpaceServiceGetCloudSpaceAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.V1CloudSpaceApp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} - -// NewCloudSpaceServiceGetCloudSpaceAppDefault creates a CloudSpaceServiceGetCloudSpaceAppDefault with default headers values -func NewCloudSpaceServiceGetCloudSpaceAppDefault(code int) *CloudSpaceServiceGetCloudSpaceAppDefault { - return &CloudSpaceServiceGetCloudSpaceAppDefault{ - _statusCode: code, - } -} - -/* -CloudSpaceServiceGetCloudSpaceAppDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type CloudSpaceServiceGetCloudSpaceAppDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this cloud space service get cloud space app default response has a 2xx status code -func (o *CloudSpaceServiceGetCloudSpaceAppDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cloud space service get cloud space app default response has a 3xx status code -func (o *CloudSpaceServiceGetCloudSpaceAppDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cloud space service get cloud space app default response has a 4xx status code -func (o *CloudSpaceServiceGetCloudSpaceAppDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cloud space service get cloud space app default response has a 5xx status code -func (o *CloudSpaceServiceGetCloudSpaceAppDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cloud space service get cloud space app default response a status code equal to that given -func (o *CloudSpaceServiceGetCloudSpaceAppDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cloud space service get cloud space app default response -func (o *CloudSpaceServiceGetCloudSpaceAppDefault) Code() int { - return o._statusCode -} - -func (o *CloudSpaceServiceGetCloudSpaceAppDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/cloudspaces/apps/{id}][%d] CloudSpaceService_GetCloudSpaceApp default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceGetCloudSpaceAppDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/cloudspaces/apps/{id}][%d] CloudSpaceService_GetCloudSpaceApp default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceGetCloudSpaceAppDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *CloudSpaceServiceGetCloudSpaceAppDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_list_cloud_space_apps_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_list_cloud_space_apps_parameters.go deleted file mode 100644 index 9bd63c1c5..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_list_cloud_space_apps_parameters.go +++ /dev/null @@ -1,226 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewCloudSpaceServiceListCloudSpaceAppsParams creates a new CloudSpaceServiceListCloudSpaceAppsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCloudSpaceServiceListCloudSpaceAppsParams() *CloudSpaceServiceListCloudSpaceAppsParams { - return &CloudSpaceServiceListCloudSpaceAppsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloudSpaceServiceListCloudSpaceAppsParamsWithTimeout creates a new CloudSpaceServiceListCloudSpaceAppsParams object -// with the ability to set a timeout on a request. -func NewCloudSpaceServiceListCloudSpaceAppsParamsWithTimeout(timeout time.Duration) *CloudSpaceServiceListCloudSpaceAppsParams { - return &CloudSpaceServiceListCloudSpaceAppsParams{ - timeout: timeout, - } -} - -// NewCloudSpaceServiceListCloudSpaceAppsParamsWithContext creates a new CloudSpaceServiceListCloudSpaceAppsParams object -// with the ability to set a context for a request. -func NewCloudSpaceServiceListCloudSpaceAppsParamsWithContext(ctx context.Context) *CloudSpaceServiceListCloudSpaceAppsParams { - return &CloudSpaceServiceListCloudSpaceAppsParams{ - Context: ctx, - } -} - -// NewCloudSpaceServiceListCloudSpaceAppsParamsWithHTTPClient creates a new CloudSpaceServiceListCloudSpaceAppsParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloudSpaceServiceListCloudSpaceAppsParamsWithHTTPClient(client *http.Client) *CloudSpaceServiceListCloudSpaceAppsParams { - return &CloudSpaceServiceListCloudSpaceAppsParams{ - HTTPClient: client, - } -} - -/* -CloudSpaceServiceListCloudSpaceAppsParams contains all the parameters to send to the API endpoint - - for the cloud space service list cloud space apps operation. - - Typically these are written to a http.Request. -*/ -type CloudSpaceServiceListCloudSpaceAppsParams struct { - - // OrgID. - OrgID *string - - // ProjectID. - ProjectID *string - - // UserID. - UserID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cloud space service list cloud space apps params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceListCloudSpaceAppsParams) WithDefaults() *CloudSpaceServiceListCloudSpaceAppsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cloud space service list cloud space apps params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceListCloudSpaceAppsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cloud space service list cloud space apps params -func (o *CloudSpaceServiceListCloudSpaceAppsParams) WithTimeout(timeout time.Duration) *CloudSpaceServiceListCloudSpaceAppsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cloud space service list cloud space apps params -func (o *CloudSpaceServiceListCloudSpaceAppsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cloud space service list cloud space apps params -func (o *CloudSpaceServiceListCloudSpaceAppsParams) WithContext(ctx context.Context) *CloudSpaceServiceListCloudSpaceAppsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cloud space service list cloud space apps params -func (o *CloudSpaceServiceListCloudSpaceAppsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cloud space service list cloud space apps params -func (o *CloudSpaceServiceListCloudSpaceAppsParams) WithHTTPClient(client *http.Client) *CloudSpaceServiceListCloudSpaceAppsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cloud space service list cloud space apps params -func (o *CloudSpaceServiceListCloudSpaceAppsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithOrgID adds the orgID to the cloud space service list cloud space apps params -func (o *CloudSpaceServiceListCloudSpaceAppsParams) WithOrgID(orgID *string) *CloudSpaceServiceListCloudSpaceAppsParams { - o.SetOrgID(orgID) - return o -} - -// SetOrgID adds the orgId to the cloud space service list cloud space apps params -func (o *CloudSpaceServiceListCloudSpaceAppsParams) SetOrgID(orgID *string) { - o.OrgID = orgID -} - -// WithProjectID adds the projectID to the cloud space service list cloud space apps params -func (o *CloudSpaceServiceListCloudSpaceAppsParams) WithProjectID(projectID *string) *CloudSpaceServiceListCloudSpaceAppsParams { - o.SetProjectID(projectID) - return o -} - -// SetProjectID adds the projectId to the cloud space service list cloud space apps params -func (o *CloudSpaceServiceListCloudSpaceAppsParams) SetProjectID(projectID *string) { - o.ProjectID = projectID -} - -// WithUserID adds the userID to the cloud space service list cloud space apps params -func (o *CloudSpaceServiceListCloudSpaceAppsParams) WithUserID(userID *string) *CloudSpaceServiceListCloudSpaceAppsParams { - o.SetUserID(userID) - return o -} - -// SetUserID adds the userId to the cloud space service list cloud space apps params -func (o *CloudSpaceServiceListCloudSpaceAppsParams) SetUserID(userID *string) { - o.UserID = userID -} - -// WriteToRequest writes these params to a swagger request -func (o *CloudSpaceServiceListCloudSpaceAppsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.OrgID != nil { - - // query param orgId - var qrOrgID string - - if o.OrgID != nil { - qrOrgID = *o.OrgID - } - qOrgID := qrOrgID - if qOrgID != "" { - - if err := r.SetQueryParam("orgId", qOrgID); err != nil { - return err - } - } - } - - if o.ProjectID != nil { - - // query param projectId - var qrProjectID string - - if o.ProjectID != nil { - qrProjectID = *o.ProjectID - } - qProjectID := qrProjectID - if qProjectID != "" { - - if err := r.SetQueryParam("projectId", qProjectID); err != nil { - return err - } - } - } - - if o.UserID != nil { - - // query param userId - var qrUserID string - - if o.UserID != nil { - qrUserID = *o.UserID - } - qUserID := qrUserID - if qUserID != "" { - - if err := r.SetQueryParam("userId", qUserID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_list_cloud_space_apps_responses.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_list_cloud_space_apps_responses.go deleted file mode 100644 index 5fe20f607..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_list_cloud_space_apps_responses.go +++ /dev/null @@ -1,192 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - stderrors "errors" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" -) - -// CloudSpaceServiceListCloudSpaceAppsReader is a Reader for the CloudSpaceServiceListCloudSpaceApps structure. -type CloudSpaceServiceListCloudSpaceAppsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloudSpaceServiceListCloudSpaceAppsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { - switch response.Code() { - case 200: - result := NewCloudSpaceServiceListCloudSpaceAppsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloudSpaceServiceListCloudSpaceAppsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCloudSpaceServiceListCloudSpaceAppsOK creates a CloudSpaceServiceListCloudSpaceAppsOK with default headers values -func NewCloudSpaceServiceListCloudSpaceAppsOK() *CloudSpaceServiceListCloudSpaceAppsOK { - return &CloudSpaceServiceListCloudSpaceAppsOK{} -} - -/* -CloudSpaceServiceListCloudSpaceAppsOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type CloudSpaceServiceListCloudSpaceAppsOK struct { - Payload *models.V1ListCloudSpaceAppsResponse -} - -// IsSuccess returns true when this cloud space service list cloud space apps o k response has a 2xx status code -func (o *CloudSpaceServiceListCloudSpaceAppsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cloud space service list cloud space apps o k response has a 3xx status code -func (o *CloudSpaceServiceListCloudSpaceAppsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cloud space service list cloud space apps o k response has a 4xx status code -func (o *CloudSpaceServiceListCloudSpaceAppsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this cloud space service list cloud space apps o k response has a 5xx status code -func (o *CloudSpaceServiceListCloudSpaceAppsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this cloud space service list cloud space apps o k response a status code equal to that given -func (o *CloudSpaceServiceListCloudSpaceAppsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the cloud space service list cloud space apps o k response -func (o *CloudSpaceServiceListCloudSpaceAppsOK) Code() int { - return 200 -} - -func (o *CloudSpaceServiceListCloudSpaceAppsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/cloudspaces/apps][%d] cloudSpaceServiceListCloudSpaceAppsOK %s", 200, payload) -} - -func (o *CloudSpaceServiceListCloudSpaceAppsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/cloudspaces/apps][%d] cloudSpaceServiceListCloudSpaceAppsOK %s", 200, payload) -} - -func (o *CloudSpaceServiceListCloudSpaceAppsOK) GetPayload() *models.V1ListCloudSpaceAppsResponse { - return o.Payload -} - -func (o *CloudSpaceServiceListCloudSpaceAppsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.V1ListCloudSpaceAppsResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} - -// NewCloudSpaceServiceListCloudSpaceAppsDefault creates a CloudSpaceServiceListCloudSpaceAppsDefault with default headers values -func NewCloudSpaceServiceListCloudSpaceAppsDefault(code int) *CloudSpaceServiceListCloudSpaceAppsDefault { - return &CloudSpaceServiceListCloudSpaceAppsDefault{ - _statusCode: code, - } -} - -/* -CloudSpaceServiceListCloudSpaceAppsDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type CloudSpaceServiceListCloudSpaceAppsDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this cloud space service list cloud space apps default response has a 2xx status code -func (o *CloudSpaceServiceListCloudSpaceAppsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cloud space service list cloud space apps default response has a 3xx status code -func (o *CloudSpaceServiceListCloudSpaceAppsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cloud space service list cloud space apps default response has a 4xx status code -func (o *CloudSpaceServiceListCloudSpaceAppsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cloud space service list cloud space apps default response has a 5xx status code -func (o *CloudSpaceServiceListCloudSpaceAppsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cloud space service list cloud space apps default response a status code equal to that given -func (o *CloudSpaceServiceListCloudSpaceAppsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cloud space service list cloud space apps default response -func (o *CloudSpaceServiceListCloudSpaceAppsDefault) Code() int { - return o._statusCode -} - -func (o *CloudSpaceServiceListCloudSpaceAppsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/cloudspaces/apps][%d] CloudSpaceService_ListCloudSpaceApps default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceListCloudSpaceAppsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/cloudspaces/apps][%d] CloudSpaceService_ListCloudSpaceApps default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceListCloudSpaceAppsDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *CloudSpaceServiceListCloudSpaceAppsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_update_cloud_space_app_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_update_cloud_space_app_parameters.go deleted file mode 100644 index 6ece4e058..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_update_cloud_space_app_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" -) - -// NewCloudSpaceServiceUpdateCloudSpaceAppParams creates a new CloudSpaceServiceUpdateCloudSpaceAppParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCloudSpaceServiceUpdateCloudSpaceAppParams() *CloudSpaceServiceUpdateCloudSpaceAppParams { - return &CloudSpaceServiceUpdateCloudSpaceAppParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloudSpaceServiceUpdateCloudSpaceAppParamsWithTimeout creates a new CloudSpaceServiceUpdateCloudSpaceAppParams object -// with the ability to set a timeout on a request. -func NewCloudSpaceServiceUpdateCloudSpaceAppParamsWithTimeout(timeout time.Duration) *CloudSpaceServiceUpdateCloudSpaceAppParams { - return &CloudSpaceServiceUpdateCloudSpaceAppParams{ - timeout: timeout, - } -} - -// NewCloudSpaceServiceUpdateCloudSpaceAppParamsWithContext creates a new CloudSpaceServiceUpdateCloudSpaceAppParams object -// with the ability to set a context for a request. -func NewCloudSpaceServiceUpdateCloudSpaceAppParamsWithContext(ctx context.Context) *CloudSpaceServiceUpdateCloudSpaceAppParams { - return &CloudSpaceServiceUpdateCloudSpaceAppParams{ - Context: ctx, - } -} - -// NewCloudSpaceServiceUpdateCloudSpaceAppParamsWithHTTPClient creates a new CloudSpaceServiceUpdateCloudSpaceAppParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloudSpaceServiceUpdateCloudSpaceAppParamsWithHTTPClient(client *http.Client) *CloudSpaceServiceUpdateCloudSpaceAppParams { - return &CloudSpaceServiceUpdateCloudSpaceAppParams{ - HTTPClient: client, - } -} - -/* -CloudSpaceServiceUpdateCloudSpaceAppParams contains all the parameters to send to the API endpoint - - for the cloud space service update cloud space app operation. - - Typically these are written to a http.Request. -*/ -type CloudSpaceServiceUpdateCloudSpaceAppParams struct { - - // Body. - Body *models.CloudSpaceServiceUpdateCloudSpaceAppBody - - // ID. - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cloud space service update cloud space app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceUpdateCloudSpaceAppParams) WithDefaults() *CloudSpaceServiceUpdateCloudSpaceAppParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cloud space service update cloud space app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloudSpaceServiceUpdateCloudSpaceAppParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cloud space service update cloud space app params -func (o *CloudSpaceServiceUpdateCloudSpaceAppParams) WithTimeout(timeout time.Duration) *CloudSpaceServiceUpdateCloudSpaceAppParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cloud space service update cloud space app params -func (o *CloudSpaceServiceUpdateCloudSpaceAppParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cloud space service update cloud space app params -func (o *CloudSpaceServiceUpdateCloudSpaceAppParams) WithContext(ctx context.Context) *CloudSpaceServiceUpdateCloudSpaceAppParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cloud space service update cloud space app params -func (o *CloudSpaceServiceUpdateCloudSpaceAppParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cloud space service update cloud space app params -func (o *CloudSpaceServiceUpdateCloudSpaceAppParams) WithHTTPClient(client *http.Client) *CloudSpaceServiceUpdateCloudSpaceAppParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cloud space service update cloud space app params -func (o *CloudSpaceServiceUpdateCloudSpaceAppParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the cloud space service update cloud space app params -func (o *CloudSpaceServiceUpdateCloudSpaceAppParams) WithBody(body *models.CloudSpaceServiceUpdateCloudSpaceAppBody) *CloudSpaceServiceUpdateCloudSpaceAppParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the cloud space service update cloud space app params -func (o *CloudSpaceServiceUpdateCloudSpaceAppParams) SetBody(body *models.CloudSpaceServiceUpdateCloudSpaceAppBody) { - o.Body = body -} - -// WithID adds the id to the cloud space service update cloud space app params -func (o *CloudSpaceServiceUpdateCloudSpaceAppParams) WithID(id string) *CloudSpaceServiceUpdateCloudSpaceAppParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cloud space service update cloud space app params -func (o *CloudSpaceServiceUpdateCloudSpaceAppParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CloudSpaceServiceUpdateCloudSpaceAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_update_cloud_space_app_responses.go b/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_update_cloud_space_app_responses.go deleted file mode 100644 index 3726d4753..000000000 --- a/go/internal/lightningcloud/openapi/generated/client/cloud_space_service/cloud_space_service_update_cloud_space_app_responses.go +++ /dev/null @@ -1,192 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_space_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - stderrors "errors" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" -) - -// CloudSpaceServiceUpdateCloudSpaceAppReader is a Reader for the CloudSpaceServiceUpdateCloudSpaceApp structure. -type CloudSpaceServiceUpdateCloudSpaceAppReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloudSpaceServiceUpdateCloudSpaceAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { - switch response.Code() { - case 200: - result := NewCloudSpaceServiceUpdateCloudSpaceAppOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloudSpaceServiceUpdateCloudSpaceAppDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCloudSpaceServiceUpdateCloudSpaceAppOK creates a CloudSpaceServiceUpdateCloudSpaceAppOK with default headers values -func NewCloudSpaceServiceUpdateCloudSpaceAppOK() *CloudSpaceServiceUpdateCloudSpaceAppOK { - return &CloudSpaceServiceUpdateCloudSpaceAppOK{} -} - -/* -CloudSpaceServiceUpdateCloudSpaceAppOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type CloudSpaceServiceUpdateCloudSpaceAppOK struct { - Payload *models.V1CloudSpaceApp -} - -// IsSuccess returns true when this cloud space service update cloud space app o k response has a 2xx status code -func (o *CloudSpaceServiceUpdateCloudSpaceAppOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cloud space service update cloud space app o k response has a 3xx status code -func (o *CloudSpaceServiceUpdateCloudSpaceAppOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cloud space service update cloud space app o k response has a 4xx status code -func (o *CloudSpaceServiceUpdateCloudSpaceAppOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this cloud space service update cloud space app o k response has a 5xx status code -func (o *CloudSpaceServiceUpdateCloudSpaceAppOK) IsServerError() bool { - return false -} - -// IsCode returns true when this cloud space service update cloud space app o k response a status code equal to that given -func (o *CloudSpaceServiceUpdateCloudSpaceAppOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the cloud space service update cloud space app o k response -func (o *CloudSpaceServiceUpdateCloudSpaceAppOK) Code() int { - return 200 -} - -func (o *CloudSpaceServiceUpdateCloudSpaceAppOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /v1/cloudspaces/apps/{id}][%d] cloudSpaceServiceUpdateCloudSpaceAppOK %s", 200, payload) -} - -func (o *CloudSpaceServiceUpdateCloudSpaceAppOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /v1/cloudspaces/apps/{id}][%d] cloudSpaceServiceUpdateCloudSpaceAppOK %s", 200, payload) -} - -func (o *CloudSpaceServiceUpdateCloudSpaceAppOK) GetPayload() *models.V1CloudSpaceApp { - return o.Payload -} - -func (o *CloudSpaceServiceUpdateCloudSpaceAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.V1CloudSpaceApp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} - -// NewCloudSpaceServiceUpdateCloudSpaceAppDefault creates a CloudSpaceServiceUpdateCloudSpaceAppDefault with default headers values -func NewCloudSpaceServiceUpdateCloudSpaceAppDefault(code int) *CloudSpaceServiceUpdateCloudSpaceAppDefault { - return &CloudSpaceServiceUpdateCloudSpaceAppDefault{ - _statusCode: code, - } -} - -/* -CloudSpaceServiceUpdateCloudSpaceAppDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type CloudSpaceServiceUpdateCloudSpaceAppDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this cloud space service update cloud space app default response has a 2xx status code -func (o *CloudSpaceServiceUpdateCloudSpaceAppDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cloud space service update cloud space app default response has a 3xx status code -func (o *CloudSpaceServiceUpdateCloudSpaceAppDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cloud space service update cloud space app default response has a 4xx status code -func (o *CloudSpaceServiceUpdateCloudSpaceAppDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cloud space service update cloud space app default response has a 5xx status code -func (o *CloudSpaceServiceUpdateCloudSpaceAppDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cloud space service update cloud space app default response a status code equal to that given -func (o *CloudSpaceServiceUpdateCloudSpaceAppDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cloud space service update cloud space app default response -func (o *CloudSpaceServiceUpdateCloudSpaceAppDefault) Code() int { - return o._statusCode -} - -func (o *CloudSpaceServiceUpdateCloudSpaceAppDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /v1/cloudspaces/apps/{id}][%d] CloudSpaceService_UpdateCloudSpaceApp default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceUpdateCloudSpaceAppDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /v1/cloudspaces/apps/{id}][%d] CloudSpaceService_UpdateCloudSpaceApp default %s", o._statusCode, payload) -} - -func (o *CloudSpaceServiceUpdateCloudSpaceAppDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *CloudSpaceServiceUpdateCloudSpaceAppDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { - return err - } - - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_client.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_client.go index 7e76e7fba..87154be72 100644 --- a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_client.go +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_client.go @@ -122,12 +122,18 @@ type ClientService interface { ClusterServiceGetClusterCredentials(params *ClusterServiceGetClusterCredentialsParams, opts ...ClientOption) (*ClusterServiceGetClusterCredentialsOK, error) + ClusterServiceGetClusterDetails(params *ClusterServiceGetClusterDetailsParams, opts ...ClientOption) (*ClusterServiceGetClusterDetailsOK, error) + ClusterServiceGetClusterHealth(params *ClusterServiceGetClusterHealthParams, opts ...ClientOption) (*ClusterServiceGetClusterHealthOK, error) + ClusterServiceGetClusterReservationUsage(params *ClusterServiceGetClusterReservationUsageParams, opts ...ClientOption) (*ClusterServiceGetClusterReservationUsageOK, error) + ClusterServiceGetMachine(params *ClusterServiceGetMachineParams, opts ...ClientOption) (*ClusterServiceGetMachineOK, error) ClusterServiceGetMachineDetails(params *ClusterServiceGetMachineDetailsParams, opts ...ClientOption) (*ClusterServiceGetMachineDetailsOK, error) + ClusterServiceGetMachineSetupURL(params *ClusterServiceGetMachineSetupURLParams, opts ...ClientOption) (*ClusterServiceGetMachineSetupURLOK, error) + ClusterServiceGetMachineSystemMetrics(params *ClusterServiceGetMachineSystemMetricsParams, opts ...ClientOption) (*ClusterServiceGetMachineSystemMetricsOK, error) ClusterServiceGetMultiMachineCapacity(params *ClusterServiceGetMultiMachineCapacityParams, opts ...ClientOption) (*ClusterServiceGetMultiMachineCapacityOK, error) @@ -144,6 +150,8 @@ type ClientService interface { ClusterServiceListClusterProxies(params *ClusterServiceListClusterProxiesParams, opts ...ClientOption) (*ClusterServiceListClusterProxiesOK, error) + ClusterServiceListClusterReservationsForUsage(params *ClusterServiceListClusterReservationsForUsageParams, opts ...ClientOption) (*ClusterServiceListClusterReservationsForUsageOK, error) + ClusterServiceListClusterUsageRestrictions(params *ClusterServiceListClusterUsageRestrictionsParams, opts ...ClientOption) (*ClusterServiceListClusterUsageRestrictionsOK, error) ClusterServiceListClusters(params *ClusterServiceListClustersParams, opts ...ClientOption) (*ClusterServiceListClustersOK, error) @@ -160,6 +168,8 @@ type ClientService interface { ClusterServiceListProjectClusters(params *ClusterServiceListProjectClustersParams, opts ...ClientOption) (*ClusterServiceListProjectClustersOK, error) + ClusterServiceListProviderFleet(params *ClusterServiceListProviderFleetParams, opts ...ClientOption) (*ClusterServiceListProviderFleetOK, error) + ClusterServiceMintSandboxLogsToken(params *ClusterServiceMintSandboxLogsTokenParams, opts ...ClientOption) (*ClusterServiceMintSandboxLogsTokenOK, error) ClusterServiceProvisionMachine(params *ClusterServiceProvisionMachineParams, opts ...ClientOption) (*ClusterServiceProvisionMachineOK, error) @@ -182,6 +192,8 @@ type ClientService interface { ClusterServiceServerCheckIn(params *ClusterServiceServerCheckInParams, opts ...ClientOption) (*ClusterServiceServerCheckInOK, error) + ClusterServiceSetMachineVPNServices(params *ClusterServiceSetMachineVPNServicesParams, opts ...ClientOption) (*ClusterServiceSetMachineVPNServicesOK, error) + ClusterServiceSleepServer(params *ClusterServiceSleepServerParams, opts ...ClientOption) (*ClusterServiceSleepServerOK, error) ClusterServiceUpdateCluster(params *ClusterServiceUpdateClusterParams, opts ...ClientOption) (*ClusterServiceUpdateClusterOK, error) @@ -202,6 +214,8 @@ type ClientService interface { ClusterServiceUpdateProjectClusterAccelerators(params *ClusterServiceUpdateProjectClusterAcceleratorsParams, opts ...ClientOption) (*ClusterServiceUpdateProjectClusterAcceleratorsOK, error) + ClusterServiceUpdateProviderFleetOwner(params *ClusterServiceUpdateProviderFleetOwnerParams, opts ...ClientOption) (*ClusterServiceUpdateProviderFleetOwnerOK, error) + ClusterServiceUpdateSandboxCommandExitCode(params *ClusterServiceUpdateSandboxCommandExitCodeParams, opts ...ClientOption) (*ClusterServiceUpdateSandboxCommandExitCodeOK, error) ClusterServiceUpdateServer(params *ClusterServiceUpdateServerParams, opts ...ClientOption) (*ClusterServiceUpdateServerOK, error) @@ -1553,6 +1567,48 @@ func (a *Client) ClusterServiceGetClusterCredentials(params *ClusterServiceGetCl return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ClusterServiceGetClusterDetails gets cluster details is internal only placement machine vs g c p burst pending unscheduled creates and shadow reservation utilization +*/ +func (a *Client) ClusterServiceGetClusterDetails(params *ClusterServiceGetClusterDetailsParams, opts ...ClientOption) (*ClusterServiceGetClusterDetailsOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewClusterServiceGetClusterDetailsParams() + } + op := &runtime.ClientOperation{ + ID: "ClusterService_GetClusterDetails", + Method: "GET", + PathPattern: "/v1/core/clusters/{clusterId}/details", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterServiceGetClusterDetailsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*ClusterServiceGetClusterDetailsOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*ClusterServiceGetClusterDetailsDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ClusterServiceGetClusterHealth cluster service get cluster health API */ @@ -1595,6 +1651,48 @@ func (a *Client) ClusterServiceGetClusterHealth(params *ClusterServiceGetCluster return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ClusterServiceGetClusterReservationUsage cluster service get cluster reservation usage API +*/ +func (a *Client) ClusterServiceGetClusterReservationUsage(params *ClusterServiceGetClusterReservationUsageParams, opts ...ClientOption) (*ClusterServiceGetClusterReservationUsageOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewClusterServiceGetClusterReservationUsageParams() + } + op := &runtime.ClientOperation{ + ID: "ClusterService_GetClusterReservationUsage", + Method: "GET", + PathPattern: "/v1/orgs/{orgId}/clusters/{clusterId}/capacity-reservations/{reservationId}/usage", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterServiceGetClusterReservationUsageReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*ClusterServiceGetClusterReservationUsageOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*ClusterServiceGetClusterReservationUsageDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ClusterServiceGetMachine lists machines with optional filtering */ @@ -1679,6 +1777,48 @@ func (a *Client) ClusterServiceGetMachineDetails(params *ClusterServiceGetMachin return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ClusterServiceGetMachineSetupURL mints the short lived user token the machine setup script is fetched with +*/ +func (a *Client) ClusterServiceGetMachineSetupURL(params *ClusterServiceGetMachineSetupURLParams, opts ...ClientOption) (*ClusterServiceGetMachineSetupURLOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewClusterServiceGetMachineSetupURLParams() + } + op := &runtime.ClientOperation{ + ID: "ClusterService_GetMachineSetupURL", + Method: "GET", + PathPattern: "/v1/core/clusters/{clusterId}/machine-setup-url", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterServiceGetMachineSetupURLReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*ClusterServiceGetMachineSetupURLOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*ClusterServiceGetMachineSetupURLDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ClusterServiceGetMachineSystemMetrics cluster service get machine system metrics API */ @@ -2015,6 +2155,48 @@ func (a *Client) ClusterServiceListClusterProxies(params *ClusterServiceListClus return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ClusterServiceListClusterReservationsForUsage cluster service list cluster reservations for usage API +*/ +func (a *Client) ClusterServiceListClusterReservationsForUsage(params *ClusterServiceListClusterReservationsForUsageParams, opts ...ClientOption) (*ClusterServiceListClusterReservationsForUsageOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewClusterServiceListClusterReservationsForUsageParams() + } + op := &runtime.ClientOperation{ + ID: "ClusterService_ListClusterReservationsForUsage", + Method: "GET", + PathPattern: "/v1/orgs/{orgId}/clusters/{clusterId}/reservation-usage", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterServiceListClusterReservationsForUsageReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*ClusterServiceListClusterReservationsForUsageOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*ClusterServiceListClusterReservationsForUsageDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ClusterServiceListClusterUsageRestrictions cluster service list cluster usage restrictions API */ @@ -2351,6 +2533,48 @@ func (a *Client) ClusterServiceListProjectClusters(params *ClusterServiceListPro return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ClusterServiceListProviderFleet cluster service list provider fleet API +*/ +func (a *Client) ClusterServiceListProviderFleet(params *ClusterServiceListProviderFleetParams, opts ...ClientOption) (*ClusterServiceListProviderFleetOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewClusterServiceListProviderFleetParams() + } + op := &runtime.ClientOperation{ + ID: "ClusterService_ListProviderFleet", + Method: "GET", + PathPattern: "/v1/core/clusters/{clusterId}/provider-fleet", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterServiceListProviderFleetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*ClusterServiceListProviderFleetOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*ClusterServiceListProviderFleetDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ClusterServiceMintSandboxLogsToken mints a short lived g c s access token scoped to the sandbox logs bucket so the baremetal agent can stream sandbox logs without holding a long lived service account key the agent re calls this to refresh before expiry */ @@ -2813,6 +3037,48 @@ func (a *Client) ClusterServiceServerCheckIn(params *ClusterServiceServerCheckIn return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ClusterServiceSetMachineVPNServices sets machine v p n services starts or stops strong swan and f r r on a v p n gateway +*/ +func (a *Client) ClusterServiceSetMachineVPNServices(params *ClusterServiceSetMachineVPNServicesParams, opts ...ClientOption) (*ClusterServiceSetMachineVPNServicesOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewClusterServiceSetMachineVPNServicesParams() + } + op := &runtime.ClientOperation{ + ID: "ClusterService_SetMachineVPNServices", + Method: "POST", + PathPattern: "/v1/core/clusters/{clusterId}/machines/{id}/vpn", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterServiceSetMachineVPNServicesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*ClusterServiceSetMachineVPNServicesOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*ClusterServiceSetMachineVPNServicesDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ClusterServiceSleepServer cluster service sleep server API */ @@ -3233,6 +3499,48 @@ func (a *Client) ClusterServiceUpdateProjectClusterAccelerators(params *ClusterS return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ClusterServiceUpdateProviderFleetOwner cluster service update provider fleet owner API +*/ +func (a *Client) ClusterServiceUpdateProviderFleetOwner(params *ClusterServiceUpdateProviderFleetOwnerParams, opts ...ClientOption) (*ClusterServiceUpdateProviderFleetOwnerOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewClusterServiceUpdateProviderFleetOwnerParams() + } + op := &runtime.ClientOperation{ + ID: "ClusterService_UpdateProviderFleetOwner", + Method: "PUT", + PathPattern: "/v1/core/clusters/{clusterId}/provider-fleet/{nodeId}/owner", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterServiceUpdateProviderFleetOwnerReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*ClusterServiceUpdateProviderFleetOwnerOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*ClusterServiceUpdateProviderFleetOwnerDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ClusterServiceUpdateSandboxCommandExitCode records the exit code of a detached sandbox command once it finishes detached commands return to the caller immediately so the sandbox agent reports the final exit code out of band when the process exits auth is by the sandbox server token like get cluster credentials the caller may only update commands belonging to its own sandbox */ diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_cluster_details_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_cluster_details_parameters.go new file mode 100644 index 000000000..26b9bf429 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_cluster_details_parameters.go @@ -0,0 +1,183 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewClusterServiceGetClusterDetailsParams creates a new ClusterServiceGetClusterDetailsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterServiceGetClusterDetailsParams() *ClusterServiceGetClusterDetailsParams { + return &ClusterServiceGetClusterDetailsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterServiceGetClusterDetailsParamsWithTimeout creates a new ClusterServiceGetClusterDetailsParams object +// with the ability to set a timeout on a request. +func NewClusterServiceGetClusterDetailsParamsWithTimeout(timeout time.Duration) *ClusterServiceGetClusterDetailsParams { + return &ClusterServiceGetClusterDetailsParams{ + timeout: timeout, + } +} + +// NewClusterServiceGetClusterDetailsParamsWithContext creates a new ClusterServiceGetClusterDetailsParams object +// with the ability to set a context for a request. +func NewClusterServiceGetClusterDetailsParamsWithContext(ctx context.Context) *ClusterServiceGetClusterDetailsParams { + return &ClusterServiceGetClusterDetailsParams{ + Context: ctx, + } +} + +// NewClusterServiceGetClusterDetailsParamsWithHTTPClient creates a new ClusterServiceGetClusterDetailsParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterServiceGetClusterDetailsParamsWithHTTPClient(client *http.Client) *ClusterServiceGetClusterDetailsParams { + return &ClusterServiceGetClusterDetailsParams{ + HTTPClient: client, + } +} + +/* +ClusterServiceGetClusterDetailsParams contains all the parameters to send to the API endpoint + + for the cluster service get cluster details operation. + + Typically these are written to a http.Request. +*/ +type ClusterServiceGetClusterDetailsParams struct { + + // ClusterID. + ClusterID string + + // OrgID. + OrgID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster service get cluster details params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceGetClusterDetailsParams) WithDefaults() *ClusterServiceGetClusterDetailsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster service get cluster details params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceGetClusterDetailsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cluster service get cluster details params +func (o *ClusterServiceGetClusterDetailsParams) WithTimeout(timeout time.Duration) *ClusterServiceGetClusterDetailsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster service get cluster details params +func (o *ClusterServiceGetClusterDetailsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster service get cluster details params +func (o *ClusterServiceGetClusterDetailsParams) WithContext(ctx context.Context) *ClusterServiceGetClusterDetailsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster service get cluster details params +func (o *ClusterServiceGetClusterDetailsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster service get cluster details params +func (o *ClusterServiceGetClusterDetailsParams) WithHTTPClient(client *http.Client) *ClusterServiceGetClusterDetailsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster service get cluster details params +func (o *ClusterServiceGetClusterDetailsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClusterID adds the clusterID to the cluster service get cluster details params +func (o *ClusterServiceGetClusterDetailsParams) WithClusterID(clusterID string) *ClusterServiceGetClusterDetailsParams { + o.SetClusterID(clusterID) + return o +} + +// SetClusterID adds the clusterId to the cluster service get cluster details params +func (o *ClusterServiceGetClusterDetailsParams) SetClusterID(clusterID string) { + o.ClusterID = clusterID +} + +// WithOrgID adds the orgID to the cluster service get cluster details params +func (o *ClusterServiceGetClusterDetailsParams) WithOrgID(orgID *string) *ClusterServiceGetClusterDetailsParams { + o.SetOrgID(orgID) + return o +} + +// SetOrgID adds the orgId to the cluster service get cluster details params +func (o *ClusterServiceGetClusterDetailsParams) SetOrgID(orgID *string) { + o.OrgID = orgID +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterServiceGetClusterDetailsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param clusterId + if err := r.SetPathParam("clusterId", o.ClusterID); err != nil { + return err + } + + if o.OrgID != nil { + + // query param orgId + var qrOrgID string + + if o.OrgID != nil { + qrOrgID = *o.OrgID + } + qOrgID := qrOrgID + if qOrgID != "" { + + if err := r.SetQueryParam("orgId", qOrgID); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_cluster_details_responses.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_cluster_details_responses.go new file mode 100644 index 000000000..7a44aa75d --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_cluster_details_responses.go @@ -0,0 +1,192 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" +) + +// ClusterServiceGetClusterDetailsReader is a Reader for the ClusterServiceGetClusterDetails structure. +type ClusterServiceGetClusterDetailsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterServiceGetClusterDetailsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewClusterServiceGetClusterDetailsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewClusterServiceGetClusterDetailsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterServiceGetClusterDetailsOK creates a ClusterServiceGetClusterDetailsOK with default headers values +func NewClusterServiceGetClusterDetailsOK() *ClusterServiceGetClusterDetailsOK { + return &ClusterServiceGetClusterDetailsOK{} +} + +/* +ClusterServiceGetClusterDetailsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterServiceGetClusterDetailsOK struct { + Payload *models.V1GetClusterDetailsResponse +} + +// IsSuccess returns true when this cluster service get cluster details o k response has a 2xx status code +func (o *ClusterServiceGetClusterDetailsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cluster service get cluster details o k response has a 3xx status code +func (o *ClusterServiceGetClusterDetailsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cluster service get cluster details o k response has a 4xx status code +func (o *ClusterServiceGetClusterDetailsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cluster service get cluster details o k response has a 5xx status code +func (o *ClusterServiceGetClusterDetailsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cluster service get cluster details o k response a status code equal to that given +func (o *ClusterServiceGetClusterDetailsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cluster service get cluster details o k response +func (o *ClusterServiceGetClusterDetailsOK) Code() int { + return 200 +} + +func (o *ClusterServiceGetClusterDetailsOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/core/clusters/{clusterId}/details][%d] clusterServiceGetClusterDetailsOK %s", 200, payload) +} + +func (o *ClusterServiceGetClusterDetailsOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/core/clusters/{clusterId}/details][%d] clusterServiceGetClusterDetailsOK %s", 200, payload) +} + +func (o *ClusterServiceGetClusterDetailsOK) GetPayload() *models.V1GetClusterDetailsResponse { + return o.Payload +} + +func (o *ClusterServiceGetClusterDetailsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GetClusterDetailsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewClusterServiceGetClusterDetailsDefault creates a ClusterServiceGetClusterDetailsDefault with default headers values +func NewClusterServiceGetClusterDetailsDefault(code int) *ClusterServiceGetClusterDetailsDefault { + return &ClusterServiceGetClusterDetailsDefault{ + _statusCode: code, + } +} + +/* +ClusterServiceGetClusterDetailsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterServiceGetClusterDetailsDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this cluster service get cluster details default response has a 2xx status code +func (o *ClusterServiceGetClusterDetailsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this cluster service get cluster details default response has a 3xx status code +func (o *ClusterServiceGetClusterDetailsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this cluster service get cluster details default response has a 4xx status code +func (o *ClusterServiceGetClusterDetailsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this cluster service get cluster details default response has a 5xx status code +func (o *ClusterServiceGetClusterDetailsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this cluster service get cluster details default response a status code equal to that given +func (o *ClusterServiceGetClusterDetailsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the cluster service get cluster details default response +func (o *ClusterServiceGetClusterDetailsDefault) Code() int { + return o._statusCode +} + +func (o *ClusterServiceGetClusterDetailsDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/core/clusters/{clusterId}/details][%d] ClusterService_GetClusterDetails default %s", o._statusCode, payload) +} + +func (o *ClusterServiceGetClusterDetailsDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/core/clusters/{clusterId}/details][%d] ClusterService_GetClusterDetails default %s", o._statusCode, payload) +} + +func (o *ClusterServiceGetClusterDetailsDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ClusterServiceGetClusterDetailsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_cluster_reservation_usage_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_cluster_reservation_usage_parameters.go new file mode 100644 index 000000000..3b5861e7b --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_cluster_reservation_usage_parameters.go @@ -0,0 +1,256 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewClusterServiceGetClusterReservationUsageParams creates a new ClusterServiceGetClusterReservationUsageParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterServiceGetClusterReservationUsageParams() *ClusterServiceGetClusterReservationUsageParams { + return &ClusterServiceGetClusterReservationUsageParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterServiceGetClusterReservationUsageParamsWithTimeout creates a new ClusterServiceGetClusterReservationUsageParams object +// with the ability to set a timeout on a request. +func NewClusterServiceGetClusterReservationUsageParamsWithTimeout(timeout time.Duration) *ClusterServiceGetClusterReservationUsageParams { + return &ClusterServiceGetClusterReservationUsageParams{ + timeout: timeout, + } +} + +// NewClusterServiceGetClusterReservationUsageParamsWithContext creates a new ClusterServiceGetClusterReservationUsageParams object +// with the ability to set a context for a request. +func NewClusterServiceGetClusterReservationUsageParamsWithContext(ctx context.Context) *ClusterServiceGetClusterReservationUsageParams { + return &ClusterServiceGetClusterReservationUsageParams{ + Context: ctx, + } +} + +// NewClusterServiceGetClusterReservationUsageParamsWithHTTPClient creates a new ClusterServiceGetClusterReservationUsageParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterServiceGetClusterReservationUsageParamsWithHTTPClient(client *http.Client) *ClusterServiceGetClusterReservationUsageParams { + return &ClusterServiceGetClusterReservationUsageParams{ + HTTPClient: client, + } +} + +/* +ClusterServiceGetClusterReservationUsageParams contains all the parameters to send to the API endpoint + + for the cluster service get cluster reservation usage operation. + + Typically these are written to a http.Request. +*/ +type ClusterServiceGetClusterReservationUsageParams struct { + + // ClusterID. + ClusterID string + + // EndTime. + // + // Format: date-time + EndTime *strfmt.DateTime + + // OrgID. + OrgID string + + // ReservationID. + ReservationID string + + // StartTime. + // + // Format: date-time + StartTime *strfmt.DateTime + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster service get cluster reservation usage params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceGetClusterReservationUsageParams) WithDefaults() *ClusterServiceGetClusterReservationUsageParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster service get cluster reservation usage params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceGetClusterReservationUsageParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) WithTimeout(timeout time.Duration) *ClusterServiceGetClusterReservationUsageParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) WithContext(ctx context.Context) *ClusterServiceGetClusterReservationUsageParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) WithHTTPClient(client *http.Client) *ClusterServiceGetClusterReservationUsageParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClusterID adds the clusterID to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) WithClusterID(clusterID string) *ClusterServiceGetClusterReservationUsageParams { + o.SetClusterID(clusterID) + return o +} + +// SetClusterID adds the clusterId to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) SetClusterID(clusterID string) { + o.ClusterID = clusterID +} + +// WithEndTime adds the endTime to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) WithEndTime(endTime *strfmt.DateTime) *ClusterServiceGetClusterReservationUsageParams { + o.SetEndTime(endTime) + return o +} + +// SetEndTime adds the endTime to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) SetEndTime(endTime *strfmt.DateTime) { + o.EndTime = endTime +} + +// WithOrgID adds the orgID to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) WithOrgID(orgID string) *ClusterServiceGetClusterReservationUsageParams { + o.SetOrgID(orgID) + return o +} + +// SetOrgID adds the orgId to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) SetOrgID(orgID string) { + o.OrgID = orgID +} + +// WithReservationID adds the reservationID to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) WithReservationID(reservationID string) *ClusterServiceGetClusterReservationUsageParams { + o.SetReservationID(reservationID) + return o +} + +// SetReservationID adds the reservationId to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) SetReservationID(reservationID string) { + o.ReservationID = reservationID +} + +// WithStartTime adds the startTime to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) WithStartTime(startTime *strfmt.DateTime) *ClusterServiceGetClusterReservationUsageParams { + o.SetStartTime(startTime) + return o +} + +// SetStartTime adds the startTime to the cluster service get cluster reservation usage params +func (o *ClusterServiceGetClusterReservationUsageParams) SetStartTime(startTime *strfmt.DateTime) { + o.StartTime = startTime +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterServiceGetClusterReservationUsageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param clusterId + if err := r.SetPathParam("clusterId", o.ClusterID); err != nil { + return err + } + + if o.EndTime != nil { + + // query param endTime + var qrEndTime strfmt.DateTime + + if o.EndTime != nil { + qrEndTime = *o.EndTime + } + qEndTime := qrEndTime.String() + if qEndTime != "" { + + if err := r.SetQueryParam("endTime", qEndTime); err != nil { + return err + } + } + } + + // path param orgId + if err := r.SetPathParam("orgId", o.OrgID); err != nil { + return err + } + + // path param reservationId + if err := r.SetPathParam("reservationId", o.ReservationID); err != nil { + return err + } + + if o.StartTime != nil { + + // query param startTime + var qrStartTime strfmt.DateTime + + if o.StartTime != nil { + qrStartTime = *o.StartTime + } + qStartTime := qrStartTime.String() + if qStartTime != "" { + + if err := r.SetQueryParam("startTime", qStartTime); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_cluster_reservation_usage_responses.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_cluster_reservation_usage_responses.go new file mode 100644 index 000000000..0e64d2ed3 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_cluster_reservation_usage_responses.go @@ -0,0 +1,192 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" +) + +// ClusterServiceGetClusterReservationUsageReader is a Reader for the ClusterServiceGetClusterReservationUsage structure. +type ClusterServiceGetClusterReservationUsageReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterServiceGetClusterReservationUsageReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewClusterServiceGetClusterReservationUsageOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewClusterServiceGetClusterReservationUsageDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterServiceGetClusterReservationUsageOK creates a ClusterServiceGetClusterReservationUsageOK with default headers values +func NewClusterServiceGetClusterReservationUsageOK() *ClusterServiceGetClusterReservationUsageOK { + return &ClusterServiceGetClusterReservationUsageOK{} +} + +/* +ClusterServiceGetClusterReservationUsageOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterServiceGetClusterReservationUsageOK struct { + Payload *models.V1GetClusterReservationUsageResponse +} + +// IsSuccess returns true when this cluster service get cluster reservation usage o k response has a 2xx status code +func (o *ClusterServiceGetClusterReservationUsageOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cluster service get cluster reservation usage o k response has a 3xx status code +func (o *ClusterServiceGetClusterReservationUsageOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cluster service get cluster reservation usage o k response has a 4xx status code +func (o *ClusterServiceGetClusterReservationUsageOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cluster service get cluster reservation usage o k response has a 5xx status code +func (o *ClusterServiceGetClusterReservationUsageOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cluster service get cluster reservation usage o k response a status code equal to that given +func (o *ClusterServiceGetClusterReservationUsageOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cluster service get cluster reservation usage o k response +func (o *ClusterServiceGetClusterReservationUsageOK) Code() int { + return 200 +} + +func (o *ClusterServiceGetClusterReservationUsageOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/orgs/{orgId}/clusters/{clusterId}/capacity-reservations/{reservationId}/usage][%d] clusterServiceGetClusterReservationUsageOK %s", 200, payload) +} + +func (o *ClusterServiceGetClusterReservationUsageOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/orgs/{orgId}/clusters/{clusterId}/capacity-reservations/{reservationId}/usage][%d] clusterServiceGetClusterReservationUsageOK %s", 200, payload) +} + +func (o *ClusterServiceGetClusterReservationUsageOK) GetPayload() *models.V1GetClusterReservationUsageResponse { + return o.Payload +} + +func (o *ClusterServiceGetClusterReservationUsageOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GetClusterReservationUsageResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewClusterServiceGetClusterReservationUsageDefault creates a ClusterServiceGetClusterReservationUsageDefault with default headers values +func NewClusterServiceGetClusterReservationUsageDefault(code int) *ClusterServiceGetClusterReservationUsageDefault { + return &ClusterServiceGetClusterReservationUsageDefault{ + _statusCode: code, + } +} + +/* +ClusterServiceGetClusterReservationUsageDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterServiceGetClusterReservationUsageDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this cluster service get cluster reservation usage default response has a 2xx status code +func (o *ClusterServiceGetClusterReservationUsageDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this cluster service get cluster reservation usage default response has a 3xx status code +func (o *ClusterServiceGetClusterReservationUsageDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this cluster service get cluster reservation usage default response has a 4xx status code +func (o *ClusterServiceGetClusterReservationUsageDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this cluster service get cluster reservation usage default response has a 5xx status code +func (o *ClusterServiceGetClusterReservationUsageDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this cluster service get cluster reservation usage default response a status code equal to that given +func (o *ClusterServiceGetClusterReservationUsageDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the cluster service get cluster reservation usage default response +func (o *ClusterServiceGetClusterReservationUsageDefault) Code() int { + return o._statusCode +} + +func (o *ClusterServiceGetClusterReservationUsageDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/orgs/{orgId}/clusters/{clusterId}/capacity-reservations/{reservationId}/usage][%d] ClusterService_GetClusterReservationUsage default %s", o._statusCode, payload) +} + +func (o *ClusterServiceGetClusterReservationUsageDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/orgs/{orgId}/clusters/{clusterId}/capacity-reservations/{reservationId}/usage][%d] ClusterService_GetClusterReservationUsage default %s", o._statusCode, payload) +} + +func (o *ClusterServiceGetClusterReservationUsageDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ClusterServiceGetClusterReservationUsageDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_machine_setup_url_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_machine_setup_url_parameters.go new file mode 100644 index 000000000..723fe7596 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_machine_setup_url_parameters.go @@ -0,0 +1,186 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewClusterServiceGetMachineSetupURLParams creates a new ClusterServiceGetMachineSetupURLParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterServiceGetMachineSetupURLParams() *ClusterServiceGetMachineSetupURLParams { + return &ClusterServiceGetMachineSetupURLParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterServiceGetMachineSetupURLParamsWithTimeout creates a new ClusterServiceGetMachineSetupURLParams object +// with the ability to set a timeout on a request. +func NewClusterServiceGetMachineSetupURLParamsWithTimeout(timeout time.Duration) *ClusterServiceGetMachineSetupURLParams { + return &ClusterServiceGetMachineSetupURLParams{ + timeout: timeout, + } +} + +// NewClusterServiceGetMachineSetupURLParamsWithContext creates a new ClusterServiceGetMachineSetupURLParams object +// with the ability to set a context for a request. +func NewClusterServiceGetMachineSetupURLParamsWithContext(ctx context.Context) *ClusterServiceGetMachineSetupURLParams { + return &ClusterServiceGetMachineSetupURLParams{ + Context: ctx, + } +} + +// NewClusterServiceGetMachineSetupURLParamsWithHTTPClient creates a new ClusterServiceGetMachineSetupURLParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterServiceGetMachineSetupURLParamsWithHTTPClient(client *http.Client) *ClusterServiceGetMachineSetupURLParams { + return &ClusterServiceGetMachineSetupURLParams{ + HTTPClient: client, + } +} + +/* +ClusterServiceGetMachineSetupURLParams contains all the parameters to send to the API endpoint + + for the cluster service get machine setup URL operation. + + Typically these are written to a http.Request. +*/ +type ClusterServiceGetMachineSetupURLParams struct { + + // ClusterID. + ClusterID string + + /* OrgID. + + Optional. When set, the cluster must belong to this organization. + */ + OrgID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster service get machine setup URL params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceGetMachineSetupURLParams) WithDefaults() *ClusterServiceGetMachineSetupURLParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster service get machine setup URL params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceGetMachineSetupURLParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cluster service get machine setup URL params +func (o *ClusterServiceGetMachineSetupURLParams) WithTimeout(timeout time.Duration) *ClusterServiceGetMachineSetupURLParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster service get machine setup URL params +func (o *ClusterServiceGetMachineSetupURLParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster service get machine setup URL params +func (o *ClusterServiceGetMachineSetupURLParams) WithContext(ctx context.Context) *ClusterServiceGetMachineSetupURLParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster service get machine setup URL params +func (o *ClusterServiceGetMachineSetupURLParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster service get machine setup URL params +func (o *ClusterServiceGetMachineSetupURLParams) WithHTTPClient(client *http.Client) *ClusterServiceGetMachineSetupURLParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster service get machine setup URL params +func (o *ClusterServiceGetMachineSetupURLParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClusterID adds the clusterID to the cluster service get machine setup URL params +func (o *ClusterServiceGetMachineSetupURLParams) WithClusterID(clusterID string) *ClusterServiceGetMachineSetupURLParams { + o.SetClusterID(clusterID) + return o +} + +// SetClusterID adds the clusterId to the cluster service get machine setup URL params +func (o *ClusterServiceGetMachineSetupURLParams) SetClusterID(clusterID string) { + o.ClusterID = clusterID +} + +// WithOrgID adds the orgID to the cluster service get machine setup URL params +func (o *ClusterServiceGetMachineSetupURLParams) WithOrgID(orgID *string) *ClusterServiceGetMachineSetupURLParams { + o.SetOrgID(orgID) + return o +} + +// SetOrgID adds the orgId to the cluster service get machine setup URL params +func (o *ClusterServiceGetMachineSetupURLParams) SetOrgID(orgID *string) { + o.OrgID = orgID +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterServiceGetMachineSetupURLParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param clusterId + if err := r.SetPathParam("clusterId", o.ClusterID); err != nil { + return err + } + + if o.OrgID != nil { + + // query param orgId + var qrOrgID string + + if o.OrgID != nil { + qrOrgID = *o.OrgID + } + qOrgID := qrOrgID + if qOrgID != "" { + + if err := r.SetQueryParam("orgId", qOrgID); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_machine_setup_url_responses.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_machine_setup_url_responses.go new file mode 100644 index 000000000..0a902ddf9 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_get_machine_setup_url_responses.go @@ -0,0 +1,192 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" +) + +// ClusterServiceGetMachineSetupURLReader is a Reader for the ClusterServiceGetMachineSetupURL structure. +type ClusterServiceGetMachineSetupURLReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterServiceGetMachineSetupURLReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewClusterServiceGetMachineSetupURLOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewClusterServiceGetMachineSetupURLDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterServiceGetMachineSetupURLOK creates a ClusterServiceGetMachineSetupURLOK with default headers values +func NewClusterServiceGetMachineSetupURLOK() *ClusterServiceGetMachineSetupURLOK { + return &ClusterServiceGetMachineSetupURLOK{} +} + +/* +ClusterServiceGetMachineSetupURLOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterServiceGetMachineSetupURLOK struct { + Payload *models.V1GetMachineSetupURLResponse +} + +// IsSuccess returns true when this cluster service get machine setup Url o k response has a 2xx status code +func (o *ClusterServiceGetMachineSetupURLOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cluster service get machine setup Url o k response has a 3xx status code +func (o *ClusterServiceGetMachineSetupURLOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cluster service get machine setup Url o k response has a 4xx status code +func (o *ClusterServiceGetMachineSetupURLOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cluster service get machine setup Url o k response has a 5xx status code +func (o *ClusterServiceGetMachineSetupURLOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cluster service get machine setup Url o k response a status code equal to that given +func (o *ClusterServiceGetMachineSetupURLOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cluster service get machine setup Url o k response +func (o *ClusterServiceGetMachineSetupURLOK) Code() int { + return 200 +} + +func (o *ClusterServiceGetMachineSetupURLOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/core/clusters/{clusterId}/machine-setup-url][%d] clusterServiceGetMachineSetupUrlOK %s", 200, payload) +} + +func (o *ClusterServiceGetMachineSetupURLOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/core/clusters/{clusterId}/machine-setup-url][%d] clusterServiceGetMachineSetupUrlOK %s", 200, payload) +} + +func (o *ClusterServiceGetMachineSetupURLOK) GetPayload() *models.V1GetMachineSetupURLResponse { + return o.Payload +} + +func (o *ClusterServiceGetMachineSetupURLOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GetMachineSetupURLResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewClusterServiceGetMachineSetupURLDefault creates a ClusterServiceGetMachineSetupURLDefault with default headers values +func NewClusterServiceGetMachineSetupURLDefault(code int) *ClusterServiceGetMachineSetupURLDefault { + return &ClusterServiceGetMachineSetupURLDefault{ + _statusCode: code, + } +} + +/* +ClusterServiceGetMachineSetupURLDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterServiceGetMachineSetupURLDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this cluster service get machine setup URL default response has a 2xx status code +func (o *ClusterServiceGetMachineSetupURLDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this cluster service get machine setup URL default response has a 3xx status code +func (o *ClusterServiceGetMachineSetupURLDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this cluster service get machine setup URL default response has a 4xx status code +func (o *ClusterServiceGetMachineSetupURLDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this cluster service get machine setup URL default response has a 5xx status code +func (o *ClusterServiceGetMachineSetupURLDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this cluster service get machine setup URL default response a status code equal to that given +func (o *ClusterServiceGetMachineSetupURLDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the cluster service get machine setup URL default response +func (o *ClusterServiceGetMachineSetupURLDefault) Code() int { + return o._statusCode +} + +func (o *ClusterServiceGetMachineSetupURLDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/core/clusters/{clusterId}/machine-setup-url][%d] ClusterService_GetMachineSetupURL default %s", o._statusCode, payload) +} + +func (o *ClusterServiceGetMachineSetupURLDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/core/clusters/{clusterId}/machine-setup-url][%d] ClusterService_GetMachineSetupURL default %s", o._statusCode, payload) +} + +func (o *ClusterServiceGetMachineSetupURLDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ClusterServiceGetMachineSetupURLDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_list_cluster_reservations_for_usage_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_list_cluster_reservations_for_usage_parameters.go new file mode 100644 index 000000000..afd26e6b7 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_list_cluster_reservations_for_usage_parameters.go @@ -0,0 +1,171 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewClusterServiceListClusterReservationsForUsageParams creates a new ClusterServiceListClusterReservationsForUsageParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterServiceListClusterReservationsForUsageParams() *ClusterServiceListClusterReservationsForUsageParams { + return &ClusterServiceListClusterReservationsForUsageParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterServiceListClusterReservationsForUsageParamsWithTimeout creates a new ClusterServiceListClusterReservationsForUsageParams object +// with the ability to set a timeout on a request. +func NewClusterServiceListClusterReservationsForUsageParamsWithTimeout(timeout time.Duration) *ClusterServiceListClusterReservationsForUsageParams { + return &ClusterServiceListClusterReservationsForUsageParams{ + timeout: timeout, + } +} + +// NewClusterServiceListClusterReservationsForUsageParamsWithContext creates a new ClusterServiceListClusterReservationsForUsageParams object +// with the ability to set a context for a request. +func NewClusterServiceListClusterReservationsForUsageParamsWithContext(ctx context.Context) *ClusterServiceListClusterReservationsForUsageParams { + return &ClusterServiceListClusterReservationsForUsageParams{ + Context: ctx, + } +} + +// NewClusterServiceListClusterReservationsForUsageParamsWithHTTPClient creates a new ClusterServiceListClusterReservationsForUsageParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterServiceListClusterReservationsForUsageParamsWithHTTPClient(client *http.Client) *ClusterServiceListClusterReservationsForUsageParams { + return &ClusterServiceListClusterReservationsForUsageParams{ + HTTPClient: client, + } +} + +/* +ClusterServiceListClusterReservationsForUsageParams contains all the parameters to send to the API endpoint + + for the cluster service list cluster reservations for usage operation. + + Typically these are written to a http.Request. +*/ +type ClusterServiceListClusterReservationsForUsageParams struct { + + // ClusterID. + ClusterID string + + // OrgID. + OrgID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster service list cluster reservations for usage params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceListClusterReservationsForUsageParams) WithDefaults() *ClusterServiceListClusterReservationsForUsageParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster service list cluster reservations for usage params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceListClusterReservationsForUsageParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cluster service list cluster reservations for usage params +func (o *ClusterServiceListClusterReservationsForUsageParams) WithTimeout(timeout time.Duration) *ClusterServiceListClusterReservationsForUsageParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster service list cluster reservations for usage params +func (o *ClusterServiceListClusterReservationsForUsageParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster service list cluster reservations for usage params +func (o *ClusterServiceListClusterReservationsForUsageParams) WithContext(ctx context.Context) *ClusterServiceListClusterReservationsForUsageParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster service list cluster reservations for usage params +func (o *ClusterServiceListClusterReservationsForUsageParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster service list cluster reservations for usage params +func (o *ClusterServiceListClusterReservationsForUsageParams) WithHTTPClient(client *http.Client) *ClusterServiceListClusterReservationsForUsageParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster service list cluster reservations for usage params +func (o *ClusterServiceListClusterReservationsForUsageParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClusterID adds the clusterID to the cluster service list cluster reservations for usage params +func (o *ClusterServiceListClusterReservationsForUsageParams) WithClusterID(clusterID string) *ClusterServiceListClusterReservationsForUsageParams { + o.SetClusterID(clusterID) + return o +} + +// SetClusterID adds the clusterId to the cluster service list cluster reservations for usage params +func (o *ClusterServiceListClusterReservationsForUsageParams) SetClusterID(clusterID string) { + o.ClusterID = clusterID +} + +// WithOrgID adds the orgID to the cluster service list cluster reservations for usage params +func (o *ClusterServiceListClusterReservationsForUsageParams) WithOrgID(orgID string) *ClusterServiceListClusterReservationsForUsageParams { + o.SetOrgID(orgID) + return o +} + +// SetOrgID adds the orgId to the cluster service list cluster reservations for usage params +func (o *ClusterServiceListClusterReservationsForUsageParams) SetOrgID(orgID string) { + o.OrgID = orgID +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterServiceListClusterReservationsForUsageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param clusterId + if err := r.SetPathParam("clusterId", o.ClusterID); err != nil { + return err + } + + // path param orgId + if err := r.SetPathParam("orgId", o.OrgID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_list_cluster_reservations_for_usage_responses.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_list_cluster_reservations_for_usage_responses.go new file mode 100644 index 000000000..ae535e4ce --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_list_cluster_reservations_for_usage_responses.go @@ -0,0 +1,192 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" +) + +// ClusterServiceListClusterReservationsForUsageReader is a Reader for the ClusterServiceListClusterReservationsForUsage structure. +type ClusterServiceListClusterReservationsForUsageReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterServiceListClusterReservationsForUsageReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewClusterServiceListClusterReservationsForUsageOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewClusterServiceListClusterReservationsForUsageDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterServiceListClusterReservationsForUsageOK creates a ClusterServiceListClusterReservationsForUsageOK with default headers values +func NewClusterServiceListClusterReservationsForUsageOK() *ClusterServiceListClusterReservationsForUsageOK { + return &ClusterServiceListClusterReservationsForUsageOK{} +} + +/* +ClusterServiceListClusterReservationsForUsageOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterServiceListClusterReservationsForUsageOK struct { + Payload *models.V1ListClusterReservationsForUsageResponse +} + +// IsSuccess returns true when this cluster service list cluster reservations for usage o k response has a 2xx status code +func (o *ClusterServiceListClusterReservationsForUsageOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cluster service list cluster reservations for usage o k response has a 3xx status code +func (o *ClusterServiceListClusterReservationsForUsageOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cluster service list cluster reservations for usage o k response has a 4xx status code +func (o *ClusterServiceListClusterReservationsForUsageOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cluster service list cluster reservations for usage o k response has a 5xx status code +func (o *ClusterServiceListClusterReservationsForUsageOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cluster service list cluster reservations for usage o k response a status code equal to that given +func (o *ClusterServiceListClusterReservationsForUsageOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cluster service list cluster reservations for usage o k response +func (o *ClusterServiceListClusterReservationsForUsageOK) Code() int { + return 200 +} + +func (o *ClusterServiceListClusterReservationsForUsageOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/orgs/{orgId}/clusters/{clusterId}/reservation-usage][%d] clusterServiceListClusterReservationsForUsageOK %s", 200, payload) +} + +func (o *ClusterServiceListClusterReservationsForUsageOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/orgs/{orgId}/clusters/{clusterId}/reservation-usage][%d] clusterServiceListClusterReservationsForUsageOK %s", 200, payload) +} + +func (o *ClusterServiceListClusterReservationsForUsageOK) GetPayload() *models.V1ListClusterReservationsForUsageResponse { + return o.Payload +} + +func (o *ClusterServiceListClusterReservationsForUsageOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ListClusterReservationsForUsageResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewClusterServiceListClusterReservationsForUsageDefault creates a ClusterServiceListClusterReservationsForUsageDefault with default headers values +func NewClusterServiceListClusterReservationsForUsageDefault(code int) *ClusterServiceListClusterReservationsForUsageDefault { + return &ClusterServiceListClusterReservationsForUsageDefault{ + _statusCode: code, + } +} + +/* +ClusterServiceListClusterReservationsForUsageDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterServiceListClusterReservationsForUsageDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this cluster service list cluster reservations for usage default response has a 2xx status code +func (o *ClusterServiceListClusterReservationsForUsageDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this cluster service list cluster reservations for usage default response has a 3xx status code +func (o *ClusterServiceListClusterReservationsForUsageDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this cluster service list cluster reservations for usage default response has a 4xx status code +func (o *ClusterServiceListClusterReservationsForUsageDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this cluster service list cluster reservations for usage default response has a 5xx status code +func (o *ClusterServiceListClusterReservationsForUsageDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this cluster service list cluster reservations for usage default response a status code equal to that given +func (o *ClusterServiceListClusterReservationsForUsageDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the cluster service list cluster reservations for usage default response +func (o *ClusterServiceListClusterReservationsForUsageDefault) Code() int { + return o._statusCode +} + +func (o *ClusterServiceListClusterReservationsForUsageDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/orgs/{orgId}/clusters/{clusterId}/reservation-usage][%d] ClusterService_ListClusterReservationsForUsage default %s", o._statusCode, payload) +} + +func (o *ClusterServiceListClusterReservationsForUsageDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/orgs/{orgId}/clusters/{clusterId}/reservation-usage][%d] ClusterService_ListClusterReservationsForUsage default %s", o._statusCode, payload) +} + +func (o *ClusterServiceListClusterReservationsForUsageDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ClusterServiceListClusterReservationsForUsageDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_list_provider_fleet_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_list_provider_fleet_parameters.go new file mode 100644 index 000000000..c30730033 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_list_provider_fleet_parameters.go @@ -0,0 +1,217 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewClusterServiceListProviderFleetParams creates a new ClusterServiceListProviderFleetParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterServiceListProviderFleetParams() *ClusterServiceListProviderFleetParams { + return &ClusterServiceListProviderFleetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterServiceListProviderFleetParamsWithTimeout creates a new ClusterServiceListProviderFleetParams object +// with the ability to set a timeout on a request. +func NewClusterServiceListProviderFleetParamsWithTimeout(timeout time.Duration) *ClusterServiceListProviderFleetParams { + return &ClusterServiceListProviderFleetParams{ + timeout: timeout, + } +} + +// NewClusterServiceListProviderFleetParamsWithContext creates a new ClusterServiceListProviderFleetParams object +// with the ability to set a context for a request. +func NewClusterServiceListProviderFleetParamsWithContext(ctx context.Context) *ClusterServiceListProviderFleetParams { + return &ClusterServiceListProviderFleetParams{ + Context: ctx, + } +} + +// NewClusterServiceListProviderFleetParamsWithHTTPClient creates a new ClusterServiceListProviderFleetParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterServiceListProviderFleetParamsWithHTTPClient(client *http.Client) *ClusterServiceListProviderFleetParams { + return &ClusterServiceListProviderFleetParams{ + HTTPClient: client, + } +} + +/* +ClusterServiceListProviderFleetParams contains all the parameters to send to the API endpoint + + for the cluster service list provider fleet operation. + + Typically these are written to a http.Request. +*/ +type ClusterServiceListProviderFleetParams struct { + + // ClusterID. + ClusterID string + + // HistoryDays. + // + // Format: int32 + HistoryDays *int32 + + // OrgID. + OrgID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster service list provider fleet params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceListProviderFleetParams) WithDefaults() *ClusterServiceListProviderFleetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster service list provider fleet params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceListProviderFleetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cluster service list provider fleet params +func (o *ClusterServiceListProviderFleetParams) WithTimeout(timeout time.Duration) *ClusterServiceListProviderFleetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster service list provider fleet params +func (o *ClusterServiceListProviderFleetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster service list provider fleet params +func (o *ClusterServiceListProviderFleetParams) WithContext(ctx context.Context) *ClusterServiceListProviderFleetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster service list provider fleet params +func (o *ClusterServiceListProviderFleetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster service list provider fleet params +func (o *ClusterServiceListProviderFleetParams) WithHTTPClient(client *http.Client) *ClusterServiceListProviderFleetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster service list provider fleet params +func (o *ClusterServiceListProviderFleetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClusterID adds the clusterID to the cluster service list provider fleet params +func (o *ClusterServiceListProviderFleetParams) WithClusterID(clusterID string) *ClusterServiceListProviderFleetParams { + o.SetClusterID(clusterID) + return o +} + +// SetClusterID adds the clusterId to the cluster service list provider fleet params +func (o *ClusterServiceListProviderFleetParams) SetClusterID(clusterID string) { + o.ClusterID = clusterID +} + +// WithHistoryDays adds the historyDays to the cluster service list provider fleet params +func (o *ClusterServiceListProviderFleetParams) WithHistoryDays(historyDays *int32) *ClusterServiceListProviderFleetParams { + o.SetHistoryDays(historyDays) + return o +} + +// SetHistoryDays adds the historyDays to the cluster service list provider fleet params +func (o *ClusterServiceListProviderFleetParams) SetHistoryDays(historyDays *int32) { + o.HistoryDays = historyDays +} + +// WithOrgID adds the orgID to the cluster service list provider fleet params +func (o *ClusterServiceListProviderFleetParams) WithOrgID(orgID *string) *ClusterServiceListProviderFleetParams { + o.SetOrgID(orgID) + return o +} + +// SetOrgID adds the orgId to the cluster service list provider fleet params +func (o *ClusterServiceListProviderFleetParams) SetOrgID(orgID *string) { + o.OrgID = orgID +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterServiceListProviderFleetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param clusterId + if err := r.SetPathParam("clusterId", o.ClusterID); err != nil { + return err + } + + if o.HistoryDays != nil { + + // query param historyDays + var qrHistoryDays int32 + + if o.HistoryDays != nil { + qrHistoryDays = *o.HistoryDays + } + qHistoryDays := swag.FormatInt32(qrHistoryDays) + if qHistoryDays != "" { + + if err := r.SetQueryParam("historyDays", qHistoryDays); err != nil { + return err + } + } + } + + if o.OrgID != nil { + + // query param orgId + var qrOrgID string + + if o.OrgID != nil { + qrOrgID = *o.OrgID + } + qOrgID := qrOrgID + if qOrgID != "" { + + if err := r.SetQueryParam("orgId", qOrgID); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_list_provider_fleet_responses.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_list_provider_fleet_responses.go new file mode 100644 index 000000000..4ec5dd5ac --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_list_provider_fleet_responses.go @@ -0,0 +1,192 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" +) + +// ClusterServiceListProviderFleetReader is a Reader for the ClusterServiceListProviderFleet structure. +type ClusterServiceListProviderFleetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterServiceListProviderFleetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewClusterServiceListProviderFleetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewClusterServiceListProviderFleetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterServiceListProviderFleetOK creates a ClusterServiceListProviderFleetOK with default headers values +func NewClusterServiceListProviderFleetOK() *ClusterServiceListProviderFleetOK { + return &ClusterServiceListProviderFleetOK{} +} + +/* +ClusterServiceListProviderFleetOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterServiceListProviderFleetOK struct { + Payload *models.V1ListProviderFleetResponse +} + +// IsSuccess returns true when this cluster service list provider fleet o k response has a 2xx status code +func (o *ClusterServiceListProviderFleetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cluster service list provider fleet o k response has a 3xx status code +func (o *ClusterServiceListProviderFleetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cluster service list provider fleet o k response has a 4xx status code +func (o *ClusterServiceListProviderFleetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cluster service list provider fleet o k response has a 5xx status code +func (o *ClusterServiceListProviderFleetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cluster service list provider fleet o k response a status code equal to that given +func (o *ClusterServiceListProviderFleetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cluster service list provider fleet o k response +func (o *ClusterServiceListProviderFleetOK) Code() int { + return 200 +} + +func (o *ClusterServiceListProviderFleetOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/core/clusters/{clusterId}/provider-fleet][%d] clusterServiceListProviderFleetOK %s", 200, payload) +} + +func (o *ClusterServiceListProviderFleetOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/core/clusters/{clusterId}/provider-fleet][%d] clusterServiceListProviderFleetOK %s", 200, payload) +} + +func (o *ClusterServiceListProviderFleetOK) GetPayload() *models.V1ListProviderFleetResponse { + return o.Payload +} + +func (o *ClusterServiceListProviderFleetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ListProviderFleetResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewClusterServiceListProviderFleetDefault creates a ClusterServiceListProviderFleetDefault with default headers values +func NewClusterServiceListProviderFleetDefault(code int) *ClusterServiceListProviderFleetDefault { + return &ClusterServiceListProviderFleetDefault{ + _statusCode: code, + } +} + +/* +ClusterServiceListProviderFleetDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterServiceListProviderFleetDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this cluster service list provider fleet default response has a 2xx status code +func (o *ClusterServiceListProviderFleetDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this cluster service list provider fleet default response has a 3xx status code +func (o *ClusterServiceListProviderFleetDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this cluster service list provider fleet default response has a 4xx status code +func (o *ClusterServiceListProviderFleetDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this cluster service list provider fleet default response has a 5xx status code +func (o *ClusterServiceListProviderFleetDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this cluster service list provider fleet default response a status code equal to that given +func (o *ClusterServiceListProviderFleetDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the cluster service list provider fleet default response +func (o *ClusterServiceListProviderFleetDefault) Code() int { + return o._statusCode +} + +func (o *ClusterServiceListProviderFleetDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/core/clusters/{clusterId}/provider-fleet][%d] ClusterService_ListProviderFleet default %s", o._statusCode, payload) +} + +func (o *ClusterServiceListProviderFleetDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/core/clusters/{clusterId}/provider-fleet][%d] ClusterService_ListProviderFleet default %s", o._statusCode, payload) +} + +func (o *ClusterServiceListProviderFleetDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ClusterServiceListProviderFleetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_set_machine_v_p_n_services_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_set_machine_v_p_n_services_parameters.go new file mode 100644 index 000000000..16e8b484c --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_set_machine_v_p_n_services_parameters.go @@ -0,0 +1,192 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" +) + +// NewClusterServiceSetMachineVPNServicesParams creates a new ClusterServiceSetMachineVPNServicesParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterServiceSetMachineVPNServicesParams() *ClusterServiceSetMachineVPNServicesParams { + return &ClusterServiceSetMachineVPNServicesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterServiceSetMachineVPNServicesParamsWithTimeout creates a new ClusterServiceSetMachineVPNServicesParams object +// with the ability to set a timeout on a request. +func NewClusterServiceSetMachineVPNServicesParamsWithTimeout(timeout time.Duration) *ClusterServiceSetMachineVPNServicesParams { + return &ClusterServiceSetMachineVPNServicesParams{ + timeout: timeout, + } +} + +// NewClusterServiceSetMachineVPNServicesParamsWithContext creates a new ClusterServiceSetMachineVPNServicesParams object +// with the ability to set a context for a request. +func NewClusterServiceSetMachineVPNServicesParamsWithContext(ctx context.Context) *ClusterServiceSetMachineVPNServicesParams { + return &ClusterServiceSetMachineVPNServicesParams{ + Context: ctx, + } +} + +// NewClusterServiceSetMachineVPNServicesParamsWithHTTPClient creates a new ClusterServiceSetMachineVPNServicesParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterServiceSetMachineVPNServicesParamsWithHTTPClient(client *http.Client) *ClusterServiceSetMachineVPNServicesParams { + return &ClusterServiceSetMachineVPNServicesParams{ + HTTPClient: client, + } +} + +/* +ClusterServiceSetMachineVPNServicesParams contains all the parameters to send to the API endpoint + + for the cluster service set machine v p n services operation. + + Typically these are written to a http.Request. +*/ +type ClusterServiceSetMachineVPNServicesParams struct { + + // Body. + Body *models.ClusterServiceSetMachineVPNServicesBody + + // ClusterID. + ClusterID string + + // ID. + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster service set machine v p n services params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceSetMachineVPNServicesParams) WithDefaults() *ClusterServiceSetMachineVPNServicesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster service set machine v p n services params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceSetMachineVPNServicesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cluster service set machine v p n services params +func (o *ClusterServiceSetMachineVPNServicesParams) WithTimeout(timeout time.Duration) *ClusterServiceSetMachineVPNServicesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster service set machine v p n services params +func (o *ClusterServiceSetMachineVPNServicesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster service set machine v p n services params +func (o *ClusterServiceSetMachineVPNServicesParams) WithContext(ctx context.Context) *ClusterServiceSetMachineVPNServicesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster service set machine v p n services params +func (o *ClusterServiceSetMachineVPNServicesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster service set machine v p n services params +func (o *ClusterServiceSetMachineVPNServicesParams) WithHTTPClient(client *http.Client) *ClusterServiceSetMachineVPNServicesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster service set machine v p n services params +func (o *ClusterServiceSetMachineVPNServicesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the cluster service set machine v p n services params +func (o *ClusterServiceSetMachineVPNServicesParams) WithBody(body *models.ClusterServiceSetMachineVPNServicesBody) *ClusterServiceSetMachineVPNServicesParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the cluster service set machine v p n services params +func (o *ClusterServiceSetMachineVPNServicesParams) SetBody(body *models.ClusterServiceSetMachineVPNServicesBody) { + o.Body = body +} + +// WithClusterID adds the clusterID to the cluster service set machine v p n services params +func (o *ClusterServiceSetMachineVPNServicesParams) WithClusterID(clusterID string) *ClusterServiceSetMachineVPNServicesParams { + o.SetClusterID(clusterID) + return o +} + +// SetClusterID adds the clusterId to the cluster service set machine v p n services params +func (o *ClusterServiceSetMachineVPNServicesParams) SetClusterID(clusterID string) { + o.ClusterID = clusterID +} + +// WithID adds the id to the cluster service set machine v p n services params +func (o *ClusterServiceSetMachineVPNServicesParams) WithID(id string) *ClusterServiceSetMachineVPNServicesParams { + o.SetID(id) + return o +} + +// SetID adds the id to the cluster service set machine v p n services params +func (o *ClusterServiceSetMachineVPNServicesParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterServiceSetMachineVPNServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param clusterId + if err := r.SetPathParam("clusterId", o.ClusterID); err != nil { + return err + } + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_set_machine_v_p_n_services_responses.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_set_machine_v_p_n_services_responses.go new file mode 100644 index 000000000..d3a6d06bf --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_set_machine_v_p_n_services_responses.go @@ -0,0 +1,190 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" +) + +// ClusterServiceSetMachineVPNServicesReader is a Reader for the ClusterServiceSetMachineVPNServices structure. +type ClusterServiceSetMachineVPNServicesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterServiceSetMachineVPNServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewClusterServiceSetMachineVPNServicesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewClusterServiceSetMachineVPNServicesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterServiceSetMachineVPNServicesOK creates a ClusterServiceSetMachineVPNServicesOK with default headers values +func NewClusterServiceSetMachineVPNServicesOK() *ClusterServiceSetMachineVPNServicesOK { + return &ClusterServiceSetMachineVPNServicesOK{} +} + +/* +ClusterServiceSetMachineVPNServicesOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterServiceSetMachineVPNServicesOK struct { + Payload models.V1SetMachineVPNServicesResponse +} + +// IsSuccess returns true when this cluster service set machine v p n services o k response has a 2xx status code +func (o *ClusterServiceSetMachineVPNServicesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cluster service set machine v p n services o k response has a 3xx status code +func (o *ClusterServiceSetMachineVPNServicesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cluster service set machine v p n services o k response has a 4xx status code +func (o *ClusterServiceSetMachineVPNServicesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cluster service set machine v p n services o k response has a 5xx status code +func (o *ClusterServiceSetMachineVPNServicesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cluster service set machine v p n services o k response a status code equal to that given +func (o *ClusterServiceSetMachineVPNServicesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cluster service set machine v p n services o k response +func (o *ClusterServiceSetMachineVPNServicesOK) Code() int { + return 200 +} + +func (o *ClusterServiceSetMachineVPNServicesOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/core/clusters/{clusterId}/machines/{id}/vpn][%d] clusterServiceSetMachineVPNServicesOK %s", 200, payload) +} + +func (o *ClusterServiceSetMachineVPNServicesOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/core/clusters/{clusterId}/machines/{id}/vpn][%d] clusterServiceSetMachineVPNServicesOK %s", 200, payload) +} + +func (o *ClusterServiceSetMachineVPNServicesOK) GetPayload() models.V1SetMachineVPNServicesResponse { + return o.Payload +} + +func (o *ClusterServiceSetMachineVPNServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewClusterServiceSetMachineVPNServicesDefault creates a ClusterServiceSetMachineVPNServicesDefault with default headers values +func NewClusterServiceSetMachineVPNServicesDefault(code int) *ClusterServiceSetMachineVPNServicesDefault { + return &ClusterServiceSetMachineVPNServicesDefault{ + _statusCode: code, + } +} + +/* +ClusterServiceSetMachineVPNServicesDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterServiceSetMachineVPNServicesDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this cluster service set machine v p n services default response has a 2xx status code +func (o *ClusterServiceSetMachineVPNServicesDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this cluster service set machine v p n services default response has a 3xx status code +func (o *ClusterServiceSetMachineVPNServicesDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this cluster service set machine v p n services default response has a 4xx status code +func (o *ClusterServiceSetMachineVPNServicesDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this cluster service set machine v p n services default response has a 5xx status code +func (o *ClusterServiceSetMachineVPNServicesDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this cluster service set machine v p n services default response a status code equal to that given +func (o *ClusterServiceSetMachineVPNServicesDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the cluster service set machine v p n services default response +func (o *ClusterServiceSetMachineVPNServicesDefault) Code() int { + return o._statusCode +} + +func (o *ClusterServiceSetMachineVPNServicesDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/core/clusters/{clusterId}/machines/{id}/vpn][%d] ClusterService_SetMachineVPNServices default %s", o._statusCode, payload) +} + +func (o *ClusterServiceSetMachineVPNServicesDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/core/clusters/{clusterId}/machines/{id}/vpn][%d] ClusterService_SetMachineVPNServices default %s", o._statusCode, payload) +} + +func (o *ClusterServiceSetMachineVPNServicesDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ClusterServiceSetMachineVPNServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_update_provider_fleet_owner_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_update_provider_fleet_owner_parameters.go new file mode 100644 index 000000000..d3752a9d5 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_update_provider_fleet_owner_parameters.go @@ -0,0 +1,192 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" +) + +// NewClusterServiceUpdateProviderFleetOwnerParams creates a new ClusterServiceUpdateProviderFleetOwnerParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterServiceUpdateProviderFleetOwnerParams() *ClusterServiceUpdateProviderFleetOwnerParams { + return &ClusterServiceUpdateProviderFleetOwnerParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterServiceUpdateProviderFleetOwnerParamsWithTimeout creates a new ClusterServiceUpdateProviderFleetOwnerParams object +// with the ability to set a timeout on a request. +func NewClusterServiceUpdateProviderFleetOwnerParamsWithTimeout(timeout time.Duration) *ClusterServiceUpdateProviderFleetOwnerParams { + return &ClusterServiceUpdateProviderFleetOwnerParams{ + timeout: timeout, + } +} + +// NewClusterServiceUpdateProviderFleetOwnerParamsWithContext creates a new ClusterServiceUpdateProviderFleetOwnerParams object +// with the ability to set a context for a request. +func NewClusterServiceUpdateProviderFleetOwnerParamsWithContext(ctx context.Context) *ClusterServiceUpdateProviderFleetOwnerParams { + return &ClusterServiceUpdateProviderFleetOwnerParams{ + Context: ctx, + } +} + +// NewClusterServiceUpdateProviderFleetOwnerParamsWithHTTPClient creates a new ClusterServiceUpdateProviderFleetOwnerParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterServiceUpdateProviderFleetOwnerParamsWithHTTPClient(client *http.Client) *ClusterServiceUpdateProviderFleetOwnerParams { + return &ClusterServiceUpdateProviderFleetOwnerParams{ + HTTPClient: client, + } +} + +/* +ClusterServiceUpdateProviderFleetOwnerParams contains all the parameters to send to the API endpoint + + for the cluster service update provider fleet owner operation. + + Typically these are written to a http.Request. +*/ +type ClusterServiceUpdateProviderFleetOwnerParams struct { + + // Body. + Body *models.ClusterServiceUpdateProviderFleetOwnerBody + + // ClusterID. + ClusterID string + + // NodeID. + NodeID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster service update provider fleet owner params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceUpdateProviderFleetOwnerParams) WithDefaults() *ClusterServiceUpdateProviderFleetOwnerParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster service update provider fleet owner params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceUpdateProviderFleetOwnerParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cluster service update provider fleet owner params +func (o *ClusterServiceUpdateProviderFleetOwnerParams) WithTimeout(timeout time.Duration) *ClusterServiceUpdateProviderFleetOwnerParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster service update provider fleet owner params +func (o *ClusterServiceUpdateProviderFleetOwnerParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster service update provider fleet owner params +func (o *ClusterServiceUpdateProviderFleetOwnerParams) WithContext(ctx context.Context) *ClusterServiceUpdateProviderFleetOwnerParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster service update provider fleet owner params +func (o *ClusterServiceUpdateProviderFleetOwnerParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster service update provider fleet owner params +func (o *ClusterServiceUpdateProviderFleetOwnerParams) WithHTTPClient(client *http.Client) *ClusterServiceUpdateProviderFleetOwnerParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster service update provider fleet owner params +func (o *ClusterServiceUpdateProviderFleetOwnerParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the cluster service update provider fleet owner params +func (o *ClusterServiceUpdateProviderFleetOwnerParams) WithBody(body *models.ClusterServiceUpdateProviderFleetOwnerBody) *ClusterServiceUpdateProviderFleetOwnerParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the cluster service update provider fleet owner params +func (o *ClusterServiceUpdateProviderFleetOwnerParams) SetBody(body *models.ClusterServiceUpdateProviderFleetOwnerBody) { + o.Body = body +} + +// WithClusterID adds the clusterID to the cluster service update provider fleet owner params +func (o *ClusterServiceUpdateProviderFleetOwnerParams) WithClusterID(clusterID string) *ClusterServiceUpdateProviderFleetOwnerParams { + o.SetClusterID(clusterID) + return o +} + +// SetClusterID adds the clusterId to the cluster service update provider fleet owner params +func (o *ClusterServiceUpdateProviderFleetOwnerParams) SetClusterID(clusterID string) { + o.ClusterID = clusterID +} + +// WithNodeID adds the nodeID to the cluster service update provider fleet owner params +func (o *ClusterServiceUpdateProviderFleetOwnerParams) WithNodeID(nodeID string) *ClusterServiceUpdateProviderFleetOwnerParams { + o.SetNodeID(nodeID) + return o +} + +// SetNodeID adds the nodeId to the cluster service update provider fleet owner params +func (o *ClusterServiceUpdateProviderFleetOwnerParams) SetNodeID(nodeID string) { + o.NodeID = nodeID +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterServiceUpdateProviderFleetOwnerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param clusterId + if err := r.SetPathParam("clusterId", o.ClusterID); err != nil { + return err + } + + // path param nodeId + if err := r.SetPathParam("nodeId", o.NodeID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_update_provider_fleet_owner_responses.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_update_provider_fleet_owner_responses.go new file mode 100644 index 000000000..f171457e3 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_update_provider_fleet_owner_responses.go @@ -0,0 +1,192 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" +) + +// ClusterServiceUpdateProviderFleetOwnerReader is a Reader for the ClusterServiceUpdateProviderFleetOwner structure. +type ClusterServiceUpdateProviderFleetOwnerReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterServiceUpdateProviderFleetOwnerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewClusterServiceUpdateProviderFleetOwnerOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewClusterServiceUpdateProviderFleetOwnerDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterServiceUpdateProviderFleetOwnerOK creates a ClusterServiceUpdateProviderFleetOwnerOK with default headers values +func NewClusterServiceUpdateProviderFleetOwnerOK() *ClusterServiceUpdateProviderFleetOwnerOK { + return &ClusterServiceUpdateProviderFleetOwnerOK{} +} + +/* +ClusterServiceUpdateProviderFleetOwnerOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterServiceUpdateProviderFleetOwnerOK struct { + Payload *models.V1ProviderFleetOwner +} + +// IsSuccess returns true when this cluster service update provider fleet owner o k response has a 2xx status code +func (o *ClusterServiceUpdateProviderFleetOwnerOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cluster service update provider fleet owner o k response has a 3xx status code +func (o *ClusterServiceUpdateProviderFleetOwnerOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cluster service update provider fleet owner o k response has a 4xx status code +func (o *ClusterServiceUpdateProviderFleetOwnerOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cluster service update provider fleet owner o k response has a 5xx status code +func (o *ClusterServiceUpdateProviderFleetOwnerOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cluster service update provider fleet owner o k response a status code equal to that given +func (o *ClusterServiceUpdateProviderFleetOwnerOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cluster service update provider fleet owner o k response +func (o *ClusterServiceUpdateProviderFleetOwnerOK) Code() int { + return 200 +} + +func (o *ClusterServiceUpdateProviderFleetOwnerOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/core/clusters/{clusterId}/provider-fleet/{nodeId}/owner][%d] clusterServiceUpdateProviderFleetOwnerOK %s", 200, payload) +} + +func (o *ClusterServiceUpdateProviderFleetOwnerOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/core/clusters/{clusterId}/provider-fleet/{nodeId}/owner][%d] clusterServiceUpdateProviderFleetOwnerOK %s", 200, payload) +} + +func (o *ClusterServiceUpdateProviderFleetOwnerOK) GetPayload() *models.V1ProviderFleetOwner { + return o.Payload +} + +func (o *ClusterServiceUpdateProviderFleetOwnerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ProviderFleetOwner) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewClusterServiceUpdateProviderFleetOwnerDefault creates a ClusterServiceUpdateProviderFleetOwnerDefault with default headers values +func NewClusterServiceUpdateProviderFleetOwnerDefault(code int) *ClusterServiceUpdateProviderFleetOwnerDefault { + return &ClusterServiceUpdateProviderFleetOwnerDefault{ + _statusCode: code, + } +} + +/* +ClusterServiceUpdateProviderFleetOwnerDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterServiceUpdateProviderFleetOwnerDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this cluster service update provider fleet owner default response has a 2xx status code +func (o *ClusterServiceUpdateProviderFleetOwnerDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this cluster service update provider fleet owner default response has a 3xx status code +func (o *ClusterServiceUpdateProviderFleetOwnerDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this cluster service update provider fleet owner default response has a 4xx status code +func (o *ClusterServiceUpdateProviderFleetOwnerDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this cluster service update provider fleet owner default response has a 5xx status code +func (o *ClusterServiceUpdateProviderFleetOwnerDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this cluster service update provider fleet owner default response a status code equal to that given +func (o *ClusterServiceUpdateProviderFleetOwnerDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the cluster service update provider fleet owner default response +func (o *ClusterServiceUpdateProviderFleetOwnerDefault) Code() int { + return o._statusCode +} + +func (o *ClusterServiceUpdateProviderFleetOwnerDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/core/clusters/{clusterId}/provider-fleet/{nodeId}/owner][%d] ClusterService_UpdateProviderFleetOwner default %s", o._statusCode, payload) +} + +func (o *ClusterServiceUpdateProviderFleetOwnerDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/core/clusters/{clusterId}/provider-fleet/{nodeId}/owner][%d] ClusterService_UpdateProviderFleetOwner default %s", o._statusCode, payload) +} + +func (o *ClusterServiceUpdateProviderFleetOwnerDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ClusterServiceUpdateProviderFleetOwnerDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_get_deployment_routing_telemetry_aggregated_parameters.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_get_deployment_routing_telemetry_aggregated_parameters.go index f0cfe77a5..02148b7d4 100644 --- a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_get_deployment_routing_telemetry_aggregated_parameters.go +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_get_deployment_routing_telemetry_aggregated_parameters.go @@ -95,6 +95,12 @@ type JobsServiceGetDeploymentRoutingTelemetryAggregatedParams struct { */ Resolution *string + /* ResourceIds. + + Optional to filter by the resources (replica job ids) that served the requests + */ + ResourceIds []string + /* Start. Optional to filter @@ -217,6 +223,17 @@ func (o *JobsServiceGetDeploymentRoutingTelemetryAggregatedParams) SetResolution o.Resolution = resolution } +// WithResourceIds adds the resourceIds to the jobs service get deployment routing telemetry aggregated params +func (o *JobsServiceGetDeploymentRoutingTelemetryAggregatedParams) WithResourceIds(resourceIds []string) *JobsServiceGetDeploymentRoutingTelemetryAggregatedParams { + o.SetResourceIds(resourceIds) + return o +} + +// SetResourceIds adds the resourceIds to the jobs service get deployment routing telemetry aggregated params +func (o *JobsServiceGetDeploymentRoutingTelemetryAggregatedParams) SetResourceIds(resourceIds []string) { + o.ResourceIds = resourceIds +} + // WithStart adds the start to the jobs service get deployment routing telemetry aggregated params func (o *JobsServiceGetDeploymentRoutingTelemetryAggregatedParams) WithStart(start *strfmt.DateTime) *JobsServiceGetDeploymentRoutingTelemetryAggregatedParams { o.SetStart(start) @@ -302,6 +319,17 @@ func (o *JobsServiceGetDeploymentRoutingTelemetryAggregatedParams) WriteToReques } } + if o.ResourceIds != nil { + + // binding items for resourceIds + joinedResourceIds := o.bindParamResourceIds(reg) + + // query array param resourceIds + if err := r.SetQueryParam("resourceIds", joinedResourceIds...); err != nil { + return err + } + } + if o.Start != nil { // query param start @@ -353,6 +381,23 @@ func (o *JobsServiceGetDeploymentRoutingTelemetryAggregatedParams) bindParamPath return pathsIS } +// bindParamJobsServiceGetDeploymentRoutingTelemetryAggregated binds the parameter resourceIds +func (o *JobsServiceGetDeploymentRoutingTelemetryAggregatedParams) bindParamResourceIds(formats strfmt.Registry) []string { + resourceIdsIR := o.ResourceIds + + var resourceIdsIC []string + for _, resourceIdsIIR := range resourceIdsIR { // explode []string + + resourceIdsIIV := resourceIdsIIR // string as string + resourceIdsIC = append(resourceIdsIC, resourceIdsIIV) + } + + // items.CollectionFormat: "multi" + resourceIdsIS := swag.JoinByFormat(resourceIdsIC, "multi") + + return resourceIdsIS +} + // bindParamJobsServiceGetDeploymentRoutingTelemetryAggregated binds the parameter statusCodes func (o *JobsServiceGetDeploymentRoutingTelemetryAggregatedParams) bindParamStatusCodes(formats strfmt.Registry) []string { statusCodesIR := o.StatusCodes diff --git a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_get_deployment_routing_telemetry_parameters.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_get_deployment_routing_telemetry_parameters.go index 5d73935b4..39fd8466b 100644 --- a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_get_deployment_routing_telemetry_parameters.go +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_get_deployment_routing_telemetry_parameters.go @@ -101,6 +101,12 @@ type JobsServiceGetDeploymentRoutingTelemetryParams struct { */ Resolution *string + /* ResourceIds. + + Optional to filter by the resources (replica job ids) that served the requests + */ + ResourceIds []string + /* Start. Optional to filter @@ -236,6 +242,17 @@ func (o *JobsServiceGetDeploymentRoutingTelemetryParams) SetResolution(resolutio o.Resolution = resolution } +// WithResourceIds adds the resourceIds to the jobs service get deployment routing telemetry params +func (o *JobsServiceGetDeploymentRoutingTelemetryParams) WithResourceIds(resourceIds []string) *JobsServiceGetDeploymentRoutingTelemetryParams { + o.SetResourceIds(resourceIds) + return o +} + +// SetResourceIds adds the resourceIds to the jobs service get deployment routing telemetry params +func (o *JobsServiceGetDeploymentRoutingTelemetryParams) SetResourceIds(resourceIds []string) { + o.ResourceIds = resourceIds +} + // WithStart adds the start to the jobs service get deployment routing telemetry params func (o *JobsServiceGetDeploymentRoutingTelemetryParams) WithStart(start *strfmt.DateTime) *JobsServiceGetDeploymentRoutingTelemetryParams { o.SetStart(start) @@ -344,6 +361,17 @@ func (o *JobsServiceGetDeploymentRoutingTelemetryParams) WriteToRequest(r runtim } } + if o.ResourceIds != nil { + + // binding items for resourceIds + joinedResourceIds := o.bindParamResourceIds(reg) + + // query array param resourceIds + if err := r.SetQueryParam("resourceIds", joinedResourceIds...); err != nil { + return err + } + } + if o.Start != nil { // query param start @@ -383,3 +411,20 @@ func (o *JobsServiceGetDeploymentRoutingTelemetryParams) WriteToRequest(r runtim } return nil } + +// bindParamJobsServiceGetDeploymentRoutingTelemetry binds the parameter resourceIds +func (o *JobsServiceGetDeploymentRoutingTelemetryParams) bindParamResourceIds(formats strfmt.Registry) []string { + resourceIdsIR := o.ResourceIds + + var resourceIdsIC []string + for _, resourceIdsIIR := range resourceIdsIR { // explode []string + + resourceIdsIIV := resourceIdsIIR // string as string + resourceIdsIC = append(resourceIdsIC, resourceIdsIIV) + } + + // items.CollectionFormat: "multi" + resourceIdsIS := swag.JoinByFormat(resourceIdsIC, "multi") + + return resourceIdsIS +} diff --git a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_get_logs_parameters.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_get_logs_parameters.go index df452f821..70ed2de5d 100644 --- a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_get_logs_parameters.go +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_get_logs_parameters.go @@ -101,6 +101,18 @@ type JobsServiceGetLogsParams struct { */ SandboxID *string + // SeekLine. + // + // Format: uint64 + SeekLine *string + + /* SeekResourceID. + + Read seek_resource_id's unfiltered merged stream from seek_line onward + ("view in context" jumps). Query, severity, since and until are ignored. + */ + SeekResourceID *string + /* Severity. Minimum severity to include: returns only lines equal to or more severe than this @@ -267,6 +279,28 @@ func (o *JobsServiceGetLogsParams) SetSandboxID(sandboxID *string) { o.SandboxID = sandboxID } +// WithSeekLine adds the seekLine to the jobs service get logs params +func (o *JobsServiceGetLogsParams) WithSeekLine(seekLine *string) *JobsServiceGetLogsParams { + o.SetSeekLine(seekLine) + return o +} + +// SetSeekLine adds the seekLine to the jobs service get logs params +func (o *JobsServiceGetLogsParams) SetSeekLine(seekLine *string) { + o.SeekLine = seekLine +} + +// WithSeekResourceID adds the seekResourceID to the jobs service get logs params +func (o *JobsServiceGetLogsParams) WithSeekResourceID(seekResourceID *string) *JobsServiceGetLogsParams { + o.SetSeekResourceID(seekResourceID) + return o +} + +// SetSeekResourceID adds the seekResourceId to the jobs service get logs params +func (o *JobsServiceGetLogsParams) SetSeekResourceID(seekResourceID *string) { + o.SeekResourceID = seekResourceID +} + // WithSeverity adds the severity to the jobs service get logs params func (o *JobsServiceGetLogsParams) WithSeverity(severity *string) *JobsServiceGetLogsParams { o.SetSeverity(severity) @@ -437,6 +471,40 @@ func (o *JobsServiceGetLogsParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.SeekLine != nil { + + // query param seekLine + var qrSeekLine string + + if o.SeekLine != nil { + qrSeekLine = *o.SeekLine + } + qSeekLine := qrSeekLine + if qSeekLine != "" { + + if err := r.SetQueryParam("seekLine", qSeekLine); err != nil { + return err + } + } + } + + if o.SeekResourceID != nil { + + // query param seekResourceId + var qrSeekResourceID string + + if o.SeekResourceID != nil { + qrSeekResourceID = *o.SeekResourceID + } + qSeekResourceID := qrSeekResourceID + if qSeekResourceID != "" { + + if err := r.SetQueryParam("seekResourceId", qSeekResourceID); err != nil { + return err + } + } + } + if o.Severity != nil { // query param severity diff --git a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_all_jobs_parameters.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_all_jobs_parameters.go index 8478cc36f..292391dc2 100644 --- a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_all_jobs_parameters.go +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_all_jobs_parameters.go @@ -69,6 +69,12 @@ type JobsServiceListAllJobsParams struct { // CloudspaceID. CloudspaceID *string + /* InstanceTypes. + + Match jobs whose spec instance_type is one of these + */ + InstanceTypes []string + /* JobTypes. - JOB_TYPE_APP_INSTANCE: Lightning app instances @@ -120,6 +126,12 @@ type JobsServiceListAllJobsParams struct { */ SortOrder *string + /* Sources. + + Match jobs whose source is a Studio (cloud_space_id) or a Docker image (spec image) + */ + Sources []string + // States. States []string @@ -132,6 +144,12 @@ type JobsServiceListAllJobsParams struct { // UserID. UserID *string + /* UserIds. + + Creators to filter by; with project_id/org_id any members are allowed, otherwise only the caller + */ + UserIds []string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -210,6 +228,17 @@ func (o *JobsServiceListAllJobsParams) SetCloudspaceID(cloudspaceID *string) { o.CloudspaceID = cloudspaceID } +// WithInstanceTypes adds the instanceTypes to the jobs service list all jobs params +func (o *JobsServiceListAllJobsParams) WithInstanceTypes(instanceTypes []string) *JobsServiceListAllJobsParams { + o.SetInstanceTypes(instanceTypes) + return o +} + +// SetInstanceTypes adds the instanceTypes to the jobs service list all jobs params +func (o *JobsServiceListAllJobsParams) SetInstanceTypes(instanceTypes []string) { + o.InstanceTypes = instanceTypes +} + // WithJobTypes adds the jobTypes to the jobs service list all jobs params func (o *JobsServiceListAllJobsParams) WithJobTypes(jobTypes []string) *JobsServiceListAllJobsParams { o.SetJobTypes(jobTypes) @@ -309,6 +338,17 @@ func (o *JobsServiceListAllJobsParams) SetSortOrder(sortOrder *string) { o.SortOrder = sortOrder } +// WithSources adds the sources to the jobs service list all jobs params +func (o *JobsServiceListAllJobsParams) WithSources(sources []string) *JobsServiceListAllJobsParams { + o.SetSources(sources) + return o +} + +// SetSources adds the sources to the jobs service list all jobs params +func (o *JobsServiceListAllJobsParams) SetSources(sources []string) { + o.Sources = sources +} + // WithStates adds the states to the jobs service list all jobs params func (o *JobsServiceListAllJobsParams) WithStates(states []string) *JobsServiceListAllJobsParams { o.SetStates(states) @@ -342,6 +382,17 @@ func (o *JobsServiceListAllJobsParams) SetUserID(userID *string) { o.UserID = userID } +// WithUserIds adds the userIds to the jobs service list all jobs params +func (o *JobsServiceListAllJobsParams) WithUserIds(userIds []string) *JobsServiceListAllJobsParams { + o.SetUserIds(userIds) + return o +} + +// SetUserIds adds the userIds to the jobs service list all jobs params +func (o *JobsServiceListAllJobsParams) SetUserIds(userIds []string) { + o.UserIds = userIds +} + // WriteToRequest writes these params to a swagger request func (o *JobsServiceListAllJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -367,6 +418,17 @@ func (o *JobsServiceListAllJobsParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.InstanceTypes != nil { + + // binding items for instanceTypes + joinedInstanceTypes := o.bindParamInstanceTypes(reg) + + // query array param instanceTypes + if err := r.SetQueryParam("instanceTypes", joinedInstanceTypes...); err != nil { + return err + } + } + if o.JobTypes != nil { // binding items for jobTypes @@ -514,6 +576,17 @@ func (o *JobsServiceListAllJobsParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.Sources != nil { + + // binding items for sources + joinedSources := o.bindParamSources(reg) + + // query array param sources + if err := r.SetQueryParam("sources", joinedSources...); err != nil { + return err + } + } + if o.States != nil { // binding items for states @@ -553,12 +626,40 @@ func (o *JobsServiceListAllJobsParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.UserIds != nil { + + // binding items for userIds + joinedUserIds := o.bindParamUserIds(reg) + + // query array param userIds + if err := r.SetQueryParam("userIds", joinedUserIds...); err != nil { + return err + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +// bindParamJobsServiceListAllJobs binds the parameter instanceTypes +func (o *JobsServiceListAllJobsParams) bindParamInstanceTypes(formats strfmt.Registry) []string { + instanceTypesIR := o.InstanceTypes + + var instanceTypesIC []string + for _, instanceTypesIIR := range instanceTypesIR { // explode []string + + instanceTypesIIV := instanceTypesIIR // string as string + instanceTypesIC = append(instanceTypesIC, instanceTypesIIV) + } + + // items.CollectionFormat: "multi" + instanceTypesIS := swag.JoinByFormat(instanceTypesIC, "multi") + + return instanceTypesIS +} + // bindParamJobsServiceListAllJobs binds the parameter jobTypes func (o *JobsServiceListAllJobsParams) bindParamJobTypes(formats strfmt.Registry) []string { jobTypesIR := o.JobTypes @@ -576,6 +677,23 @@ func (o *JobsServiceListAllJobsParams) bindParamJobTypes(formats strfmt.Registry return jobTypesIS } +// bindParamJobsServiceListAllJobs binds the parameter sources +func (o *JobsServiceListAllJobsParams) bindParamSources(formats strfmt.Registry) []string { + sourcesIR := o.Sources + + var sourcesIC []string + for _, sourcesIIR := range sourcesIR { // explode []string + + sourcesIIV := sourcesIIR // string as string + sourcesIC = append(sourcesIC, sourcesIIV) + } + + // items.CollectionFormat: "multi" + sourcesIS := swag.JoinByFormat(sourcesIC, "multi") + + return sourcesIS +} + // bindParamJobsServiceListAllJobs binds the parameter states func (o *JobsServiceListAllJobsParams) bindParamStates(formats strfmt.Registry) []string { statesIR := o.States @@ -609,3 +727,20 @@ func (o *JobsServiceListAllJobsParams) bindParamTagIds(formats strfmt.Registry) return tagIdsIS } + +// bindParamJobsServiceListAllJobs binds the parameter userIds +func (o *JobsServiceListAllJobsParams) bindParamUserIds(formats strfmt.Registry) []string { + userIdsIR := o.UserIds + + var userIdsIC []string + for _, userIdsIIR := range userIdsIR { // explode []string + + userIdsIIV := userIdsIIR // string as string + userIdsIC = append(userIdsIC, userIdsIIV) + } + + // items.CollectionFormat: "multi" + userIdsIS := swag.JoinByFormat(userIdsIC, "multi") + + return userIdsIS +} diff --git a/go/internal/lightningcloud/openapi/generated/client/organizations_service/organizations_service_client.go b/go/internal/lightningcloud/openapi/generated/client/organizations_service/organizations_service_client.go index 6e77037d5..3a9a44ea6 100644 --- a/go/internal/lightningcloud/openapi/generated/client/organizations_service/organizations_service_client.go +++ b/go/internal/lightningcloud/openapi/generated/client/organizations_service/organizations_service_client.go @@ -102,6 +102,8 @@ type ClientService interface { OrganizationsServiceSearchOrganizations(params *OrganizationsServiceSearchOrganizationsParams, opts ...ClientOption) (*OrganizationsServiceSearchOrganizationsOK, error) + OrganizationsServiceSetOrgDefaultTeamspaces(params *OrganizationsServiceSetOrgDefaultTeamspacesParams, opts ...ClientOption) (*OrganizationsServiceSetOrgDefaultTeamspacesOK, error) + OrganizationsServiceSetOrgMemberModelAPIDailyLimit(params *OrganizationsServiceSetOrgMemberModelAPIDailyLimitParams, opts ...ClientOption) (*OrganizationsServiceSetOrgMemberModelAPIDailyLimitOK, error) OrganizationsServiceSetOrgModelAPIDailyLimitDefault(params *OrganizationsServiceSetOrgModelAPIDailyLimitDefaultParams, opts ...ClientOption) (*OrganizationsServiceSetOrgModelAPIDailyLimitDefaultOK, error) @@ -1043,6 +1045,48 @@ func (a *Client) OrganizationsServiceSearchOrganizations(params *OrganizationsSe return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +OrganizationsServiceSetOrgDefaultTeamspaces replaces the teamspaces a new member joins does not change current members +*/ +func (a *Client) OrganizationsServiceSetOrgDefaultTeamspaces(params *OrganizationsServiceSetOrgDefaultTeamspacesParams, opts ...ClientOption) (*OrganizationsServiceSetOrgDefaultTeamspacesOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewOrganizationsServiceSetOrgDefaultTeamspacesParams() + } + op := &runtime.ClientOperation{ + ID: "OrganizationsService_SetOrgDefaultTeamspaces", + Method: "PUT", + PathPattern: "/v1/orgs/{orgId}/default-teamspaces", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OrganizationsServiceSetOrgDefaultTeamspacesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*OrganizationsServiceSetOrgDefaultTeamspacesOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*OrganizationsServiceSetOrgDefaultTeamspacesDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* OrganizationsServiceSetOrgMemberModelAPIDailyLimit sets clear fall back to org default or explicitly uncap a single member s model API daily spend limit */ diff --git a/go/internal/lightningcloud/openapi/generated/client/organizations_service/organizations_service_set_org_default_teamspaces_parameters.go b/go/internal/lightningcloud/openapi/generated/client/organizations_service/organizations_service_set_org_default_teamspaces_parameters.go new file mode 100644 index 000000000..fb43ac94b --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/organizations_service/organizations_service_set_org_default_teamspaces_parameters.go @@ -0,0 +1,173 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package organizations_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" +) + +// NewOrganizationsServiceSetOrgDefaultTeamspacesParams creates a new OrganizationsServiceSetOrgDefaultTeamspacesParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOrganizationsServiceSetOrgDefaultTeamspacesParams() *OrganizationsServiceSetOrgDefaultTeamspacesParams { + return &OrganizationsServiceSetOrgDefaultTeamspacesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOrganizationsServiceSetOrgDefaultTeamspacesParamsWithTimeout creates a new OrganizationsServiceSetOrgDefaultTeamspacesParams object +// with the ability to set a timeout on a request. +func NewOrganizationsServiceSetOrgDefaultTeamspacesParamsWithTimeout(timeout time.Duration) *OrganizationsServiceSetOrgDefaultTeamspacesParams { + return &OrganizationsServiceSetOrgDefaultTeamspacesParams{ + timeout: timeout, + } +} + +// NewOrganizationsServiceSetOrgDefaultTeamspacesParamsWithContext creates a new OrganizationsServiceSetOrgDefaultTeamspacesParams object +// with the ability to set a context for a request. +func NewOrganizationsServiceSetOrgDefaultTeamspacesParamsWithContext(ctx context.Context) *OrganizationsServiceSetOrgDefaultTeamspacesParams { + return &OrganizationsServiceSetOrgDefaultTeamspacesParams{ + Context: ctx, + } +} + +// NewOrganizationsServiceSetOrgDefaultTeamspacesParamsWithHTTPClient creates a new OrganizationsServiceSetOrgDefaultTeamspacesParams object +// with the ability to set a custom HTTPClient for a request. +func NewOrganizationsServiceSetOrgDefaultTeamspacesParamsWithHTTPClient(client *http.Client) *OrganizationsServiceSetOrgDefaultTeamspacesParams { + return &OrganizationsServiceSetOrgDefaultTeamspacesParams{ + HTTPClient: client, + } +} + +/* +OrganizationsServiceSetOrgDefaultTeamspacesParams contains all the parameters to send to the API endpoint + + for the organizations service set org default teamspaces operation. + + Typically these are written to a http.Request. +*/ +type OrganizationsServiceSetOrgDefaultTeamspacesParams struct { + + // Body. + Body *models.OrganizationsServiceSetOrgDefaultTeamspacesBody + + // OrgID. + OrgID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the organizations service set org default teamspaces params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OrganizationsServiceSetOrgDefaultTeamspacesParams) WithDefaults() *OrganizationsServiceSetOrgDefaultTeamspacesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the organizations service set org default teamspaces params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OrganizationsServiceSetOrgDefaultTeamspacesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the organizations service set org default teamspaces params +func (o *OrganizationsServiceSetOrgDefaultTeamspacesParams) WithTimeout(timeout time.Duration) *OrganizationsServiceSetOrgDefaultTeamspacesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the organizations service set org default teamspaces params +func (o *OrganizationsServiceSetOrgDefaultTeamspacesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the organizations service set org default teamspaces params +func (o *OrganizationsServiceSetOrgDefaultTeamspacesParams) WithContext(ctx context.Context) *OrganizationsServiceSetOrgDefaultTeamspacesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the organizations service set org default teamspaces params +func (o *OrganizationsServiceSetOrgDefaultTeamspacesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the organizations service set org default teamspaces params +func (o *OrganizationsServiceSetOrgDefaultTeamspacesParams) WithHTTPClient(client *http.Client) *OrganizationsServiceSetOrgDefaultTeamspacesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the organizations service set org default teamspaces params +func (o *OrganizationsServiceSetOrgDefaultTeamspacesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the organizations service set org default teamspaces params +func (o *OrganizationsServiceSetOrgDefaultTeamspacesParams) WithBody(body *models.OrganizationsServiceSetOrgDefaultTeamspacesBody) *OrganizationsServiceSetOrgDefaultTeamspacesParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the organizations service set org default teamspaces params +func (o *OrganizationsServiceSetOrgDefaultTeamspacesParams) SetBody(body *models.OrganizationsServiceSetOrgDefaultTeamspacesBody) { + o.Body = body +} + +// WithOrgID adds the orgID to the organizations service set org default teamspaces params +func (o *OrganizationsServiceSetOrgDefaultTeamspacesParams) WithOrgID(orgID string) *OrganizationsServiceSetOrgDefaultTeamspacesParams { + o.SetOrgID(orgID) + return o +} + +// SetOrgID adds the orgId to the organizations service set org default teamspaces params +func (o *OrganizationsServiceSetOrgDefaultTeamspacesParams) SetOrgID(orgID string) { + o.OrgID = orgID +} + +// WriteToRequest writes these params to a swagger request +func (o *OrganizationsServiceSetOrgDefaultTeamspacesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param orgId + if err := r.SetPathParam("orgId", o.OrgID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/organizations_service/organizations_service_set_org_default_teamspaces_responses.go b/go/internal/lightningcloud/openapi/generated/client/organizations_service/organizations_service_set_org_default_teamspaces_responses.go new file mode 100644 index 000000000..43c5428c0 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/organizations_service/organizations_service_set_org_default_teamspaces_responses.go @@ -0,0 +1,192 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package organizations_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" +) + +// OrganizationsServiceSetOrgDefaultTeamspacesReader is a Reader for the OrganizationsServiceSetOrgDefaultTeamspaces structure. +type OrganizationsServiceSetOrgDefaultTeamspacesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OrganizationsServiceSetOrgDefaultTeamspacesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewOrganizationsServiceSetOrgDefaultTeamspacesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewOrganizationsServiceSetOrgDefaultTeamspacesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOrganizationsServiceSetOrgDefaultTeamspacesOK creates a OrganizationsServiceSetOrgDefaultTeamspacesOK with default headers values +func NewOrganizationsServiceSetOrgDefaultTeamspacesOK() *OrganizationsServiceSetOrgDefaultTeamspacesOK { + return &OrganizationsServiceSetOrgDefaultTeamspacesOK{} +} + +/* +OrganizationsServiceSetOrgDefaultTeamspacesOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type OrganizationsServiceSetOrgDefaultTeamspacesOK struct { + Payload *models.V1Organization +} + +// IsSuccess returns true when this organizations service set org default teamspaces o k response has a 2xx status code +func (o *OrganizationsServiceSetOrgDefaultTeamspacesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this organizations service set org default teamspaces o k response has a 3xx status code +func (o *OrganizationsServiceSetOrgDefaultTeamspacesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this organizations service set org default teamspaces o k response has a 4xx status code +func (o *OrganizationsServiceSetOrgDefaultTeamspacesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this organizations service set org default teamspaces o k response has a 5xx status code +func (o *OrganizationsServiceSetOrgDefaultTeamspacesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this organizations service set org default teamspaces o k response a status code equal to that given +func (o *OrganizationsServiceSetOrgDefaultTeamspacesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the organizations service set org default teamspaces o k response +func (o *OrganizationsServiceSetOrgDefaultTeamspacesOK) Code() int { + return 200 +} + +func (o *OrganizationsServiceSetOrgDefaultTeamspacesOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/orgs/{orgId}/default-teamspaces][%d] organizationsServiceSetOrgDefaultTeamspacesOK %s", 200, payload) +} + +func (o *OrganizationsServiceSetOrgDefaultTeamspacesOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/orgs/{orgId}/default-teamspaces][%d] organizationsServiceSetOrgDefaultTeamspacesOK %s", 200, payload) +} + +func (o *OrganizationsServiceSetOrgDefaultTeamspacesOK) GetPayload() *models.V1Organization { + return o.Payload +} + +func (o *OrganizationsServiceSetOrgDefaultTeamspacesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Organization) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewOrganizationsServiceSetOrgDefaultTeamspacesDefault creates a OrganizationsServiceSetOrgDefaultTeamspacesDefault with default headers values +func NewOrganizationsServiceSetOrgDefaultTeamspacesDefault(code int) *OrganizationsServiceSetOrgDefaultTeamspacesDefault { + return &OrganizationsServiceSetOrgDefaultTeamspacesDefault{ + _statusCode: code, + } +} + +/* +OrganizationsServiceSetOrgDefaultTeamspacesDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type OrganizationsServiceSetOrgDefaultTeamspacesDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this organizations service set org default teamspaces default response has a 2xx status code +func (o *OrganizationsServiceSetOrgDefaultTeamspacesDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this organizations service set org default teamspaces default response has a 3xx status code +func (o *OrganizationsServiceSetOrgDefaultTeamspacesDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this organizations service set org default teamspaces default response has a 4xx status code +func (o *OrganizationsServiceSetOrgDefaultTeamspacesDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this organizations service set org default teamspaces default response has a 5xx status code +func (o *OrganizationsServiceSetOrgDefaultTeamspacesDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this organizations service set org default teamspaces default response a status code equal to that given +func (o *OrganizationsServiceSetOrgDefaultTeamspacesDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the organizations service set org default teamspaces default response +func (o *OrganizationsServiceSetOrgDefaultTeamspacesDefault) Code() int { + return o._statusCode +} + +func (o *OrganizationsServiceSetOrgDefaultTeamspacesDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/orgs/{orgId}/default-teamspaces][%d] OrganizationsService_SetOrgDefaultTeamspaces default %s", o._statusCode, payload) +} + +func (o *OrganizationsServiceSetOrgDefaultTeamspacesDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/orgs/{orgId}/default-teamspaces][%d] OrganizationsService_SetOrgDefaultTeamspaces default %s", o._statusCode, payload) +} + +func (o *OrganizationsServiceSetOrgDefaultTeamspacesDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *OrganizationsServiceSetOrgDefaultTeamspacesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/projects_service/projects_service_client.go b/go/internal/lightningcloud/openapi/generated/client/projects_service/projects_service_client.go index 87a195d9e..2c286dc07 100644 --- a/go/internal/lightningcloud/openapi/generated/client/projects_service/projects_service_client.go +++ b/go/internal/lightningcloud/openapi/generated/client/projects_service/projects_service_client.go @@ -98,6 +98,8 @@ type ClientService interface { ProjectsServiceListProjectRoles(params *ProjectsServiceListProjectRolesParams, opts ...ClientOption) (*ProjectsServiceListProjectRolesOK, error) + ProjectsServiceUpdateAPIKey(params *ProjectsServiceUpdateAPIKeyParams, opts ...ClientOption) (*ProjectsServiceUpdateAPIKeyOK, error) + ProjectsServiceUpdateProject(params *ProjectsServiceUpdateProjectParams, opts ...ClientOption) (*ProjectsServiceUpdateProjectOK, error) ProjectsServiceUpdateProjectTabOrder(params *ProjectsServiceUpdateProjectTabOrderParams, opts ...ClientOption) (*ProjectsServiceUpdateProjectTabOrderOK, error) @@ -945,6 +947,48 @@ func (a *Client) ProjectsServiceListProjectRoles(params *ProjectsServiceListProj return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ProjectsServiceUpdateAPIKey projects service update API key API +*/ +func (a *Client) ProjectsServiceUpdateAPIKey(params *ProjectsServiceUpdateAPIKeyParams, opts ...ClientOption) (*ProjectsServiceUpdateAPIKeyOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewProjectsServiceUpdateAPIKeyParams() + } + op := &runtime.ClientOperation{ + ID: "ProjectsService_UpdateAPIKey", + Method: "PATCH", + PathPattern: "/v1/api-keys/{id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ProjectsServiceUpdateAPIKeyReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*ProjectsServiceUpdateAPIKeyOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*ProjectsServiceUpdateAPIKeyDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ProjectsServiceUpdateProject projects service update project API */ diff --git a/go/internal/lightningcloud/openapi/generated/client/projects_service/projects_service_update_api_key_parameters.go b/go/internal/lightningcloud/openapi/generated/client/projects_service/projects_service_update_api_key_parameters.go new file mode 100644 index 000000000..3b131ad2a --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/projects_service/projects_service_update_api_key_parameters.go @@ -0,0 +1,173 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package projects_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" +) + +// NewProjectsServiceUpdateAPIKeyParams creates a new ProjectsServiceUpdateAPIKeyParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewProjectsServiceUpdateAPIKeyParams() *ProjectsServiceUpdateAPIKeyParams { + return &ProjectsServiceUpdateAPIKeyParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewProjectsServiceUpdateAPIKeyParamsWithTimeout creates a new ProjectsServiceUpdateAPIKeyParams object +// with the ability to set a timeout on a request. +func NewProjectsServiceUpdateAPIKeyParamsWithTimeout(timeout time.Duration) *ProjectsServiceUpdateAPIKeyParams { + return &ProjectsServiceUpdateAPIKeyParams{ + timeout: timeout, + } +} + +// NewProjectsServiceUpdateAPIKeyParamsWithContext creates a new ProjectsServiceUpdateAPIKeyParams object +// with the ability to set a context for a request. +func NewProjectsServiceUpdateAPIKeyParamsWithContext(ctx context.Context) *ProjectsServiceUpdateAPIKeyParams { + return &ProjectsServiceUpdateAPIKeyParams{ + Context: ctx, + } +} + +// NewProjectsServiceUpdateAPIKeyParamsWithHTTPClient creates a new ProjectsServiceUpdateAPIKeyParams object +// with the ability to set a custom HTTPClient for a request. +func NewProjectsServiceUpdateAPIKeyParamsWithHTTPClient(client *http.Client) *ProjectsServiceUpdateAPIKeyParams { + return &ProjectsServiceUpdateAPIKeyParams{ + HTTPClient: client, + } +} + +/* +ProjectsServiceUpdateAPIKeyParams contains all the parameters to send to the API endpoint + + for the projects service update API key operation. + + Typically these are written to a http.Request. +*/ +type ProjectsServiceUpdateAPIKeyParams struct { + + // Body. + Body *models.ProjectsServiceUpdateAPIKeyBody + + // ID. + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the projects service update API key params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProjectsServiceUpdateAPIKeyParams) WithDefaults() *ProjectsServiceUpdateAPIKeyParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the projects service update API key params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProjectsServiceUpdateAPIKeyParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the projects service update API key params +func (o *ProjectsServiceUpdateAPIKeyParams) WithTimeout(timeout time.Duration) *ProjectsServiceUpdateAPIKeyParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the projects service update API key params +func (o *ProjectsServiceUpdateAPIKeyParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the projects service update API key params +func (o *ProjectsServiceUpdateAPIKeyParams) WithContext(ctx context.Context) *ProjectsServiceUpdateAPIKeyParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the projects service update API key params +func (o *ProjectsServiceUpdateAPIKeyParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the projects service update API key params +func (o *ProjectsServiceUpdateAPIKeyParams) WithHTTPClient(client *http.Client) *ProjectsServiceUpdateAPIKeyParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the projects service update API key params +func (o *ProjectsServiceUpdateAPIKeyParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the projects service update API key params +func (o *ProjectsServiceUpdateAPIKeyParams) WithBody(body *models.ProjectsServiceUpdateAPIKeyBody) *ProjectsServiceUpdateAPIKeyParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the projects service update API key params +func (o *ProjectsServiceUpdateAPIKeyParams) SetBody(body *models.ProjectsServiceUpdateAPIKeyBody) { + o.Body = body +} + +// WithID adds the id to the projects service update API key params +func (o *ProjectsServiceUpdateAPIKeyParams) WithID(id string) *ProjectsServiceUpdateAPIKeyParams { + o.SetID(id) + return o +} + +// SetID adds the id to the projects service update API key params +func (o *ProjectsServiceUpdateAPIKeyParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *ProjectsServiceUpdateAPIKeyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/projects_service/projects_service_update_api_key_responses.go b/go/internal/lightningcloud/openapi/generated/client/projects_service/projects_service_update_api_key_responses.go new file mode 100644 index 000000000..6d34415a4 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/projects_service/projects_service_update_api_key_responses.go @@ -0,0 +1,192 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package projects_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/lightning-ai/sdk/go/internal/lightningcloud/openapi/generated/models" +) + +// ProjectsServiceUpdateAPIKeyReader is a Reader for the ProjectsServiceUpdateAPIKey structure. +type ProjectsServiceUpdateAPIKeyReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ProjectsServiceUpdateAPIKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewProjectsServiceUpdateAPIKeyOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewProjectsServiceUpdateAPIKeyDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewProjectsServiceUpdateAPIKeyOK creates a ProjectsServiceUpdateAPIKeyOK with default headers values +func NewProjectsServiceUpdateAPIKeyOK() *ProjectsServiceUpdateAPIKeyOK { + return &ProjectsServiceUpdateAPIKeyOK{} +} + +/* +ProjectsServiceUpdateAPIKeyOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ProjectsServiceUpdateAPIKeyOK struct { + Payload *models.V1APIKey +} + +// IsSuccess returns true when this projects service update Api key o k response has a 2xx status code +func (o *ProjectsServiceUpdateAPIKeyOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this projects service update Api key o k response has a 3xx status code +func (o *ProjectsServiceUpdateAPIKeyOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this projects service update Api key o k response has a 4xx status code +func (o *ProjectsServiceUpdateAPIKeyOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this projects service update Api key o k response has a 5xx status code +func (o *ProjectsServiceUpdateAPIKeyOK) IsServerError() bool { + return false +} + +// IsCode returns true when this projects service update Api key o k response a status code equal to that given +func (o *ProjectsServiceUpdateAPIKeyOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the projects service update Api key o k response +func (o *ProjectsServiceUpdateAPIKeyOK) Code() int { + return 200 +} + +func (o *ProjectsServiceUpdateAPIKeyOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v1/api-keys/{id}][%d] projectsServiceUpdateApiKeyOK %s", 200, payload) +} + +func (o *ProjectsServiceUpdateAPIKeyOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v1/api-keys/{id}][%d] projectsServiceUpdateApiKeyOK %s", 200, payload) +} + +func (o *ProjectsServiceUpdateAPIKeyOK) GetPayload() *models.V1APIKey { + return o.Payload +} + +func (o *ProjectsServiceUpdateAPIKeyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1APIKey) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewProjectsServiceUpdateAPIKeyDefault creates a ProjectsServiceUpdateAPIKeyDefault with default headers values +func NewProjectsServiceUpdateAPIKeyDefault(code int) *ProjectsServiceUpdateAPIKeyDefault { + return &ProjectsServiceUpdateAPIKeyDefault{ + _statusCode: code, + } +} + +/* +ProjectsServiceUpdateAPIKeyDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ProjectsServiceUpdateAPIKeyDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this projects service update API key default response has a 2xx status code +func (o *ProjectsServiceUpdateAPIKeyDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this projects service update API key default response has a 3xx status code +func (o *ProjectsServiceUpdateAPIKeyDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this projects service update API key default response has a 4xx status code +func (o *ProjectsServiceUpdateAPIKeyDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this projects service update API key default response has a 5xx status code +func (o *ProjectsServiceUpdateAPIKeyDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this projects service update API key default response a status code equal to that given +func (o *ProjectsServiceUpdateAPIKeyDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the projects service update API key default response +func (o *ProjectsServiceUpdateAPIKeyDefault) Code() int { + return o._statusCode +} + +func (o *ProjectsServiceUpdateAPIKeyDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v1/api-keys/{id}][%d] ProjectsService_UpdateAPIKey default %s", o._statusCode, payload) +} + +func (o *ProjectsServiceUpdateAPIKeyDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /v1/api-keys/{id}][%d] ProjectsService_UpdateAPIKey default %s", o._statusCode, payload) +} + +func (o *ProjectsServiceUpdateAPIKeyDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ProjectsServiceUpdateAPIKeyDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/secret_service/secret_service_list_user_secrets_parameters.go b/go/internal/lightningcloud/openapi/generated/client/secret_service/secret_service_list_user_secrets_parameters.go index 626095535..e8e496a5a 100644 --- a/go/internal/lightningcloud/openapi/generated/client/secret_service/secret_service_list_user_secrets_parameters.go +++ b/go/internal/lightningcloud/openapi/generated/client/secret_service/secret_service_list_user_secrets_parameters.go @@ -64,6 +64,12 @@ SecretServiceListUserSecretsParams contains all the parameters to send to the AP Typically these are written to a http.Request. */ type SecretServiceListUserSecretsParams struct { + + // Type. + // + // Default: "SECRET_TYPE_UNSPECIFIED" + Type *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -81,7 +87,18 @@ func (o *SecretServiceListUserSecretsParams) WithDefaults() *SecretServiceListUs // // All values with no default are reset to their zero value. func (o *SecretServiceListUserSecretsParams) SetDefaults() { - // no default values defined for this parameter + var ( + typeVarDefault = string("SECRET_TYPE_UNSPECIFIED") + ) + + val := SecretServiceListUserSecretsParams{ + Type: &typeVarDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val } // WithTimeout adds the timeout to the secret service list user secrets params @@ -117,6 +134,17 @@ func (o *SecretServiceListUserSecretsParams) SetHTTPClient(client *http.Client) o.HTTPClient = client } +// WithType adds the typeVar to the secret service list user secrets params +func (o *SecretServiceListUserSecretsParams) WithType(typeVar *string) *SecretServiceListUserSecretsParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the secret service list user secrets params +func (o *SecretServiceListUserSecretsParams) SetType(typeVar *string) { + o.Type = typeVar +} + // WriteToRequest writes these params to a swagger request func (o *SecretServiceListUserSecretsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -125,6 +153,23 @@ func (o *SecretServiceListUserSecretsParams) WriteToRequest(r runtime.ClientRequ } var res []error + if o.Type != nil { + + // query param type + var qrType string + + if o.Type != nil { + qrType = *o.Type + } + qType := qrType + if qType != "" { + + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/go/internal/lightningcloud/openapi/generated/models/cloud_space_service_create_cloud_space_app_instance_body.go b/go/internal/lightningcloud/openapi/generated/models/cloud_space_service_create_cloud_space_app_instance_body.go deleted file mode 100644 index 18228a3b8..000000000 --- a/go/internal/lightningcloud/openapi/generated/models/cloud_space_service_create_cloud_space_app_instance_body.go +++ /dev/null @@ -1,73 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CloudSpaceServiceCreateCloudSpaceAppInstanceBody cloud space service create cloud space app instance body -// -// swagger:model CloudSpaceServiceCreateCloudSpaceAppInstanceBody -type CloudSpaceServiceCreateCloudSpaceAppInstanceBody struct { - - // the cluster the run the app on - ClusterID string `json:"clusterId,omitempty"` - - // If true, job machines will be left running after the job is finished (and can be reused) - KeepMachinesAfterStop bool `json:"keepMachinesAfterStop,omitempty"` - - // Time to keep machines reserved after the job run (applies if keep_machines_after_stop is true) - MachinesReservationTimeMinutes string `json:"machinesReservationTimeMinutes,omitempty"` - - // arguments to pass to the plugin - PluginArguments map[string]string `json:"pluginArguments,omitempty"` - - // The ID of the Service Execution that created this job - ServiceID string `json:"serviceId,omitempty"` - - // an "app" initiating the request, defaults to the plugin name - SourceApp string `json:"sourceApp,omitempty"` - - // Another field id acting as a `primary key` - // It is used to control how cloudspace filesystem snapshots are created. For the same key we will be reusing the snapshot - UniqueID string `json:"uniqueId,omitempty"` -} - -// Validate validates this cloud space service create cloud space app instance body -func (m *CloudSpaceServiceCreateCloudSpaceAppInstanceBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cloud space service create cloud space app instance body based on context it is used -func (m *CloudSpaceServiceCreateCloudSpaceAppInstanceBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloudSpaceServiceCreateCloudSpaceAppInstanceBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudSpaceServiceCreateCloudSpaceAppInstanceBody) UnmarshalBinary(b []byte) error { - var res CloudSpaceServiceCreateCloudSpaceAppInstanceBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/models/cloud_space_service_create_lightning_run_instance_body.go b/go/internal/lightningcloud/openapi/generated/models/cloud_space_service_create_lightning_run_instance_body.go deleted file mode 100644 index 5a563901f..000000000 --- a/go/internal/lightningcloud/openapi/generated/models/cloud_space_service_create_lightning_run_instance_body.go +++ /dev/null @@ -1,282 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - stderrors "errors" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CloudSpaceServiceCreateLightningRunInstanceBody cloud space service create lightning run instance body -// -// swagger:model CloudSpaceServiceCreateLightningRunInstanceBody -type CloudSpaceServiceCreateLightningRunInstanceBody struct { - - // cluster Id - ClusterID string `json:"clusterId,omitempty"` - - // desired state - DesiredState *V1LightningappInstanceState `json:"desiredState,omitempty"` - - // display name - DisplayName string `json:"displayName,omitempty"` - - // User-provided custom domain for the app. Will be generated if not provided. - Domain string `json:"domain,omitempty"` - - // env - Env []*V1EnvVar `json:"env"` - - // If true, job machines will be left running after the job is finished (and can be reused) - KeepMachinesAfterStop bool `json:"keepMachinesAfterStop,omitempty"` - - // The other project linked to this app - LinkedProjectID string `json:"linkedProjectId,omitempty"` - - // The other user linked to this app - LinkedUserID string `json:"linkedUserId,omitempty"` - - // Time to keep machines reserved after the job run (applies if keep_machines_after_stop is true) - MachinesReservationTimeMinutes string `json:"machinesReservationTimeMinutes,omitempty"` - - // use display_name instead - Name string `json:"name,omitempty"` - - // Queue server type. If this is not set, it will be assumed that the Queue server is Redis. - // If the server type is QUEUE_SERVER_TYPE_HTTP, reconciler will take the server URL from - // cluster spec and pass it to the flow and work container. If the type is QUEUE_SERVER_TYPE_REDIS, - // reconciler will create a Redis deployment per each lightning app - QueueServerType *V1QueueServerType `json:"queueServerType,omitempty"` - - // source app - SourceApp string `json:"sourceApp,omitempty"` -} - -// Validate validates this cloud space service create lightning run instance body -func (m *CloudSpaceServiceCreateLightningRunInstanceBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDesiredState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnv(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQueueServerType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudSpaceServiceCreateLightningRunInstanceBody) validateDesiredState(formats strfmt.Registry) error { - if swag.IsZero(m.DesiredState) { // not required - return nil - } - - if m.DesiredState != nil { - if err := m.DesiredState.Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("desiredState") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("desiredState") - } - - return err - } - } - - return nil -} - -func (m *CloudSpaceServiceCreateLightningRunInstanceBody) validateEnv(formats strfmt.Registry) error { - if swag.IsZero(m.Env) { // not required - return nil - } - - for i := 0; i < len(m.Env); i++ { - if swag.IsZero(m.Env[i]) { // not required - continue - } - - if m.Env[i] != nil { - if err := m.Env[i].Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("env" + "." + strconv.Itoa(i)) - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("env" + "." + strconv.Itoa(i)) - } - - return err - } - } - - } - - return nil -} - -func (m *CloudSpaceServiceCreateLightningRunInstanceBody) validateQueueServerType(formats strfmt.Registry) error { - if swag.IsZero(m.QueueServerType) { // not required - return nil - } - - if m.QueueServerType != nil { - if err := m.QueueServerType.Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("queueServerType") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("queueServerType") - } - - return err - } - } - - return nil -} - -// ContextValidate validate this cloud space service create lightning run instance body based on the context it is used -func (m *CloudSpaceServiceCreateLightningRunInstanceBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDesiredState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEnv(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQueueServerType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudSpaceServiceCreateLightningRunInstanceBody) contextValidateDesiredState(ctx context.Context, formats strfmt.Registry) error { - - if m.DesiredState != nil { - - if swag.IsZero(m.DesiredState) { // not required - return nil - } - - if err := m.DesiredState.ContextValidate(ctx, formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("desiredState") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("desiredState") - } - - return err - } - } - - return nil -} - -func (m *CloudSpaceServiceCreateLightningRunInstanceBody) contextValidateEnv(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Env); i++ { - - if m.Env[i] != nil { - - if swag.IsZero(m.Env[i]) { // not required - return nil - } - - if err := m.Env[i].ContextValidate(ctx, formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("env" + "." + strconv.Itoa(i)) - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("env" + "." + strconv.Itoa(i)) - } - - return err - } - } - - } - - return nil -} - -func (m *CloudSpaceServiceCreateLightningRunInstanceBody) contextValidateQueueServerType(ctx context.Context, formats strfmt.Registry) error { - - if m.QueueServerType != nil { - - if swag.IsZero(m.QueueServerType) { // not required - return nil - } - - if err := m.QueueServerType.ContextValidate(ctx, formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("queueServerType") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("queueServerType") - } - - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudSpaceServiceCreateLightningRunInstanceBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudSpaceServiceCreateLightningRunInstanceBody) UnmarshalBinary(b []byte) error { - var res CloudSpaceServiceCreateLightningRunInstanceBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/models/cloud_space_service_fork_cloud_space_app_instance_body.go b/go/internal/lightningcloud/openapi/generated/models/cloud_space_service_fork_cloud_space_app_instance_body.go deleted file mode 100644 index dcde12212..000000000 --- a/go/internal/lightningcloud/openapi/generated/models/cloud_space_service_fork_cloud_space_app_instance_body.go +++ /dev/null @@ -1,57 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CloudSpaceServiceForkCloudSpaceAppInstanceBody cloud space service fork cloud space app instance body -// -// swagger:model CloudSpaceServiceForkCloudSpaceAppInstanceBody -type CloudSpaceServiceForkCloudSpaceAppInstanceBody struct { - - // lightningapp instance Id - LightningappInstanceID string `json:"lightningappInstanceId,omitempty"` - - // target plugin arguments - TargetPluginArguments map[string]string `json:"targetPluginArguments,omitempty"` -} - -// Validate validates this cloud space service fork cloud space app instance body -func (m *CloudSpaceServiceForkCloudSpaceAppInstanceBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cloud space service fork cloud space app instance body based on context it is used -func (m *CloudSpaceServiceForkCloudSpaceAppInstanceBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloudSpaceServiceForkCloudSpaceAppInstanceBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudSpaceServiceForkCloudSpaceAppInstanceBody) UnmarshalBinary(b []byte) error { - var res CloudSpaceServiceForkCloudSpaceAppInstanceBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/models/cloud_space_service_update_cloud_space_app_body.go b/go/internal/lightningcloud/openapi/generated/models/cloud_space_service_update_cloud_space_app_body.go deleted file mode 100644 index b8772528a..000000000 --- a/go/internal/lightningcloud/openapi/generated/models/cloud_space_service_update_cloud_space_app_body.go +++ /dev/null @@ -1,214 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - stderrors "errors" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CloudSpaceServiceUpdateCloudSpaceAppBody cloud space service update cloud space app body -// -// swagger:model CloudSpaceServiceUpdateCloudSpaceAppBody -type CloudSpaceServiceUpdateCloudSpaceAppBody struct { - - // author logo - AuthorLogo string `json:"authorLogo,omitempty"` - - // authors - Authors []string `json:"authors"` - - // categories - Categories []string `json:"categories"` - - // created at - // Format: date-time - CreatedAt strfmt.DateTime `json:"createdAt,omitempty"` - - // description - Description string `json:"description,omitempty"` - - // entrypoint file - EntrypointFile string `json:"entrypointFile,omitempty"` - - // git Url - GitURL string `json:"gitUrl,omitempty"` - - // license - License string `json:"license,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // owner Id - OwnerID string `json:"ownerId,omitempty"` - - // owner type - OwnerType *V1CloudSpaceAppOwnerType `json:"ownerType,omitempty"` - - // short description - ShortDescription string `json:"shortDescription,omitempty"` - - // source Url - SourceURL string `json:"sourceUrl,omitempty"` - - // tags - Tags []string `json:"tags"` - - // thumbnail - Thumbnail string `json:"thumbnail,omitempty"` - - // updated at - // Format: date-time - UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"` - - // version - Version string `json:"version,omitempty"` - - // visible to org ids - VisibleToOrgIds []string `json:"visibleToOrgIds"` - - // visible to project ids - VisibleToProjectIds []string `json:"visibleToProjectIds"` - - // visible to user ids - VisibleToUserIds []string `json:"visibleToUserIds"` -} - -// Validate validates this cloud space service update cloud space app body -func (m *CloudSpaceServiceUpdateCloudSpaceAppBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCreatedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpdatedAt(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudSpaceServiceUpdateCloudSpaceAppBody) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required - return nil - } - - if err := validate.FormatOf("createdAt", "body", "date-time", m.CreatedAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *CloudSpaceServiceUpdateCloudSpaceAppBody) validateOwnerType(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerType) { // not required - return nil - } - - if m.OwnerType != nil { - if err := m.OwnerType.Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("ownerType") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("ownerType") - } - - return err - } - } - - return nil -} - -func (m *CloudSpaceServiceUpdateCloudSpaceAppBody) validateUpdatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.UpdatedAt) { // not required - return nil - } - - if err := validate.FormatOf("updatedAt", "body", "date-time", m.UpdatedAt.String(), formats); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this cloud space service update cloud space app body based on the context it is used -func (m *CloudSpaceServiceUpdateCloudSpaceAppBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOwnerType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudSpaceServiceUpdateCloudSpaceAppBody) contextValidateOwnerType(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerType != nil { - - if swag.IsZero(m.OwnerType) { // not required - return nil - } - - if err := m.OwnerType.ContextValidate(ctx, formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("ownerType") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("ownerType") - } - - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudSpaceServiceUpdateCloudSpaceAppBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudSpaceServiceUpdateCloudSpaceAppBody) UnmarshalBinary(b []byte) error { - var res CloudSpaceServiceUpdateCloudSpaceAppBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/models/cluster_service_create_machine_body.go b/go/internal/lightningcloud/openapi/generated/models/cluster_service_create_machine_body.go index 6eae5b738..b645f896d 100644 --- a/go/internal/lightningcloud/openapi/generated/models/cluster_service_create_machine_body.go +++ b/go/internal/lightningcloud/openapi/generated/models/cluster_service_create_machine_body.go @@ -39,6 +39,9 @@ type ClusterServiceCreateMachineBody struct { // ca cert CaCert string `json:"caCert,omitempty"` + // Fences an existing-machine setup callback to its committed enrollment attempt. + EnrollmentEpoch string `json:"enrollmentEpoch,omitempty"` + // Env vars collected from the nodes Env []*V1EnvVar `json:"env"` diff --git a/go/internal/lightningcloud/openapi/generated/models/cluster_service_provision_machine_body.go b/go/internal/lightningcloud/openapi/generated/models/cluster_service_provision_machine_body.go index 4016ca3f7..c2f87fa8e 100644 --- a/go/internal/lightningcloud/openapi/generated/models/cluster_service_provision_machine_body.go +++ b/go/internal/lightningcloud/openapi/generated/models/cluster_service_provision_machine_body.go @@ -39,6 +39,9 @@ type ClusterServiceProvisionMachineBody struct { // ca cert CaCert string `json:"caCert,omitempty"` + // Fences an existing-machine setup callback to its committed enrollment attempt. + EnrollmentEpoch string `json:"enrollmentEpoch,omitempty"` + // Env vars collected from the nodes Env []*V1EnvVar `json:"env"` diff --git a/go/internal/lightningcloud/openapi/generated/models/cluster_service_set_machine_v_p_n_services_body.go b/go/internal/lightningcloud/openapi/generated/models/cluster_service_set_machine_v_p_n_services_body.go new file mode 100644 index 000000000..9e065ccd1 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/cluster_service_set_machine_v_p_n_services_body.go @@ -0,0 +1,57 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ClusterServiceSetMachineVPNServicesBody cluster service set machine v p n services body +// +// swagger:model ClusterServiceSetMachineVPNServicesBody +type ClusterServiceSetMachineVPNServicesBody struct { + + // true starts the services, false stops them. + Enabled bool `json:"enabled,omitempty"` + + // org Id + OrgID string `json:"orgId,omitempty"` +} + +// Validate validates this cluster service set machine v p n services body +func (m *ClusterServiceSetMachineVPNServicesBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this cluster service set machine v p n services body based on context it is used +func (m *ClusterServiceSetMachineVPNServicesBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ClusterServiceSetMachineVPNServicesBody) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClusterServiceSetMachineVPNServicesBody) UnmarshalBinary(b []byte) error { + var res ClusterServiceSetMachineVPNServicesBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/cluster_service_update_provider_fleet_owner_body.go b/go/internal/lightningcloud/openapi/generated/models/cluster_service_update_provider_fleet_owner_body.go new file mode 100644 index 000000000..99c704647 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/cluster_service_update_provider_fleet_owner_body.go @@ -0,0 +1,66 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ClusterServiceUpdateProviderFleetOwnerBody cluster service update provider fleet owner body +// +// swagger:model ClusterServiceUpdateProviderFleetOwnerBody +type ClusterServiceUpdateProviderFleetOwnerBody struct { + + // environment + Environment string `json:"environment,omitempty"` + + // expected revision + ExpectedRevision string `json:"expectedRevision,omitempty"` + + // label + Label string `json:"label,omitempty"` + + // org Id + OrgID string `json:"orgId,omitempty"` + + // username + Username string `json:"username,omitempty"` +} + +// Validate validates this cluster service update provider fleet owner body +func (m *ClusterServiceUpdateProviderFleetOwnerBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this cluster service update provider fleet owner body based on context it is used +func (m *ClusterServiceUpdateProviderFleetOwnerBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ClusterServiceUpdateProviderFleetOwnerBody) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClusterServiceUpdateProviderFleetOwnerBody) UnmarshalBinary(b []byte) error { + var res ClusterServiceUpdateProviderFleetOwnerBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/data_connection_service_update_data_connection_body.go b/go/internal/lightningcloud/openapi/generated/models/data_connection_service_update_data_connection_body.go index 5523a95bf..9a26d33da 100644 --- a/go/internal/lightningcloud/openapi/generated/models/data_connection_service_update_data_connection_body.go +++ b/go/internal/lightningcloud/openapi/generated/models/data_connection_service_update_data_connection_body.go @@ -18,12 +18,16 @@ import ( "github.com/go-openapi/swag" ) -// DataConnectionServiceUpdateDataConnectionBody Update +// DataConnectionServiceUpdateDataConnectionBody Update. Omitted fields leave the stored value unchanged: the scalar settings +// below carry field presence, and an omitted run_cmds keeps the stored commands. // // swagger:model DataConnectionServiceUpdateDataConnectionBody type DataConnectionServiceUpdateDataConnectionBody struct { - // Manages data connection capacity auto-increase + // Clusters the connection is available in. Omit to leave unchanged. + AccessClusterIds *V1AccessClusterIdsUpdate `json:"accessClusterIds,omitempty"` + + // Manages data connection capacity auto-increase. Omit to leave unchanged. AutoIncreaseEnabled bool `json:"autoIncreaseEnabled,omitempty"` // aws @@ -44,13 +48,13 @@ type DataConnectionServiceUpdateDataConnectionBody struct { // name Name string `json:"name,omitempty"` - // Optimization mode for the data connection + // Optimization mode for the data connection. Omit to leave unchanged. OptimizationMode *V1DataConnectionOptimizationMode `json:"optimizationMode,omitempty"` // r2 R2 *V1R2DataConnection `json:"r2,omitempty"` - // Used for rclone + // Used for rclone. Omit to leave unchanged. RunCmds []string `json:"runCmds"` // s3 folder @@ -59,7 +63,7 @@ type DataConnectionServiceUpdateDataConnectionBody struct { // snowflake Snowflake *V1SnowflakeDataConnection `json:"snowflake,omitempty"` - // If true, allow writing to the data connection folder + // If true, allow writing to the data connection folder. Omit to leave unchanged. Writable bool `json:"writable,omitempty"` } @@ -67,6 +71,10 @@ type DataConnectionServiceUpdateDataConnectionBody struct { func (m *DataConnectionServiceUpdateDataConnectionBody) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateAccessClusterIds(formats); err != nil { + res = append(res, err) + } + if err := m.validateAws(formats); err != nil { res = append(res, err) } @@ -105,6 +113,29 @@ func (m *DataConnectionServiceUpdateDataConnectionBody) Validate(formats strfmt. return nil } +func (m *DataConnectionServiceUpdateDataConnectionBody) validateAccessClusterIds(formats strfmt.Registry) error { + if swag.IsZero(m.AccessClusterIds) { // not required + return nil + } + + if m.AccessClusterIds != nil { + if err := m.AccessClusterIds.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("accessClusterIds") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("accessClusterIds") + } + + return err + } + } + + return nil +} + func (m *DataConnectionServiceUpdateDataConnectionBody) validateAws(formats strfmt.Registry) error { if swag.IsZero(m.Aws) { // not required return nil @@ -293,6 +324,10 @@ func (m *DataConnectionServiceUpdateDataConnectionBody) validateSnowflake(format func (m *DataConnectionServiceUpdateDataConnectionBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAccessClusterIds(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateAws(ctx, formats); err != nil { res = append(res, err) } @@ -331,6 +366,31 @@ func (m *DataConnectionServiceUpdateDataConnectionBody) ContextValidate(ctx cont return nil } +func (m *DataConnectionServiceUpdateDataConnectionBody) contextValidateAccessClusterIds(ctx context.Context, formats strfmt.Registry) error { + + if m.AccessClusterIds != nil { + + if swag.IsZero(m.AccessClusterIds) { // not required + return nil + } + + if err := m.AccessClusterIds.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("accessClusterIds") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("accessClusterIds") + } + + return err + } + } + + return nil +} + func (m *DataConnectionServiceUpdateDataConnectionBody) contextValidateAws(ctx context.Context, formats strfmt.Registry) error { if m.Aws != nil { diff --git a/go/internal/lightningcloud/openapi/generated/models/jobs_service_update_job_body.go b/go/internal/lightningcloud/openapi/generated/models/jobs_service_update_job_body.go index 0c978a9f7..dd472d609 100644 --- a/go/internal/lightningcloud/openapi/generated/models/jobs_service_update_job_body.go +++ b/go/internal/lightningcloud/openapi/generated/models/jobs_service_update_job_body.go @@ -24,6 +24,10 @@ type JobsServiceUpdateJobBody struct { // cloudspace Id CloudspaceID string `json:"cloudspaceId,omitempty"` + // Optional. Why the job failed, reported by the job's own machine with state 'fail'. + // Ignored from any other caller or state. + Message string `json:"message,omitempty"` + // Optional, new name for the job. Collisions are resolved server-side. Name string `json:"name,omitempty"` diff --git a/go/internal/lightningcloud/openapi/generated/models/organizations_service_set_org_default_teamspaces_body.go b/go/internal/lightningcloud/openapi/generated/models/organizations_service_set_org_default_teamspaces_body.go new file mode 100644 index 000000000..efbda845b --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/organizations_service_set_org_default_teamspaces_body.go @@ -0,0 +1,54 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// OrganizationsServiceSetOrgDefaultTeamspacesBody organizations service set org default teamspaces body +// +// swagger:model OrganizationsServiceSetOrgDefaultTeamspacesBody +type OrganizationsServiceSetOrgDefaultTeamspacesBody struct { + + // default teamspace ids + DefaultTeamspaceIds []string `json:"defaultTeamspaceIds"` +} + +// Validate validates this organizations service set org default teamspaces body +func (m *OrganizationsServiceSetOrgDefaultTeamspacesBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this organizations service set org default teamspaces body based on context it is used +func (m *OrganizationsServiceSetOrgDefaultTeamspacesBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *OrganizationsServiceSetOrgDefaultTeamspacesBody) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *OrganizationsServiceSetOrgDefaultTeamspacesBody) UnmarshalBinary(b []byte) error { + var res OrganizationsServiceSetOrgDefaultTeamspacesBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/organizations_service_update_organization_body.go b/go/internal/lightningcloud/openapi/generated/models/organizations_service_update_organization_body.go index a225a5723..dc480d07e 100644 --- a/go/internal/lightningcloud/openapi/generated/models/organizations_service_update_organization_body.go +++ b/go/internal/lightningcloud/openapi/generated/models/organizations_service_update_organization_body.go @@ -101,12 +101,6 @@ type OrganizationsServiceUpdateOrganizationBody struct { // disallow nebius saas DisallowNebiusSaas bool `json:"disallowNebiusSaas,omitempty"` - // disallow voltage park saas - DisallowVoltageParkSaas bool `json:"disallowVoltageParkSaas,omitempty"` - - // disallow vultr saas - DisallowVultrSaas bool `json:"disallowVultrSaas,omitempty"` - // display name DisplayName string `json:"displayName,omitempty"` diff --git a/go/internal/lightningcloud/openapi/generated/models/projects_service_update_api_key_body.go b/go/internal/lightningcloud/openapi/generated/models/projects_service_update_api_key_body.go new file mode 100644 index 000000000..fc500fa19 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/projects_service_update_api_key_body.go @@ -0,0 +1,59 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProjectsServiceUpdateAPIKeyBody UpdateAPIKeyRequest updates mutable fields of an API key. Unset fields are +// left unchanged. +// +// swagger:model ProjectsServiceUpdateAPIKeyBody +type ProjectsServiceUpdateAPIKeyBody struct { + + // true moves the key to ACTIVE, false to INACTIVE. Revoked, expired and + // deleted keys cannot be toggled. + Active *bool `json:"active,omitempty"` + + // org Id + OrgID string `json:"orgId,omitempty"` +} + +// Validate validates this projects service update API key body +func (m *ProjectsServiceUpdateAPIKeyBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this projects service update API key body based on context it is used +func (m *ProjectsServiceUpdateAPIKeyBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ProjectsServiceUpdateAPIKeyBody) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProjectsServiceUpdateAPIKeyBody) UnmarshalBinary(b []byte) error { + var res ProjectsServiceUpdateAPIKeyBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/projects_service_update_project_body.go b/go/internal/lightningcloud/openapi/generated/models/projects_service_update_project_body.go index ee72fecd9..76b290e91 100644 --- a/go/internal/lightningcloud/openapi/generated/models/projects_service_update_project_body.go +++ b/go/internal/lightningcloud/openapi/generated/models/projects_service_update_project_body.go @@ -48,12 +48,6 @@ type ProjectsServiceUpdateProjectBody struct { // allow nebius saas AllowNebiusSaas bool `json:"allowNebiusSaas,omitempty"` - // allow voltage park saas - AllowVoltageParkSaas bool `json:"allowVoltageParkSaas,omitempty"` - - // allow vultr saas - AllowVultrSaas bool `json:"allowVultrSaas,omitempty"` - // auto replenish amount AutoReplenishAmount float32 `json:"autoReplenishAmount,omitempty"` diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_access_cluster_ids_update.go b/go/internal/lightningcloud/openapi/generated/models/v1_access_cluster_ids_update.go new file mode 100644 index 000000000..2f4c94cb2 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_access_cluster_ids_update.go @@ -0,0 +1,56 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AccessClusterIdsUpdate Wraps the cluster list so an update that does not mention clusters can be told +// apart from one that clears them. A bare repeated field cannot express that, and +// every partial update would unbind every cluster. +// +// swagger:model v1AccessClusterIdsUpdate +type V1AccessClusterIdsUpdate struct { + + // cluster ids + ClusterIds []string `json:"clusterIds"` +} + +// Validate validates this v1 access cluster ids update +func (m *V1AccessClusterIdsUpdate) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 access cluster ids update based on context it is used +func (m *V1AccessClusterIdsUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AccessClusterIdsUpdate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AccessClusterIdsUpdate) UnmarshalBinary(b []byte) error { + var res V1AccessClusterIdsUpdate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_api_key.go b/go/internal/lightningcloud/openapi/generated/models/v1_api_key.go index da4d6519a..cca6fc08e 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_api_key.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_api_key.go @@ -37,6 +37,10 @@ type V1APIKey struct { // description Description string `json:"description,omitempty"` + // nil when the key never expires + // Format: date-time + ExpiresAt strfmt.DateTime `json:"expiresAt,omitempty"` + // id ID string `json:"id,omitempty"` @@ -55,6 +59,9 @@ type V1APIKey struct { // role Role string `json:"role,omitempty"` + + // status + Status *V1APIKeyStatus `json:"status,omitempty"` } // Validate validates this v1 API key @@ -69,10 +76,18 @@ func (m *V1APIKey) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateExpiresAt(formats); err != nil { + res = append(res, err) + } + if err := m.validateLastUsed(formats); err != nil { res = append(res, err) } + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -114,6 +129,18 @@ func (m *V1APIKey) validateCreatedAt(formats strfmt.Registry) error { return nil } +func (m *V1APIKey) validateExpiresAt(formats strfmt.Registry) error { + if swag.IsZero(m.ExpiresAt) { // not required + return nil + } + + if err := validate.FormatOf("expiresAt", "body", "date-time", m.ExpiresAt.String(), formats); err != nil { + return err + } + + return nil +} + func (m *V1APIKey) validateLastUsed(formats strfmt.Registry) error { if swag.IsZero(m.LastUsed) { // not required return nil @@ -126,6 +153,29 @@ func (m *V1APIKey) validateLastUsed(formats strfmt.Registry) error { return nil } +func (m *V1APIKey) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("status") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("status") + } + + return err + } + } + + return nil +} + // ContextValidate validate this v1 API key based on the context it is used func (m *V1APIKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -134,6 +184,10 @@ func (m *V1APIKey) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -165,6 +219,31 @@ func (m *V1APIKey) contextValidateBudgetConfig(ctx context.Context, formats strf return nil } +func (m *V1APIKey) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if err := m.Status.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("status") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("status") + } + + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *V1APIKey) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_api_key_status.go b/go/internal/lightningcloud/openapi/generated/models/v1_api_key_status.go new file mode 100644 index 000000000..72db87795 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_api_key_status.go @@ -0,0 +1,99 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1APIKeyStatus APIKeyStatus is the lifecycle state of an API key as reported to clients. +// EXPIRED is derived server-side: an ACTIVE key whose expires_at has passed +// reports EXPIRED. +// +// - API_KEY_STATUS_UNSPECIFIED: The key status is unknown; +// - API_KEY_STATUS_ACTIVE: The key is active and can be used to make requests +// - API_KEY_STATUS_INACTIVE: User has deactivated the key; it can be reactivated by the user +// - API_KEY_STATUS_REVOKED: The key has been revoked by the user; it remains visible to the user but cannot be re-activated. +// - API_KEY_STATUS_EXPIRED: The key has expired; it remains visible to the user but cannot be re-activated. +// +// swagger:model v1APIKeyStatus +type V1APIKeyStatus string + +func NewV1APIKeyStatus(value V1APIKeyStatus) *V1APIKeyStatus { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1APIKeyStatus. +func (m V1APIKeyStatus) Pointer() *V1APIKeyStatus { + return &m +} + +const ( + + // V1APIKeyStatusAPIKEYSTATUSUNSPECIFIED captures enum value "API_KEY_STATUS_UNSPECIFIED" + V1APIKeyStatusAPIKEYSTATUSUNSPECIFIED V1APIKeyStatus = "API_KEY_STATUS_UNSPECIFIED" + + // V1APIKeyStatusAPIKEYSTATUSACTIVE captures enum value "API_KEY_STATUS_ACTIVE" + V1APIKeyStatusAPIKEYSTATUSACTIVE V1APIKeyStatus = "API_KEY_STATUS_ACTIVE" + + // V1APIKeyStatusAPIKEYSTATUSINACTIVE captures enum value "API_KEY_STATUS_INACTIVE" + V1APIKeyStatusAPIKEYSTATUSINACTIVE V1APIKeyStatus = "API_KEY_STATUS_INACTIVE" + + // V1APIKeyStatusAPIKEYSTATUSREVOKED captures enum value "API_KEY_STATUS_REVOKED" + V1APIKeyStatusAPIKEYSTATUSREVOKED V1APIKeyStatus = "API_KEY_STATUS_REVOKED" + + // V1APIKeyStatusAPIKEYSTATUSEXPIRED captures enum value "API_KEY_STATUS_EXPIRED" + V1APIKeyStatusAPIKEYSTATUSEXPIRED V1APIKeyStatus = "API_KEY_STATUS_EXPIRED" +) + +// for schema +var v1ApiKeyStatusEnum []any + +func init() { + var res []V1APIKeyStatus + if err := json.Unmarshal([]byte(`["API_KEY_STATUS_UNSPECIFIED","API_KEY_STATUS_ACTIVE","API_KEY_STATUS_INACTIVE","API_KEY_STATUS_REVOKED","API_KEY_STATUS_EXPIRED"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ApiKeyStatusEnum = append(v1ApiKeyStatusEnum, v) + } +} + +func (m V1APIKeyStatus) validateV1APIKeyStatusEnum(path, location string, value V1APIKeyStatus) error { + if err := validate.EnumCase(path, location, value, v1ApiKeyStatusEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 API key status +func (m V1APIKeyStatus) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1APIKeyStatusEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this v1 API key status based on context it is used +func (m V1APIKeyStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_aws_data_connection.go b/go/internal/lightningcloud/openapi/generated/models/v1_aws_data_connection.go index 187f70c0f..a25253df8 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_aws_data_connection.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_aws_data_connection.go @@ -21,9 +21,6 @@ import ( // swagger:model v1AwsDataConnection type V1AwsDataConnection struct { - // When true, mount on non-AWS Studios via project-role STS. Default false (AWS-only). - AvailableInNonAwsProviders bool `json:"availableInNonAwsProviders,omitempty"` - // destination Destination string `json:"destination,omitempty"` diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_cloud_provider.go b/go/internal/lightningcloud/openapi/generated/models/v1_cloud_provider.go index 81c7e9f15..dbbba1657 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_cloud_provider.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_cloud_provider.go @@ -43,9 +43,6 @@ const ( // V1CloudProviderGCP captures enum value "GCP" V1CloudProviderGCP V1CloudProvider = "GCP" - // V1CloudProviderVULTR captures enum value "VULTR" - V1CloudProviderVULTR V1CloudProvider = "VULTR" - // V1CloudProviderLAMBDALABS captures enum value "LAMBDA_LABS" V1CloudProviderLAMBDALABS V1CloudProvider = "LAMBDA_LABS" @@ -55,9 +52,6 @@ const ( // V1CloudProviderDGX captures enum value "DGX" V1CloudProviderDGX V1CloudProvider = "DGX" - // V1CloudProviderVOLTAGEPARK captures enum value "VOLTAGE_PARK" - V1CloudProviderVOLTAGEPARK V1CloudProvider = "VOLTAGE_PARK" - // V1CloudProviderNEBIUS captures enum value "NEBIUS" V1CloudProviderNEBIUS V1CloudProvider = "NEBIUS" @@ -103,7 +97,7 @@ var v1CloudProviderEnum []any func init() { var res []V1CloudProvider - if err := json.Unmarshal([]byte(`["CLOUD_PROVIDER_UNSPECIFIED","AWS","GCP","VULTR","LAMBDA_LABS","SLURM","DGX","VOLTAGE_PARK","NEBIUS","CLOUDFLARE","LIGHTNING","LIGHTNING_AGGREGATE","KUBERNETES","MACHINE","LIGHTNING_ELASTIC_CLUSTER_AGGREGATE","CUDO","MITHRIL","THUNDER_CAT","TENSORDOCK","AZURE","RAFAY"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["CLOUD_PROVIDER_UNSPECIFIED","AWS","GCP","LAMBDA_LABS","SLURM","DGX","NEBIUS","CLOUDFLARE","LIGHTNING","LIGHTNING_AGGREGATE","KUBERNETES","MACHINE","LIGHTNING_ELASTIC_CLUSTER_AGGREGATE","CUDO","MITHRIL","THUNDER_CAT","TENSORDOCK","AZURE","RAFAY"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_cloud_space_app.go b/go/internal/lightningcloud/openapi/generated/models/v1_cloud_space_app.go deleted file mode 100644 index 8d61321a1..000000000 --- a/go/internal/lightningcloud/openapi/generated/models/v1_cloud_space_app.go +++ /dev/null @@ -1,217 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - stderrors "errors" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// V1CloudSpaceApp v1 cloud space app -// -// swagger:model v1CloudSpaceApp -type V1CloudSpaceApp struct { - - // author logo - AuthorLogo string `json:"authorLogo,omitempty"` - - // authors - Authors []string `json:"authors"` - - // categories - Categories []string `json:"categories"` - - // created at - // Format: date-time - CreatedAt strfmt.DateTime `json:"createdAt,omitempty"` - - // description - Description string `json:"description,omitempty"` - - // entrypoint file - EntrypointFile string `json:"entrypointFile,omitempty"` - - // git Url - GitURL string `json:"gitUrl,omitempty"` - - // id - ID string `json:"id,omitempty"` - - // license - License string `json:"license,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // owner Id - OwnerID string `json:"ownerId,omitempty"` - - // owner type - OwnerType *V1CloudSpaceAppOwnerType `json:"ownerType,omitempty"` - - // short description - ShortDescription string `json:"shortDescription,omitempty"` - - // source Url - SourceURL string `json:"sourceUrl,omitempty"` - - // tags - Tags []string `json:"tags"` - - // thumbnail - Thumbnail string `json:"thumbnail,omitempty"` - - // updated at - // Format: date-time - UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"` - - // version - Version string `json:"version,omitempty"` - - // visible to org ids - VisibleToOrgIds []string `json:"visibleToOrgIds"` - - // visible to project ids - VisibleToProjectIds []string `json:"visibleToProjectIds"` - - // visible to user ids - VisibleToUserIds []string `json:"visibleToUserIds"` -} - -// Validate validates this v1 cloud space app -func (m *V1CloudSpaceApp) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCreatedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpdatedAt(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1CloudSpaceApp) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required - return nil - } - - if err := validate.FormatOf("createdAt", "body", "date-time", m.CreatedAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *V1CloudSpaceApp) validateOwnerType(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerType) { // not required - return nil - } - - if m.OwnerType != nil { - if err := m.OwnerType.Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("ownerType") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("ownerType") - } - - return err - } - } - - return nil -} - -func (m *V1CloudSpaceApp) validateUpdatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.UpdatedAt) { // not required - return nil - } - - if err := validate.FormatOf("updatedAt", "body", "date-time", m.UpdatedAt.String(), formats); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this v1 cloud space app based on the context it is used -func (m *V1CloudSpaceApp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOwnerType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1CloudSpaceApp) contextValidateOwnerType(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerType != nil { - - if swag.IsZero(m.OwnerType) { // not required - return nil - } - - if err := m.OwnerType.ContextValidate(ctx, formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("ownerType") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("ownerType") - } - - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1CloudSpaceApp) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1CloudSpaceApp) UnmarshalBinary(b []byte) error { - var res V1CloudSpaceApp - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_cloud_space_app_action.go b/go/internal/lightningcloud/openapi/generated/models/v1_cloud_space_app_action.go deleted file mode 100644 index ecbfe5174..000000000 --- a/go/internal/lightningcloud/openapi/generated/models/v1_cloud_space_app_action.go +++ /dev/null @@ -1,125 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - stderrors "errors" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1CloudSpaceAppAction DEPRECATED: Unused, kept to ensure that lightning_cloud has backwards compatibility with old framework versions -// -// swagger:model v1CloudSpaceAppAction -type V1CloudSpaceAppAction struct { - - // content - Content string `json:"content,omitempty"` - - // type - Type *V1CloudSpaceAppActionType `json:"type,omitempty"` -} - -// Validate validates this v1 cloud space app action -func (m *V1CloudSpaceAppAction) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1CloudSpaceAppAction) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - if m.Type != nil { - if err := m.Type.Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("type") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("type") - } - - return err - } - } - - return nil -} - -// ContextValidate validate this v1 cloud space app action based on the context it is used -func (m *V1CloudSpaceAppAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1CloudSpaceAppAction) contextValidateType(ctx context.Context, formats strfmt.Registry) error { - - if m.Type != nil { - - if swag.IsZero(m.Type) { // not required - return nil - } - - if err := m.Type.ContextValidate(ctx, formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("type") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("type") - } - - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1CloudSpaceAppAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1CloudSpaceAppAction) UnmarshalBinary(b []byte) error { - var res V1CloudSpaceAppAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_cloud_space_app_action_type.go b/go/internal/lightningcloud/openapi/generated/models/v1_cloud_space_app_action_type.go deleted file mode 100644 index fa4360130..000000000 --- a/go/internal/lightningcloud/openapi/generated/models/v1_cloud_space_app_action_type.go +++ /dev/null @@ -1,82 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" -) - -// V1CloudSpaceAppActionType DEPRECATED: Unused, kept to ensure that lightning_cloud has backwards compatibility with old framework versions -// -// swagger:model v1CloudSpaceAppActionType -type V1CloudSpaceAppActionType string - -func NewV1CloudSpaceAppActionType(value V1CloudSpaceAppActionType) *V1CloudSpaceAppActionType { - return &value -} - -// Pointer returns a pointer to a freshly-allocated V1CloudSpaceAppActionType. -func (m V1CloudSpaceAppActionType) Pointer() *V1CloudSpaceAppActionType { - return &m -} - -const ( - - // V1CloudSpaceAppActionTypeTOAST captures enum value "TOAST" - V1CloudSpaceAppActionTypeTOAST V1CloudSpaceAppActionType = "TOAST" - - // V1CloudSpaceAppActionTypeNAVIGATETO captures enum value "NAVIGATE_TO" - V1CloudSpaceAppActionTypeNAVIGATETO V1CloudSpaceAppActionType = "NAVIGATE_TO" -) - -// for schema -var v1CloudSpaceAppActionTypeEnum []any - -func init() { - var res []V1CloudSpaceAppActionType - if err := json.Unmarshal([]byte(`["TOAST","NAVIGATE_TO"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - v1CloudSpaceAppActionTypeEnum = append(v1CloudSpaceAppActionTypeEnum, v) - } -} - -func (m V1CloudSpaceAppActionType) validateV1CloudSpaceAppActionTypeEnum(path, location string, value V1CloudSpaceAppActionType) error { - if err := validate.EnumCase(path, location, value, v1CloudSpaceAppActionTypeEnum, true); err != nil { - return err - } - return nil -} - -// Validate validates this v1 cloud space app action type -func (m V1CloudSpaceAppActionType) Validate(formats strfmt.Registry) error { - var res []error - - // value enum - if err := m.validateV1CloudSpaceAppActionTypeEnum("", "body", m); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validates this v1 cloud space app action type based on context it is used -func (m V1CloudSpaceAppActionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_cloud_space_app_owner_type.go b/go/internal/lightningcloud/openapi/generated/models/v1_cloud_space_app_owner_type.go deleted file mode 100644 index 3b59661ec..000000000 --- a/go/internal/lightningcloud/openapi/generated/models/v1_cloud_space_app_owner_type.go +++ /dev/null @@ -1,88 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" -) - -// V1CloudSpaceAppOwnerType v1 cloud space app owner type -// -// swagger:model v1CloudSpaceAppOwnerType -type V1CloudSpaceAppOwnerType string - -func NewV1CloudSpaceAppOwnerType(value V1CloudSpaceAppOwnerType) *V1CloudSpaceAppOwnerType { - return &value -} - -// Pointer returns a pointer to a freshly-allocated V1CloudSpaceAppOwnerType. -func (m V1CloudSpaceAppOwnerType) Pointer() *V1CloudSpaceAppOwnerType { - return &m -} - -const ( - - // V1CloudSpaceAppOwnerTypeCLOUDSPACEAPPOWNERTYPEUNDEFINED captures enum value "CLOUD_SPACE_APP_OWNER_TYPE_UNDEFINED" - V1CloudSpaceAppOwnerTypeCLOUDSPACEAPPOWNERTYPEUNDEFINED V1CloudSpaceAppOwnerType = "CLOUD_SPACE_APP_OWNER_TYPE_UNDEFINED" - - // V1CloudSpaceAppOwnerTypeCLOUDSPACEAPPOWNERTYPEUSER captures enum value "CLOUD_SPACE_APP_OWNER_TYPE_USER" - V1CloudSpaceAppOwnerTypeCLOUDSPACEAPPOWNERTYPEUSER V1CloudSpaceAppOwnerType = "CLOUD_SPACE_APP_OWNER_TYPE_USER" - - // V1CloudSpaceAppOwnerTypeCLOUDSPACEAPPOWNERTYPEORG captures enum value "CLOUD_SPACE_APP_OWNER_TYPE_ORG" - V1CloudSpaceAppOwnerTypeCLOUDSPACEAPPOWNERTYPEORG V1CloudSpaceAppOwnerType = "CLOUD_SPACE_APP_OWNER_TYPE_ORG" - - // V1CloudSpaceAppOwnerTypeCLOUDSPACEAPPOWNERTYPEPROJECT captures enum value "CLOUD_SPACE_APP_OWNER_TYPE_PROJECT" - V1CloudSpaceAppOwnerTypeCLOUDSPACEAPPOWNERTYPEPROJECT V1CloudSpaceAppOwnerType = "CLOUD_SPACE_APP_OWNER_TYPE_PROJECT" -) - -// for schema -var v1CloudSpaceAppOwnerTypeEnum []any - -func init() { - var res []V1CloudSpaceAppOwnerType - if err := json.Unmarshal([]byte(`["CLOUD_SPACE_APP_OWNER_TYPE_UNDEFINED","CLOUD_SPACE_APP_OWNER_TYPE_USER","CLOUD_SPACE_APP_OWNER_TYPE_ORG","CLOUD_SPACE_APP_OWNER_TYPE_PROJECT"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - v1CloudSpaceAppOwnerTypeEnum = append(v1CloudSpaceAppOwnerTypeEnum, v) - } -} - -func (m V1CloudSpaceAppOwnerType) validateV1CloudSpaceAppOwnerTypeEnum(path, location string, value V1CloudSpaceAppOwnerType) error { - if err := validate.EnumCase(path, location, value, v1CloudSpaceAppOwnerTypeEnum, true); err != nil { - return err - } - return nil -} - -// Validate validates this v1 cloud space app owner type -func (m V1CloudSpaceAppOwnerType) Validate(formats strfmt.Registry) error { - var res []error - - // value enum - if err := m.validateV1CloudSpaceAppOwnerTypeEnum("", "body", m); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validates this v1 cloud space app owner type based on context it is used -func (m V1CloudSpaceAppOwnerType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_cluster_accelerator.go b/go/internal/lightningcloud/openapi/generated/models/v1_cluster_accelerator.go index 98c3a1968..cb82fdefa 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_cluster_accelerator.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_cluster_accelerator.go @@ -118,6 +118,9 @@ type V1ClusterAccelerator struct { // Largest availability of quota in all regions MaxAvailableQuota string `json:"maxAvailableQuota,omitempty"` + // Additional credits per GPU-hour for a shared machine placement group + MultiNodeIbCostPerGpuHour float64 `json:"multiNodeIbCostPerGpuHour,omitempty"` + // Prevents users from requesting instance as on-demand instance NonOndemand bool `json:"nonOndemand,omitempty"` @@ -150,7 +153,7 @@ type V1ClusterAccelerator struct { // Campaign label / end time; nil when no promo applies Promo *V1PromoOverlay `json:"promo,omitempty"` - // Cloud provider name as string, e.g. 'aws', 'gcp', 'vultr' - this avoids us matching on the FE + // Cloud provider name as string, e.g. 'aws', 'gcp' - this avoids us matching on the FE Provider *V1CloudProvider `json:"provider,omitempty"` // Quota last checking time diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_cluster_details.go b/go/internal/lightningcloud/openapi/generated/models/v1_cluster_details.go new file mode 100644 index 000000000..96356053b --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_cluster_details.go @@ -0,0 +1,447 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterDetails v1 cluster details +// +// swagger:model v1ClusterDetails +type V1ClusterDetails struct { + + // effective schedulable gpus + EffectiveSchedulableGpus string `json:"effectiveSchedulableGpus,omitempty"` + + // floor unenforceable + FloorUnenforceable bool `json:"floorUnenforceable,omitempty"` + + // on burst count + OnBurstCount int64 `json:"onBurstCount,omitempty"` + + // on burst servers + OnBurstServers []*V1ClusterDetailsServer `json:"onBurstServers"` + + // on demand burst gpus + OnDemandBurstGpus string `json:"onDemandBurstGpus,omitempty"` + + // on demand headroom gpus + OnDemandHeadroomGpus string `json:"onDemandHeadroomGpus,omitempty"` + + // on machine count + OnMachineCount int64 `json:"onMachineCount,omitempty"` + + // on machine servers + OnMachineServers []*V1ClusterDetailsServer `json:"onMachineServers"` + + // pending count + PendingCount int64 `json:"pendingCount,omitempty"` + + // pending servers + PendingServers []*V1ClusterDetailsServer `json:"pendingServers"` + + // reservations + Reservations []*V1ClusterDetailsReservation `json:"reservations"` + + // reserved floor gpus + ReservedFloorGpus string `json:"reservedFloorGpus,omitempty"` + + // schedulable gpus + SchedulableGpus string `json:"schedulableGpus,omitempty"` + + // spot in use gpus + SpotInUseGpus string `json:"spotInUseGpus,omitempty"` + + // unscheduled count + UnscheduledCount int64 `json:"unscheduledCount,omitempty"` + + // unscheduled servers + UnscheduledServers []*V1ClusterDetailsServer `json:"unscheduledServers"` +} + +// Validate validates this v1 cluster details +func (m *V1ClusterDetails) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOnBurstServers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOnMachineServers(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePendingServers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReservations(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUnscheduledServers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterDetails) validateOnBurstServers(formats strfmt.Registry) error { + if swag.IsZero(m.OnBurstServers) { // not required + return nil + } + + for i := 0; i < len(m.OnBurstServers); i++ { + if swag.IsZero(m.OnBurstServers[i]) { // not required + continue + } + + if m.OnBurstServers[i] != nil { + if err := m.OnBurstServers[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("onBurstServers" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("onBurstServers" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1ClusterDetails) validateOnMachineServers(formats strfmt.Registry) error { + if swag.IsZero(m.OnMachineServers) { // not required + return nil + } + + for i := 0; i < len(m.OnMachineServers); i++ { + if swag.IsZero(m.OnMachineServers[i]) { // not required + continue + } + + if m.OnMachineServers[i] != nil { + if err := m.OnMachineServers[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("onMachineServers" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("onMachineServers" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1ClusterDetails) validatePendingServers(formats strfmt.Registry) error { + if swag.IsZero(m.PendingServers) { // not required + return nil + } + + for i := 0; i < len(m.PendingServers); i++ { + if swag.IsZero(m.PendingServers[i]) { // not required + continue + } + + if m.PendingServers[i] != nil { + if err := m.PendingServers[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("pendingServers" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("pendingServers" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1ClusterDetails) validateReservations(formats strfmt.Registry) error { + if swag.IsZero(m.Reservations) { // not required + return nil + } + + for i := 0; i < len(m.Reservations); i++ { + if swag.IsZero(m.Reservations[i]) { // not required + continue + } + + if m.Reservations[i] != nil { + if err := m.Reservations[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("reservations" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("reservations" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1ClusterDetails) validateUnscheduledServers(formats strfmt.Registry) error { + if swag.IsZero(m.UnscheduledServers) { // not required + return nil + } + + for i := 0; i < len(m.UnscheduledServers); i++ { + if swag.IsZero(m.UnscheduledServers[i]) { // not required + continue + } + + if m.UnscheduledServers[i] != nil { + if err := m.UnscheduledServers[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("unscheduledServers" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("unscheduledServers" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 cluster details based on the context it is used +func (m *V1ClusterDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOnBurstServers(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateOnMachineServers(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePendingServers(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateReservations(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateUnscheduledServers(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterDetails) contextValidateOnBurstServers(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.OnBurstServers); i++ { + + if m.OnBurstServers[i] != nil { + + if swag.IsZero(m.OnBurstServers[i]) { // not required + return nil + } + + if err := m.OnBurstServers[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("onBurstServers" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("onBurstServers" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1ClusterDetails) contextValidateOnMachineServers(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.OnMachineServers); i++ { + + if m.OnMachineServers[i] != nil { + + if swag.IsZero(m.OnMachineServers[i]) { // not required + return nil + } + + if err := m.OnMachineServers[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("onMachineServers" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("onMachineServers" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1ClusterDetails) contextValidatePendingServers(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.PendingServers); i++ { + + if m.PendingServers[i] != nil { + + if swag.IsZero(m.PendingServers[i]) { // not required + return nil + } + + if err := m.PendingServers[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("pendingServers" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("pendingServers" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1ClusterDetails) contextValidateReservations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Reservations); i++ { + + if m.Reservations[i] != nil { + + if swag.IsZero(m.Reservations[i]) { // not required + return nil + } + + if err := m.Reservations[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("reservations" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("reservations" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1ClusterDetails) contextValidateUnscheduledServers(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.UnscheduledServers); i++ { + + if m.UnscheduledServers[i] != nil { + + if swag.IsZero(m.UnscheduledServers[i]) { // not required + return nil + } + + if err := m.UnscheduledServers[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("unscheduledServers" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("unscheduledServers" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterDetails) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterDetails) UnmarshalBinary(b []byte) error { + var res V1ClusterDetails + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_cluster_details_reservation.go b/go/internal/lightningcloud/openapi/generated/models/v1_cluster_details_reservation.go new file mode 100644 index 000000000..183ddb814 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_cluster_details_reservation.go @@ -0,0 +1,87 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterDetailsReservation v1 cluster details reservation +// +// swagger:model v1ClusterDetailsReservation +type V1ClusterDetailsReservation struct { + + // available gpus + AvailableGpus string `json:"availableGpus,omitempty"` + + // bursting past floor + BurstingPastFloor bool `json:"burstingPastFloor,omitempty"` + + // committed gpus + CommittedGpus string `json:"committedGpus,omitempty"` + + // instance type + InstanceType string `json:"instanceType,omitempty"` + + // org Id + OrgID string `json:"orgId,omitempty"` + + // org name + OrgName string `json:"orgName,omitempty"` + + // owner unbound gpus + OwnerUnboundGpus string `json:"ownerUnboundGpus,omitempty"` + + // project Id + ProjectID string `json:"projectId,omitempty"` + + // project name + ProjectName string `json:"projectName,omitempty"` + + // reservation Id + ReservationID string `json:"reservationId,omitempty"` + + // unenforceable + Unenforceable bool `json:"unenforceable,omitempty"` + + // used gpus + UsedGpus string `json:"usedGpus,omitempty"` +} + +// Validate validates this v1 cluster details reservation +func (m *V1ClusterDetailsReservation) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 cluster details reservation based on context it is used +func (m *V1ClusterDetailsReservation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterDetailsReservation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterDetailsReservation) UnmarshalBinary(b []byte) error { + var res V1ClusterDetailsReservation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_cluster_details_server.go b/go/internal/lightningcloud/openapi/generated/models/v1_cluster_details_server.go new file mode 100644 index 000000000..6116d13c0 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_cluster_details_server.go @@ -0,0 +1,188 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterDetailsServer v1 cluster details server +// +// swagger:model v1ClusterDetailsServer +type V1ClusterDetailsServer struct { + + // capacity reservation Id + CapacityReservationID string `json:"capacityReservationId,omitempty"` + + // cpus + Cpus int64 `json:"cpus,omitempty"` + + // created at + // Format: date-time + CreatedAt strfmt.DateTime `json:"createdAt,omitempty"` + + // error + Error string `json:"error,omitempty"` + + // gpus + Gpus int64 `json:"gpus,omitempty"` + + // id + ID string `json:"id,omitempty"` + + // instance type + InstanceType string `json:"instanceType,omitempty"` + + // org Id + OrgID string `json:"orgId,omitempty"` + + // org name + OrgName string `json:"orgName,omitempty"` + + // project Id + ProjectID string `json:"projectId,omitempty"` + + // project name + ProjectName string `json:"projectName,omitempty"` + + // provider + Provider string `json:"provider,omitempty"` + + // retries + Retries string `json:"retries,omitempty"` + + // spot + Spot bool `json:"spot,omitempty"` + + // state + State *V1ServerState `json:"state,omitempty"` + + // user Id + UserID string `json:"userId,omitempty"` + + // workload name + WorkloadName string `json:"workloadName,omitempty"` +} + +// Validate validates this v1 cluster details server +func (m *V1ClusterDetailsServer) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreatedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterDetailsServer) validateCreatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.CreatedAt) { // not required + return nil + } + + if err := validate.FormatOf("createdAt", "body", "date-time", m.CreatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterDetailsServer) validateState(formats strfmt.Registry) error { + if swag.IsZero(m.State) { // not required + return nil + } + + if m.State != nil { + if err := m.State.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("state") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("state") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this v1 cluster details server based on the context it is used +func (m *V1ClusterDetailsServer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateState(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterDetailsServer) contextValidateState(ctx context.Context, formats strfmt.Registry) error { + + if m.State != nil { + + if swag.IsZero(m.State) { // not required + return nil + } + + if err := m.State.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("state") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("state") + } + + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterDetailsServer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterDetailsServer) UnmarshalBinary(b []byte) error { + var res V1ClusterDetailsServer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_cluster_reservation_usage_point.go b/go/internal/lightningcloud/openapi/generated/models/v1_cluster_reservation_usage_point.go new file mode 100644 index 000000000..b9e5b8bb6 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_cluster_reservation_usage_point.go @@ -0,0 +1,119 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterReservationUsagePoint v1 cluster reservation usage point +// +// swagger:model v1ClusterReservationUsagePoint +type V1ClusterReservationUsagePoint struct { + + // end time + // Format: date-time + EndTime strfmt.DateTime `json:"endTime,omitempty"` + + // reserved capacity gpus + ReservedCapacityGpus float64 `json:"reservedCapacityGpus,omitempty"` + + // reserved multi node gpus + ReservedMultiNodeGpus float64 `json:"reservedMultiNodeGpus,omitempty"` + + // reserved single node gpus + ReservedSingleNodeGpus float64 `json:"reservedSingleNodeGpus,omitempty"` + + // reserved unclassified gpus + ReservedUnclassifiedGpus float64 `json:"reservedUnclassifiedGpus,omitempty"` + + // start time + // Format: date-time + StartTime strfmt.DateTime `json:"startTime,omitempty"` + + // unreserved multi node gpus + UnreservedMultiNodeGpus float64 `json:"unreservedMultiNodeGpus,omitempty"` + + // unreserved single node gpus + UnreservedSingleNodeGpus float64 `json:"unreservedSingleNodeGpus,omitempty"` + + // unreserved unclassified gpus + UnreservedUnclassifiedGpus float64 `json:"unreservedUnclassifiedGpus,omitempty"` +} + +// Validate validates this v1 cluster reservation usage point +func (m *V1ClusterReservationUsagePoint) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterReservationUsagePoint) validateEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("endTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterReservationUsagePoint) validateStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("startTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v1 cluster reservation usage point based on context it is used +func (m *V1ClusterReservationUsagePoint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterReservationUsagePoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterReservationUsagePoint) UnmarshalBinary(b []byte) error { + var res V1ClusterReservationUsagePoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_cluster_spec.go b/go/internal/lightningcloud/openapi/generated/models/v1_cluster_spec.go index 12a86cb29..3f3ae5089 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_cluster_spec.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_cluster_spec.go @@ -36,6 +36,9 @@ type V1ClusterSpec struct { // Azure cloud configuration AzureV1 *V1AzureDirectV1 `json:"azureV1,omitempty"` + // Blocks server creation, allocation, and warm reuse for every user. + BlockServerCreation bool `json:"blockServerCreation,omitempty"` + // If true, apply Lightning cloud pricing for this cluster instead of BYOC // (needed for the case when we keep customers' BYOC clusters on our own infra) CloudPricingEnabled bool `json:"cloudPricingEnabled,omitempty"` @@ -160,12 +163,6 @@ type V1ClusterSpec struct { // Whether cloudy vibe coding is enabled for the cluster VibeCodingEnabled bool `json:"vibeCodingEnabled,omitempty"` - - // VoltagePark Cloud configuration - VoltageParkV1 *V1VoltageParkDirectV1 `json:"voltageParkV1,omitempty"` - - // Vultr Cloud configuration - VultrV1 *V1VultrDirectV1 `json:"vultrV1,omitempty"` } // Validate validates this v1 cluster spec @@ -264,14 +261,6 @@ func (m *V1ClusterSpec) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateVoltageParkV1(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVultrV1(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -814,52 +803,6 @@ func (m *V1ClusterSpec) validateThunderCatV1(formats strfmt.Registry) error { return nil } -func (m *V1ClusterSpec) validateVoltageParkV1(formats strfmt.Registry) error { - if swag.IsZero(m.VoltageParkV1) { // not required - return nil - } - - if m.VoltageParkV1 != nil { - if err := m.VoltageParkV1.Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("voltageParkV1") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("voltageParkV1") - } - - return err - } - } - - return nil -} - -func (m *V1ClusterSpec) validateVultrV1(formats strfmt.Registry) error { - if swag.IsZero(m.VultrV1) { // not required - return nil - } - - if m.VultrV1 != nil { - if err := m.VultrV1.Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("vultrV1") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("vultrV1") - } - - return err - } - } - - return nil -} - // ContextValidate validate this v1 cluster spec based on the context it is used func (m *V1ClusterSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -956,14 +899,6 @@ func (m *V1ClusterSpec) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } - if err := m.contextValidateVoltageParkV1(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVultrV1(ctx, formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -1549,56 +1484,6 @@ func (m *V1ClusterSpec) contextValidateThunderCatV1(ctx context.Context, formats return nil } -func (m *V1ClusterSpec) contextValidateVoltageParkV1(ctx context.Context, formats strfmt.Registry) error { - - if m.VoltageParkV1 != nil { - - if swag.IsZero(m.VoltageParkV1) { // not required - return nil - } - - if err := m.VoltageParkV1.ContextValidate(ctx, formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("voltageParkV1") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("voltageParkV1") - } - - return err - } - } - - return nil -} - -func (m *V1ClusterSpec) contextValidateVultrV1(ctx context.Context, formats strfmt.Registry) error { - - if m.VultrV1 != nil { - - if swag.IsZero(m.VultrV1) { // not required - return nil - } - - if err := m.VultrV1.ContextValidate(ctx, formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("vultrV1") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("vultrV1") - } - - return err - } - } - - return nil -} - // MarshalBinary interface implementation func (m *V1ClusterSpec) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_create_api_key_request.go b/go/internal/lightningcloud/openapi/generated/models/v1_create_api_key_request.go index 329173281..b550bbf22 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_create_api_key_request.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_create_api_key_request.go @@ -16,6 +16,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // V1CreateAPIKeyRequest v1 create API key request @@ -29,6 +30,10 @@ type V1CreateAPIKeyRequest struct { // description Description string `json:"description,omitempty"` + // Optional expiry + // Format: date-time + ExpiresAt strfmt.DateTime `json:"expiresAt,omitempty"` + // name Name string `json:"name,omitempty"` @@ -56,6 +61,10 @@ func (m *V1CreateAPIKeyRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateExpiresAt(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -85,6 +94,18 @@ func (m *V1CreateAPIKeyRequest) validateBudgetConfig(formats strfmt.Registry) er return nil } +func (m *V1CreateAPIKeyRequest) validateExpiresAt(formats strfmt.Registry) error { + if swag.IsZero(m.ExpiresAt) { // not required + return nil + } + + if err := validate.FormatOf("expiresAt", "body", "date-time", m.ExpiresAt.String(), formats); err != nil { + return err + } + + return nil +} + // ContextValidate validate this v1 create API key request based on the context it is used func (m *V1CreateAPIKeyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_create_cloud_space_app_instance_response.go b/go/internal/lightningcloud/openapi/generated/models/v1_create_cloud_space_app_instance_response.go deleted file mode 100644 index 046a98166..000000000 --- a/go/internal/lightningcloud/openapi/generated/models/v1_create_cloud_space_app_instance_response.go +++ /dev/null @@ -1,193 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - stderrors "errors" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1CreateCloudSpaceAppInstanceResponse v1 create cloud space app instance response -// -// swagger:model v1CreateCloudSpaceAppInstanceResponse -type V1CreateCloudSpaceAppInstanceResponse struct { - - // Unused - Actions []*V1CloudSpaceAppAction `json:"actions"` - - // lightningappinstance - Lightningappinstance *Externalv1LightningappInstance `json:"lightningappinstance,omitempty"` -} - -// Validate validates this v1 create cloud space app instance response -func (m *V1CreateCloudSpaceAppInstanceResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLightningappinstance(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1CreateCloudSpaceAppInstanceResponse) validateActions(formats strfmt.Registry) error { - if swag.IsZero(m.Actions) { // not required - return nil - } - - for i := 0; i < len(m.Actions); i++ { - if swag.IsZero(m.Actions[i]) { // not required - continue - } - - if m.Actions[i] != nil { - if err := m.Actions[i].Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("actions" + "." + strconv.Itoa(i)) - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("actions" + "." + strconv.Itoa(i)) - } - - return err - } - } - - } - - return nil -} - -func (m *V1CreateCloudSpaceAppInstanceResponse) validateLightningappinstance(formats strfmt.Registry) error { - if swag.IsZero(m.Lightningappinstance) { // not required - return nil - } - - if m.Lightningappinstance != nil { - if err := m.Lightningappinstance.Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("lightningappinstance") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("lightningappinstance") - } - - return err - } - } - - return nil -} - -// ContextValidate validate this v1 create cloud space app instance response based on the context it is used -func (m *V1CreateCloudSpaceAppInstanceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLightningappinstance(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1CreateCloudSpaceAppInstanceResponse) contextValidateActions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Actions); i++ { - - if m.Actions[i] != nil { - - if swag.IsZero(m.Actions[i]) { // not required - return nil - } - - if err := m.Actions[i].ContextValidate(ctx, formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("actions" + "." + strconv.Itoa(i)) - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("actions" + "." + strconv.Itoa(i)) - } - - return err - } - } - - } - - return nil -} - -func (m *V1CreateCloudSpaceAppInstanceResponse) contextValidateLightningappinstance(ctx context.Context, formats strfmt.Registry) error { - - if m.Lightningappinstance != nil { - - if swag.IsZero(m.Lightningappinstance) { // not required - return nil - } - - if err := m.Lightningappinstance.ContextValidate(ctx, formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("lightningappinstance") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("lightningappinstance") - } - - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1CreateCloudSpaceAppInstanceResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1CreateCloudSpaceAppInstanceResponse) UnmarshalBinary(b []byte) error { - var res V1CreateCloudSpaceAppInstanceResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_create_user_secret_request.go b/go/internal/lightningcloud/openapi/generated/models/v1_create_user_secret_request.go index 68f017c0c..164091fb6 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_create_user_secret_request.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_create_user_secret_request.go @@ -11,7 +11,9 @@ package models import ( "context" + stderrors "errors" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -24,17 +26,86 @@ type V1CreateUserSecretRequest struct { // name Name string `json:"name,omitempty"` + // type + Type *V1SecretType `json:"type,omitempty"` + // value Value string `json:"value,omitempty"` } // Validate validates this v1 create user secret request func (m *V1CreateUserSecretRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CreateUserSecretRequest) validateType(formats strfmt.Registry) error { + if swag.IsZero(m.Type) { // not required + return nil + } + + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("type") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("type") + } + + return err + } + } + return nil } -// ContextValidate validates this v1 create user secret request based on context it is used +// ContextValidate validate this v1 create user secret request based on the context it is used func (m *V1CreateUserSecretRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CreateUserSecretRequest) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("type") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("type") + } + + return err + } + } + return nil } diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_external_cluster_spec.go b/go/internal/lightningcloud/openapi/generated/models/v1_external_cluster_spec.go index 7e2560b09..01f5e291f 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_external_cluster_spec.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_external_cluster_spec.go @@ -129,12 +129,6 @@ type V1ExternalClusterSpec struct { // user Id UserID string `json:"userId,omitempty"` - - // VoltagePark Cloud configuration - VoltageParkV1 *V1VoltageParkDirectV1 `json:"voltageParkV1,omitempty"` - - // Vultr Cloud configuration - VultrV1 *V1VultrDirectV1 `json:"vultrV1,omitempty"` } // Validate validates this v1 external cluster spec @@ -229,14 +223,6 @@ func (m *V1ExternalClusterSpec) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateVoltageParkV1(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVultrV1(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -756,52 +742,6 @@ func (m *V1ExternalClusterSpec) validateThunderCatV1(formats strfmt.Registry) er return nil } -func (m *V1ExternalClusterSpec) validateVoltageParkV1(formats strfmt.Registry) error { - if swag.IsZero(m.VoltageParkV1) { // not required - return nil - } - - if m.VoltageParkV1 != nil { - if err := m.VoltageParkV1.Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("voltageParkV1") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("voltageParkV1") - } - - return err - } - } - - return nil -} - -func (m *V1ExternalClusterSpec) validateVultrV1(formats strfmt.Registry) error { - if swag.IsZero(m.VultrV1) { // not required - return nil - } - - if m.VultrV1 != nil { - if err := m.VultrV1.Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("vultrV1") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("vultrV1") - } - - return err - } - } - - return nil -} - // ContextValidate validate this v1 external cluster spec based on the context it is used func (m *V1ExternalClusterSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -894,14 +834,6 @@ func (m *V1ExternalClusterSpec) ContextValidate(ctx context.Context, formats str res = append(res, err) } - if err := m.contextValidateVoltageParkV1(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVultrV1(ctx, formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -1462,56 +1394,6 @@ func (m *V1ExternalClusterSpec) contextValidateThunderCatV1(ctx context.Context, return nil } -func (m *V1ExternalClusterSpec) contextValidateVoltageParkV1(ctx context.Context, formats strfmt.Registry) error { - - if m.VoltageParkV1 != nil { - - if swag.IsZero(m.VoltageParkV1) { // not required - return nil - } - - if err := m.VoltageParkV1.ContextValidate(ctx, formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("voltageParkV1") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("voltageParkV1") - } - - return err - } - } - - return nil -} - -func (m *V1ExternalClusterSpec) contextValidateVultrV1(ctx context.Context, formats strfmt.Registry) error { - - if m.VultrV1 != nil { - - if swag.IsZero(m.VultrV1) { // not required - return nil - } - - if err := m.VultrV1.ContextValidate(ctx, formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("vultrV1") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("vultrV1") - } - - return err - } - } - - return nil -} - // MarshalBinary interface implementation func (m *V1ExternalClusterSpec) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_firmware_entry.go b/go/internal/lightningcloud/openapi/generated/models/v1_firmware_entry.go new file mode 100644 index 000000000..67ef0dee4 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_firmware_entry.go @@ -0,0 +1,69 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FirmwareEntry v1 firmware entry +// +// swagger:model v1FirmwareEntry +type V1FirmwareEntry struct { + + // id + ID string `json:"id,omitempty"` + + // manufacturer + Manufacturer string `json:"manufacturer,omitempty"` + + // model + Model string `json:"model,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // source + Source string `json:"source,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 firmware entry +func (m *V1FirmwareEntry) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 firmware entry based on context it is used +func (m *V1FirmwareEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1FirmwareEntry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FirmwareEntry) UnmarshalBinary(b []byte) error { + var res V1FirmwareEntry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_firmware_inventory.go b/go/internal/lightningcloud/openapi/generated/models/v1_firmware_inventory.go new file mode 100644 index 000000000..1ed41275e --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_firmware_inventory.go @@ -0,0 +1,146 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FirmwareInventory v1 firmware inventory +// +// swagger:model v1FirmwareInventory +type V1FirmwareInventory struct { + + // components + Components []*V1FirmwareEntry `json:"components"` + + // hardware state + HardwareState string `json:"hardwareState,omitempty"` + + // nvme state + NvmeState string `json:"nvmeState,omitempty"` + + // pex state + PexState string `json:"pexState,omitempty"` + + // racadm state + RacadmState string `json:"racadmState,omitempty"` +} + +// Validate validates this v1 firmware inventory +func (m *V1FirmwareInventory) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateComponents(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1FirmwareInventory) validateComponents(formats strfmt.Registry) error { + if swag.IsZero(m.Components) { // not required + return nil + } + + for i := 0; i < len(m.Components); i++ { + if swag.IsZero(m.Components[i]) { // not required + continue + } + + if m.Components[i] != nil { + if err := m.Components[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("components" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("components" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 firmware inventory based on the context it is used +func (m *V1FirmwareInventory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateComponents(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1FirmwareInventory) contextValidateComponents(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Components); i++ { + + if m.Components[i] != nil { + + if swag.IsZero(m.Components[i]) { // not required + return nil + } + + if err := m.Components[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("components" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("components" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1FirmwareInventory) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FirmwareInventory) UnmarshalBinary(b []byte) error { + var res V1FirmwareInventory + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_generic_job.go b/go/internal/lightningcloud/openapi/generated/models/v1_generic_job.go index f9470cd5b..c13ccccb1 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_generic_job.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_generic_job.go @@ -35,9 +35,15 @@ type V1GenericJob struct { // Format: date-time CreatedAt strfmt.DateTime `json:"createdAt,omitempty"` + // 1-based attempt currently shown; 0 = unset + CurrentRunAttempt int32 `json:"currentRunAttempt,omitempty"` + // id ID string `json:"id,omitempty"` + // Total attempts allowed; 0 = unset (no retries) + MaxRunAttempts int32 `json:"maxRunAttempts,omitempty"` + // message Message string `json:"message,omitempty"` diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_get_cluster_details_response.go b/go/internal/lightningcloud/openapi/generated/models/v1_get_cluster_details_response.go new file mode 100644 index 000000000..909230c8b --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_get_cluster_details_response.go @@ -0,0 +1,122 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GetClusterDetailsResponse v1 get cluster details response +// +// swagger:model v1GetClusterDetailsResponse +type V1GetClusterDetailsResponse struct { + + // details + Details *V1ClusterDetails `json:"details,omitempty"` +} + +// Validate validates this v1 get cluster details response +func (m *V1GetClusterDetailsResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GetClusterDetailsResponse) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + if m.Details != nil { + if err := m.Details.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("details") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("details") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this v1 get cluster details response based on the context it is used +func (m *V1GetClusterDetailsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GetClusterDetailsResponse) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + if m.Details != nil { + + if swag.IsZero(m.Details) { // not required + return nil + } + + if err := m.Details.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("details") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("details") + } + + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GetClusterDetailsResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GetClusterDetailsResponse) UnmarshalBinary(b []byte) error { + var res V1GetClusterDetailsResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_get_cluster_reservation_usage_response.go b/go/internal/lightningcloud/openapi/generated/models/v1_get_cluster_reservation_usage_response.go new file mode 100644 index 000000000..eef154a39 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_get_cluster_reservation_usage_response.go @@ -0,0 +1,141 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GetClusterReservationUsageResponse v1 get cluster reservation usage response +// +// swagger:model v1GetClusterReservationUsageResponse +type V1GetClusterReservationUsageResponse struct { + + // Time-weighted occupied GPUs using the durable scheduler workload classification. + Points []*V1ClusterReservationUsagePoint `json:"points"` + + // Owner-wide compute telemetry for matching GPU types in this cluster and window. + // This is not a per-reservation ledger or a statement of cash collected. + RecordedCredits float64 `json:"recordedCredits,omitempty"` + + // warnings + Warnings []string `json:"warnings"` +} + +// Validate validates this v1 get cluster reservation usage response +func (m *V1GetClusterReservationUsageResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePoints(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GetClusterReservationUsageResponse) validatePoints(formats strfmt.Registry) error { + if swag.IsZero(m.Points) { // not required + return nil + } + + for i := 0; i < len(m.Points); i++ { + if swag.IsZero(m.Points[i]) { // not required + continue + } + + if m.Points[i] != nil { + if err := m.Points[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("points" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("points" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 get cluster reservation usage response based on the context it is used +func (m *V1GetClusterReservationUsageResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePoints(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GetClusterReservationUsageResponse) contextValidatePoints(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Points); i++ { + + if m.Points[i] != nil { + + if swag.IsZero(m.Points[i]) { // not required + return nil + } + + if err := m.Points[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("points" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("points" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GetClusterReservationUsageResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GetClusterReservationUsageResponse) UnmarshalBinary(b []byte) error { + var res V1GetClusterReservationUsageResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_get_machine_setup_url_response.go b/go/internal/lightningcloud/openapi/generated/models/v1_get_machine_setup_url_response.go new file mode 100644 index 000000000..54f6ea59f --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_get_machine_setup_url_response.go @@ -0,0 +1,54 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GetMachineSetupURLResponse v1 get machine setup URL response +// +// swagger:model v1GetMachineSetupURLResponse +type V1GetMachineSetupURLResponse struct { + + // /setup/machine URL carrying a user token that expires within minutes. + URL string `json:"url,omitempty"` +} + +// Validate validates this v1 get machine setup URL response +func (m *V1GetMachineSetupURLResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 get machine setup URL response based on context it is used +func (m *V1GetMachineSetupURLResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GetMachineSetupURLResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GetMachineSetupURLResponse) UnmarshalBinary(b []byte) error { + var res V1GetMachineSetupURLResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_google_cloud_direct_v1.go b/go/internal/lightningcloud/openapi/generated/models/v1_google_cloud_direct_v1.go index 0f0d83578..4273e7256 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_google_cloud_direct_v1.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_google_cloud_direct_v1.go @@ -87,6 +87,9 @@ type V1GoogleCloudDirectV1 struct { // Custom subnets specifications if needed Subnets []*V1SubnetSpec `json:"subnets"` + // If true, batch and regular provisioning get the same disk setup - needed to avoid impacting existing behavior and for smooth rollout + UniformDiskSetup bool `json:"uniformDiskSetup,omitempty"` + // VPC networks to use for the cluster Vpcs []*V1GCPDirectVPC `json:"vpcs"` } diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_host_health.go b/go/internal/lightningcloud/openapi/generated/models/v1_host_health.go index 79509a625..34768d572 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_host_health.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_host_health.go @@ -34,6 +34,18 @@ type V1HostHealth struct { // creates (GHES fatal PCIe panic or vfio-pci HDA hang on the previous boot). GpuCreateHostCrash *V1GPUCreateHostCrash `json:"gpuCreateHostCrash,omitempty"` + // ib guids + IbGuids []*V1HostIBGUIDRail `json:"ibGuids"` + + // ib pkeys + IbPkeys *V1HostIBPKeysHealth `json:"ibPkeys,omitempty"` + + // inband netplan + InbandNetplan *V1InbandNetplanHealth `json:"inbandNetplan,omitempty"` + + // litaccess ib pkeys + LitaccessIbPkeys *V1HostIBPKeysHealth `json:"litaccessIbPkeys,omitempty"` + // node fitness NodeFitness *V1NodeFitness `json:"nodeFitness,omitempty"` @@ -73,6 +85,22 @@ func (m *V1HostHealth) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateIbGuids(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIbPkeys(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInbandNetplan(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLitaccessIbPkeys(formats); err != nil { + res = append(res, err) + } + if err := m.validateNodeFitness(formats); err != nil { res = append(res, err) } @@ -175,6 +203,105 @@ func (m *V1HostHealth) validateGpuCreateHostCrash(formats strfmt.Registry) error return nil } +func (m *V1HostHealth) validateIbGuids(formats strfmt.Registry) error { + if swag.IsZero(m.IbGuids) { // not required + return nil + } + + for i := 0; i < len(m.IbGuids); i++ { + if swag.IsZero(m.IbGuids[i]) { // not required + continue + } + + if m.IbGuids[i] != nil { + if err := m.IbGuids[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("ibGuids" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("ibGuids" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1HostHealth) validateIbPkeys(formats strfmt.Registry) error { + if swag.IsZero(m.IbPkeys) { // not required + return nil + } + + if m.IbPkeys != nil { + if err := m.IbPkeys.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("ibPkeys") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("ibPkeys") + } + + return err + } + } + + return nil +} + +func (m *V1HostHealth) validateInbandNetplan(formats strfmt.Registry) error { + if swag.IsZero(m.InbandNetplan) { // not required + return nil + } + + if m.InbandNetplan != nil { + if err := m.InbandNetplan.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("inbandNetplan") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("inbandNetplan") + } + + return err + } + } + + return nil +} + +func (m *V1HostHealth) validateLitaccessIbPkeys(formats strfmt.Registry) error { + if swag.IsZero(m.LitaccessIbPkeys) { // not required + return nil + } + + if m.LitaccessIbPkeys != nil { + if err := m.LitaccessIbPkeys.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("litaccessIbPkeys") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("litaccessIbPkeys") + } + + return err + } + } + + return nil +} + func (m *V1HostHealth) validateNodeFitness(formats strfmt.Registry) error { if swag.IsZero(m.NodeFitness) { // not required return nil @@ -306,6 +433,22 @@ func (m *V1HostHealth) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := m.contextValidateIbGuids(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateIbPkeys(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateInbandNetplan(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLitaccessIbPkeys(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateNodeFitness(ctx, formats); err != nil { res = append(res, err) } @@ -411,6 +554,110 @@ func (m *V1HostHealth) contextValidateGpuCreateHostCrash(ctx context.Context, fo return nil } +func (m *V1HostHealth) contextValidateIbGuids(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.IbGuids); i++ { + + if m.IbGuids[i] != nil { + + if swag.IsZero(m.IbGuids[i]) { // not required + return nil + } + + if err := m.IbGuids[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("ibGuids" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("ibGuids" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1HostHealth) contextValidateIbPkeys(ctx context.Context, formats strfmt.Registry) error { + + if m.IbPkeys != nil { + + if swag.IsZero(m.IbPkeys) { // not required + return nil + } + + if err := m.IbPkeys.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("ibPkeys") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("ibPkeys") + } + + return err + } + } + + return nil +} + +func (m *V1HostHealth) contextValidateInbandNetplan(ctx context.Context, formats strfmt.Registry) error { + + if m.InbandNetplan != nil { + + if swag.IsZero(m.InbandNetplan) { // not required + return nil + } + + if err := m.InbandNetplan.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("inbandNetplan") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("inbandNetplan") + } + + return err + } + } + + return nil +} + +func (m *V1HostHealth) contextValidateLitaccessIbPkeys(ctx context.Context, formats strfmt.Registry) error { + + if m.LitaccessIbPkeys != nil { + + if swag.IsZero(m.LitaccessIbPkeys) { // not required + return nil + } + + if err := m.LitaccessIbPkeys.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("litaccessIbPkeys") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("litaccessIbPkeys") + } + + return err + } + } + + return nil +} + func (m *V1HostHealth) contextValidateNodeFitness(ctx context.Context, formats strfmt.Registry) error { if m.NodeFitness != nil { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_host_i_b_guid_rail.go b/go/internal/lightningcloud/openapi/generated/models/v1_host_i_b_guid_rail.go new file mode 100644 index 000000000..e129d2f56 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_host_i_b_guid_rail.go @@ -0,0 +1,57 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HostIBGUIDRail v1 host i b GUID rail +// +// swagger:model v1HostIBGUIDRail +type V1HostIBGUIDRail struct { + + // guid + GUID string `json:"guid,omitempty"` + + // host index + HostIndex int32 `json:"hostIndex,omitempty"` +} + +// Validate validates this v1 host i b GUID rail +func (m *V1HostIBGUIDRail) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 host i b GUID rail based on context it is used +func (m *V1HostIBGUIDRail) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1HostIBGUIDRail) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HostIBGUIDRail) UnmarshalBinary(b []byte) error { + var res V1HostIBGUIDRail + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_host_i_b_p_keys_health.go b/go/internal/lightningcloud/openapi/generated/models/v1_host_i_b_p_keys_health.go new file mode 100644 index 000000000..565bdcd35 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_host_i_b_p_keys_health.go @@ -0,0 +1,161 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1HostIBPKeysHealth v1 host i b p keys health +// +// swagger:model v1HostIBPKeysHealth +type V1HostIBPKeysHealth struct { + + // detail + Detail string `json:"detail,omitempty"` + + // observed at + // Format: date-time + ObservedAt strfmt.DateTime `json:"observedAt,omitempty"` + + // rails + Rails []*V1HostIBRailPKeys `json:"rails"` + + // collected, unavailable, error + State string `json:"state,omitempty"` +} + +// Validate validates this v1 host i b p keys health +func (m *V1HostIBPKeysHealth) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateObservedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HostIBPKeysHealth) validateObservedAt(formats strfmt.Registry) error { + if swag.IsZero(m.ObservedAt) { // not required + return nil + } + + if err := validate.FormatOf("observedAt", "body", "date-time", m.ObservedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1HostIBPKeysHealth) validateRails(formats strfmt.Registry) error { + if swag.IsZero(m.Rails) { // not required + return nil + } + + for i := 0; i < len(m.Rails); i++ { + if swag.IsZero(m.Rails[i]) { // not required + continue + } + + if m.Rails[i] != nil { + if err := m.Rails[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("rails" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("rails" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 host i b p keys health based on the context it is used +func (m *V1HostIBPKeysHealth) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HostIBPKeysHealth) contextValidateRails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Rails); i++ { + + if m.Rails[i] != nil { + + if swag.IsZero(m.Rails[i]) { // not required + return nil + } + + if err := m.Rails[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("rails" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("rails" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HostIBPKeysHealth) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HostIBPKeysHealth) UnmarshalBinary(b []byte) error { + var res V1HostIBPKeysHealth + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_host_i_b_rail_p_keys.go b/go/internal/lightningcloud/openapi/generated/models/v1_host_i_b_rail_p_keys.go new file mode 100644 index 000000000..7dac46288 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_host_i_b_rail_p_keys.go @@ -0,0 +1,66 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HostIBRailPKeys v1 host i b rail p keys +// +// swagger:model v1HostIBRailPKeys +type V1HostIBRailPKeys struct { + + // device + Device string `json:"device,omitempty"` + + // guid + GUID string `json:"guid,omitempty"` + + // host index + HostIndex int32 `json:"hostIndex,omitempty"` + + // pkeys + Pkeys []string `json:"pkeys"` + + // port + Port string `json:"port,omitempty"` +} + +// Validate validates this v1 host i b rail p keys +func (m *V1HostIBRailPKeys) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 host i b rail p keys based on context it is used +func (m *V1HostIBRailPKeys) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1HostIBRailPKeys) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HostIBRailPKeys) UnmarshalBinary(b []byte) error { + var res V1HostIBRailPKeys + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_inband_netplan_health.go b/go/internal/lightningcloud/openapi/generated/models/v1_inband_netplan_health.go new file mode 100644 index 000000000..6b9a1f83c --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_inband_netplan_health.go @@ -0,0 +1,63 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1InbandNetplanHealth v1 inband netplan health +// +// swagger:model v1InbandNetplanHealth +type V1InbandNetplanHealth struct { + + // detail + Detail string `json:"detail,omitempty"` + + // interface + Interface string `json:"interface,omitempty"` + + // ready, missing, invalid, inactive, error + State string `json:"state,omitempty"` + + // subnet + Subnet string `json:"subnet,omitempty"` +} + +// Validate validates this v1 inband netplan health +func (m *V1InbandNetplanHealth) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 inband netplan health based on context it is used +func (m *V1InbandNetplanHealth) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1InbandNetplanHealth) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InbandNetplanHealth) UnmarshalBinary(b []byte) error { + var res V1InbandNetplanHealth + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_list_cloud_space_apps_response.go b/go/internal/lightningcloud/openapi/generated/models/v1_list_cloud_space_apps_response.go deleted file mode 100644 index d7d98d0dc..000000000 --- a/go/internal/lightningcloud/openapi/generated/models/v1_list_cloud_space_apps_response.go +++ /dev/null @@ -1,134 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - stderrors "errors" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1ListCloudSpaceAppsResponse v1 list cloud space apps response -// -// swagger:model v1ListCloudSpaceAppsResponse -type V1ListCloudSpaceAppsResponse struct { - - // apps - Apps []*V1CloudSpaceApp `json:"apps"` -} - -// Validate validates this v1 list cloud space apps response -func (m *V1ListCloudSpaceAppsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApps(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1ListCloudSpaceAppsResponse) validateApps(formats strfmt.Registry) error { - if swag.IsZero(m.Apps) { // not required - return nil - } - - for i := 0; i < len(m.Apps); i++ { - if swag.IsZero(m.Apps[i]) { // not required - continue - } - - if m.Apps[i] != nil { - if err := m.Apps[i].Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("apps" + "." + strconv.Itoa(i)) - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("apps" + "." + strconv.Itoa(i)) - } - - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1 list cloud space apps response based on the context it is used -func (m *V1ListCloudSpaceAppsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApps(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1ListCloudSpaceAppsResponse) contextValidateApps(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Apps); i++ { - - if m.Apps[i] != nil { - - if swag.IsZero(m.Apps[i]) { // not required - return nil - } - - if err := m.Apps[i].ContextValidate(ctx, formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("apps" + "." + strconv.Itoa(i)) - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("apps" + "." + strconv.Itoa(i)) - } - - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1ListCloudSpaceAppsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1ListCloudSpaceAppsResponse) UnmarshalBinary(b []byte) error { - var res V1ListCloudSpaceAppsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_list_cluster_reservations_for_usage_response.go b/go/internal/lightningcloud/openapi/generated/models/v1_list_cluster_reservations_for_usage_response.go new file mode 100644 index 000000000..148e0436e --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_list_cluster_reservations_for_usage_response.go @@ -0,0 +1,213 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ListClusterReservationsForUsageResponse v1 list cluster reservations for usage response +// +// swagger:model v1ListClusterReservationsForUsageResponse +type V1ListClusterReservationsForUsageResponse struct { + + // current usage + CurrentUsage []*V1ClusterDetailsReservation `json:"currentUsage"` + + // org by project + OrgByProject map[string]string `json:"orgByProject,omitempty"` + + // org names + OrgNames map[string]string `json:"orgNames,omitempty"` + + // project names + ProjectNames map[string]string `json:"projectNames,omitempty"` + + // reservations + Reservations []*V1ClusterCapacityReservation `json:"reservations"` +} + +// Validate validates this v1 list cluster reservations for usage response +func (m *V1ListClusterReservationsForUsageResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCurrentUsage(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReservations(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ListClusterReservationsForUsageResponse) validateCurrentUsage(formats strfmt.Registry) error { + if swag.IsZero(m.CurrentUsage) { // not required + return nil + } + + for i := 0; i < len(m.CurrentUsage); i++ { + if swag.IsZero(m.CurrentUsage[i]) { // not required + continue + } + + if m.CurrentUsage[i] != nil { + if err := m.CurrentUsage[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("currentUsage" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("currentUsage" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1ListClusterReservationsForUsageResponse) validateReservations(formats strfmt.Registry) error { + if swag.IsZero(m.Reservations) { // not required + return nil + } + + for i := 0; i < len(m.Reservations); i++ { + if swag.IsZero(m.Reservations[i]) { // not required + continue + } + + if m.Reservations[i] != nil { + if err := m.Reservations[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("reservations" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("reservations" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 list cluster reservations for usage response based on the context it is used +func (m *V1ListClusterReservationsForUsageResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCurrentUsage(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateReservations(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ListClusterReservationsForUsageResponse) contextValidateCurrentUsage(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.CurrentUsage); i++ { + + if m.CurrentUsage[i] != nil { + + if swag.IsZero(m.CurrentUsage[i]) { // not required + return nil + } + + if err := m.CurrentUsage[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("currentUsage" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("currentUsage" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1ListClusterReservationsForUsageResponse) contextValidateReservations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Reservations); i++ { + + if m.Reservations[i] != nil { + + if swag.IsZero(m.Reservations[i]) { // not required + return nil + } + + if err := m.Reservations[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("reservations" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("reservations" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ListClusterReservationsForUsageResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ListClusterReservationsForUsageResponse) UnmarshalBinary(b []byte) error { + var res V1ListClusterReservationsForUsageResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_list_jobs_sort_by.go b/go/internal/lightningcloud/openapi/generated/models/v1_list_jobs_sort_by.go index 9b130f839..cb540a20a 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_list_jobs_sort_by.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_list_jobs_sort_by.go @@ -54,6 +54,12 @@ const ( // V1ListJobsSortByLISTJOBSSORTBYCLUSTERID captures enum value "LIST_JOBS_SORT_BY_CLUSTER_ID" V1ListJobsSortByLISTJOBSSORTBYCLUSTERID V1ListJobsSortBy = "LIST_JOBS_SORT_BY_CLUSTER_ID" + + // V1ListJobsSortByLISTJOBSSORTBYSTATE captures enum value "LIST_JOBS_SORT_BY_STATE" + V1ListJobsSortByLISTJOBSSORTBYSTATE V1ListJobsSortBy = "LIST_JOBS_SORT_BY_STATE" + + // V1ListJobsSortByLISTJOBSSORTBYDURATION captures enum value "LIST_JOBS_SORT_BY_DURATION" + V1ListJobsSortByLISTJOBSSORTBYDURATION V1ListJobsSortBy = "LIST_JOBS_SORT_BY_DURATION" ) // for schema @@ -61,7 +67,7 @@ var v1ListJobsSortByEnum []any func init() { var res []V1ListJobsSortBy - if err := json.Unmarshal([]byte(`["LIST_JOBS_SORT_BY_UNSPECIFIED","LIST_JOBS_SORT_BY_NAME","LIST_JOBS_SORT_BY_STARTED_AT","LIST_JOBS_SORT_BY_CREATED_AT","LIST_JOBS_SORT_BY_INSTANCE_TYPE","LIST_JOBS_SORT_BY_USER_ID","LIST_JOBS_SORT_BY_CLUSTER_ID"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["LIST_JOBS_SORT_BY_UNSPECIFIED","LIST_JOBS_SORT_BY_NAME","LIST_JOBS_SORT_BY_STARTED_AT","LIST_JOBS_SORT_BY_CREATED_AT","LIST_JOBS_SORT_BY_INSTANCE_TYPE","LIST_JOBS_SORT_BY_USER_ID","LIST_JOBS_SORT_BY_CLUSTER_ID","LIST_JOBS_SORT_BY_STATE","LIST_JOBS_SORT_BY_DURATION"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_list_provider_fleet_response.go b/go/internal/lightningcloud/openapi/generated/models/v1_list_provider_fleet_response.go new file mode 100644 index 000000000..c6f01ea3c --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_list_provider_fleet_response.go @@ -0,0 +1,246 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ListProviderFleetResponse v1 list provider fleet response +// +// swagger:model v1ListProviderFleetResponse +type V1ListProviderFleetResponse struct { + + // configured + Configured bool `json:"configured,omitempty"` + + // control plane environment + ControlPlaneEnvironment string `json:"controlPlaneEnvironment,omitempty"` + + // last observed at + // Format: date-time + LastObservedAt strfmt.DateTime `json:"lastObservedAt,omitempty"` + + // nodes + Nodes []*V1ProviderFleetNode `json:"nodes"` + + // provider + Provider string `json:"provider,omitempty"` + + // provider organization Id + ProviderOrganizationID string `json:"providerOrganizationId,omitempty"` + + // registered nodes outside fleet + RegisteredNodesOutsideFleet int32 `json:"registeredNodesOutsideFleet,omitempty"` + + // stale + Stale bool `json:"stale,omitempty"` + + // usage history + UsageHistory []*V1ProviderFleetUsagePoint `json:"usageHistory"` + + // usage interval seconds + UsageIntervalSeconds int32 `json:"usageIntervalSeconds,omitempty"` +} + +// Validate validates this v1 list provider fleet response +func (m *V1ListProviderFleetResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastObservedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNodes(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsageHistory(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ListProviderFleetResponse) validateLastObservedAt(formats strfmt.Registry) error { + if swag.IsZero(m.LastObservedAt) { // not required + return nil + } + + if err := validate.FormatOf("lastObservedAt", "body", "date-time", m.LastObservedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1ListProviderFleetResponse) validateNodes(formats strfmt.Registry) error { + if swag.IsZero(m.Nodes) { // not required + return nil + } + + for i := 0; i < len(m.Nodes); i++ { + if swag.IsZero(m.Nodes[i]) { // not required + continue + } + + if m.Nodes[i] != nil { + if err := m.Nodes[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1ListProviderFleetResponse) validateUsageHistory(formats strfmt.Registry) error { + if swag.IsZero(m.UsageHistory) { // not required + return nil + } + + for i := 0; i < len(m.UsageHistory); i++ { + if swag.IsZero(m.UsageHistory[i]) { // not required + continue + } + + if m.UsageHistory[i] != nil { + if err := m.UsageHistory[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("usageHistory" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("usageHistory" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 list provider fleet response based on the context it is used +func (m *V1ListProviderFleetResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateNodes(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateUsageHistory(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ListProviderFleetResponse) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Nodes); i++ { + + if m.Nodes[i] != nil { + + if swag.IsZero(m.Nodes[i]) { // not required + return nil + } + + if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *V1ListProviderFleetResponse) contextValidateUsageHistory(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.UsageHistory); i++ { + + if m.UsageHistory[i] != nil { + + if swag.IsZero(m.UsageHistory[i]) { // not required + return nil + } + + if err := m.UsageHistory[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("usageHistory" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("usageHistory" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ListProviderFleetResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ListProviderFleetResponse) UnmarshalBinary(b []byte) error { + var res V1ListProviderFleetResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_machine.go b/go/internal/lightningcloud/openapi/generated/models/v1_machine.go index 06470b60d..1a848831d 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_machine.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_machine.go @@ -44,6 +44,10 @@ type V1Machine struct { // Format: date-time CreatedAt strfmt.DateTime `json:"createdAt,omitempty"` + // The customer networks a vpn-gateway machine serves. Set only for Lightning + // staff, since it names other orgs' networks. + CustomerNetworks []*V1MachineCustomerNetwork `json:"customerNetworks"` + // If true, the machine will not be monitored by the monitor machines worker DisableMonitoring bool `json:"disableMonitoring,omitempty"` @@ -179,6 +183,10 @@ func (m *V1Machine) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCustomerNetworks(formats); err != nil { + res = append(res, err) + } + if err := m.validateEnv(formats); err != nil { res = append(res, err) } @@ -225,6 +233,36 @@ func (m *V1Machine) validateCreatedAt(formats strfmt.Registry) error { return nil } +func (m *V1Machine) validateCustomerNetworks(formats strfmt.Registry) error { + if swag.IsZero(m.CustomerNetworks) { // not required + return nil + } + + for i := 0; i < len(m.CustomerNetworks); i++ { + if swag.IsZero(m.CustomerNetworks[i]) { // not required + continue + } + + if m.CustomerNetworks[i] != nil { + if err := m.CustomerNetworks[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("customerNetworks" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("customerNetworks" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + func (m *V1Machine) validateEnv(formats strfmt.Registry) error { if swag.IsZero(m.Env) { // not required return nil @@ -364,6 +402,10 @@ func (m *V1Machine) validateUpdatedAt(formats strfmt.Registry) error { func (m *V1Machine) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCustomerNetworks(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateEnv(ctx, formats); err != nil { res = append(res, err) } @@ -386,6 +428,35 @@ func (m *V1Machine) ContextValidate(ctx context.Context, formats strfmt.Registry return nil } +func (m *V1Machine) contextValidateCustomerNetworks(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.CustomerNetworks); i++ { + + if m.CustomerNetworks[i] != nil { + + if swag.IsZero(m.CustomerNetworks[i]) { // not required + return nil + } + + if err := m.CustomerNetworks[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("customerNetworks" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("customerNetworks" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + func (m *V1Machine) contextValidateEnv(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Env); i++ { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_machine_customer_network.go b/go/internal/lightningcloud/openapi/generated/models/v1_machine_customer_network.go new file mode 100644 index 000000000..dfcea69b8 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_machine_customer_network.go @@ -0,0 +1,60 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachineCustomerNetwork v1 machine customer network +// +// swagger:model v1MachineCustomerNetwork +type V1MachineCustomerNetwork struct { + + // id + ID string `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // org Id + OrgID string `json:"orgId,omitempty"` +} + +// Validate validates this v1 machine customer network +func (m *V1MachineCustomerNetwork) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 machine customer network based on context it is used +func (m *V1MachineCustomerNetwork) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachineCustomerNetwork) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachineCustomerNetwork) UnmarshalBinary(b []byte) error { + var res V1MachineCustomerNetwork + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_machine_details.go b/go/internal/lightningcloud/openapi/generated/models/v1_machine_details.go index df98200d7..8ad2b4ae5 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_machine_details.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_machine_details.go @@ -74,6 +74,10 @@ type V1MachineDetails struct { // RAW VM instances info (hypervisor, internal baremetal-agent info, etc) VMInstances []*V1VMInstance `json:"vmInstances"` + + // Set only for a vpn-gateway machine. Its agent serves none of the instance + // or status fields above, so they stay empty. + VpnServices *V1MachineVPNServicesStatus `json:"vpnServices,omitempty"` } // Validate validates this v1 machine details @@ -96,6 +100,10 @@ func (m *V1MachineDetails) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVpnServices(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -215,6 +223,29 @@ func (m *V1MachineDetails) validateVMInstances(formats strfmt.Registry) error { return nil } +func (m *V1MachineDetails) validateVpnServices(formats strfmt.Registry) error { + if swag.IsZero(m.VpnServices) { // not required + return nil + } + + if m.VpnServices != nil { + if err := m.VpnServices.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpnServices") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpnServices") + } + + return err + } + } + + return nil +} + // ContextValidate validate this v1 machine details based on the context it is used func (m *V1MachineDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -235,6 +266,10 @@ func (m *V1MachineDetails) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := m.contextValidateVpnServices(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -353,6 +388,31 @@ func (m *V1MachineDetails) contextValidateVMInstances(ctx context.Context, forma return nil } +func (m *V1MachineDetails) contextValidateVpnServices(ctx context.Context, formats strfmt.Registry) error { + + if m.VpnServices != nil { + + if swag.IsZero(m.VpnServices) { // not required + return nil + } + + if err := m.VpnServices.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpnServices") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpnServices") + } + + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *V1MachineDetails) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_machine_exclusion.go b/go/internal/lightningcloud/openapi/generated/models/v1_machine_exclusion.go new file mode 100644 index 000000000..76b3f3d05 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_machine_exclusion.go @@ -0,0 +1,81 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MachineExclusion v1 machine exclusion +// +// swagger:model v1MachineExclusion +type V1MachineExclusion struct { + + // id + ID string `json:"id,omitempty"` + + // recorded at + // Format: date-time + RecordedAt strfmt.DateTime `json:"recordedAt,omitempty"` +} + +// Validate validates this v1 machine exclusion +func (m *V1MachineExclusion) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRecordedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MachineExclusion) validateRecordedAt(formats strfmt.Registry) error { + if swag.IsZero(m.RecordedAt) { // not required + return nil + } + + if err := validate.FormatOf("recordedAt", "body", "date-time", m.RecordedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v1 machine exclusion based on context it is used +func (m *V1MachineExclusion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachineExclusion) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachineExclusion) UnmarshalBinary(b []byte) error { + var res V1MachineExclusion + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_machine_v_p_n_service_unit.go b/go/internal/lightningcloud/openapi/generated/models/v1_machine_v_p_n_service_unit.go new file mode 100644 index 000000000..20ae26612 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_machine_v_p_n_service_unit.go @@ -0,0 +1,57 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachineVPNServiceUnit v1 machine v p n service unit +// +// swagger:model v1MachineVPNServiceUnit +type V1MachineVPNServiceUnit struct { + + // name + Name string `json:"name,omitempty"` + + // systemd's ActiveState, e.g. "active", "inactive", "failed". + State string `json:"state,omitempty"` +} + +// Validate validates this v1 machine v p n service unit +func (m *V1MachineVPNServiceUnit) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 machine v p n service unit based on context it is used +func (m *V1MachineVPNServiceUnit) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachineVPNServiceUnit) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachineVPNServiceUnit) UnmarshalBinary(b []byte) error { + var res V1MachineVPNServiceUnit + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_machine_v_p_n_services_status.go b/go/internal/lightningcloud/openapi/generated/models/v1_machine_v_p_n_services_status.go new file mode 100644 index 000000000..9e32f6b77 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_machine_v_p_n_services_status.go @@ -0,0 +1,137 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachineVPNServicesStatus v1 machine v p n services status +// +// swagger:model v1MachineVPNServicesStatus +type V1MachineVPNServicesStatus struct { + + // True only when every unit is active. + Running bool `json:"running,omitempty"` + + // units + Units []*V1MachineVPNServiceUnit `json:"units"` +} + +// Validate validates this v1 machine v p n services status +func (m *V1MachineVPNServicesStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUnits(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MachineVPNServicesStatus) validateUnits(formats strfmt.Registry) error { + if swag.IsZero(m.Units) { // not required + return nil + } + + for i := 0; i < len(m.Units); i++ { + if swag.IsZero(m.Units[i]) { // not required + continue + } + + if m.Units[i] != nil { + if err := m.Units[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("units" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("units" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 machine v p n services status based on the context it is used +func (m *V1MachineVPNServicesStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateUnits(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MachineVPNServicesStatus) contextValidateUnits(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Units); i++ { + + if m.Units[i] != nil { + + if swag.IsZero(m.Units[i]) { // not required + return nil + } + + if err := m.Units[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("units" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("units" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachineVPNServicesStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachineVPNServicesStatus) UnmarshalBinary(b []byte) error { + var res V1MachineVPNServicesStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_membership.go b/go/internal/lightningcloud/openapi/generated/models/v1_membership.go index ef3f7f670..618c03075 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_membership.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_membership.go @@ -57,7 +57,7 @@ type V1Membership struct { // free storage bytes FreeStorageBytes string `json:"freeStorageBytes,omitempty"` - // The creator is not allowed to leave or delete the project and can only be removed by leaving / being removed from the organization/ being removed from the organization + // The creator can leave, and an authorized caller can delete the teamspace. IsDefault bool `json:"isDefault,omitempty"` // job count diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_node_fitness.go b/go/internal/lightningcloud/openapi/generated/models/v1_node_fitness.go index 73bc33b74..32da097ee 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_node_fitness.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_node_fitness.go @@ -60,6 +60,9 @@ type V1NodeFitness struct { // dmi Dmi *V1DMIInfo `json:"dmi,omitempty"` + // firmware inventory + FirmwareInventory *V1FirmwareInventory `json:"firmwareInventory,omitempty"` + // gpu isolation GpuIsolation []*V1DeviceIsolationFitness `json:"gpuIsolation"` @@ -111,6 +114,10 @@ func (m *V1NodeFitness) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateFirmwareInventory(formats); err != nil { + res = append(res, err) + } + if err := m.validateGpuIsolation(formats); err != nil { res = append(res, err) } @@ -195,6 +202,29 @@ func (m *V1NodeFitness) validateDmi(formats strfmt.Registry) error { return nil } +func (m *V1NodeFitness) validateFirmwareInventory(formats strfmt.Registry) error { + if swag.IsZero(m.FirmwareInventory) { // not required + return nil + } + + if m.FirmwareInventory != nil { + if err := m.FirmwareInventory.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("firmwareInventory") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("firmwareInventory") + } + + return err + } + } + + return nil +} + func (m *V1NodeFitness) validateGpuIsolation(formats strfmt.Registry) error { if swag.IsZero(m.GpuIsolation) { // not required return nil @@ -433,6 +463,10 @@ func (m *V1NodeFitness) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } + if err := m.contextValidateFirmwareInventory(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateGpuIsolation(ctx, formats); err != nil { res = append(res, err) } @@ -521,6 +555,31 @@ func (m *V1NodeFitness) contextValidateDmi(ctx context.Context, formats strfmt.R return nil } +func (m *V1NodeFitness) contextValidateFirmwareInventory(ctx context.Context, formats strfmt.Registry) error { + + if m.FirmwareInventory != nil { + + if swag.IsZero(m.FirmwareInventory) { // not required + return nil + } + + if err := m.FirmwareInventory.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("firmwareInventory") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("firmwareInventory") + } + + return err + } + } + + return nil +} + func (m *V1NodeFitness) contextValidateGpuIsolation(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.GpuIsolation); i++ { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_organization.go b/go/internal/lightningcloud/openapi/generated/models/v1_organization.go index a3c91796d..1fb11a080 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_organization.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_organization.go @@ -92,6 +92,10 @@ type V1Organization struct { // A project to associate org-wide things with it, e.g. to charge for org-wide things DefaultProjectID string `json:"defaultProjectId,omitempty"` + // Teamspaces a new member joins, in list order. Empty means the member joins none. + // An unset column is also empty here. + DefaultTeamspaceIds []string `json:"defaultTeamspaceIds"` + // description Description string `json:"description,omitempty"` @@ -119,12 +123,6 @@ type V1Organization struct { // disallow nebius saas DisallowNebiusSaas bool `json:"disallowNebiusSaas,omitempty"` - // disallow voltage park saas - DisallowVoltageParkSaas bool `json:"disallowVoltageParkSaas,omitempty"` - - // disallow vultr saas - DisallowVultrSaas bool `json:"disallowVultrSaas,omitempty"` - // display name DisplayName string `json:"displayName,omitempty"` @@ -161,6 +159,9 @@ type V1Organization struct { // location Location string `json:"location,omitempty"` + // Operator-managed NAIRR grant recipient; read-only in the customer API. + Nairr bool `json:"nairr,omitempty"` + // Org name Name string `json:"name,omitempty"` diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_pex_switch_f_w_fitness.go b/go/internal/lightningcloud/openapi/generated/models/v1_pex_switch_f_w_fitness.go index 4016f2d8f..5158e017c 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_pex_switch_f_w_fitness.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_pex_switch_f_w_fitness.go @@ -17,7 +17,7 @@ import ( ) // V1PexSwitchFWFitness PexSwitchFWFitness is the Dell PEX890xx PCIe-switch firmware compliance for -// MMT, from a boot-time marker (the live version is not readable in-agent). It is +// MMT, from a boot-time marker. The live version is in firmware_inventory. It is // the one fail-open MMT prerequisite: a switch behind target only degrades GDR // bandwidth, not brick-class, so only a confirmed behind (state == "collected" // AND compliant == false) is a hard readiness fault; any other state is unverified. diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_project.go b/go/internal/lightningcloud/openapi/generated/models/v1_project.go index bb98badda..c9a1c2725 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_project.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_project.go @@ -50,7 +50,7 @@ type V1Project struct { // id ID string `json:"id,omitempty"` - // The creator is not allowed to leave or delete the project and can only be removed by leaving / being removed from the organization + // The creator can leave, and an authorized caller can delete the teamspace. IsDefault bool `json:"isDefault,omitempty"` // layout config diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_project_membership.go b/go/internal/lightningcloud/openapi/generated/models/v1_project_membership.go index 13619eae9..8aae0dd3f 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_project_membership.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_project_membership.go @@ -68,7 +68,7 @@ type V1ProjectMembership struct { // inactive Inactive bool `json:"inactive,omitempty"` - // The creator is not allowed to leave or delete the project and can only be removed by leaving / being removed from the organization + // The creator can leave, and an authorized caller can delete the teamspace. IsDefault bool `json:"isDefault,omitempty"` // job count diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_project_settings.go b/go/internal/lightningcloud/openapi/generated/models/v1_project_settings.go index ebde36ba5..16f1b5eb5 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_project_settings.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_project_settings.go @@ -49,12 +49,6 @@ type V1ProjectSettings struct { // allow nebius saas AllowNebiusSaas bool `json:"allowNebiusSaas,omitempty"` - // allow voltage park saas - AllowVoltageParkSaas bool `json:"allowVoltageParkSaas,omitempty"` - - // allow vultr saas - AllowVultrSaas bool `json:"allowVultrSaas,omitempty"` - // auto replenish amount AutoReplenishAmount float32 `json:"autoReplenishAmount,omitempty"` diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_provider_fleet_node.go b/go/internal/lightningcloud/openapi/generated/models/v1_provider_fleet_node.go new file mode 100644 index 000000000..2950626bd --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_provider_fleet_node.go @@ -0,0 +1,196 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ProviderFleetNode v1 provider fleet node +// +// swagger:model v1ProviderFleetNode +type V1ProviderFleetNode struct { + + // first seen at + // Format: date-time + FirstSeenAt strfmt.DateTime `json:"firstSeenAt,omitempty"` + + // gpu count + GpuCount int32 `json:"gpuCount,omitempty"` + + // gpu type + GpuType string `json:"gpuType,omitempty"` + + // hostname + Hostname string `json:"hostname,omitempty"` + + // last seen at + // Format: date-time + LastSeenAt strfmt.DateTime `json:"lastSeenAt,omitempty"` + + // Empty means no unique provider-ID match in this control plane. + MachineID string `json:"machineId,omitempty"` + + // machine status + MachineStatus string `json:"machineStatus,omitempty"` + + // node Id + NodeID string `json:"nodeId,omitempty"` + + // owner + Owner *V1ProviderFleetOwner `json:"owner,omitempty"` + + // private Ip + PrivateIP string `json:"privateIp,omitempty"` + + // public Ip + PublicIP string `json:"publicIp,omitempty"` + + // registration matches + RegistrationMatches int32 `json:"registrationMatches,omitempty"` + + // rental Id + RentalID string `json:"rentalId,omitempty"` + + // rental status + RentalStatus string `json:"rentalStatus,omitempty"` +} + +// Validate validates this v1 provider fleet node +func (m *V1ProviderFleetNode) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFirstSeenAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastSeenAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOwner(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProviderFleetNode) validateFirstSeenAt(formats strfmt.Registry) error { + if swag.IsZero(m.FirstSeenAt) { // not required + return nil + } + + if err := validate.FormatOf("firstSeenAt", "body", "date-time", m.FirstSeenAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1ProviderFleetNode) validateLastSeenAt(formats strfmt.Registry) error { + if swag.IsZero(m.LastSeenAt) { // not required + return nil + } + + if err := validate.FormatOf("lastSeenAt", "body", "date-time", m.LastSeenAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1ProviderFleetNode) validateOwner(formats strfmt.Registry) error { + if swag.IsZero(m.Owner) { // not required + return nil + } + + if m.Owner != nil { + if err := m.Owner.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("owner") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("owner") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this v1 provider fleet node based on the context it is used +func (m *V1ProviderFleetNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOwner(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProviderFleetNode) contextValidateOwner(ctx context.Context, formats strfmt.Registry) error { + + if m.Owner != nil { + + if swag.IsZero(m.Owner) { // not required + return nil + } + + if err := m.Owner.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("owner") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("owner") + } + + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProviderFleetNode) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProviderFleetNode) UnmarshalBinary(b []byte) error { + var res V1ProviderFleetNode + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_provider_fleet_owner.go b/go/internal/lightningcloud/openapi/generated/models/v1_provider_fleet_owner.go new file mode 100644 index 000000000..600e459c9 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_provider_fleet_owner.go @@ -0,0 +1,93 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ProviderFleetOwner v1 provider fleet owner +// +// swagger:model v1ProviderFleetOwner +type V1ProviderFleetOwner struct { + + // actor Id + ActorID string `json:"actorId,omitempty"` + + // environment + Environment string `json:"environment,omitempty"` + + // label + Label string `json:"label,omitempty"` + + // revision + Revision string `json:"revision,omitempty"` + + // updated at + // Format: date-time + UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"` + + // username + Username string `json:"username,omitempty"` +} + +// Validate validates this v1 provider fleet owner +func (m *V1ProviderFleetOwner) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUpdatedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProviderFleetOwner) validateUpdatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.UpdatedAt) { // not required + return nil + } + + if err := validate.FormatOf("updatedAt", "body", "date-time", m.UpdatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v1 provider fleet owner based on context it is used +func (m *V1ProviderFleetOwner) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProviderFleetOwner) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProviderFleetOwner) UnmarshalBinary(b []byte) error { + var res V1ProviderFleetOwner + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_provider_fleet_usage_point.go b/go/internal/lightningcloud/openapi/generated/models/v1_provider_fleet_usage_point.go new file mode 100644 index 000000000..cb49dc076 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_provider_fleet_usage_point.go @@ -0,0 +1,108 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ProviderFleetUsagePoint v1 provider fleet usage point +// +// swagger:model v1ProviderFleetUsagePoint +type V1ProviderFleetUsagePoint struct { + + // available external gpus + AvailableExternalGpus int32 `json:"availableExternalGpus,omitempty"` + + // available gpus + AvailableGpus int32 `json:"availableGpus,omitempty"` + + // available internal gpus + AvailableInternalGpus int32 `json:"availableInternalGpus,omitempty"` + + // categories + Categories map[string]int32 `json:"categories,omitempty"` + + // external gpus + ExternalGpus int32 `json:"externalGpus,omitempty"` + + // fleet nodes + FleetNodes int32 `json:"fleetNodes,omitempty"` + + // internal gpus + InternalGpus int32 `json:"internalGpus,omitempty"` + + // observed at + // Format: date-time + ObservedAt strfmt.DateTime `json:"observedAt,omitempty"` + + // registered nodes + RegisteredNodes int32 `json:"registeredNodes,omitempty"` + + // total gpus + TotalGpus int32 `json:"totalGpus,omitempty"` + + // unknown nodes + UnknownNodes int32 `json:"unknownNodes,omitempty"` +} + +// Validate validates this v1 provider fleet usage point +func (m *V1ProviderFleetUsagePoint) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateObservedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProviderFleetUsagePoint) validateObservedAt(formats strfmt.Registry) error { + if swag.IsZero(m.ObservedAt) { // not required + return nil + } + + if err := validate.FormatOf("observedAt", "body", "date-time", m.ObservedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v1 provider fleet usage point based on context it is used +func (m *V1ProviderFleetUsagePoint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProviderFleetUsagePoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProviderFleetUsagePoint) UnmarshalBinary(b []byte) error { + var res V1ProviderFleetUsagePoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_rule_resource.go b/go/internal/lightningcloud/openapi/generated/models/v1_rule_resource.go index 131061441..a89b959a6 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_rule_resource.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_rule_resource.go @@ -177,6 +177,9 @@ const ( // V1RuleResourceSandbox captures enum value "sandbox" V1RuleResourceSandbox V1RuleResource = "sandbox" + + // V1RuleResourceWorkloadTag captures enum value "workloadTag" + V1RuleResourceWorkloadTag V1RuleResource = "workloadTag" ) // for schema @@ -184,7 +187,7 @@ var v1RuleResourceEnum []any func init() { var res []V1RuleResource - if err := json.Unmarshal([]byte(`["unspecifiedResource","project","projectBilling","projectRole","projectMembership","projectMembershipRoleBinding","projectClusterBinding","session","experiment","run","datastore","cluster","lightningApp","any","sshKey","secret","org","orgRole","orgMembership","orgMembershipRoleBinding","orgBilling","orgBillingTopUp","dataConnection","cloudSpacePublication","assistant","endpoint","orgClusterBinding","orgClusterEncryptionKeys","cloudSpace","featuredOrgStudioGallery","managedEndpoint","job","deployment","model","slurmJob","multiMachineJob","litLogger","pipeline","cloudSpaceEnvironmentTemplate","orgStorage","kubernetesCluster","storageTransfer","litDataset","upload","machine","kubernetesTemplate","k8s_job","sandbox"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["unspecifiedResource","project","projectBilling","projectRole","projectMembership","projectMembershipRoleBinding","projectClusterBinding","session","experiment","run","datastore","cluster","lightningApp","any","sshKey","secret","org","orgRole","orgMembership","orgMembershipRoleBinding","orgBilling","orgBillingTopUp","dataConnection","cloudSpacePublication","assistant","endpoint","orgClusterBinding","orgClusterEncryptionKeys","cloudSpace","featuredOrgStudioGallery","managedEndpoint","job","deployment","model","slurmJob","multiMachineJob","litLogger","pipeline","cloudSpaceEnvironmentTemplate","orgStorage","kubernetesCluster","storageTransfer","litDataset","upload","machine","kubernetesTemplate","k8s_job","sandbox","workloadTag"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_sentinel_one_health.go b/go/internal/lightningcloud/openapi/generated/models/v1_sentinel_one_health.go new file mode 100644 index 000000000..30b61779a --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_sentinel_one_health.go @@ -0,0 +1,63 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SentinelOneHealth v1 sentinel one health +// +// swagger:model v1SentinelOneHealth +type V1SentinelOneHealth struct { + + // anti tamper + AntiTamper string `json:"antiTamper,omitempty"` + + // Observed guest status: On, Off, or unknown. These are not admission gates. + Connectivity string `json:"connectivity,omitempty"` + + // error + Error string `json:"error,omitempty"` + + // uuid + UUID string `json:"uuid,omitempty"` +} + +// Validate validates this v1 sentinel one health +func (m *V1SentinelOneHealth) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 sentinel one health based on context it is used +func (m *V1SentinelOneHealth) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SentinelOneHealth) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SentinelOneHealth) UnmarshalBinary(b []byte) error { + var res V1SentinelOneHealth + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_sentinel_one_mitigation.go b/go/internal/lightningcloud/openapi/generated/models/v1_sentinel_one_mitigation.go new file mode 100644 index 000000000..d74bf53fa --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_sentinel_one_mitigation.go @@ -0,0 +1,133 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SentinelOneMitigation v1 sentinel one mitigation +// +// swagger:model v1SentinelOneMitigation +type V1SentinelOneMitigation struct { + + // classification + Classification string `json:"classification,omitempty"` + + // kill completed at + // Format: date-time + KillCompletedAt strfmt.DateTime `json:"killCompletedAt,omitempty"` + + // mitigated at + // Format: date-time + MitigatedAt strfmt.DateTime `json:"mitigatedAt,omitempty"` + + // process killed + ProcessKilled bool `json:"processKilled,omitempty"` + + // reason + Reason string `json:"reason,omitempty"` + + // threat Id + ThreatID string `json:"threatId,omitempty"` + + // threat name + ThreatName string `json:"threatName,omitempty"` + + // threat updated at + // Format: date-time + ThreatUpdatedAt strfmt.DateTime `json:"threatUpdatedAt,omitempty"` +} + +// Validate validates this v1 sentinel one mitigation +func (m *V1SentinelOneMitigation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKillCompletedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMitigatedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateThreatUpdatedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SentinelOneMitigation) validateKillCompletedAt(formats strfmt.Registry) error { + if swag.IsZero(m.KillCompletedAt) { // not required + return nil + } + + if err := validate.FormatOf("killCompletedAt", "body", "date-time", m.KillCompletedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1SentinelOneMitigation) validateMitigatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.MitigatedAt) { // not required + return nil + } + + if err := validate.FormatOf("mitigatedAt", "body", "date-time", m.MitigatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1SentinelOneMitigation) validateThreatUpdatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.ThreatUpdatedAt) { // not required + return nil + } + + if err := validate.FormatOf("threatUpdatedAt", "body", "date-time", m.ThreatUpdatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v1 sentinel one mitigation based on context it is used +func (m *V1SentinelOneMitigation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SentinelOneMitigation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SentinelOneMitigation) UnmarshalBinary(b []byte) error { + var res V1SentinelOneMitigation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_sentinel_one_state.go b/go/internal/lightningcloud/openapi/generated/models/v1_sentinel_one_state.go new file mode 100644 index 000000000..5fcb6ab97 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_sentinel_one_state.go @@ -0,0 +1,140 @@ +// This file is vendored. +// Do not edit it directly; changes will be overwritten. +// Make changes in the internal upstream repository instead. + +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SentinelOneState v1 sentinel one state +// +// swagger:model v1SentinelOneState +type V1SentinelOneState struct { + + // anti tamper + AntiTamper bool `json:"antiTamper,omitempty"` + + // connectivity + Connectivity bool `json:"connectivity,omitempty"` + + // VM uptime in seconds when Connectivity=On was first observed. + ConnectivityReachedAt float64 `json:"connectivityReachedAt,omitempty"` + + // Latest threat summary; per-threat history is retained separately. + LastMitigation *V1SentinelOneMitigation `json:"lastMitigation,omitempty"` + + // mitigated + Mitigated bool `json:"mitigated,omitempty"` + + // tagged + Tagged bool `json:"tagged,omitempty"` + + // uuid + UUID string `json:"uuid,omitempty"` +} + +// Validate validates this v1 sentinel one state +func (m *V1SentinelOneState) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastMitigation(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SentinelOneState) validateLastMitigation(formats strfmt.Registry) error { + if swag.IsZero(m.LastMitigation) { // not required + return nil + } + + if m.LastMitigation != nil { + if err := m.LastMitigation.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("lastMitigation") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("lastMitigation") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this v1 sentinel one state based on the context it is used +func (m *V1SentinelOneState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLastMitigation(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SentinelOneState) contextValidateLastMitigation(ctx context.Context, formats strfmt.Registry) error { + + if m.LastMitigation != nil { + + if swag.IsZero(m.LastMitigation) { // not required + return nil + } + + if err := m.LastMitigation.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("lastMitigation") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("lastMitigation") + } + + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SentinelOneState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SentinelOneState) UnmarshalBinary(b []byte) error { + var res V1SentinelOneState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_server_spec.go b/go/internal/lightningcloud/openapi/generated/models/v1_server_spec.go index 9926bb9c1..e3980e7a6 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_server_spec.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_server_spec.go @@ -82,6 +82,9 @@ type V1ServerSpec struct { // dws Dws bool `json:"dws,omitempty"` + // Admission rejections apply only to this server and expire after the configured debounce period. + ExcludeMachineIds []*V1MachineExclusion `json:"excludeMachineIds"` + // User requested ports for the server (sandbox, plain VM cloud instance) ForwardPorts []int64 `json:"forwardPorts"` @@ -147,6 +150,9 @@ type V1ServerSpec struct { // Set if it's part of a multi machine job MultiMachineJobID string `json:"multiMachineJobId,omitempty"` + // Allocation-time rate retained for billing after placement-group peers are deleted. + MultiNodeIbCostPerHour float64 `json:"multiNodeIbCostPerHour,omitempty"` + // Network interfaces of the server NetworkInterfaces []*V1NetworkInterface `json:"networkInterfaces"` @@ -215,6 +221,9 @@ type V1ServerSpec struct { // resource type ResourceType string `json:"resourceType,omitempty"` + // sentinelone + Sentinelone *V1SentinelOneState `json:"sentinelone,omitempty"` + // server type ServerType *V1ServerType `json:"serverType,omitempty"` @@ -274,6 +283,10 @@ func (m *V1ServerSpec) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateExcludeMachineIds(formats); err != nil { + res = append(res, err) + } + if err := m.validateGuestAccelerators(formats); err != nil { res = append(res, err) } @@ -302,6 +315,10 @@ func (m *V1ServerSpec) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSentinelone(formats); err != nil { + res = append(res, err) + } + if err := m.validateServerType(formats); err != nil { res = append(res, err) } @@ -347,6 +364,36 @@ func (m *V1ServerSpec) validateAcceleratorType(formats strfmt.Registry) error { return nil } +func (m *V1ServerSpec) validateExcludeMachineIds(formats strfmt.Registry) error { + if swag.IsZero(m.ExcludeMachineIds) { // not required + return nil + } + + for i := 0; i < len(m.ExcludeMachineIds); i++ { + if swag.IsZero(m.ExcludeMachineIds[i]) { // not required + continue + } + + if m.ExcludeMachineIds[i] != nil { + if err := m.ExcludeMachineIds[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("excludeMachineIds" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("excludeMachineIds" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + func (m *V1ServerSpec) validateGuestAccelerators(formats strfmt.Registry) error { if swag.IsZero(m.GuestAccelerators) { // not required return nil @@ -543,6 +590,29 @@ func (m *V1ServerSpec) validatePortOverrides(formats strfmt.Registry) error { return nil } +func (m *V1ServerSpec) validateSentinelone(formats strfmt.Registry) error { + if swag.IsZero(m.Sentinelone) { // not required + return nil + } + + if m.Sentinelone != nil { + if err := m.Sentinelone.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("sentinelone") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("sentinelone") + } + + return err + } + } + + return nil +} + func (m *V1ServerSpec) validateServerType(formats strfmt.Registry) error { if swag.IsZero(m.ServerType) { // not required return nil @@ -639,6 +709,10 @@ func (m *V1ServerSpec) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := m.contextValidateExcludeMachineIds(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateGuestAccelerators(ctx, formats); err != nil { res = append(res, err) } @@ -667,6 +741,10 @@ func (m *V1ServerSpec) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := m.contextValidateSentinelone(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateServerType(ctx, formats); err != nil { res = append(res, err) } @@ -710,6 +788,35 @@ func (m *V1ServerSpec) contextValidateAcceleratorType(ctx context.Context, forma return nil } +func (m *V1ServerSpec) contextValidateExcludeMachineIds(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ExcludeMachineIds); i++ { + + if m.ExcludeMachineIds[i] != nil { + + if swag.IsZero(m.ExcludeMachineIds[i]) { // not required + return nil + } + + if err := m.ExcludeMachineIds[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("excludeMachineIds" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("excludeMachineIds" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + func (m *V1ServerSpec) contextValidateGuestAccelerators(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.GuestAccelerators); i++ { @@ -905,6 +1012,31 @@ func (m *V1ServerSpec) contextValidatePortOverrides(ctx context.Context, formats return nil } +func (m *V1ServerSpec) contextValidateSentinelone(ctx context.Context, formats strfmt.Registry) error { + + if m.Sentinelone != nil { + + if swag.IsZero(m.Sentinelone) { // not required + return nil + } + + if err := m.Sentinelone.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("sentinelone") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("sentinelone") + } + + return err + } + } + + return nil +} + func (m *V1ServerSpec) contextValidateServerType(ctx context.Context, formats strfmt.Registry) error { if m.ServerType != nil { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_server_status.go b/go/internal/lightningcloud/openapi/generated/models/v1_server_status.go index 1cf35be48..11741aa34 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_server_status.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_server_status.go @@ -68,6 +68,10 @@ type V1ServerStatus struct { // How many retries to create the server Retries string `json:"retries,omitempty"` + // True once the machine-cluster scheduler has run at least once for this + // server. Sticky; placement is recorded separately (machine_id / provider). + SchedulerAttempted bool `json:"schedulerAttempted,omitempty"` + // started at // Format: date-time StartedAt strfmt.DateTime `json:"startedAt,omitempty"` diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_delete_cloud_space_app_response.go b/go/internal/lightningcloud/openapi/generated/models/v1_set_machine_v_p_n_services_response.go similarity index 69% rename from go/internal/lightningcloud/openapi/generated/models/v1_delete_cloud_space_app_response.go rename to go/internal/lightningcloud/openapi/generated/models/v1_set_machine_v_p_n_services_response.go index 34bd72746..24dafbf1d 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_delete_cloud_space_app_response.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_set_machine_v_p_n_services_response.go @@ -9,7 +9,7 @@ package models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command -// V1DeleteCloudSpaceAppResponse v1 delete cloud space app response +// V1SetMachineVPNServicesResponse Empty response // -// swagger:model v1DeleteCloudSpaceAppResponse -type V1DeleteCloudSpaceAppResponse any +// swagger:model v1SetMachineVPNServicesResponse +type V1SetMachineVPNServicesResponse any diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_vm_health.go b/go/internal/lightningcloud/openapi/generated/models/v1_vm_health.go index 3f0b1536c..94b1c0af1 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_vm_health.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_vm_health.go @@ -89,6 +89,9 @@ type V1VMHealth struct { // fabric manager restarts during active NCCL/CUDA jobs. RunningCompute []*V1ComputeApp `json:"runningCompute"` + // sentinelone + Sentinelone *V1SentinelOneHealth `json:"sentinelone,omitempty"` + // ssh error SSHError string `json:"sshError,omitempty"` @@ -145,6 +148,10 @@ func (m *V1VMHealth) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSentinelone(formats); err != nil { + res = append(res, err) + } + if err := m.validateXids(formats); err != nil { res = append(res, err) } @@ -340,6 +347,29 @@ func (m *V1VMHealth) validateRunningCompute(formats strfmt.Registry) error { return nil } +func (m *V1VMHealth) validateSentinelone(formats strfmt.Registry) error { + if swag.IsZero(m.Sentinelone) { // not required + return nil + } + + if m.Sentinelone != nil { + if err := m.Sentinelone.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("sentinelone") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("sentinelone") + } + + return err + } + } + + return nil +} + func (m *V1VMHealth) validateXids(formats strfmt.Registry) error { if swag.IsZero(m.Xids) { // not required return nil @@ -398,6 +428,10 @@ func (m *V1VMHealth) ContextValidate(ctx context.Context, formats strfmt.Registr res = append(res, err) } + if err := m.contextValidateSentinelone(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateXids(ctx, formats); err != nil { res = append(res, err) } @@ -578,6 +612,31 @@ func (m *V1VMHealth) contextValidateRunningCompute(ctx context.Context, formats return nil } +func (m *V1VMHealth) contextValidateSentinelone(ctx context.Context, formats strfmt.Registry) error { + + if m.Sentinelone != nil { + + if swag.IsZero(m.Sentinelone) { // not required + return nil + } + + if err := m.Sentinelone.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("sentinelone") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("sentinelone") + } + + return err + } + } + + return nil +} + func (m *V1VMHealth) contextValidateXids(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Xids); i++ { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_vm_i_b_p_key_info.go b/go/internal/lightningcloud/openapi/generated/models/v1_vm_i_b_p_key_info.go index 7bbcdff01..d04942212 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_vm_i_b_p_key_info.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_vm_i_b_p_key_info.go @@ -54,7 +54,8 @@ type V1VMIBPKeyInfo struct { // physical state PhysicalState string `json:"physicalState,omitempty"` - // Expected single non-default pool P_Key, e.g. 0x881a. + // Canonical low-15-bit identity of the expected single non-default pool + // P_Key (membership bit removed), e.g. 0x081a. Pkey string `json:"pkey,omitempty"` // Encoding contract for all_pkeys. Currently empty (legacy set) or indexed-v1. diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_voltage_park_direct_v1.go b/go/internal/lightningcloud/openapi/generated/models/v1_voltage_park_direct_v1.go deleted file mode 100644 index 52b5cc4ff..000000000 --- a/go/internal/lightningcloud/openapi/generated/models/v1_voltage_park_direct_v1.go +++ /dev/null @@ -1,66 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1VoltageParkDirectV1 v1 voltage park direct v1 -// -// swagger:model v1VoltageParkDirectV1 -type V1VoltageParkDirectV1 struct { - - // ID of the secret that contains the Vultr API key. - CredentialsSecretID string `json:"credentialsSecretId,omitempty"` - - // Primary region stores user's code and data - PrimaryRegion string `json:"primaryRegion,omitempty"` - - // We deploy the bare bones infrastructure into every region - Regions []string `json:"regions"` - - // List of reserved instance IDs assigned to this cluster - ReservedInstanceIds []string `json:"reservedInstanceIds"` - - // Subnets CIDR ranges to allow inter-node communication in network security rules (done via iptables, until we have provider-side network security setup) - SubnetCidrRanges []string `json:"subnetCidrRanges"` -} - -// Validate validates this v1 voltage park direct v1 -func (m *V1VoltageParkDirectV1) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 voltage park direct v1 based on context it is used -func (m *V1VoltageParkDirectV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1VoltageParkDirectV1) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1VoltageParkDirectV1) UnmarshalBinary(b []byte) error { - var res V1VoltageParkDirectV1 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_vultr_direct_v1.go b/go/internal/lightningcloud/openapi/generated/models/v1_vultr_direct_v1.go deleted file mode 100644 index 3feaa9cff..000000000 --- a/go/internal/lightningcloud/openapi/generated/models/v1_vultr_direct_v1.go +++ /dev/null @@ -1,60 +0,0 @@ -// This file is vendored. -// Do not edit it directly; changes will be overwritten. -// Make changes in the internal upstream repository instead. - -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1VultrDirectV1 v1 vultr direct v1 -// -// swagger:model v1VultrDirectV1 -type V1VultrDirectV1 struct { - - // ID of the secret that contains the Vultr API key. - CredentialsSecretID string `json:"credentialsSecretId,omitempty"` - - // Primary region stores user's code and data - PrimaryRegion string `json:"primaryRegion,omitempty"` - - // We deploy the bare bones infrastructure into every region - Regions []string `json:"regions"` -} - -// Validate validates this v1 vultr direct v1 -func (m *V1VultrDirectV1) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 vultr direct v1 based on context it is used -func (m *V1VultrDirectV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1VultrDirectV1) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1VultrDirectV1) UnmarshalBinary(b []byte) error { - var res V1VultrDirectV1 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/js/src/lightning_cloud/openapi/SandboxesService.ts b/js/src/lightning_cloud/openapi/SandboxesService.ts index 200bfdef4..8b9b0927b 100644 --- a/js/src/lightning_cloud/openapi/SandboxesService.ts +++ b/js/src/lightning_cloud/openapi/SandboxesService.ts @@ -18,6 +18,7 @@ import { RpcStatus, SandboxesServiceCreateSandboxDirectoryBody, SandboxesServiceCreateSandboxSnapshotBody, + SandboxesServiceExposeSandboxPortsBody, SandboxesServiceExtendSandboxTimeoutBody, SandboxesServiceFinalizeSandboxSnapshotBody, SandboxesServiceGetSandboxSnapshotBlobDownloadUrlsBody, @@ -565,6 +566,54 @@ applied; retry on the next activity report. * No description * * @tags SandboxesService + * @name SandboxesServiceExposeSandboxPorts + * @summary ExposeSandboxPorts makes HTTP servers inside a running or paused sandbox +reachable at their `port_urls`. Ports that are already exposed are left +as they are. A paused sandbox gets the ports when it resumes. + * @request POST:/v1/core/sandboxes/{id}/ports + */ + sandboxesServiceExposeSandboxPorts = ( + id: string, + body: SandboxesServiceExposeSandboxPortsBody, + params: RequestParams = {}, + ) => + this.request({ + path: `/v1/core/sandboxes/${id}/ports`, + method: "POST", + body: body, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags SandboxesService + * @name SandboxesServiceUnexposeSandboxPort + * @summary UnexposeSandboxPort stops routing new requests to a port. Connections +already open, such as WebSockets, stay up until they close. Unexposing a +port that is not exposed is a no-op. + * @request DELETE:/v1/core/sandboxes/{id}/ports/{port} + */ + sandboxesServiceUnexposeSandboxPort = ( + id: string, + port: string, + query?: { + organizationId?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/v1/core/sandboxes/${id}/ports/${port}`, + method: "DELETE", + query: query, + format: "json", + ...params, + }); + /** + * No description + * + * @tags SandboxesService * @name SandboxesServiceGetSandboxResourceMetrics * @summary GetSandboxResourceMetrics returns the per-sandbox CPU/memory utilization time-series the baremetal agent reports via diff --git a/js/src/lightning_cloud/openapi/data-contracts.ts b/js/src/lightning_cloud/openapi/data-contracts.ts index 11c1d8fe0..9ed78ff01 100644 --- a/js/src/lightning_cloud/openapi/data-contracts.ts +++ b/js/src/lightning_cloud/openapi/data-contracts.ts @@ -83,6 +83,12 @@ export interface SandboxesServiceCreateSandboxSnapshotBody { includeMemory?: boolean; } +export interface SandboxesServiceExposeSandboxPortsBody { + organizationId?: string; + /** Ports inside the sandbox, 1-65535. The sandbox API port (5060) is rejected. */ + ports?: string[]; +} + export interface SandboxesServiceExtendSandboxTimeoutBody { organizationId?: string; /** @@ -431,6 +437,11 @@ export interface V1CreateSandboxRequest { * @format uint64 */ idleTimeout?: string; + /** + * Bind /var/lib/docker onto the writable disk (quota'd by storage_gb) + * instead of the default tmpfs + */ + dockerDataRootOnDisk?: boolean; } export type V1DeleteSandboxResponse = object; @@ -648,9 +659,10 @@ export interface V1Sandbox { * Public HTTPS URLs for the sandbox's user-exposed `ports`, keyed by the * port number as a string (e.g. "8080" -> "https://8080--s.cloudspaces.litng.ai"). * Each URL routes through the cluster proxy to that port inside the sandbox. - * Only the ports the caller requested at create time are included; the - * internal sandbox API port is never exposed. Populated on create / get / - * list / update responses; empty when the sandbox has no user ports. + * Only the ports requested at create time or through ExposeSandboxPorts are + * included; the internal sandbox API port is never exposed. Populated on + * create / get / list / update responses; empty when the sandbox has no + * user ports. */ portUrls?: Record; /** @@ -688,6 +700,8 @@ export interface V1Sandbox { * cold-boots the processes. */ memorySnapshotCompatible?: boolean; + /** Mirrors CreateSandboxRequest.docker_data_root_on_disk */ + dockerDataRootOnDisk?: boolean; } export interface V1SandboxCommand { diff --git a/python/lightning_sdk/lightning_cloud/openapi/__init__.py b/python/lightning_sdk/lightning_cloud/openapi/__init__.py index b75797ac6..c83fd918b 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/__init__.py +++ b/python/lightning_sdk/lightning_cloud/openapi/__init__.py @@ -43,7 +43,6 @@ from lightning_sdk.lightning_cloud.openapi.api.jobs_service_api import JobsServiceApi from lightning_sdk.lightning_cloud.openapi.api.k8_s_cluster_service_api import K8SClusterServiceApi from lightning_sdk.lightning_cloud.openapi.api.lightningapp_instance_service_api import LightningappInstanceServiceApi -from lightning_sdk.lightning_cloud.openapi.api.lightningapp_v2_service_api import LightningappV2ServiceApi from lightning_sdk.lightning_cloud.openapi.api.lightningwork_service_api import LightningworkServiceApi from lightning_sdk.lightning_cloud.openapi.api.lit_logger_service_api import LitLoggerServiceApi from lightning_sdk.lightning_cloud.openapi.api.lit_registry_service_api import LitRegistryServiceApi @@ -70,6 +69,7 @@ from lightning_sdk.lightning_cloud.openapi.models.assistants_service_create_assistant_managed_endpoint_body import AssistantsServiceCreateAssistantManagedEndpointBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_create_conversation_message_action_body import AssistantsServiceCreateConversationMessageActionBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_create_model_metrics_body import AssistantsServiceCreateModelMetricsBody +from lightning_sdk.lightning_cloud.openapi.models.assistants_service_set_model_publish_status_body import AssistantsServiceSetModelPublishStatusBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_start_conversation_body import AssistantsServiceStartConversationBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_assistant_body import AssistantsServiceUpdateAssistantBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_assistant_managed_endpoint_body import AssistantsServiceUpdateAssistantManagedEndpointBody @@ -78,6 +78,8 @@ from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_conversation_like_body import AssistantsServiceUpdateConversationLikeBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_conversation_message_content_body import AssistantsServiceUpdateConversationMessageContentBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_conversation_message_like_body import AssistantsServiceUpdateConversationMessageLikeBody +from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_model_pricing_body import AssistantsServiceUpdateModelPricingBody +from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_model_serving_body import AssistantsServiceUpdateModelServingBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_validate_assistant_status_body import AssistantsServiceValidateAssistantStatusBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_validate_managed_model_body import AssistantsServiceValidateManagedModelBody from lightning_sdk.lightning_cloud.openapi.models.billing_service_create_billing_upgrade_trigger_record_body import BillingServiceCreateBillingUpgradeTriggerRecordBody @@ -85,17 +87,14 @@ from lightning_sdk.lightning_cloud.openapi.models.billing_service_transfer_org_balance_body import BillingServiceTransferOrgBalanceBody from lightning_sdk.lightning_cloud.openapi.models.billing_service_transfer_project_balance_body import BillingServiceTransferProjectBalanceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_environment_template_service_update_cloud_space_environment_template_body import CloudSpaceEnvironmentTemplateServiceUpdateCloudSpaceEnvironmentTemplateBody -from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_cloud_space_app_instance_body import CloudSpaceServiceCreateCloudSpaceAppInstanceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_cloud_space_body import CloudSpaceServiceCreateCloudSpaceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_cloud_space_instance_metric_body import CloudSpaceServiceCreateCloudSpaceInstanceMetricBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_cloud_space_version_body import CloudSpaceServiceCreateCloudSpaceVersionBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_cloud_space_version_publication_body import CloudSpaceServiceCreateCloudSpaceVersionPublicationBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_lightning_run_body import CloudSpaceServiceCreateLightningRunBody -from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_lightning_run_instance_body import CloudSpaceServiceCreateLightningRunInstanceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_engage_cloud_space_body import CloudSpaceServiceEngageCloudSpaceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_execute_command_in_cloud_space_body import CloudSpaceServiceExecuteCommandInCloudSpaceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_execute_in_cloud_space_session_body import CloudSpaceServiceExecuteInCloudSpaceSessionBody -from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_fork_cloud_space_app_instance_body import CloudSpaceServiceForkCloudSpaceAppInstanceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_fork_cloud_space_body import CloudSpaceServiceForkCloudSpaceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_keep_alive_cloud_space_instance_body import CloudSpaceServiceKeepAliveCloudSpaceInstanceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_publish_cloud_space_body import CloudSpaceServicePublishCloudSpaceBody @@ -104,7 +103,6 @@ from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_start_cloud_space_instance_body import CloudSpaceServiceStartCloudSpaceInstanceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_suggest_cloud_space_name_body import CloudSpaceServiceSuggestCloudSpaceNameBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_transfer_cloud_space_body import CloudSpaceServiceTransferCloudSpaceBody -from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_update_cloud_space_app_body import CloudSpaceServiceUpdateCloudSpaceAppBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_update_cloud_space_body import CloudSpaceServiceUpdateCloudSpaceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_update_cloud_space_collab_body import CloudSpaceServiceUpdateCloudSpaceCollabBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_update_cloud_space_ide_body import CloudSpaceServiceUpdateCloudSpaceIdeBody @@ -135,6 +133,7 @@ from lightning_sdk.lightning_cloud.openapi.models.cluster_service_report_sandbox_resource_metrics_body import ClusterServiceReportSandboxResourceMetricsBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_report_sandbox_termination_body import ClusterServiceReportSandboxTerminationBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_server_check_in_body import ClusterServiceServerCheckInBody +from lightning_sdk.lightning_cloud.openapi.models.cluster_service_set_machine_vpn_services_body import ClusterServiceSetMachineVPNServicesBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_sleep_server_body import ClusterServiceSleepServerBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_cluster_body import ClusterServiceUpdateClusterBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_cluster_usage_restriction_body import ClusterServiceUpdateClusterUsageRestrictionBody @@ -142,6 +141,7 @@ from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_machine_body import ClusterServiceUpdateMachineBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_machine_server_body import ClusterServiceUpdateMachineServerBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_project_cluster_body import ClusterServiceUpdateProjectClusterBody +from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_provider_fleet_owner_body import ClusterServiceUpdateProviderFleetOwnerBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_server_body import ClusterServiceUpdateServerBody from lightning_sdk.lightning_cloud.openapi.models.create_checkout_session_request_wallet_type import CreateCheckoutSessionRequestWalletType from lightning_sdk.lightning_cloud.openapi.models.data_connection_mount_data_connection_mount_copy_status import DataConnectionMountDataConnectionMountCopyStatus @@ -201,13 +201,6 @@ from lightning_sdk.lightning_cloud.openapi.models.k8_s_cluster_service_update_kubernetes_job_body import K8SClusterServiceUpdateKubernetesJobBody from lightning_sdk.lightning_cloud.openapi.models.k8_s_cluster_service_update_kubernetes_schedule_body import K8SClusterServiceUpdateKubernetesScheduleBody from lightning_sdk.lightning_cloud.openapi.models.k8_s_cluster_service_update_kubernetes_template_body import K8SClusterServiceUpdateKubernetesTemplateBody -from lightning_sdk.lightning_cloud.openapi.models.lightningapp_instance_service_update_lightningapp_instance_body import LightningappInstanceServiceUpdateLightningappInstanceBody -from lightning_sdk.lightning_cloud.openapi.models.lightningapp_instance_service_update_lightningapp_instance_release_body import LightningappInstanceServiceUpdateLightningappInstanceReleaseBody -from lightning_sdk.lightning_cloud.openapi.models.lightningapp_v2_service_create_lightningapp_from_gallery_body import LightningappV2ServiceCreateLightningappFromGalleryBody -from lightning_sdk.lightning_cloud.openapi.models.lightningwork_service_batch_update_lightningworks_body import LightningworkServiceBatchUpdateLightningworksBody -from lightning_sdk.lightning_cloud.openapi.models.lightningwork_service_create_lightningwork_body import LightningworkServiceCreateLightningworkBody -from lightning_sdk.lightning_cloud.openapi.models.lightningwork_service_create_lightningwork_body_spec import LightningworkServiceCreateLightningworkBodySpec -from lightning_sdk.lightning_cloud.openapi.models.lightningwork_service_update_lightningwork_body import LightningworkServiceUpdateLightningworkBody from lightning_sdk.lightning_cloud.openapi.models.lit_logger_service_append_logger_metrics_body import LitLoggerServiceAppendLoggerMetricsBody from lightning_sdk.lightning_cloud.openapi.models.lit_logger_service_create_lit_logger_media_body import LitLoggerServiceCreateLitLoggerMediaBody from lightning_sdk.lightning_cloud.openapi.models.lit_logger_service_create_logger_artifact_body import LitLoggerServiceCreateLoggerArtifactBody @@ -238,6 +231,7 @@ from lightning_sdk.lightning_cloud.openapi.models.organizations_service_create_org_membership_body import OrganizationsServiceCreateOrgMembershipBody from lightning_sdk.lightning_cloud.openapi.models.organizations_service_create_org_membership_role_binding_body import OrganizationsServiceCreateOrgMembershipRoleBindingBody from lightning_sdk.lightning_cloud.openapi.models.organizations_service_create_org_role_body import OrganizationsServiceCreateOrgRoleBody +from lightning_sdk.lightning_cloud.openapi.models.organizations_service_set_org_default_teamspaces_body import OrganizationsServiceSetOrgDefaultTeamspacesBody from lightning_sdk.lightning_cloud.openapi.models.organizations_service_set_org_member_model_api_daily_limit_body import OrganizationsServiceSetOrgMemberModelAPIDailyLimitBody from lightning_sdk.lightning_cloud.openapi.models.organizations_service_set_org_model_api_daily_limit_default_body import OrganizationsServiceSetOrgModelAPIDailyLimitDefaultBody from lightning_sdk.lightning_cloud.openapi.models.organizations_service_transfer_org_member_resources_body import OrganizationsServiceTransferOrgMemberResourcesBody @@ -254,6 +248,7 @@ from lightning_sdk.lightning_cloud.openapi.models.projects_service_create_project_membership_body import ProjectsServiceCreateProjectMembershipBody from lightning_sdk.lightning_cloud.openapi.models.projects_service_create_project_membership_role_binding_body import ProjectsServiceCreateProjectMembershipRoleBindingBody from lightning_sdk.lightning_cloud.openapi.models.projects_service_create_project_role_body import ProjectsServiceCreateProjectRoleBody +from lightning_sdk.lightning_cloud.openapi.models.projects_service_update_api_key_body import ProjectsServiceUpdateAPIKeyBody from lightning_sdk.lightning_cloud.openapi.models.projects_service_update_project_body import ProjectsServiceUpdateProjectBody from lightning_sdk.lightning_cloud.openapi.models.projects_service_update_project_tab_order_body import ProjectsServiceUpdateProjectTabOrderBody from lightning_sdk.lightning_cloud.openapi.models.protobuf_any import ProtobufAny @@ -261,6 +256,7 @@ from lightning_sdk.lightning_cloud.openapi.models.rpc_status import RpcStatus from lightning_sdk.lightning_cloud.openapi.models.sandboxes_service_create_sandbox_directory_body import SandboxesServiceCreateSandboxDirectoryBody from lightning_sdk.lightning_cloud.openapi.models.sandboxes_service_create_sandbox_snapshot_body import SandboxesServiceCreateSandboxSnapshotBody +from lightning_sdk.lightning_cloud.openapi.models.sandboxes_service_expose_sandbox_ports_body import SandboxesServiceExposeSandboxPortsBody from lightning_sdk.lightning_cloud.openapi.models.sandboxes_service_extend_sandbox_timeout_body import SandboxesServiceExtendSandboxTimeoutBody from lightning_sdk.lightning_cloud.openapi.models.sandboxes_service_finalize_sandbox_snapshot_body import SandboxesServiceFinalizeSandboxSnapshotBody from lightning_sdk.lightning_cloud.openapi.models.sandboxes_service_get_sandbox_snapshot_blob_download_urls_body import SandboxesServiceGetSandboxSnapshotBlobDownloadUrlsBody @@ -302,14 +298,17 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_aer_counter import V1AERCounter from lightning_sdk.lightning_cloud.openapi.models.v1_api_key import V1APIKey from lightning_sdk.lightning_cloud.openapi.models.v1_api_key_budget import V1APIKeyBudget +from lightning_sdk.lightning_cloud.openapi.models.v1_api_key_status import V1APIKeyStatus from lightning_sdk.lightning_cloud.openapi.models.v1_aws_cluster_credentials import V1AWSClusterCredentials from lightning_sdk.lightning_cloud.openapi.models.v1_aws_direct_v1 import V1AWSDirectV1 from lightning_sdk.lightning_cloud.openapi.models.v1_aws_direct_v1_status import V1AWSDirectV1Status from lightning_sdk.lightning_cloud.openapi.models.v1_abort_storage_transfer_response import V1AbortStorageTransferResponse from lightning_sdk.lightning_cloud.openapi.models.v1_accelerator_quota_info import V1AcceleratorQuotaInfo from lightning_sdk.lightning_cloud.openapi.models.v1_accelerator_type import V1AcceleratorType +from lightning_sdk.lightning_cloud.openapi.models.v1_access_cluster_ids_update import V1AccessClusterIdsUpdate from lightning_sdk.lightning_cloud.openapi.models.v1_account_type import V1AccountType from lightning_sdk.lightning_cloud.openapi.models.v1_ack_user_storage_violation_response import V1AckUserStorageViolationResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_activity_subfilter_values import V1ActivitySubfilterValues from lightning_sdk.lightning_cloud.openapi.models.v1_add_job_timing_response import V1AddJobTimingResponse from lightning_sdk.lightning_cloud.openapi.models.v1_affiliate_link import V1AffiliateLink from lightning_sdk.lightning_cloud.openapi.models.v1_agent_job import V1AgentJob @@ -325,6 +324,8 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_assistant import V1Assistant from lightning_sdk.lightning_cloud.openapi.models.v1_assistant_knowledge_item_status import V1AssistantKnowledgeItemStatus from lightning_sdk.lightning_cloud.openapi.models.v1_assistant_knowledge_status import V1AssistantKnowledgeStatus +from lightning_sdk.lightning_cloud.openapi.models.v1_assistant_message_subfilter import V1AssistantMessageSubfilter +from lightning_sdk.lightning_cloud.openapi.models.v1_assistant_message_subfilter_values import V1AssistantMessageSubfilterValues from lightning_sdk.lightning_cloud.openapi.models.v1_assistant_model_status import V1AssistantModelStatus from lightning_sdk.lightning_cloud.openapi.models.v1_assistant_session_daily_aggregated import V1AssistantSessionDailyAggregated from lightning_sdk.lightning_cloud.openapi.models.v1_auth_type import V1AuthType @@ -340,7 +341,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_byom_spec import V1BYOMSpec from lightning_sdk.lightning_cloud.openapi.models.v1_batch_server_check_in_request import V1BatchServerCheckInRequest from lightning_sdk.lightning_cloud.openapi.models.v1_batch_server_check_in_response import V1BatchServerCheckInResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_batch_update_lightningwork_response import V1BatchUpdateLightningworkResponse from lightning_sdk.lightning_cloud.openapi.models.v1_billing_feature import V1BillingFeature from lightning_sdk.lightning_cloud.openapi.models.v1_billing_period import V1BillingPeriod from lightning_sdk.lightning_cloud.openapi.models.v1_billing_subscription import V1BillingSubscription @@ -364,10 +364,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_checkbox import V1Checkbox from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_provider import V1CloudProvider from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space import V1CloudSpace -from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app import V1CloudSpaceApp -from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app_action import V1CloudSpaceAppAction -from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app_action_type import V1CloudSpaceAppActionType -from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app_owner_type import V1CloudSpaceAppOwnerType from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_code_version import V1CloudSpaceCodeVersion from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_code_version_status import V1CloudSpaceCodeVersionStatus from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_cold_start_metrics import V1CloudSpaceColdStartMetrics @@ -403,9 +399,13 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_availability import V1ClusterAvailability from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_capacity_reservation import V1ClusterCapacityReservation from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_deletion_options import V1ClusterDeletionOptions +from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_details import V1ClusterDetails +from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_details_reservation import V1ClusterDetailsReservation +from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_details_server import V1ClusterDetailsServer from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_encryption_key import V1ClusterEncryptionKey from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_metrics import V1ClusterMetrics from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_proxy import V1ClusterProxy +from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_reservation_usage_point import V1ClusterReservationUsagePoint from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_resource_tag import V1ClusterResourceTag from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_sla_daily_metrics import V1ClusterSLADailyMetrics from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_security_options import V1ClusterSecurityOptions @@ -416,6 +416,11 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_type import V1ClusterType from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_upload import V1ClusterUpload from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_usage_restriction import V1ClusterUsageRestriction +from lightning_sdk.lightning_cloud.openapi.models.v1_coding_model_weight import V1CodingModelWeight +from lightning_sdk.lightning_cloud.openapi.models.v1_coding_plan_usage import V1CodingPlanUsage +from lightning_sdk.lightning_cloud.openapi.models.v1_coding_plan_verdict import V1CodingPlanVerdict +from lightning_sdk.lightning_cloud.openapi.models.v1_coding_usage_window import V1CodingUsageWindow +from lightning_sdk.lightning_cloud.openapi.models.v1_coding_usage_window_kind import V1CodingUsageWindowKind from lightning_sdk.lightning_cloud.openapi.models.v1_collab_action import V1CollabAction from lightning_sdk.lightning_cloud.openapi.models.v1_collab_session import V1CollabSession from lightning_sdk.lightning_cloud.openapi.models.v1_complete_model_upload_response import V1CompleteModelUploadResponse @@ -441,7 +446,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_create_billing_upgrade_trigger_record_response import V1CreateBillingUpgradeTriggerRecordResponse from lightning_sdk.lightning_cloud.openapi.models.v1_create_checkout_session_request import V1CreateCheckoutSessionRequest from lightning_sdk.lightning_cloud.openapi.models.v1_create_checkout_session_response import V1CreateCheckoutSessionResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_create_cloud_space_app_instance_response import V1CreateCloudSpaceAppInstanceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_create_cloud_space_environment_template_request import V1CreateCloudSpaceEnvironmentTemplateRequest from lightning_sdk.lightning_cloud.openapi.models.v1_create_cloud_space_instance_metric_response import V1CreateCloudSpaceInstanceMetricResponse from lightning_sdk.lightning_cloud.openapi.models.v1_create_cluster_capacity_reservation_response import V1CreateClusterCapacityReservationResponse @@ -494,7 +498,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_api_key_response import V1DeleteAPIKeyResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_affiliate_link_response import V1DeleteAffiliateLinkResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_assistant_response import V1DeleteAssistantResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cloud_space_app_response import V1DeleteCloudSpaceAppResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cloud_space_environment_template_response import V1DeleteCloudSpaceEnvironmentTemplateResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cloud_space_response import V1DeleteCloudSpaceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cloud_space_session_response import V1DeleteCloudSpaceSessionResponse @@ -520,7 +523,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_license_response import V1DeleteLicenseResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lightning_run_response import V1DeleteLightningRunResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lightningapp_instance_response import V1DeleteLightningappInstanceResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lightningwork_response import V1DeleteLightningworkResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lit_logger_media_response import V1DeleteLitLoggerMediaResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lit_registry_repository_image_artifact_version_by_digest_response import V1DeleteLitRegistryRepositoryImageArtifactVersionByDigestResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lit_repository_response import V1DeleteLitRepositoryResponse @@ -546,6 +548,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_project_membership_role_binding_response import V1DeleteProjectMembershipRoleBindingResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_project_response import V1DeleteProjectResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_project_role_response import V1DeleteProjectRoleResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_delete_published_model_response import V1DeletePublishedModelResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_ssh_public_key_response import V1DeleteSSHPublicKeyResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_sandbox_response import V1DeleteSandboxResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_sandbox_snapshot_response import V1DeleteSandboxSnapshotResponse @@ -619,6 +622,8 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_usage import V1FilesystemUsage from lightning_sdk.lightning_cloud.openapi.models.v1_find_capacity_block_offering_response import V1FindCapacityBlockOfferingResponse from lightning_sdk.lightning_cloud.openapi.models.v1_firewall_rule import V1FirewallRule +from lightning_sdk.lightning_cloud.openapi.models.v1_firmware_entry import V1FirmwareEntry +from lightning_sdk.lightning_cloud.openapi.models.v1_firmware_inventory import V1FirmwareInventory from lightning_sdk.lightning_cloud.openapi.models.v1_flowserver import V1Flowserver from lightning_sdk.lightning_cloud.openapi.models.v1_function_call import V1FunctionCall from lightning_sdk.lightning_cloud.openapi.models.v1_function_tool import V1FunctionTool @@ -635,8 +640,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_gpu_diagnostic_userspace_lib_info import V1GPUDiagnosticUserspaceLibInfo from lightning_sdk.lightning_cloud.openapi.models.v1_gpu_status import V1GPUStatus from lightning_sdk.lightning_cloud.openapi.models.v1_gpu_system_metrics import V1GPUSystemMetrics -from lightning_sdk.lightning_cloud.openapi.models.v1_gallery_app import V1GalleryApp -from lightning_sdk.lightning_cloud.openapi.models.v1_gallery_component import V1GalleryComponent from lightning_sdk.lightning_cloud.openapi.models.v1_gcp_data_connection import V1GcpDataConnection from lightning_sdk.lightning_cloud.openapi.models.v1_gcp_data_connection_setup import V1GcpDataConnectionSetup from lightning_sdk.lightning_cloud.openapi.models.v1_ge_list_deployment_routing_telemetry_response import V1GeListDeploymentRoutingTelemetryResponse @@ -644,6 +647,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_generic_job import V1GenericJob from lightning_sdk.lightning_cloud.openapi.models.v1_generic_job_spec import V1GenericJobSpec from lightning_sdk.lightning_cloud.openapi.models.v1_get_account_balance_response import V1GetAccountBalanceResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_activity_filter_resource_names_response import V1GetActivityFilterResourceNamesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_activity_filter_values_response import V1GetActivityFilterValuesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_affiliate_link_response import V1GetAffiliateLinkResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_assistant_session_daily_aggregated_response import V1GetAssistantSessionDailyAggregatedResponse @@ -657,7 +661,10 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_accelerator_demand_response import V1GetClusterAcceleratorDemandResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_capacity_reservation_response import V1GetClusterCapacityReservationResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_credentials_response import V1GetClusterCredentialsResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_details_response import V1GetClusterDetailsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_health_response import V1GetClusterHealthResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_reservation_usage_response import V1GetClusterReservationUsageResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_coding_usage_response import V1GetCodingUsageResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_deployment_routing_telemetry_aggregated_response import V1GetDeploymentRoutingTelemetryAggregatedResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_deployment_routing_telemetry_content_csv_response import V1GetDeploymentRoutingTelemetryContentCSVResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_deployment_routing_telemetry_content_response import V1GetDeploymentRoutingTelemetryContentResponse @@ -666,6 +673,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_inference_rate_limit_response import V1GetInferenceRateLimitResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_job_stats_response import V1GetJobStatsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_job_system_metrics_response import V1GetJobSystemMetricsResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_k8_s_cluster_kubeconfig_url_response import V1GetK8SClusterKubeconfigURLResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_k8s_cluster_report_data_response import V1GetK8sClusterReportDataResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_k8s_cluster_sla_metrics_response import V1GetK8sClusterSLAMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_kubernetes_pod_logs_response import V1GetKubernetesPodLogsResponse @@ -673,7 +681,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_kubernetes_py_torch_job_response import V1GetKubernetesPyTorchJobResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_latest_model_metrics_response import V1GetLatestModelMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_lightning_run_source_code_download_url_response import V1GetLightningRunSourceCodeDownloadUrlResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_get_lightningapp_instance_open_ports_response import V1GetLightningappInstanceOpenPortsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_lightningapp_instance_system_metrics_response import V1GetLightningappInstanceSystemMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_logger_metrics_response import V1GetLoggerMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_logger_metrics_summary_response import V1GetLoggerMetricsSummaryResponse @@ -681,6 +688,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_long_running_command_in_cloud_space_response import V1GetLongRunningCommandInCloudSpaceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_machine_details_response import V1GetMachineDetailsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_machine_response import V1GetMachineResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_machine_setup_url_response import V1GetMachineSetupURLResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_machine_system_metrics_response import V1GetMachineSystemMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_model_domain_response import V1GetModelDomainResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_model_file_upload_urls_response import V1GetModelFileUploadUrlsResponse @@ -697,6 +705,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_project_balance_response import V1GetProjectBalanceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_project_compute_usage_response import V1GetProjectComputeUsageResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_project_storage_metadata_response import V1GetProjectStorageMetadataResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_ssh_setup_url_response import V1GetSSHSetupURLResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_sandbox_command_logs_response import V1GetSandboxCommandLogsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_sandbox_command_response import V1GetSandboxCommandResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_sandbox_file_response import V1GetSandboxFileResponse @@ -733,12 +742,16 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_health_check_exec import V1HealthCheckExec from lightning_sdk.lightning_cloud.openapi.models.v1_health_check_http_get import V1HealthCheckHttpGet from lightning_sdk.lightning_cloud.openapi.models.v1_host_health import V1HostHealth +from lightning_sdk.lightning_cloud.openapi.models.v1_host_ibguid_rail import V1HostIBGUIDRail +from lightning_sdk.lightning_cloud.openapi.models.v1_host_ibp_keys_health import V1HostIBPKeysHealth +from lightning_sdk.lightning_cloud.openapi.models.v1_host_ib_rail_p_keys import V1HostIBRailPKeys from lightning_sdk.lightning_cloud.openapi.models.v1_host_storage import V1HostStorage from lightning_sdk.lightning_cloud.openapi.models.v1_hugepage_pool import V1HugepagePool from lightning_sdk.lightning_cloud.openapi.models.v1_ib_device_info import V1IBDeviceInfo from lightning_sdk.lightning_cloud.openapi.models.v1_ids_logger_metrics import V1IdsLoggerMetrics from lightning_sdk.lightning_cloud.openapi.models.v1_image_spec import V1ImageSpec from lightning_sdk.lightning_cloud.openapi.models.v1_image_state import V1ImageState +from lightning_sdk.lightning_cloud.openapi.models.v1_inband_netplan_health import V1InbandNetplanHealth from lightning_sdk.lightning_cloud.openapi.models.v1_index import V1Index from lightning_sdk.lightning_cloud.openapi.models.v1_infiniband_tier import V1InfinibandTier from lightning_sdk.lightning_cloud.openapi.models.v1_input import V1Input @@ -808,7 +821,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_aggregated_pod_metrics_response import V1ListAggregatedPodMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_all_jobs_response import V1ListAllJobsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_assistants_response import V1ListAssistantsResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_list_cloud_space_apps_response import V1ListCloudSpaceAppsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_cloud_space_cold_start_metrics_response import V1ListCloudSpaceColdStartMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_cloud_space_environment_templates_response import V1ListCloudSpaceEnvironmentTemplatesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_cloud_space_instances_response import V1ListCloudSpaceInstancesResponse @@ -828,6 +840,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_metrics_response import V1ListClusterMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_namespace_metrics_response import V1ListClusterNamespaceMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_proxies_response import V1ListClusterProxiesResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_reservations_for_usage_response import V1ListClusterReservationsForUsageResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_usage_restrictions_response import V1ListClusterUsageRestrictionsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_clusters_response import V1ListClustersResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_container_metrics_response import V1ListContainerMetricsResponse @@ -847,8 +860,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_endpoints_response import V1ListEndpointsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_experiments_response import V1ListExperimentsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_metrics_response import V1ListFilesystemMetricsResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_list_gallery_components_response import V1ListGalleryComponentsResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_list_gallery_lightningapps_response import V1ListGalleryLightningappsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_git_credentials_response import V1ListGitCredentialsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_git_providers_response import V1ListGitProvidersResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_gpu_telemetry_response import V1ListGpuTelemetryResponse @@ -917,6 +928,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_project_membership_role_binding_response import V1ListProjectMembershipRoleBindingResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_project_memberships_response import V1ListProjectMembershipsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_project_roles_response import V1ListProjectRolesResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_list_provider_fleet_response import V1ListProviderFleetResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_published_cloud_spaces_response import V1ListPublishedCloudSpacesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_published_deployment_templates_response import V1ListPublishedDeploymentTemplatesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_published_managed_endpoints_response import V1ListPublishedManagedEndpointsResponse @@ -951,13 +963,17 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_machine_alert import V1MachineAlert from lightning_sdk.lightning_cloud.openapi.models.v1_machine_architecture import V1MachineArchitecture from lightning_sdk.lightning_cloud.openapi.models.v1_machine_bootstrap import V1MachineBootstrap +from lightning_sdk.lightning_cloud.openapi.models.v1_machine_customer_network import V1MachineCustomerNetwork from lightning_sdk.lightning_cloud.openapi.models.v1_machine_details import V1MachineDetails from lightning_sdk.lightning_cloud.openapi.models.v1_machine_direct_v1 import V1MachineDirectV1 +from lightning_sdk.lightning_cloud.openapi.models.v1_machine_exclusion import V1MachineExclusion from lightning_sdk.lightning_cloud.openapi.models.v1_machine_health import V1MachineHealth from lightning_sdk.lightning_cloud.openapi.models.v1_machine_image_status import V1MachineImageStatus from lightning_sdk.lightning_cloud.openapi.models.v1_machine_system_info import V1MachineSystemInfo from lightning_sdk.lightning_cloud.openapi.models.v1_machine_system_metrics import V1MachineSystemMetrics from lightning_sdk.lightning_cloud.openapi.models.v1_machine_v1_status import V1MachineV1Status +from lightning_sdk.lightning_cloud.openapi.models.v1_machine_vpn_service_unit import V1MachineVPNServiceUnit +from lightning_sdk.lightning_cloud.openapi.models.v1_machine_vpn_services_status import V1MachineVPNServicesStatus from lightning_sdk.lightning_cloud.openapi.models.v1_machines_selector import V1MachinesSelector from lightning_sdk.lightning_cloud.openapi.models.v1_magic_link_login_request import V1MagicLinkLoginRequest from lightning_sdk.lightning_cloud.openapi.models.v1_magic_link_login_response import V1MagicLinkLoginResponse @@ -1078,6 +1094,9 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_project_tab import V1ProjectTab from lightning_sdk.lightning_cloud.openapi.models.v1_promo_overlay import V1PromoOverlay from lightning_sdk.lightning_cloud.openapi.models.v1_prompt_suggestion import V1PromptSuggestion +from lightning_sdk.lightning_cloud.openapi.models.v1_provider_fleet_node import V1ProviderFleetNode +from lightning_sdk.lightning_cloud.openapi.models.v1_provider_fleet_owner import V1ProviderFleetOwner +from lightning_sdk.lightning_cloud.openapi.models.v1_provider_fleet_usage_point import V1ProviderFleetUsagePoint from lightning_sdk.lightning_cloud.openapi.models.v1_publish_cloud_space_response import V1PublishCloudSpaceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_publish_community_model_request import V1PublishCommunityModelRequest from lightning_sdk.lightning_cloud.openapi.models.v1_publish_shared_artifact_response import V1PublishSharedArtifactResponse @@ -1179,6 +1198,9 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_secret import V1Secret from lightning_sdk.lightning_cloud.openapi.models.v1_secret_type import V1SecretType from lightning_sdk.lightning_cloud.openapi.models.v1_select import V1Select +from lightning_sdk.lightning_cloud.openapi.models.v1_sentinel_one_health import V1SentinelOneHealth +from lightning_sdk.lightning_cloud.openapi.models.v1_sentinel_one_mitigation import V1SentinelOneMitigation +from lightning_sdk.lightning_cloud.openapi.models.v1_sentinel_one_state import V1SentinelOneState from lightning_sdk.lightning_cloud.openapi.models.v1_series_config import V1SeriesConfig from lightning_sdk.lightning_cloud.openapi.models.v1_series_type import V1SeriesType from lightning_sdk.lightning_cloud.openapi.models.v1_server import V1Server @@ -1193,6 +1215,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_server_status import V1ServerStatus from lightning_sdk.lightning_cloud.openapi.models.v1_server_type import V1ServerType from lightning_sdk.lightning_cloud.openapi.models.v1_service_health import V1ServiceHealth +from lightning_sdk.lightning_cloud.openapi.models.v1_set_machine_vpn_services_response import V1SetMachineVPNServicesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_set_org_member_model_api_daily_limit_response import V1SetOrgMemberModelAPIDailyLimitResponse from lightning_sdk.lightning_cloud.openapi.models.v1_set_org_model_api_daily_limit_default_response import V1SetOrgModelAPIDailyLimitDefaultResponse from lightning_sdk.lightning_cloud.openapi.models.v1_set_workload_tags_response import V1SetWorkloadTagsResponse @@ -1221,6 +1244,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_storage_asset import V1StorageAsset from lightning_sdk.lightning_cloud.openapi.models.v1_storage_asset_type import V1StorageAssetType from lightning_sdk.lightning_cloud.openapi.models.v1_storage_category import V1StorageCategory +from lightning_sdk.lightning_cloud.openapi.models.v1_storage_limit_reason import V1StorageLimitReason from lightning_sdk.lightning_cloud.openapi.models.v1_storage_metadata_sort_by import V1StorageMetadataSortBy from lightning_sdk.lightning_cloud.openapi.models.v1_storage_metadata_sort_order import V1StorageMetadataSortOrder from lightning_sdk.lightning_cloud.openapi.models.v1_storage_system_metrics import V1StorageSystemMetrics @@ -1264,6 +1288,8 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_update_cluster_accelerators_request import V1UpdateClusterAcceleratorsRequest from lightning_sdk.lightning_cloud.openapi.models.v1_update_cluster_accelerators_response import V1UpdateClusterAcceleratorsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_update_cluster_availability_request import V1UpdateClusterAvailabilityRequest +from lightning_sdk.lightning_cloud.openapi.models.v1_update_coding_usage_settings_request import V1UpdateCodingUsageSettingsRequest +from lightning_sdk.lightning_cloud.openapi.models.v1_update_coding_usage_settings_response import V1UpdateCodingUsageSettingsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_update_conversation_like_response import V1UpdateConversationLikeResponse from lightning_sdk.lightning_cloud.openapi.models.v1_update_conversation_message_content_response import V1UpdateConversationMessageContentResponse from lightning_sdk.lightning_cloud.openapi.models.v1_update_conversation_message_like_response import V1UpdateConversationMessageLikeResponse @@ -1297,6 +1323,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_upstream_open_ai import V1UpstreamOpenAI from lightning_sdk.lightning_cloud.openapi.models.v1_usage import V1Usage from lightning_sdk.lightning_cloud.openapi.models.v1_usage_details import V1UsageDetails +from lightning_sdk.lightning_cloud.openapi.models.v1_usage_report_subfilters import V1UsageReportSubfilters from lightning_sdk.lightning_cloud.openapi.models.v1_usage_report_v1 import V1UsageReportV1 from lightning_sdk.lightning_cloud.openapi.models.v1_usage_report_v2 import V1UsageReportV2 from lightning_sdk.lightning_cloud.openapi.models.v1_user_features import V1UserFeatures @@ -1322,14 +1349,14 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_validate_storage_transfer_response import V1ValidateStorageTransferResponse from lightning_sdk.lightning_cloud.openapi.models.v1_vast_data_connection import V1VastDataConnection from lightning_sdk.lightning_cloud.openapi.models.v1_verify_verification_response import V1VerifyVerificationResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_voltage_park_direct_v1 import V1VoltageParkDirectV1 from lightning_sdk.lightning_cloud.openapi.models.v1_volume import V1Volume from lightning_sdk.lightning_cloud.openapi.models.v1_volume_state import V1VolumeState -from lightning_sdk.lightning_cloud.openapi.models.v1_vultr_direct_v1 import V1VultrDirectV1 from lightning_sdk.lightning_cloud.openapi.models.v1_weight_source import V1WeightSource from lightning_sdk.lightning_cloud.openapi.models.v1_whoami_response import V1WhoamiResponse from lightning_sdk.lightning_cloud.openapi.models.v1_work import V1Work +from lightning_sdk.lightning_cloud.openapi.models.v1_workload_subfilter_values import V1WorkloadSubfilterValues from lightning_sdk.lightning_cloud.openapi.models.v1_workload_tag import V1WorkloadTag +from lightning_sdk.lightning_cloud.openapi.models.v1_workload_tag_subfilter import V1WorkloadTagSubfilter from lightning_sdk.lightning_cloud.openapi.models.v1_write_sandbox_file_response import V1WriteSandboxFileResponse from lightning_sdk.lightning_cloud.openapi.models.v1_xid_error_behavior import V1XidErrorBehavior from lightning_sdk.lightning_cloud.openapi.models.v1_xid_error_behavior_map import V1XidErrorBehaviorMap diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/__init__.py b/python/lightning_sdk/lightning_cloud/openapi/api/__init__.py index af9e1098a..a23a0cb61 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/__init__.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/__init__.py @@ -24,7 +24,6 @@ from lightning_sdk.lightning_cloud.openapi.api.jobs_service_api import JobsServiceApi from lightning_sdk.lightning_cloud.openapi.api.k8_s_cluster_service_api import K8SClusterServiceApi from lightning_sdk.lightning_cloud.openapi.api.lightningapp_instance_service_api import LightningappInstanceServiceApi -from lightning_sdk.lightning_cloud.openapi.api.lightningapp_v2_service_api import LightningappV2ServiceApi from lightning_sdk.lightning_cloud.openapi.api.lightningwork_service_api import LightningworkServiceApi from lightning_sdk.lightning_cloud.openapi.api.lit_logger_service_api import LitLoggerServiceApi from lightning_sdk.lightning_cloud.openapi.api.lit_registry_service_api import LitRegistryServiceApi diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py index 2e6b6bb6c..bbd7886f4 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py @@ -895,6 +895,99 @@ def assistants_service_delete_conversation_with_http_info(self, assistant_id: 's _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def assistants_service_delete_published_model(self, model_id: 'str', **kwargs) -> 'V1DeletePublishedModelResponse': # noqa: E501 + """DeletePublishedModel deletes a retired model from the Model API catalog, along with its assistants and their conversations. Billing history is kept. Requires internal_model_apis_admin. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.assistants_service_delete_published_model(model_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str model_id: managed_endpoint_models.id (required) + :return: V1DeletePublishedModelResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.assistants_service_delete_published_model_with_http_info(model_id, **kwargs) # noqa: E501 + else: + (data) = self.assistants_service_delete_published_model_with_http_info(model_id, **kwargs) # noqa: E501 + return data + + def assistants_service_delete_published_model_with_http_info(self, model_id: 'str', **kwargs) -> 'V1DeletePublishedModelResponse': # noqa: E501 + """DeletePublishedModel deletes a retired model from the Model API catalog, along with its assistants and their conversations. Billing history is kept. Requires internal_model_apis_admin. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.assistants_service_delete_published_model_with_http_info(model_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str model_id: managed_endpoint_models.id (required) + :return: V1DeletePublishedModelResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['model_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method assistants_service_delete_published_model" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'model_id' is set + if ('model_id' not in params or + params['model_id'] is None): + raise ValueError("Missing the required parameter `model_id` when calling `assistants_service_delete_published_model`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'model_id' in params: + path_params['modelId'] = params['model_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/model-api/models/{modelId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1DeletePublishedModelResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def assistants_service_get_assistant(self, id: 'str', **kwargs) -> 'V1Assistant': # noqa: E501 """assistants_service_get_assistant # noqa: E501 @@ -2537,6 +2630,111 @@ def assistants_service_publish_community_model_with_http_info(self, body: 'V1Pub _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def assistants_service_set_model_publish_status(self, body: 'AssistantsServiceSetModelPublishStatusBody', model_id: 'str', **kwargs) -> 'V1ManagedModel': # noqa: E501 + """SetModelPublishStatus sets the publish status (\"private\", \"org\", \"community\", or \"retired\") of an already-published model in the Model API catalog. Requires internal_model_apis_admin. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.assistants_service_set_model_publish_status(body, model_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AssistantsServiceSetModelPublishStatusBody body: (required) + :param str model_id: managed_endpoint_models.id (required) + :return: V1ManagedModel + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.assistants_service_set_model_publish_status_with_http_info(body, model_id, **kwargs) # noqa: E501 + else: + (data) = self.assistants_service_set_model_publish_status_with_http_info(body, model_id, **kwargs) # noqa: E501 + return data + + def assistants_service_set_model_publish_status_with_http_info(self, body: 'AssistantsServiceSetModelPublishStatusBody', model_id: 'str', **kwargs) -> 'V1ManagedModel': # noqa: E501 + """SetModelPublishStatus sets the publish status (\"private\", \"org\", \"community\", or \"retired\") of an already-published model in the Model API catalog. Requires internal_model_apis_admin. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.assistants_service_set_model_publish_status_with_http_info(body, model_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AssistantsServiceSetModelPublishStatusBody body: (required) + :param str model_id: managed_endpoint_models.id (required) + :return: V1ManagedModel + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'model_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method assistants_service_set_model_publish_status" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `assistants_service_set_model_publish_status`") # noqa: E501 + # verify the required parameter 'model_id' is set + if ('model_id' not in params or + params['model_id'] is None): + raise ValueError("Missing the required parameter `model_id` when calling `assistants_service_set_model_publish_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'model_id' in params: + path_params['modelId'] = params['model_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/model-api/models/{modelId}/publish-status', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1ManagedModel', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def assistants_service_start_conversation(self, body: 'AssistantsServiceStartConversationBody', assistant_id: 'str', **kwargs) -> 'StreamResultOfV1ConversationResponseChunk': # noqa: E501 """assistants_service_start_conversation # noqa: E501 @@ -3481,6 +3679,216 @@ def assistants_service_update_conversation_message_like_with_http_info(self, bod _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def assistants_service_update_model_pricing(self, body: 'AssistantsServiceUpdateModelPricingBody', model_id: 'str', **kwargs) -> 'V1ManagedModel': # noqa: E501 + """UpdateModelPricing changes the prices of a model in the Model API catalog. Only the prices set in the request are written. Requires internal_model_apis_admin. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.assistants_service_update_model_pricing(body, model_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AssistantsServiceUpdateModelPricingBody body: (required) + :param str model_id: managed_endpoint_models.id (required) + :return: V1ManagedModel + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.assistants_service_update_model_pricing_with_http_info(body, model_id, **kwargs) # noqa: E501 + else: + (data) = self.assistants_service_update_model_pricing_with_http_info(body, model_id, **kwargs) # noqa: E501 + return data + + def assistants_service_update_model_pricing_with_http_info(self, body: 'AssistantsServiceUpdateModelPricingBody', model_id: 'str', **kwargs) -> 'V1ManagedModel': # noqa: E501 + """UpdateModelPricing changes the prices of a model in the Model API catalog. Only the prices set in the request are written. Requires internal_model_apis_admin. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.assistants_service_update_model_pricing_with_http_info(body, model_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AssistantsServiceUpdateModelPricingBody body: (required) + :param str model_id: managed_endpoint_models.id (required) + :return: V1ManagedModel + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'model_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method assistants_service_update_model_pricing" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `assistants_service_update_model_pricing`") # noqa: E501 + # verify the required parameter 'model_id' is set + if ('model_id' not in params or + params['model_id'] is None): + raise ValueError("Missing the required parameter `model_id` when calling `assistants_service_update_model_pricing`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'model_id' in params: + path_params['modelId'] = params['model_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/model-api/models/{modelId}/pricing', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1ManagedModel', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def assistants_service_update_model_serving(self, body: 'AssistantsServiceUpdateModelServingBody', model_id: 'str', **kwargs) -> 'V1ManagedModel': # noqa: E501 + """UpdateModelServing changes where a model in the Model API catalog is served from. Requires internal_model_apis_admin. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.assistants_service_update_model_serving(body, model_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AssistantsServiceUpdateModelServingBody body: (required) + :param str model_id: managed_endpoint_models.id (required) + :return: V1ManagedModel + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.assistants_service_update_model_serving_with_http_info(body, model_id, **kwargs) # noqa: E501 + else: + (data) = self.assistants_service_update_model_serving_with_http_info(body, model_id, **kwargs) # noqa: E501 + return data + + def assistants_service_update_model_serving_with_http_info(self, body: 'AssistantsServiceUpdateModelServingBody', model_id: 'str', **kwargs) -> 'V1ManagedModel': # noqa: E501 + """UpdateModelServing changes where a model in the Model API catalog is served from. Requires internal_model_apis_admin. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.assistants_service_update_model_serving_with_http_info(body, model_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AssistantsServiceUpdateModelServingBody body: (required) + :param str model_id: managed_endpoint_models.id (required) + :return: V1ManagedModel + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'model_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method assistants_service_update_model_serving" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `assistants_service_update_model_serving`") # noqa: E501 + # verify the required parameter 'model_id' is set + if ('model_id' not in params or + params['model_id'] is None): + raise ValueError("Missing the required parameter `model_id` when calling `assistants_service_update_model_serving`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'model_id' in params: + path_params['modelId'] = params['model_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/model-api/models/{modelId}/serving', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1ManagedModel', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def assistants_service_validate_assistant_managed_endpoint(self, body: 'V1ValidateManagedEndpointRequest', **kwargs) -> 'V1ValidateManagedEndpointResponse': # noqa: E501 """assistants_service_validate_assistant_managed_endpoint # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/billing_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/billing_service_api.py index 1059c0f2d..d5192ca7a 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/billing_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/billing_service_api.py @@ -633,6 +633,111 @@ def billing_service_get_account_balance_with_http_info(self, **kwargs) -> 'V1Get _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def billing_service_get_activity_filter_resource_names(self, **kwargs) -> 'V1GetActivityFilterResourceNamesResponse': # noqa: E501 + """Paginated, searchable replacement for GetActivityFilterValues.resource_ids. Returns only resource ids for Studio/Job/Deployment/MultiMachineJob, ordered and paginated by resource id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.billing_service_get_activity_filter_resource_names(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: + :param str project_id: if this is non empty the request is project scoped + :param str search_query: optional, matched against the resolved resource name + :param int page_size: + :param str page_token: + :return: V1GetActivityFilterResourceNamesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.billing_service_get_activity_filter_resource_names_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.billing_service_get_activity_filter_resource_names_with_http_info(**kwargs) # noqa: E501 + return data + + def billing_service_get_activity_filter_resource_names_with_http_info(self, **kwargs) -> 'V1GetActivityFilterResourceNamesResponse': # noqa: E501 + """Paginated, searchable replacement for GetActivityFilterValues.resource_ids. Returns only resource ids for Studio/Job/Deployment/MultiMachineJob, ordered and paginated by resource id. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.billing_service_get_activity_filter_resource_names_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: + :param str project_id: if this is non empty the request is project scoped + :param str search_query: optional, matched against the resolved resource name + :param int page_size: + :param str page_token: + :return: V1GetActivityFilterResourceNamesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org_id', 'project_id', 'search_query', 'page_size', 'page_token'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method billing_service_get_activity_filter_resource_names" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'org_id' in params: + query_params.append(('orgId', params['org_id'])) # noqa: E501 + if 'project_id' in params: + query_params.append(('projectId', params['project_id'])) # noqa: E501 + if 'search_query' in params: + query_params.append(('searchQuery', params['search_query'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page_token' in params: + query_params.append(('pageToken', params['page_token'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing/usage-report/filter-values/resource-names', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1GetActivityFilterResourceNamesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def billing_service_get_activity_filter_values(self, **kwargs) -> 'V1GetActivityFilterValuesResponse': # noqa: E501 """Returns the set of values (projects, users, resource types, resource ids) an org admin or teamspace viewer can filter the activity page by, for the given scope and time range. # noqa: E501 @@ -928,6 +1033,91 @@ def billing_service_get_billing_subscription_with_http_info(self, **kwargs) -> ' _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def billing_service_get_coding_usage(self, **kwargs) -> 'V1GetCodingUsageResponse': # noqa: E501 + """The caller's coding plan allowance and how much of each window they have used. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.billing_service_get_coding_usage(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V1GetCodingUsageResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.billing_service_get_coding_usage_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.billing_service_get_coding_usage_with_http_info(**kwargs) # noqa: E501 + return data + + def billing_service_get_coding_usage_with_http_info(self, **kwargs) -> 'V1GetCodingUsageResponse': # noqa: E501 + """The caller's coding plan allowance and how much of each window they have used. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.billing_service_get_coding_usage_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: V1GetCodingUsageResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method billing_service_get_coding_usage" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing/coding-usage', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1GetCodingUsageResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def billing_service_get_inference_rate_limit(self, **kwargs) -> 'V1GetInferenceRateLimitResponse': # noqa: E501 """billing_service_get_inference_rate_limit # noqa: E501 @@ -1792,6 +1982,14 @@ def billing_service_get_usage_report_v2(self, **kwargs) -> 'V1UsageReportV2': # :param datetime search_after: Optional, only include usage entries strictly after this time. This time will be the time of the last returned usage report item. The API will return the next search_after to use. :param str search_after_resource_id: Optional, paired with search_after: the resource_id of the last returned usage report item, needed to break ties when multiple resources share the same search_after date. :param str search_after_resource_type: Optional, paired with search_after: the resource_type of the last returned usage report item, needed to break ties when multiple resources share the same search_after date. + :param list[str] cluster_ids: Optional, will filter by cluster account/provider name if given + :param list[str] subfilters_job_tag_ids: Match workloads with any of these tags. Empty means no subfilter for this resource type + :param bool subfilters_job_match_all_tags: Require every tag in tag_ids rather than any + :param list[str] subfilters_multi_machine_job_tag_ids: Match workloads with any of these tags. Empty means no subfilter for this resource type + :param bool subfilters_multi_machine_job_match_all_tags: Require every tag in tag_ids rather than any + :param list[str] subfilters_deployment_tag_ids: Match workloads with any of these tags. Empty means no subfilter for this resource type + :param bool subfilters_deployment_match_all_tags: Require every tag in tag_ids rather than any + :param list[str] subfilters_assistant_message_api_key_ids: Match messages billed through any of these API keys. Empty means no subfilter for assistant messages :return: V1UsageReportV2 If the method is called asynchronously, returns the request thread. @@ -1823,12 +2021,20 @@ def billing_service_get_usage_report_v2_with_http_info(self, **kwargs) -> 'V1Usa :param datetime search_after: Optional, only include usage entries strictly after this time. This time will be the time of the last returned usage report item. The API will return the next search_after to use. :param str search_after_resource_id: Optional, paired with search_after: the resource_id of the last returned usage report item, needed to break ties when multiple resources share the same search_after date. :param str search_after_resource_type: Optional, paired with search_after: the resource_type of the last returned usage report item, needed to break ties when multiple resources share the same search_after date. + :param list[str] cluster_ids: Optional, will filter by cluster account/provider name if given + :param list[str] subfilters_job_tag_ids: Match workloads with any of these tags. Empty means no subfilter for this resource type + :param bool subfilters_job_match_all_tags: Require every tag in tag_ids rather than any + :param list[str] subfilters_multi_machine_job_tag_ids: Match workloads with any of these tags. Empty means no subfilter for this resource type + :param bool subfilters_multi_machine_job_match_all_tags: Require every tag in tag_ids rather than any + :param list[str] subfilters_deployment_tag_ids: Match workloads with any of these tags. Empty means no subfilter for this resource type + :param bool subfilters_deployment_match_all_tags: Require every tag in tag_ids rather than any + :param list[str] subfilters_assistant_message_api_key_ids: Match messages billed through any of these API keys. Empty means no subfilter for assistant messages :return: V1UsageReportV2 If the method is called asynchronously, returns the request thread. """ - all_params = ['org_id', 'project_ids', 'resource_types', 'resource_ids', 'user_ids', '_from', 'to', 'limit', 'search_after', 'search_after_resource_id', 'search_after_resource_type'] # noqa: E501 + all_params = ['org_id', 'project_ids', 'resource_types', 'resource_ids', 'user_ids', '_from', 'to', 'limit', 'search_after', 'search_after_resource_id', 'search_after_resource_type', 'cluster_ids', 'subfilters_job_tag_ids', 'subfilters_job_match_all_tags', 'subfilters_multi_machine_job_tag_ids', 'subfilters_multi_machine_job_match_all_tags', 'subfilters_deployment_tag_ids', 'subfilters_deployment_match_all_tags', 'subfilters_assistant_message_api_key_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1875,6 +2081,27 @@ def billing_service_get_usage_report_v2_with_http_info(self, **kwargs) -> 'V1Usa query_params.append(('searchAfterResourceId', params['search_after_resource_id'])) # noqa: E501 if 'search_after_resource_type' in params: query_params.append(('searchAfterResourceType', params['search_after_resource_type'])) # noqa: E501 + if 'cluster_ids' in params: + query_params.append(('clusterIds', params['cluster_ids'])) # noqa: E501 + collection_formats['clusterIds'] = 'multi' # noqa: E501 + if 'subfilters_job_tag_ids' in params: + query_params.append(('subfilters.job.tagIds', params['subfilters_job_tag_ids'])) # noqa: E501 + collection_formats['subfilters.job.tagIds'] = 'multi' # noqa: E501 + if 'subfilters_job_match_all_tags' in params: + query_params.append(('subfilters.job.matchAllTags', params['subfilters_job_match_all_tags'])) # noqa: E501 + if 'subfilters_multi_machine_job_tag_ids' in params: + query_params.append(('subfilters.multiMachineJob.tagIds', params['subfilters_multi_machine_job_tag_ids'])) # noqa: E501 + collection_formats['subfilters.multiMachineJob.tagIds'] = 'multi' # noqa: E501 + if 'subfilters_multi_machine_job_match_all_tags' in params: + query_params.append(('subfilters.multiMachineJob.matchAllTags', params['subfilters_multi_machine_job_match_all_tags'])) # noqa: E501 + if 'subfilters_deployment_tag_ids' in params: + query_params.append(('subfilters.deployment.tagIds', params['subfilters_deployment_tag_ids'])) # noqa: E501 + collection_formats['subfilters.deployment.tagIds'] = 'multi' # noqa: E501 + if 'subfilters_deployment_match_all_tags' in params: + query_params.append(('subfilters.deployment.matchAllTags', params['subfilters_deployment_match_all_tags'])) # noqa: E501 + if 'subfilters_assistant_message_api_key_ids' in params: + query_params.append(('subfilters.assistantMessage.apiKeyIds', params['subfilters_assistant_message_api_key_ids'])) # noqa: E501 + collection_formats['subfilters.assistantMessage.apiKeyIds'] = 'multi' # noqa: E501 header_params = {} @@ -2680,3 +2907,100 @@ def billing_service_update_billing_subscription_with_http_info(self, body: 'V1Up _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def billing_service_update_coding_usage_settings(self, body: 'V1UpdateCodingUsageSettingsRequest', **kwargs) -> 'V1UpdateCodingUsageSettingsResponse': # noqa: E501 + """billing_service_update_coding_usage_settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.billing_service_update_coding_usage_settings(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V1UpdateCodingUsageSettingsRequest body: (required) + :return: V1UpdateCodingUsageSettingsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.billing_service_update_coding_usage_settings_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.billing_service_update_coding_usage_settings_with_http_info(body, **kwargs) # noqa: E501 + return data + + def billing_service_update_coding_usage_settings_with_http_info(self, body: 'V1UpdateCodingUsageSettingsRequest', **kwargs) -> 'V1UpdateCodingUsageSettingsResponse': # noqa: E501 + """billing_service_update_coding_usage_settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.billing_service_update_coding_usage_settings_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V1UpdateCodingUsageSettingsRequest body: (required) + :return: V1UpdateCodingUsageSettingsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method billing_service_update_coding_usage_settings" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `billing_service_update_coding_usage_settings`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing/coding-usage/settings', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1UpdateCodingUsageSettingsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py index 0ee173181..27f808b65 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py @@ -542,224 +542,6 @@ def cloud_space_service_create_cloud_space_with_http_info(self, body: 'CloudSpac _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def cloud_space_service_create_cloud_space_app(self, body: 'V1CloudSpaceApp', **kwargs) -> 'V1CloudSpaceApp': # noqa: E501 - """cloud_space_service_create_cloud_space_app # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_create_cloud_space_app(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param V1CloudSpaceApp body: (required) - :return: V1CloudSpaceApp - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.cloud_space_service_create_cloud_space_app_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.cloud_space_service_create_cloud_space_app_with_http_info(body, **kwargs) # noqa: E501 - return data - - def cloud_space_service_create_cloud_space_app_with_http_info(self, body: 'V1CloudSpaceApp', **kwargs) -> 'V1CloudSpaceApp': # noqa: E501 - """cloud_space_service_create_cloud_space_app # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_create_cloud_space_app_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param V1CloudSpaceApp body: (required) - :return: V1CloudSpaceApp - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method cloud_space_service_create_cloud_space_app" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `cloud_space_service_create_cloud_space_app`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/cloudspaces/apps', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1CloudSpaceApp', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def cloud_space_service_create_cloud_space_app_instance(self, body: 'CloudSpaceServiceCreateCloudSpaceAppInstanceBody', project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'V1CreateCloudSpaceAppInstanceResponse': # noqa: E501 - """cloud_space_service_create_cloud_space_app_instance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_create_cloud_space_app_instance(body, project_id, cloudspace_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CloudSpaceServiceCreateCloudSpaceAppInstanceBody body: (required) - :param str project_id: the project ID the cloudspace lives in. (required) - :param str cloudspace_id: the cloudspace ID the cloudspace app should be run in. (required) - :param str id: the ID of the cloudspace app to run. (required) - :return: V1CreateCloudSpaceAppInstanceResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.cloud_space_service_create_cloud_space_app_instance_with_http_info(body, project_id, cloudspace_id, id, **kwargs) # noqa: E501 - else: - (data) = self.cloud_space_service_create_cloud_space_app_instance_with_http_info(body, project_id, cloudspace_id, id, **kwargs) # noqa: E501 - return data - - def cloud_space_service_create_cloud_space_app_instance_with_http_info(self, body: 'CloudSpaceServiceCreateCloudSpaceAppInstanceBody', project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'V1CreateCloudSpaceAppInstanceResponse': # noqa: E501 - """cloud_space_service_create_cloud_space_app_instance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_create_cloud_space_app_instance_with_http_info(body, project_id, cloudspace_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CloudSpaceServiceCreateCloudSpaceAppInstanceBody body: (required) - :param str project_id: the project ID the cloudspace lives in. (required) - :param str cloudspace_id: the cloudspace ID the cloudspace app should be run in. (required) - :param str id: the ID of the cloudspace app to run. (required) - :return: V1CreateCloudSpaceAppInstanceResponse - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'project_id', 'cloudspace_id', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method cloud_space_service_create_cloud_space_app_instance" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `cloud_space_service_create_cloud_space_app_instance`") # noqa: E501 - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `cloud_space_service_create_cloud_space_app_instance`") # noqa: E501 - # verify the required parameter 'cloudspace_id' is set - if ('cloudspace_id' not in params or - params['cloudspace_id'] is None): - raise ValueError("Missing the required parameter `cloudspace_id` when calling `cloud_space_service_create_cloud_space_app_instance`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_create_cloud_space_app_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'cloudspace_id' in params: - path_params['cloudspaceId'] = params['cloudspace_id'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/cloudspaces/{cloudspaceId}/apps/{id}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1CreateCloudSpaceAppInstanceResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def cloud_space_service_create_cloud_space_instance_metric(self, body: 'CloudSpaceServiceCreateCloudSpaceInstanceMetricBody', project_id: 'str', cloudspace_id: 'str', **kwargs) -> 'V1CreateCloudSpaceInstanceMetricResponse': # noqa: E501 """Endpoint for collecting Studio startup metrics # noqa: E501 @@ -1272,237 +1054,9 @@ def cloud_space_service_create_lightning_run_with_http_info(self, body: 'CloudSp path_params = {} if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'cloudspace_id' in params: - path_params['cloudspaceId'] = params['cloudspace_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/cloudspaces/{cloudspaceId}/runs', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1LightningRun', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def cloud_space_service_create_lightning_run_instance(self, body: 'CloudSpaceServiceCreateLightningRunInstanceBody', project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance': # noqa: E501 - """cloud_space_service_create_lightning_run_instance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_create_lightning_run_instance(body, project_id, cloudspace_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CloudSpaceServiceCreateLightningRunInstanceBody body: (required) - :param str project_id: (required) - :param str cloudspace_id: (required) - :param str id: (required) - :return: Externalv1LightningappInstance - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.cloud_space_service_create_lightning_run_instance_with_http_info(body, project_id, cloudspace_id, id, **kwargs) # noqa: E501 - else: - (data) = self.cloud_space_service_create_lightning_run_instance_with_http_info(body, project_id, cloudspace_id, id, **kwargs) # noqa: E501 - return data - - def cloud_space_service_create_lightning_run_instance_with_http_info(self, body: 'CloudSpaceServiceCreateLightningRunInstanceBody', project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance': # noqa: E501 - """cloud_space_service_create_lightning_run_instance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_create_lightning_run_instance_with_http_info(body, project_id, cloudspace_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CloudSpaceServiceCreateLightningRunInstanceBody body: (required) - :param str project_id: (required) - :param str cloudspace_id: (required) - :param str id: (required) - :return: Externalv1LightningappInstance - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'project_id', 'cloudspace_id', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method cloud_space_service_create_lightning_run_instance" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `cloud_space_service_create_lightning_run_instance`") # noqa: E501 - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `cloud_space_service_create_lightning_run_instance`") # noqa: E501 - # verify the required parameter 'cloudspace_id' is set - if ('cloudspace_id' not in params or - params['cloudspace_id'] is None): - raise ValueError("Missing the required parameter `cloudspace_id` when calling `cloud_space_service_create_lightning_run_instance`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_create_lightning_run_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'cloudspace_id' in params: - path_params['cloudspaceId'] = params['cloudspace_id'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/cloudspaces/{cloudspaceId}/runs/{id}/get', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Externalv1LightningappInstance', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def cloud_space_service_delete_cloud_space(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteCloudSpaceResponse': # noqa: E501 - """cloud_space_service_delete_cloud_space # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_delete_cloud_space(project_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str project_id: (required) - :param str id: (required) - :return: V1DeleteCloudSpaceResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.cloud_space_service_delete_cloud_space_with_http_info(project_id, id, **kwargs) # noqa: E501 - else: - (data) = self.cloud_space_service_delete_cloud_space_with_http_info(project_id, id, **kwargs) # noqa: E501 - return data - - def cloud_space_service_delete_cloud_space_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteCloudSpaceResponse': # noqa: E501 - """cloud_space_service_delete_cloud_space # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_delete_cloud_space_with_http_info(project_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str project_id: (required) - :param str id: (required) - :return: V1DeleteCloudSpaceResponse - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['project_id', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method cloud_space_service_delete_cloud_space" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `cloud_space_service_delete_cloud_space`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_delete_cloud_space`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'cloudspace_id' in params: + path_params['cloudspaceId'] = params['cloudspace_id'] # noqa: E501 query_params = [] @@ -1512,22 +1066,28 @@ def cloud_space_service_delete_cloud_space_with_http_info(self, project_id: 'str local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v1/projects/{projectId}/cloudspaces/{id}', 'DELETE', + '/v1/projects/{projectId}/cloudspaces/{cloudspaceId}/runs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DeleteCloudSpaceResponse', # noqa: E501 + response_type='V1LightningRun', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1535,43 +1095,45 @@ def cloud_space_service_delete_cloud_space_with_http_info(self, project_id: 'str _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def cloud_space_service_delete_cloud_space_app(self, id: 'str', **kwargs) -> 'V1DeleteCloudSpaceAppResponse': # noqa: E501 - """cloud_space_service_delete_cloud_space_app # noqa: E501 + def cloud_space_service_delete_cloud_space(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteCloudSpaceResponse': # noqa: E501 + """cloud_space_service_delete_cloud_space # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_delete_cloud_space_app(id, async_req=True) + >>> thread = api.cloud_space_service_delete_cloud_space(project_id, id, async_req=True) >>> result = thread.get() :param async_req bool + :param str project_id: (required) :param str id: (required) - :return: V1DeleteCloudSpaceAppResponse + :return: V1DeleteCloudSpaceResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.cloud_space_service_delete_cloud_space_app_with_http_info(id, **kwargs) # noqa: E501 + return self.cloud_space_service_delete_cloud_space_with_http_info(project_id, id, **kwargs) # noqa: E501 else: - (data) = self.cloud_space_service_delete_cloud_space_app_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.cloud_space_service_delete_cloud_space_with_http_info(project_id, id, **kwargs) # noqa: E501 return data - def cloud_space_service_delete_cloud_space_app_with_http_info(self, id: 'str', **kwargs) -> 'V1DeleteCloudSpaceAppResponse': # noqa: E501 - """cloud_space_service_delete_cloud_space_app # noqa: E501 + def cloud_space_service_delete_cloud_space_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteCloudSpaceResponse': # noqa: E501 + """cloud_space_service_delete_cloud_space # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_delete_cloud_space_app_with_http_info(id, async_req=True) + >>> thread = api.cloud_space_service_delete_cloud_space_with_http_info(project_id, id, async_req=True) >>> result = thread.get() :param async_req bool + :param str project_id: (required) :param str id: (required) - :return: V1DeleteCloudSpaceAppResponse + :return: V1DeleteCloudSpaceResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['id'] # noqa: E501 + all_params = ['project_id', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1582,18 +1144,24 @@ def cloud_space_service_delete_cloud_space_app_with_http_info(self, id: 'str', * if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method cloud_space_service_delete_cloud_space_app" % key + " to method cloud_space_service_delete_cloud_space" % key ) params[key] = val del params['kwargs'] + # verify the required parameter 'project_id' is set + if ('project_id' not in params or + params['project_id'] is None): + raise ValueError("Missing the required parameter `project_id` when calling `cloud_space_service_delete_cloud_space`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_delete_cloud_space_app`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_delete_cloud_space`") # noqa: E501 collection_formats = {} path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 @@ -1613,14 +1181,14 @@ def cloud_space_service_delete_cloud_space_app_with_http_info(self, id: 'str', * auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v1/cloudspaces/apps/{id}', 'DELETE', + '/v1/projects/{projectId}/cloudspaces/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DeleteCloudSpaceAppResponse', # noqa: E501 + response_type='V1DeleteCloudSpaceResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2492,244 +2060,16 @@ def cloud_space_service_execute_plugin_with_http_info(self, project_id: 'str', i path_params['projectId'] = params['project_id'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 - if 'plugin_id' in params: - path_params['pluginId'] = params['plugin_id'] # noqa: E501 - - query_params = [] - if 'state' in params: - query_params.append(('state', params['state'])) # noqa: E501 - if 'error' in params: - query_params.append(('error', params['error'])) # noqa: E501 - if 'additional_info' in params: - query_params.append(('additionalInfo', params['additional_info'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/cloudspaces/{id}/plugins/{pluginId}/execute', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Plugin', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def cloud_space_service_fork_cloud_space(self, body: 'CloudSpaceServiceForkCloudSpaceBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace': # noqa: E501 - """cloud_space_service_fork_cloud_space # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_fork_cloud_space(body, project_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CloudSpaceServiceForkCloudSpaceBody body: (required) - :param str project_id: source project ID (required) - :param str id: source studio ID (required) - :return: V1CloudSpace - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.cloud_space_service_fork_cloud_space_with_http_info(body, project_id, id, **kwargs) # noqa: E501 - else: - (data) = self.cloud_space_service_fork_cloud_space_with_http_info(body, project_id, id, **kwargs) # noqa: E501 - return data - - def cloud_space_service_fork_cloud_space_with_http_info(self, body: 'CloudSpaceServiceForkCloudSpaceBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace': # noqa: E501 - """cloud_space_service_fork_cloud_space # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_fork_cloud_space_with_http_info(body, project_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CloudSpaceServiceForkCloudSpaceBody body: (required) - :param str project_id: source project ID (required) - :param str id: source studio ID (required) - :return: V1CloudSpace - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'project_id', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method cloud_space_service_fork_cloud_space" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `cloud_space_service_fork_cloud_space`") # noqa: E501 - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `cloud_space_service_fork_cloud_space`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_fork_cloud_space`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/cloudspaces/{id}/fork', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1CloudSpace', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def cloud_space_service_fork_cloud_space_app_instance(self, body: 'CloudSpaceServiceForkCloudSpaceAppInstanceBody', project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance': # noqa: E501 - """cloud_space_service_fork_cloud_space_app_instance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_fork_cloud_space_app_instance(body, project_id, cloudspace_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CloudSpaceServiceForkCloudSpaceAppInstanceBody body: (required) - :param str project_id: (required) - :param str cloudspace_id: (required) - :param str id: (required) - :return: Externalv1LightningappInstance - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.cloud_space_service_fork_cloud_space_app_instance_with_http_info(body, project_id, cloudspace_id, id, **kwargs) # noqa: E501 - else: - (data) = self.cloud_space_service_fork_cloud_space_app_instance_with_http_info(body, project_id, cloudspace_id, id, **kwargs) # noqa: E501 - return data - - def cloud_space_service_fork_cloud_space_app_instance_with_http_info(self, body: 'CloudSpaceServiceForkCloudSpaceAppInstanceBody', project_id: 'str', cloudspace_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance': # noqa: E501 - """cloud_space_service_fork_cloud_space_app_instance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_fork_cloud_space_app_instance_with_http_info(body, project_id, cloudspace_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CloudSpaceServiceForkCloudSpaceAppInstanceBody body: (required) - :param str project_id: (required) - :param str cloudspace_id: (required) - :param str id: (required) - :return: Externalv1LightningappInstance - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'project_id', 'cloudspace_id', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method cloud_space_service_fork_cloud_space_app_instance" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `cloud_space_service_fork_cloud_space_app_instance`") # noqa: E501 - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `cloud_space_service_fork_cloud_space_app_instance`") # noqa: E501 - # verify the required parameter 'cloudspace_id' is set - if ('cloudspace_id' not in params or - params['cloudspace_id'] is None): - raise ValueError("Missing the required parameter `cloudspace_id` when calling `cloud_space_service_fork_cloud_space_app_instance`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_fork_cloud_space_app_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'cloudspace_id' in params: - path_params['cloudspaceId'] = params['cloudspace_id'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + if 'plugin_id' in params: + path_params['pluginId'] = params['plugin_id'] # noqa: E501 query_params = [] + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'error' in params: + query_params.append(('error', params['error'])) # noqa: E501 + if 'additional_info' in params: + query_params.append(('additionalInfo', params['additional_info'])) # noqa: E501 header_params = {} @@ -2737,28 +2077,22 @@ def cloud_space_service_fork_cloud_space_app_instance_with_http_info(self, body: local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v1/projects/{projectId}/cloudspaces/{cloudspaceId}/apps/{id}/fork', 'PUT', + '/v1/projects/{projectId}/cloudspaces/{id}/plugins/{pluginId}/execute', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Externalv1LightningappInstance', # noqa: E501 + response_type='V1Plugin', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2766,45 +2100,47 @@ def cloud_space_service_fork_cloud_space_app_instance_with_http_info(self, body: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def cloud_space_service_get_cloud_space(self, project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace': # noqa: E501 - """cloud_space_service_get_cloud_space # noqa: E501 + def cloud_space_service_fork_cloud_space(self, body: 'CloudSpaceServiceForkCloudSpaceBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace': # noqa: E501 + """cloud_space_service_fork_cloud_space # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_get_cloud_space(project_id, id, async_req=True) + >>> thread = api.cloud_space_service_fork_cloud_space(body, project_id, id, async_req=True) >>> result = thread.get() :param async_req bool - :param str project_id: (required) - :param str id: (required) + :param CloudSpaceServiceForkCloudSpaceBody body: (required) + :param str project_id: source project ID (required) + :param str id: source studio ID (required) :return: V1CloudSpace If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.cloud_space_service_get_cloud_space_with_http_info(project_id, id, **kwargs) # noqa: E501 + return self.cloud_space_service_fork_cloud_space_with_http_info(body, project_id, id, **kwargs) # noqa: E501 else: - (data) = self.cloud_space_service_get_cloud_space_with_http_info(project_id, id, **kwargs) # noqa: E501 + (data) = self.cloud_space_service_fork_cloud_space_with_http_info(body, project_id, id, **kwargs) # noqa: E501 return data - def cloud_space_service_get_cloud_space_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace': # noqa: E501 - """cloud_space_service_get_cloud_space # noqa: E501 + def cloud_space_service_fork_cloud_space_with_http_info(self, body: 'CloudSpaceServiceForkCloudSpaceBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace': # noqa: E501 + """cloud_space_service_fork_cloud_space # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_get_cloud_space_with_http_info(project_id, id, async_req=True) + >>> thread = api.cloud_space_service_fork_cloud_space_with_http_info(body, project_id, id, async_req=True) >>> result = thread.get() :param async_req bool - :param str project_id: (required) - :param str id: (required) + :param CloudSpaceServiceForkCloudSpaceBody body: (required) + :param str project_id: source project ID (required) + :param str id: source studio ID (required) :return: V1CloudSpace If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'id'] # noqa: E501 + all_params = ['body', 'project_id', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2815,18 +2151,22 @@ def cloud_space_service_get_cloud_space_with_http_info(self, project_id: 'str', if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method cloud_space_service_get_cloud_space" % key + " to method cloud_space_service_fork_cloud_space" % key ) params[key] = val del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `cloud_space_service_fork_cloud_space`") # noqa: E501 # verify the required parameter 'project_id' is set if ('project_id' not in params or params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `cloud_space_service_get_cloud_space`") # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `cloud_space_service_fork_cloud_space`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_get_cloud_space`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_fork_cloud_space`") # noqa: E501 collection_formats = {} @@ -2844,15 +2184,21 @@ def cloud_space_service_get_cloud_space_with_http_info(self, project_id: 'str', local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v1/projects/{projectId}/cloudspaces/{id}', 'GET', + '/v1/projects/{projectId}/cloudspaces/{id}/fork', 'PUT', path_params, query_params, header_params, @@ -2867,43 +2213,45 @@ def cloud_space_service_get_cloud_space_with_http_info(self, project_id: 'str', _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def cloud_space_service_get_cloud_space_app(self, id: 'str', **kwargs) -> 'V1CloudSpaceApp': # noqa: E501 - """cloud_space_service_get_cloud_space_app # noqa: E501 + def cloud_space_service_get_cloud_space(self, project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace': # noqa: E501 + """cloud_space_service_get_cloud_space # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_get_cloud_space_app(id, async_req=True) + >>> thread = api.cloud_space_service_get_cloud_space(project_id, id, async_req=True) >>> result = thread.get() :param async_req bool + :param str project_id: (required) :param str id: (required) - :return: V1CloudSpaceApp + :return: V1CloudSpace If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.cloud_space_service_get_cloud_space_app_with_http_info(id, **kwargs) # noqa: E501 + return self.cloud_space_service_get_cloud_space_with_http_info(project_id, id, **kwargs) # noqa: E501 else: - (data) = self.cloud_space_service_get_cloud_space_app_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.cloud_space_service_get_cloud_space_with_http_info(project_id, id, **kwargs) # noqa: E501 return data - def cloud_space_service_get_cloud_space_app_with_http_info(self, id: 'str', **kwargs) -> 'V1CloudSpaceApp': # noqa: E501 - """cloud_space_service_get_cloud_space_app # noqa: E501 + def cloud_space_service_get_cloud_space_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpace': # noqa: E501 + """cloud_space_service_get_cloud_space # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_get_cloud_space_app_with_http_info(id, async_req=True) + >>> thread = api.cloud_space_service_get_cloud_space_with_http_info(project_id, id, async_req=True) >>> result = thread.get() :param async_req bool + :param str project_id: (required) :param str id: (required) - :return: V1CloudSpaceApp + :return: V1CloudSpace If the method is called asynchronously, returns the request thread. """ - all_params = ['id'] # noqa: E501 + all_params = ['project_id', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2914,18 +2262,24 @@ def cloud_space_service_get_cloud_space_app_with_http_info(self, id: 'str', **kw if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method cloud_space_service_get_cloud_space_app" % key + " to method cloud_space_service_get_cloud_space" % key ) params[key] = val del params['kwargs'] + # verify the required parameter 'project_id' is set + if ('project_id' not in params or + params['project_id'] is None): + raise ValueError("Missing the required parameter `project_id` when calling `cloud_space_service_get_cloud_space`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_get_cloud_space_app`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_get_cloud_space`") # noqa: E501 collection_formats = {} path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 @@ -2945,14 +2299,14 @@ def cloud_space_service_get_cloud_space_app_with_http_info(self, id: 'str', **kw auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v1/cloudspaces/apps/{id}', 'GET', + '/v1/projects/{projectId}/cloudspaces/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CloudSpaceApp', # noqa: E501 + response_type='V1CloudSpace', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -5153,103 +4507,6 @@ def cloud_space_service_list_available_plugins_with_http_info(self, **kwargs) -> _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def cloud_space_service_list_cloud_space_apps(self, **kwargs) -> 'V1ListCloudSpaceAppsResponse': # noqa: E501 - """cloud_space_service_list_cloud_space_apps # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_list_cloud_space_apps(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: - :param str project_id: - :param str user_id: - :return: V1ListCloudSpaceAppsResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.cloud_space_service_list_cloud_space_apps_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.cloud_space_service_list_cloud_space_apps_with_http_info(**kwargs) # noqa: E501 - return data - - def cloud_space_service_list_cloud_space_apps_with_http_info(self, **kwargs) -> 'V1ListCloudSpaceAppsResponse': # noqa: E501 - """cloud_space_service_list_cloud_space_apps # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_list_cloud_space_apps_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: - :param str project_id: - :param str user_id: - :return: V1ListCloudSpaceAppsResponse - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['org_id', 'project_id', 'user_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method cloud_space_service_list_cloud_space_apps" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'org_id' in params: - query_params.append(('orgId', params['org_id'])) # noqa: E501 - if 'project_id' in params: - query_params.append(('projectId', params['project_id'])) # noqa: E501 - if 'user_id' in params: - query_params.append(('userId', params['user_id'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/cloudspaces/apps', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1ListCloudSpaceAppsResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def cloud_space_service_list_cloud_space_cold_start_metrics(self, project_id: 'str', **kwargs) -> 'V1ListCloudSpaceColdStartMetricsResponse': # noqa: E501 """cloud_space_service_list_cloud_space_cold_start_metrics # noqa: E501 @@ -8414,111 +7671,6 @@ def cloud_space_service_update_cloud_space_with_http_info(self, body: 'CloudSpac _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def cloud_space_service_update_cloud_space_app(self, body: 'CloudSpaceServiceUpdateCloudSpaceAppBody', id: 'str', **kwargs) -> 'V1CloudSpaceApp': # noqa: E501 - """cloud_space_service_update_cloud_space_app # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_update_cloud_space_app(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CloudSpaceServiceUpdateCloudSpaceAppBody body: (required) - :param str id: (required) - :return: V1CloudSpaceApp - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.cloud_space_service_update_cloud_space_app_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.cloud_space_service_update_cloud_space_app_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def cloud_space_service_update_cloud_space_app_with_http_info(self, body: 'CloudSpaceServiceUpdateCloudSpaceAppBody', id: 'str', **kwargs) -> 'V1CloudSpaceApp': # noqa: E501 - """cloud_space_service_update_cloud_space_app # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.cloud_space_service_update_cloud_space_app_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CloudSpaceServiceUpdateCloudSpaceAppBody body: (required) - :param str id: (required) - :return: V1CloudSpaceApp - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method cloud_space_service_update_cloud_space_app" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `cloud_space_service_update_cloud_space_app`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_update_cloud_space_app`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/cloudspaces/apps/{id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1CloudSpaceApp', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def cloud_space_service_update_cloud_space_collab(self, body: 'CloudSpaceServiceUpdateCloudSpaceCollabBody', project_id: 'str', id: 'str', **kwargs) -> 'V1UpdateCloudSpaceCollabResponse': # noqa: E501 """cloud_space_service_update_cloud_space_collab # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py index 4873d4dab..5c8a4e0b3 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py @@ -3457,6 +3457,103 @@ def cluster_service_get_cluster_credentials_with_http_info(self, **kwargs) -> 'V _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def cluster_service_get_cluster_details(self, cluster_id: 'str', **kwargs) -> 'V1GetClusterDetailsResponse': # noqa: E501 + """GetClusterDetails is internal-only: placement (machine vs GCP burst), pending/unscheduled creates, and shadow-reservation utilization. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_get_cluster_details(cluster_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str cluster_id: (required) + :param str org_id: + :return: V1GetClusterDetailsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.cluster_service_get_cluster_details_with_http_info(cluster_id, **kwargs) # noqa: E501 + else: + (data) = self.cluster_service_get_cluster_details_with_http_info(cluster_id, **kwargs) # noqa: E501 + return data + + def cluster_service_get_cluster_details_with_http_info(self, cluster_id: 'str', **kwargs) -> 'V1GetClusterDetailsResponse': # noqa: E501 + """GetClusterDetails is internal-only: placement (machine vs GCP burst), pending/unscheduled creates, and shadow-reservation utilization. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_get_cluster_details_with_http_info(cluster_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str cluster_id: (required) + :param str org_id: + :return: V1GetClusterDetailsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['cluster_id', 'org_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method cluster_service_get_cluster_details" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'cluster_id' is set + if ('cluster_id' not in params or + params['cluster_id'] is None): + raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_get_cluster_details`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'cluster_id' in params: + path_params['clusterId'] = params['cluster_id'] # noqa: E501 + + query_params = [] + if 'org_id' in params: + query_params.append(('orgId', params['org_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/core/clusters/{clusterId}/details', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1GetClusterDetailsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def cluster_service_get_cluster_health(self, id: 'str', **kwargs) -> 'V1GetClusterHealthResponse': # noqa: E501 """cluster_service_get_cluster_health # noqa: E501 @@ -3550,6 +3647,123 @@ def cluster_service_get_cluster_health_with_http_info(self, id: 'str', **kwargs) _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def cluster_service_get_cluster_reservation_usage(self, org_id: 'str', cluster_id: 'str', reservation_id: 'str', **kwargs) -> 'V1GetClusterReservationUsageResponse': # noqa: E501 + """cluster_service_get_cluster_reservation_usage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_get_cluster_reservation_usage(org_id, cluster_id, reservation_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: (required) + :param str cluster_id: (required) + :param str reservation_id: (required) + :param datetime start_time: + :param datetime end_time: + :return: V1GetClusterReservationUsageResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.cluster_service_get_cluster_reservation_usage_with_http_info(org_id, cluster_id, reservation_id, **kwargs) # noqa: E501 + else: + (data) = self.cluster_service_get_cluster_reservation_usage_with_http_info(org_id, cluster_id, reservation_id, **kwargs) # noqa: E501 + return data + + def cluster_service_get_cluster_reservation_usage_with_http_info(self, org_id: 'str', cluster_id: 'str', reservation_id: 'str', **kwargs) -> 'V1GetClusterReservationUsageResponse': # noqa: E501 + """cluster_service_get_cluster_reservation_usage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_get_cluster_reservation_usage_with_http_info(org_id, cluster_id, reservation_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: (required) + :param str cluster_id: (required) + :param str reservation_id: (required) + :param datetime start_time: + :param datetime end_time: + :return: V1GetClusterReservationUsageResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org_id', 'cluster_id', 'reservation_id', 'start_time', 'end_time'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method cluster_service_get_cluster_reservation_usage" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org_id' is set + if ('org_id' not in params or + params['org_id'] is None): + raise ValueError("Missing the required parameter `org_id` when calling `cluster_service_get_cluster_reservation_usage`") # noqa: E501 + # verify the required parameter 'cluster_id' is set + if ('cluster_id' not in params or + params['cluster_id'] is None): + raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_get_cluster_reservation_usage`") # noqa: E501 + # verify the required parameter 'reservation_id' is set + if ('reservation_id' not in params or + params['reservation_id'] is None): + raise ValueError("Missing the required parameter `reservation_id` when calling `cluster_service_get_cluster_reservation_usage`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org_id' in params: + path_params['orgId'] = params['org_id'] # noqa: E501 + if 'cluster_id' in params: + path_params['clusterId'] = params['cluster_id'] # noqa: E501 + if 'reservation_id' in params: + path_params['reservationId'] = params['reservation_id'] # noqa: E501 + + query_params = [] + if 'start_time' in params: + query_params.append(('startTime', params['start_time'])) # noqa: E501 + if 'end_time' in params: + query_params.append(('endTime', params['end_time'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/orgs/{orgId}/clusters/{clusterId}/capacity-reservations/{reservationId}/usage', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1GetClusterReservationUsageResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def cluster_service_get_machine(self, cluster_id: 'str', id: 'str', **kwargs) -> 'V1GetMachineResponse': # noqa: E501 """List machines with optional filtering # noqa: E501 @@ -3764,6 +3978,103 @@ def cluster_service_get_machine_details_with_http_info(self, cluster_id: 'str', _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def cluster_service_get_machine_setup_url(self, cluster_id: 'str', **kwargs) -> 'V1GetMachineSetupURLResponse': # noqa: E501 + """Mints the short-lived user token the machine setup script is fetched with. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_get_machine_setup_url(cluster_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str cluster_id: (required) + :param str org_id: Optional. When set, the cluster must belong to this organization. + :return: V1GetMachineSetupURLResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.cluster_service_get_machine_setup_url_with_http_info(cluster_id, **kwargs) # noqa: E501 + else: + (data) = self.cluster_service_get_machine_setup_url_with_http_info(cluster_id, **kwargs) # noqa: E501 + return data + + def cluster_service_get_machine_setup_url_with_http_info(self, cluster_id: 'str', **kwargs) -> 'V1GetMachineSetupURLResponse': # noqa: E501 + """Mints the short-lived user token the machine setup script is fetched with. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_get_machine_setup_url_with_http_info(cluster_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str cluster_id: (required) + :param str org_id: Optional. When set, the cluster must belong to this organization. + :return: V1GetMachineSetupURLResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['cluster_id', 'org_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method cluster_service_get_machine_setup_url" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'cluster_id' is set + if ('cluster_id' not in params or + params['cluster_id'] is None): + raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_get_machine_setup_url`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'cluster_id' in params: + path_params['clusterId'] = params['cluster_id'] # noqa: E501 + + query_params = [] + if 'org_id' in params: + query_params.append(('orgId', params['org_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/core/clusters/{clusterId}/machine-setup-url', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1GetMachineSetupURLResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def cluster_service_get_machine_system_metrics(self, cluster_id: 'str', machine_id: 'str', **kwargs) -> 'V1GetMachineSystemMetricsResponse': # noqa: E501 """cluster_service_get_machine_system_metrics # noqa: E501 @@ -4636,6 +4947,107 @@ def cluster_service_list_cluster_proxies_with_http_info(self, cluster_id: 'str', _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def cluster_service_list_cluster_reservations_for_usage(self, org_id: 'str', cluster_id: 'str', **kwargs) -> 'V1ListClusterReservationsForUsageResponse': # noqa: E501 + """cluster_service_list_cluster_reservations_for_usage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_list_cluster_reservations_for_usage(org_id, cluster_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: (required) + :param str cluster_id: (required) + :return: V1ListClusterReservationsForUsageResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.cluster_service_list_cluster_reservations_for_usage_with_http_info(org_id, cluster_id, **kwargs) # noqa: E501 + else: + (data) = self.cluster_service_list_cluster_reservations_for_usage_with_http_info(org_id, cluster_id, **kwargs) # noqa: E501 + return data + + def cluster_service_list_cluster_reservations_for_usage_with_http_info(self, org_id: 'str', cluster_id: 'str', **kwargs) -> 'V1ListClusterReservationsForUsageResponse': # noqa: E501 + """cluster_service_list_cluster_reservations_for_usage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_list_cluster_reservations_for_usage_with_http_info(org_id, cluster_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: (required) + :param str cluster_id: (required) + :return: V1ListClusterReservationsForUsageResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org_id', 'cluster_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method cluster_service_list_cluster_reservations_for_usage" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org_id' is set + if ('org_id' not in params or + params['org_id'] is None): + raise ValueError("Missing the required parameter `org_id` when calling `cluster_service_list_cluster_reservations_for_usage`") # noqa: E501 + # verify the required parameter 'cluster_id' is set + if ('cluster_id' not in params or + params['cluster_id'] is None): + raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_list_cluster_reservations_for_usage`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org_id' in params: + path_params['orgId'] = params['org_id'] # noqa: E501 + if 'cluster_id' in params: + path_params['clusterId'] = params['cluster_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/orgs/{orgId}/clusters/{clusterId}/reservation-usage', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1ListClusterReservationsForUsageResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def cluster_service_list_cluster_usage_restrictions(self, cluster_id: 'str', **kwargs) -> 'V1ListClusterUsageRestrictionsResponse': # noqa: E501 """cluster_service_list_cluster_usage_restrictions # noqa: E501 @@ -5264,39 +5676,142 @@ def cluster_service_list_project_cluster_accelerators(self, project_id: 'str', i :param async_req bool :param str project_id: (required) - :param str id: (required) - :param bool enabled_only: - :param str region: - :return: V1ListProjectClusterAcceleratorsResponse + :param str id: (required) + :param bool enabled_only: + :param str region: + :return: V1ListProjectClusterAcceleratorsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.cluster_service_list_project_cluster_accelerators_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.cluster_service_list_project_cluster_accelerators_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def cluster_service_list_project_cluster_accelerators_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1ListProjectClusterAcceleratorsResponse': # noqa: E501 + """cluster_service_list_project_cluster_accelerators # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_list_project_cluster_accelerators_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param bool enabled_only: + :param str region: + :return: V1ListProjectClusterAcceleratorsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'enabled_only', 'region'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method cluster_service_list_project_cluster_accelerators" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if ('project_id' not in params or + params['project_id'] is None): + raise ValueError("Missing the required parameter `project_id` when calling `cluster_service_list_project_cluster_accelerators`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `cluster_service_list_project_cluster_accelerators`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'enabled_only' in params: + query_params.append(('enabledOnly', params['enabled_only'])) # noqa: E501 + if 'region' in params: + query_params.append(('region', params['region'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/clusters/{id}/accelerators', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1ListProjectClusterAcceleratorsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def cluster_service_list_project_clusters(self, project_id: 'str', **kwargs) -> 'V1ListProjectClustersResponse': # noqa: E501 + """cluster_service_list_project_clusters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_list_project_clusters(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :return: V1ListProjectClustersResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.cluster_service_list_project_cluster_accelerators_with_http_info(project_id, id, **kwargs) # noqa: E501 + return self.cluster_service_list_project_clusters_with_http_info(project_id, **kwargs) # noqa: E501 else: - (data) = self.cluster_service_list_project_cluster_accelerators_with_http_info(project_id, id, **kwargs) # noqa: E501 + (data) = self.cluster_service_list_project_clusters_with_http_info(project_id, **kwargs) # noqa: E501 return data - def cluster_service_list_project_cluster_accelerators_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1ListProjectClusterAcceleratorsResponse': # noqa: E501 - """cluster_service_list_project_cluster_accelerators # noqa: E501 + def cluster_service_list_project_clusters_with_http_info(self, project_id: 'str', **kwargs) -> 'V1ListProjectClustersResponse': # noqa: E501 + """cluster_service_list_project_clusters # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.cluster_service_list_project_cluster_accelerators_with_http_info(project_id, id, async_req=True) + >>> thread = api.cluster_service_list_project_clusters_with_http_info(project_id, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param str id: (required) - :param bool enabled_only: - :param str region: - :return: V1ListProjectClusterAcceleratorsResponse + :return: V1ListProjectClustersResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'id', 'enabled_only', 'region'] # noqa: E501 + all_params = ['project_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -5307,32 +5822,22 @@ def cluster_service_list_project_cluster_accelerators_with_http_info(self, proje if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method cluster_service_list_project_cluster_accelerators" % key + " to method cluster_service_list_project_clusters" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'project_id' is set if ('project_id' not in params or params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `cluster_service_list_project_cluster_accelerators`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `cluster_service_list_project_cluster_accelerators`") # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `cluster_service_list_project_clusters`") # noqa: E501 collection_formats = {} path_params = {} if 'project_id' in params: path_params['projectId'] = params['project_id'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'enabled_only' in params: - query_params.append(('enabledOnly', params['enabled_only'])) # noqa: E501 - if 'region' in params: - query_params.append(('region', params['region'])) # noqa: E501 header_params = {} @@ -5348,14 +5853,14 @@ def cluster_service_list_project_cluster_accelerators_with_http_info(self, proje auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v1/projects/{projectId}/clusters/{id}/accelerators', 'GET', + '/v1/projects/{projectId}/clusters', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ListProjectClusterAcceleratorsResponse', # noqa: E501 + response_type='V1ListProjectClustersResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -5363,43 +5868,47 @@ def cluster_service_list_project_cluster_accelerators_with_http_info(self, proje _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def cluster_service_list_project_clusters(self, project_id: 'str', **kwargs) -> 'V1ListProjectClustersResponse': # noqa: E501 - """cluster_service_list_project_clusters # noqa: E501 + def cluster_service_list_provider_fleet(self, cluster_id: 'str', **kwargs) -> 'V1ListProviderFleetResponse': # noqa: E501 + """cluster_service_list_provider_fleet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.cluster_service_list_project_clusters(project_id, async_req=True) + >>> thread = api.cluster_service_list_provider_fleet(cluster_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str project_id: (required) - :return: V1ListProjectClustersResponse + :param str cluster_id: (required) + :param str org_id: + :param int history_days: + :return: V1ListProviderFleetResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.cluster_service_list_project_clusters_with_http_info(project_id, **kwargs) # noqa: E501 + return self.cluster_service_list_provider_fleet_with_http_info(cluster_id, **kwargs) # noqa: E501 else: - (data) = self.cluster_service_list_project_clusters_with_http_info(project_id, **kwargs) # noqa: E501 + (data) = self.cluster_service_list_provider_fleet_with_http_info(cluster_id, **kwargs) # noqa: E501 return data - def cluster_service_list_project_clusters_with_http_info(self, project_id: 'str', **kwargs) -> 'V1ListProjectClustersResponse': # noqa: E501 - """cluster_service_list_project_clusters # noqa: E501 + def cluster_service_list_provider_fleet_with_http_info(self, cluster_id: 'str', **kwargs) -> 'V1ListProviderFleetResponse': # noqa: E501 + """cluster_service_list_provider_fleet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.cluster_service_list_project_clusters_with_http_info(project_id, async_req=True) + >>> thread = api.cluster_service_list_provider_fleet_with_http_info(cluster_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str project_id: (required) - :return: V1ListProjectClustersResponse + :param str cluster_id: (required) + :param str org_id: + :param int history_days: + :return: V1ListProviderFleetResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id'] # noqa: E501 + all_params = ['cluster_id', 'org_id', 'history_days'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -5410,22 +5919,26 @@ def cluster_service_list_project_clusters_with_http_info(self, project_id: 'str' if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method cluster_service_list_project_clusters" % key + " to method cluster_service_list_provider_fleet" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `cluster_service_list_project_clusters`") # noqa: E501 + # verify the required parameter 'cluster_id' is set + if ('cluster_id' not in params or + params['cluster_id'] is None): + raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_list_provider_fleet`") # noqa: E501 collection_formats = {} path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 + if 'cluster_id' in params: + path_params['clusterId'] = params['cluster_id'] # noqa: E501 query_params = [] + if 'org_id' in params: + query_params.append(('orgId', params['org_id'])) # noqa: E501 + if 'history_days' in params: + query_params.append(('historyDays', params['history_days'])) # noqa: E501 header_params = {} @@ -5441,14 +5954,14 @@ def cluster_service_list_project_clusters_with_http_info(self, project_id: 'str' auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/v1/projects/{projectId}/clusters', 'GET', + '/v1/core/clusters/{clusterId}/provider-fleet', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ListProjectClustersResponse', # noqa: E501 + response_type='V1ListProviderFleetResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -6659,6 +7172,119 @@ def cluster_service_server_check_in_with_http_info(self, body: 'ClusterServiceSe _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def cluster_service_set_machine_vpn_services(self, body: 'ClusterServiceSetMachineVPNServicesBody', cluster_id: 'str', id: 'str', **kwargs) -> 'V1SetMachineVPNServicesResponse': # noqa: E501 + """SetMachineVPNServices starts or stops strongSwan and FRR on a VPN gateway. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_set_machine_vpn_services(body, cluster_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ClusterServiceSetMachineVPNServicesBody body: (required) + :param str cluster_id: (required) + :param str id: (required) + :return: V1SetMachineVPNServicesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.cluster_service_set_machine_vpn_services_with_http_info(body, cluster_id, id, **kwargs) # noqa: E501 + else: + (data) = self.cluster_service_set_machine_vpn_services_with_http_info(body, cluster_id, id, **kwargs) # noqa: E501 + return data + + def cluster_service_set_machine_vpn_services_with_http_info(self, body: 'ClusterServiceSetMachineVPNServicesBody', cluster_id: 'str', id: 'str', **kwargs) -> 'V1SetMachineVPNServicesResponse': # noqa: E501 + """SetMachineVPNServices starts or stops strongSwan and FRR on a VPN gateway. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_set_machine_vpn_services_with_http_info(body, cluster_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ClusterServiceSetMachineVPNServicesBody body: (required) + :param str cluster_id: (required) + :param str id: (required) + :return: V1SetMachineVPNServicesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'cluster_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method cluster_service_set_machine_vpn_services" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `cluster_service_set_machine_vpn_services`") # noqa: E501 + # verify the required parameter 'cluster_id' is set + if ('cluster_id' not in params or + params['cluster_id'] is None): + raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_set_machine_vpn_services`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `cluster_service_set_machine_vpn_services`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'cluster_id' in params: + path_params['clusterId'] = params['cluster_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/core/clusters/{clusterId}/machines/{id}/vpn', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1SetMachineVPNServicesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def cluster_service_sleep_server(self, body: 'ClusterServiceSleepServerBody', server_id: 'str', **kwargs) -> 'V1SleepServerResponse': # noqa: E501 """cluster_service_sleep_server # noqa: E501 @@ -7729,6 +8355,119 @@ def cluster_service_update_project_cluster_accelerators_with_http_info(self, pro _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def cluster_service_update_provider_fleet_owner(self, body: 'ClusterServiceUpdateProviderFleetOwnerBody', cluster_id: 'str', node_id: 'str', **kwargs) -> 'V1ProviderFleetOwner': # noqa: E501 + """cluster_service_update_provider_fleet_owner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_update_provider_fleet_owner(body, cluster_id, node_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ClusterServiceUpdateProviderFleetOwnerBody body: (required) + :param str cluster_id: (required) + :param str node_id: (required) + :return: V1ProviderFleetOwner + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.cluster_service_update_provider_fleet_owner_with_http_info(body, cluster_id, node_id, **kwargs) # noqa: E501 + else: + (data) = self.cluster_service_update_provider_fleet_owner_with_http_info(body, cluster_id, node_id, **kwargs) # noqa: E501 + return data + + def cluster_service_update_provider_fleet_owner_with_http_info(self, body: 'ClusterServiceUpdateProviderFleetOwnerBody', cluster_id: 'str', node_id: 'str', **kwargs) -> 'V1ProviderFleetOwner': # noqa: E501 + """cluster_service_update_provider_fleet_owner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cluster_service_update_provider_fleet_owner_with_http_info(body, cluster_id, node_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ClusterServiceUpdateProviderFleetOwnerBody body: (required) + :param str cluster_id: (required) + :param str node_id: (required) + :return: V1ProviderFleetOwner + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'cluster_id', 'node_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method cluster_service_update_provider_fleet_owner" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `cluster_service_update_provider_fleet_owner`") # noqa: E501 + # verify the required parameter 'cluster_id' is set + if ('cluster_id' not in params or + params['cluster_id'] is None): + raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_update_provider_fleet_owner`") # noqa: E501 + # verify the required parameter 'node_id' is set + if ('node_id' not in params or + params['node_id'] is None): + raise ValueError("Missing the required parameter `node_id` when calling `cluster_service_update_provider_fleet_owner`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'cluster_id' in params: + path_params['clusterId'] = params['cluster_id'] # noqa: E501 + if 'node_id' in params: + path_params['nodeId'] = params['node_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/core/clusters/{clusterId}/provider-fleet/{nodeId}/owner', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1ProviderFleetOwner', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def cluster_service_update_sandbox_command_exit_code(self, body: 'V1UpdateSandboxCommandExitCodeRequest', **kwargs) -> 'V1UpdateSandboxCommandExitCodeResponse': # noqa: E501 """Records the exit code of a detached sandbox command once it finishes. Detached commands return to the caller immediately, so the sandbox agent reports the final exit code out-of-band when the process exits. Auth is by the sandbox server token (like GetClusterCredentials); the caller may only update commands belonging to its own sandbox. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py index bb74020c6..8cc3cac4f 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py @@ -1982,6 +1982,7 @@ def jobs_service_get_deployment_routing_telemetry(self, project_id: 'str', id: ' :param int status_code: Optional to filter :param bool group_by_resource: Whether the telemetry should grouped by resource :param str resolution: Which time resolution to use + :param list[str] resource_ids: Optional to filter by the resources (replica job ids) that served the requests :return: V1GetDeploymentRoutingTelemetryResponse If the method is called asynchronously, returns the request thread. @@ -2010,12 +2011,13 @@ def jobs_service_get_deployment_routing_telemetry_with_http_info(self, project_i :param int status_code: Optional to filter :param bool group_by_resource: Whether the telemetry should grouped by resource :param str resolution: Which time resolution to use + :param list[str] resource_ids: Optional to filter by the resources (replica job ids) that served the requests :return: V1GetDeploymentRoutingTelemetryResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'id', 'start', 'end', 'path', 'status_code', 'group_by_resource', 'resolution'] # noqa: E501 + all_params = ['project_id', 'id', 'start', 'end', 'path', 'status_code', 'group_by_resource', 'resolution', 'resource_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2060,6 +2062,9 @@ def jobs_service_get_deployment_routing_telemetry_with_http_info(self, project_i query_params.append(('groupByResource', params['group_by_resource'])) # noqa: E501 if 'resolution' in params: query_params.append(('resolution', params['resolution'])) # noqa: E501 + if 'resource_ids' in params: + query_params.append(('resourceIds', params['resource_ids'])) # noqa: E501 + collection_formats['resourceIds'] = 'multi' # noqa: E501 header_params = {} @@ -2106,6 +2111,7 @@ def jobs_service_get_deployment_routing_telemetry_aggregated(self, project_id: ' :param list[str] paths: Optional to filter :param list[str] status_codes: Optional to filter :param str resolution: Which time resolution to use + :param list[str] resource_ids: Optional to filter by the resources (replica job ids) that served the requests :return: V1GetDeploymentRoutingTelemetryAggregatedResponse If the method is called asynchronously, returns the request thread. @@ -2133,12 +2139,13 @@ def jobs_service_get_deployment_routing_telemetry_aggregated_with_http_info(self :param list[str] paths: Optional to filter :param list[str] status_codes: Optional to filter :param str resolution: Which time resolution to use + :param list[str] resource_ids: Optional to filter by the resources (replica job ids) that served the requests :return: V1GetDeploymentRoutingTelemetryAggregatedResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'id', 'start', 'end', 'paths', 'status_codes', 'resolution'] # noqa: E501 + all_params = ['project_id', 'id', 'start', 'end', 'paths', 'status_codes', 'resolution', 'resource_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2183,6 +2190,9 @@ def jobs_service_get_deployment_routing_telemetry_aggregated_with_http_info(self collection_formats['statusCodes'] = 'multi' # noqa: E501 if 'resolution' in params: query_params.append(('resolution', params['resolution'])) # noqa: E501 + if 'resource_ids' in params: + query_params.append(('resourceIds', params['resource_ids'])) # noqa: E501 + collection_formats['resourceIds'] = 'multi' # noqa: E501 header_params = {} @@ -3318,6 +3328,8 @@ def jobs_service_get_logs(self, project_id: 'str', **kwargs) -> 'V1GetLogsRespon :param str severity: Minimum severity to include: returns only lines equal to or more severe than this (error > warning > info > debug). Empty returns all. Lines with no inferred severity rank as debug, so any threshold above debug excludes them. :param str sandbox_id: sandbox_id returns logs for all of a sandbox's recorded commands. :param list[str] sandbox_command_ids: sandbox_command_ids narrows to specific commands (within sandbox_id when set). + :param str seek_resource_id: Read seek_resource_id's unfiltered merged stream from seek_line onward (\"view in context\" jumps). Query, severity, since and until are ignored. + :param str seek_line: :return: V1GetLogsResponse If the method is called asynchronously, returns the request thread. @@ -3350,12 +3362,14 @@ def jobs_service_get_logs_with_http_info(self, project_id: 'str', **kwargs) -> ' :param str severity: Minimum severity to include: returns only lines equal to or more severe than this (error > warning > info > debug). Empty returns all. Lines with no inferred severity rank as debug, so any threshold above debug excludes them. :param str sandbox_id: sandbox_id returns logs for all of a sandbox's recorded commands. :param list[str] sandbox_command_ids: sandbox_command_ids narrows to specific commands (within sandbox_id when set). + :param str seek_resource_id: Read seek_resource_id's unfiltered merged stream from seek_line onward (\"view in context\" jumps). Query, severity, since and until are ignored. + :param str seek_line: :return: V1GetLogsResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'deployment_id', 'mmt_id', 'since', 'until', 'query', 'job_ids', 'page_size', 'page_token', 'severity', 'sandbox_id', 'sandbox_command_ids'] # noqa: E501 + all_params = ['project_id', 'deployment_id', 'mmt_id', 'since', 'until', 'query', 'job_ids', 'page_size', 'page_token', 'severity', 'sandbox_id', 'sandbox_command_ids', 'seek_resource_id', 'seek_line'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3406,6 +3420,10 @@ def jobs_service_get_logs_with_http_info(self, project_id: 'str', **kwargs) -> ' if 'sandbox_command_ids' in params: query_params.append(('sandboxCommandIds', params['sandbox_command_ids'])) # noqa: E501 collection_formats['sandboxCommandIds'] = 'multi' # noqa: E501 + if 'seek_resource_id' in params: + query_params.append(('seekResourceId', params['seek_resource_id'])) # noqa: E501 + if 'seek_line' in params: + query_params.append(('seekLine', params['seek_line'])) # noqa: E501 header_params = {} @@ -3761,6 +3779,9 @@ def jobs_service_list_all_jobs(self, **kwargs) -> 'V1ListAllJobsResponse': # no :param str sort_order: ascending or descending :param list[str] tag_ids: Match any of these tags :param bool match_all_tags: Require every tag in tag_ids rather than any + :param list[str] user_ids: Creators to filter by; with project_id/org_id any members are allowed, otherwise only the caller + :param list[str] instance_types: Match jobs whose spec instance_type is one of these + :param list[str] sources: Match jobs whose source is a Studio (cloud_space_id) or a Docker image (spec image) :return: V1ListAllJobsResponse If the method is called asynchronously, returns the request thread. @@ -3794,12 +3815,15 @@ def jobs_service_list_all_jobs_with_http_info(self, **kwargs) -> 'V1ListAllJobsR :param str sort_order: ascending or descending :param list[str] tag_ids: Match any of these tags :param bool match_all_tags: Require every tag in tag_ids rather than any + :param list[str] user_ids: Creators to filter by; with project_id/org_id any members are allowed, otherwise only the caller + :param list[str] instance_types: Match jobs whose spec instance_type is one of these + :param list[str] sources: Match jobs whose source is a Studio (cloud_space_id) or a Docker image (spec image) :return: V1ListAllJobsResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'page_token', 'limit', 'search_query', 'states', 'job_types', 'org_id', 'user_id', 'cloudspace_id', 'sort_by', 'sort_order', 'tag_ids', 'match_all_tags'] # noqa: E501 + all_params = ['project_id', 'page_token', 'limit', 'search_query', 'states', 'job_types', 'org_id', 'user_id', 'cloudspace_id', 'sort_by', 'sort_order', 'tag_ids', 'match_all_tags', 'user_ids', 'instance_types', 'sources'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3849,6 +3873,15 @@ def jobs_service_list_all_jobs_with_http_info(self, **kwargs) -> 'V1ListAllJobsR collection_formats['tagIds'] = 'multi' # noqa: E501 if 'match_all_tags' in params: query_params.append(('matchAllTags', params['match_all_tags'])) # noqa: E501 + if 'user_ids' in params: + query_params.append(('userIds', params['user_ids'])) # noqa: E501 + collection_formats['userIds'] = 'multi' # noqa: E501 + if 'instance_types' in params: + query_params.append(('instanceTypes', params['instance_types'])) # noqa: E501 + collection_formats['instanceTypes'] = 'multi' # noqa: E501 + if 'sources' in params: + query_params.append(('sources', params['sources'])) # noqa: E501 + collection_formats['sources'] = 'multi' # noqa: E501 header_params = {} diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py index 2f39075d9..bae9d0612 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py @@ -673,6 +673,99 @@ def k8_s_cluster_service_delete_kubernetes_template_with_http_info(self, cluster _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def k8_s_cluster_service_get_k8_s_cluster_kubeconfig_url(self, cluster_id: 'str', **kwargs) -> 'V1GetK8SClusterKubeconfigURLResponse': # noqa: E501 + """Mints the short-lived user token the kubeconfig is downloaded with. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.k8_s_cluster_service_get_k8_s_cluster_kubeconfig_url(cluster_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str cluster_id: (required) + :return: V1GetK8SClusterKubeconfigURLResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.k8_s_cluster_service_get_k8_s_cluster_kubeconfig_url_with_http_info(cluster_id, **kwargs) # noqa: E501 + else: + (data) = self.k8_s_cluster_service_get_k8_s_cluster_kubeconfig_url_with_http_info(cluster_id, **kwargs) # noqa: E501 + return data + + def k8_s_cluster_service_get_k8_s_cluster_kubeconfig_url_with_http_info(self, cluster_id: 'str', **kwargs) -> 'V1GetK8SClusterKubeconfigURLResponse': # noqa: E501 + """Mints the short-lived user token the kubeconfig is downloaded with. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.k8_s_cluster_service_get_k8_s_cluster_kubeconfig_url_with_http_info(cluster_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str cluster_id: (required) + :return: V1GetK8SClusterKubeconfigURLResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['cluster_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method k8_s_cluster_service_get_k8_s_cluster_kubeconfig_url" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'cluster_id' is set + if ('cluster_id' not in params or + params['cluster_id'] is None): + raise ValueError("Missing the required parameter `cluster_id` when calling `k8_s_cluster_service_get_k8_s_cluster_kubeconfig_url`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'cluster_id' in params: + path_params['clusterId'] = params['cluster_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/k8s-clusters/{clusterId}/kubeconfig-url', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1GetK8SClusterKubeconfigURLResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def k8_s_cluster_service_get_k8_s_cluster_report_data(self, cluster_id: 'str', report_id: 'str', **kwargs) -> 'V1GetK8sClusterReportDataResponse': # noqa: E501 """k8_s_cluster_service_get_k8_s_cluster_report_data # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/lightningapp_instance_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/lightningapp_instance_service_api.py index 532bdab07..79d7222e0 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/lightningapp_instance_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/lightningapp_instance_service_api.py @@ -560,107 +560,6 @@ def lightningapp_instance_service_get_lightningapp_instance_logs_with_http_info( _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def lightningapp_instance_service_get_lightningapp_instance_open_ports(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetLightningappInstanceOpenPortsResponse': # noqa: E501 - """lightningapp_instance_service_get_lightningapp_instance_open_ports # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_instance_service_get_lightningapp_instance_open_ports(project_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str project_id: (required) - :param str id: (required) - :return: V1GetLightningappInstanceOpenPortsResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.lightningapp_instance_service_get_lightningapp_instance_open_ports_with_http_info(project_id, id, **kwargs) # noqa: E501 - else: - (data) = self.lightningapp_instance_service_get_lightningapp_instance_open_ports_with_http_info(project_id, id, **kwargs) # noqa: E501 - return data - - def lightningapp_instance_service_get_lightningapp_instance_open_ports_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetLightningappInstanceOpenPortsResponse': # noqa: E501 - """lightningapp_instance_service_get_lightningapp_instance_open_ports # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_instance_service_get_lightningapp_instance_open_ports_with_http_info(project_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str project_id: (required) - :param str id: (required) - :return: V1GetLightningappInstanceOpenPortsResponse - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['project_id', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method lightningapp_instance_service_get_lightningapp_instance_open_ports" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_get_lightningapp_instance_open_ports`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_get_lightningapp_instance_open_ports`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/appinstances/{id}/ports', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1GetLightningappInstanceOpenPortsResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def lightningapp_instance_service_get_lightningapp_instance_system_metrics(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetLightningappInstanceSystemMetricsResponse': # noqa: E501 """lightningapp_instance_service_get_lightningapp_instance_system_metrics # noqa: E501 @@ -1019,330 +918,3 @@ def lightningapp_instance_service_list_lightningapp_instances_with_http_info(sel _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def lightningapp_instance_service_restart_lightningapp_instance(self, project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance': # noqa: E501 - """lightningapp_instance_service_restart_lightningapp_instance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_instance_service_restart_lightningapp_instance(project_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str project_id: (required) - :param str id: (required) - :return: Externalv1LightningappInstance - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.lightningapp_instance_service_restart_lightningapp_instance_with_http_info(project_id, id, **kwargs) # noqa: E501 - else: - (data) = self.lightningapp_instance_service_restart_lightningapp_instance_with_http_info(project_id, id, **kwargs) # noqa: E501 - return data - - def lightningapp_instance_service_restart_lightningapp_instance_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance': # noqa: E501 - """lightningapp_instance_service_restart_lightningapp_instance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_instance_service_restart_lightningapp_instance_with_http_info(project_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str project_id: (required) - :param str id: (required) - :return: Externalv1LightningappInstance - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['project_id', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method lightningapp_instance_service_restart_lightningapp_instance" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_restart_lightningapp_instance`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_restart_lightningapp_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/appinstances/{id}/restart', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Externalv1LightningappInstance', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def lightningapp_instance_service_update_lightningapp_instance(self, body: 'LightningappInstanceServiceUpdateLightningappInstanceBody', project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance': # noqa: E501 - """lightningapp_instance_service_update_lightningapp_instance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_instance_service_update_lightningapp_instance(body, project_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LightningappInstanceServiceUpdateLightningappInstanceBody body: (required) - :param str project_id: (required) - :param str id: (required) - :return: Externalv1LightningappInstance - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.lightningapp_instance_service_update_lightningapp_instance_with_http_info(body, project_id, id, **kwargs) # noqa: E501 - else: - (data) = self.lightningapp_instance_service_update_lightningapp_instance_with_http_info(body, project_id, id, **kwargs) # noqa: E501 - return data - - def lightningapp_instance_service_update_lightningapp_instance_with_http_info(self, body: 'LightningappInstanceServiceUpdateLightningappInstanceBody', project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance': # noqa: E501 - """lightningapp_instance_service_update_lightningapp_instance # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_instance_service_update_lightningapp_instance_with_http_info(body, project_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LightningappInstanceServiceUpdateLightningappInstanceBody body: (required) - :param str project_id: (required) - :param str id: (required) - :return: Externalv1LightningappInstance - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'project_id', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method lightningapp_instance_service_update_lightningapp_instance" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `lightningapp_instance_service_update_lightningapp_instance`") # noqa: E501 - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_update_lightningapp_instance`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_update_lightningapp_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/appinstances/{id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Externalv1LightningappInstance', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def lightningapp_instance_service_update_lightningapp_instance_release(self, body: 'LightningappInstanceServiceUpdateLightningappInstanceReleaseBody', project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance': # noqa: E501 - """lightningapp_instance_service_update_lightningapp_instance_release # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_instance_service_update_lightningapp_instance_release(body, project_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LightningappInstanceServiceUpdateLightningappInstanceReleaseBody body: (required) - :param str project_id: (required) - :param str id: (required) - :return: Externalv1LightningappInstance - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.lightningapp_instance_service_update_lightningapp_instance_release_with_http_info(body, project_id, id, **kwargs) # noqa: E501 - else: - (data) = self.lightningapp_instance_service_update_lightningapp_instance_release_with_http_info(body, project_id, id, **kwargs) # noqa: E501 - return data - - def lightningapp_instance_service_update_lightningapp_instance_release_with_http_info(self, body: 'LightningappInstanceServiceUpdateLightningappInstanceReleaseBody', project_id: 'str', id: 'str', **kwargs) -> 'Externalv1LightningappInstance': # noqa: E501 - """lightningapp_instance_service_update_lightningapp_instance_release # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_instance_service_update_lightningapp_instance_release_with_http_info(body, project_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LightningappInstanceServiceUpdateLightningappInstanceReleaseBody body: (required) - :param str project_id: (required) - :param str id: (required) - :return: Externalv1LightningappInstance - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'project_id', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method lightningapp_instance_service_update_lightningapp_instance_release" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `lightningapp_instance_service_update_lightningapp_instance_release`") # noqa: E501 - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_instance_service_update_lightningapp_instance_release`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `lightningapp_instance_service_update_lightningapp_instance_release`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/appinstances/{id}/release', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Externalv1LightningappInstance', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/lightningapp_v2_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/lightningapp_v2_service_api.py deleted file mode 100644 index c0d741231..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/api/lightningapp_v2_service_api.py +++ /dev/null @@ -1,323 +0,0 @@ -# coding: utf-8 -# This file is vendored. -# Do not edit it directly; changes will be overwritten. -# Make changes in the internal upstream repository instead. - - -""" - external/v1/auth_service.proto - - No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - - OpenAPI spec version: version not set - - Generated by: https://github.com/swagger-api/swagger-codegen.git - - NOTE - ---- - standard swagger-codegen-cli for this python client has been modified - by custom templates. The purpose of these templates is to include - typing information in the API and Model code. Please refer to the - main grid repository for more info -""" - -from __future__ import absolute_import - -import re # noqa: F401 -from typing import TYPE_CHECKING, Any - -# python 2 and python 3 compatibility library -import six - -from lightning_sdk.lightning_cloud.openapi.api_client import ApiClient - -if TYPE_CHECKING: - from datetime import datetime - from lightning_sdk.lightning_cloud.openapi.models import * - -class LightningappV2ServiceApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def lightningapp_v2_service_create_lightningapp_from_gallery(self, body: 'LightningappV2ServiceCreateLightningappFromGalleryBody', project_id: 'str', **kwargs) -> 'Externalv1LightningappInstance': # noqa: E501 - """lightningapp_v2_service_create_lightningapp_from_gallery # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_v2_service_create_lightningapp_from_gallery(body, project_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LightningappV2ServiceCreateLightningappFromGalleryBody body: (required) - :param str project_id: Project in which to create the app (required) - :return: Externalv1LightningappInstance - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.lightningapp_v2_service_create_lightningapp_from_gallery_with_http_info(body, project_id, **kwargs) # noqa: E501 - else: - (data) = self.lightningapp_v2_service_create_lightningapp_from_gallery_with_http_info(body, project_id, **kwargs) # noqa: E501 - return data - - def lightningapp_v2_service_create_lightningapp_from_gallery_with_http_info(self, body: 'LightningappV2ServiceCreateLightningappFromGalleryBody', project_id: 'str', **kwargs) -> 'Externalv1LightningappInstance': # noqa: E501 - """lightningapp_v2_service_create_lightningapp_from_gallery # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_v2_service_create_lightningapp_from_gallery_with_http_info(body, project_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LightningappV2ServiceCreateLightningappFromGalleryBody body: (required) - :param str project_id: Project in which to create the app (required) - :return: Externalv1LightningappInstance - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'project_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method lightningapp_v2_service_create_lightningapp_from_gallery" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `lightningapp_v2_service_create_lightningapp_from_gallery`") # noqa: E501 - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `lightningapp_v2_service_create_lightningapp_from_gallery`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/get-app', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Externalv1LightningappInstance', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def lightningapp_v2_service_list_gallery_components(self, **kwargs) -> 'V1ListGalleryComponentsResponse': # noqa: E501 - """lightningapp_v2_service_list_gallery_components # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_v2_service_list_gallery_components(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: V1ListGalleryComponentsResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.lightningapp_v2_service_list_gallery_components_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.lightningapp_v2_service_list_gallery_components_with_http_info(**kwargs) # noqa: E501 - return data - - def lightningapp_v2_service_list_gallery_components_with_http_info(self, **kwargs) -> 'V1ListGalleryComponentsResponse': # noqa: E501 - """lightningapp_v2_service_list_gallery_components # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_v2_service_list_gallery_components_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: V1ListGalleryComponentsResponse - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method lightningapp_v2_service_list_gallery_components" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/components', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1ListGalleryComponentsResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def lightningapp_v2_service_list_gallery_lightningapps(self, **kwargs) -> 'V1ListGalleryLightningappsResponse': # noqa: E501 - """lightningapp_v2_service_list_gallery_lightningapps # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_v2_service_list_gallery_lightningapps(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: V1ListGalleryLightningappsResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.lightningapp_v2_service_list_gallery_lightningapps_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.lightningapp_v2_service_list_gallery_lightningapps_with_http_info(**kwargs) # noqa: E501 - return data - - def lightningapp_v2_service_list_gallery_lightningapps_with_http_info(self, **kwargs) -> 'V1ListGalleryLightningappsResponse': # noqa: E501 - """lightningapp_v2_service_list_gallery_lightningapps # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningapp_v2_service_list_gallery_lightningapps_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: V1ListGalleryLightningappsResponse - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method lightningapp_v2_service_list_gallery_lightningapps" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/apps', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1ListGalleryLightningappsResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/lightningwork_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/lightningwork_service_api.py index 88095b111..f9bf8c867 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/lightningwork_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/lightningwork_service_api.py @@ -47,341 +47,6 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def lightningwork_service_batch_update_lightningworks(self, body: 'LightningworkServiceBatchUpdateLightningworksBody', project_id: 'str', app_id: 'str', **kwargs) -> 'V1BatchUpdateLightningworkResponse': # noqa: E501 - """lightningwork_service_batch_update_lightningworks # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningwork_service_batch_update_lightningworks(body, project_id, app_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LightningworkServiceBatchUpdateLightningworksBody body: (required) - :param str project_id: (required) - :param str app_id: (required) - :return: V1BatchUpdateLightningworkResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.lightningwork_service_batch_update_lightningworks_with_http_info(body, project_id, app_id, **kwargs) # noqa: E501 - else: - (data) = self.lightningwork_service_batch_update_lightningworks_with_http_info(body, project_id, app_id, **kwargs) # noqa: E501 - return data - - def lightningwork_service_batch_update_lightningworks_with_http_info(self, body: 'LightningworkServiceBatchUpdateLightningworksBody', project_id: 'str', app_id: 'str', **kwargs) -> 'V1BatchUpdateLightningworkResponse': # noqa: E501 - """lightningwork_service_batch_update_lightningworks # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningwork_service_batch_update_lightningworks_with_http_info(body, project_id, app_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LightningworkServiceBatchUpdateLightningworksBody body: (required) - :param str project_id: (required) - :param str app_id: (required) - :return: V1BatchUpdateLightningworkResponse - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'project_id', 'app_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method lightningwork_service_batch_update_lightningworks" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `lightningwork_service_batch_update_lightningworks`") # noqa: E501 - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `lightningwork_service_batch_update_lightningworks`") # noqa: E501 - # verify the required parameter 'app_id' is set - if ('app_id' not in params or - params['app_id'] is None): - raise ValueError("Missing the required parameter `app_id` when calling `lightningwork_service_batch_update_lightningworks`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'app_id' in params: - path_params['appId'] = params['app_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/appinstances/{appId}/works', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1BatchUpdateLightningworkResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def lightningwork_service_create_lightningwork(self, body: 'LightningworkServiceCreateLightningworkBody', project_id: 'str', spec_lightningapp_instance_id: 'str', **kwargs) -> 'Externalv1Lightningwork': # noqa: E501 - """lightningwork_service_create_lightningwork # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningwork_service_create_lightningwork(body, project_id, spec_lightningapp_instance_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LightningworkServiceCreateLightningworkBody body: (required) - :param str project_id: (required) - :param str spec_lightningapp_instance_id: the work belongs to this app instance (required) - :return: Externalv1Lightningwork - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.lightningwork_service_create_lightningwork_with_http_info(body, project_id, spec_lightningapp_instance_id, **kwargs) # noqa: E501 - else: - (data) = self.lightningwork_service_create_lightningwork_with_http_info(body, project_id, spec_lightningapp_instance_id, **kwargs) # noqa: E501 - return data - - def lightningwork_service_create_lightningwork_with_http_info(self, body: 'LightningworkServiceCreateLightningworkBody', project_id: 'str', spec_lightningapp_instance_id: 'str', **kwargs) -> 'Externalv1Lightningwork': # noqa: E501 - """lightningwork_service_create_lightningwork # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningwork_service_create_lightningwork_with_http_info(body, project_id, spec_lightningapp_instance_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LightningworkServiceCreateLightningworkBody body: (required) - :param str project_id: (required) - :param str spec_lightningapp_instance_id: the work belongs to this app instance (required) - :return: Externalv1Lightningwork - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'project_id', 'spec_lightningapp_instance_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method lightningwork_service_create_lightningwork" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `lightningwork_service_create_lightningwork`") # noqa: E501 - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `lightningwork_service_create_lightningwork`") # noqa: E501 - # verify the required parameter 'spec_lightningapp_instance_id' is set - if ('spec_lightningapp_instance_id' not in params or - params['spec_lightningapp_instance_id'] is None): - raise ValueError("Missing the required parameter `spec_lightningapp_instance_id` when calling `lightningwork_service_create_lightningwork`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'spec_lightningapp_instance_id' in params: - path_params['spec.lightningappInstanceId'] = params['spec_lightningapp_instance_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/appinstances/{spec.lightningappInstanceId}/works', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Externalv1Lightningwork', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def lightningwork_service_delete_lightningwork(self, project_id: 'str', app_id: 'str', id: 'str', **kwargs) -> 'V1DeleteLightningworkResponse': # noqa: E501 - """lightningwork_service_delete_lightningwork # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningwork_service_delete_lightningwork(project_id, app_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str project_id: (required) - :param str app_id: (required) - :param str id: (required) - :return: V1DeleteLightningworkResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.lightningwork_service_delete_lightningwork_with_http_info(project_id, app_id, id, **kwargs) # noqa: E501 - else: - (data) = self.lightningwork_service_delete_lightningwork_with_http_info(project_id, app_id, id, **kwargs) # noqa: E501 - return data - - def lightningwork_service_delete_lightningwork_with_http_info(self, project_id: 'str', app_id: 'str', id: 'str', **kwargs) -> 'V1DeleteLightningworkResponse': # noqa: E501 - """lightningwork_service_delete_lightningwork # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningwork_service_delete_lightningwork_with_http_info(project_id, app_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str project_id: (required) - :param str app_id: (required) - :param str id: (required) - :return: V1DeleteLightningworkResponse - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['project_id', 'app_id', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method lightningwork_service_delete_lightningwork" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `lightningwork_service_delete_lightningwork`") # noqa: E501 - # verify the required parameter 'app_id' is set - if ('app_id' not in params or - params['app_id'] is None): - raise ValueError("Missing the required parameter `app_id` when calling `lightningwork_service_delete_lightningwork`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `lightningwork_service_delete_lightningwork`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'app_id' in params: - path_params['appId'] = params['app_id'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/appinstances/{appId}/works/{id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1DeleteLightningworkResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def lightningwork_service_get_lightningwork(self, project_id: 'str', id: 'str', **kwargs) -> 'Externalv1Lightningwork': # noqa: E501 """lightningwork_service_get_lightningwork # noqa: E501 @@ -941,124 +606,3 @@ def lightningwork_service_list_lightningwork_events_with_http_info(self, project _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def lightningwork_service_update_lightningwork(self, body: 'LightningworkServiceUpdateLightningworkBody', project_id: 'str', spec_lightningapp_instance_id: 'str', id: 'str', **kwargs) -> 'Externalv1Lightningwork': # noqa: E501 - """lightningwork_service_update_lightningwork # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningwork_service_update_lightningwork(body, project_id, spec_lightningapp_instance_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LightningworkServiceUpdateLightningworkBody body: (required) - :param str project_id: (required) - :param str spec_lightningapp_instance_id: the work belongs to this app instance (required) - :param str id: (required) - :return: Externalv1Lightningwork - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.lightningwork_service_update_lightningwork_with_http_info(body, project_id, spec_lightningapp_instance_id, id, **kwargs) # noqa: E501 - else: - (data) = self.lightningwork_service_update_lightningwork_with_http_info(body, project_id, spec_lightningapp_instance_id, id, **kwargs) # noqa: E501 - return data - - def lightningwork_service_update_lightningwork_with_http_info(self, body: 'LightningworkServiceUpdateLightningworkBody', project_id: 'str', spec_lightningapp_instance_id: 'str', id: 'str', **kwargs) -> 'Externalv1Lightningwork': # noqa: E501 - """lightningwork_service_update_lightningwork # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.lightningwork_service_update_lightningwork_with_http_info(body, project_id, spec_lightningapp_instance_id, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LightningworkServiceUpdateLightningworkBody body: (required) - :param str project_id: (required) - :param str spec_lightningapp_instance_id: the work belongs to this app instance (required) - :param str id: (required) - :return: Externalv1Lightningwork - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'project_id', 'spec_lightningapp_instance_id', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method lightningwork_service_update_lightningwork" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `lightningwork_service_update_lightningwork`") # noqa: E501 - # verify the required parameter 'project_id' is set - if ('project_id' not in params or - params['project_id'] is None): - raise ValueError("Missing the required parameter `project_id` when calling `lightningwork_service_update_lightningwork`") # noqa: E501 - # verify the required parameter 'spec_lightningapp_instance_id' is set - if ('spec_lightningapp_instance_id' not in params or - params['spec_lightningapp_instance_id'] is None): - raise ValueError("Missing the required parameter `spec_lightningapp_instance_id` when calling `lightningwork_service_update_lightningwork`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `lightningwork_service_update_lightningwork`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in params: - path_params['projectId'] = params['project_id'] # noqa: E501 - if 'spec_lightningapp_instance_id' in params: - path_params['spec.lightningappInstanceId'] = params['spec_lightningapp_instance_id'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/v1/projects/{projectId}/appinstances/{spec.lightningappInstanceId}/works/{id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Externalv1Lightningwork', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/lit_logger_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/lit_logger_service_api.py index 83a1274a4..4abacd073 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/lit_logger_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/lit_logger_service_api.py @@ -1553,6 +1553,7 @@ def lit_logger_service_list_all_metrics_streams(self, **kwargs) -> 'V1ListMetric :param int offset: :param str order_by: :param list[str] ids: filter by specific metric stream IDs + :param list[str] job_ids: filter by specific job IDs :return: V1ListMetricsStreamsResponse If the method is called asynchronously, returns the request thread. @@ -1582,12 +1583,13 @@ def lit_logger_service_list_all_metrics_streams_with_http_info(self, **kwargs) - :param int offset: :param str order_by: :param list[str] ids: filter by specific metric stream IDs + :param list[str] job_ids: filter by specific job IDs :return: V1ListMetricsStreamsResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['user_ids', 'org_id', 'project_id', 'cloud_space_id', 'app_id', 'limit', 'offset', 'order_by', 'ids'] # noqa: E501 + all_params = ['user_ids', 'org_id', 'project_id', 'cloud_space_id', 'app_id', 'limit', 'offset', 'order_by', 'ids', 'job_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1628,6 +1630,9 @@ def lit_logger_service_list_all_metrics_streams_with_http_info(self, **kwargs) - if 'ids' in params: query_params.append(('ids', params['ids'])) # noqa: E501 collection_formats['ids'] = 'multi' # noqa: E501 + if 'job_ids' in params: + query_params.append(('jobIds', params['job_ids'])) # noqa: E501 + collection_formats['jobIds'] = 'multi' # noqa: E501 header_params = {} @@ -1901,6 +1906,7 @@ def lit_logger_service_list_metrics_streams(self, project_id: 'str', **kwargs) - :param int offset: :param str order_by: :param list[str] ids: filter by specific metric stream IDs + :param list[str] job_ids: filter by specific job IDs :return: V1ListMetricsStreamsResponse If the method is called asynchronously, returns the request thread. @@ -1929,12 +1935,13 @@ def lit_logger_service_list_metrics_streams_with_http_info(self, project_id: 'st :param int offset: :param str order_by: :param list[str] ids: filter by specific metric stream IDs + :param list[str] job_ids: filter by specific job IDs :return: V1ListMetricsStreamsResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'user_ids', 'cloud_space_id', 'app_id', 'limit', 'offset', 'order_by', 'ids'] # noqa: E501 + all_params = ['project_id', 'user_ids', 'cloud_space_id', 'app_id', 'limit', 'offset', 'order_by', 'ids', 'job_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1977,6 +1984,9 @@ def lit_logger_service_list_metrics_streams_with_http_info(self, project_id: 'st if 'ids' in params: query_params.append(('ids', params['ids'])) # noqa: E501 collection_formats['ids'] = 'multi' # noqa: E501 + if 'job_ids' in params: + query_params.append(('jobIds', params['job_ids'])) # noqa: E501 + collection_formats['jobIds'] = 'multi' # noqa: E501 header_params = {} diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py index 4bdbeae92..18cf8cf05 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py @@ -385,6 +385,7 @@ def lit_registry_service_get_lit_project_registry(self, project_id: 'str', **kwa :param str cluster_id: :param str sort_by: Column name to sort repositories by :param str sort_order: ascending or descending + :param str search: :return: V1LitRegistryProject If the method is called asynchronously, returns the request thread. @@ -411,12 +412,13 @@ def lit_registry_service_get_lit_project_registry_with_http_info(self, project_i :param str cluster_id: :param str sort_by: Column name to sort repositories by :param str sort_order: ascending or descending + :param str search: :return: V1LitRegistryProject If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'latest_only', 'filter_for_repo', 'cluster_id', 'sort_by', 'sort_order'] # noqa: E501 + all_params = ['project_id', 'latest_only', 'filter_for_repo', 'cluster_id', 'sort_by', 'sort_order', 'search'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -453,6 +455,8 @@ def lit_registry_service_get_lit_project_registry_with_http_info(self, project_i query_params.append(('sortBy', params['sort_by'])) # noqa: E501 if 'sort_order' in params: query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + if 'search' in params: + query_params.append(('search', params['search'])) # noqa: E501 header_params = {} diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/organizations_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/organizations_service_api.py index 9bfe8b259..c798ee772 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/organizations_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/organizations_service_api.py @@ -2265,6 +2265,111 @@ def organizations_service_search_organizations_with_http_info(self, **kwargs) -> _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def organizations_service_set_org_default_teamspaces(self, body: 'OrganizationsServiceSetOrgDefaultTeamspacesBody', org_id: 'str', **kwargs) -> 'V1Organization': # noqa: E501 + """Replaces the teamspaces a new member joins. Does not change current members. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.organizations_service_set_org_default_teamspaces(body, org_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param OrganizationsServiceSetOrgDefaultTeamspacesBody body: (required) + :param str org_id: (required) + :return: V1Organization + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.organizations_service_set_org_default_teamspaces_with_http_info(body, org_id, **kwargs) # noqa: E501 + else: + (data) = self.organizations_service_set_org_default_teamspaces_with_http_info(body, org_id, **kwargs) # noqa: E501 + return data + + def organizations_service_set_org_default_teamspaces_with_http_info(self, body: 'OrganizationsServiceSetOrgDefaultTeamspacesBody', org_id: 'str', **kwargs) -> 'V1Organization': # noqa: E501 + """Replaces the teamspaces a new member joins. Does not change current members. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.organizations_service_set_org_default_teamspaces_with_http_info(body, org_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param OrganizationsServiceSetOrgDefaultTeamspacesBody body: (required) + :param str org_id: (required) + :return: V1Organization + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'org_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method organizations_service_set_org_default_teamspaces" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `organizations_service_set_org_default_teamspaces`") # noqa: E501 + # verify the required parameter 'org_id' is set + if ('org_id' not in params or + params['org_id'] is None): + raise ValueError("Missing the required parameter `org_id` when calling `organizations_service_set_org_default_teamspaces`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org_id' in params: + path_params['orgId'] = params['org_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/orgs/{orgId}/default-teamspaces', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1Organization', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def organizations_service_set_org_member_model_api_daily_limit(self, body: 'OrganizationsServiceSetOrgMemberModelAPIDailyLimitBody', org_id: 'str', user_id: 'str', **kwargs) -> 'V1SetOrgMemberModelAPIDailyLimitResponse': # noqa: E501 """Set, clear (fall back to org default), or explicitly uncap a single member's Model-API daily spend limit. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/projects_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/projects_service_api.py index 30857c629..5741f0730 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/projects_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/projects_service_api.py @@ -2055,6 +2055,111 @@ def projects_service_list_project_roles_with_http_info(self, project_id: 'str', _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def projects_service_update_api_key(self, body: 'ProjectsServiceUpdateAPIKeyBody', id: 'str', **kwargs) -> 'V1APIKey': # noqa: E501 + """projects_service_update_api_key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.projects_service_update_api_key(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ProjectsServiceUpdateAPIKeyBody body: (required) + :param str id: (required) + :return: V1APIKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.projects_service_update_api_key_with_http_info(body, id, **kwargs) # noqa: E501 + else: + (data) = self.projects_service_update_api_key_with_http_info(body, id, **kwargs) # noqa: E501 + return data + + def projects_service_update_api_key_with_http_info(self, body: 'ProjectsServiceUpdateAPIKeyBody', id: 'str', **kwargs) -> 'V1APIKey': # noqa: E501 + """projects_service_update_api_key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.projects_service_update_api_key_with_http_info(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ProjectsServiceUpdateAPIKeyBody body: (required) + :param str id: (required) + :return: V1APIKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method projects_service_update_api_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `projects_service_update_api_key`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `projects_service_update_api_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/api-keys/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1APIKey', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def projects_service_update_project(self, body: 'ProjectsServiceUpdateProjectBody', id: 'str', **kwargs) -> 'V1Project': # noqa: E501 """projects_service_update_project # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/sandboxes_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/sandboxes_service_api.py index 08fb0a842..72bb4af36 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/sandboxes_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/sandboxes_service_api.py @@ -548,6 +548,111 @@ def sandboxes_service_delete_sandbox_snapshot_with_http_info(self, snapshot_id: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def sandboxes_service_expose_sandbox_ports(self, body: 'SandboxesServiceExposeSandboxPortsBody', id: 'str', **kwargs) -> 'V1Sandbox': # noqa: E501 + """ExposeSandboxPorts makes HTTP servers inside a running or paused sandbox reachable at their `port_urls`. Ports that are already exposed are left as they are. A paused sandbox gets the ports when it resumes. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.sandboxes_service_expose_sandbox_ports(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SandboxesServiceExposeSandboxPortsBody body: (required) + :param str id: (required) + :return: V1Sandbox + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.sandboxes_service_expose_sandbox_ports_with_http_info(body, id, **kwargs) # noqa: E501 + else: + (data) = self.sandboxes_service_expose_sandbox_ports_with_http_info(body, id, **kwargs) # noqa: E501 + return data + + def sandboxes_service_expose_sandbox_ports_with_http_info(self, body: 'SandboxesServiceExposeSandboxPortsBody', id: 'str', **kwargs) -> 'V1Sandbox': # noqa: E501 + """ExposeSandboxPorts makes HTTP servers inside a running or paused sandbox reachable at their `port_urls`. Ports that are already exposed are left as they are. A paused sandbox gets the ports when it resumes. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.sandboxes_service_expose_sandbox_ports_with_http_info(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SandboxesServiceExposeSandboxPortsBody body: (required) + :param str id: (required) + :return: V1Sandbox + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method sandboxes_service_expose_sandbox_ports" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `sandboxes_service_expose_sandbox_ports`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `sandboxes_service_expose_sandbox_ports`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/core/sandboxes/{id}/ports', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1Sandbox', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def sandboxes_service_extend_sandbox_timeout(self, body: 'SandboxesServiceExtendSandboxTimeoutBody', id: 'str', **kwargs) -> 'V1ExtendSandboxTimeoutResponse': # noqa: E501 """ExtendSandboxTimeout adds `timeout` more milliseconds to the sandbox's termination deadline. FailedPrecondition when the sandbox was created with an idle_timeout: its deadline belongs to KeepSandboxAlive and `timeout` is the cap that deadline is clamped to, so extending it here would push the sandbox past the cap it was created with. Also FailedPrecondition when a stop is already in progress. # noqa: E501 @@ -2329,6 +2434,111 @@ def sandboxes_service_stop_sandbox_with_http_info(self, body: 'SandboxesServiceS _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def sandboxes_service_unexpose_sandbox_port(self, id: 'str', port: 'str', **kwargs) -> 'V1Sandbox': # noqa: E501 + """UnexposeSandboxPort stops routing new requests to a port. Connections already open, such as WebSockets, stay up until they close. Unexposing a port that is not exposed is a no-op. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.sandboxes_service_unexpose_sandbox_port(id, port, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param str port: (required) + :param str organization_id: + :return: V1Sandbox + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.sandboxes_service_unexpose_sandbox_port_with_http_info(id, port, **kwargs) # noqa: E501 + else: + (data) = self.sandboxes_service_unexpose_sandbox_port_with_http_info(id, port, **kwargs) # noqa: E501 + return data + + def sandboxes_service_unexpose_sandbox_port_with_http_info(self, id: 'str', port: 'str', **kwargs) -> 'V1Sandbox': # noqa: E501 + """UnexposeSandboxPort stops routing new requests to a port. Connections already open, such as WebSockets, stay up until they close. Unexposing a port that is not exposed is a no-op. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.sandboxes_service_unexpose_sandbox_port_with_http_info(id, port, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param str port: (required) + :param str organization_id: + :return: V1Sandbox + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'port', 'organization_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method sandboxes_service_unexpose_sandbox_port" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `sandboxes_service_unexpose_sandbox_port`") # noqa: E501 + # verify the required parameter 'port' is set + if ('port' not in params or + params['port'] is None): + raise ValueError("Missing the required parameter `port` when calling `sandboxes_service_unexpose_sandbox_port`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'port' in params: + path_params['port'] = params['port'] # noqa: E501 + + query_params = [] + if 'organization_id' in params: + query_params.append(('organizationId', params['organization_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/core/sandboxes/{id}/ports/{port}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1Sandbox', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def sandboxes_service_update_sandbox(self, body: 'SandboxesServiceUpdateSandboxBody', id: 'str', **kwargs) -> 'V1Sandbox': # noqa: E501 """UpdateSandbox updates a sandbox in place. Currently the only supported mutation is `resume = true`, which resumes a previously stopped persistent sandbox from its most recent auto-snapshot while preserving the sandbox id. Modelled on Vercel's update-sandbox endpoint: https://vercel.com/docs/rest-api/sandboxes-v2-beta/update-a-sandbox. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/secret_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/secret_service_api.py index f0c3ab5bc..977d928c9 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/secret_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/secret_service_api.py @@ -743,6 +743,7 @@ def secret_service_list_user_secrets(self, **kwargs) -> 'V1ListSecretsResponse': >>> result = thread.get() :param async_req bool + :param str type: :return: V1ListSecretsResponse If the method is called asynchronously, returns the request thread. @@ -763,12 +764,13 @@ def secret_service_list_user_secrets_with_http_info(self, **kwargs) -> 'V1ListSe >>> result = thread.get() :param async_req bool + :param str type: :return: V1ListSecretsResponse If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['type'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -789,6 +791,8 @@ def secret_service_list_user_secrets_with_http_info(self, **kwargs) -> 'V1ListSe path_params = {} query_params = [] + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 header_params = {} diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/ssh_public_key_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/ssh_public_key_service_api.py index 389dc84a4..e4a3c33c8 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/ssh_public_key_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/ssh_public_key_service_api.py @@ -427,6 +427,103 @@ def s_sh_public_key_service_get_ssh_public_key_with_http_info(self, id: 'str', * _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def s_sh_public_key_service_get_ssh_setup_url(self, **kwargs) -> 'V1GetSSHSetupURLResponse': # noqa: E501 + """Mints the short-lived user token the SSH setup scripts are fetched with. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.s_sh_public_key_service_get_ssh_setup_url(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str cloudspace_id: + :param str cluster_id: + :param str machine_id: + :return: V1GetSSHSetupURLResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.s_sh_public_key_service_get_ssh_setup_url_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.s_sh_public_key_service_get_ssh_setup_url_with_http_info(**kwargs) # noqa: E501 + return data + + def s_sh_public_key_service_get_ssh_setup_url_with_http_info(self, **kwargs) -> 'V1GetSSHSetupURLResponse': # noqa: E501 + """Mints the short-lived user token the SSH setup scripts are fetched with. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.s_sh_public_key_service_get_ssh_setup_url_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str cloudspace_id: + :param str cluster_id: + :param str machine_id: + :return: V1GetSSHSetupURLResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['cloudspace_id', 'cluster_id', 'machine_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method s_sh_public_key_service_get_ssh_setup_url" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'cloudspace_id' in params: + query_params.append(('cloudspaceId', params['cloudspace_id'])) # noqa: E501 + if 'cluster_id' in params: + query_params.append(('clusterId', params['cluster_id'])) # noqa: E501 + if 'machine_id' in params: + query_params.append(('machineId', params['machine_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/ssh-setup-url', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1GetSSHSetupURLResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def s_sh_public_key_service_list_ssh_public_keys(self, **kwargs) -> 'V1ListSSHPublicKeysResponse': # noqa: E501 """s_sh_public_key_service_list_ssh_public_keys # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/__init__.py b/python/lightning_sdk/lightning_cloud/openapi/models/__init__.py index ae4b94668..1e9fca086 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/__init__.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/__init__.py @@ -30,6 +30,7 @@ from lightning_sdk.lightning_cloud.openapi.models.assistants_service_create_assistant_managed_endpoint_body import AssistantsServiceCreateAssistantManagedEndpointBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_create_conversation_message_action_body import AssistantsServiceCreateConversationMessageActionBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_create_model_metrics_body import AssistantsServiceCreateModelMetricsBody +from lightning_sdk.lightning_cloud.openapi.models.assistants_service_set_model_publish_status_body import AssistantsServiceSetModelPublishStatusBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_start_conversation_body import AssistantsServiceStartConversationBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_assistant_body import AssistantsServiceUpdateAssistantBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_assistant_managed_endpoint_body import AssistantsServiceUpdateAssistantManagedEndpointBody @@ -38,6 +39,8 @@ from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_conversation_like_body import AssistantsServiceUpdateConversationLikeBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_conversation_message_content_body import AssistantsServiceUpdateConversationMessageContentBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_conversation_message_like_body import AssistantsServiceUpdateConversationMessageLikeBody +from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_model_pricing_body import AssistantsServiceUpdateModelPricingBody +from lightning_sdk.lightning_cloud.openapi.models.assistants_service_update_model_serving_body import AssistantsServiceUpdateModelServingBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_validate_assistant_status_body import AssistantsServiceValidateAssistantStatusBody from lightning_sdk.lightning_cloud.openapi.models.assistants_service_validate_managed_model_body import AssistantsServiceValidateManagedModelBody from lightning_sdk.lightning_cloud.openapi.models.billing_service_create_billing_upgrade_trigger_record_body import BillingServiceCreateBillingUpgradeTriggerRecordBody @@ -45,17 +48,14 @@ from lightning_sdk.lightning_cloud.openapi.models.billing_service_transfer_org_balance_body import BillingServiceTransferOrgBalanceBody from lightning_sdk.lightning_cloud.openapi.models.billing_service_transfer_project_balance_body import BillingServiceTransferProjectBalanceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_environment_template_service_update_cloud_space_environment_template_body import CloudSpaceEnvironmentTemplateServiceUpdateCloudSpaceEnvironmentTemplateBody -from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_cloud_space_app_instance_body import CloudSpaceServiceCreateCloudSpaceAppInstanceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_cloud_space_body import CloudSpaceServiceCreateCloudSpaceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_cloud_space_instance_metric_body import CloudSpaceServiceCreateCloudSpaceInstanceMetricBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_cloud_space_version_body import CloudSpaceServiceCreateCloudSpaceVersionBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_cloud_space_version_publication_body import CloudSpaceServiceCreateCloudSpaceVersionPublicationBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_lightning_run_body import CloudSpaceServiceCreateLightningRunBody -from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_create_lightning_run_instance_body import CloudSpaceServiceCreateLightningRunInstanceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_engage_cloud_space_body import CloudSpaceServiceEngageCloudSpaceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_execute_command_in_cloud_space_body import CloudSpaceServiceExecuteCommandInCloudSpaceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_execute_in_cloud_space_session_body import CloudSpaceServiceExecuteInCloudSpaceSessionBody -from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_fork_cloud_space_app_instance_body import CloudSpaceServiceForkCloudSpaceAppInstanceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_fork_cloud_space_body import CloudSpaceServiceForkCloudSpaceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_keep_alive_cloud_space_instance_body import CloudSpaceServiceKeepAliveCloudSpaceInstanceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_publish_cloud_space_body import CloudSpaceServicePublishCloudSpaceBody @@ -64,7 +64,6 @@ from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_start_cloud_space_instance_body import CloudSpaceServiceStartCloudSpaceInstanceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_suggest_cloud_space_name_body import CloudSpaceServiceSuggestCloudSpaceNameBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_transfer_cloud_space_body import CloudSpaceServiceTransferCloudSpaceBody -from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_update_cloud_space_app_body import CloudSpaceServiceUpdateCloudSpaceAppBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_update_cloud_space_body import CloudSpaceServiceUpdateCloudSpaceBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_update_cloud_space_collab_body import CloudSpaceServiceUpdateCloudSpaceCollabBody from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_update_cloud_space_ide_body import CloudSpaceServiceUpdateCloudSpaceIdeBody @@ -95,6 +94,7 @@ from lightning_sdk.lightning_cloud.openapi.models.cluster_service_report_sandbox_resource_metrics_body import ClusterServiceReportSandboxResourceMetricsBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_report_sandbox_termination_body import ClusterServiceReportSandboxTerminationBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_server_check_in_body import ClusterServiceServerCheckInBody +from lightning_sdk.lightning_cloud.openapi.models.cluster_service_set_machine_vpn_services_body import ClusterServiceSetMachineVPNServicesBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_sleep_server_body import ClusterServiceSleepServerBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_cluster_body import ClusterServiceUpdateClusterBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_cluster_usage_restriction_body import ClusterServiceUpdateClusterUsageRestrictionBody @@ -102,6 +102,7 @@ from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_machine_body import ClusterServiceUpdateMachineBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_machine_server_body import ClusterServiceUpdateMachineServerBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_project_cluster_body import ClusterServiceUpdateProjectClusterBody +from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_provider_fleet_owner_body import ClusterServiceUpdateProviderFleetOwnerBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_server_body import ClusterServiceUpdateServerBody from lightning_sdk.lightning_cloud.openapi.models.create_checkout_session_request_wallet_type import CreateCheckoutSessionRequestWalletType from lightning_sdk.lightning_cloud.openapi.models.data_connection_mount_data_connection_mount_copy_status import DataConnectionMountDataConnectionMountCopyStatus @@ -161,13 +162,6 @@ from lightning_sdk.lightning_cloud.openapi.models.k8_s_cluster_service_update_kubernetes_job_body import K8SClusterServiceUpdateKubernetesJobBody from lightning_sdk.lightning_cloud.openapi.models.k8_s_cluster_service_update_kubernetes_schedule_body import K8SClusterServiceUpdateKubernetesScheduleBody from lightning_sdk.lightning_cloud.openapi.models.k8_s_cluster_service_update_kubernetes_template_body import K8SClusterServiceUpdateKubernetesTemplateBody -from lightning_sdk.lightning_cloud.openapi.models.lightningapp_instance_service_update_lightningapp_instance_body import LightningappInstanceServiceUpdateLightningappInstanceBody -from lightning_sdk.lightning_cloud.openapi.models.lightningapp_instance_service_update_lightningapp_instance_release_body import LightningappInstanceServiceUpdateLightningappInstanceReleaseBody -from lightning_sdk.lightning_cloud.openapi.models.lightningapp_v2_service_create_lightningapp_from_gallery_body import LightningappV2ServiceCreateLightningappFromGalleryBody -from lightning_sdk.lightning_cloud.openapi.models.lightningwork_service_batch_update_lightningworks_body import LightningworkServiceBatchUpdateLightningworksBody -from lightning_sdk.lightning_cloud.openapi.models.lightningwork_service_create_lightningwork_body import LightningworkServiceCreateLightningworkBody -from lightning_sdk.lightning_cloud.openapi.models.lightningwork_service_create_lightningwork_body_spec import LightningworkServiceCreateLightningworkBodySpec -from lightning_sdk.lightning_cloud.openapi.models.lightningwork_service_update_lightningwork_body import LightningworkServiceUpdateLightningworkBody from lightning_sdk.lightning_cloud.openapi.models.lit_logger_service_append_logger_metrics_body import LitLoggerServiceAppendLoggerMetricsBody from lightning_sdk.lightning_cloud.openapi.models.lit_logger_service_create_lit_logger_media_body import LitLoggerServiceCreateLitLoggerMediaBody from lightning_sdk.lightning_cloud.openapi.models.lit_logger_service_create_logger_artifact_body import LitLoggerServiceCreateLoggerArtifactBody @@ -198,6 +192,7 @@ from lightning_sdk.lightning_cloud.openapi.models.organizations_service_create_org_membership_body import OrganizationsServiceCreateOrgMembershipBody from lightning_sdk.lightning_cloud.openapi.models.organizations_service_create_org_membership_role_binding_body import OrganizationsServiceCreateOrgMembershipRoleBindingBody from lightning_sdk.lightning_cloud.openapi.models.organizations_service_create_org_role_body import OrganizationsServiceCreateOrgRoleBody +from lightning_sdk.lightning_cloud.openapi.models.organizations_service_set_org_default_teamspaces_body import OrganizationsServiceSetOrgDefaultTeamspacesBody from lightning_sdk.lightning_cloud.openapi.models.organizations_service_set_org_member_model_api_daily_limit_body import OrganizationsServiceSetOrgMemberModelAPIDailyLimitBody from lightning_sdk.lightning_cloud.openapi.models.organizations_service_set_org_model_api_daily_limit_default_body import OrganizationsServiceSetOrgModelAPIDailyLimitDefaultBody from lightning_sdk.lightning_cloud.openapi.models.organizations_service_transfer_org_member_resources_body import OrganizationsServiceTransferOrgMemberResourcesBody @@ -214,6 +209,7 @@ from lightning_sdk.lightning_cloud.openapi.models.projects_service_create_project_membership_body import ProjectsServiceCreateProjectMembershipBody from lightning_sdk.lightning_cloud.openapi.models.projects_service_create_project_membership_role_binding_body import ProjectsServiceCreateProjectMembershipRoleBindingBody from lightning_sdk.lightning_cloud.openapi.models.projects_service_create_project_role_body import ProjectsServiceCreateProjectRoleBody +from lightning_sdk.lightning_cloud.openapi.models.projects_service_update_api_key_body import ProjectsServiceUpdateAPIKeyBody from lightning_sdk.lightning_cloud.openapi.models.projects_service_update_project_body import ProjectsServiceUpdateProjectBody from lightning_sdk.lightning_cloud.openapi.models.projects_service_update_project_tab_order_body import ProjectsServiceUpdateProjectTabOrderBody from lightning_sdk.lightning_cloud.openapi.models.protobuf_any import ProtobufAny @@ -221,6 +217,7 @@ from lightning_sdk.lightning_cloud.openapi.models.rpc_status import RpcStatus from lightning_sdk.lightning_cloud.openapi.models.sandboxes_service_create_sandbox_directory_body import SandboxesServiceCreateSandboxDirectoryBody from lightning_sdk.lightning_cloud.openapi.models.sandboxes_service_create_sandbox_snapshot_body import SandboxesServiceCreateSandboxSnapshotBody +from lightning_sdk.lightning_cloud.openapi.models.sandboxes_service_expose_sandbox_ports_body import SandboxesServiceExposeSandboxPortsBody from lightning_sdk.lightning_cloud.openapi.models.sandboxes_service_extend_sandbox_timeout_body import SandboxesServiceExtendSandboxTimeoutBody from lightning_sdk.lightning_cloud.openapi.models.sandboxes_service_finalize_sandbox_snapshot_body import SandboxesServiceFinalizeSandboxSnapshotBody from lightning_sdk.lightning_cloud.openapi.models.sandboxes_service_get_sandbox_snapshot_blob_download_urls_body import SandboxesServiceGetSandboxSnapshotBlobDownloadUrlsBody @@ -262,14 +259,17 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_aer_counter import V1AERCounter from lightning_sdk.lightning_cloud.openapi.models.v1_api_key import V1APIKey from lightning_sdk.lightning_cloud.openapi.models.v1_api_key_budget import V1APIKeyBudget +from lightning_sdk.lightning_cloud.openapi.models.v1_api_key_status import V1APIKeyStatus from lightning_sdk.lightning_cloud.openapi.models.v1_aws_cluster_credentials import V1AWSClusterCredentials from lightning_sdk.lightning_cloud.openapi.models.v1_aws_direct_v1 import V1AWSDirectV1 from lightning_sdk.lightning_cloud.openapi.models.v1_aws_direct_v1_status import V1AWSDirectV1Status from lightning_sdk.lightning_cloud.openapi.models.v1_abort_storage_transfer_response import V1AbortStorageTransferResponse from lightning_sdk.lightning_cloud.openapi.models.v1_accelerator_quota_info import V1AcceleratorQuotaInfo from lightning_sdk.lightning_cloud.openapi.models.v1_accelerator_type import V1AcceleratorType +from lightning_sdk.lightning_cloud.openapi.models.v1_access_cluster_ids_update import V1AccessClusterIdsUpdate from lightning_sdk.lightning_cloud.openapi.models.v1_account_type import V1AccountType from lightning_sdk.lightning_cloud.openapi.models.v1_ack_user_storage_violation_response import V1AckUserStorageViolationResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_activity_subfilter_values import V1ActivitySubfilterValues from lightning_sdk.lightning_cloud.openapi.models.v1_add_job_timing_response import V1AddJobTimingResponse from lightning_sdk.lightning_cloud.openapi.models.v1_affiliate_link import V1AffiliateLink from lightning_sdk.lightning_cloud.openapi.models.v1_agent_job import V1AgentJob @@ -285,6 +285,8 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_assistant import V1Assistant from lightning_sdk.lightning_cloud.openapi.models.v1_assistant_knowledge_item_status import V1AssistantKnowledgeItemStatus from lightning_sdk.lightning_cloud.openapi.models.v1_assistant_knowledge_status import V1AssistantKnowledgeStatus +from lightning_sdk.lightning_cloud.openapi.models.v1_assistant_message_subfilter import V1AssistantMessageSubfilter +from lightning_sdk.lightning_cloud.openapi.models.v1_assistant_message_subfilter_values import V1AssistantMessageSubfilterValues from lightning_sdk.lightning_cloud.openapi.models.v1_assistant_model_status import V1AssistantModelStatus from lightning_sdk.lightning_cloud.openapi.models.v1_assistant_session_daily_aggregated import V1AssistantSessionDailyAggregated from lightning_sdk.lightning_cloud.openapi.models.v1_auth_type import V1AuthType @@ -300,7 +302,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_byom_spec import V1BYOMSpec from lightning_sdk.lightning_cloud.openapi.models.v1_batch_server_check_in_request import V1BatchServerCheckInRequest from lightning_sdk.lightning_cloud.openapi.models.v1_batch_server_check_in_response import V1BatchServerCheckInResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_batch_update_lightningwork_response import V1BatchUpdateLightningworkResponse from lightning_sdk.lightning_cloud.openapi.models.v1_billing_feature import V1BillingFeature from lightning_sdk.lightning_cloud.openapi.models.v1_billing_period import V1BillingPeriod from lightning_sdk.lightning_cloud.openapi.models.v1_billing_subscription import V1BillingSubscription @@ -324,10 +325,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_checkbox import V1Checkbox from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_provider import V1CloudProvider from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space import V1CloudSpace -from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app import V1CloudSpaceApp -from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app_action import V1CloudSpaceAppAction -from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app_action_type import V1CloudSpaceAppActionType -from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app_owner_type import V1CloudSpaceAppOwnerType from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_code_version import V1CloudSpaceCodeVersion from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_code_version_status import V1CloudSpaceCodeVersionStatus from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_cold_start_metrics import V1CloudSpaceColdStartMetrics @@ -363,9 +360,13 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_availability import V1ClusterAvailability from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_capacity_reservation import V1ClusterCapacityReservation from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_deletion_options import V1ClusterDeletionOptions +from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_details import V1ClusterDetails +from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_details_reservation import V1ClusterDetailsReservation +from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_details_server import V1ClusterDetailsServer from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_encryption_key import V1ClusterEncryptionKey from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_metrics import V1ClusterMetrics from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_proxy import V1ClusterProxy +from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_reservation_usage_point import V1ClusterReservationUsagePoint from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_resource_tag import V1ClusterResourceTag from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_sla_daily_metrics import V1ClusterSLADailyMetrics from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_security_options import V1ClusterSecurityOptions @@ -376,6 +377,11 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_type import V1ClusterType from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_upload import V1ClusterUpload from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_usage_restriction import V1ClusterUsageRestriction +from lightning_sdk.lightning_cloud.openapi.models.v1_coding_model_weight import V1CodingModelWeight +from lightning_sdk.lightning_cloud.openapi.models.v1_coding_plan_usage import V1CodingPlanUsage +from lightning_sdk.lightning_cloud.openapi.models.v1_coding_plan_verdict import V1CodingPlanVerdict +from lightning_sdk.lightning_cloud.openapi.models.v1_coding_usage_window import V1CodingUsageWindow +from lightning_sdk.lightning_cloud.openapi.models.v1_coding_usage_window_kind import V1CodingUsageWindowKind from lightning_sdk.lightning_cloud.openapi.models.v1_collab_action import V1CollabAction from lightning_sdk.lightning_cloud.openapi.models.v1_collab_session import V1CollabSession from lightning_sdk.lightning_cloud.openapi.models.v1_complete_model_upload_response import V1CompleteModelUploadResponse @@ -401,7 +407,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_create_billing_upgrade_trigger_record_response import V1CreateBillingUpgradeTriggerRecordResponse from lightning_sdk.lightning_cloud.openapi.models.v1_create_checkout_session_request import V1CreateCheckoutSessionRequest from lightning_sdk.lightning_cloud.openapi.models.v1_create_checkout_session_response import V1CreateCheckoutSessionResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_create_cloud_space_app_instance_response import V1CreateCloudSpaceAppInstanceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_create_cloud_space_environment_template_request import V1CreateCloudSpaceEnvironmentTemplateRequest from lightning_sdk.lightning_cloud.openapi.models.v1_create_cloud_space_instance_metric_response import V1CreateCloudSpaceInstanceMetricResponse from lightning_sdk.lightning_cloud.openapi.models.v1_create_cluster_capacity_reservation_response import V1CreateClusterCapacityReservationResponse @@ -454,7 +459,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_api_key_response import V1DeleteAPIKeyResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_affiliate_link_response import V1DeleteAffiliateLinkResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_assistant_response import V1DeleteAssistantResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cloud_space_app_response import V1DeleteCloudSpaceAppResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cloud_space_environment_template_response import V1DeleteCloudSpaceEnvironmentTemplateResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cloud_space_response import V1DeleteCloudSpaceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cloud_space_session_response import V1DeleteCloudSpaceSessionResponse @@ -480,7 +484,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_license_response import V1DeleteLicenseResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lightning_run_response import V1DeleteLightningRunResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lightningapp_instance_response import V1DeleteLightningappInstanceResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lightningwork_response import V1DeleteLightningworkResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lit_logger_media_response import V1DeleteLitLoggerMediaResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lit_registry_repository_image_artifact_version_by_digest_response import V1DeleteLitRegistryRepositoryImageArtifactVersionByDigestResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lit_repository_response import V1DeleteLitRepositoryResponse @@ -506,6 +509,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_project_membership_role_binding_response import V1DeleteProjectMembershipRoleBindingResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_project_response import V1DeleteProjectResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_project_role_response import V1DeleteProjectRoleResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_delete_published_model_response import V1DeletePublishedModelResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_ssh_public_key_response import V1DeleteSSHPublicKeyResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_sandbox_response import V1DeleteSandboxResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_sandbox_snapshot_response import V1DeleteSandboxSnapshotResponse @@ -579,6 +583,8 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_usage import V1FilesystemUsage from lightning_sdk.lightning_cloud.openapi.models.v1_find_capacity_block_offering_response import V1FindCapacityBlockOfferingResponse from lightning_sdk.lightning_cloud.openapi.models.v1_firewall_rule import V1FirewallRule +from lightning_sdk.lightning_cloud.openapi.models.v1_firmware_entry import V1FirmwareEntry +from lightning_sdk.lightning_cloud.openapi.models.v1_firmware_inventory import V1FirmwareInventory from lightning_sdk.lightning_cloud.openapi.models.v1_flowserver import V1Flowserver from lightning_sdk.lightning_cloud.openapi.models.v1_function_call import V1FunctionCall from lightning_sdk.lightning_cloud.openapi.models.v1_function_tool import V1FunctionTool @@ -595,8 +601,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_gpu_diagnostic_userspace_lib_info import V1GPUDiagnosticUserspaceLibInfo from lightning_sdk.lightning_cloud.openapi.models.v1_gpu_status import V1GPUStatus from lightning_sdk.lightning_cloud.openapi.models.v1_gpu_system_metrics import V1GPUSystemMetrics -from lightning_sdk.lightning_cloud.openapi.models.v1_gallery_app import V1GalleryApp -from lightning_sdk.lightning_cloud.openapi.models.v1_gallery_component import V1GalleryComponent from lightning_sdk.lightning_cloud.openapi.models.v1_gcp_data_connection import V1GcpDataConnection from lightning_sdk.lightning_cloud.openapi.models.v1_gcp_data_connection_setup import V1GcpDataConnectionSetup from lightning_sdk.lightning_cloud.openapi.models.v1_ge_list_deployment_routing_telemetry_response import V1GeListDeploymentRoutingTelemetryResponse @@ -604,6 +608,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_generic_job import V1GenericJob from lightning_sdk.lightning_cloud.openapi.models.v1_generic_job_spec import V1GenericJobSpec from lightning_sdk.lightning_cloud.openapi.models.v1_get_account_balance_response import V1GetAccountBalanceResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_activity_filter_resource_names_response import V1GetActivityFilterResourceNamesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_activity_filter_values_response import V1GetActivityFilterValuesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_affiliate_link_response import V1GetAffiliateLinkResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_assistant_session_daily_aggregated_response import V1GetAssistantSessionDailyAggregatedResponse @@ -617,7 +622,10 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_accelerator_demand_response import V1GetClusterAcceleratorDemandResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_capacity_reservation_response import V1GetClusterCapacityReservationResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_credentials_response import V1GetClusterCredentialsResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_details_response import V1GetClusterDetailsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_health_response import V1GetClusterHealthResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_reservation_usage_response import V1GetClusterReservationUsageResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_coding_usage_response import V1GetCodingUsageResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_deployment_routing_telemetry_aggregated_response import V1GetDeploymentRoutingTelemetryAggregatedResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_deployment_routing_telemetry_content_csv_response import V1GetDeploymentRoutingTelemetryContentCSVResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_deployment_routing_telemetry_content_response import V1GetDeploymentRoutingTelemetryContentResponse @@ -626,6 +634,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_inference_rate_limit_response import V1GetInferenceRateLimitResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_job_stats_response import V1GetJobStatsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_job_system_metrics_response import V1GetJobSystemMetricsResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_k8_s_cluster_kubeconfig_url_response import V1GetK8SClusterKubeconfigURLResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_k8s_cluster_report_data_response import V1GetK8sClusterReportDataResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_k8s_cluster_sla_metrics_response import V1GetK8sClusterSLAMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_kubernetes_pod_logs_response import V1GetKubernetesPodLogsResponse @@ -633,7 +642,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_kubernetes_py_torch_job_response import V1GetKubernetesPyTorchJobResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_latest_model_metrics_response import V1GetLatestModelMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_lightning_run_source_code_download_url_response import V1GetLightningRunSourceCodeDownloadUrlResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_get_lightningapp_instance_open_ports_response import V1GetLightningappInstanceOpenPortsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_lightningapp_instance_system_metrics_response import V1GetLightningappInstanceSystemMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_logger_metrics_response import V1GetLoggerMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_logger_metrics_summary_response import V1GetLoggerMetricsSummaryResponse @@ -641,6 +649,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_long_running_command_in_cloud_space_response import V1GetLongRunningCommandInCloudSpaceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_machine_details_response import V1GetMachineDetailsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_machine_response import V1GetMachineResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_machine_setup_url_response import V1GetMachineSetupURLResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_machine_system_metrics_response import V1GetMachineSystemMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_model_domain_response import V1GetModelDomainResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_model_file_upload_urls_response import V1GetModelFileUploadUrlsResponse @@ -657,6 +666,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_project_balance_response import V1GetProjectBalanceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_project_compute_usage_response import V1GetProjectComputeUsageResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_project_storage_metadata_response import V1GetProjectStorageMetadataResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_get_ssh_setup_url_response import V1GetSSHSetupURLResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_sandbox_command_logs_response import V1GetSandboxCommandLogsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_sandbox_command_response import V1GetSandboxCommandResponse from lightning_sdk.lightning_cloud.openapi.models.v1_get_sandbox_file_response import V1GetSandboxFileResponse @@ -693,12 +703,16 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_health_check_exec import V1HealthCheckExec from lightning_sdk.lightning_cloud.openapi.models.v1_health_check_http_get import V1HealthCheckHttpGet from lightning_sdk.lightning_cloud.openapi.models.v1_host_health import V1HostHealth +from lightning_sdk.lightning_cloud.openapi.models.v1_host_ibguid_rail import V1HostIBGUIDRail +from lightning_sdk.lightning_cloud.openapi.models.v1_host_ibp_keys_health import V1HostIBPKeysHealth +from lightning_sdk.lightning_cloud.openapi.models.v1_host_ib_rail_p_keys import V1HostIBRailPKeys from lightning_sdk.lightning_cloud.openapi.models.v1_host_storage import V1HostStorage from lightning_sdk.lightning_cloud.openapi.models.v1_hugepage_pool import V1HugepagePool from lightning_sdk.lightning_cloud.openapi.models.v1_ib_device_info import V1IBDeviceInfo from lightning_sdk.lightning_cloud.openapi.models.v1_ids_logger_metrics import V1IdsLoggerMetrics from lightning_sdk.lightning_cloud.openapi.models.v1_image_spec import V1ImageSpec from lightning_sdk.lightning_cloud.openapi.models.v1_image_state import V1ImageState +from lightning_sdk.lightning_cloud.openapi.models.v1_inband_netplan_health import V1InbandNetplanHealth from lightning_sdk.lightning_cloud.openapi.models.v1_index import V1Index from lightning_sdk.lightning_cloud.openapi.models.v1_infiniband_tier import V1InfinibandTier from lightning_sdk.lightning_cloud.openapi.models.v1_input import V1Input @@ -768,7 +782,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_aggregated_pod_metrics_response import V1ListAggregatedPodMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_all_jobs_response import V1ListAllJobsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_assistants_response import V1ListAssistantsResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_list_cloud_space_apps_response import V1ListCloudSpaceAppsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_cloud_space_cold_start_metrics_response import V1ListCloudSpaceColdStartMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_cloud_space_environment_templates_response import V1ListCloudSpaceEnvironmentTemplatesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_cloud_space_instances_response import V1ListCloudSpaceInstancesResponse @@ -788,6 +801,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_metrics_response import V1ListClusterMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_namespace_metrics_response import V1ListClusterNamespaceMetricsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_proxies_response import V1ListClusterProxiesResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_reservations_for_usage_response import V1ListClusterReservationsForUsageResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_usage_restrictions_response import V1ListClusterUsageRestrictionsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_clusters_response import V1ListClustersResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_container_metrics_response import V1ListContainerMetricsResponse @@ -807,8 +821,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_endpoints_response import V1ListEndpointsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_experiments_response import V1ListExperimentsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_metrics_response import V1ListFilesystemMetricsResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_list_gallery_components_response import V1ListGalleryComponentsResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_list_gallery_lightningapps_response import V1ListGalleryLightningappsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_git_credentials_response import V1ListGitCredentialsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_git_providers_response import V1ListGitProvidersResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_gpu_telemetry_response import V1ListGpuTelemetryResponse @@ -877,6 +889,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_project_membership_role_binding_response import V1ListProjectMembershipRoleBindingResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_project_memberships_response import V1ListProjectMembershipsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_project_roles_response import V1ListProjectRolesResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_list_provider_fleet_response import V1ListProviderFleetResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_published_cloud_spaces_response import V1ListPublishedCloudSpacesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_published_deployment_templates_response import V1ListPublishedDeploymentTemplatesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_published_managed_endpoints_response import V1ListPublishedManagedEndpointsResponse @@ -911,13 +924,17 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_machine_alert import V1MachineAlert from lightning_sdk.lightning_cloud.openapi.models.v1_machine_architecture import V1MachineArchitecture from lightning_sdk.lightning_cloud.openapi.models.v1_machine_bootstrap import V1MachineBootstrap +from lightning_sdk.lightning_cloud.openapi.models.v1_machine_customer_network import V1MachineCustomerNetwork from lightning_sdk.lightning_cloud.openapi.models.v1_machine_details import V1MachineDetails from lightning_sdk.lightning_cloud.openapi.models.v1_machine_direct_v1 import V1MachineDirectV1 +from lightning_sdk.lightning_cloud.openapi.models.v1_machine_exclusion import V1MachineExclusion from lightning_sdk.lightning_cloud.openapi.models.v1_machine_health import V1MachineHealth from lightning_sdk.lightning_cloud.openapi.models.v1_machine_image_status import V1MachineImageStatus from lightning_sdk.lightning_cloud.openapi.models.v1_machine_system_info import V1MachineSystemInfo from lightning_sdk.lightning_cloud.openapi.models.v1_machine_system_metrics import V1MachineSystemMetrics from lightning_sdk.lightning_cloud.openapi.models.v1_machine_v1_status import V1MachineV1Status +from lightning_sdk.lightning_cloud.openapi.models.v1_machine_vpn_service_unit import V1MachineVPNServiceUnit +from lightning_sdk.lightning_cloud.openapi.models.v1_machine_vpn_services_status import V1MachineVPNServicesStatus from lightning_sdk.lightning_cloud.openapi.models.v1_machines_selector import V1MachinesSelector from lightning_sdk.lightning_cloud.openapi.models.v1_magic_link_login_request import V1MagicLinkLoginRequest from lightning_sdk.lightning_cloud.openapi.models.v1_magic_link_login_response import V1MagicLinkLoginResponse @@ -1038,6 +1055,9 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_project_tab import V1ProjectTab from lightning_sdk.lightning_cloud.openapi.models.v1_promo_overlay import V1PromoOverlay from lightning_sdk.lightning_cloud.openapi.models.v1_prompt_suggestion import V1PromptSuggestion +from lightning_sdk.lightning_cloud.openapi.models.v1_provider_fleet_node import V1ProviderFleetNode +from lightning_sdk.lightning_cloud.openapi.models.v1_provider_fleet_owner import V1ProviderFleetOwner +from lightning_sdk.lightning_cloud.openapi.models.v1_provider_fleet_usage_point import V1ProviderFleetUsagePoint from lightning_sdk.lightning_cloud.openapi.models.v1_publish_cloud_space_response import V1PublishCloudSpaceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_publish_community_model_request import V1PublishCommunityModelRequest from lightning_sdk.lightning_cloud.openapi.models.v1_publish_shared_artifact_response import V1PublishSharedArtifactResponse @@ -1139,6 +1159,9 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_secret import V1Secret from lightning_sdk.lightning_cloud.openapi.models.v1_secret_type import V1SecretType from lightning_sdk.lightning_cloud.openapi.models.v1_select import V1Select +from lightning_sdk.lightning_cloud.openapi.models.v1_sentinel_one_health import V1SentinelOneHealth +from lightning_sdk.lightning_cloud.openapi.models.v1_sentinel_one_mitigation import V1SentinelOneMitigation +from lightning_sdk.lightning_cloud.openapi.models.v1_sentinel_one_state import V1SentinelOneState from lightning_sdk.lightning_cloud.openapi.models.v1_series_config import V1SeriesConfig from lightning_sdk.lightning_cloud.openapi.models.v1_series_type import V1SeriesType from lightning_sdk.lightning_cloud.openapi.models.v1_server import V1Server @@ -1153,6 +1176,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_server_status import V1ServerStatus from lightning_sdk.lightning_cloud.openapi.models.v1_server_type import V1ServerType from lightning_sdk.lightning_cloud.openapi.models.v1_service_health import V1ServiceHealth +from lightning_sdk.lightning_cloud.openapi.models.v1_set_machine_vpn_services_response import V1SetMachineVPNServicesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_set_org_member_model_api_daily_limit_response import V1SetOrgMemberModelAPIDailyLimitResponse from lightning_sdk.lightning_cloud.openapi.models.v1_set_org_model_api_daily_limit_default_response import V1SetOrgModelAPIDailyLimitDefaultResponse from lightning_sdk.lightning_cloud.openapi.models.v1_set_workload_tags_response import V1SetWorkloadTagsResponse @@ -1181,6 +1205,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_storage_asset import V1StorageAsset from lightning_sdk.lightning_cloud.openapi.models.v1_storage_asset_type import V1StorageAssetType from lightning_sdk.lightning_cloud.openapi.models.v1_storage_category import V1StorageCategory +from lightning_sdk.lightning_cloud.openapi.models.v1_storage_limit_reason import V1StorageLimitReason from lightning_sdk.lightning_cloud.openapi.models.v1_storage_metadata_sort_by import V1StorageMetadataSortBy from lightning_sdk.lightning_cloud.openapi.models.v1_storage_metadata_sort_order import V1StorageMetadataSortOrder from lightning_sdk.lightning_cloud.openapi.models.v1_storage_system_metrics import V1StorageSystemMetrics @@ -1224,6 +1249,8 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_update_cluster_accelerators_request import V1UpdateClusterAcceleratorsRequest from lightning_sdk.lightning_cloud.openapi.models.v1_update_cluster_accelerators_response import V1UpdateClusterAcceleratorsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_update_cluster_availability_request import V1UpdateClusterAvailabilityRequest +from lightning_sdk.lightning_cloud.openapi.models.v1_update_coding_usage_settings_request import V1UpdateCodingUsageSettingsRequest +from lightning_sdk.lightning_cloud.openapi.models.v1_update_coding_usage_settings_response import V1UpdateCodingUsageSettingsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_update_conversation_like_response import V1UpdateConversationLikeResponse from lightning_sdk.lightning_cloud.openapi.models.v1_update_conversation_message_content_response import V1UpdateConversationMessageContentResponse from lightning_sdk.lightning_cloud.openapi.models.v1_update_conversation_message_like_response import V1UpdateConversationMessageLikeResponse @@ -1257,6 +1284,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_upstream_open_ai import V1UpstreamOpenAI from lightning_sdk.lightning_cloud.openapi.models.v1_usage import V1Usage from lightning_sdk.lightning_cloud.openapi.models.v1_usage_details import V1UsageDetails +from lightning_sdk.lightning_cloud.openapi.models.v1_usage_report_subfilters import V1UsageReportSubfilters from lightning_sdk.lightning_cloud.openapi.models.v1_usage_report_v1 import V1UsageReportV1 from lightning_sdk.lightning_cloud.openapi.models.v1_usage_report_v2 import V1UsageReportV2 from lightning_sdk.lightning_cloud.openapi.models.v1_user_features import V1UserFeatures @@ -1282,14 +1310,14 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_validate_storage_transfer_response import V1ValidateStorageTransferResponse from lightning_sdk.lightning_cloud.openapi.models.v1_vast_data_connection import V1VastDataConnection from lightning_sdk.lightning_cloud.openapi.models.v1_verify_verification_response import V1VerifyVerificationResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_voltage_park_direct_v1 import V1VoltageParkDirectV1 from lightning_sdk.lightning_cloud.openapi.models.v1_volume import V1Volume from lightning_sdk.lightning_cloud.openapi.models.v1_volume_state import V1VolumeState -from lightning_sdk.lightning_cloud.openapi.models.v1_vultr_direct_v1 import V1VultrDirectV1 from lightning_sdk.lightning_cloud.openapi.models.v1_weight_source import V1WeightSource from lightning_sdk.lightning_cloud.openapi.models.v1_whoami_response import V1WhoamiResponse from lightning_sdk.lightning_cloud.openapi.models.v1_work import V1Work +from lightning_sdk.lightning_cloud.openapi.models.v1_workload_subfilter_values import V1WorkloadSubfilterValues from lightning_sdk.lightning_cloud.openapi.models.v1_workload_tag import V1WorkloadTag +from lightning_sdk.lightning_cloud.openapi.models.v1_workload_tag_subfilter import V1WorkloadTagSubfilter from lightning_sdk.lightning_cloud.openapi.models.v1_write_sandbox_file_response import V1WriteSandboxFileResponse from lightning_sdk.lightning_cloud.openapi.models.v1_xid_error_behavior import V1XidErrorBehavior from lightning_sdk.lightning_cloud.openapi.models.v1_xid_error_behavior_map import V1XidErrorBehaviorMap diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/assistants_service_set_model_publish_status_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/assistants_service_set_model_publish_status_body.py new file mode 100644 index 000000000..2209fc2a3 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/assistants_service_set_model_publish_status_body.py @@ -0,0 +1,127 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class AssistantsServiceSetModelPublishStatusBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'publish_status': 'str' + } + + attribute_map = { + 'publish_status': 'publishStatus' + } + + def __init__(self, publish_status: 'str' =None): # noqa: E501 + """AssistantsServiceSetModelPublishStatusBody - a model defined in Swagger""" # noqa: E501 + self._publish_status = None + self.discriminator = None + if publish_status is not None: + self.publish_status = publish_status + + @property + def publish_status(self) -> 'str': + """Gets the publish_status of this AssistantsServiceSetModelPublishStatusBody. # noqa: E501 + + + :return: The publish_status of this AssistantsServiceSetModelPublishStatusBody. # noqa: E501 + :rtype: str + """ + return self._publish_status + + @publish_status.setter + def publish_status(self, publish_status: 'str'): + """Sets the publish_status of this AssistantsServiceSetModelPublishStatusBody. + + + :param publish_status: The publish_status of this AssistantsServiceSetModelPublishStatusBody. # noqa: E501 + :type: str + """ + + self._publish_status = publish_status + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AssistantsServiceSetModelPublishStatusBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'AssistantsServiceSetModelPublishStatusBody') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, AssistantsServiceSetModelPublishStatusBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'AssistantsServiceSetModelPublishStatusBody') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/assistants_service_update_model_pricing_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/assistants_service_update_model_pricing_body.py new file mode 100644 index 000000000..6c63af4c6 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/assistants_service_update_model_pricing_body.py @@ -0,0 +1,335 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class AssistantsServiceUpdateModelPricingBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'base_message_price': 'float', + 'cache_creation_token_price': 'float', + 'cache_creation_token_price1h': 'float', + 'cache_read_token_price': 'float', + 'completion_token_price': 'float', + 'completion_token_price_above_threshold': 'float', + 'prompt_token_price': 'float', + 'prompt_token_price_above_threshold': 'float', + 'token_threshold': 'str' + } + + attribute_map = { + 'base_message_price': 'baseMessagePrice', + 'cache_creation_token_price': 'cacheCreationTokenPrice', + 'cache_creation_token_price1h': 'cacheCreationTokenPrice1h', + 'cache_read_token_price': 'cacheReadTokenPrice', + 'completion_token_price': 'completionTokenPrice', + 'completion_token_price_above_threshold': 'completionTokenPriceAboveThreshold', + 'prompt_token_price': 'promptTokenPrice', + 'prompt_token_price_above_threshold': 'promptTokenPriceAboveThreshold', + 'token_threshold': 'tokenThreshold' + } + + def __init__(self, base_message_price: 'float' =None, cache_creation_token_price: 'float' =None, cache_creation_token_price1h: 'float' =None, cache_read_token_price: 'float' =None, completion_token_price: 'float' =None, completion_token_price_above_threshold: 'float' =None, prompt_token_price: 'float' =None, prompt_token_price_above_threshold: 'float' =None, token_threshold: 'str' =None): # noqa: E501 + """AssistantsServiceUpdateModelPricingBody - a model defined in Swagger""" # noqa: E501 + self._base_message_price = None + self._cache_creation_token_price = None + self._cache_creation_token_price1h = None + self._cache_read_token_price = None + self._completion_token_price = None + self._completion_token_price_above_threshold = None + self._prompt_token_price = None + self._prompt_token_price_above_threshold = None + self._token_threshold = None + self.discriminator = None + if base_message_price is not None: + self.base_message_price = base_message_price + if cache_creation_token_price is not None: + self.cache_creation_token_price = cache_creation_token_price + if cache_creation_token_price1h is not None: + self.cache_creation_token_price1h = cache_creation_token_price1h + if cache_read_token_price is not None: + self.cache_read_token_price = cache_read_token_price + if completion_token_price is not None: + self.completion_token_price = completion_token_price + if completion_token_price_above_threshold is not None: + self.completion_token_price_above_threshold = completion_token_price_above_threshold + if prompt_token_price is not None: + self.prompt_token_price = prompt_token_price + if prompt_token_price_above_threshold is not None: + self.prompt_token_price_above_threshold = prompt_token_price_above_threshold + if token_threshold is not None: + self.token_threshold = token_threshold + + @property + def base_message_price(self) -> 'float': + """Gets the base_message_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + + + :return: The base_message_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :rtype: float + """ + return self._base_message_price + + @base_message_price.setter + def base_message_price(self, base_message_price: 'float'): + """Sets the base_message_price of this AssistantsServiceUpdateModelPricingBody. + + + :param base_message_price: The base_message_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :type: float + """ + + self._base_message_price = base_message_price + + @property + def cache_creation_token_price(self) -> 'float': + """Gets the cache_creation_token_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + + + :return: The cache_creation_token_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :rtype: float + """ + return self._cache_creation_token_price + + @cache_creation_token_price.setter + def cache_creation_token_price(self, cache_creation_token_price: 'float'): + """Sets the cache_creation_token_price of this AssistantsServiceUpdateModelPricingBody. + + + :param cache_creation_token_price: The cache_creation_token_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :type: float + """ + + self._cache_creation_token_price = cache_creation_token_price + + @property + def cache_creation_token_price1h(self) -> 'float': + """Gets the cache_creation_token_price1h of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + + + :return: The cache_creation_token_price1h of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :rtype: float + """ + return self._cache_creation_token_price1h + + @cache_creation_token_price1h.setter + def cache_creation_token_price1h(self, cache_creation_token_price1h: 'float'): + """Sets the cache_creation_token_price1h of this AssistantsServiceUpdateModelPricingBody. + + + :param cache_creation_token_price1h: The cache_creation_token_price1h of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :type: float + """ + + self._cache_creation_token_price1h = cache_creation_token_price1h + + @property + def cache_read_token_price(self) -> 'float': + """Gets the cache_read_token_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + + + :return: The cache_read_token_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :rtype: float + """ + return self._cache_read_token_price + + @cache_read_token_price.setter + def cache_read_token_price(self, cache_read_token_price: 'float'): + """Sets the cache_read_token_price of this AssistantsServiceUpdateModelPricingBody. + + + :param cache_read_token_price: The cache_read_token_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :type: float + """ + + self._cache_read_token_price = cache_read_token_price + + @property + def completion_token_price(self) -> 'float': + """Gets the completion_token_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + + + :return: The completion_token_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :rtype: float + """ + return self._completion_token_price + + @completion_token_price.setter + def completion_token_price(self, completion_token_price: 'float'): + """Sets the completion_token_price of this AssistantsServiceUpdateModelPricingBody. + + + :param completion_token_price: The completion_token_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :type: float + """ + + self._completion_token_price = completion_token_price + + @property + def completion_token_price_above_threshold(self) -> 'float': + """Gets the completion_token_price_above_threshold of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + + + :return: The completion_token_price_above_threshold of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :rtype: float + """ + return self._completion_token_price_above_threshold + + @completion_token_price_above_threshold.setter + def completion_token_price_above_threshold(self, completion_token_price_above_threshold: 'float'): + """Sets the completion_token_price_above_threshold of this AssistantsServiceUpdateModelPricingBody. + + + :param completion_token_price_above_threshold: The completion_token_price_above_threshold of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :type: float + """ + + self._completion_token_price_above_threshold = completion_token_price_above_threshold + + @property + def prompt_token_price(self) -> 'float': + """Gets the prompt_token_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + + + :return: The prompt_token_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :rtype: float + """ + return self._prompt_token_price + + @prompt_token_price.setter + def prompt_token_price(self, prompt_token_price: 'float'): + """Sets the prompt_token_price of this AssistantsServiceUpdateModelPricingBody. + + + :param prompt_token_price: The prompt_token_price of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :type: float + """ + + self._prompt_token_price = prompt_token_price + + @property + def prompt_token_price_above_threshold(self) -> 'float': + """Gets the prompt_token_price_above_threshold of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + + + :return: The prompt_token_price_above_threshold of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :rtype: float + """ + return self._prompt_token_price_above_threshold + + @prompt_token_price_above_threshold.setter + def prompt_token_price_above_threshold(self, prompt_token_price_above_threshold: 'float'): + """Sets the prompt_token_price_above_threshold of this AssistantsServiceUpdateModelPricingBody. + + + :param prompt_token_price_above_threshold: The prompt_token_price_above_threshold of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :type: float + """ + + self._prompt_token_price_above_threshold = prompt_token_price_above_threshold + + @property + def token_threshold(self) -> 'str': + """Gets the token_threshold of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + + + :return: The token_threshold of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :rtype: str + """ + return self._token_threshold + + @token_threshold.setter + def token_threshold(self, token_threshold: 'str'): + """Sets the token_threshold of this AssistantsServiceUpdateModelPricingBody. + + + :param token_threshold: The token_threshold of this AssistantsServiceUpdateModelPricingBody. # noqa: E501 + :type: str + """ + + self._token_threshold = token_threshold + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AssistantsServiceUpdateModelPricingBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'AssistantsServiceUpdateModelPricingBody') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, AssistantsServiceUpdateModelPricingBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'AssistantsServiceUpdateModelPricingBody') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/assistants_service_update_model_serving_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/assistants_service_update_model_serving_body.py new file mode 100644 index 000000000..cdd870f1f --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/assistants_service_update_model_serving_body.py @@ -0,0 +1,181 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class AssistantsServiceUpdateModelServingBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'api_key': 'str', + 'api_type': 'str', + 'base_url': 'str' + } + + attribute_map = { + 'api_key': 'apiKey', + 'api_type': 'apiType', + 'base_url': 'baseUrl' + } + + def __init__(self, api_key: 'str' =None, api_type: 'str' =None, base_url: 'str' =None): # noqa: E501 + """AssistantsServiceUpdateModelServingBody - a model defined in Swagger""" # noqa: E501 + self._api_key = None + self._api_type = None + self._base_url = None + self.discriminator = None + if api_key is not None: + self.api_key = api_key + if api_type is not None: + self.api_type = api_type + if base_url is not None: + self.base_url = base_url + + @property + def api_key(self) -> 'str': + """Gets the api_key of this AssistantsServiceUpdateModelServingBody. # noqa: E501 + + Key sent upstream. When unset, a Lightning deployment or Studio URL uses that endpoint's own token, and the same host keeps the stored key; any other host requires one. # noqa: E501 + + :return: The api_key of this AssistantsServiceUpdateModelServingBody. # noqa: E501 + :rtype: str + """ + return self._api_key + + @api_key.setter + def api_key(self, api_key: 'str'): + """Sets the api_key of this AssistantsServiceUpdateModelServingBody. + + Key sent upstream. When unset, a Lightning deployment or Studio URL uses that endpoint's own token, and the same host keeps the stored key; any other host requires one. # noqa: E501 + + :param api_key: The api_key of this AssistantsServiceUpdateModelServingBody. # noqa: E501 + :type: str + """ + + self._api_key = api_key + + @property + def api_type(self) -> 'str': + """Gets the api_type of this AssistantsServiceUpdateModelServingBody. # noqa: E501 + + + :return: The api_type of this AssistantsServiceUpdateModelServingBody. # noqa: E501 + :rtype: str + """ + return self._api_type + + @api_type.setter + def api_type(self, api_type: 'str'): + """Sets the api_type of this AssistantsServiceUpdateModelServingBody. + + + :param api_type: The api_type of this AssistantsServiceUpdateModelServingBody. # noqa: E501 + :type: str + """ + + self._api_type = api_type + + @property + def base_url(self) -> 'str': + """Gets the base_url of this AssistantsServiceUpdateModelServingBody. # noqa: E501 + + + :return: The base_url of this AssistantsServiceUpdateModelServingBody. # noqa: E501 + :rtype: str + """ + return self._base_url + + @base_url.setter + def base_url(self, base_url: 'str'): + """Sets the base_url of this AssistantsServiceUpdateModelServingBody. + + + :param base_url: The base_url of this AssistantsServiceUpdateModelServingBody. # noqa: E501 + :type: str + """ + + self._base_url = base_url + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AssistantsServiceUpdateModelServingBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'AssistantsServiceUpdateModelServingBody') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, AssistantsServiceUpdateModelServingBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'AssistantsServiceUpdateModelServingBody') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/cloud_space_service_create_cloud_space_app_instance_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/cloud_space_service_create_cloud_space_app_instance_body.py deleted file mode 100644 index 0db5c6d37..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/models/cloud_space_service_create_cloud_space_app_instance_body.py +++ /dev/null @@ -1,283 +0,0 @@ -# coding: utf-8 -# This file is vendored. -# Do not edit it directly; changes will be overwritten. -# Make changes in the internal upstream repository instead. - - -""" - external/v1/auth_service.proto - - No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - - OpenAPI spec version: version not set - - Generated by: https://github.com/swagger-api/swagger-codegen.git - - NOTE - ---- - standard swagger-codegen-cli for this python client has been modified - by custom templates. The purpose of these templates is to include - typing information in the API and Model code. Please refer to the - main grid repository for more info -""" - -import pprint -import re # noqa: F401 - -from typing import TYPE_CHECKING - -import six - -if TYPE_CHECKING: - from datetime import datetime - from lightning_sdk.lightning_cloud.openapi.models import * - -class CloudSpaceServiceCreateCloudSpaceAppInstanceBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'cluster_id': 'str', - 'keep_machines_after_stop': 'bool', - 'machines_reservation_time_minutes': 'str', - 'plugin_arguments': 'dict(str, str)', - 'service_id': 'str', - 'source_app': 'str', - 'unique_id': 'str' - } - - attribute_map = { - 'cluster_id': 'clusterId', - 'keep_machines_after_stop': 'keepMachinesAfterStop', - 'machines_reservation_time_minutes': 'machinesReservationTimeMinutes', - 'plugin_arguments': 'pluginArguments', - 'service_id': 'serviceId', - 'source_app': 'sourceApp', - 'unique_id': 'uniqueId' - } - - def __init__(self, cluster_id: 'str' =None, keep_machines_after_stop: 'bool' =None, machines_reservation_time_minutes: 'str' =None, plugin_arguments: 'dict(str, str)' =None, service_id: 'str' =None, source_app: 'str' =None, unique_id: 'str' =None): # noqa: E501 - """CloudSpaceServiceCreateCloudSpaceAppInstanceBody - a model defined in Swagger""" # noqa: E501 - self._cluster_id = None - self._keep_machines_after_stop = None - self._machines_reservation_time_minutes = None - self._plugin_arguments = None - self._service_id = None - self._source_app = None - self._unique_id = None - self.discriminator = None - if cluster_id is not None: - self.cluster_id = cluster_id - if keep_machines_after_stop is not None: - self.keep_machines_after_stop = keep_machines_after_stop - if machines_reservation_time_minutes is not None: - self.machines_reservation_time_minutes = machines_reservation_time_minutes - if plugin_arguments is not None: - self.plugin_arguments = plugin_arguments - if service_id is not None: - self.service_id = service_id - if source_app is not None: - self.source_app = source_app - if unique_id is not None: - self.unique_id = unique_id - - @property - def cluster_id(self) -> 'str': - """Gets the cluster_id of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - - - :return: The cluster_id of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :rtype: str - """ - return self._cluster_id - - @cluster_id.setter - def cluster_id(self, cluster_id: 'str'): - """Sets the cluster_id of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. - - - :param cluster_id: The cluster_id of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :type: str - """ - - self._cluster_id = cluster_id - - @property - def keep_machines_after_stop(self) -> 'bool': - """Gets the keep_machines_after_stop of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - - - :return: The keep_machines_after_stop of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :rtype: bool - """ - return self._keep_machines_after_stop - - @keep_machines_after_stop.setter - def keep_machines_after_stop(self, keep_machines_after_stop: 'bool'): - """Sets the keep_machines_after_stop of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. - - - :param keep_machines_after_stop: The keep_machines_after_stop of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :type: bool - """ - - self._keep_machines_after_stop = keep_machines_after_stop - - @property - def machines_reservation_time_minutes(self) -> 'str': - """Gets the machines_reservation_time_minutes of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - - - :return: The machines_reservation_time_minutes of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :rtype: str - """ - return self._machines_reservation_time_minutes - - @machines_reservation_time_minutes.setter - def machines_reservation_time_minutes(self, machines_reservation_time_minutes: 'str'): - """Sets the machines_reservation_time_minutes of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. - - - :param machines_reservation_time_minutes: The machines_reservation_time_minutes of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :type: str - """ - - self._machines_reservation_time_minutes = machines_reservation_time_minutes - - @property - def plugin_arguments(self) -> 'dict(str, str)': - """Gets the plugin_arguments of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - - - :return: The plugin_arguments of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :rtype: dict(str, str) - """ - return self._plugin_arguments - - @plugin_arguments.setter - def plugin_arguments(self, plugin_arguments: 'dict(str, str)'): - """Sets the plugin_arguments of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. - - - :param plugin_arguments: The plugin_arguments of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :type: dict(str, str) - """ - - self._plugin_arguments = plugin_arguments - - @property - def service_id(self) -> 'str': - """Gets the service_id of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - - - :return: The service_id of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :rtype: str - """ - return self._service_id - - @service_id.setter - def service_id(self, service_id: 'str'): - """Sets the service_id of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. - - - :param service_id: The service_id of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :type: str - """ - - self._service_id = service_id - - @property - def source_app(self) -> 'str': - """Gets the source_app of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - - - :return: The source_app of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :rtype: str - """ - return self._source_app - - @source_app.setter - def source_app(self, source_app: 'str'): - """Sets the source_app of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. - - - :param source_app: The source_app of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :type: str - """ - - self._source_app = source_app - - @property - def unique_id(self) -> 'str': - """Gets the unique_id of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - - - :return: The unique_id of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :rtype: str - """ - return self._unique_id - - @unique_id.setter - def unique_id(self, unique_id: 'str'): - """Sets the unique_id of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. - - - :param unique_id: The unique_id of this CloudSpaceServiceCreateCloudSpaceAppInstanceBody. # noqa: E501 - :type: str - """ - - self._unique_id = unique_id - - def to_dict(self) -> dict: - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(CloudSpaceServiceCreateCloudSpaceAppInstanceBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self) -> str: - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other: 'CloudSpaceServiceCreateCloudSpaceAppInstanceBody') -> bool: - """Returns true if both objects are equal""" - if not isinstance(other, CloudSpaceServiceCreateCloudSpaceAppInstanceBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'CloudSpaceServiceCreateCloudSpaceAppInstanceBody') -> bool: - """Returns true if both objects are not equal""" - return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/cloud_space_service_create_lightning_run_instance_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/cloud_space_service_create_lightning_run_instance_body.py deleted file mode 100644 index dfc87c700..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/models/cloud_space_service_create_lightning_run_instance_body.py +++ /dev/null @@ -1,415 +0,0 @@ -# coding: utf-8 -# This file is vendored. -# Do not edit it directly; changes will be overwritten. -# Make changes in the internal upstream repository instead. - - -""" - external/v1/auth_service.proto - - No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - - OpenAPI spec version: version not set - - Generated by: https://github.com/swagger-api/swagger-codegen.git - - NOTE - ---- - standard swagger-codegen-cli for this python client has been modified - by custom templates. The purpose of these templates is to include - typing information in the API and Model code. Please refer to the - main grid repository for more info -""" - -import pprint -import re # noqa: F401 - -from typing import TYPE_CHECKING - -import six - -if TYPE_CHECKING: - from datetime import datetime - from lightning_sdk.lightning_cloud.openapi.models import * - -class CloudSpaceServiceCreateLightningRunInstanceBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'cluster_id': 'str', - 'desired_state': 'V1LightningappInstanceState', - 'display_name': 'str', - 'domain': 'str', - 'env': 'list[V1EnvVar]', - 'keep_machines_after_stop': 'bool', - 'linked_project_id': 'str', - 'linked_user_id': 'str', - 'machines_reservation_time_minutes': 'str', - 'name': 'str', - 'queue_server_type': 'V1QueueServerType', - 'source_app': 'str' - } - - attribute_map = { - 'cluster_id': 'clusterId', - 'desired_state': 'desiredState', - 'display_name': 'displayName', - 'domain': 'domain', - 'env': 'env', - 'keep_machines_after_stop': 'keepMachinesAfterStop', - 'linked_project_id': 'linkedProjectId', - 'linked_user_id': 'linkedUserId', - 'machines_reservation_time_minutes': 'machinesReservationTimeMinutes', - 'name': 'name', - 'queue_server_type': 'queueServerType', - 'source_app': 'sourceApp' - } - - def __init__(self, cluster_id: 'str' =None, desired_state: 'V1LightningappInstanceState' =None, display_name: 'str' =None, domain: 'str' =None, env: 'list[V1EnvVar]' =None, keep_machines_after_stop: 'bool' =None, linked_project_id: 'str' =None, linked_user_id: 'str' =None, machines_reservation_time_minutes: 'str' =None, name: 'str' =None, queue_server_type: 'V1QueueServerType' =None, source_app: 'str' =None): # noqa: E501 - """CloudSpaceServiceCreateLightningRunInstanceBody - a model defined in Swagger""" # noqa: E501 - self._cluster_id = None - self._desired_state = None - self._display_name = None - self._domain = None - self._env = None - self._keep_machines_after_stop = None - self._linked_project_id = None - self._linked_user_id = None - self._machines_reservation_time_minutes = None - self._name = None - self._queue_server_type = None - self._source_app = None - self.discriminator = None - if cluster_id is not None: - self.cluster_id = cluster_id - if desired_state is not None: - self.desired_state = desired_state - if display_name is not None: - self.display_name = display_name - if domain is not None: - self.domain = domain - if env is not None: - self.env = env - if keep_machines_after_stop is not None: - self.keep_machines_after_stop = keep_machines_after_stop - if linked_project_id is not None: - self.linked_project_id = linked_project_id - if linked_user_id is not None: - self.linked_user_id = linked_user_id - if machines_reservation_time_minutes is not None: - self.machines_reservation_time_minutes = machines_reservation_time_minutes - if name is not None: - self.name = name - if queue_server_type is not None: - self.queue_server_type = queue_server_type - if source_app is not None: - self.source_app = source_app - - @property - def cluster_id(self) -> 'str': - """Gets the cluster_id of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - - - :return: The cluster_id of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :rtype: str - """ - return self._cluster_id - - @cluster_id.setter - def cluster_id(self, cluster_id: 'str'): - """Sets the cluster_id of this CloudSpaceServiceCreateLightningRunInstanceBody. - - - :param cluster_id: The cluster_id of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :type: str - """ - - self._cluster_id = cluster_id - - @property - def desired_state(self) -> 'V1LightningappInstanceState': - """Gets the desired_state of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - - - :return: The desired_state of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :rtype: V1LightningappInstanceState - """ - return self._desired_state - - @desired_state.setter - def desired_state(self, desired_state: 'V1LightningappInstanceState'): - """Sets the desired_state of this CloudSpaceServiceCreateLightningRunInstanceBody. - - - :param desired_state: The desired_state of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :type: V1LightningappInstanceState - """ - - self._desired_state = desired_state - - @property - def display_name(self) -> 'str': - """Gets the display_name of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - - - :return: The display_name of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :rtype: str - """ - return self._display_name - - @display_name.setter - def display_name(self, display_name: 'str'): - """Sets the display_name of this CloudSpaceServiceCreateLightningRunInstanceBody. - - - :param display_name: The display_name of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :type: str - """ - - self._display_name = display_name - - @property - def domain(self) -> 'str': - """Gets the domain of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - - User-provided custom domain for the app. Will be generated if not provided. # noqa: E501 - - :return: The domain of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :rtype: str - """ - return self._domain - - @domain.setter - def domain(self, domain: 'str'): - """Sets the domain of this CloudSpaceServiceCreateLightningRunInstanceBody. - - User-provided custom domain for the app. Will be generated if not provided. # noqa: E501 - - :param domain: The domain of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :type: str - """ - - self._domain = domain - - @property - def env(self) -> 'list[V1EnvVar]': - """Gets the env of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - - - :return: The env of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :rtype: list[V1EnvVar] - """ - return self._env - - @env.setter - def env(self, env: 'list[V1EnvVar]'): - """Sets the env of this CloudSpaceServiceCreateLightningRunInstanceBody. - - - :param env: The env of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :type: list[V1EnvVar] - """ - - self._env = env - - @property - def keep_machines_after_stop(self) -> 'bool': - """Gets the keep_machines_after_stop of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - - - :return: The keep_machines_after_stop of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :rtype: bool - """ - return self._keep_machines_after_stop - - @keep_machines_after_stop.setter - def keep_machines_after_stop(self, keep_machines_after_stop: 'bool'): - """Sets the keep_machines_after_stop of this CloudSpaceServiceCreateLightningRunInstanceBody. - - - :param keep_machines_after_stop: The keep_machines_after_stop of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :type: bool - """ - - self._keep_machines_after_stop = keep_machines_after_stop - - @property - def linked_project_id(self) -> 'str': - """Gets the linked_project_id of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - - - :return: The linked_project_id of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :rtype: str - """ - return self._linked_project_id - - @linked_project_id.setter - def linked_project_id(self, linked_project_id: 'str'): - """Sets the linked_project_id of this CloudSpaceServiceCreateLightningRunInstanceBody. - - - :param linked_project_id: The linked_project_id of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :type: str - """ - - self._linked_project_id = linked_project_id - - @property - def linked_user_id(self) -> 'str': - """Gets the linked_user_id of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - - - :return: The linked_user_id of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :rtype: str - """ - return self._linked_user_id - - @linked_user_id.setter - def linked_user_id(self, linked_user_id: 'str'): - """Sets the linked_user_id of this CloudSpaceServiceCreateLightningRunInstanceBody. - - - :param linked_user_id: The linked_user_id of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :type: str - """ - - self._linked_user_id = linked_user_id - - @property - def machines_reservation_time_minutes(self) -> 'str': - """Gets the machines_reservation_time_minutes of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - - - :return: The machines_reservation_time_minutes of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :rtype: str - """ - return self._machines_reservation_time_minutes - - @machines_reservation_time_minutes.setter - def machines_reservation_time_minutes(self, machines_reservation_time_minutes: 'str'): - """Sets the machines_reservation_time_minutes of this CloudSpaceServiceCreateLightningRunInstanceBody. - - - :param machines_reservation_time_minutes: The machines_reservation_time_minutes of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :type: str - """ - - self._machines_reservation_time_minutes = machines_reservation_time_minutes - - @property - def name(self) -> 'str': - """Gets the name of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - - - :return: The name of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name: 'str'): - """Sets the name of this CloudSpaceServiceCreateLightningRunInstanceBody. - - - :param name: The name of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def queue_server_type(self) -> 'V1QueueServerType': - """Gets the queue_server_type of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - - - :return: The queue_server_type of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :rtype: V1QueueServerType - """ - return self._queue_server_type - - @queue_server_type.setter - def queue_server_type(self, queue_server_type: 'V1QueueServerType'): - """Sets the queue_server_type of this CloudSpaceServiceCreateLightningRunInstanceBody. - - - :param queue_server_type: The queue_server_type of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :type: V1QueueServerType - """ - - self._queue_server_type = queue_server_type - - @property - def source_app(self) -> 'str': - """Gets the source_app of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - - - :return: The source_app of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :rtype: str - """ - return self._source_app - - @source_app.setter - def source_app(self, source_app: 'str'): - """Sets the source_app of this CloudSpaceServiceCreateLightningRunInstanceBody. - - - :param source_app: The source_app of this CloudSpaceServiceCreateLightningRunInstanceBody. # noqa: E501 - :type: str - """ - - self._source_app = source_app - - def to_dict(self) -> dict: - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(CloudSpaceServiceCreateLightningRunInstanceBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self) -> str: - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other: 'CloudSpaceServiceCreateLightningRunInstanceBody') -> bool: - """Returns true if both objects are equal""" - if not isinstance(other, CloudSpaceServiceCreateLightningRunInstanceBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'CloudSpaceServiceCreateLightningRunInstanceBody') -> bool: - """Returns true if both objects are not equal""" - return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/cloud_space_service_fork_cloud_space_app_instance_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/cloud_space_service_fork_cloud_space_app_instance_body.py deleted file mode 100644 index 2f386ce39..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/models/cloud_space_service_fork_cloud_space_app_instance_body.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 -# This file is vendored. -# Do not edit it directly; changes will be overwritten. -# Make changes in the internal upstream repository instead. - - -""" - external/v1/auth_service.proto - - No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - - OpenAPI spec version: version not set - - Generated by: https://github.com/swagger-api/swagger-codegen.git - - NOTE - ---- - standard swagger-codegen-cli for this python client has been modified - by custom templates. The purpose of these templates is to include - typing information in the API and Model code. Please refer to the - main grid repository for more info -""" - -import pprint -import re # noqa: F401 - -from typing import TYPE_CHECKING - -import six - -if TYPE_CHECKING: - from datetime import datetime - from lightning_sdk.lightning_cloud.openapi.models import * - -class CloudSpaceServiceForkCloudSpaceAppInstanceBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'lightningapp_instance_id': 'str', - 'target_plugin_arguments': 'dict(str, str)' - } - - attribute_map = { - 'lightningapp_instance_id': 'lightningappInstanceId', - 'target_plugin_arguments': 'targetPluginArguments' - } - - def __init__(self, lightningapp_instance_id: 'str' =None, target_plugin_arguments: 'dict(str, str)' =None): # noqa: E501 - """CloudSpaceServiceForkCloudSpaceAppInstanceBody - a model defined in Swagger""" # noqa: E501 - self._lightningapp_instance_id = None - self._target_plugin_arguments = None - self.discriminator = None - if lightningapp_instance_id is not None: - self.lightningapp_instance_id = lightningapp_instance_id - if target_plugin_arguments is not None: - self.target_plugin_arguments = target_plugin_arguments - - @property - def lightningapp_instance_id(self) -> 'str': - """Gets the lightningapp_instance_id of this CloudSpaceServiceForkCloudSpaceAppInstanceBody. # noqa: E501 - - - :return: The lightningapp_instance_id of this CloudSpaceServiceForkCloudSpaceAppInstanceBody. # noqa: E501 - :rtype: str - """ - return self._lightningapp_instance_id - - @lightningapp_instance_id.setter - def lightningapp_instance_id(self, lightningapp_instance_id: 'str'): - """Sets the lightningapp_instance_id of this CloudSpaceServiceForkCloudSpaceAppInstanceBody. - - - :param lightningapp_instance_id: The lightningapp_instance_id of this CloudSpaceServiceForkCloudSpaceAppInstanceBody. # noqa: E501 - :type: str - """ - - self._lightningapp_instance_id = lightningapp_instance_id - - @property - def target_plugin_arguments(self) -> 'dict(str, str)': - """Gets the target_plugin_arguments of this CloudSpaceServiceForkCloudSpaceAppInstanceBody. # noqa: E501 - - - :return: The target_plugin_arguments of this CloudSpaceServiceForkCloudSpaceAppInstanceBody. # noqa: E501 - :rtype: dict(str, str) - """ - return self._target_plugin_arguments - - @target_plugin_arguments.setter - def target_plugin_arguments(self, target_plugin_arguments: 'dict(str, str)'): - """Sets the target_plugin_arguments of this CloudSpaceServiceForkCloudSpaceAppInstanceBody. - - - :param target_plugin_arguments: The target_plugin_arguments of this CloudSpaceServiceForkCloudSpaceAppInstanceBody. # noqa: E501 - :type: dict(str, str) - """ - - self._target_plugin_arguments = target_plugin_arguments - - def to_dict(self) -> dict: - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(CloudSpaceServiceForkCloudSpaceAppInstanceBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self) -> str: - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other: 'CloudSpaceServiceForkCloudSpaceAppInstanceBody') -> bool: - """Returns true if both objects are equal""" - if not isinstance(other, CloudSpaceServiceForkCloudSpaceAppInstanceBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'CloudSpaceServiceForkCloudSpaceAppInstanceBody') -> bool: - """Returns true if both objects are not equal""" - return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/cloud_space_service_update_cloud_space_app_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/cloud_space_service_update_cloud_space_app_body.py deleted file mode 100644 index 33f61813b..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/models/cloud_space_service_update_cloud_space_app_body.py +++ /dev/null @@ -1,621 +0,0 @@ -# coding: utf-8 -# This file is vendored. -# Do not edit it directly; changes will be overwritten. -# Make changes in the internal upstream repository instead. - - -""" - external/v1/auth_service.proto - - No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - - OpenAPI spec version: version not set - - Generated by: https://github.com/swagger-api/swagger-codegen.git - - NOTE - ---- - standard swagger-codegen-cli for this python client has been modified - by custom templates. The purpose of these templates is to include - typing information in the API and Model code. Please refer to the - main grid repository for more info -""" - -import pprint -import re # noqa: F401 - -from typing import TYPE_CHECKING - -import six - -if TYPE_CHECKING: - from datetime import datetime - from lightning_sdk.lightning_cloud.openapi.models import * - -class CloudSpaceServiceUpdateCloudSpaceAppBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'author_logo': 'str', - 'authors': 'list[str]', - 'categories': 'list[str]', - 'created_at': 'datetime', - 'description': 'str', - 'entrypoint_file': 'str', - 'git_url': 'str', - 'license': 'str', - 'name': 'str', - 'owner_id': 'str', - 'owner_type': 'V1CloudSpaceAppOwnerType', - 'short_description': 'str', - 'source_url': 'str', - 'tags': 'list[str]', - 'thumbnail': 'str', - 'updated_at': 'datetime', - 'version': 'str', - 'visible_to_org_ids': 'list[str]', - 'visible_to_project_ids': 'list[str]', - 'visible_to_user_ids': 'list[str]' - } - - attribute_map = { - 'author_logo': 'authorLogo', - 'authors': 'authors', - 'categories': 'categories', - 'created_at': 'createdAt', - 'description': 'description', - 'entrypoint_file': 'entrypointFile', - 'git_url': 'gitUrl', - 'license': 'license', - 'name': 'name', - 'owner_id': 'ownerId', - 'owner_type': 'ownerType', - 'short_description': 'shortDescription', - 'source_url': 'sourceUrl', - 'tags': 'tags', - 'thumbnail': 'thumbnail', - 'updated_at': 'updatedAt', - 'version': 'version', - 'visible_to_org_ids': 'visibleToOrgIds', - 'visible_to_project_ids': 'visibleToProjectIds', - 'visible_to_user_ids': 'visibleToUserIds' - } - - def __init__(self, author_logo: 'str' =None, authors: 'list[str]' =None, categories: 'list[str]' =None, created_at: 'datetime' =None, description: 'str' =None, entrypoint_file: 'str' =None, git_url: 'str' =None, license: 'str' =None, name: 'str' =None, owner_id: 'str' =None, owner_type: 'V1CloudSpaceAppOwnerType' =None, short_description: 'str' =None, source_url: 'str' =None, tags: 'list[str]' =None, thumbnail: 'str' =None, updated_at: 'datetime' =None, version: 'str' =None, visible_to_org_ids: 'list[str]' =None, visible_to_project_ids: 'list[str]' =None, visible_to_user_ids: 'list[str]' =None): # noqa: E501 - """CloudSpaceServiceUpdateCloudSpaceAppBody - a model defined in Swagger""" # noqa: E501 - self._author_logo = None - self._authors = None - self._categories = None - self._created_at = None - self._description = None - self._entrypoint_file = None - self._git_url = None - self._license = None - self._name = None - self._owner_id = None - self._owner_type = None - self._short_description = None - self._source_url = None - self._tags = None - self._thumbnail = None - self._updated_at = None - self._version = None - self._visible_to_org_ids = None - self._visible_to_project_ids = None - self._visible_to_user_ids = None - self.discriminator = None - if author_logo is not None: - self.author_logo = author_logo - if authors is not None: - self.authors = authors - if categories is not None: - self.categories = categories - if created_at is not None: - self.created_at = created_at - if description is not None: - self.description = description - if entrypoint_file is not None: - self.entrypoint_file = entrypoint_file - if git_url is not None: - self.git_url = git_url - if license is not None: - self.license = license - if name is not None: - self.name = name - if owner_id is not None: - self.owner_id = owner_id - if owner_type is not None: - self.owner_type = owner_type - if short_description is not None: - self.short_description = short_description - if source_url is not None: - self.source_url = source_url - if tags is not None: - self.tags = tags - if thumbnail is not None: - self.thumbnail = thumbnail - if updated_at is not None: - self.updated_at = updated_at - if version is not None: - self.version = version - if visible_to_org_ids is not None: - self.visible_to_org_ids = visible_to_org_ids - if visible_to_project_ids is not None: - self.visible_to_project_ids = visible_to_project_ids - if visible_to_user_ids is not None: - self.visible_to_user_ids = visible_to_user_ids - - @property - def author_logo(self) -> 'str': - """Gets the author_logo of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The author_logo of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: str - """ - return self._author_logo - - @author_logo.setter - def author_logo(self, author_logo: 'str'): - """Sets the author_logo of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param author_logo: The author_logo of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: str - """ - - self._author_logo = author_logo - - @property - def authors(self) -> 'list[str]': - """Gets the authors of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The authors of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: list[str] - """ - return self._authors - - @authors.setter - def authors(self, authors: 'list[str]'): - """Sets the authors of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param authors: The authors of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: list[str] - """ - - self._authors = authors - - @property - def categories(self) -> 'list[str]': - """Gets the categories of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The categories of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: list[str] - """ - return self._categories - - @categories.setter - def categories(self, categories: 'list[str]'): - """Sets the categories of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param categories: The categories of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: list[str] - """ - - self._categories = categories - - @property - def created_at(self) -> 'datetime': - """Gets the created_at of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The created_at of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: datetime - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at: 'datetime'): - """Sets the created_at of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param created_at: The created_at of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: datetime - """ - - self._created_at = created_at - - @property - def description(self) -> 'str': - """Gets the description of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The description of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description: 'str'): - """Sets the description of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param description: The description of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def entrypoint_file(self) -> 'str': - """Gets the entrypoint_file of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The entrypoint_file of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: str - """ - return self._entrypoint_file - - @entrypoint_file.setter - def entrypoint_file(self, entrypoint_file: 'str'): - """Sets the entrypoint_file of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param entrypoint_file: The entrypoint_file of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: str - """ - - self._entrypoint_file = entrypoint_file - - @property - def git_url(self) -> 'str': - """Gets the git_url of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The git_url of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: str - """ - return self._git_url - - @git_url.setter - def git_url(self, git_url: 'str'): - """Sets the git_url of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param git_url: The git_url of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: str - """ - - self._git_url = git_url - - @property - def license(self) -> 'str': - """Gets the license of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The license of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: str - """ - return self._license - - @license.setter - def license(self, license: 'str'): - """Sets the license of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param license: The license of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: str - """ - - self._license = license - - @property - def name(self) -> 'str': - """Gets the name of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The name of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name: 'str'): - """Sets the name of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param name: The name of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def owner_id(self) -> 'str': - """Gets the owner_id of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The owner_id of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: str - """ - return self._owner_id - - @owner_id.setter - def owner_id(self, owner_id: 'str'): - """Sets the owner_id of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param owner_id: The owner_id of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: str - """ - - self._owner_id = owner_id - - @property - def owner_type(self) -> 'V1CloudSpaceAppOwnerType': - """Gets the owner_type of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The owner_type of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: V1CloudSpaceAppOwnerType - """ - return self._owner_type - - @owner_type.setter - def owner_type(self, owner_type: 'V1CloudSpaceAppOwnerType'): - """Sets the owner_type of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param owner_type: The owner_type of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: V1CloudSpaceAppOwnerType - """ - - self._owner_type = owner_type - - @property - def short_description(self) -> 'str': - """Gets the short_description of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The short_description of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: str - """ - return self._short_description - - @short_description.setter - def short_description(self, short_description: 'str'): - """Sets the short_description of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param short_description: The short_description of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: str - """ - - self._short_description = short_description - - @property - def source_url(self) -> 'str': - """Gets the source_url of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The source_url of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: str - """ - return self._source_url - - @source_url.setter - def source_url(self, source_url: 'str'): - """Sets the source_url of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param source_url: The source_url of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: str - """ - - self._source_url = source_url - - @property - def tags(self) -> 'list[str]': - """Gets the tags of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The tags of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: list[str] - """ - return self._tags - - @tags.setter - def tags(self, tags: 'list[str]'): - """Sets the tags of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param tags: The tags of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: list[str] - """ - - self._tags = tags - - @property - def thumbnail(self) -> 'str': - """Gets the thumbnail of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The thumbnail of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: str - """ - return self._thumbnail - - @thumbnail.setter - def thumbnail(self, thumbnail: 'str'): - """Sets the thumbnail of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param thumbnail: The thumbnail of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: str - """ - - self._thumbnail = thumbnail - - @property - def updated_at(self) -> 'datetime': - """Gets the updated_at of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The updated_at of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: datetime - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at: 'datetime'): - """Sets the updated_at of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param updated_at: The updated_at of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: datetime - """ - - self._updated_at = updated_at - - @property - def version(self) -> 'str': - """Gets the version of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The version of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version: 'str'): - """Sets the version of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param version: The version of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: str - """ - - self._version = version - - @property - def visible_to_org_ids(self) -> 'list[str]': - """Gets the visible_to_org_ids of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The visible_to_org_ids of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: list[str] - """ - return self._visible_to_org_ids - - @visible_to_org_ids.setter - def visible_to_org_ids(self, visible_to_org_ids: 'list[str]'): - """Sets the visible_to_org_ids of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param visible_to_org_ids: The visible_to_org_ids of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: list[str] - """ - - self._visible_to_org_ids = visible_to_org_ids - - @property - def visible_to_project_ids(self) -> 'list[str]': - """Gets the visible_to_project_ids of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The visible_to_project_ids of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: list[str] - """ - return self._visible_to_project_ids - - @visible_to_project_ids.setter - def visible_to_project_ids(self, visible_to_project_ids: 'list[str]'): - """Sets the visible_to_project_ids of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param visible_to_project_ids: The visible_to_project_ids of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: list[str] - """ - - self._visible_to_project_ids = visible_to_project_ids - - @property - def visible_to_user_ids(self) -> 'list[str]': - """Gets the visible_to_user_ids of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - - - :return: The visible_to_user_ids of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :rtype: list[str] - """ - return self._visible_to_user_ids - - @visible_to_user_ids.setter - def visible_to_user_ids(self, visible_to_user_ids: 'list[str]'): - """Sets the visible_to_user_ids of this CloudSpaceServiceUpdateCloudSpaceAppBody. - - - :param visible_to_user_ids: The visible_to_user_ids of this CloudSpaceServiceUpdateCloudSpaceAppBody. # noqa: E501 - :type: list[str] - """ - - self._visible_to_user_ids = visible_to_user_ids - - def to_dict(self) -> dict: - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(CloudSpaceServiceUpdateCloudSpaceAppBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self) -> str: - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other: 'CloudSpaceServiceUpdateCloudSpaceAppBody') -> bool: - """Returns true if both objects are equal""" - if not isinstance(other, CloudSpaceServiceUpdateCloudSpaceAppBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'CloudSpaceServiceUpdateCloudSpaceAppBody') -> bool: - """Returns true if both objects are not equal""" - return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_create_machine_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_create_machine_body.py index a40892968..bb27e9019 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_create_machine_body.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_create_machine_body.py @@ -50,6 +50,7 @@ class ClusterServiceCreateMachineBody(object): 'bootstrap': 'V1MachineBootstrap', 'bridge_network_cidr': 'str', 'ca_cert': 'str', + 'enrollment_epoch': 'str', 'env': 'list[V1EnvVar]', 'id': 'str', 'instance_type': 'str', @@ -77,6 +78,7 @@ class ClusterServiceCreateMachineBody(object): 'bootstrap': 'bootstrap', 'bridge_network_cidr': 'bridgeNetworkCidr', 'ca_cert': 'caCert', + 'enrollment_epoch': 'enrollmentEpoch', 'env': 'env', 'id': 'id', 'instance_type': 'instanceType', @@ -98,13 +100,14 @@ class ClusterServiceCreateMachineBody(object): 'unschedulable': 'unschedulable' } - def __init__(self, added_by: 'str' =None, address: 'str' =None, bootstrap: 'V1MachineBootstrap' =None, bridge_network_cidr: 'str' =None, ca_cert: 'str' =None, env: 'list[V1EnvVar]' =None, id: 'str' =None, instance_type: 'str' =None, management_api_url: 'str' =None, name: 'str' =None, org_id: 'str' =None, parent_cluster_id: 'str' =None, private_address: 'str' =None, provider: 'str' =None, provider_instance_id: 'str' =None, provider_region: 'str' =None, provisioning_method: 'str' =None, purpose: 'str' =None, resources: 'V1Resources' =None, ssh_port: 'int' =None, ssh_username: 'str' =None, tls_cert: 'str' =None, tls_key: 'str' =None, unschedulable: 'bool' =None): # noqa: E501 + def __init__(self, added_by: 'str' =None, address: 'str' =None, bootstrap: 'V1MachineBootstrap' =None, bridge_network_cidr: 'str' =None, ca_cert: 'str' =None, enrollment_epoch: 'str' =None, env: 'list[V1EnvVar]' =None, id: 'str' =None, instance_type: 'str' =None, management_api_url: 'str' =None, name: 'str' =None, org_id: 'str' =None, parent_cluster_id: 'str' =None, private_address: 'str' =None, provider: 'str' =None, provider_instance_id: 'str' =None, provider_region: 'str' =None, provisioning_method: 'str' =None, purpose: 'str' =None, resources: 'V1Resources' =None, ssh_port: 'int' =None, ssh_username: 'str' =None, tls_cert: 'str' =None, tls_key: 'str' =None, unschedulable: 'bool' =None): # noqa: E501 """ClusterServiceCreateMachineBody - a model defined in Swagger""" # noqa: E501 self._added_by = None self._address = None self._bootstrap = None self._bridge_network_cidr = None self._ca_cert = None + self._enrollment_epoch = None self._env = None self._id = None self._instance_type = None @@ -135,6 +138,8 @@ def __init__(self, added_by: 'str' =None, address: 'str' =None, bootstrap: 'V1Ma self.bridge_network_cidr = bridge_network_cidr if ca_cert is not None: self.ca_cert = ca_cert + if enrollment_epoch is not None: + self.enrollment_epoch = enrollment_epoch if env is not None: self.env = env if id is not None: @@ -279,6 +284,29 @@ def ca_cert(self, ca_cert: 'str'): self._ca_cert = ca_cert + @property + def enrollment_epoch(self) -> 'str': + """Gets the enrollment_epoch of this ClusterServiceCreateMachineBody. # noqa: E501 + + Fences an existing-machine setup callback to its committed enrollment attempt. # noqa: E501 + + :return: The enrollment_epoch of this ClusterServiceCreateMachineBody. # noqa: E501 + :rtype: str + """ + return self._enrollment_epoch + + @enrollment_epoch.setter + def enrollment_epoch(self, enrollment_epoch: 'str'): + """Sets the enrollment_epoch of this ClusterServiceCreateMachineBody. + + Fences an existing-machine setup callback to its committed enrollment attempt. # noqa: E501 + + :param enrollment_epoch: The enrollment_epoch of this ClusterServiceCreateMachineBody. # noqa: E501 + :type: str + """ + + self._enrollment_epoch = enrollment_epoch + @property def env(self) -> 'list[V1EnvVar]': """Gets the env of this ClusterServiceCreateMachineBody. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_provision_machine_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_provision_machine_body.py index 7ba50248e..27b8b422f 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_provision_machine_body.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_provision_machine_body.py @@ -50,6 +50,7 @@ class ClusterServiceProvisionMachineBody(object): 'bootstrap': 'V1MachineBootstrap', 'bridge_network_cidr': 'str', 'ca_cert': 'str', + 'enrollment_epoch': 'str', 'env': 'list[V1EnvVar]', 'id': 'str', 'instance_type': 'str', @@ -77,6 +78,7 @@ class ClusterServiceProvisionMachineBody(object): 'bootstrap': 'bootstrap', 'bridge_network_cidr': 'bridgeNetworkCidr', 'ca_cert': 'caCert', + 'enrollment_epoch': 'enrollmentEpoch', 'env': 'env', 'id': 'id', 'instance_type': 'instanceType', @@ -98,13 +100,14 @@ class ClusterServiceProvisionMachineBody(object): 'unschedulable': 'unschedulable' } - def __init__(self, added_by: 'str' =None, address: 'str' =None, bootstrap: 'V1MachineBootstrap' =None, bridge_network_cidr: 'str' =None, ca_cert: 'str' =None, env: 'list[V1EnvVar]' =None, id: 'str' =None, instance_type: 'str' =None, management_api_url: 'str' =None, name: 'str' =None, org_id: 'str' =None, parent_cluster_id: 'str' =None, private_address: 'str' =None, provider: 'str' =None, provider_instance_id: 'str' =None, provider_region: 'str' =None, provisioning_method: 'str' =None, purpose: 'str' =None, resources: 'V1Resources' =None, ssh_port: 'int' =None, ssh_username: 'str' =None, tls_cert: 'str' =None, tls_key: 'str' =None, unschedulable: 'bool' =None): # noqa: E501 + def __init__(self, added_by: 'str' =None, address: 'str' =None, bootstrap: 'V1MachineBootstrap' =None, bridge_network_cidr: 'str' =None, ca_cert: 'str' =None, enrollment_epoch: 'str' =None, env: 'list[V1EnvVar]' =None, id: 'str' =None, instance_type: 'str' =None, management_api_url: 'str' =None, name: 'str' =None, org_id: 'str' =None, parent_cluster_id: 'str' =None, private_address: 'str' =None, provider: 'str' =None, provider_instance_id: 'str' =None, provider_region: 'str' =None, provisioning_method: 'str' =None, purpose: 'str' =None, resources: 'V1Resources' =None, ssh_port: 'int' =None, ssh_username: 'str' =None, tls_cert: 'str' =None, tls_key: 'str' =None, unschedulable: 'bool' =None): # noqa: E501 """ClusterServiceProvisionMachineBody - a model defined in Swagger""" # noqa: E501 self._added_by = None self._address = None self._bootstrap = None self._bridge_network_cidr = None self._ca_cert = None + self._enrollment_epoch = None self._env = None self._id = None self._instance_type = None @@ -135,6 +138,8 @@ def __init__(self, added_by: 'str' =None, address: 'str' =None, bootstrap: 'V1Ma self.bridge_network_cidr = bridge_network_cidr if ca_cert is not None: self.ca_cert = ca_cert + if enrollment_epoch is not None: + self.enrollment_epoch = enrollment_epoch if env is not None: self.env = env if id is not None: @@ -279,6 +284,29 @@ def ca_cert(self, ca_cert: 'str'): self._ca_cert = ca_cert + @property + def enrollment_epoch(self) -> 'str': + """Gets the enrollment_epoch of this ClusterServiceProvisionMachineBody. # noqa: E501 + + Fences an existing-machine setup callback to its committed enrollment attempt. # noqa: E501 + + :return: The enrollment_epoch of this ClusterServiceProvisionMachineBody. # noqa: E501 + :rtype: str + """ + return self._enrollment_epoch + + @enrollment_epoch.setter + def enrollment_epoch(self, enrollment_epoch: 'str'): + """Sets the enrollment_epoch of this ClusterServiceProvisionMachineBody. + + Fences an existing-machine setup callback to its committed enrollment attempt. # noqa: E501 + + :param enrollment_epoch: The enrollment_epoch of this ClusterServiceProvisionMachineBody. # noqa: E501 + :type: str + """ + + self._enrollment_epoch = enrollment_epoch + @property def env(self) -> 'list[V1EnvVar]': """Gets the env of this ClusterServiceProvisionMachineBody. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_set_machine_vpn_services_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_set_machine_vpn_services_body.py new file mode 100644 index 000000000..1f2ce45de --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_set_machine_vpn_services_body.py @@ -0,0 +1,155 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class ClusterServiceSetMachineVPNServicesBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'enabled': 'bool', + 'org_id': 'str' + } + + attribute_map = { + 'enabled': 'enabled', + 'org_id': 'orgId' + } + + def __init__(self, enabled: 'bool' =None, org_id: 'str' =None): # noqa: E501 + """ClusterServiceSetMachineVPNServicesBody - a model defined in Swagger""" # noqa: E501 + self._enabled = None + self._org_id = None + self.discriminator = None + if enabled is not None: + self.enabled = enabled + if org_id is not None: + self.org_id = org_id + + @property + def enabled(self) -> 'bool': + """Gets the enabled of this ClusterServiceSetMachineVPNServicesBody. # noqa: E501 + + true starts the services, false stops them. # noqa: E501 + + :return: The enabled of this ClusterServiceSetMachineVPNServicesBody. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled: 'bool'): + """Sets the enabled of this ClusterServiceSetMachineVPNServicesBody. + + true starts the services, false stops them. # noqa: E501 + + :param enabled: The enabled of this ClusterServiceSetMachineVPNServicesBody. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + @property + def org_id(self) -> 'str': + """Gets the org_id of this ClusterServiceSetMachineVPNServicesBody. # noqa: E501 + + + :return: The org_id of this ClusterServiceSetMachineVPNServicesBody. # noqa: E501 + :rtype: str + """ + return self._org_id + + @org_id.setter + def org_id(self, org_id: 'str'): + """Sets the org_id of this ClusterServiceSetMachineVPNServicesBody. + + + :param org_id: The org_id of this ClusterServiceSetMachineVPNServicesBody. # noqa: E501 + :type: str + """ + + self._org_id = org_id + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ClusterServiceSetMachineVPNServicesBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'ClusterServiceSetMachineVPNServicesBody') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, ClusterServiceSetMachineVPNServicesBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ClusterServiceSetMachineVPNServicesBody') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_update_provider_fleet_owner_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_update_provider_fleet_owner_body.py new file mode 100644 index 000000000..e7620be18 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_update_provider_fleet_owner_body.py @@ -0,0 +1,231 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class ClusterServiceUpdateProviderFleetOwnerBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'environment': 'str', + 'expected_revision': 'str', + 'label': 'str', + 'org_id': 'str', + 'username': 'str' + } + + attribute_map = { + 'environment': 'environment', + 'expected_revision': 'expectedRevision', + 'label': 'label', + 'org_id': 'orgId', + 'username': 'username' + } + + def __init__(self, environment: 'str' =None, expected_revision: 'str' =None, label: 'str' =None, org_id: 'str' =None, username: 'str' =None): # noqa: E501 + """ClusterServiceUpdateProviderFleetOwnerBody - a model defined in Swagger""" # noqa: E501 + self._environment = None + self._expected_revision = None + self._label = None + self._org_id = None + self._username = None + self.discriminator = None + if environment is not None: + self.environment = environment + if expected_revision is not None: + self.expected_revision = expected_revision + if label is not None: + self.label = label + if org_id is not None: + self.org_id = org_id + if username is not None: + self.username = username + + @property + def environment(self) -> 'str': + """Gets the environment of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + + + :return: The environment of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + :rtype: str + """ + return self._environment + + @environment.setter + def environment(self, environment: 'str'): + """Sets the environment of this ClusterServiceUpdateProviderFleetOwnerBody. + + + :param environment: The environment of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + :type: str + """ + + self._environment = environment + + @property + def expected_revision(self) -> 'str': + """Gets the expected_revision of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + + + :return: The expected_revision of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + :rtype: str + """ + return self._expected_revision + + @expected_revision.setter + def expected_revision(self, expected_revision: 'str'): + """Sets the expected_revision of this ClusterServiceUpdateProviderFleetOwnerBody. + + + :param expected_revision: The expected_revision of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + :type: str + """ + + self._expected_revision = expected_revision + + @property + def label(self) -> 'str': + """Gets the label of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + + + :return: The label of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label: 'str'): + """Sets the label of this ClusterServiceUpdateProviderFleetOwnerBody. + + + :param label: The label of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def org_id(self) -> 'str': + """Gets the org_id of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + + + :return: The org_id of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + :rtype: str + """ + return self._org_id + + @org_id.setter + def org_id(self, org_id: 'str'): + """Sets the org_id of this ClusterServiceUpdateProviderFleetOwnerBody. + + + :param org_id: The org_id of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + :type: str + """ + + self._org_id = org_id + + @property + def username(self) -> 'str': + """Gets the username of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + + + :return: The username of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username: 'str'): + """Sets the username of this ClusterServiceUpdateProviderFleetOwnerBody. + + + :param username: The username of this ClusterServiceUpdateProviderFleetOwnerBody. # noqa: E501 + :type: str + """ + + self._username = username + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ClusterServiceUpdateProviderFleetOwnerBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'ClusterServiceUpdateProviderFleetOwnerBody') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, ClusterServiceUpdateProviderFleetOwnerBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ClusterServiceUpdateProviderFleetOwnerBody') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/data_connection_service_update_data_connection_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/data_connection_service_update_data_connection_body.py index a5cf7bb1c..949fd8b64 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/data_connection_service_update_data_connection_body.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/data_connection_service_update_data_connection_body.py @@ -45,6 +45,7 @@ class DataConnectionServiceUpdateDataConnectionBody(object): and the value is json key in definition. """ swagger_types = { + 'access_cluster_ids': 'V1AccessClusterIdsUpdate', 'auto_increase_enabled': 'bool', 'aws': 'V1AwsDataConnection', 'capacity_gb': 'str', @@ -61,6 +62,7 @@ class DataConnectionServiceUpdateDataConnectionBody(object): } attribute_map = { + 'access_cluster_ids': 'accessClusterIds', 'auto_increase_enabled': 'autoIncreaseEnabled', 'aws': 'aws', 'capacity_gb': 'capacityGb', @@ -76,8 +78,9 @@ class DataConnectionServiceUpdateDataConnectionBody(object): 'writable': 'writable' } - def __init__(self, auto_increase_enabled: 'bool' =None, aws: 'V1AwsDataConnection' =None, capacity_gb: 'str' =None, efs: 'V1EfsConfig' =None, gcp: 'V1GcpDataConnection' =None, gcs_folder: 'V1GCSFolderDataConnection' =None, name: 'str' =None, optimization_mode: 'V1DataConnectionOptimizationMode' =None, r2: 'V1R2DataConnection' =None, run_cmds: 'list[str]' =None, s3_folder: 'V1S3FolderDataConnection' =None, snowflake: 'V1SnowflakeDataConnection' =None, writable: 'bool' =None): # noqa: E501 + def __init__(self, access_cluster_ids: 'V1AccessClusterIdsUpdate' =None, auto_increase_enabled: 'bool' =None, aws: 'V1AwsDataConnection' =None, capacity_gb: 'str' =None, efs: 'V1EfsConfig' =None, gcp: 'V1GcpDataConnection' =None, gcs_folder: 'V1GCSFolderDataConnection' =None, name: 'str' =None, optimization_mode: 'V1DataConnectionOptimizationMode' =None, r2: 'V1R2DataConnection' =None, run_cmds: 'list[str]' =None, s3_folder: 'V1S3FolderDataConnection' =None, snowflake: 'V1SnowflakeDataConnection' =None, writable: 'bool' =None): # noqa: E501 """DataConnectionServiceUpdateDataConnectionBody - a model defined in Swagger""" # noqa: E501 + self._access_cluster_ids = None self._auto_increase_enabled = None self._aws = None self._capacity_gb = None @@ -92,6 +95,8 @@ def __init__(self, auto_increase_enabled: 'bool' =None, aws: 'V1AwsDataConnectio self._snowflake = None self._writable = None self.discriminator = None + if access_cluster_ids is not None: + self.access_cluster_ids = access_cluster_ids if auto_increase_enabled is not None: self.auto_increase_enabled = auto_increase_enabled if aws is not None: @@ -119,10 +124,32 @@ def __init__(self, auto_increase_enabled: 'bool' =None, aws: 'V1AwsDataConnectio if writable is not None: self.writable = writable + @property + def access_cluster_ids(self) -> 'V1AccessClusterIdsUpdate': + """Gets the access_cluster_ids of this DataConnectionServiceUpdateDataConnectionBody. # noqa: E501 + + + :return: The access_cluster_ids of this DataConnectionServiceUpdateDataConnectionBody. # noqa: E501 + :rtype: V1AccessClusterIdsUpdate + """ + return self._access_cluster_ids + + @access_cluster_ids.setter + def access_cluster_ids(self, access_cluster_ids: 'V1AccessClusterIdsUpdate'): + """Sets the access_cluster_ids of this DataConnectionServiceUpdateDataConnectionBody. + + + :param access_cluster_ids: The access_cluster_ids of this DataConnectionServiceUpdateDataConnectionBody. # noqa: E501 + :type: V1AccessClusterIdsUpdate + """ + + self._access_cluster_ids = access_cluster_ids + @property def auto_increase_enabled(self) -> 'bool': """Gets the auto_increase_enabled of this DataConnectionServiceUpdateDataConnectionBody. # noqa: E501 + Manages data connection capacity auto-increase. Omit to leave unchanged. # noqa: E501 :return: The auto_increase_enabled of this DataConnectionServiceUpdateDataConnectionBody. # noqa: E501 :rtype: bool @@ -133,6 +160,7 @@ def auto_increase_enabled(self) -> 'bool': def auto_increase_enabled(self, auto_increase_enabled: 'bool'): """Sets the auto_increase_enabled of this DataConnectionServiceUpdateDataConnectionBody. + Manages data connection capacity auto-increase. Omit to leave unchanged. # noqa: E501 :param auto_increase_enabled: The auto_increase_enabled of this DataConnectionServiceUpdateDataConnectionBody. # noqa: E501 :type: bool @@ -314,6 +342,7 @@ def r2(self, r2: 'V1R2DataConnection'): def run_cmds(self) -> 'list[str]': """Gets the run_cmds of this DataConnectionServiceUpdateDataConnectionBody. # noqa: E501 + Used for rclone. Omit to leave unchanged. # noqa: E501 :return: The run_cmds of this DataConnectionServiceUpdateDataConnectionBody. # noqa: E501 :rtype: list[str] @@ -324,6 +353,7 @@ def run_cmds(self) -> 'list[str]': def run_cmds(self, run_cmds: 'list[str]'): """Sets the run_cmds of this DataConnectionServiceUpdateDataConnectionBody. + Used for rclone. Omit to leave unchanged. # noqa: E501 :param run_cmds: The run_cmds of this DataConnectionServiceUpdateDataConnectionBody. # noqa: E501 :type: list[str] @@ -377,6 +407,7 @@ def snowflake(self, snowflake: 'V1SnowflakeDataConnection'): def writable(self) -> 'bool': """Gets the writable of this DataConnectionServiceUpdateDataConnectionBody. # noqa: E501 + If true, allow writing to the data connection folder. Omit to leave unchanged. # noqa: E501 :return: The writable of this DataConnectionServiceUpdateDataConnectionBody. # noqa: E501 :rtype: bool @@ -387,6 +418,7 @@ def writable(self) -> 'bool': def writable(self, writable: 'bool'): """Sets the writable of this DataConnectionServiceUpdateDataConnectionBody. + If true, allow writing to the data connection folder. Omit to leave unchanged. # noqa: E501 :param writable: The writable of this DataConnectionServiceUpdateDataConnectionBody. # noqa: E501 :type: bool diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_update_job_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_update_job_body.py index 6f714c989..25325b8b4 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_update_job_body.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_update_job_body.py @@ -46,6 +46,7 @@ class JobsServiceUpdateJobBody(object): """ swagger_types = { 'cloudspace_id': 'str', + 'message': 'str', 'name': 'str', 'replace_requested': 'bool', 'state': 'str' @@ -53,20 +54,24 @@ class JobsServiceUpdateJobBody(object): attribute_map = { 'cloudspace_id': 'cloudspaceId', + 'message': 'message', 'name': 'name', 'replace_requested': 'replaceRequested', 'state': 'state' } - def __init__(self, cloudspace_id: 'str' =None, name: 'str' =None, replace_requested: 'bool' =None, state: 'str' =None): # noqa: E501 + def __init__(self, cloudspace_id: 'str' =None, message: 'str' =None, name: 'str' =None, replace_requested: 'bool' =None, state: 'str' =None): # noqa: E501 """JobsServiceUpdateJobBody - a model defined in Swagger""" # noqa: E501 self._cloudspace_id = None + self._message = None self._name = None self._replace_requested = None self._state = None self.discriminator = None if cloudspace_id is not None: self.cloudspace_id = cloudspace_id + if message is not None: + self.message = message if name is not None: self.name = name if replace_requested is not None: @@ -95,6 +100,29 @@ def cloudspace_id(self, cloudspace_id: 'str'): self._cloudspace_id = cloudspace_id + @property + def message(self) -> 'str': + """Gets the message of this JobsServiceUpdateJobBody. # noqa: E501 + + Optional. Why the job failed, reported by the job's own machine with state 'fail'. Ignored from any other caller or state. # noqa: E501 + + :return: The message of this JobsServiceUpdateJobBody. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message: 'str'): + """Sets the message of this JobsServiceUpdateJobBody. + + Optional. Why the job failed, reported by the job's own machine with state 'fail'. Ignored from any other caller or state. # noqa: E501 + + :param message: The message of this JobsServiceUpdateJobBody. # noqa: E501 + :type: str + """ + + self._message = message + @property def name(self) -> 'str': """Gets the name of this JobsServiceUpdateJobBody. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/lightningapp_instance_service_update_lightningapp_instance_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/lightningapp_instance_service_update_lightningapp_instance_body.py deleted file mode 100644 index 0ab385352..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/models/lightningapp_instance_service_update_lightningapp_instance_body.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 -# This file is vendored. -# Do not edit it directly; changes will be overwritten. -# Make changes in the internal upstream repository instead. - - -""" - external/v1/auth_service.proto - - No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - - OpenAPI spec version: version not set - - Generated by: https://github.com/swagger-api/swagger-codegen.git - - NOTE - ---- - standard swagger-codegen-cli for this python client has been modified - by custom templates. The purpose of these templates is to include - typing information in the API and Model code. Please refer to the - main grid repository for more info -""" - -import pprint -import re # noqa: F401 - -from typing import TYPE_CHECKING - -import six - -if TYPE_CHECKING: - from datetime import datetime - from lightning_sdk.lightning_cloud.openapi.models import * - -class LightningappInstanceServiceUpdateLightningappInstanceBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'display_name': 'str', - 'name': 'str', - 'spec': 'V1LightningappInstanceSpec' - } - - attribute_map = { - 'display_name': 'displayName', - 'name': 'name', - 'spec': 'spec' - } - - def __init__(self, display_name: 'str' =None, name: 'str' =None, spec: 'V1LightningappInstanceSpec' =None): # noqa: E501 - """LightningappInstanceServiceUpdateLightningappInstanceBody - a model defined in Swagger""" # noqa: E501 - self._display_name = None - self._name = None - self._spec = None - self.discriminator = None - if display_name is not None: - self.display_name = display_name - if name is not None: - self.name = name - if spec is not None: - self.spec = spec - - @property - def display_name(self) -> 'str': - """Gets the display_name of this LightningappInstanceServiceUpdateLightningappInstanceBody. # noqa: E501 - - - :return: The display_name of this LightningappInstanceServiceUpdateLightningappInstanceBody. # noqa: E501 - :rtype: str - """ - return self._display_name - - @display_name.setter - def display_name(self, display_name: 'str'): - """Sets the display_name of this LightningappInstanceServiceUpdateLightningappInstanceBody. - - - :param display_name: The display_name of this LightningappInstanceServiceUpdateLightningappInstanceBody. # noqa: E501 - :type: str - """ - - self._display_name = display_name - - @property - def name(self) -> 'str': - """Gets the name of this LightningappInstanceServiceUpdateLightningappInstanceBody. # noqa: E501 - - - :return: The name of this LightningappInstanceServiceUpdateLightningappInstanceBody. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name: 'str'): - """Sets the name of this LightningappInstanceServiceUpdateLightningappInstanceBody. - - - :param name: The name of this LightningappInstanceServiceUpdateLightningappInstanceBody. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def spec(self) -> 'V1LightningappInstanceSpec': - """Gets the spec of this LightningappInstanceServiceUpdateLightningappInstanceBody. # noqa: E501 - - - :return: The spec of this LightningappInstanceServiceUpdateLightningappInstanceBody. # noqa: E501 - :rtype: V1LightningappInstanceSpec - """ - return self._spec - - @spec.setter - def spec(self, spec: 'V1LightningappInstanceSpec'): - """Sets the spec of this LightningappInstanceServiceUpdateLightningappInstanceBody. - - - :param spec: The spec of this LightningappInstanceServiceUpdateLightningappInstanceBody. # noqa: E501 - :type: V1LightningappInstanceSpec - """ - - self._spec = spec - - def to_dict(self) -> dict: - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(LightningappInstanceServiceUpdateLightningappInstanceBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self) -> str: - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other: 'LightningappInstanceServiceUpdateLightningappInstanceBody') -> bool: - """Returns true if both objects are equal""" - if not isinstance(other, LightningappInstanceServiceUpdateLightningappInstanceBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'LightningappInstanceServiceUpdateLightningappInstanceBody') -> bool: - """Returns true if both objects are not equal""" - return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/lightningapp_v2_service_create_lightningapp_from_gallery_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/lightningapp_v2_service_create_lightningapp_from_gallery_body.py deleted file mode 100644 index f1ddaf564..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/models/lightningapp_v2_service_create_lightningapp_from_gallery_body.py +++ /dev/null @@ -1,257 +0,0 @@ -# coding: utf-8 -# This file is vendored. -# Do not edit it directly; changes will be overwritten. -# Make changes in the internal upstream repository instead. - - -""" - external/v1/auth_service.proto - - No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - - OpenAPI spec version: version not set - - Generated by: https://github.com/swagger-api/swagger-codegen.git - - NOTE - ---- - standard swagger-codegen-cli for this python client has been modified - by custom templates. The purpose of these templates is to include - typing information in the API and Model code. Please refer to the - main grid repository for more info -""" - -import pprint -import re # noqa: F401 - -from typing import TYPE_CHECKING - -import six - -if TYPE_CHECKING: - from datetime import datetime - from lightning_sdk.lightning_cloud.openapi.models import * - -class LightningappV2ServiceCreateLightningappFromGalleryBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'cluster_id': 'str', - 'component_id': 'str', - 'env': 'list[V1EnvVar]', - 'hostname': 'str', - 'id': 'str', - 'version': 'str' - } - - attribute_map = { - 'cluster_id': 'clusterId', - 'component_id': 'componentId', - 'env': 'env', - 'hostname': 'hostname', - 'id': 'id', - 'version': 'version' - } - - def __init__(self, cluster_id: 'str' =None, component_id: 'str' =None, env: 'list[V1EnvVar]' =None, hostname: 'str' =None, id: 'str' =None, version: 'str' =None): # noqa: E501 - """LightningappV2ServiceCreateLightningappFromGalleryBody - a model defined in Swagger""" # noqa: E501 - self._cluster_id = None - self._component_id = None - self._env = None - self._hostname = None - self._id = None - self._version = None - self.discriminator = None - if cluster_id is not None: - self.cluster_id = cluster_id - if component_id is not None: - self.component_id = component_id - if env is not None: - self.env = env - if hostname is not None: - self.hostname = hostname - if id is not None: - self.id = id - if version is not None: - self.version = version - - @property - def cluster_id(self) -> 'str': - """Gets the cluster_id of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - - - :return: The cluster_id of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - :rtype: str - """ - return self._cluster_id - - @cluster_id.setter - def cluster_id(self, cluster_id: 'str'): - """Sets the cluster_id of this LightningappV2ServiceCreateLightningappFromGalleryBody. - - - :param cluster_id: The cluster_id of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - :type: str - """ - - self._cluster_id = cluster_id - - @property - def component_id(self) -> 'str': - """Gets the component_id of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - - - :return: The component_id of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - :rtype: str - """ - return self._component_id - - @component_id.setter - def component_id(self, component_id: 'str'): - """Sets the component_id of this LightningappV2ServiceCreateLightningappFromGalleryBody. - - - :param component_id: The component_id of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - :type: str - """ - - self._component_id = component_id - - @property - def env(self) -> 'list[V1EnvVar]': - """Gets the env of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - - - :return: The env of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - :rtype: list[V1EnvVar] - """ - return self._env - - @env.setter - def env(self, env: 'list[V1EnvVar]'): - """Sets the env of this LightningappV2ServiceCreateLightningappFromGalleryBody. - - - :param env: The env of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - :type: list[V1EnvVar] - """ - - self._env = env - - @property - def hostname(self) -> 'str': - """Gets the hostname of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - - - :return: The hostname of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - :rtype: str - """ - return self._hostname - - @hostname.setter - def hostname(self, hostname: 'str'): - """Sets the hostname of this LightningappV2ServiceCreateLightningappFromGalleryBody. - - - :param hostname: The hostname of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - :type: str - """ - - self._hostname = hostname - - @property - def id(self) -> 'str': - """Gets the id of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - - - :return: The id of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id: 'str'): - """Sets the id of this LightningappV2ServiceCreateLightningappFromGalleryBody. - - - :param id: The id of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def version(self) -> 'str': - """Gets the version of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - - - :return: The version of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version: 'str'): - """Sets the version of this LightningappV2ServiceCreateLightningappFromGalleryBody. - - - :param version: The version of this LightningappV2ServiceCreateLightningappFromGalleryBody. # noqa: E501 - :type: str - """ - - self._version = version - - def to_dict(self) -> dict: - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(LightningappV2ServiceCreateLightningappFromGalleryBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self) -> str: - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other: 'LightningappV2ServiceCreateLightningappFromGalleryBody') -> bool: - """Returns true if both objects are equal""" - if not isinstance(other, LightningappV2ServiceCreateLightningappFromGalleryBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'LightningappV2ServiceCreateLightningappFromGalleryBody') -> bool: - """Returns true if both objects are not equal""" - return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/lightningwork_service_create_lightningwork_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/lightningwork_service_create_lightningwork_body.py deleted file mode 100644 index 50f59c52a..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/models/lightningwork_service_create_lightningwork_body.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 -# This file is vendored. -# Do not edit it directly; changes will be overwritten. -# Make changes in the internal upstream repository instead. - - -""" - external/v1/auth_service.proto - - No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - - OpenAPI spec version: version not set - - Generated by: https://github.com/swagger-api/swagger-codegen.git - - NOTE - ---- - standard swagger-codegen-cli for this python client has been modified - by custom templates. The purpose of these templates is to include - typing information in the API and Model code. Please refer to the - main grid repository for more info -""" - -import pprint -import re # noqa: F401 - -from typing import TYPE_CHECKING - -import six - -if TYPE_CHECKING: - from datetime import datetime - from lightning_sdk.lightning_cloud.openapi.models import * - -class LightningworkServiceCreateLightningworkBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'display_name': 'str', - 'name': 'str', - 'spec': 'LightningworkServiceCreateLightningworkBodySpec' - } - - attribute_map = { - 'display_name': 'displayName', - 'name': 'name', - 'spec': 'spec' - } - - def __init__(self, display_name: 'str' =None, name: 'str' =None, spec: 'LightningworkServiceCreateLightningworkBodySpec' =None): # noqa: E501 - """LightningworkServiceCreateLightningworkBody - a model defined in Swagger""" # noqa: E501 - self._display_name = None - self._name = None - self._spec = None - self.discriminator = None - if display_name is not None: - self.display_name = display_name - if name is not None: - self.name = name - if spec is not None: - self.spec = spec - - @property - def display_name(self) -> 'str': - """Gets the display_name of this LightningworkServiceCreateLightningworkBody. # noqa: E501 - - - :return: The display_name of this LightningworkServiceCreateLightningworkBody. # noqa: E501 - :rtype: str - """ - return self._display_name - - @display_name.setter - def display_name(self, display_name: 'str'): - """Sets the display_name of this LightningworkServiceCreateLightningworkBody. - - - :param display_name: The display_name of this LightningworkServiceCreateLightningworkBody. # noqa: E501 - :type: str - """ - - self._display_name = display_name - - @property - def name(self) -> 'str': - """Gets the name of this LightningworkServiceCreateLightningworkBody. # noqa: E501 - - - :return: The name of this LightningworkServiceCreateLightningworkBody. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name: 'str'): - """Sets the name of this LightningworkServiceCreateLightningworkBody. - - - :param name: The name of this LightningworkServiceCreateLightningworkBody. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def spec(self) -> 'LightningworkServiceCreateLightningworkBodySpec': - """Gets the spec of this LightningworkServiceCreateLightningworkBody. # noqa: E501 - - - :return: The spec of this LightningworkServiceCreateLightningworkBody. # noqa: E501 - :rtype: LightningworkServiceCreateLightningworkBodySpec - """ - return self._spec - - @spec.setter - def spec(self, spec: 'LightningworkServiceCreateLightningworkBodySpec'): - """Sets the spec of this LightningworkServiceCreateLightningworkBody. - - - :param spec: The spec of this LightningworkServiceCreateLightningworkBody. # noqa: E501 - :type: LightningworkServiceCreateLightningworkBodySpec - """ - - self._spec = spec - - def to_dict(self) -> dict: - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(LightningworkServiceCreateLightningworkBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self) -> str: - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other: 'LightningworkServiceCreateLightningworkBody') -> bool: - """Returns true if both objects are equal""" - if not isinstance(other, LightningworkServiceCreateLightningworkBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'LightningworkServiceCreateLightningworkBody') -> bool: - """Returns true if both objects are not equal""" - return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/lightningwork_service_create_lightningwork_body_spec.py b/python/lightning_sdk/lightning_cloud/openapi/models/lightningwork_service_create_lightningwork_body_spec.py deleted file mode 100644 index b537a7674..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/models/lightningwork_service_create_lightningwork_body_spec.py +++ /dev/null @@ -1,491 +0,0 @@ -# coding: utf-8 -# This file is vendored. -# Do not edit it directly; changes will be overwritten. -# Make changes in the internal upstream repository instead. - - -""" - external/v1/auth_service.proto - - No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - - OpenAPI spec version: version not set - - Generated by: https://github.com/swagger-api/swagger-codegen.git - - NOTE - ---- - standard swagger-codegen-cli for this python client has been modified - by custom templates. The purpose of these templates is to include - typing information in the API and Model code. Please refer to the - main grid repository for more info -""" - -import pprint -import re # noqa: F401 - -from typing import TYPE_CHECKING - -import six - -if TYPE_CHECKING: - from datetime import datetime - from lightning_sdk.lightning_cloud.openapi.models import * - -class LightningworkServiceCreateLightningworkBodySpec(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'build_spec': 'V1BuildSpec', - 'cloud_space_id': 'str', - 'cluster_id': 'str', - 'compute_config': 'V1ComputeConfig', - 'data_connection_mounts': 'list[V1DataConnectionMount]', - 'data_connections': 'list[V1DataConnection]', - 'desired_state': 'V1LightningworkState', - 'drives': 'list[V1LightningworkDrives]', - 'env': 'list[V1EnvVar]', - 'locked_region': 'str', - 'network_config': 'list[V1NetworkConfig]', - 'pause_automation': 'bool', - 'restart_policy': 'V1LightningappRestartPolicy', - 'user_id': 'str', - 'user_requested_compute_config': 'V1UserRequestedComputeConfig' - } - - attribute_map = { - 'build_spec': 'buildSpec', - 'cloud_space_id': 'cloudSpaceId', - 'cluster_id': 'clusterId', - 'compute_config': 'computeConfig', - 'data_connection_mounts': 'dataConnectionMounts', - 'data_connections': 'dataConnections', - 'desired_state': 'desiredState', - 'drives': 'drives', - 'env': 'env', - 'locked_region': 'lockedRegion', - 'network_config': 'networkConfig', - 'pause_automation': 'pauseAutomation', - 'restart_policy': 'restartPolicy', - 'user_id': 'userId', - 'user_requested_compute_config': 'userRequestedComputeConfig' - } - - def __init__(self, build_spec: 'V1BuildSpec' =None, cloud_space_id: 'str' =None, cluster_id: 'str' =None, compute_config: 'V1ComputeConfig' =None, data_connection_mounts: 'list[V1DataConnectionMount]' =None, data_connections: 'list[V1DataConnection]' =None, desired_state: 'V1LightningworkState' =None, drives: 'list[V1LightningworkDrives]' =None, env: 'list[V1EnvVar]' =None, locked_region: 'str' =None, network_config: 'list[V1NetworkConfig]' =None, pause_automation: 'bool' =None, restart_policy: 'V1LightningappRestartPolicy' =None, user_id: 'str' =None, user_requested_compute_config: 'V1UserRequestedComputeConfig' =None): # noqa: E501 - """LightningworkServiceCreateLightningworkBodySpec - a model defined in Swagger""" # noqa: E501 - self._build_spec = None - self._cloud_space_id = None - self._cluster_id = None - self._compute_config = None - self._data_connection_mounts = None - self._data_connections = None - self._desired_state = None - self._drives = None - self._env = None - self._locked_region = None - self._network_config = None - self._pause_automation = None - self._restart_policy = None - self._user_id = None - self._user_requested_compute_config = None - self.discriminator = None - if build_spec is not None: - self.build_spec = build_spec - if cloud_space_id is not None: - self.cloud_space_id = cloud_space_id - if cluster_id is not None: - self.cluster_id = cluster_id - if compute_config is not None: - self.compute_config = compute_config - if data_connection_mounts is not None: - self.data_connection_mounts = data_connection_mounts - if data_connections is not None: - self.data_connections = data_connections - if desired_state is not None: - self.desired_state = desired_state - if drives is not None: - self.drives = drives - if env is not None: - self.env = env - if locked_region is not None: - self.locked_region = locked_region - if network_config is not None: - self.network_config = network_config - if pause_automation is not None: - self.pause_automation = pause_automation - if restart_policy is not None: - self.restart_policy = restart_policy - if user_id is not None: - self.user_id = user_id - if user_requested_compute_config is not None: - self.user_requested_compute_config = user_requested_compute_config - - @property - def build_spec(self) -> 'V1BuildSpec': - """Gets the build_spec of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The build_spec of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: V1BuildSpec - """ - return self._build_spec - - @build_spec.setter - def build_spec(self, build_spec: 'V1BuildSpec'): - """Sets the build_spec of this LightningworkServiceCreateLightningworkBodySpec. - - - :param build_spec: The build_spec of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: V1BuildSpec - """ - - self._build_spec = build_spec - - @property - def cloud_space_id(self) -> 'str': - """Gets the cloud_space_id of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The cloud_space_id of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: str - """ - return self._cloud_space_id - - @cloud_space_id.setter - def cloud_space_id(self, cloud_space_id: 'str'): - """Sets the cloud_space_id of this LightningworkServiceCreateLightningworkBodySpec. - - - :param cloud_space_id: The cloud_space_id of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: str - """ - - self._cloud_space_id = cloud_space_id - - @property - def cluster_id(self) -> 'str': - """Gets the cluster_id of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The cluster_id of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: str - """ - return self._cluster_id - - @cluster_id.setter - def cluster_id(self, cluster_id: 'str'): - """Sets the cluster_id of this LightningworkServiceCreateLightningworkBodySpec. - - - :param cluster_id: The cluster_id of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: str - """ - - self._cluster_id = cluster_id - - @property - def compute_config(self) -> 'V1ComputeConfig': - """Gets the compute_config of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The compute_config of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: V1ComputeConfig - """ - return self._compute_config - - @compute_config.setter - def compute_config(self, compute_config: 'V1ComputeConfig'): - """Sets the compute_config of this LightningworkServiceCreateLightningworkBodySpec. - - - :param compute_config: The compute_config of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: V1ComputeConfig - """ - - self._compute_config = compute_config - - @property - def data_connection_mounts(self) -> 'list[V1DataConnectionMount]': - """Gets the data_connection_mounts of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The data_connection_mounts of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: list[V1DataConnectionMount] - """ - return self._data_connection_mounts - - @data_connection_mounts.setter - def data_connection_mounts(self, data_connection_mounts: 'list[V1DataConnectionMount]'): - """Sets the data_connection_mounts of this LightningworkServiceCreateLightningworkBodySpec. - - - :param data_connection_mounts: The data_connection_mounts of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: list[V1DataConnectionMount] - """ - - self._data_connection_mounts = data_connection_mounts - - @property - def data_connections(self) -> 'list[V1DataConnection]': - """Gets the data_connections of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The data_connections of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: list[V1DataConnection] - """ - return self._data_connections - - @data_connections.setter - def data_connections(self, data_connections: 'list[V1DataConnection]'): - """Sets the data_connections of this LightningworkServiceCreateLightningworkBodySpec. - - - :param data_connections: The data_connections of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: list[V1DataConnection] - """ - - self._data_connections = data_connections - - @property - def desired_state(self) -> 'V1LightningworkState': - """Gets the desired_state of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The desired_state of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: V1LightningworkState - """ - return self._desired_state - - @desired_state.setter - def desired_state(self, desired_state: 'V1LightningworkState'): - """Sets the desired_state of this LightningworkServiceCreateLightningworkBodySpec. - - - :param desired_state: The desired_state of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: V1LightningworkState - """ - - self._desired_state = desired_state - - @property - def drives(self) -> 'list[V1LightningworkDrives]': - """Gets the drives of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The drives of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: list[V1LightningworkDrives] - """ - return self._drives - - @drives.setter - def drives(self, drives: 'list[V1LightningworkDrives]'): - """Sets the drives of this LightningworkServiceCreateLightningworkBodySpec. - - - :param drives: The drives of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: list[V1LightningworkDrives] - """ - - self._drives = drives - - @property - def env(self) -> 'list[V1EnvVar]': - """Gets the env of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The env of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: list[V1EnvVar] - """ - return self._env - - @env.setter - def env(self, env: 'list[V1EnvVar]'): - """Sets the env of this LightningworkServiceCreateLightningworkBodySpec. - - - :param env: The env of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: list[V1EnvVar] - """ - - self._env = env - - @property - def locked_region(self) -> 'str': - """Gets the locked_region of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The locked_region of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: str - """ - return self._locked_region - - @locked_region.setter - def locked_region(self, locked_region: 'str'): - """Sets the locked_region of this LightningworkServiceCreateLightningworkBodySpec. - - - :param locked_region: The locked_region of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: str - """ - - self._locked_region = locked_region - - @property - def network_config(self) -> 'list[V1NetworkConfig]': - """Gets the network_config of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The network_config of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: list[V1NetworkConfig] - """ - return self._network_config - - @network_config.setter - def network_config(self, network_config: 'list[V1NetworkConfig]'): - """Sets the network_config of this LightningworkServiceCreateLightningworkBodySpec. - - - :param network_config: The network_config of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: list[V1NetworkConfig] - """ - - self._network_config = network_config - - @property - def pause_automation(self) -> 'bool': - """Gets the pause_automation of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The pause_automation of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: bool - """ - return self._pause_automation - - @pause_automation.setter - def pause_automation(self, pause_automation: 'bool'): - """Sets the pause_automation of this LightningworkServiceCreateLightningworkBodySpec. - - - :param pause_automation: The pause_automation of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: bool - """ - - self._pause_automation = pause_automation - - @property - def restart_policy(self) -> 'V1LightningappRestartPolicy': - """Gets the restart_policy of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The restart_policy of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: V1LightningappRestartPolicy - """ - return self._restart_policy - - @restart_policy.setter - def restart_policy(self, restart_policy: 'V1LightningappRestartPolicy'): - """Sets the restart_policy of this LightningworkServiceCreateLightningworkBodySpec. - - - :param restart_policy: The restart_policy of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: V1LightningappRestartPolicy - """ - - self._restart_policy = restart_policy - - @property - def user_id(self) -> 'str': - """Gets the user_id of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The user_id of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: str - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id: 'str'): - """Sets the user_id of this LightningworkServiceCreateLightningworkBodySpec. - - - :param user_id: The user_id of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: str - """ - - self._user_id = user_id - - @property - def user_requested_compute_config(self) -> 'V1UserRequestedComputeConfig': - """Gets the user_requested_compute_config of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - - - :return: The user_requested_compute_config of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :rtype: V1UserRequestedComputeConfig - """ - return self._user_requested_compute_config - - @user_requested_compute_config.setter - def user_requested_compute_config(self, user_requested_compute_config: 'V1UserRequestedComputeConfig'): - """Sets the user_requested_compute_config of this LightningworkServiceCreateLightningworkBodySpec. - - - :param user_requested_compute_config: The user_requested_compute_config of this LightningworkServiceCreateLightningworkBodySpec. # noqa: E501 - :type: V1UserRequestedComputeConfig - """ - - self._user_requested_compute_config = user_requested_compute_config - - def to_dict(self) -> dict: - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(LightningworkServiceCreateLightningworkBodySpec, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self) -> str: - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other: 'LightningworkServiceCreateLightningworkBodySpec') -> bool: - """Returns true if both objects are equal""" - if not isinstance(other, LightningworkServiceCreateLightningworkBodySpec): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'LightningworkServiceCreateLightningworkBodySpec') -> bool: - """Returns true if both objects are not equal""" - return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/organizations_service_set_org_default_teamspaces_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/organizations_service_set_org_default_teamspaces_body.py new file mode 100644 index 000000000..2331c081d --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/organizations_service_set_org_default_teamspaces_body.py @@ -0,0 +1,127 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class OrganizationsServiceSetOrgDefaultTeamspacesBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'default_teamspace_ids': 'list[str]' + } + + attribute_map = { + 'default_teamspace_ids': 'defaultTeamspaceIds' + } + + def __init__(self, default_teamspace_ids: 'list[str]' =None): # noqa: E501 + """OrganizationsServiceSetOrgDefaultTeamspacesBody - a model defined in Swagger""" # noqa: E501 + self._default_teamspace_ids = None + self.discriminator = None + if default_teamspace_ids is not None: + self.default_teamspace_ids = default_teamspace_ids + + @property + def default_teamspace_ids(self) -> 'list[str]': + """Gets the default_teamspace_ids of this OrganizationsServiceSetOrgDefaultTeamspacesBody. # noqa: E501 + + + :return: The default_teamspace_ids of this OrganizationsServiceSetOrgDefaultTeamspacesBody. # noqa: E501 + :rtype: list[str] + """ + return self._default_teamspace_ids + + @default_teamspace_ids.setter + def default_teamspace_ids(self, default_teamspace_ids: 'list[str]'): + """Sets the default_teamspace_ids of this OrganizationsServiceSetOrgDefaultTeamspacesBody. + + + :param default_teamspace_ids: The default_teamspace_ids of this OrganizationsServiceSetOrgDefaultTeamspacesBody. # noqa: E501 + :type: list[str] + """ + + self._default_teamspace_ids = default_teamspace_ids + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OrganizationsServiceSetOrgDefaultTeamspacesBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'OrganizationsServiceSetOrgDefaultTeamspacesBody') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, OrganizationsServiceSetOrgDefaultTeamspacesBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'OrganizationsServiceSetOrgDefaultTeamspacesBody') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/organizations_service_update_organization_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/organizations_service_update_organization_body.py index 6a24d2e96..9cac2ab72 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/organizations_service_update_organization_body.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/organizations_service_update_organization_body.py @@ -71,8 +71,6 @@ class OrganizationsServiceUpdateOrganizationBody(object): 'disallow_lambda_saas': 'bool', 'disallow_lightning_saas': 'bool', 'disallow_nebius_saas': 'bool', - 'disallow_voltage_park_saas': 'bool', - 'disallow_vultr_saas': 'bool', 'display_name': 'str', 'domain': 'str', 'email': 'str', @@ -117,8 +115,6 @@ class OrganizationsServiceUpdateOrganizationBody(object): 'disallow_lambda_saas': 'disallowLambdaSaas', 'disallow_lightning_saas': 'disallowLightningSaas', 'disallow_nebius_saas': 'disallowNebiusSaas', - 'disallow_voltage_park_saas': 'disallowVoltageParkSaas', - 'disallow_vultr_saas': 'disallowVultrSaas', 'display_name': 'displayName', 'domain': 'domain', 'email': 'email', @@ -136,7 +132,7 @@ class OrganizationsServiceUpdateOrganizationBody(object): 'workload_max_run_duration': 'workloadMaxRunDuration' } - def __init__(self, alerts_config: 'V1OrgAlertsConfig' =None, allow_budgeting: 'bool' =None, allow_cloud_space_publish: 'bool' =None, allow_credits_auto_replenish: 'bool' =None, allow_external_project_duplication: 'bool' =None, allow_guest: 'bool' =None, allow_lightning_hosted_models: 'bool' =None, allow_marketplace: 'bool' =None, allow_member_invitations: 'bool' =None, allow_member_teamspace_creation: 'bool' =None, auto_invite_by_domain: 'bool' =None, auto_join_domains: 'list[str]' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, auto_switch_machine: 'bool' =None, default_machine_type: 'str' =None, default_project_id: 'str' =None, description: 'str' =None, disable_coding_agents: 'bool' =None, disable_public_templates: 'bool' =None, disallow_aws_saas: 'bool' =None, disallow_dgx_saas: 'bool' =None, disallow_gcp_saas: 'bool' =None, disallow_lambda_saas: 'bool' =None, disallow_lightning_saas: 'bool' =None, disallow_nebius_saas: 'bool' =None, disallow_voltage_park_saas: 'bool' =None, disallow_vultr_saas: 'bool' =None, display_name: 'str' =None, domain: 'str' =None, email: 'str' =None, featured_gallery: 'bool' =None, location: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, show_model_apis_tab: 'bool' =None, start_studios_on_spot_instance: 'bool' =None, switch_to_default_machine_on_idle: 'bool' =None, teamspace_default_credits: 'float' =None, timezone: 'str' =None, twitter_username: 'str' =None, workload_max_run_duration: 'str' =None): # noqa: E501 + def __init__(self, alerts_config: 'V1OrgAlertsConfig' =None, allow_budgeting: 'bool' =None, allow_cloud_space_publish: 'bool' =None, allow_credits_auto_replenish: 'bool' =None, allow_external_project_duplication: 'bool' =None, allow_guest: 'bool' =None, allow_lightning_hosted_models: 'bool' =None, allow_marketplace: 'bool' =None, allow_member_invitations: 'bool' =None, allow_member_teamspace_creation: 'bool' =None, auto_invite_by_domain: 'bool' =None, auto_join_domains: 'list[str]' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, auto_switch_machine: 'bool' =None, default_machine_type: 'str' =None, default_project_id: 'str' =None, description: 'str' =None, disable_coding_agents: 'bool' =None, disable_public_templates: 'bool' =None, disallow_aws_saas: 'bool' =None, disallow_dgx_saas: 'bool' =None, disallow_gcp_saas: 'bool' =None, disallow_lambda_saas: 'bool' =None, disallow_lightning_saas: 'bool' =None, disallow_nebius_saas: 'bool' =None, display_name: 'str' =None, domain: 'str' =None, email: 'str' =None, featured_gallery: 'bool' =None, location: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, show_model_apis_tab: 'bool' =None, start_studios_on_spot_instance: 'bool' =None, switch_to_default_machine_on_idle: 'bool' =None, teamspace_default_credits: 'float' =None, timezone: 'str' =None, twitter_username: 'str' =None, workload_max_run_duration: 'str' =None): # noqa: E501 """OrganizationsServiceUpdateOrganizationBody - a model defined in Swagger""" # noqa: E501 self._alerts_config = None self._allow_budgeting = None @@ -164,8 +160,6 @@ def __init__(self, alerts_config: 'V1OrgAlertsConfig' =None, allow_budgeting: 'b self._disallow_lambda_saas = None self._disallow_lightning_saas = None self._disallow_nebius_saas = None - self._disallow_voltage_park_saas = None - self._disallow_vultr_saas = None self._display_name = None self._domain = None self._email = None @@ -234,10 +228,6 @@ def __init__(self, alerts_config: 'V1OrgAlertsConfig' =None, allow_budgeting: 'b self.disallow_lightning_saas = disallow_lightning_saas if disallow_nebius_saas is not None: self.disallow_nebius_saas = disallow_nebius_saas - if disallow_voltage_park_saas is not None: - self.disallow_voltage_park_saas = disallow_voltage_park_saas - if disallow_vultr_saas is not None: - self.disallow_vultr_saas = disallow_vultr_saas if display_name is not None: self.display_name = display_name if domain is not None: @@ -815,48 +805,6 @@ def disallow_nebius_saas(self, disallow_nebius_saas: 'bool'): self._disallow_nebius_saas = disallow_nebius_saas - @property - def disallow_voltage_park_saas(self) -> 'bool': - """Gets the disallow_voltage_park_saas of this OrganizationsServiceUpdateOrganizationBody. # noqa: E501 - - - :return: The disallow_voltage_park_saas of this OrganizationsServiceUpdateOrganizationBody. # noqa: E501 - :rtype: bool - """ - return self._disallow_voltage_park_saas - - @disallow_voltage_park_saas.setter - def disallow_voltage_park_saas(self, disallow_voltage_park_saas: 'bool'): - """Sets the disallow_voltage_park_saas of this OrganizationsServiceUpdateOrganizationBody. - - - :param disallow_voltage_park_saas: The disallow_voltage_park_saas of this OrganizationsServiceUpdateOrganizationBody. # noqa: E501 - :type: bool - """ - - self._disallow_voltage_park_saas = disallow_voltage_park_saas - - @property - def disallow_vultr_saas(self) -> 'bool': - """Gets the disallow_vultr_saas of this OrganizationsServiceUpdateOrganizationBody. # noqa: E501 - - - :return: The disallow_vultr_saas of this OrganizationsServiceUpdateOrganizationBody. # noqa: E501 - :rtype: bool - """ - return self._disallow_vultr_saas - - @disallow_vultr_saas.setter - def disallow_vultr_saas(self, disallow_vultr_saas: 'bool'): - """Sets the disallow_vultr_saas of this OrganizationsServiceUpdateOrganizationBody. - - - :param disallow_vultr_saas: The disallow_vultr_saas of this OrganizationsServiceUpdateOrganizationBody. # noqa: E501 - :type: bool - """ - - self._disallow_vultr_saas = disallow_vultr_saas - @property def display_name(self) -> 'str': """Gets the display_name of this OrganizationsServiceUpdateOrganizationBody. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/projects_service_update_api_key_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/projects_service_update_api_key_body.py new file mode 100644 index 000000000..b9f0ad300 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/projects_service_update_api_key_body.py @@ -0,0 +1,155 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class ProjectsServiceUpdateAPIKeyBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'active': 'bool', + 'org_id': 'str' + } + + attribute_map = { + 'active': 'active', + 'org_id': 'orgId' + } + + def __init__(self, active: 'bool' =None, org_id: 'str' =None): # noqa: E501 + """ProjectsServiceUpdateAPIKeyBody - a model defined in Swagger""" # noqa: E501 + self._active = None + self._org_id = None + self.discriminator = None + if active is not None: + self.active = active + if org_id is not None: + self.org_id = org_id + + @property + def active(self) -> 'bool': + """Gets the active of this ProjectsServiceUpdateAPIKeyBody. # noqa: E501 + + true moves the key to ACTIVE, false to INACTIVE. Revoked, expired and deleted keys cannot be toggled. # noqa: E501 + + :return: The active of this ProjectsServiceUpdateAPIKeyBody. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active: 'bool'): + """Sets the active of this ProjectsServiceUpdateAPIKeyBody. + + true moves the key to ACTIVE, false to INACTIVE. Revoked, expired and deleted keys cannot be toggled. # noqa: E501 + + :param active: The active of this ProjectsServiceUpdateAPIKeyBody. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def org_id(self) -> 'str': + """Gets the org_id of this ProjectsServiceUpdateAPIKeyBody. # noqa: E501 + + + :return: The org_id of this ProjectsServiceUpdateAPIKeyBody. # noqa: E501 + :rtype: str + """ + return self._org_id + + @org_id.setter + def org_id(self, org_id: 'str'): + """Sets the org_id of this ProjectsServiceUpdateAPIKeyBody. + + + :param org_id: The org_id of this ProjectsServiceUpdateAPIKeyBody. # noqa: E501 + :type: str + """ + + self._org_id = org_id + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ProjectsServiceUpdateAPIKeyBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'ProjectsServiceUpdateAPIKeyBody') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, ProjectsServiceUpdateAPIKeyBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ProjectsServiceUpdateAPIKeyBody') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/projects_service_update_project_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/projects_service_update_project_body.py index aad1f3aa5..dc7114568 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/projects_service_update_project_body.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/projects_service_update_project_body.py @@ -53,8 +53,6 @@ class ProjectsServiceUpdateProjectBody(object): 'allow_lambda_saas': 'bool', 'allow_lightning_saas': 'bool', 'allow_nebius_saas': 'bool', - 'allow_voltage_park_saas': 'bool', - 'allow_vultr_saas': 'bool', 'auto_replenish_amount': 'float', 'auto_replenish_threshold': 'float', 'auto_switch_machine': 'bool', @@ -83,8 +81,6 @@ class ProjectsServiceUpdateProjectBody(object): 'allow_lambda_saas': 'allowLambdaSaas', 'allow_lightning_saas': 'allowLightningSaas', 'allow_nebius_saas': 'allowNebiusSaas', - 'allow_voltage_park_saas': 'allowVoltageParkSaas', - 'allow_vultr_saas': 'allowVultrSaas', 'auto_replenish_amount': 'autoReplenishAmount', 'auto_replenish_threshold': 'autoReplenishThreshold', 'auto_switch_machine': 'autoSwitchMachine', @@ -104,7 +100,7 @@ class ProjectsServiceUpdateProjectBody(object): 'switch_to_default_machine_on_idle': 'switchToDefaultMachineOnIdle' } - def __init__(self, allow_aws_saas: 'bool' =None, allow_credits_auto_replenish: 'bool' =None, allow_dgx_saas: 'bool' =None, allow_external_project_duplication: 'bool' =None, allow_gcp_saas: 'bool' =None, allow_lambda_saas: 'bool' =None, allow_lightning_saas: 'bool' =None, allow_nebius_saas: 'bool' =None, allow_voltage_park_saas: 'bool' =None, allow_vultr_saas: 'bool' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, auto_switch_machine: 'bool' =None, budgeting_enabled: 'bool' =None, custom_tags: 'list[V1ProjectResourceTag]' =None, default_machine_type: 'str' =None, description: 'str' =None, display_name: 'str' =None, layout_config: 'list[V1ProjectTab]' =None, name: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, quotas: 'V1Quotas' =None, same_compute_on_resume: 'bool' =None, start_studio_on_spot_instance: 'bool' =None, switch_to_default_machine_on_idle: 'bool' =None): # noqa: E501 + def __init__(self, allow_aws_saas: 'bool' =None, allow_credits_auto_replenish: 'bool' =None, allow_dgx_saas: 'bool' =None, allow_external_project_duplication: 'bool' =None, allow_gcp_saas: 'bool' =None, allow_lambda_saas: 'bool' =None, allow_lightning_saas: 'bool' =None, allow_nebius_saas: 'bool' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, auto_switch_machine: 'bool' =None, budgeting_enabled: 'bool' =None, custom_tags: 'list[V1ProjectResourceTag]' =None, default_machine_type: 'str' =None, description: 'str' =None, display_name: 'str' =None, layout_config: 'list[V1ProjectTab]' =None, name: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, quotas: 'V1Quotas' =None, same_compute_on_resume: 'bool' =None, start_studio_on_spot_instance: 'bool' =None, switch_to_default_machine_on_idle: 'bool' =None): # noqa: E501 """ProjectsServiceUpdateProjectBody - a model defined in Swagger""" # noqa: E501 self._allow_aws_saas = None self._allow_credits_auto_replenish = None @@ -114,8 +110,6 @@ def __init__(self, allow_aws_saas: 'bool' =None, allow_credits_auto_replenish: ' self._allow_lambda_saas = None self._allow_lightning_saas = None self._allow_nebius_saas = None - self._allow_voltage_park_saas = None - self._allow_vultr_saas = None self._auto_replenish_amount = None self._auto_replenish_threshold = None self._auto_switch_machine = None @@ -150,10 +144,6 @@ def __init__(self, allow_aws_saas: 'bool' =None, allow_credits_auto_replenish: ' self.allow_lightning_saas = allow_lightning_saas if allow_nebius_saas is not None: self.allow_nebius_saas = allow_nebius_saas - if allow_voltage_park_saas is not None: - self.allow_voltage_park_saas = allow_voltage_park_saas - if allow_vultr_saas is not None: - self.allow_vultr_saas = allow_vultr_saas if auto_replenish_amount is not None: self.auto_replenish_amount = auto_replenish_amount if auto_replenish_threshold is not None: @@ -357,48 +347,6 @@ def allow_nebius_saas(self, allow_nebius_saas: 'bool'): self._allow_nebius_saas = allow_nebius_saas - @property - def allow_voltage_park_saas(self) -> 'bool': - """Gets the allow_voltage_park_saas of this ProjectsServiceUpdateProjectBody. # noqa: E501 - - - :return: The allow_voltage_park_saas of this ProjectsServiceUpdateProjectBody. # noqa: E501 - :rtype: bool - """ - return self._allow_voltage_park_saas - - @allow_voltage_park_saas.setter - def allow_voltage_park_saas(self, allow_voltage_park_saas: 'bool'): - """Sets the allow_voltage_park_saas of this ProjectsServiceUpdateProjectBody. - - - :param allow_voltage_park_saas: The allow_voltage_park_saas of this ProjectsServiceUpdateProjectBody. # noqa: E501 - :type: bool - """ - - self._allow_voltage_park_saas = allow_voltage_park_saas - - @property - def allow_vultr_saas(self) -> 'bool': - """Gets the allow_vultr_saas of this ProjectsServiceUpdateProjectBody. # noqa: E501 - - - :return: The allow_vultr_saas of this ProjectsServiceUpdateProjectBody. # noqa: E501 - :rtype: bool - """ - return self._allow_vultr_saas - - @allow_vultr_saas.setter - def allow_vultr_saas(self, allow_vultr_saas: 'bool'): - """Sets the allow_vultr_saas of this ProjectsServiceUpdateProjectBody. - - - :param allow_vultr_saas: The allow_vultr_saas of this ProjectsServiceUpdateProjectBody. # noqa: E501 - :type: bool - """ - - self._allow_vultr_saas = allow_vultr_saas - @property def auto_replenish_amount(self) -> 'float': """Gets the auto_replenish_amount of this ProjectsServiceUpdateProjectBody. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/lightningwork_service_batch_update_lightningworks_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/sandboxes_service_expose_sandbox_ports_body.py similarity index 55% rename from python/lightning_sdk/lightning_cloud/openapi/models/lightningwork_service_batch_update_lightningworks_body.py rename to python/lightning_sdk/lightning_cloud/openapi/models/sandboxes_service_expose_sandbox_ports_body.py index 5788a6b5a..df99214e5 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/lightningwork_service_batch_update_lightningworks_body.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/sandboxes_service_expose_sandbox_ports_body.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class LightningworkServiceBatchUpdateLightningworksBody(object): +class SandboxesServiceExposeSandboxPortsBody(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -45,66 +45,68 @@ class LightningworkServiceBatchUpdateLightningworksBody(object): and the value is json key in definition. """ swagger_types = { - 'desired_state': 'V1LightningworkState', - 'work_ids': 'list[str]' + 'organization_id': 'str', + 'ports': 'list[str]' } attribute_map = { - 'desired_state': 'desiredState', - 'work_ids': 'workIds' + 'organization_id': 'organizationId', + 'ports': 'ports' } - def __init__(self, desired_state: 'V1LightningworkState' =None, work_ids: 'list[str]' =None): # noqa: E501 - """LightningworkServiceBatchUpdateLightningworksBody - a model defined in Swagger""" # noqa: E501 - self._desired_state = None - self._work_ids = None + def __init__(self, organization_id: 'str' =None, ports: 'list[str]' =None): # noqa: E501 + """SandboxesServiceExposeSandboxPortsBody - a model defined in Swagger""" # noqa: E501 + self._organization_id = None + self._ports = None self.discriminator = None - if desired_state is not None: - self.desired_state = desired_state - if work_ids is not None: - self.work_ids = work_ids + if organization_id is not None: + self.organization_id = organization_id + if ports is not None: + self.ports = ports @property - def desired_state(self) -> 'V1LightningworkState': - """Gets the desired_state of this LightningworkServiceBatchUpdateLightningworksBody. # noqa: E501 + def organization_id(self) -> 'str': + """Gets the organization_id of this SandboxesServiceExposeSandboxPortsBody. # noqa: E501 - :return: The desired_state of this LightningworkServiceBatchUpdateLightningworksBody. # noqa: E501 - :rtype: V1LightningworkState + :return: The organization_id of this SandboxesServiceExposeSandboxPortsBody. # noqa: E501 + :rtype: str """ - return self._desired_state + return self._organization_id - @desired_state.setter - def desired_state(self, desired_state: 'V1LightningworkState'): - """Sets the desired_state of this LightningworkServiceBatchUpdateLightningworksBody. + @organization_id.setter + def organization_id(self, organization_id: 'str'): + """Sets the organization_id of this SandboxesServiceExposeSandboxPortsBody. - :param desired_state: The desired_state of this LightningworkServiceBatchUpdateLightningworksBody. # noqa: E501 - :type: V1LightningworkState + :param organization_id: The organization_id of this SandboxesServiceExposeSandboxPortsBody. # noqa: E501 + :type: str """ - self._desired_state = desired_state + self._organization_id = organization_id @property - def work_ids(self) -> 'list[str]': - """Gets the work_ids of this LightningworkServiceBatchUpdateLightningworksBody. # noqa: E501 + def ports(self) -> 'list[str]': + """Gets the ports of this SandboxesServiceExposeSandboxPortsBody. # noqa: E501 + Ports inside the sandbox, 1-65535. The sandbox API port (5060) is rejected. # noqa: E501 - :return: The work_ids of this LightningworkServiceBatchUpdateLightningworksBody. # noqa: E501 + :return: The ports of this SandboxesServiceExposeSandboxPortsBody. # noqa: E501 :rtype: list[str] """ - return self._work_ids + return self._ports - @work_ids.setter - def work_ids(self, work_ids: 'list[str]'): - """Sets the work_ids of this LightningworkServiceBatchUpdateLightningworksBody. + @ports.setter + def ports(self, ports: 'list[str]'): + """Sets the ports of this SandboxesServiceExposeSandboxPortsBody. + Ports inside the sandbox, 1-65535. The sandbox API port (5060) is rejected. # noqa: E501 - :param work_ids: The work_ids of this LightningworkServiceBatchUpdateLightningworksBody. # noqa: E501 + :param ports: The ports of this SandboxesServiceExposeSandboxPortsBody. # noqa: E501 :type: list[str] """ - self._work_ids = work_ids + self._ports = ports def to_dict(self) -> dict: """Returns the model properties as a dict""" @@ -127,7 +129,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(LightningworkServiceBatchUpdateLightningworksBody, dict): + if issubclass(SandboxesServiceExposeSandboxPortsBody, dict): for key, value in self.items(): result[key] = value @@ -141,13 +143,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'LightningworkServiceBatchUpdateLightningworksBody') -> bool: + def __eq__(self, other: 'SandboxesServiceExposeSandboxPortsBody') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, LightningworkServiceBatchUpdateLightningworksBody): + if not isinstance(other, SandboxesServiceExposeSandboxPortsBody): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LightningworkServiceBatchUpdateLightningworksBody') -> bool: + def __ne__(self, other: 'SandboxesServiceExposeSandboxPortsBody') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_lightningapp_instance_open_ports_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_access_cluster_ids_update.py similarity index 70% rename from python/lightning_sdk/lightning_cloud/openapi/models/v1_get_lightningapp_instance_open_ports_response.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_access_cluster_ids_update.py index 8b4519403..661423207 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_lightningapp_instance_open_ports_response.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_access_cluster_ids_update.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class V1GetLightningappInstanceOpenPortsResponse(object): +class V1AccessClusterIdsUpdate(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -45,40 +45,40 @@ class V1GetLightningappInstanceOpenPortsResponse(object): and the value is json key in definition. """ swagger_types = { - 'ports': 'list[str]' + 'cluster_ids': 'list[str]' } attribute_map = { - 'ports': 'ports' + 'cluster_ids': 'clusterIds' } - def __init__(self, ports: 'list[str]' =None): # noqa: E501 - """V1GetLightningappInstanceOpenPortsResponse - a model defined in Swagger""" # noqa: E501 - self._ports = None + def __init__(self, cluster_ids: 'list[str]' =None): # noqa: E501 + """V1AccessClusterIdsUpdate - a model defined in Swagger""" # noqa: E501 + self._cluster_ids = None self.discriminator = None - if ports is not None: - self.ports = ports + if cluster_ids is not None: + self.cluster_ids = cluster_ids @property - def ports(self) -> 'list[str]': - """Gets the ports of this V1GetLightningappInstanceOpenPortsResponse. # noqa: E501 + def cluster_ids(self) -> 'list[str]': + """Gets the cluster_ids of this V1AccessClusterIdsUpdate. # noqa: E501 - :return: The ports of this V1GetLightningappInstanceOpenPortsResponse. # noqa: E501 + :return: The cluster_ids of this V1AccessClusterIdsUpdate. # noqa: E501 :rtype: list[str] """ - return self._ports + return self._cluster_ids - @ports.setter - def ports(self, ports: 'list[str]'): - """Sets the ports of this V1GetLightningappInstanceOpenPortsResponse. + @cluster_ids.setter + def cluster_ids(self, cluster_ids: 'list[str]'): + """Sets the cluster_ids of this V1AccessClusterIdsUpdate. - :param ports: The ports of this V1GetLightningappInstanceOpenPortsResponse. # noqa: E501 + :param cluster_ids: The cluster_ids of this V1AccessClusterIdsUpdate. # noqa: E501 :type: list[str] """ - self._ports = ports + self._cluster_ids = cluster_ids def to_dict(self) -> dict: """Returns the model properties as a dict""" @@ -101,7 +101,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(V1GetLightningappInstanceOpenPortsResponse, dict): + if issubclass(V1AccessClusterIdsUpdate, dict): for key, value in self.items(): result[key] = value @@ -115,13 +115,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'V1GetLightningappInstanceOpenPortsResponse') -> bool: + def __eq__(self, other: 'V1AccessClusterIdsUpdate') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, V1GetLightningappInstanceOpenPortsResponse): + if not isinstance(other, V1AccessClusterIdsUpdate): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'V1GetLightningappInstanceOpenPortsResponse') -> bool: + def __ne__(self, other: 'V1AccessClusterIdsUpdate') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_activity_subfilter_values.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_activity_subfilter_values.py new file mode 100644 index 000000000..1ed037ce4 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_activity_subfilter_values.py @@ -0,0 +1,205 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1ActivitySubfilterValues(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'assistant_message': 'V1AssistantMessageSubfilterValues', + 'deployment': 'V1WorkloadSubfilterValues', + 'job': 'V1WorkloadSubfilterValues', + 'multi_machine_job': 'V1WorkloadSubfilterValues' + } + + attribute_map = { + 'assistant_message': 'assistantMessage', + 'deployment': 'deployment', + 'job': 'job', + 'multi_machine_job': 'multiMachineJob' + } + + def __init__(self, assistant_message: 'V1AssistantMessageSubfilterValues' =None, deployment: 'V1WorkloadSubfilterValues' =None, job: 'V1WorkloadSubfilterValues' =None, multi_machine_job: 'V1WorkloadSubfilterValues' =None): # noqa: E501 + """V1ActivitySubfilterValues - a model defined in Swagger""" # noqa: E501 + self._assistant_message = None + self._deployment = None + self._job = None + self._multi_machine_job = None + self.discriminator = None + if assistant_message is not None: + self.assistant_message = assistant_message + if deployment is not None: + self.deployment = deployment + if job is not None: + self.job = job + if multi_machine_job is not None: + self.multi_machine_job = multi_machine_job + + @property + def assistant_message(self) -> 'V1AssistantMessageSubfilterValues': + """Gets the assistant_message of this V1ActivitySubfilterValues. # noqa: E501 + + + :return: The assistant_message of this V1ActivitySubfilterValues. # noqa: E501 + :rtype: V1AssistantMessageSubfilterValues + """ + return self._assistant_message + + @assistant_message.setter + def assistant_message(self, assistant_message: 'V1AssistantMessageSubfilterValues'): + """Sets the assistant_message of this V1ActivitySubfilterValues. + + + :param assistant_message: The assistant_message of this V1ActivitySubfilterValues. # noqa: E501 + :type: V1AssistantMessageSubfilterValues + """ + + self._assistant_message = assistant_message + + @property + def deployment(self) -> 'V1WorkloadSubfilterValues': + """Gets the deployment of this V1ActivitySubfilterValues. # noqa: E501 + + + :return: The deployment of this V1ActivitySubfilterValues. # noqa: E501 + :rtype: V1WorkloadSubfilterValues + """ + return self._deployment + + @deployment.setter + def deployment(self, deployment: 'V1WorkloadSubfilterValues'): + """Sets the deployment of this V1ActivitySubfilterValues. + + + :param deployment: The deployment of this V1ActivitySubfilterValues. # noqa: E501 + :type: V1WorkloadSubfilterValues + """ + + self._deployment = deployment + + @property + def job(self) -> 'V1WorkloadSubfilterValues': + """Gets the job of this V1ActivitySubfilterValues. # noqa: E501 + + + :return: The job of this V1ActivitySubfilterValues. # noqa: E501 + :rtype: V1WorkloadSubfilterValues + """ + return self._job + + @job.setter + def job(self, job: 'V1WorkloadSubfilterValues'): + """Sets the job of this V1ActivitySubfilterValues. + + + :param job: The job of this V1ActivitySubfilterValues. # noqa: E501 + :type: V1WorkloadSubfilterValues + """ + + self._job = job + + @property + def multi_machine_job(self) -> 'V1WorkloadSubfilterValues': + """Gets the multi_machine_job of this V1ActivitySubfilterValues. # noqa: E501 + + + :return: The multi_machine_job of this V1ActivitySubfilterValues. # noqa: E501 + :rtype: V1WorkloadSubfilterValues + """ + return self._multi_machine_job + + @multi_machine_job.setter + def multi_machine_job(self, multi_machine_job: 'V1WorkloadSubfilterValues'): + """Sets the multi_machine_job of this V1ActivitySubfilterValues. + + + :param multi_machine_job: The multi_machine_job of this V1ActivitySubfilterValues. # noqa: E501 + :type: V1WorkloadSubfilterValues + """ + + self._multi_machine_job = multi_machine_job + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1ActivitySubfilterValues, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1ActivitySubfilterValues') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1ActivitySubfilterValues): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1ActivitySubfilterValues') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_api_key.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_api_key.py index a631cc49e..4842ae452 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_api_key.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_api_key.py @@ -49,12 +49,14 @@ class V1APIKey(object): 'created_at': 'datetime', 'creator_id': 'str', 'description': 'str', + 'expires_at': 'datetime', 'id': 'str', 'last_used': 'datetime', 'name': 'str', 'project_id': 'str', 'raw_key': 'str', - 'role': 'str' + 'role': 'str', + 'status': 'V1APIKeyStatus' } attribute_map = { @@ -62,26 +64,30 @@ class V1APIKey(object): 'created_at': 'createdAt', 'creator_id': 'creatorId', 'description': 'description', + 'expires_at': 'expiresAt', 'id': 'id', 'last_used': 'lastUsed', 'name': 'name', 'project_id': 'projectId', 'raw_key': 'rawKey', - 'role': 'role' + 'role': 'role', + 'status': 'status' } - def __init__(self, budget_config: 'V1APIKeyBudget' =None, created_at: 'datetime' =None, creator_id: 'str' =None, description: 'str' =None, id: 'str' =None, last_used: 'datetime' =None, name: 'str' =None, project_id: 'str' =None, raw_key: 'str' =None, role: 'str' =None): # noqa: E501 + def __init__(self, budget_config: 'V1APIKeyBudget' =None, created_at: 'datetime' =None, creator_id: 'str' =None, description: 'str' =None, expires_at: 'datetime' =None, id: 'str' =None, last_used: 'datetime' =None, name: 'str' =None, project_id: 'str' =None, raw_key: 'str' =None, role: 'str' =None, status: 'V1APIKeyStatus' =None): # noqa: E501 """V1APIKey - a model defined in Swagger""" # noqa: E501 self._budget_config = None self._created_at = None self._creator_id = None self._description = None + self._expires_at = None self._id = None self._last_used = None self._name = None self._project_id = None self._raw_key = None self._role = None + self._status = None self.discriminator = None if budget_config is not None: self.budget_config = budget_config @@ -91,6 +97,8 @@ def __init__(self, budget_config: 'V1APIKeyBudget' =None, created_at: 'datetime' self.creator_id = creator_id if description is not None: self.description = description + if expires_at is not None: + self.expires_at = expires_at if id is not None: self.id = id if last_used is not None: @@ -103,6 +111,8 @@ def __init__(self, budget_config: 'V1APIKeyBudget' =None, created_at: 'datetime' self.raw_key = raw_key if role is not None: self.role = role + if status is not None: + self.status = status @property def budget_config(self) -> 'V1APIKeyBudget': @@ -188,6 +198,27 @@ def description(self, description: 'str'): self._description = description + @property + def expires_at(self) -> 'datetime': + """Gets the expires_at of this V1APIKey. # noqa: E501 + + + :return: The expires_at of this V1APIKey. # noqa: E501 + :rtype: datetime + """ + return self._expires_at + + @expires_at.setter + def expires_at(self, expires_at: 'datetime'): + """Sets the expires_at of this V1APIKey. + + + :param expires_at: The expires_at of this V1APIKey. # noqa: E501 + :type: datetime + """ + + self._expires_at = expires_at + @property def id(self) -> 'str': """Gets the id of this V1APIKey. # noqa: E501 @@ -316,6 +347,27 @@ def role(self, role: 'str'): self._role = role + @property + def status(self) -> 'V1APIKeyStatus': + """Gets the status of this V1APIKey. # noqa: E501 + + + :return: The status of this V1APIKey. # noqa: E501 + :rtype: V1APIKeyStatus + """ + return self._status + + @status.setter + def status(self, status: 'V1APIKeyStatus'): + """Sets the status of this V1APIKey. + + + :param status: The status of this V1APIKey. # noqa: E501 + :type: V1APIKeyStatus + """ + + self._status = status + def to_dict(self) -> dict: """Returns the model properties as a dict""" result = {} diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_batch_update_lightningwork_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_api_key_status.py similarity index 83% rename from python/lightning_sdk/lightning_cloud/openapi/models/v1_batch_update_lightningwork_response.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_api_key_status.py index bdec2ad4a..d0ec63f36 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_batch_update_lightningwork_response.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_api_key_status.py @@ -32,11 +32,20 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class V1BatchUpdateLightningworkResponse(object): +class V1APIKeyStatus(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + + """ + allowed enum values + """ + UNSPECIFIED = "API_KEY_STATUS_UNSPECIFIED" + ACTIVE = "API_KEY_STATUS_ACTIVE" + INACTIVE = "API_KEY_STATUS_INACTIVE" + REVOKED = "API_KEY_STATUS_REVOKED" + EXPIRED = "API_KEY_STATUS_EXPIRED" """ Attributes: swagger_types (dict): The key is attribute name @@ -51,7 +60,7 @@ class V1BatchUpdateLightningworkResponse(object): } def __init__(self): # noqa: E501 - """V1BatchUpdateLightningworkResponse - a model defined in Swagger""" # noqa: E501 + """V1APIKeyStatus - a model defined in Swagger""" # noqa: E501 self.discriminator = None def to_dict(self) -> dict: @@ -75,7 +84,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(V1BatchUpdateLightningworkResponse, dict): + if issubclass(V1APIKeyStatus, dict): for key, value in self.items(): result[key] = value @@ -89,13 +98,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'V1BatchUpdateLightningworkResponse') -> bool: + def __eq__(self, other: 'V1APIKeyStatus') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, V1BatchUpdateLightningworkResponse): + if not isinstance(other, V1APIKeyStatus): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'V1BatchUpdateLightningworkResponse') -> bool: + def __ne__(self, other: 'V1APIKeyStatus') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_assistant_message_subfilter.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_assistant_message_subfilter.py new file mode 100644 index 000000000..19fd02a10 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_assistant_message_subfilter.py @@ -0,0 +1,127 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1AssistantMessageSubfilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'api_key_ids': 'list[str]' + } + + attribute_map = { + 'api_key_ids': 'apiKeyIds' + } + + def __init__(self, api_key_ids: 'list[str]' =None): # noqa: E501 + """V1AssistantMessageSubfilter - a model defined in Swagger""" # noqa: E501 + self._api_key_ids = None + self.discriminator = None + if api_key_ids is not None: + self.api_key_ids = api_key_ids + + @property + def api_key_ids(self) -> 'list[str]': + """Gets the api_key_ids of this V1AssistantMessageSubfilter. # noqa: E501 + + + :return: The api_key_ids of this V1AssistantMessageSubfilter. # noqa: E501 + :rtype: list[str] + """ + return self._api_key_ids + + @api_key_ids.setter + def api_key_ids(self, api_key_ids: 'list[str]'): + """Sets the api_key_ids of this V1AssistantMessageSubfilter. + + + :param api_key_ids: The api_key_ids of this V1AssistantMessageSubfilter. # noqa: E501 + :type: list[str] + """ + + self._api_key_ids = api_key_ids + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1AssistantMessageSubfilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1AssistantMessageSubfilter') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1AssistantMessageSubfilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1AssistantMessageSubfilter') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_gallery_components_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_assistant_message_subfilter_values.py similarity index 67% rename from python/lightning_sdk/lightning_cloud/openapi/models/v1_list_gallery_components_response.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_assistant_message_subfilter_values.py index e745db365..e1938d5f9 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_gallery_components_response.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_assistant_message_subfilter_values.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class V1ListGalleryComponentsResponse(object): +class V1AssistantMessageSubfilterValues(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -45,40 +45,40 @@ class V1ListGalleryComponentsResponse(object): and the value is json key in definition. """ swagger_types = { - 'components': 'list[V1GalleryComponent]' + 'api_key_ids': 'list[V1NamedFilterValue]' } attribute_map = { - 'components': 'components' + 'api_key_ids': 'apiKeyIds' } - def __init__(self, components: 'list[V1GalleryComponent]' =None): # noqa: E501 - """V1ListGalleryComponentsResponse - a model defined in Swagger""" # noqa: E501 - self._components = None + def __init__(self, api_key_ids: 'list[V1NamedFilterValue]' =None): # noqa: E501 + """V1AssistantMessageSubfilterValues - a model defined in Swagger""" # noqa: E501 + self._api_key_ids = None self.discriminator = None - if components is not None: - self.components = components + if api_key_ids is not None: + self.api_key_ids = api_key_ids @property - def components(self) -> 'list[V1GalleryComponent]': - """Gets the components of this V1ListGalleryComponentsResponse. # noqa: E501 + def api_key_ids(self) -> 'list[V1NamedFilterValue]': + """Gets the api_key_ids of this V1AssistantMessageSubfilterValues. # noqa: E501 - :return: The components of this V1ListGalleryComponentsResponse. # noqa: E501 - :rtype: list[V1GalleryComponent] + :return: The api_key_ids of this V1AssistantMessageSubfilterValues. # noqa: E501 + :rtype: list[V1NamedFilterValue] """ - return self._components + return self._api_key_ids - @components.setter - def components(self, components: 'list[V1GalleryComponent]'): - """Sets the components of this V1ListGalleryComponentsResponse. + @api_key_ids.setter + def api_key_ids(self, api_key_ids: 'list[V1NamedFilterValue]'): + """Sets the api_key_ids of this V1AssistantMessageSubfilterValues. - :param components: The components of this V1ListGalleryComponentsResponse. # noqa: E501 - :type: list[V1GalleryComponent] + :param api_key_ids: The api_key_ids of this V1AssistantMessageSubfilterValues. # noqa: E501 + :type: list[V1NamedFilterValue] """ - self._components = components + self._api_key_ids = api_key_ids def to_dict(self) -> dict: """Returns the model properties as a dict""" @@ -101,7 +101,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(V1ListGalleryComponentsResponse, dict): + if issubclass(V1AssistantMessageSubfilterValues, dict): for key, value in self.items(): result[key] = value @@ -115,13 +115,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'V1ListGalleryComponentsResponse') -> bool: + def __eq__(self, other: 'V1AssistantMessageSubfilterValues') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, V1ListGalleryComponentsResponse): + if not isinstance(other, V1AssistantMessageSubfilterValues): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'V1ListGalleryComponentsResponse') -> bool: + def __ne__(self, other: 'V1AssistantMessageSubfilterValues') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_assistant_session_daily_aggregated.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_assistant_session_daily_aggregated.py index 1b1a69b9f..c9a3f2adb 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_assistant_session_daily_aggregated.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_assistant_session_daily_aggregated.py @@ -52,6 +52,9 @@ class V1AssistantSessionDailyAggregated(object): 'org_id': 'str', 'parent_id': 'str', 'project_id': 'str', + 'total_cache_creation_tokens': 'str', + 'total_cache_creation_tokens1h': 'str', + 'total_cache_read_tokens': 'str', 'total_completion_tokens': 'int', 'total_cost': 'float', 'total_prompt_tokens': 'int', @@ -66,13 +69,16 @@ class V1AssistantSessionDailyAggregated(object): 'org_id': 'orgId', 'parent_id': 'parentId', 'project_id': 'projectId', + 'total_cache_creation_tokens': 'totalCacheCreationTokens', + 'total_cache_creation_tokens1h': 'totalCacheCreationTokens1h', + 'total_cache_read_tokens': 'totalCacheReadTokens', 'total_completion_tokens': 'totalCompletionTokens', 'total_cost': 'totalCost', 'total_prompt_tokens': 'totalPromptTokens', 'user_id': 'userId' } - def __init__(self, day: 'datetime' =None, model_id: 'str' =None, name: 'str' =None, num_messages: 'int' =None, org_id: 'str' =None, parent_id: 'str' =None, project_id: 'str' =None, total_completion_tokens: 'int' =None, total_cost: 'float' =None, total_prompt_tokens: 'int' =None, user_id: 'str' =None): # noqa: E501 + def __init__(self, day: 'datetime' =None, model_id: 'str' =None, name: 'str' =None, num_messages: 'int' =None, org_id: 'str' =None, parent_id: 'str' =None, project_id: 'str' =None, total_cache_creation_tokens: 'str' =None, total_cache_creation_tokens1h: 'str' =None, total_cache_read_tokens: 'str' =None, total_completion_tokens: 'int' =None, total_cost: 'float' =None, total_prompt_tokens: 'int' =None, user_id: 'str' =None): # noqa: E501 """V1AssistantSessionDailyAggregated - a model defined in Swagger""" # noqa: E501 self._day = None self._model_id = None @@ -81,6 +87,9 @@ def __init__(self, day: 'datetime' =None, model_id: 'str' =None, name: 'str' =No self._org_id = None self._parent_id = None self._project_id = None + self._total_cache_creation_tokens = None + self._total_cache_creation_tokens1h = None + self._total_cache_read_tokens = None self._total_completion_tokens = None self._total_cost = None self._total_prompt_tokens = None @@ -100,6 +109,12 @@ def __init__(self, day: 'datetime' =None, model_id: 'str' =None, name: 'str' =No self.parent_id = parent_id if project_id is not None: self.project_id = project_id + if total_cache_creation_tokens is not None: + self.total_cache_creation_tokens = total_cache_creation_tokens + if total_cache_creation_tokens1h is not None: + self.total_cache_creation_tokens1h = total_cache_creation_tokens1h + if total_cache_read_tokens is not None: + self.total_cache_read_tokens = total_cache_read_tokens if total_completion_tokens is not None: self.total_completion_tokens = total_completion_tokens if total_cost is not None: @@ -256,6 +271,75 @@ def project_id(self, project_id: 'str'): self._project_id = project_id + @property + def total_cache_creation_tokens(self) -> 'str': + """Gets the total_cache_creation_tokens of this V1AssistantSessionDailyAggregated. # noqa: E501 + + Input tokens written to the prompt cache with the 5-minute TTL. Not included in total_prompt_tokens. # noqa: E501 + + :return: The total_cache_creation_tokens of this V1AssistantSessionDailyAggregated. # noqa: E501 + :rtype: str + """ + return self._total_cache_creation_tokens + + @total_cache_creation_tokens.setter + def total_cache_creation_tokens(self, total_cache_creation_tokens: 'str'): + """Sets the total_cache_creation_tokens of this V1AssistantSessionDailyAggregated. + + Input tokens written to the prompt cache with the 5-minute TTL. Not included in total_prompt_tokens. # noqa: E501 + + :param total_cache_creation_tokens: The total_cache_creation_tokens of this V1AssistantSessionDailyAggregated. # noqa: E501 + :type: str + """ + + self._total_cache_creation_tokens = total_cache_creation_tokens + + @property + def total_cache_creation_tokens1h(self) -> 'str': + """Gets the total_cache_creation_tokens1h of this V1AssistantSessionDailyAggregated. # noqa: E501 + + Input tokens written to the prompt cache with the 1-hour TTL. Not included in total_prompt_tokens. # noqa: E501 + + :return: The total_cache_creation_tokens1h of this V1AssistantSessionDailyAggregated. # noqa: E501 + :rtype: str + """ + return self._total_cache_creation_tokens1h + + @total_cache_creation_tokens1h.setter + def total_cache_creation_tokens1h(self, total_cache_creation_tokens1h: 'str'): + """Sets the total_cache_creation_tokens1h of this V1AssistantSessionDailyAggregated. + + Input tokens written to the prompt cache with the 1-hour TTL. Not included in total_prompt_tokens. # noqa: E501 + + :param total_cache_creation_tokens1h: The total_cache_creation_tokens1h of this V1AssistantSessionDailyAggregated. # noqa: E501 + :type: str + """ + + self._total_cache_creation_tokens1h = total_cache_creation_tokens1h + + @property + def total_cache_read_tokens(self) -> 'str': + """Gets the total_cache_read_tokens of this V1AssistantSessionDailyAggregated. # noqa: E501 + + Input tokens served from the provider's prompt cache. Not included in total_prompt_tokens. # noqa: E501 + + :return: The total_cache_read_tokens of this V1AssistantSessionDailyAggregated. # noqa: E501 + :rtype: str + """ + return self._total_cache_read_tokens + + @total_cache_read_tokens.setter + def total_cache_read_tokens(self, total_cache_read_tokens: 'str'): + """Sets the total_cache_read_tokens of this V1AssistantSessionDailyAggregated. + + Input tokens served from the provider's prompt cache. Not included in total_prompt_tokens. # noqa: E501 + + :param total_cache_read_tokens: The total_cache_read_tokens of this V1AssistantSessionDailyAggregated. # noqa: E501 + :type: str + """ + + self._total_cache_read_tokens = total_cache_read_tokens + @property def total_completion_tokens(self) -> 'int': """Gets the total_completion_tokens of this V1AssistantSessionDailyAggregated. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_aws_data_connection.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_aws_data_connection.py index 53d49b443..94aef14bc 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_aws_data_connection.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_aws_data_connection.py @@ -45,7 +45,6 @@ class V1AwsDataConnection(object): and the value is json key in definition. """ swagger_types = { - 'available_in_non_aws_providers': 'bool', 'destination': 'str', 'kms_arn': 'str', 'region': 'str', @@ -59,7 +58,6 @@ class V1AwsDataConnection(object): } attribute_map = { - 'available_in_non_aws_providers': 'availableInNonAwsProviders', 'destination': 'destination', 'kms_arn': 'kmsArn', 'region': 'region', @@ -72,9 +70,8 @@ class V1AwsDataConnection(object): 'source': 'source' } - def __init__(self, available_in_non_aws_providers: 'bool' =None, destination: 'str' =None, kms_arn: 'str' =None, region: 'str' =None, secret_arn_name: 'str' =None, secret_arn_value: 'str' =None, secret_id_access_key_id: 'str' =None, secret_id_secret_access_key: 'str' =None, secret_value_access_key_id: 'str' =None, secret_value_secret_access_key: 'str' =None, source: 'str' =None): # noqa: E501 + def __init__(self, destination: 'str' =None, kms_arn: 'str' =None, region: 'str' =None, secret_arn_name: 'str' =None, secret_arn_value: 'str' =None, secret_id_access_key_id: 'str' =None, secret_id_secret_access_key: 'str' =None, secret_value_access_key_id: 'str' =None, secret_value_secret_access_key: 'str' =None, source: 'str' =None): # noqa: E501 """V1AwsDataConnection - a model defined in Swagger""" # noqa: E501 - self._available_in_non_aws_providers = None self._destination = None self._kms_arn = None self._region = None @@ -86,8 +83,6 @@ def __init__(self, available_in_non_aws_providers: 'bool' =None, destination: 's self._secret_value_secret_access_key = None self._source = None self.discriminator = None - if available_in_non_aws_providers is not None: - self.available_in_non_aws_providers = available_in_non_aws_providers if destination is not None: self.destination = destination if kms_arn is not None: @@ -109,29 +104,6 @@ def __init__(self, available_in_non_aws_providers: 'bool' =None, destination: 's if source is not None: self.source = source - @property - def available_in_non_aws_providers(self) -> 'bool': - """Gets the available_in_non_aws_providers of this V1AwsDataConnection. # noqa: E501 - - When true, mount on non-AWS Studios via project-role STS. Default false (AWS-only). # noqa: E501 - - :return: The available_in_non_aws_providers of this V1AwsDataConnection. # noqa: E501 - :rtype: bool - """ - return self._available_in_non_aws_providers - - @available_in_non_aws_providers.setter - def available_in_non_aws_providers(self, available_in_non_aws_providers: 'bool'): - """Sets the available_in_non_aws_providers of this V1AwsDataConnection. - - When true, mount on non-AWS Studios via project-role STS. Default false (AWS-only). # noqa: E501 - - :param available_in_non_aws_providers: The available_in_non_aws_providers of this V1AwsDataConnection. # noqa: E501 - :type: bool - """ - - self._available_in_non_aws_providers = available_in_non_aws_providers - @property def destination(self) -> 'str': """Gets the destination of this V1AwsDataConnection. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py index a438171ef..2a64c06df 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py @@ -44,11 +44,9 @@ class V1CloudProvider(object): CLOUD_PROVIDER_UNSPECIFIED = "CLOUD_PROVIDER_UNSPECIFIED" AWS = "AWS" GCP = "GCP" - VULTR = "VULTR" LAMBDA_LABS = "LAMBDA_LABS" SLURM = "SLURM" DGX = "DGX" - VOLTAGE_PARK = "VOLTAGE_PARK" NEBIUS = "NEBIUS" CLOUDFLARE = "CLOUDFLARE" LIGHTNING = "LIGHTNING" diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_app.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_app.py deleted file mode 100644 index d8eea67aa..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_app.py +++ /dev/null @@ -1,647 +0,0 @@ -# coding: utf-8 -# This file is vendored. -# Do not edit it directly; changes will be overwritten. -# Make changes in the internal upstream repository instead. - - -""" - external/v1/auth_service.proto - - No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - - OpenAPI spec version: version not set - - Generated by: https://github.com/swagger-api/swagger-codegen.git - - NOTE - ---- - standard swagger-codegen-cli for this python client has been modified - by custom templates. The purpose of these templates is to include - typing information in the API and Model code. Please refer to the - main grid repository for more info -""" - -import pprint -import re # noqa: F401 - -from typing import TYPE_CHECKING - -import six - -if TYPE_CHECKING: - from datetime import datetime - from lightning_sdk.lightning_cloud.openapi.models import * - -class V1CloudSpaceApp(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'author_logo': 'str', - 'authors': 'list[str]', - 'categories': 'list[str]', - 'created_at': 'datetime', - 'description': 'str', - 'entrypoint_file': 'str', - 'git_url': 'str', - 'id': 'str', - 'license': 'str', - 'name': 'str', - 'owner_id': 'str', - 'owner_type': 'V1CloudSpaceAppOwnerType', - 'short_description': 'str', - 'source_url': 'str', - 'tags': 'list[str]', - 'thumbnail': 'str', - 'updated_at': 'datetime', - 'version': 'str', - 'visible_to_org_ids': 'list[str]', - 'visible_to_project_ids': 'list[str]', - 'visible_to_user_ids': 'list[str]' - } - - attribute_map = { - 'author_logo': 'authorLogo', - 'authors': 'authors', - 'categories': 'categories', - 'created_at': 'createdAt', - 'description': 'description', - 'entrypoint_file': 'entrypointFile', - 'git_url': 'gitUrl', - 'id': 'id', - 'license': 'license', - 'name': 'name', - 'owner_id': 'ownerId', - 'owner_type': 'ownerType', - 'short_description': 'shortDescription', - 'source_url': 'sourceUrl', - 'tags': 'tags', - 'thumbnail': 'thumbnail', - 'updated_at': 'updatedAt', - 'version': 'version', - 'visible_to_org_ids': 'visibleToOrgIds', - 'visible_to_project_ids': 'visibleToProjectIds', - 'visible_to_user_ids': 'visibleToUserIds' - } - - def __init__(self, author_logo: 'str' =None, authors: 'list[str]' =None, categories: 'list[str]' =None, created_at: 'datetime' =None, description: 'str' =None, entrypoint_file: 'str' =None, git_url: 'str' =None, id: 'str' =None, license: 'str' =None, name: 'str' =None, owner_id: 'str' =None, owner_type: 'V1CloudSpaceAppOwnerType' =None, short_description: 'str' =None, source_url: 'str' =None, tags: 'list[str]' =None, thumbnail: 'str' =None, updated_at: 'datetime' =None, version: 'str' =None, visible_to_org_ids: 'list[str]' =None, visible_to_project_ids: 'list[str]' =None, visible_to_user_ids: 'list[str]' =None): # noqa: E501 - """V1CloudSpaceApp - a model defined in Swagger""" # noqa: E501 - self._author_logo = None - self._authors = None - self._categories = None - self._created_at = None - self._description = None - self._entrypoint_file = None - self._git_url = None - self._id = None - self._license = None - self._name = None - self._owner_id = None - self._owner_type = None - self._short_description = None - self._source_url = None - self._tags = None - self._thumbnail = None - self._updated_at = None - self._version = None - self._visible_to_org_ids = None - self._visible_to_project_ids = None - self._visible_to_user_ids = None - self.discriminator = None - if author_logo is not None: - self.author_logo = author_logo - if authors is not None: - self.authors = authors - if categories is not None: - self.categories = categories - if created_at is not None: - self.created_at = created_at - if description is not None: - self.description = description - if entrypoint_file is not None: - self.entrypoint_file = entrypoint_file - if git_url is not None: - self.git_url = git_url - if id is not None: - self.id = id - if license is not None: - self.license = license - if name is not None: - self.name = name - if owner_id is not None: - self.owner_id = owner_id - if owner_type is not None: - self.owner_type = owner_type - if short_description is not None: - self.short_description = short_description - if source_url is not None: - self.source_url = source_url - if tags is not None: - self.tags = tags - if thumbnail is not None: - self.thumbnail = thumbnail - if updated_at is not None: - self.updated_at = updated_at - if version is not None: - self.version = version - if visible_to_org_ids is not None: - self.visible_to_org_ids = visible_to_org_ids - if visible_to_project_ids is not None: - self.visible_to_project_ids = visible_to_project_ids - if visible_to_user_ids is not None: - self.visible_to_user_ids = visible_to_user_ids - - @property - def author_logo(self) -> 'str': - """Gets the author_logo of this V1CloudSpaceApp. # noqa: E501 - - - :return: The author_logo of this V1CloudSpaceApp. # noqa: E501 - :rtype: str - """ - return self._author_logo - - @author_logo.setter - def author_logo(self, author_logo: 'str'): - """Sets the author_logo of this V1CloudSpaceApp. - - - :param author_logo: The author_logo of this V1CloudSpaceApp. # noqa: E501 - :type: str - """ - - self._author_logo = author_logo - - @property - def authors(self) -> 'list[str]': - """Gets the authors of this V1CloudSpaceApp. # noqa: E501 - - - :return: The authors of this V1CloudSpaceApp. # noqa: E501 - :rtype: list[str] - """ - return self._authors - - @authors.setter - def authors(self, authors: 'list[str]'): - """Sets the authors of this V1CloudSpaceApp. - - - :param authors: The authors of this V1CloudSpaceApp. # noqa: E501 - :type: list[str] - """ - - self._authors = authors - - @property - def categories(self) -> 'list[str]': - """Gets the categories of this V1CloudSpaceApp. # noqa: E501 - - - :return: The categories of this V1CloudSpaceApp. # noqa: E501 - :rtype: list[str] - """ - return self._categories - - @categories.setter - def categories(self, categories: 'list[str]'): - """Sets the categories of this V1CloudSpaceApp. - - - :param categories: The categories of this V1CloudSpaceApp. # noqa: E501 - :type: list[str] - """ - - self._categories = categories - - @property - def created_at(self) -> 'datetime': - """Gets the created_at of this V1CloudSpaceApp. # noqa: E501 - - - :return: The created_at of this V1CloudSpaceApp. # noqa: E501 - :rtype: datetime - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at: 'datetime'): - """Sets the created_at of this V1CloudSpaceApp. - - - :param created_at: The created_at of this V1CloudSpaceApp. # noqa: E501 - :type: datetime - """ - - self._created_at = created_at - - @property - def description(self) -> 'str': - """Gets the description of this V1CloudSpaceApp. # noqa: E501 - - - :return: The description of this V1CloudSpaceApp. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description: 'str'): - """Sets the description of this V1CloudSpaceApp. - - - :param description: The description of this V1CloudSpaceApp. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def entrypoint_file(self) -> 'str': - """Gets the entrypoint_file of this V1CloudSpaceApp. # noqa: E501 - - - :return: The entrypoint_file of this V1CloudSpaceApp. # noqa: E501 - :rtype: str - """ - return self._entrypoint_file - - @entrypoint_file.setter - def entrypoint_file(self, entrypoint_file: 'str'): - """Sets the entrypoint_file of this V1CloudSpaceApp. - - - :param entrypoint_file: The entrypoint_file of this V1CloudSpaceApp. # noqa: E501 - :type: str - """ - - self._entrypoint_file = entrypoint_file - - @property - def git_url(self) -> 'str': - """Gets the git_url of this V1CloudSpaceApp. # noqa: E501 - - - :return: The git_url of this V1CloudSpaceApp. # noqa: E501 - :rtype: str - """ - return self._git_url - - @git_url.setter - def git_url(self, git_url: 'str'): - """Sets the git_url of this V1CloudSpaceApp. - - - :param git_url: The git_url of this V1CloudSpaceApp. # noqa: E501 - :type: str - """ - - self._git_url = git_url - - @property - def id(self) -> 'str': - """Gets the id of this V1CloudSpaceApp. # noqa: E501 - - - :return: The id of this V1CloudSpaceApp. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id: 'str'): - """Sets the id of this V1CloudSpaceApp. - - - :param id: The id of this V1CloudSpaceApp. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def license(self) -> 'str': - """Gets the license of this V1CloudSpaceApp. # noqa: E501 - - - :return: The license of this V1CloudSpaceApp. # noqa: E501 - :rtype: str - """ - return self._license - - @license.setter - def license(self, license: 'str'): - """Sets the license of this V1CloudSpaceApp. - - - :param license: The license of this V1CloudSpaceApp. # noqa: E501 - :type: str - """ - - self._license = license - - @property - def name(self) -> 'str': - """Gets the name of this V1CloudSpaceApp. # noqa: E501 - - - :return: The name of this V1CloudSpaceApp. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name: 'str'): - """Sets the name of this V1CloudSpaceApp. - - - :param name: The name of this V1CloudSpaceApp. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def owner_id(self) -> 'str': - """Gets the owner_id of this V1CloudSpaceApp. # noqa: E501 - - - :return: The owner_id of this V1CloudSpaceApp. # noqa: E501 - :rtype: str - """ - return self._owner_id - - @owner_id.setter - def owner_id(self, owner_id: 'str'): - """Sets the owner_id of this V1CloudSpaceApp. - - - :param owner_id: The owner_id of this V1CloudSpaceApp. # noqa: E501 - :type: str - """ - - self._owner_id = owner_id - - @property - def owner_type(self) -> 'V1CloudSpaceAppOwnerType': - """Gets the owner_type of this V1CloudSpaceApp. # noqa: E501 - - - :return: The owner_type of this V1CloudSpaceApp. # noqa: E501 - :rtype: V1CloudSpaceAppOwnerType - """ - return self._owner_type - - @owner_type.setter - def owner_type(self, owner_type: 'V1CloudSpaceAppOwnerType'): - """Sets the owner_type of this V1CloudSpaceApp. - - - :param owner_type: The owner_type of this V1CloudSpaceApp. # noqa: E501 - :type: V1CloudSpaceAppOwnerType - """ - - self._owner_type = owner_type - - @property - def short_description(self) -> 'str': - """Gets the short_description of this V1CloudSpaceApp. # noqa: E501 - - - :return: The short_description of this V1CloudSpaceApp. # noqa: E501 - :rtype: str - """ - return self._short_description - - @short_description.setter - def short_description(self, short_description: 'str'): - """Sets the short_description of this V1CloudSpaceApp. - - - :param short_description: The short_description of this V1CloudSpaceApp. # noqa: E501 - :type: str - """ - - self._short_description = short_description - - @property - def source_url(self) -> 'str': - """Gets the source_url of this V1CloudSpaceApp. # noqa: E501 - - - :return: The source_url of this V1CloudSpaceApp. # noqa: E501 - :rtype: str - """ - return self._source_url - - @source_url.setter - def source_url(self, source_url: 'str'): - """Sets the source_url of this V1CloudSpaceApp. - - - :param source_url: The source_url of this V1CloudSpaceApp. # noqa: E501 - :type: str - """ - - self._source_url = source_url - - @property - def tags(self) -> 'list[str]': - """Gets the tags of this V1CloudSpaceApp. # noqa: E501 - - - :return: The tags of this V1CloudSpaceApp. # noqa: E501 - :rtype: list[str] - """ - return self._tags - - @tags.setter - def tags(self, tags: 'list[str]'): - """Sets the tags of this V1CloudSpaceApp. - - - :param tags: The tags of this V1CloudSpaceApp. # noqa: E501 - :type: list[str] - """ - - self._tags = tags - - @property - def thumbnail(self) -> 'str': - """Gets the thumbnail of this V1CloudSpaceApp. # noqa: E501 - - - :return: The thumbnail of this V1CloudSpaceApp. # noqa: E501 - :rtype: str - """ - return self._thumbnail - - @thumbnail.setter - def thumbnail(self, thumbnail: 'str'): - """Sets the thumbnail of this V1CloudSpaceApp. - - - :param thumbnail: The thumbnail of this V1CloudSpaceApp. # noqa: E501 - :type: str - """ - - self._thumbnail = thumbnail - - @property - def updated_at(self) -> 'datetime': - """Gets the updated_at of this V1CloudSpaceApp. # noqa: E501 - - - :return: The updated_at of this V1CloudSpaceApp. # noqa: E501 - :rtype: datetime - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at: 'datetime'): - """Sets the updated_at of this V1CloudSpaceApp. - - - :param updated_at: The updated_at of this V1CloudSpaceApp. # noqa: E501 - :type: datetime - """ - - self._updated_at = updated_at - - @property - def version(self) -> 'str': - """Gets the version of this V1CloudSpaceApp. # noqa: E501 - - - :return: The version of this V1CloudSpaceApp. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version: 'str'): - """Sets the version of this V1CloudSpaceApp. - - - :param version: The version of this V1CloudSpaceApp. # noqa: E501 - :type: str - """ - - self._version = version - - @property - def visible_to_org_ids(self) -> 'list[str]': - """Gets the visible_to_org_ids of this V1CloudSpaceApp. # noqa: E501 - - - :return: The visible_to_org_ids of this V1CloudSpaceApp. # noqa: E501 - :rtype: list[str] - """ - return self._visible_to_org_ids - - @visible_to_org_ids.setter - def visible_to_org_ids(self, visible_to_org_ids: 'list[str]'): - """Sets the visible_to_org_ids of this V1CloudSpaceApp. - - - :param visible_to_org_ids: The visible_to_org_ids of this V1CloudSpaceApp. # noqa: E501 - :type: list[str] - """ - - self._visible_to_org_ids = visible_to_org_ids - - @property - def visible_to_project_ids(self) -> 'list[str]': - """Gets the visible_to_project_ids of this V1CloudSpaceApp. # noqa: E501 - - - :return: The visible_to_project_ids of this V1CloudSpaceApp. # noqa: E501 - :rtype: list[str] - """ - return self._visible_to_project_ids - - @visible_to_project_ids.setter - def visible_to_project_ids(self, visible_to_project_ids: 'list[str]'): - """Sets the visible_to_project_ids of this V1CloudSpaceApp. - - - :param visible_to_project_ids: The visible_to_project_ids of this V1CloudSpaceApp. # noqa: E501 - :type: list[str] - """ - - self._visible_to_project_ids = visible_to_project_ids - - @property - def visible_to_user_ids(self) -> 'list[str]': - """Gets the visible_to_user_ids of this V1CloudSpaceApp. # noqa: E501 - - - :return: The visible_to_user_ids of this V1CloudSpaceApp. # noqa: E501 - :rtype: list[str] - """ - return self._visible_to_user_ids - - @visible_to_user_ids.setter - def visible_to_user_ids(self, visible_to_user_ids: 'list[str]'): - """Sets the visible_to_user_ids of this V1CloudSpaceApp. - - - :param visible_to_user_ids: The visible_to_user_ids of this V1CloudSpaceApp. # noqa: E501 - :type: list[str] - """ - - self._visible_to_user_ids = visible_to_user_ids - - def to_dict(self) -> dict: - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(V1CloudSpaceApp, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self) -> str: - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other: 'V1CloudSpaceApp') -> bool: - """Returns true if both objects are equal""" - if not isinstance(other, V1CloudSpaceApp): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'V1CloudSpaceApp') -> bool: - """Returns true if both objects are not equal""" - return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py index 257151240..da362ee19 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py @@ -76,6 +76,7 @@ class V1ClusterAccelerator(object): 'local_disk_supported': 'bool', 'local_disks_count': 'str', 'max_available_quota': 'str', + 'multi_node_ib_cost_per_gpu_hour': 'float', 'non_ondemand': 'bool', 'non_spot': 'bool', 'original_cost': 'float', @@ -140,6 +141,7 @@ class V1ClusterAccelerator(object): 'local_disk_supported': 'localDiskSupported', 'local_disks_count': 'localDisksCount', 'max_available_quota': 'maxAvailableQuota', + 'multi_node_ib_cost_per_gpu_hour': 'multiNodeIbCostPerGpuHour', 'non_ondemand': 'nonOndemand', 'non_spot': 'nonSpot', 'original_cost': 'originalCost', @@ -172,7 +174,7 @@ class V1ClusterAccelerator(object): 'spot_quota_page_url': 'spotQuotaPageUrl' } - def __init__(self, accelerator_type: 'str' =None, allowed_resources: 'list[str]' =None, availability_strategy: 'str' =None, available_in_seconds: 'str' =None, available_in_seconds_spot: 'str' =None, available_zones: 'list[str]' =None, byoc_only: 'bool' =None, capacity_block_only: 'bool' =None, capacity_block_price: 'float' =None, capacity_blocks_available: 'list[V1ClusterCapacityReservation]' =None, cluster_id: 'str' =None, cost: 'float' =None, detailed_quotas_info: 'list[V1AcceleratorQuotaInfo]' =None, device_card: 'str' =None, device_info: 'str' =None, display_name: 'str' =None, dws_cost: 'float' =None, dws_only: 'bool' =None, dws_supported: 'bool' =None, enabled: 'bool' =None, family: 'str' =None, full: 'bool' =None, instance_id: 'str' =None, is_custom: 'bool' =None, is_tier_restricted: 'bool' =None, lightning_interruptible: 'bool' =None, local_disk_included: 'bool' =None, local_disk_size: 'str' =None, local_disk_supported: 'bool' =None, local_disks_count: 'str' =None, max_available_quota: 'str' =None, non_ondemand: 'bool' =None, non_spot: 'bool' =None, original_cost: 'float' =None, original_spot_price: 'float' =None, out_of_capacity: 'bool' =None, partition_only: 'bool' =None, partitionable_parents: 'list[str]' =None, persistent_disk_supported: 'bool' =None, promo: 'V1PromoOverlay' =None, provider: 'V1CloudProvider' =None, quota_checked_at: 'datetime' =None, quota_code: 'str' =None, quota_name: 'str' =None, quota_page_url: 'str' =None, quota_service_code: 'str' =None, quota_utilization: 'str' =None, quota_value: 'str' =None, reservable: 'bool' =None, reservation_available_zones: 'list[str]' =None, reservation_quota_code: 'str' =None, reservation_quota_name: 'str' =None, reservation_quota_page_url: 'str' =None, resources: 'V1Resources' =None, secondary_instance_id: 'str' =None, slug: 'str' =None, slug_multi_cloud: 'str' =None, spot_price: 'float' =None, spot_quota_code: 'str' =None, spot_quota_name: 'str' =None, spot_quota_page_url: 'str' =None): # noqa: E501 + def __init__(self, accelerator_type: 'str' =None, allowed_resources: 'list[str]' =None, availability_strategy: 'str' =None, available_in_seconds: 'str' =None, available_in_seconds_spot: 'str' =None, available_zones: 'list[str]' =None, byoc_only: 'bool' =None, capacity_block_only: 'bool' =None, capacity_block_price: 'float' =None, capacity_blocks_available: 'list[V1ClusterCapacityReservation]' =None, cluster_id: 'str' =None, cost: 'float' =None, detailed_quotas_info: 'list[V1AcceleratorQuotaInfo]' =None, device_card: 'str' =None, device_info: 'str' =None, display_name: 'str' =None, dws_cost: 'float' =None, dws_only: 'bool' =None, dws_supported: 'bool' =None, enabled: 'bool' =None, family: 'str' =None, full: 'bool' =None, instance_id: 'str' =None, is_custom: 'bool' =None, is_tier_restricted: 'bool' =None, lightning_interruptible: 'bool' =None, local_disk_included: 'bool' =None, local_disk_size: 'str' =None, local_disk_supported: 'bool' =None, local_disks_count: 'str' =None, max_available_quota: 'str' =None, multi_node_ib_cost_per_gpu_hour: 'float' =None, non_ondemand: 'bool' =None, non_spot: 'bool' =None, original_cost: 'float' =None, original_spot_price: 'float' =None, out_of_capacity: 'bool' =None, partition_only: 'bool' =None, partitionable_parents: 'list[str]' =None, persistent_disk_supported: 'bool' =None, promo: 'V1PromoOverlay' =None, provider: 'V1CloudProvider' =None, quota_checked_at: 'datetime' =None, quota_code: 'str' =None, quota_name: 'str' =None, quota_page_url: 'str' =None, quota_service_code: 'str' =None, quota_utilization: 'str' =None, quota_value: 'str' =None, reservable: 'bool' =None, reservation_available_zones: 'list[str]' =None, reservation_quota_code: 'str' =None, reservation_quota_name: 'str' =None, reservation_quota_page_url: 'str' =None, resources: 'V1Resources' =None, secondary_instance_id: 'str' =None, slug: 'str' =None, slug_multi_cloud: 'str' =None, spot_price: 'float' =None, spot_quota_code: 'str' =None, spot_quota_name: 'str' =None, spot_quota_page_url: 'str' =None): # noqa: E501 """V1ClusterAccelerator - a model defined in Swagger""" # noqa: E501 self._accelerator_type = None self._allowed_resources = None @@ -205,6 +207,7 @@ def __init__(self, accelerator_type: 'str' =None, allowed_resources: 'list[str]' self._local_disk_supported = None self._local_disks_count = None self._max_available_quota = None + self._multi_node_ib_cost_per_gpu_hour = None self._non_ondemand = None self._non_spot = None self._original_cost = None @@ -298,6 +301,8 @@ def __init__(self, accelerator_type: 'str' =None, allowed_resources: 'list[str]' self.local_disks_count = local_disks_count if max_available_quota is not None: self.max_available_quota = max_available_quota + if multi_node_ib_cost_per_gpu_hour is not None: + self.multi_node_ib_cost_per_gpu_hour = multi_node_ib_cost_per_gpu_hour if non_ondemand is not None: self.non_ondemand = non_ondemand if non_spot is not None: @@ -1010,6 +1015,27 @@ def max_available_quota(self, max_available_quota: 'str'): self._max_available_quota = max_available_quota + @property + def multi_node_ib_cost_per_gpu_hour(self) -> 'float': + """Gets the multi_node_ib_cost_per_gpu_hour of this V1ClusterAccelerator. # noqa: E501 + + + :return: The multi_node_ib_cost_per_gpu_hour of this V1ClusterAccelerator. # noqa: E501 + :rtype: float + """ + return self._multi_node_ib_cost_per_gpu_hour + + @multi_node_ib_cost_per_gpu_hour.setter + def multi_node_ib_cost_per_gpu_hour(self, multi_node_ib_cost_per_gpu_hour: 'float'): + """Sets the multi_node_ib_cost_per_gpu_hour of this V1ClusterAccelerator. + + + :param multi_node_ib_cost_per_gpu_hour: The multi_node_ib_cost_per_gpu_hour of this V1ClusterAccelerator. # noqa: E501 + :type: float + """ + + self._multi_node_ib_cost_per_gpu_hour = multi_node_ib_cost_per_gpu_hour + @property def non_ondemand(self) -> 'bool': """Gets the non_ondemand of this V1ClusterAccelerator. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_details.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_details.py new file mode 100644 index 000000000..e5ab1f33f --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_details.py @@ -0,0 +1,517 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1ClusterDetails(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'effective_schedulable_gpus': 'str', + 'floor_unenforceable': 'bool', + 'on_burst_count': 'int', + 'on_burst_servers': 'list[V1ClusterDetailsServer]', + 'on_demand_burst_gpus': 'str', + 'on_demand_headroom_gpus': 'str', + 'on_machine_count': 'int', + 'on_machine_servers': 'list[V1ClusterDetailsServer]', + 'pending_count': 'int', + 'pending_servers': 'list[V1ClusterDetailsServer]', + 'reservations': 'list[V1ClusterDetailsReservation]', + 'reserved_floor_gpus': 'str', + 'schedulable_gpus': 'str', + 'spot_in_use_gpus': 'str', + 'unscheduled_count': 'int', + 'unscheduled_servers': 'list[V1ClusterDetailsServer]' + } + + attribute_map = { + 'effective_schedulable_gpus': 'effectiveSchedulableGpus', + 'floor_unenforceable': 'floorUnenforceable', + 'on_burst_count': 'onBurstCount', + 'on_burst_servers': 'onBurstServers', + 'on_demand_burst_gpus': 'onDemandBurstGpus', + 'on_demand_headroom_gpus': 'onDemandHeadroomGpus', + 'on_machine_count': 'onMachineCount', + 'on_machine_servers': 'onMachineServers', + 'pending_count': 'pendingCount', + 'pending_servers': 'pendingServers', + 'reservations': 'reservations', + 'reserved_floor_gpus': 'reservedFloorGpus', + 'schedulable_gpus': 'schedulableGpus', + 'spot_in_use_gpus': 'spotInUseGpus', + 'unscheduled_count': 'unscheduledCount', + 'unscheduled_servers': 'unscheduledServers' + } + + def __init__(self, effective_schedulable_gpus: 'str' =None, floor_unenforceable: 'bool' =None, on_burst_count: 'int' =None, on_burst_servers: 'list[V1ClusterDetailsServer]' =None, on_demand_burst_gpus: 'str' =None, on_demand_headroom_gpus: 'str' =None, on_machine_count: 'int' =None, on_machine_servers: 'list[V1ClusterDetailsServer]' =None, pending_count: 'int' =None, pending_servers: 'list[V1ClusterDetailsServer]' =None, reservations: 'list[V1ClusterDetailsReservation]' =None, reserved_floor_gpus: 'str' =None, schedulable_gpus: 'str' =None, spot_in_use_gpus: 'str' =None, unscheduled_count: 'int' =None, unscheduled_servers: 'list[V1ClusterDetailsServer]' =None): # noqa: E501 + """V1ClusterDetails - a model defined in Swagger""" # noqa: E501 + self._effective_schedulable_gpus = None + self._floor_unenforceable = None + self._on_burst_count = None + self._on_burst_servers = None + self._on_demand_burst_gpus = None + self._on_demand_headroom_gpus = None + self._on_machine_count = None + self._on_machine_servers = None + self._pending_count = None + self._pending_servers = None + self._reservations = None + self._reserved_floor_gpus = None + self._schedulable_gpus = None + self._spot_in_use_gpus = None + self._unscheduled_count = None + self._unscheduled_servers = None + self.discriminator = None + if effective_schedulable_gpus is not None: + self.effective_schedulable_gpus = effective_schedulable_gpus + if floor_unenforceable is not None: + self.floor_unenforceable = floor_unenforceable + if on_burst_count is not None: + self.on_burst_count = on_burst_count + if on_burst_servers is not None: + self.on_burst_servers = on_burst_servers + if on_demand_burst_gpus is not None: + self.on_demand_burst_gpus = on_demand_burst_gpus + if on_demand_headroom_gpus is not None: + self.on_demand_headroom_gpus = on_demand_headroom_gpus + if on_machine_count is not None: + self.on_machine_count = on_machine_count + if on_machine_servers is not None: + self.on_machine_servers = on_machine_servers + if pending_count is not None: + self.pending_count = pending_count + if pending_servers is not None: + self.pending_servers = pending_servers + if reservations is not None: + self.reservations = reservations + if reserved_floor_gpus is not None: + self.reserved_floor_gpus = reserved_floor_gpus + if schedulable_gpus is not None: + self.schedulable_gpus = schedulable_gpus + if spot_in_use_gpus is not None: + self.spot_in_use_gpus = spot_in_use_gpus + if unscheduled_count is not None: + self.unscheduled_count = unscheduled_count + if unscheduled_servers is not None: + self.unscheduled_servers = unscheduled_servers + + @property + def effective_schedulable_gpus(self) -> 'str': + """Gets the effective_schedulable_gpus of this V1ClusterDetails. # noqa: E501 + + + :return: The effective_schedulable_gpus of this V1ClusterDetails. # noqa: E501 + :rtype: str + """ + return self._effective_schedulable_gpus + + @effective_schedulable_gpus.setter + def effective_schedulable_gpus(self, effective_schedulable_gpus: 'str'): + """Sets the effective_schedulable_gpus of this V1ClusterDetails. + + + :param effective_schedulable_gpus: The effective_schedulable_gpus of this V1ClusterDetails. # noqa: E501 + :type: str + """ + + self._effective_schedulable_gpus = effective_schedulable_gpus + + @property + def floor_unenforceable(self) -> 'bool': + """Gets the floor_unenforceable of this V1ClusterDetails. # noqa: E501 + + + :return: The floor_unenforceable of this V1ClusterDetails. # noqa: E501 + :rtype: bool + """ + return self._floor_unenforceable + + @floor_unenforceable.setter + def floor_unenforceable(self, floor_unenforceable: 'bool'): + """Sets the floor_unenforceable of this V1ClusterDetails. + + + :param floor_unenforceable: The floor_unenforceable of this V1ClusterDetails. # noqa: E501 + :type: bool + """ + + self._floor_unenforceable = floor_unenforceable + + @property + def on_burst_count(self) -> 'int': + """Gets the on_burst_count of this V1ClusterDetails. # noqa: E501 + + + :return: The on_burst_count of this V1ClusterDetails. # noqa: E501 + :rtype: int + """ + return self._on_burst_count + + @on_burst_count.setter + def on_burst_count(self, on_burst_count: 'int'): + """Sets the on_burst_count of this V1ClusterDetails. + + + :param on_burst_count: The on_burst_count of this V1ClusterDetails. # noqa: E501 + :type: int + """ + + self._on_burst_count = on_burst_count + + @property + def on_burst_servers(self) -> 'list[V1ClusterDetailsServer]': + """Gets the on_burst_servers of this V1ClusterDetails. # noqa: E501 + + + :return: The on_burst_servers of this V1ClusterDetails. # noqa: E501 + :rtype: list[V1ClusterDetailsServer] + """ + return self._on_burst_servers + + @on_burst_servers.setter + def on_burst_servers(self, on_burst_servers: 'list[V1ClusterDetailsServer]'): + """Sets the on_burst_servers of this V1ClusterDetails. + + + :param on_burst_servers: The on_burst_servers of this V1ClusterDetails. # noqa: E501 + :type: list[V1ClusterDetailsServer] + """ + + self._on_burst_servers = on_burst_servers + + @property + def on_demand_burst_gpus(self) -> 'str': + """Gets the on_demand_burst_gpus of this V1ClusterDetails. # noqa: E501 + + + :return: The on_demand_burst_gpus of this V1ClusterDetails. # noqa: E501 + :rtype: str + """ + return self._on_demand_burst_gpus + + @on_demand_burst_gpus.setter + def on_demand_burst_gpus(self, on_demand_burst_gpus: 'str'): + """Sets the on_demand_burst_gpus of this V1ClusterDetails. + + + :param on_demand_burst_gpus: The on_demand_burst_gpus of this V1ClusterDetails. # noqa: E501 + :type: str + """ + + self._on_demand_burst_gpus = on_demand_burst_gpus + + @property + def on_demand_headroom_gpus(self) -> 'str': + """Gets the on_demand_headroom_gpus of this V1ClusterDetails. # noqa: E501 + + + :return: The on_demand_headroom_gpus of this V1ClusterDetails. # noqa: E501 + :rtype: str + """ + return self._on_demand_headroom_gpus + + @on_demand_headroom_gpus.setter + def on_demand_headroom_gpus(self, on_demand_headroom_gpus: 'str'): + """Sets the on_demand_headroom_gpus of this V1ClusterDetails. + + + :param on_demand_headroom_gpus: The on_demand_headroom_gpus of this V1ClusterDetails. # noqa: E501 + :type: str + """ + + self._on_demand_headroom_gpus = on_demand_headroom_gpus + + @property + def on_machine_count(self) -> 'int': + """Gets the on_machine_count of this V1ClusterDetails. # noqa: E501 + + + :return: The on_machine_count of this V1ClusterDetails. # noqa: E501 + :rtype: int + """ + return self._on_machine_count + + @on_machine_count.setter + def on_machine_count(self, on_machine_count: 'int'): + """Sets the on_machine_count of this V1ClusterDetails. + + + :param on_machine_count: The on_machine_count of this V1ClusterDetails. # noqa: E501 + :type: int + """ + + self._on_machine_count = on_machine_count + + @property + def on_machine_servers(self) -> 'list[V1ClusterDetailsServer]': + """Gets the on_machine_servers of this V1ClusterDetails. # noqa: E501 + + + :return: The on_machine_servers of this V1ClusterDetails. # noqa: E501 + :rtype: list[V1ClusterDetailsServer] + """ + return self._on_machine_servers + + @on_machine_servers.setter + def on_machine_servers(self, on_machine_servers: 'list[V1ClusterDetailsServer]'): + """Sets the on_machine_servers of this V1ClusterDetails. + + + :param on_machine_servers: The on_machine_servers of this V1ClusterDetails. # noqa: E501 + :type: list[V1ClusterDetailsServer] + """ + + self._on_machine_servers = on_machine_servers + + @property + def pending_count(self) -> 'int': + """Gets the pending_count of this V1ClusterDetails. # noqa: E501 + + + :return: The pending_count of this V1ClusterDetails. # noqa: E501 + :rtype: int + """ + return self._pending_count + + @pending_count.setter + def pending_count(self, pending_count: 'int'): + """Sets the pending_count of this V1ClusterDetails. + + + :param pending_count: The pending_count of this V1ClusterDetails. # noqa: E501 + :type: int + """ + + self._pending_count = pending_count + + @property + def pending_servers(self) -> 'list[V1ClusterDetailsServer]': + """Gets the pending_servers of this V1ClusterDetails. # noqa: E501 + + + :return: The pending_servers of this V1ClusterDetails. # noqa: E501 + :rtype: list[V1ClusterDetailsServer] + """ + return self._pending_servers + + @pending_servers.setter + def pending_servers(self, pending_servers: 'list[V1ClusterDetailsServer]'): + """Sets the pending_servers of this V1ClusterDetails. + + + :param pending_servers: The pending_servers of this V1ClusterDetails. # noqa: E501 + :type: list[V1ClusterDetailsServer] + """ + + self._pending_servers = pending_servers + + @property + def reservations(self) -> 'list[V1ClusterDetailsReservation]': + """Gets the reservations of this V1ClusterDetails. # noqa: E501 + + + :return: The reservations of this V1ClusterDetails. # noqa: E501 + :rtype: list[V1ClusterDetailsReservation] + """ + return self._reservations + + @reservations.setter + def reservations(self, reservations: 'list[V1ClusterDetailsReservation]'): + """Sets the reservations of this V1ClusterDetails. + + + :param reservations: The reservations of this V1ClusterDetails. # noqa: E501 + :type: list[V1ClusterDetailsReservation] + """ + + self._reservations = reservations + + @property + def reserved_floor_gpus(self) -> 'str': + """Gets the reserved_floor_gpus of this V1ClusterDetails. # noqa: E501 + + + :return: The reserved_floor_gpus of this V1ClusterDetails. # noqa: E501 + :rtype: str + """ + return self._reserved_floor_gpus + + @reserved_floor_gpus.setter + def reserved_floor_gpus(self, reserved_floor_gpus: 'str'): + """Sets the reserved_floor_gpus of this V1ClusterDetails. + + + :param reserved_floor_gpus: The reserved_floor_gpus of this V1ClusterDetails. # noqa: E501 + :type: str + """ + + self._reserved_floor_gpus = reserved_floor_gpus + + @property + def schedulable_gpus(self) -> 'str': + """Gets the schedulable_gpus of this V1ClusterDetails. # noqa: E501 + + + :return: The schedulable_gpus of this V1ClusterDetails. # noqa: E501 + :rtype: str + """ + return self._schedulable_gpus + + @schedulable_gpus.setter + def schedulable_gpus(self, schedulable_gpus: 'str'): + """Sets the schedulable_gpus of this V1ClusterDetails. + + + :param schedulable_gpus: The schedulable_gpus of this V1ClusterDetails. # noqa: E501 + :type: str + """ + + self._schedulable_gpus = schedulable_gpus + + @property + def spot_in_use_gpus(self) -> 'str': + """Gets the spot_in_use_gpus of this V1ClusterDetails. # noqa: E501 + + + :return: The spot_in_use_gpus of this V1ClusterDetails. # noqa: E501 + :rtype: str + """ + return self._spot_in_use_gpus + + @spot_in_use_gpus.setter + def spot_in_use_gpus(self, spot_in_use_gpus: 'str'): + """Sets the spot_in_use_gpus of this V1ClusterDetails. + + + :param spot_in_use_gpus: The spot_in_use_gpus of this V1ClusterDetails. # noqa: E501 + :type: str + """ + + self._spot_in_use_gpus = spot_in_use_gpus + + @property + def unscheduled_count(self) -> 'int': + """Gets the unscheduled_count of this V1ClusterDetails. # noqa: E501 + + + :return: The unscheduled_count of this V1ClusterDetails. # noqa: E501 + :rtype: int + """ + return self._unscheduled_count + + @unscheduled_count.setter + def unscheduled_count(self, unscheduled_count: 'int'): + """Sets the unscheduled_count of this V1ClusterDetails. + + + :param unscheduled_count: The unscheduled_count of this V1ClusterDetails. # noqa: E501 + :type: int + """ + + self._unscheduled_count = unscheduled_count + + @property + def unscheduled_servers(self) -> 'list[V1ClusterDetailsServer]': + """Gets the unscheduled_servers of this V1ClusterDetails. # noqa: E501 + + + :return: The unscheduled_servers of this V1ClusterDetails. # noqa: E501 + :rtype: list[V1ClusterDetailsServer] + """ + return self._unscheduled_servers + + @unscheduled_servers.setter + def unscheduled_servers(self, unscheduled_servers: 'list[V1ClusterDetailsServer]'): + """Sets the unscheduled_servers of this V1ClusterDetails. + + + :param unscheduled_servers: The unscheduled_servers of this V1ClusterDetails. # noqa: E501 + :type: list[V1ClusterDetailsServer] + """ + + self._unscheduled_servers = unscheduled_servers + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1ClusterDetails, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1ClusterDetails') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1ClusterDetails): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1ClusterDetails') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_details_reservation.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_details_reservation.py new file mode 100644 index 000000000..5d5c494af --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_details_reservation.py @@ -0,0 +1,413 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1ClusterDetailsReservation(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'available_gpus': 'str', + 'bursting_past_floor': 'bool', + 'committed_gpus': 'str', + 'instance_type': 'str', + 'org_id': 'str', + 'org_name': 'str', + 'owner_unbound_gpus': 'str', + 'project_id': 'str', + 'project_name': 'str', + 'reservation_id': 'str', + 'unenforceable': 'bool', + 'used_gpus': 'str' + } + + attribute_map = { + 'available_gpus': 'availableGpus', + 'bursting_past_floor': 'burstingPastFloor', + 'committed_gpus': 'committedGpus', + 'instance_type': 'instanceType', + 'org_id': 'orgId', + 'org_name': 'orgName', + 'owner_unbound_gpus': 'ownerUnboundGpus', + 'project_id': 'projectId', + 'project_name': 'projectName', + 'reservation_id': 'reservationId', + 'unenforceable': 'unenforceable', + 'used_gpus': 'usedGpus' + } + + def __init__(self, available_gpus: 'str' =None, bursting_past_floor: 'bool' =None, committed_gpus: 'str' =None, instance_type: 'str' =None, org_id: 'str' =None, org_name: 'str' =None, owner_unbound_gpus: 'str' =None, project_id: 'str' =None, project_name: 'str' =None, reservation_id: 'str' =None, unenforceable: 'bool' =None, used_gpus: 'str' =None): # noqa: E501 + """V1ClusterDetailsReservation - a model defined in Swagger""" # noqa: E501 + self._available_gpus = None + self._bursting_past_floor = None + self._committed_gpus = None + self._instance_type = None + self._org_id = None + self._org_name = None + self._owner_unbound_gpus = None + self._project_id = None + self._project_name = None + self._reservation_id = None + self._unenforceable = None + self._used_gpus = None + self.discriminator = None + if available_gpus is not None: + self.available_gpus = available_gpus + if bursting_past_floor is not None: + self.bursting_past_floor = bursting_past_floor + if committed_gpus is not None: + self.committed_gpus = committed_gpus + if instance_type is not None: + self.instance_type = instance_type + if org_id is not None: + self.org_id = org_id + if org_name is not None: + self.org_name = org_name + if owner_unbound_gpus is not None: + self.owner_unbound_gpus = owner_unbound_gpus + if project_id is not None: + self.project_id = project_id + if project_name is not None: + self.project_name = project_name + if reservation_id is not None: + self.reservation_id = reservation_id + if unenforceable is not None: + self.unenforceable = unenforceable + if used_gpus is not None: + self.used_gpus = used_gpus + + @property + def available_gpus(self) -> 'str': + """Gets the available_gpus of this V1ClusterDetailsReservation. # noqa: E501 + + + :return: The available_gpus of this V1ClusterDetailsReservation. # noqa: E501 + :rtype: str + """ + return self._available_gpus + + @available_gpus.setter + def available_gpus(self, available_gpus: 'str'): + """Sets the available_gpus of this V1ClusterDetailsReservation. + + + :param available_gpus: The available_gpus of this V1ClusterDetailsReservation. # noqa: E501 + :type: str + """ + + self._available_gpus = available_gpus + + @property + def bursting_past_floor(self) -> 'bool': + """Gets the bursting_past_floor of this V1ClusterDetailsReservation. # noqa: E501 + + + :return: The bursting_past_floor of this V1ClusterDetailsReservation. # noqa: E501 + :rtype: bool + """ + return self._bursting_past_floor + + @bursting_past_floor.setter + def bursting_past_floor(self, bursting_past_floor: 'bool'): + """Sets the bursting_past_floor of this V1ClusterDetailsReservation. + + + :param bursting_past_floor: The bursting_past_floor of this V1ClusterDetailsReservation. # noqa: E501 + :type: bool + """ + + self._bursting_past_floor = bursting_past_floor + + @property + def committed_gpus(self) -> 'str': + """Gets the committed_gpus of this V1ClusterDetailsReservation. # noqa: E501 + + + :return: The committed_gpus of this V1ClusterDetailsReservation. # noqa: E501 + :rtype: str + """ + return self._committed_gpus + + @committed_gpus.setter + def committed_gpus(self, committed_gpus: 'str'): + """Sets the committed_gpus of this V1ClusterDetailsReservation. + + + :param committed_gpus: The committed_gpus of this V1ClusterDetailsReservation. # noqa: E501 + :type: str + """ + + self._committed_gpus = committed_gpus + + @property + def instance_type(self) -> 'str': + """Gets the instance_type of this V1ClusterDetailsReservation. # noqa: E501 + + + :return: The instance_type of this V1ClusterDetailsReservation. # noqa: E501 + :rtype: str + """ + return self._instance_type + + @instance_type.setter + def instance_type(self, instance_type: 'str'): + """Sets the instance_type of this V1ClusterDetailsReservation. + + + :param instance_type: The instance_type of this V1ClusterDetailsReservation. # noqa: E501 + :type: str + """ + + self._instance_type = instance_type + + @property + def org_id(self) -> 'str': + """Gets the org_id of this V1ClusterDetailsReservation. # noqa: E501 + + + :return: The org_id of this V1ClusterDetailsReservation. # noqa: E501 + :rtype: str + """ + return self._org_id + + @org_id.setter + def org_id(self, org_id: 'str'): + """Sets the org_id of this V1ClusterDetailsReservation. + + + :param org_id: The org_id of this V1ClusterDetailsReservation. # noqa: E501 + :type: str + """ + + self._org_id = org_id + + @property + def org_name(self) -> 'str': + """Gets the org_name of this V1ClusterDetailsReservation. # noqa: E501 + + + :return: The org_name of this V1ClusterDetailsReservation. # noqa: E501 + :rtype: str + """ + return self._org_name + + @org_name.setter + def org_name(self, org_name: 'str'): + """Sets the org_name of this V1ClusterDetailsReservation. + + + :param org_name: The org_name of this V1ClusterDetailsReservation. # noqa: E501 + :type: str + """ + + self._org_name = org_name + + @property + def owner_unbound_gpus(self) -> 'str': + """Gets the owner_unbound_gpus of this V1ClusterDetailsReservation. # noqa: E501 + + + :return: The owner_unbound_gpus of this V1ClusterDetailsReservation. # noqa: E501 + :rtype: str + """ + return self._owner_unbound_gpus + + @owner_unbound_gpus.setter + def owner_unbound_gpus(self, owner_unbound_gpus: 'str'): + """Sets the owner_unbound_gpus of this V1ClusterDetailsReservation. + + + :param owner_unbound_gpus: The owner_unbound_gpus of this V1ClusterDetailsReservation. # noqa: E501 + :type: str + """ + + self._owner_unbound_gpus = owner_unbound_gpus + + @property + def project_id(self) -> 'str': + """Gets the project_id of this V1ClusterDetailsReservation. # noqa: E501 + + + :return: The project_id of this V1ClusterDetailsReservation. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id: 'str'): + """Sets the project_id of this V1ClusterDetailsReservation. + + + :param project_id: The project_id of this V1ClusterDetailsReservation. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def project_name(self) -> 'str': + """Gets the project_name of this V1ClusterDetailsReservation. # noqa: E501 + + + :return: The project_name of this V1ClusterDetailsReservation. # noqa: E501 + :rtype: str + """ + return self._project_name + + @project_name.setter + def project_name(self, project_name: 'str'): + """Sets the project_name of this V1ClusterDetailsReservation. + + + :param project_name: The project_name of this V1ClusterDetailsReservation. # noqa: E501 + :type: str + """ + + self._project_name = project_name + + @property + def reservation_id(self) -> 'str': + """Gets the reservation_id of this V1ClusterDetailsReservation. # noqa: E501 + + + :return: The reservation_id of this V1ClusterDetailsReservation. # noqa: E501 + :rtype: str + """ + return self._reservation_id + + @reservation_id.setter + def reservation_id(self, reservation_id: 'str'): + """Sets the reservation_id of this V1ClusterDetailsReservation. + + + :param reservation_id: The reservation_id of this V1ClusterDetailsReservation. # noqa: E501 + :type: str + """ + + self._reservation_id = reservation_id + + @property + def unenforceable(self) -> 'bool': + """Gets the unenforceable of this V1ClusterDetailsReservation. # noqa: E501 + + + :return: The unenforceable of this V1ClusterDetailsReservation. # noqa: E501 + :rtype: bool + """ + return self._unenforceable + + @unenforceable.setter + def unenforceable(self, unenforceable: 'bool'): + """Sets the unenforceable of this V1ClusterDetailsReservation. + + + :param unenforceable: The unenforceable of this V1ClusterDetailsReservation. # noqa: E501 + :type: bool + """ + + self._unenforceable = unenforceable + + @property + def used_gpus(self) -> 'str': + """Gets the used_gpus of this V1ClusterDetailsReservation. # noqa: E501 + + + :return: The used_gpus of this V1ClusterDetailsReservation. # noqa: E501 + :rtype: str + """ + return self._used_gpus + + @used_gpus.setter + def used_gpus(self, used_gpus: 'str'): + """Sets the used_gpus of this V1ClusterDetailsReservation. + + + :param used_gpus: The used_gpus of this V1ClusterDetailsReservation. # noqa: E501 + :type: str + """ + + self._used_gpus = used_gpus + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1ClusterDetailsReservation, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1ClusterDetailsReservation') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1ClusterDetailsReservation): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1ClusterDetailsReservation') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_details_server.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_details_server.py new file mode 100644 index 000000000..015d8f9d2 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_details_server.py @@ -0,0 +1,543 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1ClusterDetailsServer(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'capacity_reservation_id': 'str', + 'cpus': 'int', + 'created_at': 'datetime', + 'error': 'str', + 'gpus': 'int', + 'id': 'str', + 'instance_type': 'str', + 'org_id': 'str', + 'org_name': 'str', + 'project_id': 'str', + 'project_name': 'str', + 'provider': 'str', + 'retries': 'str', + 'spot': 'bool', + 'state': 'V1ServerState', + 'user_id': 'str', + 'workload_name': 'str' + } + + attribute_map = { + 'capacity_reservation_id': 'capacityReservationId', + 'cpus': 'cpus', + 'created_at': 'createdAt', + 'error': 'error', + 'gpus': 'gpus', + 'id': 'id', + 'instance_type': 'instanceType', + 'org_id': 'orgId', + 'org_name': 'orgName', + 'project_id': 'projectId', + 'project_name': 'projectName', + 'provider': 'provider', + 'retries': 'retries', + 'spot': 'spot', + 'state': 'state', + 'user_id': 'userId', + 'workload_name': 'workloadName' + } + + def __init__(self, capacity_reservation_id: 'str' =None, cpus: 'int' =None, created_at: 'datetime' =None, error: 'str' =None, gpus: 'int' =None, id: 'str' =None, instance_type: 'str' =None, org_id: 'str' =None, org_name: 'str' =None, project_id: 'str' =None, project_name: 'str' =None, provider: 'str' =None, retries: 'str' =None, spot: 'bool' =None, state: 'V1ServerState' =None, user_id: 'str' =None, workload_name: 'str' =None): # noqa: E501 + """V1ClusterDetailsServer - a model defined in Swagger""" # noqa: E501 + self._capacity_reservation_id = None + self._cpus = None + self._created_at = None + self._error = None + self._gpus = None + self._id = None + self._instance_type = None + self._org_id = None + self._org_name = None + self._project_id = None + self._project_name = None + self._provider = None + self._retries = None + self._spot = None + self._state = None + self._user_id = None + self._workload_name = None + self.discriminator = None + if capacity_reservation_id is not None: + self.capacity_reservation_id = capacity_reservation_id + if cpus is not None: + self.cpus = cpus + if created_at is not None: + self.created_at = created_at + if error is not None: + self.error = error + if gpus is not None: + self.gpus = gpus + if id is not None: + self.id = id + if instance_type is not None: + self.instance_type = instance_type + if org_id is not None: + self.org_id = org_id + if org_name is not None: + self.org_name = org_name + if project_id is not None: + self.project_id = project_id + if project_name is not None: + self.project_name = project_name + if provider is not None: + self.provider = provider + if retries is not None: + self.retries = retries + if spot is not None: + self.spot = spot + if state is not None: + self.state = state + if user_id is not None: + self.user_id = user_id + if workload_name is not None: + self.workload_name = workload_name + + @property + def capacity_reservation_id(self) -> 'str': + """Gets the capacity_reservation_id of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The capacity_reservation_id of this V1ClusterDetailsServer. # noqa: E501 + :rtype: str + """ + return self._capacity_reservation_id + + @capacity_reservation_id.setter + def capacity_reservation_id(self, capacity_reservation_id: 'str'): + """Sets the capacity_reservation_id of this V1ClusterDetailsServer. + + + :param capacity_reservation_id: The capacity_reservation_id of this V1ClusterDetailsServer. # noqa: E501 + :type: str + """ + + self._capacity_reservation_id = capacity_reservation_id + + @property + def cpus(self) -> 'int': + """Gets the cpus of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The cpus of this V1ClusterDetailsServer. # noqa: E501 + :rtype: int + """ + return self._cpus + + @cpus.setter + def cpus(self, cpus: 'int'): + """Sets the cpus of this V1ClusterDetailsServer. + + + :param cpus: The cpus of this V1ClusterDetailsServer. # noqa: E501 + :type: int + """ + + self._cpus = cpus + + @property + def created_at(self) -> 'datetime': + """Gets the created_at of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The created_at of this V1ClusterDetailsServer. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at: 'datetime'): + """Sets the created_at of this V1ClusterDetailsServer. + + + :param created_at: The created_at of this V1ClusterDetailsServer. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def error(self) -> 'str': + """Gets the error of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The error of this V1ClusterDetailsServer. # noqa: E501 + :rtype: str + """ + return self._error + + @error.setter + def error(self, error: 'str'): + """Sets the error of this V1ClusterDetailsServer. + + + :param error: The error of this V1ClusterDetailsServer. # noqa: E501 + :type: str + """ + + self._error = error + + @property + def gpus(self) -> 'int': + """Gets the gpus of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The gpus of this V1ClusterDetailsServer. # noqa: E501 + :rtype: int + """ + return self._gpus + + @gpus.setter + def gpus(self, gpus: 'int'): + """Sets the gpus of this V1ClusterDetailsServer. + + + :param gpus: The gpus of this V1ClusterDetailsServer. # noqa: E501 + :type: int + """ + + self._gpus = gpus + + @property + def id(self) -> 'str': + """Gets the id of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The id of this V1ClusterDetailsServer. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id: 'str'): + """Sets the id of this V1ClusterDetailsServer. + + + :param id: The id of this V1ClusterDetailsServer. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def instance_type(self) -> 'str': + """Gets the instance_type of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The instance_type of this V1ClusterDetailsServer. # noqa: E501 + :rtype: str + """ + return self._instance_type + + @instance_type.setter + def instance_type(self, instance_type: 'str'): + """Sets the instance_type of this V1ClusterDetailsServer. + + + :param instance_type: The instance_type of this V1ClusterDetailsServer. # noqa: E501 + :type: str + """ + + self._instance_type = instance_type + + @property + def org_id(self) -> 'str': + """Gets the org_id of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The org_id of this V1ClusterDetailsServer. # noqa: E501 + :rtype: str + """ + return self._org_id + + @org_id.setter + def org_id(self, org_id: 'str'): + """Sets the org_id of this V1ClusterDetailsServer. + + + :param org_id: The org_id of this V1ClusterDetailsServer. # noqa: E501 + :type: str + """ + + self._org_id = org_id + + @property + def org_name(self) -> 'str': + """Gets the org_name of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The org_name of this V1ClusterDetailsServer. # noqa: E501 + :rtype: str + """ + return self._org_name + + @org_name.setter + def org_name(self, org_name: 'str'): + """Sets the org_name of this V1ClusterDetailsServer. + + + :param org_name: The org_name of this V1ClusterDetailsServer. # noqa: E501 + :type: str + """ + + self._org_name = org_name + + @property + def project_id(self) -> 'str': + """Gets the project_id of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The project_id of this V1ClusterDetailsServer. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id: 'str'): + """Sets the project_id of this V1ClusterDetailsServer. + + + :param project_id: The project_id of this V1ClusterDetailsServer. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def project_name(self) -> 'str': + """Gets the project_name of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The project_name of this V1ClusterDetailsServer. # noqa: E501 + :rtype: str + """ + return self._project_name + + @project_name.setter + def project_name(self, project_name: 'str'): + """Sets the project_name of this V1ClusterDetailsServer. + + + :param project_name: The project_name of this V1ClusterDetailsServer. # noqa: E501 + :type: str + """ + + self._project_name = project_name + + @property + def provider(self) -> 'str': + """Gets the provider of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The provider of this V1ClusterDetailsServer. # noqa: E501 + :rtype: str + """ + return self._provider + + @provider.setter + def provider(self, provider: 'str'): + """Sets the provider of this V1ClusterDetailsServer. + + + :param provider: The provider of this V1ClusterDetailsServer. # noqa: E501 + :type: str + """ + + self._provider = provider + + @property + def retries(self) -> 'str': + """Gets the retries of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The retries of this V1ClusterDetailsServer. # noqa: E501 + :rtype: str + """ + return self._retries + + @retries.setter + def retries(self, retries: 'str'): + """Sets the retries of this V1ClusterDetailsServer. + + + :param retries: The retries of this V1ClusterDetailsServer. # noqa: E501 + :type: str + """ + + self._retries = retries + + @property + def spot(self) -> 'bool': + """Gets the spot of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The spot of this V1ClusterDetailsServer. # noqa: E501 + :rtype: bool + """ + return self._spot + + @spot.setter + def spot(self, spot: 'bool'): + """Sets the spot of this V1ClusterDetailsServer. + + + :param spot: The spot of this V1ClusterDetailsServer. # noqa: E501 + :type: bool + """ + + self._spot = spot + + @property + def state(self) -> 'V1ServerState': + """Gets the state of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The state of this V1ClusterDetailsServer. # noqa: E501 + :rtype: V1ServerState + """ + return self._state + + @state.setter + def state(self, state: 'V1ServerState'): + """Sets the state of this V1ClusterDetailsServer. + + + :param state: The state of this V1ClusterDetailsServer. # noqa: E501 + :type: V1ServerState + """ + + self._state = state + + @property + def user_id(self) -> 'str': + """Gets the user_id of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The user_id of this V1ClusterDetailsServer. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id: 'str'): + """Sets the user_id of this V1ClusterDetailsServer. + + + :param user_id: The user_id of this V1ClusterDetailsServer. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def workload_name(self) -> 'str': + """Gets the workload_name of this V1ClusterDetailsServer. # noqa: E501 + + + :return: The workload_name of this V1ClusterDetailsServer. # noqa: E501 + :rtype: str + """ + return self._workload_name + + @workload_name.setter + def workload_name(self, workload_name: 'str'): + """Sets the workload_name of this V1ClusterDetailsServer. + + + :param workload_name: The workload_name of this V1ClusterDetailsServer. # noqa: E501 + :type: str + """ + + self._workload_name = workload_name + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1ClusterDetailsServer, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1ClusterDetailsServer') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1ClusterDetailsServer): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1ClusterDetailsServer') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_reservation_usage_point.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_reservation_usage_point.py new file mode 100644 index 000000000..dd66be5a7 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_reservation_usage_point.py @@ -0,0 +1,335 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1ClusterReservationUsagePoint(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'end_time': 'datetime', + 'reserved_capacity_gpus': 'float', + 'reserved_multi_node_gpus': 'float', + 'reserved_single_node_gpus': 'float', + 'reserved_unclassified_gpus': 'float', + 'start_time': 'datetime', + 'unreserved_multi_node_gpus': 'float', + 'unreserved_single_node_gpus': 'float', + 'unreserved_unclassified_gpus': 'float' + } + + attribute_map = { + 'end_time': 'endTime', + 'reserved_capacity_gpus': 'reservedCapacityGpus', + 'reserved_multi_node_gpus': 'reservedMultiNodeGpus', + 'reserved_single_node_gpus': 'reservedSingleNodeGpus', + 'reserved_unclassified_gpus': 'reservedUnclassifiedGpus', + 'start_time': 'startTime', + 'unreserved_multi_node_gpus': 'unreservedMultiNodeGpus', + 'unreserved_single_node_gpus': 'unreservedSingleNodeGpus', + 'unreserved_unclassified_gpus': 'unreservedUnclassifiedGpus' + } + + def __init__(self, end_time: 'datetime' =None, reserved_capacity_gpus: 'float' =None, reserved_multi_node_gpus: 'float' =None, reserved_single_node_gpus: 'float' =None, reserved_unclassified_gpus: 'float' =None, start_time: 'datetime' =None, unreserved_multi_node_gpus: 'float' =None, unreserved_single_node_gpus: 'float' =None, unreserved_unclassified_gpus: 'float' =None): # noqa: E501 + """V1ClusterReservationUsagePoint - a model defined in Swagger""" # noqa: E501 + self._end_time = None + self._reserved_capacity_gpus = None + self._reserved_multi_node_gpus = None + self._reserved_single_node_gpus = None + self._reserved_unclassified_gpus = None + self._start_time = None + self._unreserved_multi_node_gpus = None + self._unreserved_single_node_gpus = None + self._unreserved_unclassified_gpus = None + self.discriminator = None + if end_time is not None: + self.end_time = end_time + if reserved_capacity_gpus is not None: + self.reserved_capacity_gpus = reserved_capacity_gpus + if reserved_multi_node_gpus is not None: + self.reserved_multi_node_gpus = reserved_multi_node_gpus + if reserved_single_node_gpus is not None: + self.reserved_single_node_gpus = reserved_single_node_gpus + if reserved_unclassified_gpus is not None: + self.reserved_unclassified_gpus = reserved_unclassified_gpus + if start_time is not None: + self.start_time = start_time + if unreserved_multi_node_gpus is not None: + self.unreserved_multi_node_gpus = unreserved_multi_node_gpus + if unreserved_single_node_gpus is not None: + self.unreserved_single_node_gpus = unreserved_single_node_gpus + if unreserved_unclassified_gpus is not None: + self.unreserved_unclassified_gpus = unreserved_unclassified_gpus + + @property + def end_time(self) -> 'datetime': + """Gets the end_time of this V1ClusterReservationUsagePoint. # noqa: E501 + + + :return: The end_time of this V1ClusterReservationUsagePoint. # noqa: E501 + :rtype: datetime + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time: 'datetime'): + """Sets the end_time of this V1ClusterReservationUsagePoint. + + + :param end_time: The end_time of this V1ClusterReservationUsagePoint. # noqa: E501 + :type: datetime + """ + + self._end_time = end_time + + @property + def reserved_capacity_gpus(self) -> 'float': + """Gets the reserved_capacity_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + + + :return: The reserved_capacity_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :rtype: float + """ + return self._reserved_capacity_gpus + + @reserved_capacity_gpus.setter + def reserved_capacity_gpus(self, reserved_capacity_gpus: 'float'): + """Sets the reserved_capacity_gpus of this V1ClusterReservationUsagePoint. + + + :param reserved_capacity_gpus: The reserved_capacity_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :type: float + """ + + self._reserved_capacity_gpus = reserved_capacity_gpus + + @property + def reserved_multi_node_gpus(self) -> 'float': + """Gets the reserved_multi_node_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + + + :return: The reserved_multi_node_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :rtype: float + """ + return self._reserved_multi_node_gpus + + @reserved_multi_node_gpus.setter + def reserved_multi_node_gpus(self, reserved_multi_node_gpus: 'float'): + """Sets the reserved_multi_node_gpus of this V1ClusterReservationUsagePoint. + + + :param reserved_multi_node_gpus: The reserved_multi_node_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :type: float + """ + + self._reserved_multi_node_gpus = reserved_multi_node_gpus + + @property + def reserved_single_node_gpus(self) -> 'float': + """Gets the reserved_single_node_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + + + :return: The reserved_single_node_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :rtype: float + """ + return self._reserved_single_node_gpus + + @reserved_single_node_gpus.setter + def reserved_single_node_gpus(self, reserved_single_node_gpus: 'float'): + """Sets the reserved_single_node_gpus of this V1ClusterReservationUsagePoint. + + + :param reserved_single_node_gpus: The reserved_single_node_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :type: float + """ + + self._reserved_single_node_gpus = reserved_single_node_gpus + + @property + def reserved_unclassified_gpus(self) -> 'float': + """Gets the reserved_unclassified_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + + + :return: The reserved_unclassified_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :rtype: float + """ + return self._reserved_unclassified_gpus + + @reserved_unclassified_gpus.setter + def reserved_unclassified_gpus(self, reserved_unclassified_gpus: 'float'): + """Sets the reserved_unclassified_gpus of this V1ClusterReservationUsagePoint. + + + :param reserved_unclassified_gpus: The reserved_unclassified_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :type: float + """ + + self._reserved_unclassified_gpus = reserved_unclassified_gpus + + @property + def start_time(self) -> 'datetime': + """Gets the start_time of this V1ClusterReservationUsagePoint. # noqa: E501 + + + :return: The start_time of this V1ClusterReservationUsagePoint. # noqa: E501 + :rtype: datetime + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time: 'datetime'): + """Sets the start_time of this V1ClusterReservationUsagePoint. + + + :param start_time: The start_time of this V1ClusterReservationUsagePoint. # noqa: E501 + :type: datetime + """ + + self._start_time = start_time + + @property + def unreserved_multi_node_gpus(self) -> 'float': + """Gets the unreserved_multi_node_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + + + :return: The unreserved_multi_node_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :rtype: float + """ + return self._unreserved_multi_node_gpus + + @unreserved_multi_node_gpus.setter + def unreserved_multi_node_gpus(self, unreserved_multi_node_gpus: 'float'): + """Sets the unreserved_multi_node_gpus of this V1ClusterReservationUsagePoint. + + + :param unreserved_multi_node_gpus: The unreserved_multi_node_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :type: float + """ + + self._unreserved_multi_node_gpus = unreserved_multi_node_gpus + + @property + def unreserved_single_node_gpus(self) -> 'float': + """Gets the unreserved_single_node_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + + + :return: The unreserved_single_node_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :rtype: float + """ + return self._unreserved_single_node_gpus + + @unreserved_single_node_gpus.setter + def unreserved_single_node_gpus(self, unreserved_single_node_gpus: 'float'): + """Sets the unreserved_single_node_gpus of this V1ClusterReservationUsagePoint. + + + :param unreserved_single_node_gpus: The unreserved_single_node_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :type: float + """ + + self._unreserved_single_node_gpus = unreserved_single_node_gpus + + @property + def unreserved_unclassified_gpus(self) -> 'float': + """Gets the unreserved_unclassified_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + + + :return: The unreserved_unclassified_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :rtype: float + """ + return self._unreserved_unclassified_gpus + + @unreserved_unclassified_gpus.setter + def unreserved_unclassified_gpus(self, unreserved_unclassified_gpus: 'float'): + """Sets the unreserved_unclassified_gpus of this V1ClusterReservationUsagePoint. + + + :param unreserved_unclassified_gpus: The unreserved_unclassified_gpus of this V1ClusterReservationUsagePoint. # noqa: E501 + :type: float + """ + + self._unreserved_unclassified_gpus = unreserved_unclassified_gpus + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1ClusterReservationUsagePoint, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1ClusterReservationUsagePoint') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1ClusterReservationUsagePoint): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1ClusterReservationUsagePoint') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py index b789076dc..a794f6889 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py @@ -49,6 +49,7 @@ class V1ClusterSpec(object): 'available_accelerators': 'list[str]', 'aws_v1': 'V1AWSDirectV1', 'azure_v1': 'V1AzureDirectV1', + 'block_server_creation': 'bool', 'cloud_pricing_enabled': 'bool', 'cloudflare_v1': 'V1CloudflareV1', 'cluster_type': 'V1ClusterType', @@ -89,9 +90,7 @@ class V1ClusterSpec(object): 'thunder_cat_v1': 'V1ThunderCatDirectV1', 'unavailability_spikes_detection_enabled': 'bool', 'user_id': 'str', - 'vibe_coding_enabled': 'bool', - 'voltage_park_v1': 'V1VoltageParkDirectV1', - 'vultr_v1': 'V1VultrDirectV1' + 'vibe_coding_enabled': 'bool' } attribute_map = { @@ -99,6 +98,7 @@ class V1ClusterSpec(object): 'available_accelerators': 'availableAccelerators', 'aws_v1': 'awsV1', 'azure_v1': 'azureV1', + 'block_server_creation': 'blockServerCreation', 'cloud_pricing_enabled': 'cloudPricingEnabled', 'cloudflare_v1': 'cloudflareV1', 'cluster_type': 'clusterType', @@ -139,17 +139,16 @@ class V1ClusterSpec(object): 'thunder_cat_v1': 'thunderCatV1', 'unavailability_spikes_detection_enabled': 'unavailabilitySpikesDetectionEnabled', 'user_id': 'userId', - 'vibe_coding_enabled': 'vibeCodingEnabled', - 'voltage_park_v1': 'voltageParkV1', - 'vultr_v1': 'vultrV1' + 'vibe_coding_enabled': 'vibeCodingEnabled' } - def __init__(self, auth_token: 'str' =None, available_accelerators: 'list[str]' =None, aws_v1: 'V1AWSDirectV1' =None, azure_v1: 'V1AzureDirectV1' =None, cloud_pricing_enabled: 'bool' =None, cloudflare_v1: 'V1CloudflareV1' =None, cluster_type: 'V1ClusterType' =None, compute_cluster_ids: 'list[str]' =None, compute_cluster_request: 'V1ComputeClusterRequest' =None, cudo_v1: 'V1CudoDirectV1' =None, deletion_options: 'V1ClusterDeletionOptions' =None, desired_state: 'V1ClusterState' =None, domain: 'str' =None, driver: 'V1CloudProvider' =None, enforce_lightning_compute_on_demand_access: 'bool' =None, freeze_accelerators: 'bool' =None, google_cloud_v1: 'V1GoogleCloudDirectV1' =None, host_dns_enabled: 'bool' =None, insurer_disabled: 'bool' =None, kubernetes_v1: 'V1KubernetesDirectV1' =None, lambda_labs_v1: 'V1LambdaLabsDirectV1' =None, lightning_elastic_cluster_v1: 'V1LightningElasticClusterV1' =None, lock_overprovisioning: 'bool' =None, locked_zones: 'list[str]' =None, machine_v1: 'V1MachineDirectV1' =None, mithril_v1: 'V1MithrilDirectV1' =None, monitor_deletion_disabled: 'bool' =None, nebius_v1: 'V1NebiusDirectV1' =None, overprovisioning: 'list[V1InstanceOverprovisioningSpec]' =None, parent_cluster_id: 'str' =None, parent_cluster_type: 'str' =None, pause_automation: 'bool' =None, rafay_v1: 'V1RafayDirectV1' =None, reservation_details: 'V1ReservationDetails' =None, reserved_capacity_provider: 'bool' =None, reserved_instances_only: 'bool' =None, security_options: 'V1ClusterSecurityOptions' =None, slurm_v1: 'V1SlurmV1' =None, storage_retention_period_days: 'int' =None, tagging_options: 'V1ClusterTaggingOptions' =None, tensordock_v1: 'V1TensorDockDirectV1' =None, thunder_cat_v1: 'V1ThunderCatDirectV1' =None, unavailability_spikes_detection_enabled: 'bool' =None, user_id: 'str' =None, vibe_coding_enabled: 'bool' =None, voltage_park_v1: 'V1VoltageParkDirectV1' =None, vultr_v1: 'V1VultrDirectV1' =None): # noqa: E501 + def __init__(self, auth_token: 'str' =None, available_accelerators: 'list[str]' =None, aws_v1: 'V1AWSDirectV1' =None, azure_v1: 'V1AzureDirectV1' =None, block_server_creation: 'bool' =None, cloud_pricing_enabled: 'bool' =None, cloudflare_v1: 'V1CloudflareV1' =None, cluster_type: 'V1ClusterType' =None, compute_cluster_ids: 'list[str]' =None, compute_cluster_request: 'V1ComputeClusterRequest' =None, cudo_v1: 'V1CudoDirectV1' =None, deletion_options: 'V1ClusterDeletionOptions' =None, desired_state: 'V1ClusterState' =None, domain: 'str' =None, driver: 'V1CloudProvider' =None, enforce_lightning_compute_on_demand_access: 'bool' =None, freeze_accelerators: 'bool' =None, google_cloud_v1: 'V1GoogleCloudDirectV1' =None, host_dns_enabled: 'bool' =None, insurer_disabled: 'bool' =None, kubernetes_v1: 'V1KubernetesDirectV1' =None, lambda_labs_v1: 'V1LambdaLabsDirectV1' =None, lightning_elastic_cluster_v1: 'V1LightningElasticClusterV1' =None, lock_overprovisioning: 'bool' =None, locked_zones: 'list[str]' =None, machine_v1: 'V1MachineDirectV1' =None, mithril_v1: 'V1MithrilDirectV1' =None, monitor_deletion_disabled: 'bool' =None, nebius_v1: 'V1NebiusDirectV1' =None, overprovisioning: 'list[V1InstanceOverprovisioningSpec]' =None, parent_cluster_id: 'str' =None, parent_cluster_type: 'str' =None, pause_automation: 'bool' =None, rafay_v1: 'V1RafayDirectV1' =None, reservation_details: 'V1ReservationDetails' =None, reserved_capacity_provider: 'bool' =None, reserved_instances_only: 'bool' =None, security_options: 'V1ClusterSecurityOptions' =None, slurm_v1: 'V1SlurmV1' =None, storage_retention_period_days: 'int' =None, tagging_options: 'V1ClusterTaggingOptions' =None, tensordock_v1: 'V1TensorDockDirectV1' =None, thunder_cat_v1: 'V1ThunderCatDirectV1' =None, unavailability_spikes_detection_enabled: 'bool' =None, user_id: 'str' =None, vibe_coding_enabled: 'bool' =None): # noqa: E501 """V1ClusterSpec - a model defined in Swagger""" # noqa: E501 self._auth_token = None self._available_accelerators = None self._aws_v1 = None self._azure_v1 = None + self._block_server_creation = None self._cloud_pricing_enabled = None self._cloudflare_v1 = None self._cluster_type = None @@ -191,8 +190,6 @@ def __init__(self, auth_token: 'str' =None, available_accelerators: 'list[str]' self._unavailability_spikes_detection_enabled = None self._user_id = None self._vibe_coding_enabled = None - self._voltage_park_v1 = None - self._vultr_v1 = None self.discriminator = None if auth_token is not None: self.auth_token = auth_token @@ -202,6 +199,8 @@ def __init__(self, auth_token: 'str' =None, available_accelerators: 'list[str]' self.aws_v1 = aws_v1 if azure_v1 is not None: self.azure_v1 = azure_v1 + if block_server_creation is not None: + self.block_server_creation = block_server_creation if cloud_pricing_enabled is not None: self.cloud_pricing_enabled = cloud_pricing_enabled if cloudflare_v1 is not None: @@ -284,10 +283,6 @@ def __init__(self, auth_token: 'str' =None, available_accelerators: 'list[str]' self.user_id = user_id if vibe_coding_enabled is not None: self.vibe_coding_enabled = vibe_coding_enabled - if voltage_park_v1 is not None: - self.voltage_park_v1 = voltage_park_v1 - if vultr_v1 is not None: - self.vultr_v1 = vultr_v1 @property def auth_token(self) -> 'str': @@ -373,6 +368,29 @@ def azure_v1(self, azure_v1: 'V1AzureDirectV1'): self._azure_v1 = azure_v1 + @property + def block_server_creation(self) -> 'bool': + """Gets the block_server_creation of this V1ClusterSpec. # noqa: E501 + + Blocks server creation, allocation, and warm reuse for every user. # noqa: E501 + + :return: The block_server_creation of this V1ClusterSpec. # noqa: E501 + :rtype: bool + """ + return self._block_server_creation + + @block_server_creation.setter + def block_server_creation(self, block_server_creation: 'bool'): + """Sets the block_server_creation of this V1ClusterSpec. + + Blocks server creation, allocation, and warm reuse for every user. # noqa: E501 + + :param block_server_creation: The block_server_creation of this V1ClusterSpec. # noqa: E501 + :type: bool + """ + + self._block_server_creation = block_server_creation + @property def cloud_pricing_enabled(self) -> 'bool': """Gets the cloud_pricing_enabled of this V1ClusterSpec. # noqa: E501 @@ -1238,48 +1256,6 @@ def vibe_coding_enabled(self, vibe_coding_enabled: 'bool'): self._vibe_coding_enabled = vibe_coding_enabled - @property - def voltage_park_v1(self) -> 'V1VoltageParkDirectV1': - """Gets the voltage_park_v1 of this V1ClusterSpec. # noqa: E501 - - - :return: The voltage_park_v1 of this V1ClusterSpec. # noqa: E501 - :rtype: V1VoltageParkDirectV1 - """ - return self._voltage_park_v1 - - @voltage_park_v1.setter - def voltage_park_v1(self, voltage_park_v1: 'V1VoltageParkDirectV1'): - """Sets the voltage_park_v1 of this V1ClusterSpec. - - - :param voltage_park_v1: The voltage_park_v1 of this V1ClusterSpec. # noqa: E501 - :type: V1VoltageParkDirectV1 - """ - - self._voltage_park_v1 = voltage_park_v1 - - @property - def vultr_v1(self) -> 'V1VultrDirectV1': - """Gets the vultr_v1 of this V1ClusterSpec. # noqa: E501 - - - :return: The vultr_v1 of this V1ClusterSpec. # noqa: E501 - :rtype: V1VultrDirectV1 - """ - return self._vultr_v1 - - @vultr_v1.setter - def vultr_v1(self, vultr_v1: 'V1VultrDirectV1'): - """Sets the vultr_v1 of this V1ClusterSpec. - - - :param vultr_v1: The vultr_v1 of this V1ClusterSpec. # noqa: E501 - :type: V1VultrDirectV1 - """ - - self._vultr_v1 = vultr_v1 - def to_dict(self) -> dict: """Returns the model properties as a dict""" result = {} diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/lightningapp_instance_service_update_lightningapp_instance_release_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_model_weight.py similarity index 63% rename from python/lightning_sdk/lightning_cloud/openapi/models/lightningapp_instance_service_update_lightningapp_instance_release_body.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_model_weight.py index bb955941e..1190646a3 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/lightningapp_instance_service_update_lightningapp_instance_release_body.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_model_weight.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class LightningappInstanceServiceUpdateLightningappInstanceReleaseBody(object): +class V1CodingModelWeight(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -45,40 +45,66 @@ class LightningappInstanceServiceUpdateLightningappInstanceReleaseBody(object): and the value is json key in definition. """ swagger_types = { - 'release_id': 'str' + 'model': 'str', + 'weight': 'float' } attribute_map = { - 'release_id': 'releaseId' + 'model': 'model', + 'weight': 'weight' } - def __init__(self, release_id: 'str' =None): # noqa: E501 - """LightningappInstanceServiceUpdateLightningappInstanceReleaseBody - a model defined in Swagger""" # noqa: E501 - self._release_id = None + def __init__(self, model: 'str' =None, weight: 'float' =None): # noqa: E501 + """V1CodingModelWeight - a model defined in Swagger""" # noqa: E501 + self._model = None + self._weight = None self.discriminator = None - if release_id is not None: - self.release_id = release_id + if model is not None: + self.model = model + if weight is not None: + self.weight = weight @property - def release_id(self) -> 'str': - """Gets the release_id of this LightningappInstanceServiceUpdateLightningappInstanceReleaseBody. # noqa: E501 + def model(self) -> 'str': + """Gets the model of this V1CodingModelWeight. # noqa: E501 - :return: The release_id of this LightningappInstanceServiceUpdateLightningappInstanceReleaseBody. # noqa: E501 + :return: The model of this V1CodingModelWeight. # noqa: E501 :rtype: str """ - return self._release_id + return self._model - @release_id.setter - def release_id(self, release_id: 'str'): - """Sets the release_id of this LightningappInstanceServiceUpdateLightningappInstanceReleaseBody. + @model.setter + def model(self, model: 'str'): + """Sets the model of this V1CodingModelWeight. - :param release_id: The release_id of this LightningappInstanceServiceUpdateLightningappInstanceReleaseBody. # noqa: E501 + :param model: The model of this V1CodingModelWeight. # noqa: E501 :type: str """ - self._release_id = release_id + self._model = model + + @property + def weight(self) -> 'float': + """Gets the weight of this V1CodingModelWeight. # noqa: E501 + + + :return: The weight of this V1CodingModelWeight. # noqa: E501 + :rtype: float + """ + return self._weight + + @weight.setter + def weight(self, weight: 'float'): + """Sets the weight of this V1CodingModelWeight. + + + :param weight: The weight of this V1CodingModelWeight. # noqa: E501 + :type: float + """ + + self._weight = weight def to_dict(self) -> dict: """Returns the model properties as a dict""" @@ -101,7 +127,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(LightningappInstanceServiceUpdateLightningappInstanceReleaseBody, dict): + if issubclass(V1CodingModelWeight, dict): for key, value in self.items(): result[key] = value @@ -115,13 +141,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'LightningappInstanceServiceUpdateLightningappInstanceReleaseBody') -> bool: + def __eq__(self, other: 'V1CodingModelWeight') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, LightningappInstanceServiceUpdateLightningappInstanceReleaseBody): + if not isinstance(other, V1CodingModelWeight): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LightningappInstanceServiceUpdateLightningappInstanceReleaseBody') -> bool: + def __ne__(self, other: 'V1CodingModelWeight') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_plan_usage.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_plan_usage.py new file mode 100644 index 000000000..cd9f395e1 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_plan_usage.py @@ -0,0 +1,369 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1CodingPlanUsage(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'credit_balance': 'float', + 'enforced': 'bool', + 'monthly_allowance_credits': 'float', + 'org_id': 'str', + 'org_name': 'str', + 'personal': 'bool', + 'plan_name': 'str', + 'unlimited': 'bool', + 'usage_credits_enabled': 'bool', + 'windows': 'list[V1CodingUsageWindow]' + } + + attribute_map = { + 'credit_balance': 'creditBalance', + 'enforced': 'enforced', + 'monthly_allowance_credits': 'monthlyAllowanceCredits', + 'org_id': 'orgId', + 'org_name': 'orgName', + 'personal': 'personal', + 'plan_name': 'planName', + 'unlimited': 'unlimited', + 'usage_credits_enabled': 'usageCreditsEnabled', + 'windows': 'windows' + } + + def __init__(self, credit_balance: 'float' =None, enforced: 'bool' =None, monthly_allowance_credits: 'float' =None, org_id: 'str' =None, org_name: 'str' =None, personal: 'bool' =None, plan_name: 'str' =None, unlimited: 'bool' =None, usage_credits_enabled: 'bool' =None, windows: 'list[V1CodingUsageWindow]' =None): # noqa: E501 + """V1CodingPlanUsage - a model defined in Swagger""" # noqa: E501 + self._credit_balance = None + self._enforced = None + self._monthly_allowance_credits = None + self._org_id = None + self._org_name = None + self._personal = None + self._plan_name = None + self._unlimited = None + self._usage_credits_enabled = None + self._windows = None + self.discriminator = None + if credit_balance is not None: + self.credit_balance = credit_balance + if enforced is not None: + self.enforced = enforced + if monthly_allowance_credits is not None: + self.monthly_allowance_credits = monthly_allowance_credits + if org_id is not None: + self.org_id = org_id + if org_name is not None: + self.org_name = org_name + if personal is not None: + self.personal = personal + if plan_name is not None: + self.plan_name = plan_name + if unlimited is not None: + self.unlimited = unlimited + if usage_credits_enabled is not None: + self.usage_credits_enabled = usage_credits_enabled + if windows is not None: + self.windows = windows + + @property + def credit_balance(self) -> 'float': + """Gets the credit_balance of this V1CodingPlanUsage. # noqa: E501 + + Credits left in the wallet usage credits draw on. Set for the personal plan only. # noqa: E501 + + :return: The credit_balance of this V1CodingPlanUsage. # noqa: E501 + :rtype: float + """ + return self._credit_balance + + @credit_balance.setter + def credit_balance(self, credit_balance: 'float'): + """Sets the credit_balance of this V1CodingPlanUsage. + + Credits left in the wallet usage credits draw on. Set for the personal plan only. # noqa: E501 + + :param credit_balance: The credit_balance of this V1CodingPlanUsage. # noqa: E501 + :type: float + """ + + self._credit_balance = credit_balance + + @property + def enforced(self) -> 'bool': + """Gets the enforced of this V1CodingPlanUsage. # noqa: E501 + + False while usage is measured but requests are not yet limited. # noqa: E501 + + :return: The enforced of this V1CodingPlanUsage. # noqa: E501 + :rtype: bool + """ + return self._enforced + + @enforced.setter + def enforced(self, enforced: 'bool'): + """Sets the enforced of this V1CodingPlanUsage. + + False while usage is measured but requests are not yet limited. # noqa: E501 + + :param enforced: The enforced of this V1CodingPlanUsage. # noqa: E501 + :type: bool + """ + + self._enforced = enforced + + @property + def monthly_allowance_credits(self) -> 'float': + """Gets the monthly_allowance_credits of this V1CodingPlanUsage. # noqa: E501 + + Zero when the plan includes no coding allowance. # noqa: E501 + + :return: The monthly_allowance_credits of this V1CodingPlanUsage. # noqa: E501 + :rtype: float + """ + return self._monthly_allowance_credits + + @monthly_allowance_credits.setter + def monthly_allowance_credits(self, monthly_allowance_credits: 'float'): + """Sets the monthly_allowance_credits of this V1CodingPlanUsage. + + Zero when the plan includes no coding allowance. # noqa: E501 + + :param monthly_allowance_credits: The monthly_allowance_credits of this V1CodingPlanUsage. # noqa: E501 + :type: float + """ + + self._monthly_allowance_credits = monthly_allowance_credits + + @property + def org_id(self) -> 'str': + """Gets the org_id of this V1CodingPlanUsage. # noqa: E501 + + + :return: The org_id of this V1CodingPlanUsage. # noqa: E501 + :rtype: str + """ + return self._org_id + + @org_id.setter + def org_id(self, org_id: 'str'): + """Sets the org_id of this V1CodingPlanUsage. + + + :param org_id: The org_id of this V1CodingPlanUsage. # noqa: E501 + :type: str + """ + + self._org_id = org_id + + @property + def org_name(self) -> 'str': + """Gets the org_name of this V1CodingPlanUsage. # noqa: E501 + + + :return: The org_name of this V1CodingPlanUsage. # noqa: E501 + :rtype: str + """ + return self._org_name + + @org_name.setter + def org_name(self, org_name: 'str'): + """Sets the org_name of this V1CodingPlanUsage. + + + :param org_name: The org_name of this V1CodingPlanUsage. # noqa: E501 + :type: str + """ + + self._org_name = org_name + + @property + def personal(self) -> 'bool': + """Gets the personal of this V1CodingPlanUsage. # noqa: E501 + + + :return: The personal of this V1CodingPlanUsage. # noqa: E501 + :rtype: bool + """ + return self._personal + + @personal.setter + def personal(self, personal: 'bool'): + """Sets the personal of this V1CodingPlanUsage. + + + :param personal: The personal of this V1CodingPlanUsage. # noqa: E501 + :type: bool + """ + + self._personal = personal + + @property + def plan_name(self) -> 'str': + """Gets the plan_name of this V1CodingPlanUsage. # noqa: E501 + + + :return: The plan_name of this V1CodingPlanUsage. # noqa: E501 + :rtype: str + """ + return self._plan_name + + @plan_name.setter + def plan_name(self, plan_name: 'str'): + """Sets the plan_name of this V1CodingPlanUsage. + + + :param plan_name: The plan_name of this V1CodingPlanUsage. # noqa: E501 + :type: str + """ + + self._plan_name = plan_name + + @property + def unlimited(self) -> 'bool': + """Gets the unlimited of this V1CodingPlanUsage. # noqa: E501 + + + :return: The unlimited of this V1CodingPlanUsage. # noqa: E501 + :rtype: bool + """ + return self._unlimited + + @unlimited.setter + def unlimited(self, unlimited: 'bool'): + """Sets the unlimited of this V1CodingPlanUsage. + + + :param unlimited: The unlimited of this V1CodingPlanUsage. # noqa: E501 + :type: bool + """ + + self._unlimited = unlimited + + @property + def usage_credits_enabled(self) -> 'bool': + """Gets the usage_credits_enabled of this V1CodingPlanUsage. # noqa: E501 + + Keep serving from credits once a window is spent, instead of rejecting requests. # noqa: E501 + + :return: The usage_credits_enabled of this V1CodingPlanUsage. # noqa: E501 + :rtype: bool + """ + return self._usage_credits_enabled + + @usage_credits_enabled.setter + def usage_credits_enabled(self, usage_credits_enabled: 'bool'): + """Sets the usage_credits_enabled of this V1CodingPlanUsage. + + Keep serving from credits once a window is spent, instead of rejecting requests. # noqa: E501 + + :param usage_credits_enabled: The usage_credits_enabled of this V1CodingPlanUsage. # noqa: E501 + :type: bool + """ + + self._usage_credits_enabled = usage_credits_enabled + + @property + def windows(self) -> 'list[V1CodingUsageWindow]': + """Gets the windows of this V1CodingPlanUsage. # noqa: E501 + + + :return: The windows of this V1CodingPlanUsage. # noqa: E501 + :rtype: list[V1CodingUsageWindow] + """ + return self._windows + + @windows.setter + def windows(self, windows: 'list[V1CodingUsageWindow]'): + """Sets the windows of this V1CodingPlanUsage. + + + :param windows: The windows of this V1CodingPlanUsage. # noqa: E501 + :type: list[V1CodingUsageWindow] + """ + + self._windows = windows + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1CodingPlanUsage, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1CodingPlanUsage') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1CodingPlanUsage): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1CodingPlanUsage') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_plan_verdict.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_plan_verdict.py new file mode 100644 index 000000000..97fb4e9f2 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_plan_verdict.py @@ -0,0 +1,239 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1CodingPlanVerdict(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'blocked_until': 'datetime', + 'covered': 'bool', + 'included': 'bool', + 'usage_credits_enabled': 'bool', + 'windows': 'list[V1CodingUsageWindow]' + } + + attribute_map = { + 'blocked_until': 'blockedUntil', + 'covered': 'covered', + 'included': 'included', + 'usage_credits_enabled': 'usageCreditsEnabled', + 'windows': 'windows' + } + + def __init__(self, blocked_until: 'datetime' =None, covered: 'bool' =None, included: 'bool' =None, usage_credits_enabled: 'bool' =None, windows: 'list[V1CodingUsageWindow]' =None): # noqa: E501 + """V1CodingPlanVerdict - a model defined in Swagger""" # noqa: E501 + self._blocked_until = None + self._covered = None + self._included = None + self._usage_credits_enabled = None + self._windows = None + self.discriminator = None + if blocked_until is not None: + self.blocked_until = blocked_until + if covered is not None: + self.covered = covered + if included is not None: + self.included = included + if usage_credits_enabled is not None: + self.usage_credits_enabled = usage_credits_enabled + if windows is not None: + self.windows = windows + + @property + def blocked_until(self) -> 'datetime': + """Gets the blocked_until of this V1CodingPlanVerdict. # noqa: E501 + + When a window is spent, the time every spent window has reset. Unset while covered. # noqa: E501 + + :return: The blocked_until of this V1CodingPlanVerdict. # noqa: E501 + :rtype: datetime + """ + return self._blocked_until + + @blocked_until.setter + def blocked_until(self, blocked_until: 'datetime'): + """Sets the blocked_until of this V1CodingPlanVerdict. + + When a window is spent, the time every spent window has reset. Unset while covered. # noqa: E501 + + :param blocked_until: The blocked_until of this V1CodingPlanVerdict. # noqa: E501 + :type: datetime + """ + + self._blocked_until = blocked_until + + @property + def covered(self) -> 'bool': + """Gets the covered of this V1CodingPlanVerdict. # noqa: E501 + + Every window has room, so the next request is free whatever the balance. # noqa: E501 + + :return: The covered of this V1CodingPlanVerdict. # noqa: E501 + :rtype: bool + """ + return self._covered + + @covered.setter + def covered(self, covered: 'bool'): + """Sets the covered of this V1CodingPlanVerdict. + + Every window has room, so the next request is free whatever the balance. # noqa: E501 + + :param covered: The covered of this V1CodingPlanVerdict. # noqa: E501 + :type: bool + """ + + self._covered = covered + + @property + def included(self) -> 'bool': + """Gets the included of this V1CodingPlanVerdict. # noqa: E501 + + The plan includes coding usage. When false, requests are paid from credits as before. # noqa: E501 + + :return: The included of this V1CodingPlanVerdict. # noqa: E501 + :rtype: bool + """ + return self._included + + @included.setter + def included(self, included: 'bool'): + """Sets the included of this V1CodingPlanVerdict. + + The plan includes coding usage. When false, requests are paid from credits as before. # noqa: E501 + + :param included: The included of this V1CodingPlanVerdict. # noqa: E501 + :type: bool + """ + + self._included = included + + @property + def usage_credits_enabled(self) -> 'bool': + """Gets the usage_credits_enabled of this V1CodingPlanVerdict. # noqa: E501 + + With a window spent, requests go on and are paid from credits. # noqa: E501 + + :return: The usage_credits_enabled of this V1CodingPlanVerdict. # noqa: E501 + :rtype: bool + """ + return self._usage_credits_enabled + + @usage_credits_enabled.setter + def usage_credits_enabled(self, usage_credits_enabled: 'bool'): + """Sets the usage_credits_enabled of this V1CodingPlanVerdict. + + With a window spent, requests go on and are paid from credits. # noqa: E501 + + :param usage_credits_enabled: The usage_credits_enabled of this V1CodingPlanVerdict. # noqa: E501 + :type: bool + """ + + self._usage_credits_enabled = usage_credits_enabled + + @property + def windows(self) -> 'list[V1CodingUsageWindow]': + """Gets the windows of this V1CodingPlanVerdict. # noqa: E501 + + + :return: The windows of this V1CodingPlanVerdict. # noqa: E501 + :rtype: list[V1CodingUsageWindow] + """ + return self._windows + + @windows.setter + def windows(self, windows: 'list[V1CodingUsageWindow]'): + """Sets the windows of this V1CodingPlanVerdict. + + + :param windows: The windows of this V1CodingPlanVerdict. # noqa: E501 + :type: list[V1CodingUsageWindow] + """ + + self._windows = windows + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1CodingPlanVerdict, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1CodingPlanVerdict') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1CodingPlanVerdict): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1CodingPlanVerdict') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_usage_window.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_usage_window.py new file mode 100644 index 000000000..240e95070 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_usage_window.py @@ -0,0 +1,233 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1CodingUsageWindow(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'kind': 'V1CodingUsageWindowKind', + 'limit_credits': 'float', + 'resets_at': 'datetime', + 'started_at': 'datetime', + 'used_credits': 'float' + } + + attribute_map = { + 'kind': 'kind', + 'limit_credits': 'limitCredits', + 'resets_at': 'resetsAt', + 'started_at': 'startedAt', + 'used_credits': 'usedCredits' + } + + def __init__(self, kind: 'V1CodingUsageWindowKind' =None, limit_credits: 'float' =None, resets_at: 'datetime' =None, started_at: 'datetime' =None, used_credits: 'float' =None): # noqa: E501 + """V1CodingUsageWindow - a model defined in Swagger""" # noqa: E501 + self._kind = None + self._limit_credits = None + self._resets_at = None + self._started_at = None + self._used_credits = None + self.discriminator = None + if kind is not None: + self.kind = kind + if limit_credits is not None: + self.limit_credits = limit_credits + if resets_at is not None: + self.resets_at = resets_at + if started_at is not None: + self.started_at = started_at + if used_credits is not None: + self.used_credits = used_credits + + @property + def kind(self) -> 'V1CodingUsageWindowKind': + """Gets the kind of this V1CodingUsageWindow. # noqa: E501 + + + :return: The kind of this V1CodingUsageWindow. # noqa: E501 + :rtype: V1CodingUsageWindowKind + """ + return self._kind + + @kind.setter + def kind(self, kind: 'V1CodingUsageWindowKind'): + """Sets the kind of this V1CodingUsageWindow. + + + :param kind: The kind of this V1CodingUsageWindow. # noqa: E501 + :type: V1CodingUsageWindowKind + """ + + self._kind = kind + + @property + def limit_credits(self) -> 'float': + """Gets the limit_credits of this V1CodingUsageWindow. # noqa: E501 + + + :return: The limit_credits of this V1CodingUsageWindow. # noqa: E501 + :rtype: float + """ + return self._limit_credits + + @limit_credits.setter + def limit_credits(self, limit_credits: 'float'): + """Sets the limit_credits of this V1CodingUsageWindow. + + + :param limit_credits: The limit_credits of this V1CodingUsageWindow. # noqa: E501 + :type: float + """ + + self._limit_credits = limit_credits + + @property + def resets_at(self) -> 'datetime': + """Gets the resets_at of this V1CodingUsageWindow. # noqa: E501 + + + :return: The resets_at of this V1CodingUsageWindow. # noqa: E501 + :rtype: datetime + """ + return self._resets_at + + @resets_at.setter + def resets_at(self, resets_at: 'datetime'): + """Sets the resets_at of this V1CodingUsageWindow. + + + :param resets_at: The resets_at of this V1CodingUsageWindow. # noqa: E501 + :type: datetime + """ + + self._resets_at = resets_at + + @property + def started_at(self) -> 'datetime': + """Gets the started_at of this V1CodingUsageWindow. # noqa: E501 + + Unset until a request opens the window. # noqa: E501 + + :return: The started_at of this V1CodingUsageWindow. # noqa: E501 + :rtype: datetime + """ + return self._started_at + + @started_at.setter + def started_at(self, started_at: 'datetime'): + """Sets the started_at of this V1CodingUsageWindow. + + Unset until a request opens the window. # noqa: E501 + + :param started_at: The started_at of this V1CodingUsageWindow. # noqa: E501 + :type: datetime + """ + + self._started_at = started_at + + @property + def used_credits(self) -> 'float': + """Gets the used_credits of this V1CodingUsageWindow. # noqa: E501 + + + :return: The used_credits of this V1CodingUsageWindow. # noqa: E501 + :rtype: float + """ + return self._used_credits + + @used_credits.setter + def used_credits(self, used_credits: 'float'): + """Sets the used_credits of this V1CodingUsageWindow. + + + :param used_credits: The used_credits of this V1CodingUsageWindow. # noqa: E501 + :type: float + """ + + self._used_credits = used_credits + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1CodingUsageWindow, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1CodingUsageWindow') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1CodingUsageWindow): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1CodingUsageWindow') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_app_owner_type.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_usage_window_kind.py similarity index 83% rename from python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_app_owner_type.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_usage_window_kind.py index a52115a35..9d7c0091d 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_app_owner_type.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_coding_usage_window_kind.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class V1CloudSpaceAppOwnerType(object): +class V1CodingUsageWindowKind(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -41,10 +41,10 @@ class V1CloudSpaceAppOwnerType(object): """ allowed enum values """ - UNDEFINED = "CLOUD_SPACE_APP_OWNER_TYPE_UNDEFINED" - USER = "CLOUD_SPACE_APP_OWNER_TYPE_USER" - ORG = "CLOUD_SPACE_APP_OWNER_TYPE_ORG" - PROJECT = "CLOUD_SPACE_APP_OWNER_TYPE_PROJECT" + UNSPECIFIED = "CODING_USAGE_WINDOW_KIND_UNSPECIFIED" + FIVE_HOUR = "CODING_USAGE_WINDOW_KIND_FIVE_HOUR" + WEEKLY = "CODING_USAGE_WINDOW_KIND_WEEKLY" + MONTHLY = "CODING_USAGE_WINDOW_KIND_MONTHLY" """ Attributes: swagger_types (dict): The key is attribute name @@ -59,7 +59,7 @@ class V1CloudSpaceAppOwnerType(object): } def __init__(self): # noqa: E501 - """V1CloudSpaceAppOwnerType - a model defined in Swagger""" # noqa: E501 + """V1CodingUsageWindowKind - a model defined in Swagger""" # noqa: E501 self.discriminator = None def to_dict(self) -> dict: @@ -83,7 +83,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(V1CloudSpaceAppOwnerType, dict): + if issubclass(V1CodingUsageWindowKind, dict): for key, value in self.items(): result[key] = value @@ -97,13 +97,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'V1CloudSpaceAppOwnerType') -> bool: + def __eq__(self, other: 'V1CodingUsageWindowKind') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, V1CloudSpaceAppOwnerType): + if not isinstance(other, V1CodingUsageWindowKind): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'V1CloudSpaceAppOwnerType') -> bool: + def __ne__(self, other: 'V1CodingUsageWindowKind') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_api_key_request.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_api_key_request.py index 864101801..f7dbd3d47 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_api_key_request.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_api_key_request.py @@ -47,6 +47,7 @@ class V1CreateAPIKeyRequest(object): swagger_types = { 'budget_config': 'V1APIKeyBudget', 'description': 'str', + 'expires_at': 'datetime', 'name': 'str', 'org_id': 'str', 'project_id': 'str', @@ -58,6 +59,7 @@ class V1CreateAPIKeyRequest(object): attribute_map = { 'budget_config': 'budgetConfig', 'description': 'description', + 'expires_at': 'expiresAt', 'name': 'name', 'org_id': 'orgId', 'project_id': 'projectId', @@ -66,10 +68,11 @@ class V1CreateAPIKeyRequest(object): 'role': 'role' } - def __init__(self, budget_config: 'V1APIKeyBudget' =None, description: 'str' =None, name: 'str' =None, org_id: 'str' =None, project_id: 'str' =None, resource_id: 'str' =None, resource_type: 'str' =None, role: 'str' =None): # noqa: E501 + def __init__(self, budget_config: 'V1APIKeyBudget' =None, description: 'str' =None, expires_at: 'datetime' =None, name: 'str' =None, org_id: 'str' =None, project_id: 'str' =None, resource_id: 'str' =None, resource_type: 'str' =None, role: 'str' =None): # noqa: E501 """V1CreateAPIKeyRequest - a model defined in Swagger""" # noqa: E501 self._budget_config = None self._description = None + self._expires_at = None self._name = None self._org_id = None self._project_id = None @@ -81,6 +84,8 @@ def __init__(self, budget_config: 'V1APIKeyBudget' =None, description: 'str' =No self.budget_config = budget_config if description is not None: self.description = description + if expires_at is not None: + self.expires_at = expires_at if name is not None: self.name = name if org_id is not None: @@ -136,6 +141,27 @@ def description(self, description: 'str'): self._description = description + @property + def expires_at(self) -> 'datetime': + """Gets the expires_at of this V1CreateAPIKeyRequest. # noqa: E501 + + + :return: The expires_at of this V1CreateAPIKeyRequest. # noqa: E501 + :rtype: datetime + """ + return self._expires_at + + @expires_at.setter + def expires_at(self, expires_at: 'datetime'): + """Sets the expires_at of this V1CreateAPIKeyRequest. + + + :param expires_at: The expires_at of this V1CreateAPIKeyRequest. # noqa: E501 + :type: datetime + """ + + self._expires_at = expires_at + @property def name(self) -> 'str': """Gets the name of this V1CreateAPIKeyRequest. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_sandbox_request.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_sandbox_request.py index f7e061fef..5d5113c28 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_sandbox_request.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_sandbox_request.py @@ -47,6 +47,7 @@ class V1CreateSandboxRequest(object): swagger_types = { 'cloudspace_id': 'str', 'cluster_id': 'str', + 'docker_data_root_on_disk': 'bool', 'idle_timeout': 'str', 'image': 'str', 'image_secret_ref': 'str', @@ -71,6 +72,7 @@ class V1CreateSandboxRequest(object): attribute_map = { 'cloudspace_id': 'cloudspaceId', 'cluster_id': 'clusterId', + 'docker_data_root_on_disk': 'dockerDataRootOnDisk', 'idle_timeout': 'idleTimeout', 'image': 'image', 'image_secret_ref': 'imageSecretRef', @@ -92,10 +94,11 @@ class V1CreateSandboxRequest(object): 'warm': 'warm' } - def __init__(self, cloudspace_id: 'str' =None, cluster_id: 'str' =None, idle_timeout: 'str' =None, image: 'str' =None, image_secret_ref: 'str' =None, instance_type: 'str' =None, memory_snapshot_compatible: 'bool' =None, name: 'str' =None, network_policy: 'V1NetworkPolicy' =None, organization_id: 'str' =None, persistent: 'bool' =None, ports: 'list[str]' =None, project_id: 'str' =None, purpose: 'V1SandboxPurpose' =None, require_memory_restore: 'bool' =None, runtime: 'str' =None, snapshot_id: 'str' =None, spot: 'bool' =None, storage_gb: 'str' =None, timeout: 'str' =None, warm: 'V1SandboxWarmSpec' =None): # noqa: E501 + def __init__(self, cloudspace_id: 'str' =None, cluster_id: 'str' =None, docker_data_root_on_disk: 'bool' =None, idle_timeout: 'str' =None, image: 'str' =None, image_secret_ref: 'str' =None, instance_type: 'str' =None, memory_snapshot_compatible: 'bool' =None, name: 'str' =None, network_policy: 'V1NetworkPolicy' =None, organization_id: 'str' =None, persistent: 'bool' =None, ports: 'list[str]' =None, project_id: 'str' =None, purpose: 'V1SandboxPurpose' =None, require_memory_restore: 'bool' =None, runtime: 'str' =None, snapshot_id: 'str' =None, spot: 'bool' =None, storage_gb: 'str' =None, timeout: 'str' =None, warm: 'V1SandboxWarmSpec' =None): # noqa: E501 """V1CreateSandboxRequest - a model defined in Swagger""" # noqa: E501 self._cloudspace_id = None self._cluster_id = None + self._docker_data_root_on_disk = None self._idle_timeout = None self._image = None self._image_secret_ref = None @@ -120,6 +123,8 @@ def __init__(self, cloudspace_id: 'str' =None, cluster_id: 'str' =None, idle_tim self.cloudspace_id = cloudspace_id if cluster_id is not None: self.cluster_id = cluster_id + if docker_data_root_on_disk is not None: + self.docker_data_root_on_disk = docker_data_root_on_disk if idle_timeout is not None: self.idle_timeout = idle_timeout if image is not None: @@ -201,6 +206,27 @@ def cluster_id(self, cluster_id: 'str'): self._cluster_id = cluster_id + @property + def docker_data_root_on_disk(self) -> 'bool': + """Gets the docker_data_root_on_disk of this V1CreateSandboxRequest. # noqa: E501 + + + :return: The docker_data_root_on_disk of this V1CreateSandboxRequest. # noqa: E501 + :rtype: bool + """ + return self._docker_data_root_on_disk + + @docker_data_root_on_disk.setter + def docker_data_root_on_disk(self, docker_data_root_on_disk: 'bool'): + """Sets the docker_data_root_on_disk of this V1CreateSandboxRequest. + + + :param docker_data_root_on_disk: The docker_data_root_on_disk of this V1CreateSandboxRequest. # noqa: E501 + :type: bool + """ + + self._docker_data_root_on_disk = docker_data_root_on_disk + @property def idle_timeout(self) -> 'str': """Gets the idle_timeout of this V1CreateSandboxRequest. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_user_secret_request.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_user_secret_request.py index 99236c34c..cd85dfdb1 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_user_secret_request.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_user_secret_request.py @@ -46,21 +46,26 @@ class V1CreateUserSecretRequest(object): """ swagger_types = { 'name': 'str', + 'type': 'V1SecretType', 'value': 'str' } attribute_map = { 'name': 'name', + 'type': 'type', 'value': 'value' } - def __init__(self, name: 'str' =None, value: 'str' =None): # noqa: E501 + def __init__(self, name: 'str' =None, type: 'V1SecretType' =None, value: 'str' =None): # noqa: E501 """V1CreateUserSecretRequest - a model defined in Swagger""" # noqa: E501 self._name = None + self._type = None self._value = None self.discriminator = None if name is not None: self.name = name + if type is not None: + self.type = type if value is not None: self.value = value @@ -85,6 +90,27 @@ def name(self, name: 'str'): self._name = name + @property + def type(self) -> 'V1SecretType': + """Gets the type of this V1CreateUserSecretRequest. # noqa: E501 + + + :return: The type of this V1CreateUserSecretRequest. # noqa: E501 + :rtype: V1SecretType + """ + return self._type + + @type.setter + def type(self, type: 'V1SecretType'): + """Sets the type of this V1CreateUserSecretRequest. + + + :param type: The type of this V1CreateUserSecretRequest. # noqa: E501 + :type: V1SecretType + """ + + self._type = type + @property def value(self) -> 'str': """Gets the value of this V1CreateUserSecretRequest. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_delete_cloud_space_app_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_delete_published_model_response.py similarity index 87% rename from python/lightning_sdk/lightning_cloud/openapi/models/v1_delete_cloud_space_app_response.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_delete_published_model_response.py index a0ba0c41d..1a4a4cddf 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_delete_cloud_space_app_response.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_delete_published_model_response.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class V1DeleteCloudSpaceAppResponse(object): +class V1DeletePublishedModelResponse(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -51,7 +51,7 @@ class V1DeleteCloudSpaceAppResponse(object): } def __init__(self): # noqa: E501 - """V1DeleteCloudSpaceAppResponse - a model defined in Swagger""" # noqa: E501 + """V1DeletePublishedModelResponse - a model defined in Swagger""" # noqa: E501 self.discriminator = None def to_dict(self) -> dict: @@ -75,7 +75,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(V1DeleteCloudSpaceAppResponse, dict): + if issubclass(V1DeletePublishedModelResponse, dict): for key, value in self.items(): result[key] = value @@ -89,13 +89,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'V1DeleteCloudSpaceAppResponse') -> bool: + def __eq__(self, other: 'V1DeletePublishedModelResponse') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, V1DeleteCloudSpaceAppResponse): + if not isinstance(other, V1DeletePublishedModelResponse): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'V1DeleteCloudSpaceAppResponse') -> bool: + def __ne__(self, other: 'V1DeletePublishedModelResponse') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py index 47fae45dc..5b93cf027 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py @@ -79,9 +79,7 @@ class V1ExternalClusterSpec(object): 'slurm_v1': 'V1SlurmV1', 'tagging_options': 'V1ClusterTaggingOptions', 'thunder_cat_v1': 'V1ThunderCatDirectV1', - 'user_id': 'str', - 'voltage_park_v1': 'V1VoltageParkDirectV1', - 'vultr_v1': 'V1VultrDirectV1' + 'user_id': 'str' } attribute_map = { @@ -119,12 +117,10 @@ class V1ExternalClusterSpec(object): 'slurm_v1': 'slurmV1', 'tagging_options': 'taggingOptions', 'thunder_cat_v1': 'thunderCatV1', - 'user_id': 'userId', - 'voltage_park_v1': 'voltageParkV1', - 'vultr_v1': 'vultrV1' + 'user_id': 'userId' } - def __init__(self, auth_token: 'str' =None, available_accelerators: 'list[str]' =None, aws_v1: 'V1AWSDirectV1' =None, azure_v1: 'V1AzureDirectV1' =None, cloudflare_v1: 'V1CloudflareV1' =None, cluster_type: 'V1ClusterType' =None, compute_cluster_ids: 'list[str]' =None, compute_cluster_request: 'V1ComputeClusterRequest' =None, cudo_v1: 'V1CudoDirectV1' =None, deletion_options: 'V1ClusterDeletionOptions' =None, desired_state: 'V1ClusterState' =None, domain: 'str' =None, driver: 'V1CloudProvider' =None, google_cloud_v1: 'V1GoogleCloudDirectV1' =None, kubernetes_v1: 'V1KubernetesDirectV1' =None, lambda_labs_v1: 'V1LambdaLabsDirectV1' =None, lightning_elastic_cluster_v1: 'V1LightningElasticClusterV1' =None, locked_zones: 'list[str]' =None, machine_v1: 'V1MachineDirectV1' =None, mithril_v1: 'V1MithrilDirectV1' =None, monitor_deletion_disabled: 'bool' =None, nebius_v1: 'V1NebiusDirectV1' =None, overprovisioning: 'list[V1InstanceOverprovisioningSpec]' =None, parent_cluster_id: 'str' =None, parent_cluster_type: 'str' =None, pause_automation: 'bool' =None, rafay_v1: 'V1RafayDirectV1' =None, reservation_details: 'V1ReservationDetails' =None, reserved_capacity_provider: 'bool' =None, reserved_instances_only: 'bool' =None, security_options: 'V1ClusterSecurityOptions' =None, slurm_v1: 'V1SlurmV1' =None, tagging_options: 'V1ClusterTaggingOptions' =None, thunder_cat_v1: 'V1ThunderCatDirectV1' =None, user_id: 'str' =None, voltage_park_v1: 'V1VoltageParkDirectV1' =None, vultr_v1: 'V1VultrDirectV1' =None): # noqa: E501 + def __init__(self, auth_token: 'str' =None, available_accelerators: 'list[str]' =None, aws_v1: 'V1AWSDirectV1' =None, azure_v1: 'V1AzureDirectV1' =None, cloudflare_v1: 'V1CloudflareV1' =None, cluster_type: 'V1ClusterType' =None, compute_cluster_ids: 'list[str]' =None, compute_cluster_request: 'V1ComputeClusterRequest' =None, cudo_v1: 'V1CudoDirectV1' =None, deletion_options: 'V1ClusterDeletionOptions' =None, desired_state: 'V1ClusterState' =None, domain: 'str' =None, driver: 'V1CloudProvider' =None, google_cloud_v1: 'V1GoogleCloudDirectV1' =None, kubernetes_v1: 'V1KubernetesDirectV1' =None, lambda_labs_v1: 'V1LambdaLabsDirectV1' =None, lightning_elastic_cluster_v1: 'V1LightningElasticClusterV1' =None, locked_zones: 'list[str]' =None, machine_v1: 'V1MachineDirectV1' =None, mithril_v1: 'V1MithrilDirectV1' =None, monitor_deletion_disabled: 'bool' =None, nebius_v1: 'V1NebiusDirectV1' =None, overprovisioning: 'list[V1InstanceOverprovisioningSpec]' =None, parent_cluster_id: 'str' =None, parent_cluster_type: 'str' =None, pause_automation: 'bool' =None, rafay_v1: 'V1RafayDirectV1' =None, reservation_details: 'V1ReservationDetails' =None, reserved_capacity_provider: 'bool' =None, reserved_instances_only: 'bool' =None, security_options: 'V1ClusterSecurityOptions' =None, slurm_v1: 'V1SlurmV1' =None, tagging_options: 'V1ClusterTaggingOptions' =None, thunder_cat_v1: 'V1ThunderCatDirectV1' =None, user_id: 'str' =None): # noqa: E501 """V1ExternalClusterSpec - a model defined in Swagger""" # noqa: E501 self._auth_token = None self._available_accelerators = None @@ -161,8 +157,6 @@ def __init__(self, auth_token: 'str' =None, available_accelerators: 'list[str]' self._tagging_options = None self._thunder_cat_v1 = None self._user_id = None - self._voltage_park_v1 = None - self._vultr_v1 = None self.discriminator = None if auth_token is not None: self.auth_token = auth_token @@ -234,10 +228,6 @@ def __init__(self, auth_token: 'str' =None, available_accelerators: 'list[str]' self.thunder_cat_v1 = thunder_cat_v1 if user_id is not None: self.user_id = user_id - if voltage_park_v1 is not None: - self.voltage_park_v1 = voltage_park_v1 - if vultr_v1 is not None: - self.vultr_v1 = vultr_v1 @property def auth_token(self) -> 'str': @@ -976,48 +966,6 @@ def user_id(self, user_id: 'str'): self._user_id = user_id - @property - def voltage_park_v1(self) -> 'V1VoltageParkDirectV1': - """Gets the voltage_park_v1 of this V1ExternalClusterSpec. # noqa: E501 - - - :return: The voltage_park_v1 of this V1ExternalClusterSpec. # noqa: E501 - :rtype: V1VoltageParkDirectV1 - """ - return self._voltage_park_v1 - - @voltage_park_v1.setter - def voltage_park_v1(self, voltage_park_v1: 'V1VoltageParkDirectV1'): - """Sets the voltage_park_v1 of this V1ExternalClusterSpec. - - - :param voltage_park_v1: The voltage_park_v1 of this V1ExternalClusterSpec. # noqa: E501 - :type: V1VoltageParkDirectV1 - """ - - self._voltage_park_v1 = voltage_park_v1 - - @property - def vultr_v1(self) -> 'V1VultrDirectV1': - """Gets the vultr_v1 of this V1ExternalClusterSpec. # noqa: E501 - - - :return: The vultr_v1 of this V1ExternalClusterSpec. # noqa: E501 - :rtype: V1VultrDirectV1 - """ - return self._vultr_v1 - - @vultr_v1.setter - def vultr_v1(self, vultr_v1: 'V1VultrDirectV1'): - """Sets the vultr_v1 of this V1ExternalClusterSpec. - - - :param vultr_v1: The vultr_v1 of this V1ExternalClusterSpec. # noqa: E501 - :type: V1VultrDirectV1 - """ - - self._vultr_v1 = vultr_v1 - def to_dict(self) -> dict: """Returns the model properties as a dict""" result = {} diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_firmware_entry.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_firmware_entry.py new file mode 100644 index 000000000..8bb744a75 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_firmware_entry.py @@ -0,0 +1,257 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1FirmwareEntry(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'manufacturer': 'str', + 'model': 'str', + 'name': 'str', + 'source': 'str', + 'version': 'str' + } + + attribute_map = { + 'id': 'id', + 'manufacturer': 'manufacturer', + 'model': 'model', + 'name': 'name', + 'source': 'source', + 'version': 'version' + } + + def __init__(self, id: 'str' =None, manufacturer: 'str' =None, model: 'str' =None, name: 'str' =None, source: 'str' =None, version: 'str' =None): # noqa: E501 + """V1FirmwareEntry - a model defined in Swagger""" # noqa: E501 + self._id = None + self._manufacturer = None + self._model = None + self._name = None + self._source = None + self._version = None + self.discriminator = None + if id is not None: + self.id = id + if manufacturer is not None: + self.manufacturer = manufacturer + if model is not None: + self.model = model + if name is not None: + self.name = name + if source is not None: + self.source = source + if version is not None: + self.version = version + + @property + def id(self) -> 'str': + """Gets the id of this V1FirmwareEntry. # noqa: E501 + + + :return: The id of this V1FirmwareEntry. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id: 'str'): + """Sets the id of this V1FirmwareEntry. + + + :param id: The id of this V1FirmwareEntry. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def manufacturer(self) -> 'str': + """Gets the manufacturer of this V1FirmwareEntry. # noqa: E501 + + + :return: The manufacturer of this V1FirmwareEntry. # noqa: E501 + :rtype: str + """ + return self._manufacturer + + @manufacturer.setter + def manufacturer(self, manufacturer: 'str'): + """Sets the manufacturer of this V1FirmwareEntry. + + + :param manufacturer: The manufacturer of this V1FirmwareEntry. # noqa: E501 + :type: str + """ + + self._manufacturer = manufacturer + + @property + def model(self) -> 'str': + """Gets the model of this V1FirmwareEntry. # noqa: E501 + + + :return: The model of this V1FirmwareEntry. # noqa: E501 + :rtype: str + """ + return self._model + + @model.setter + def model(self, model: 'str'): + """Sets the model of this V1FirmwareEntry. + + + :param model: The model of this V1FirmwareEntry. # noqa: E501 + :type: str + """ + + self._model = model + + @property + def name(self) -> 'str': + """Gets the name of this V1FirmwareEntry. # noqa: E501 + + + :return: The name of this V1FirmwareEntry. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name: 'str'): + """Sets the name of this V1FirmwareEntry. + + + :param name: The name of this V1FirmwareEntry. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def source(self) -> 'str': + """Gets the source of this V1FirmwareEntry. # noqa: E501 + + + :return: The source of this V1FirmwareEntry. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source: 'str'): + """Sets the source of this V1FirmwareEntry. + + + :param source: The source of this V1FirmwareEntry. # noqa: E501 + :type: str + """ + + self._source = source + + @property + def version(self) -> 'str': + """Gets the version of this V1FirmwareEntry. # noqa: E501 + + + :return: The version of this V1FirmwareEntry. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version: 'str'): + """Sets the version of this V1FirmwareEntry. + + + :param version: The version of this V1FirmwareEntry. # noqa: E501 + :type: str + """ + + self._version = version + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1FirmwareEntry, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1FirmwareEntry') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1FirmwareEntry): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1FirmwareEntry') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_firmware_inventory.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_firmware_inventory.py new file mode 100644 index 000000000..9f8eea59c --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_firmware_inventory.py @@ -0,0 +1,231 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1FirmwareInventory(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'components': 'list[V1FirmwareEntry]', + 'hardware_state': 'str', + 'nvme_state': 'str', + 'pex_state': 'str', + 'racadm_state': 'str' + } + + attribute_map = { + 'components': 'components', + 'hardware_state': 'hardwareState', + 'nvme_state': 'nvmeState', + 'pex_state': 'pexState', + 'racadm_state': 'racadmState' + } + + def __init__(self, components: 'list[V1FirmwareEntry]' =None, hardware_state: 'str' =None, nvme_state: 'str' =None, pex_state: 'str' =None, racadm_state: 'str' =None): # noqa: E501 + """V1FirmwareInventory - a model defined in Swagger""" # noqa: E501 + self._components = None + self._hardware_state = None + self._nvme_state = None + self._pex_state = None + self._racadm_state = None + self.discriminator = None + if components is not None: + self.components = components + if hardware_state is not None: + self.hardware_state = hardware_state + if nvme_state is not None: + self.nvme_state = nvme_state + if pex_state is not None: + self.pex_state = pex_state + if racadm_state is not None: + self.racadm_state = racadm_state + + @property + def components(self) -> 'list[V1FirmwareEntry]': + """Gets the components of this V1FirmwareInventory. # noqa: E501 + + + :return: The components of this V1FirmwareInventory. # noqa: E501 + :rtype: list[V1FirmwareEntry] + """ + return self._components + + @components.setter + def components(self, components: 'list[V1FirmwareEntry]'): + """Sets the components of this V1FirmwareInventory. + + + :param components: The components of this V1FirmwareInventory. # noqa: E501 + :type: list[V1FirmwareEntry] + """ + + self._components = components + + @property + def hardware_state(self) -> 'str': + """Gets the hardware_state of this V1FirmwareInventory. # noqa: E501 + + + :return: The hardware_state of this V1FirmwareInventory. # noqa: E501 + :rtype: str + """ + return self._hardware_state + + @hardware_state.setter + def hardware_state(self, hardware_state: 'str'): + """Sets the hardware_state of this V1FirmwareInventory. + + + :param hardware_state: The hardware_state of this V1FirmwareInventory. # noqa: E501 + :type: str + """ + + self._hardware_state = hardware_state + + @property + def nvme_state(self) -> 'str': + """Gets the nvme_state of this V1FirmwareInventory. # noqa: E501 + + + :return: The nvme_state of this V1FirmwareInventory. # noqa: E501 + :rtype: str + """ + return self._nvme_state + + @nvme_state.setter + def nvme_state(self, nvme_state: 'str'): + """Sets the nvme_state of this V1FirmwareInventory. + + + :param nvme_state: The nvme_state of this V1FirmwareInventory. # noqa: E501 + :type: str + """ + + self._nvme_state = nvme_state + + @property + def pex_state(self) -> 'str': + """Gets the pex_state of this V1FirmwareInventory. # noqa: E501 + + + :return: The pex_state of this V1FirmwareInventory. # noqa: E501 + :rtype: str + """ + return self._pex_state + + @pex_state.setter + def pex_state(self, pex_state: 'str'): + """Sets the pex_state of this V1FirmwareInventory. + + + :param pex_state: The pex_state of this V1FirmwareInventory. # noqa: E501 + :type: str + """ + + self._pex_state = pex_state + + @property + def racadm_state(self) -> 'str': + """Gets the racadm_state of this V1FirmwareInventory. # noqa: E501 + + + :return: The racadm_state of this V1FirmwareInventory. # noqa: E501 + :rtype: str + """ + return self._racadm_state + + @racadm_state.setter + def racadm_state(self, racadm_state: 'str'): + """Sets the racadm_state of this V1FirmwareInventory. + + + :param racadm_state: The racadm_state of this V1FirmwareInventory. # noqa: E501 + :type: str + """ + + self._racadm_state = racadm_state + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1FirmwareInventory, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1FirmwareInventory') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1FirmwareInventory): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1FirmwareInventory') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_gallery_app.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_gallery_app.py deleted file mode 100644 index da3eef6b9..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_gallery_app.py +++ /dev/null @@ -1,881 +0,0 @@ -# coding: utf-8 -# This file is vendored. -# Do not edit it directly; changes will be overwritten. -# Make changes in the internal upstream repository instead. - - -""" - external/v1/auth_service.proto - - No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - - OpenAPI spec version: version not set - - Generated by: https://github.com/swagger-api/swagger-codegen.git - - NOTE - ---- - standard swagger-codegen-cli for this python client has been modified - by custom templates. The purpose of these templates is to include - typing information in the API and Model code. Please refer to the - main grid repository for more info -""" - -import pprint -import re # noqa: F401 - -from typing import TYPE_CHECKING - -import six - -if TYPE_CHECKING: - from datetime import datetime - from lightning_sdk.lightning_cloud.openapi.models import * - -class V1GalleryApp(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'app_entrypoint_file': 'str', - 'authors': 'list[str]', - 'auto_start': 'bool', - 'can_download_source_code': 'bool', - 'can_run': 'bool', - 'categories': 'list[str]', - 'components': 'list[str]', - 'description': 'str', - 'display_name': 'str', - 'example_code': 'str', - 'flow_servers': 'list[V1Flowserver]', - 'git_url': 'str', - 'id': 'str', - 'installation_code': 'str', - 'license': 'str', - 'name': 'str', - 'open_url': 'str', - 'org_logo': 'str', - 'organization': 'str', - 'requirements_path': 'str', - 'short_description': 'str', - 'source_url': 'str', - 'tags': 'list[str]', - 'target_admin_tab': 'str', - 'template_tags': 'list[str]', - 'thumbnail': 'str', - 'version': 'str', - 'video': 'str', - 'visibility': 'str', - 'works': 'list[V1Work]' - } - - attribute_map = { - 'app_entrypoint_file': 'appEntrypointFile', - 'authors': 'authors', - 'auto_start': 'autoStart', - 'can_download_source_code': 'canDownloadSourceCode', - 'can_run': 'canRun', - 'categories': 'categories', - 'components': 'components', - 'description': 'description', - 'display_name': 'displayName', - 'example_code': 'exampleCode', - 'flow_servers': 'flowServers', - 'git_url': 'gitUrl', - 'id': 'id', - 'installation_code': 'installationCode', - 'license': 'license', - 'name': 'name', - 'open_url': 'openUrl', - 'org_logo': 'orgLogo', - 'organization': 'organization', - 'requirements_path': 'requirementsPath', - 'short_description': 'shortDescription', - 'source_url': 'sourceUrl', - 'tags': 'tags', - 'target_admin_tab': 'targetAdminTab', - 'template_tags': 'templateTags', - 'thumbnail': 'thumbnail', - 'version': 'version', - 'video': 'video', - 'visibility': 'visibility', - 'works': 'works' - } - - def __init__(self, app_entrypoint_file: 'str' =None, authors: 'list[str]' =None, auto_start: 'bool' =None, can_download_source_code: 'bool' =None, can_run: 'bool' =None, categories: 'list[str]' =None, components: 'list[str]' =None, description: 'str' =None, display_name: 'str' =None, example_code: 'str' =None, flow_servers: 'list[V1Flowserver]' =None, git_url: 'str' =None, id: 'str' =None, installation_code: 'str' =None, license: 'str' =None, name: 'str' =None, open_url: 'str' =None, org_logo: 'str' =None, organization: 'str' =None, requirements_path: 'str' =None, short_description: 'str' =None, source_url: 'str' =None, tags: 'list[str]' =None, target_admin_tab: 'str' =None, template_tags: 'list[str]' =None, thumbnail: 'str' =None, version: 'str' =None, video: 'str' =None, visibility: 'str' =None, works: 'list[V1Work]' =None): # noqa: E501 - """V1GalleryApp - a model defined in Swagger""" # noqa: E501 - self._app_entrypoint_file = None - self._authors = None - self._auto_start = None - self._can_download_source_code = None - self._can_run = None - self._categories = None - self._components = None - self._description = None - self._display_name = None - self._example_code = None - self._flow_servers = None - self._git_url = None - self._id = None - self._installation_code = None - self._license = None - self._name = None - self._open_url = None - self._org_logo = None - self._organization = None - self._requirements_path = None - self._short_description = None - self._source_url = None - self._tags = None - self._target_admin_tab = None - self._template_tags = None - self._thumbnail = None - self._version = None - self._video = None - self._visibility = None - self._works = None - self.discriminator = None - if app_entrypoint_file is not None: - self.app_entrypoint_file = app_entrypoint_file - if authors is not None: - self.authors = authors - if auto_start is not None: - self.auto_start = auto_start - if can_download_source_code is not None: - self.can_download_source_code = can_download_source_code - if can_run is not None: - self.can_run = can_run - if categories is not None: - self.categories = categories - if components is not None: - self.components = components - if description is not None: - self.description = description - if display_name is not None: - self.display_name = display_name - if example_code is not None: - self.example_code = example_code - if flow_servers is not None: - self.flow_servers = flow_servers - if git_url is not None: - self.git_url = git_url - if id is not None: - self.id = id - if installation_code is not None: - self.installation_code = installation_code - if license is not None: - self.license = license - if name is not None: - self.name = name - if open_url is not None: - self.open_url = open_url - if org_logo is not None: - self.org_logo = org_logo - if organization is not None: - self.organization = organization - if requirements_path is not None: - self.requirements_path = requirements_path - if short_description is not None: - self.short_description = short_description - if source_url is not None: - self.source_url = source_url - if tags is not None: - self.tags = tags - if target_admin_tab is not None: - self.target_admin_tab = target_admin_tab - if template_tags is not None: - self.template_tags = template_tags - if thumbnail is not None: - self.thumbnail = thumbnail - if version is not None: - self.version = version - if video is not None: - self.video = video - if visibility is not None: - self.visibility = visibility - if works is not None: - self.works = works - - @property - def app_entrypoint_file(self) -> 'str': - """Gets the app_entrypoint_file of this V1GalleryApp. # noqa: E501 - - - :return: The app_entrypoint_file of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._app_entrypoint_file - - @app_entrypoint_file.setter - def app_entrypoint_file(self, app_entrypoint_file: 'str'): - """Sets the app_entrypoint_file of this V1GalleryApp. - - - :param app_entrypoint_file: The app_entrypoint_file of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._app_entrypoint_file = app_entrypoint_file - - @property - def authors(self) -> 'list[str]': - """Gets the authors of this V1GalleryApp. # noqa: E501 - - - :return: The authors of this V1GalleryApp. # noqa: E501 - :rtype: list[str] - """ - return self._authors - - @authors.setter - def authors(self, authors: 'list[str]'): - """Sets the authors of this V1GalleryApp. - - - :param authors: The authors of this V1GalleryApp. # noqa: E501 - :type: list[str] - """ - - self._authors = authors - - @property - def auto_start(self) -> 'bool': - """Gets the auto_start of this V1GalleryApp. # noqa: E501 - - - :return: The auto_start of this V1GalleryApp. # noqa: E501 - :rtype: bool - """ - return self._auto_start - - @auto_start.setter - def auto_start(self, auto_start: 'bool'): - """Sets the auto_start of this V1GalleryApp. - - - :param auto_start: The auto_start of this V1GalleryApp. # noqa: E501 - :type: bool - """ - - self._auto_start = auto_start - - @property - def can_download_source_code(self) -> 'bool': - """Gets the can_download_source_code of this V1GalleryApp. # noqa: E501 - - - :return: The can_download_source_code of this V1GalleryApp. # noqa: E501 - :rtype: bool - """ - return self._can_download_source_code - - @can_download_source_code.setter - def can_download_source_code(self, can_download_source_code: 'bool'): - """Sets the can_download_source_code of this V1GalleryApp. - - - :param can_download_source_code: The can_download_source_code of this V1GalleryApp. # noqa: E501 - :type: bool - """ - - self._can_download_source_code = can_download_source_code - - @property - def can_run(self) -> 'bool': - """Gets the can_run of this V1GalleryApp. # noqa: E501 - - - :return: The can_run of this V1GalleryApp. # noqa: E501 - :rtype: bool - """ - return self._can_run - - @can_run.setter - def can_run(self, can_run: 'bool'): - """Sets the can_run of this V1GalleryApp. - - - :param can_run: The can_run of this V1GalleryApp. # noqa: E501 - :type: bool - """ - - self._can_run = can_run - - @property - def categories(self) -> 'list[str]': - """Gets the categories of this V1GalleryApp. # noqa: E501 - - - :return: The categories of this V1GalleryApp. # noqa: E501 - :rtype: list[str] - """ - return self._categories - - @categories.setter - def categories(self, categories: 'list[str]'): - """Sets the categories of this V1GalleryApp. - - - :param categories: The categories of this V1GalleryApp. # noqa: E501 - :type: list[str] - """ - - self._categories = categories - - @property - def components(self) -> 'list[str]': - """Gets the components of this V1GalleryApp. # noqa: E501 - - - :return: The components of this V1GalleryApp. # noqa: E501 - :rtype: list[str] - """ - return self._components - - @components.setter - def components(self, components: 'list[str]'): - """Sets the components of this V1GalleryApp. - - - :param components: The components of this V1GalleryApp. # noqa: E501 - :type: list[str] - """ - - self._components = components - - @property - def description(self) -> 'str': - """Gets the description of this V1GalleryApp. # noqa: E501 - - - :return: The description of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description: 'str'): - """Sets the description of this V1GalleryApp. - - - :param description: The description of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def display_name(self) -> 'str': - """Gets the display_name of this V1GalleryApp. # noqa: E501 - - - :return: The display_name of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._display_name - - @display_name.setter - def display_name(self, display_name: 'str'): - """Sets the display_name of this V1GalleryApp. - - - :param display_name: The display_name of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._display_name = display_name - - @property - def example_code(self) -> 'str': - """Gets the example_code of this V1GalleryApp. # noqa: E501 - - - :return: The example_code of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._example_code - - @example_code.setter - def example_code(self, example_code: 'str'): - """Sets the example_code of this V1GalleryApp. - - - :param example_code: The example_code of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._example_code = example_code - - @property - def flow_servers(self) -> 'list[V1Flowserver]': - """Gets the flow_servers of this V1GalleryApp. # noqa: E501 - - - :return: The flow_servers of this V1GalleryApp. # noqa: E501 - :rtype: list[V1Flowserver] - """ - return self._flow_servers - - @flow_servers.setter - def flow_servers(self, flow_servers: 'list[V1Flowserver]'): - """Sets the flow_servers of this V1GalleryApp. - - - :param flow_servers: The flow_servers of this V1GalleryApp. # noqa: E501 - :type: list[V1Flowserver] - """ - - self._flow_servers = flow_servers - - @property - def git_url(self) -> 'str': - """Gets the git_url of this V1GalleryApp. # noqa: E501 - - - :return: The git_url of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._git_url - - @git_url.setter - def git_url(self, git_url: 'str'): - """Sets the git_url of this V1GalleryApp. - - - :param git_url: The git_url of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._git_url = git_url - - @property - def id(self) -> 'str': - """Gets the id of this V1GalleryApp. # noqa: E501 - - - :return: The id of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id: 'str'): - """Sets the id of this V1GalleryApp. - - - :param id: The id of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def installation_code(self) -> 'str': - """Gets the installation_code of this V1GalleryApp. # noqa: E501 - - - :return: The installation_code of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._installation_code - - @installation_code.setter - def installation_code(self, installation_code: 'str'): - """Sets the installation_code of this V1GalleryApp. - - - :param installation_code: The installation_code of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._installation_code = installation_code - - @property - def license(self) -> 'str': - """Gets the license of this V1GalleryApp. # noqa: E501 - - - :return: The license of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._license - - @license.setter - def license(self, license: 'str'): - """Sets the license of this V1GalleryApp. - - - :param license: The license of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._license = license - - @property - def name(self) -> 'str': - """Gets the name of this V1GalleryApp. # noqa: E501 - - - :return: The name of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name: 'str'): - """Sets the name of this V1GalleryApp. - - - :param name: The name of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def open_url(self) -> 'str': - """Gets the open_url of this V1GalleryApp. # noqa: E501 - - - :return: The open_url of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._open_url - - @open_url.setter - def open_url(self, open_url: 'str'): - """Sets the open_url of this V1GalleryApp. - - - :param open_url: The open_url of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._open_url = open_url - - @property - def org_logo(self) -> 'str': - """Gets the org_logo of this V1GalleryApp. # noqa: E501 - - - :return: The org_logo of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._org_logo - - @org_logo.setter - def org_logo(self, org_logo: 'str'): - """Sets the org_logo of this V1GalleryApp. - - - :param org_logo: The org_logo of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._org_logo = org_logo - - @property - def organization(self) -> 'str': - """Gets the organization of this V1GalleryApp. # noqa: E501 - - - :return: The organization of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._organization - - @organization.setter - def organization(self, organization: 'str'): - """Sets the organization of this V1GalleryApp. - - - :param organization: The organization of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._organization = organization - - @property - def requirements_path(self) -> 'str': - """Gets the requirements_path of this V1GalleryApp. # noqa: E501 - - - :return: The requirements_path of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._requirements_path - - @requirements_path.setter - def requirements_path(self, requirements_path: 'str'): - """Sets the requirements_path of this V1GalleryApp. - - - :param requirements_path: The requirements_path of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._requirements_path = requirements_path - - @property - def short_description(self) -> 'str': - """Gets the short_description of this V1GalleryApp. # noqa: E501 - - - :return: The short_description of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._short_description - - @short_description.setter - def short_description(self, short_description: 'str'): - """Sets the short_description of this V1GalleryApp. - - - :param short_description: The short_description of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._short_description = short_description - - @property - def source_url(self) -> 'str': - """Gets the source_url of this V1GalleryApp. # noqa: E501 - - - :return: The source_url of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._source_url - - @source_url.setter - def source_url(self, source_url: 'str'): - """Sets the source_url of this V1GalleryApp. - - - :param source_url: The source_url of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._source_url = source_url - - @property - def tags(self) -> 'list[str]': - """Gets the tags of this V1GalleryApp. # noqa: E501 - - - :return: The tags of this V1GalleryApp. # noqa: E501 - :rtype: list[str] - """ - return self._tags - - @tags.setter - def tags(self, tags: 'list[str]'): - """Sets the tags of this V1GalleryApp. - - - :param tags: The tags of this V1GalleryApp. # noqa: E501 - :type: list[str] - """ - - self._tags = tags - - @property - def target_admin_tab(self) -> 'str': - """Gets the target_admin_tab of this V1GalleryApp. # noqa: E501 - - - :return: The target_admin_tab of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._target_admin_tab - - @target_admin_tab.setter - def target_admin_tab(self, target_admin_tab: 'str'): - """Sets the target_admin_tab of this V1GalleryApp. - - - :param target_admin_tab: The target_admin_tab of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._target_admin_tab = target_admin_tab - - @property - def template_tags(self) -> 'list[str]': - """Gets the template_tags of this V1GalleryApp. # noqa: E501 - - - :return: The template_tags of this V1GalleryApp. # noqa: E501 - :rtype: list[str] - """ - return self._template_tags - - @template_tags.setter - def template_tags(self, template_tags: 'list[str]'): - """Sets the template_tags of this V1GalleryApp. - - - :param template_tags: The template_tags of this V1GalleryApp. # noqa: E501 - :type: list[str] - """ - - self._template_tags = template_tags - - @property - def thumbnail(self) -> 'str': - """Gets the thumbnail of this V1GalleryApp. # noqa: E501 - - - :return: The thumbnail of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._thumbnail - - @thumbnail.setter - def thumbnail(self, thumbnail: 'str'): - """Sets the thumbnail of this V1GalleryApp. - - - :param thumbnail: The thumbnail of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._thumbnail = thumbnail - - @property - def version(self) -> 'str': - """Gets the version of this V1GalleryApp. # noqa: E501 - - - :return: The version of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version: 'str'): - """Sets the version of this V1GalleryApp. - - - :param version: The version of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._version = version - - @property - def video(self) -> 'str': - """Gets the video of this V1GalleryApp. # noqa: E501 - - - :return: The video of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._video - - @video.setter - def video(self, video: 'str'): - """Sets the video of this V1GalleryApp. - - - :param video: The video of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._video = video - - @property - def visibility(self) -> 'str': - """Gets the visibility of this V1GalleryApp. # noqa: E501 - - - :return: The visibility of this V1GalleryApp. # noqa: E501 - :rtype: str - """ - return self._visibility - - @visibility.setter - def visibility(self, visibility: 'str'): - """Sets the visibility of this V1GalleryApp. - - - :param visibility: The visibility of this V1GalleryApp. # noqa: E501 - :type: str - """ - - self._visibility = visibility - - @property - def works(self) -> 'list[V1Work]': - """Gets the works of this V1GalleryApp. # noqa: E501 - - - :return: The works of this V1GalleryApp. # noqa: E501 - :rtype: list[V1Work] - """ - return self._works - - @works.setter - def works(self, works: 'list[V1Work]'): - """Sets the works of this V1GalleryApp. - - - :param works: The works of this V1GalleryApp. # noqa: E501 - :type: list[V1Work] - """ - - self._works = works - - def to_dict(self) -> dict: - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(V1GalleryApp, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self) -> str: - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other: 'V1GalleryApp') -> bool: - """Returns true if both objects are equal""" - if not isinstance(other, V1GalleryApp): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'V1GalleryApp') -> bool: - """Returns true if both objects are not equal""" - return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_gallery_component.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_gallery_component.py deleted file mode 100644 index c9036933b..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_gallery_component.py +++ /dev/null @@ -1,855 +0,0 @@ -# coding: utf-8 -# This file is vendored. -# Do not edit it directly; changes will be overwritten. -# Make changes in the internal upstream repository instead. - - -""" - external/v1/auth_service.proto - - No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - - OpenAPI spec version: version not set - - Generated by: https://github.com/swagger-api/swagger-codegen.git - - NOTE - ---- - standard swagger-codegen-cli for this python client has been modified - by custom templates. The purpose of these templates is to include - typing information in the API and Model code. Please refer to the - main grid repository for more info -""" - -import pprint -import re # noqa: F401 - -from typing import TYPE_CHECKING - -import six - -if TYPE_CHECKING: - from datetime import datetime - from lightning_sdk.lightning_cloud.openapi.models import * - -class V1GalleryComponent(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'author': 'str', - 'authors': 'list[str]', - 'auto_start': 'bool', - 'categories': 'list[str]', - 'description': 'str', - 'display_name': 'str', - 'entrypoint_file': 'str', - 'example_code': 'str', - 'flow_servers': 'list[V1Flowserver]', - 'git_url': 'str', - 'hardware': 'str', - 'id': 'str', - 'installation_code': 'str', - 'license': 'str', - 'name': 'str', - 'open_url': 'str', - 'org_logo': 'str', - 'organization': 'str', - 'readme': 'str', - 'requirements_path': 'str', - 'short_description': 'str', - 'source_type': 'str', - 'source_url': 'str', - 'tags': 'list[str]', - 'thumbnail': 'str', - 'version': 'str', - 'video': 'str', - 'visibility': 'str', - 'works': 'list[V1Work]' - } - - attribute_map = { - 'author': 'author', - 'authors': 'authors', - 'auto_start': 'autoStart', - 'categories': 'categories', - 'description': 'description', - 'display_name': 'displayName', - 'entrypoint_file': 'entrypointFile', - 'example_code': 'exampleCode', - 'flow_servers': 'flowServers', - 'git_url': 'gitUrl', - 'hardware': 'hardware', - 'id': 'id', - 'installation_code': 'installationCode', - 'license': 'license', - 'name': 'name', - 'open_url': 'openUrl', - 'org_logo': 'orgLogo', - 'organization': 'organization', - 'readme': 'readme', - 'requirements_path': 'requirementsPath', - 'short_description': 'shortDescription', - 'source_type': 'sourceType', - 'source_url': 'sourceUrl', - 'tags': 'tags', - 'thumbnail': 'thumbnail', - 'version': 'version', - 'video': 'video', - 'visibility': 'visibility', - 'works': 'works' - } - - def __init__(self, author: 'str' =None, authors: 'list[str]' =None, auto_start: 'bool' =None, categories: 'list[str]' =None, description: 'str' =None, display_name: 'str' =None, entrypoint_file: 'str' =None, example_code: 'str' =None, flow_servers: 'list[V1Flowserver]' =None, git_url: 'str' =None, hardware: 'str' =None, id: 'str' =None, installation_code: 'str' =None, license: 'str' =None, name: 'str' =None, open_url: 'str' =None, org_logo: 'str' =None, organization: 'str' =None, readme: 'str' =None, requirements_path: 'str' =None, short_description: 'str' =None, source_type: 'str' =None, source_url: 'str' =None, tags: 'list[str]' =None, thumbnail: 'str' =None, version: 'str' =None, video: 'str' =None, visibility: 'str' =None, works: 'list[V1Work]' =None): # noqa: E501 - """V1GalleryComponent - a model defined in Swagger""" # noqa: E501 - self._author = None - self._authors = None - self._auto_start = None - self._categories = None - self._description = None - self._display_name = None - self._entrypoint_file = None - self._example_code = None - self._flow_servers = None - self._git_url = None - self._hardware = None - self._id = None - self._installation_code = None - self._license = None - self._name = None - self._open_url = None - self._org_logo = None - self._organization = None - self._readme = None - self._requirements_path = None - self._short_description = None - self._source_type = None - self._source_url = None - self._tags = None - self._thumbnail = None - self._version = None - self._video = None - self._visibility = None - self._works = None - self.discriminator = None - if author is not None: - self.author = author - if authors is not None: - self.authors = authors - if auto_start is not None: - self.auto_start = auto_start - if categories is not None: - self.categories = categories - if description is not None: - self.description = description - if display_name is not None: - self.display_name = display_name - if entrypoint_file is not None: - self.entrypoint_file = entrypoint_file - if example_code is not None: - self.example_code = example_code - if flow_servers is not None: - self.flow_servers = flow_servers - if git_url is not None: - self.git_url = git_url - if hardware is not None: - self.hardware = hardware - if id is not None: - self.id = id - if installation_code is not None: - self.installation_code = installation_code - if license is not None: - self.license = license - if name is not None: - self.name = name - if open_url is not None: - self.open_url = open_url - if org_logo is not None: - self.org_logo = org_logo - if organization is not None: - self.organization = organization - if readme is not None: - self.readme = readme - if requirements_path is not None: - self.requirements_path = requirements_path - if short_description is not None: - self.short_description = short_description - if source_type is not None: - self.source_type = source_type - if source_url is not None: - self.source_url = source_url - if tags is not None: - self.tags = tags - if thumbnail is not None: - self.thumbnail = thumbnail - if version is not None: - self.version = version - if video is not None: - self.video = video - if visibility is not None: - self.visibility = visibility - if works is not None: - self.works = works - - @property - def author(self) -> 'str': - """Gets the author of this V1GalleryComponent. # noqa: E501 - - - :return: The author of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._author - - @author.setter - def author(self, author: 'str'): - """Sets the author of this V1GalleryComponent. - - - :param author: The author of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._author = author - - @property - def authors(self) -> 'list[str]': - """Gets the authors of this V1GalleryComponent. # noqa: E501 - - - :return: The authors of this V1GalleryComponent. # noqa: E501 - :rtype: list[str] - """ - return self._authors - - @authors.setter - def authors(self, authors: 'list[str]'): - """Sets the authors of this V1GalleryComponent. - - - :param authors: The authors of this V1GalleryComponent. # noqa: E501 - :type: list[str] - """ - - self._authors = authors - - @property - def auto_start(self) -> 'bool': - """Gets the auto_start of this V1GalleryComponent. # noqa: E501 - - - :return: The auto_start of this V1GalleryComponent. # noqa: E501 - :rtype: bool - """ - return self._auto_start - - @auto_start.setter - def auto_start(self, auto_start: 'bool'): - """Sets the auto_start of this V1GalleryComponent. - - - :param auto_start: The auto_start of this V1GalleryComponent. # noqa: E501 - :type: bool - """ - - self._auto_start = auto_start - - @property - def categories(self) -> 'list[str]': - """Gets the categories of this V1GalleryComponent. # noqa: E501 - - - :return: The categories of this V1GalleryComponent. # noqa: E501 - :rtype: list[str] - """ - return self._categories - - @categories.setter - def categories(self, categories: 'list[str]'): - """Sets the categories of this V1GalleryComponent. - - - :param categories: The categories of this V1GalleryComponent. # noqa: E501 - :type: list[str] - """ - - self._categories = categories - - @property - def description(self) -> 'str': - """Gets the description of this V1GalleryComponent. # noqa: E501 - - - :return: The description of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description: 'str'): - """Sets the description of this V1GalleryComponent. - - - :param description: The description of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def display_name(self) -> 'str': - """Gets the display_name of this V1GalleryComponent. # noqa: E501 - - - :return: The display_name of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._display_name - - @display_name.setter - def display_name(self, display_name: 'str'): - """Sets the display_name of this V1GalleryComponent. - - - :param display_name: The display_name of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._display_name = display_name - - @property - def entrypoint_file(self) -> 'str': - """Gets the entrypoint_file of this V1GalleryComponent. # noqa: E501 - - - :return: The entrypoint_file of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._entrypoint_file - - @entrypoint_file.setter - def entrypoint_file(self, entrypoint_file: 'str'): - """Sets the entrypoint_file of this V1GalleryComponent. - - - :param entrypoint_file: The entrypoint_file of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._entrypoint_file = entrypoint_file - - @property - def example_code(self) -> 'str': - """Gets the example_code of this V1GalleryComponent. # noqa: E501 - - - :return: The example_code of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._example_code - - @example_code.setter - def example_code(self, example_code: 'str'): - """Sets the example_code of this V1GalleryComponent. - - - :param example_code: The example_code of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._example_code = example_code - - @property - def flow_servers(self) -> 'list[V1Flowserver]': - """Gets the flow_servers of this V1GalleryComponent. # noqa: E501 - - - :return: The flow_servers of this V1GalleryComponent. # noqa: E501 - :rtype: list[V1Flowserver] - """ - return self._flow_servers - - @flow_servers.setter - def flow_servers(self, flow_servers: 'list[V1Flowserver]'): - """Sets the flow_servers of this V1GalleryComponent. - - - :param flow_servers: The flow_servers of this V1GalleryComponent. # noqa: E501 - :type: list[V1Flowserver] - """ - - self._flow_servers = flow_servers - - @property - def git_url(self) -> 'str': - """Gets the git_url of this V1GalleryComponent. # noqa: E501 - - - :return: The git_url of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._git_url - - @git_url.setter - def git_url(self, git_url: 'str'): - """Sets the git_url of this V1GalleryComponent. - - - :param git_url: The git_url of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._git_url = git_url - - @property - def hardware(self) -> 'str': - """Gets the hardware of this V1GalleryComponent. # noqa: E501 - - - :return: The hardware of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._hardware - - @hardware.setter - def hardware(self, hardware: 'str'): - """Sets the hardware of this V1GalleryComponent. - - - :param hardware: The hardware of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._hardware = hardware - - @property - def id(self) -> 'str': - """Gets the id of this V1GalleryComponent. # noqa: E501 - - - :return: The id of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id: 'str'): - """Sets the id of this V1GalleryComponent. - - - :param id: The id of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def installation_code(self) -> 'str': - """Gets the installation_code of this V1GalleryComponent. # noqa: E501 - - - :return: The installation_code of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._installation_code - - @installation_code.setter - def installation_code(self, installation_code: 'str'): - """Sets the installation_code of this V1GalleryComponent. - - - :param installation_code: The installation_code of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._installation_code = installation_code - - @property - def license(self) -> 'str': - """Gets the license of this V1GalleryComponent. # noqa: E501 - - - :return: The license of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._license - - @license.setter - def license(self, license: 'str'): - """Sets the license of this V1GalleryComponent. - - - :param license: The license of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._license = license - - @property - def name(self) -> 'str': - """Gets the name of this V1GalleryComponent. # noqa: E501 - - - :return: The name of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name: 'str'): - """Sets the name of this V1GalleryComponent. - - - :param name: The name of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def open_url(self) -> 'str': - """Gets the open_url of this V1GalleryComponent. # noqa: E501 - - - :return: The open_url of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._open_url - - @open_url.setter - def open_url(self, open_url: 'str'): - """Sets the open_url of this V1GalleryComponent. - - - :param open_url: The open_url of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._open_url = open_url - - @property - def org_logo(self) -> 'str': - """Gets the org_logo of this V1GalleryComponent. # noqa: E501 - - - :return: The org_logo of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._org_logo - - @org_logo.setter - def org_logo(self, org_logo: 'str'): - """Sets the org_logo of this V1GalleryComponent. - - - :param org_logo: The org_logo of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._org_logo = org_logo - - @property - def organization(self) -> 'str': - """Gets the organization of this V1GalleryComponent. # noqa: E501 - - - :return: The organization of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._organization - - @organization.setter - def organization(self, organization: 'str'): - """Sets the organization of this V1GalleryComponent. - - - :param organization: The organization of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._organization = organization - - @property - def readme(self) -> 'str': - """Gets the readme of this V1GalleryComponent. # noqa: E501 - - - :return: The readme of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._readme - - @readme.setter - def readme(self, readme: 'str'): - """Sets the readme of this V1GalleryComponent. - - - :param readme: The readme of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._readme = readme - - @property - def requirements_path(self) -> 'str': - """Gets the requirements_path of this V1GalleryComponent. # noqa: E501 - - - :return: The requirements_path of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._requirements_path - - @requirements_path.setter - def requirements_path(self, requirements_path: 'str'): - """Sets the requirements_path of this V1GalleryComponent. - - - :param requirements_path: The requirements_path of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._requirements_path = requirements_path - - @property - def short_description(self) -> 'str': - """Gets the short_description of this V1GalleryComponent. # noqa: E501 - - - :return: The short_description of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._short_description - - @short_description.setter - def short_description(self, short_description: 'str'): - """Sets the short_description of this V1GalleryComponent. - - - :param short_description: The short_description of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._short_description = short_description - - @property - def source_type(self) -> 'str': - """Gets the source_type of this V1GalleryComponent. # noqa: E501 - - - :return: The source_type of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._source_type - - @source_type.setter - def source_type(self, source_type: 'str'): - """Sets the source_type of this V1GalleryComponent. - - - :param source_type: The source_type of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._source_type = source_type - - @property - def source_url(self) -> 'str': - """Gets the source_url of this V1GalleryComponent. # noqa: E501 - - - :return: The source_url of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._source_url - - @source_url.setter - def source_url(self, source_url: 'str'): - """Sets the source_url of this V1GalleryComponent. - - - :param source_url: The source_url of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._source_url = source_url - - @property - def tags(self) -> 'list[str]': - """Gets the tags of this V1GalleryComponent. # noqa: E501 - - - :return: The tags of this V1GalleryComponent. # noqa: E501 - :rtype: list[str] - """ - return self._tags - - @tags.setter - def tags(self, tags: 'list[str]'): - """Sets the tags of this V1GalleryComponent. - - - :param tags: The tags of this V1GalleryComponent. # noqa: E501 - :type: list[str] - """ - - self._tags = tags - - @property - def thumbnail(self) -> 'str': - """Gets the thumbnail of this V1GalleryComponent. # noqa: E501 - - - :return: The thumbnail of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._thumbnail - - @thumbnail.setter - def thumbnail(self, thumbnail: 'str'): - """Sets the thumbnail of this V1GalleryComponent. - - - :param thumbnail: The thumbnail of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._thumbnail = thumbnail - - @property - def version(self) -> 'str': - """Gets the version of this V1GalleryComponent. # noqa: E501 - - - :return: The version of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version: 'str'): - """Sets the version of this V1GalleryComponent. - - - :param version: The version of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._version = version - - @property - def video(self) -> 'str': - """Gets the video of this V1GalleryComponent. # noqa: E501 - - - :return: The video of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._video - - @video.setter - def video(self, video: 'str'): - """Sets the video of this V1GalleryComponent. - - - :param video: The video of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._video = video - - @property - def visibility(self) -> 'str': - """Gets the visibility of this V1GalleryComponent. # noqa: E501 - - - :return: The visibility of this V1GalleryComponent. # noqa: E501 - :rtype: str - """ - return self._visibility - - @visibility.setter - def visibility(self, visibility: 'str'): - """Sets the visibility of this V1GalleryComponent. - - - :param visibility: The visibility of this V1GalleryComponent. # noqa: E501 - :type: str - """ - - self._visibility = visibility - - @property - def works(self) -> 'list[V1Work]': - """Gets the works of this V1GalleryComponent. # noqa: E501 - - - :return: The works of this V1GalleryComponent. # noqa: E501 - :rtype: list[V1Work] - """ - return self._works - - @works.setter - def works(self, works: 'list[V1Work]'): - """Sets the works of this V1GalleryComponent. - - - :param works: The works of this V1GalleryComponent. # noqa: E501 - :type: list[V1Work] - """ - - self._works = works - - def to_dict(self) -> dict: - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(V1GalleryComponent, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self) -> str: - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other: 'V1GalleryComponent') -> bool: - """Returns true if both objects are equal""" - if not isinstance(other, V1GalleryComponent): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'V1GalleryComponent') -> bool: - """Returns true if both objects are not equal""" - return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_generic_job.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_generic_job.py index a315aee00..8452e37a3 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_generic_job.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_generic_job.py @@ -48,7 +48,9 @@ class V1GenericJob(object): 'cloud_space_id': 'str', 'cluster_id': 'str', 'created_at': 'datetime', + 'current_run_attempt': 'int', 'id': 'str', + 'max_run_attempts': 'int', 'message': 'str', 'name': 'str', 'project_id': 'str', @@ -65,7 +67,9 @@ class V1GenericJob(object): 'cloud_space_id': 'cloudSpaceId', 'cluster_id': 'clusterId', 'created_at': 'createdAt', + 'current_run_attempt': 'currentRunAttempt', 'id': 'id', + 'max_run_attempts': 'maxRunAttempts', 'message': 'message', 'name': 'name', 'project_id': 'projectId', @@ -78,12 +82,14 @@ class V1GenericJob(object): 'user_id': 'userId' } - def __init__(self, cloud_space_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, id: 'str' =None, message: 'str' =None, name: 'str' =None, project_id: 'str' =None, spec: 'V1GenericJobSpec' =None, started_at: 'datetime' =None, state: 'str' =None, stopped_at: 'datetime' =None, tags: 'list[V1WorkloadTag]' =None, type: 'str' =None, user_id: 'str' =None): # noqa: E501 + def __init__(self, cloud_space_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, current_run_attempt: 'int' =None, id: 'str' =None, max_run_attempts: 'int' =None, message: 'str' =None, name: 'str' =None, project_id: 'str' =None, spec: 'V1GenericJobSpec' =None, started_at: 'datetime' =None, state: 'str' =None, stopped_at: 'datetime' =None, tags: 'list[V1WorkloadTag]' =None, type: 'str' =None, user_id: 'str' =None): # noqa: E501 """V1GenericJob - a model defined in Swagger""" # noqa: E501 self._cloud_space_id = None self._cluster_id = None self._created_at = None + self._current_run_attempt = None self._id = None + self._max_run_attempts = None self._message = None self._name = None self._project_id = None @@ -101,8 +107,12 @@ def __init__(self, cloud_space_id: 'str' =None, cluster_id: 'str' =None, created self.cluster_id = cluster_id if created_at is not None: self.created_at = created_at + if current_run_attempt is not None: + self.current_run_attempt = current_run_attempt if id is not None: self.id = id + if max_run_attempts is not None: + self.max_run_attempts = max_run_attempts if message is not None: self.message = message if name is not None: @@ -187,6 +197,27 @@ def created_at(self, created_at: 'datetime'): self._created_at = created_at + @property + def current_run_attempt(self) -> 'int': + """Gets the current_run_attempt of this V1GenericJob. # noqa: E501 + + + :return: The current_run_attempt of this V1GenericJob. # noqa: E501 + :rtype: int + """ + return self._current_run_attempt + + @current_run_attempt.setter + def current_run_attempt(self, current_run_attempt: 'int'): + """Sets the current_run_attempt of this V1GenericJob. + + + :param current_run_attempt: The current_run_attempt of this V1GenericJob. # noqa: E501 + :type: int + """ + + self._current_run_attempt = current_run_attempt + @property def id(self) -> 'str': """Gets the id of this V1GenericJob. # noqa: E501 @@ -208,6 +239,27 @@ def id(self, id: 'str'): self._id = id + @property + def max_run_attempts(self) -> 'int': + """Gets the max_run_attempts of this V1GenericJob. # noqa: E501 + + + :return: The max_run_attempts of this V1GenericJob. # noqa: E501 + :rtype: int + """ + return self._max_run_attempts + + @max_run_attempts.setter + def max_run_attempts(self, max_run_attempts: 'int'): + """Sets the max_run_attempts of this V1GenericJob. + + + :param max_run_attempts: The max_run_attempts of this V1GenericJob. # noqa: E501 + :type: int + """ + + self._max_run_attempts = max_run_attempts + @property def message(self) -> 'str': """Gets the message of this V1GenericJob. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_account_balance_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_account_balance_response.py index 1f869acfb..df5ed11a8 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_account_balance_response.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_account_balance_response.py @@ -45,19 +45,24 @@ class V1GetAccountBalanceResponse(object): and the value is json key in definition. """ swagger_types = { - 'balance': 'float' + 'balance': 'float', + 'coding_plan': 'V1CodingPlanVerdict' } attribute_map = { - 'balance': 'balance' + 'balance': 'balance', + 'coding_plan': 'codingPlan' } - def __init__(self, balance: 'float' =None): # noqa: E501 + def __init__(self, balance: 'float' =None, coding_plan: 'V1CodingPlanVerdict' =None): # noqa: E501 """V1GetAccountBalanceResponse - a model defined in Swagger""" # noqa: E501 self._balance = None + self._coding_plan = None self.discriminator = None if balance is not None: self.balance = balance + if coding_plan is not None: + self.coding_plan = coding_plan @property def balance(self) -> 'float': @@ -80,6 +85,27 @@ def balance(self, balance: 'float'): self._balance = balance + @property + def coding_plan(self) -> 'V1CodingPlanVerdict': + """Gets the coding_plan of this V1GetAccountBalanceResponse. # noqa: E501 + + + :return: The coding_plan of this V1GetAccountBalanceResponse. # noqa: E501 + :rtype: V1CodingPlanVerdict + """ + return self._coding_plan + + @coding_plan.setter + def coding_plan(self, coding_plan: 'V1CodingPlanVerdict'): + """Sets the coding_plan of this V1GetAccountBalanceResponse. + + + :param coding_plan: The coding_plan of this V1GetAccountBalanceResponse. # noqa: E501 + :type: V1CodingPlanVerdict + """ + + self._coding_plan = coding_plan + def to_dict(self) -> dict: """Returns the model properties as a dict""" result = {} diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_app_instance_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_activity_filter_resource_names_response.py similarity index 54% rename from python/lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_app_instance_response.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_get_activity_filter_resource_names_response.py index 945b1d098..716ac131f 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_app_instance_response.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_activity_filter_resource_names_response.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class V1CreateCloudSpaceAppInstanceResponse(object): +class V1GetActivityFilterResourceNamesResponse(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -45,66 +45,66 @@ class V1CreateCloudSpaceAppInstanceResponse(object): and the value is json key in definition. """ swagger_types = { - 'actions': 'list[V1CloudSpaceAppAction]', - 'lightningappinstance': 'Externalv1LightningappInstance' + 'next_page_token': 'str', + 'resource_ids': 'list[V1NamedFilterValue]' } attribute_map = { - 'actions': 'actions', - 'lightningappinstance': 'lightningappinstance' + 'next_page_token': 'nextPageToken', + 'resource_ids': 'resourceIds' } - def __init__(self, actions: 'list[V1CloudSpaceAppAction]' =None, lightningappinstance: 'Externalv1LightningappInstance' =None): # noqa: E501 - """V1CreateCloudSpaceAppInstanceResponse - a model defined in Swagger""" # noqa: E501 - self._actions = None - self._lightningappinstance = None + def __init__(self, next_page_token: 'str' =None, resource_ids: 'list[V1NamedFilterValue]' =None): # noqa: E501 + """V1GetActivityFilterResourceNamesResponse - a model defined in Swagger""" # noqa: E501 + self._next_page_token = None + self._resource_ids = None self.discriminator = None - if actions is not None: - self.actions = actions - if lightningappinstance is not None: - self.lightningappinstance = lightningappinstance + if next_page_token is not None: + self.next_page_token = next_page_token + if resource_ids is not None: + self.resource_ids = resource_ids @property - def actions(self) -> 'list[V1CloudSpaceAppAction]': - """Gets the actions of this V1CreateCloudSpaceAppInstanceResponse. # noqa: E501 + def next_page_token(self) -> 'str': + """Gets the next_page_token of this V1GetActivityFilterResourceNamesResponse. # noqa: E501 - :return: The actions of this V1CreateCloudSpaceAppInstanceResponse. # noqa: E501 - :rtype: list[V1CloudSpaceAppAction] + :return: The next_page_token of this V1GetActivityFilterResourceNamesResponse. # noqa: E501 + :rtype: str """ - return self._actions + return self._next_page_token - @actions.setter - def actions(self, actions: 'list[V1CloudSpaceAppAction]'): - """Sets the actions of this V1CreateCloudSpaceAppInstanceResponse. + @next_page_token.setter + def next_page_token(self, next_page_token: 'str'): + """Sets the next_page_token of this V1GetActivityFilterResourceNamesResponse. - :param actions: The actions of this V1CreateCloudSpaceAppInstanceResponse. # noqa: E501 - :type: list[V1CloudSpaceAppAction] + :param next_page_token: The next_page_token of this V1GetActivityFilterResourceNamesResponse. # noqa: E501 + :type: str """ - self._actions = actions + self._next_page_token = next_page_token @property - def lightningappinstance(self) -> 'Externalv1LightningappInstance': - """Gets the lightningappinstance of this V1CreateCloudSpaceAppInstanceResponse. # noqa: E501 + def resource_ids(self) -> 'list[V1NamedFilterValue]': + """Gets the resource_ids of this V1GetActivityFilterResourceNamesResponse. # noqa: E501 - :return: The lightningappinstance of this V1CreateCloudSpaceAppInstanceResponse. # noqa: E501 - :rtype: Externalv1LightningappInstance + :return: The resource_ids of this V1GetActivityFilterResourceNamesResponse. # noqa: E501 + :rtype: list[V1NamedFilterValue] """ - return self._lightningappinstance + return self._resource_ids - @lightningappinstance.setter - def lightningappinstance(self, lightningappinstance: 'Externalv1LightningappInstance'): - """Sets the lightningappinstance of this V1CreateCloudSpaceAppInstanceResponse. + @resource_ids.setter + def resource_ids(self, resource_ids: 'list[V1NamedFilterValue]'): + """Sets the resource_ids of this V1GetActivityFilterResourceNamesResponse. - :param lightningappinstance: The lightningappinstance of this V1CreateCloudSpaceAppInstanceResponse. # noqa: E501 - :type: Externalv1LightningappInstance + :param resource_ids: The resource_ids of this V1GetActivityFilterResourceNamesResponse. # noqa: E501 + :type: list[V1NamedFilterValue] """ - self._lightningappinstance = lightningappinstance + self._resource_ids = resource_ids def to_dict(self) -> dict: """Returns the model properties as a dict""" @@ -127,7 +127,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(V1CreateCloudSpaceAppInstanceResponse, dict): + if issubclass(V1GetActivityFilterResourceNamesResponse, dict): for key, value in self.items(): result[key] = value @@ -141,13 +141,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'V1CreateCloudSpaceAppInstanceResponse') -> bool: + def __eq__(self, other: 'V1GetActivityFilterResourceNamesResponse') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, V1CreateCloudSpaceAppInstanceResponse): + if not isinstance(other, V1GetActivityFilterResourceNamesResponse): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'V1CreateCloudSpaceAppInstanceResponse') -> bool: + def __ne__(self, other: 'V1GetActivityFilterResourceNamesResponse') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_activity_filter_values_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_activity_filter_values_response.py index 573428202..55ef4591e 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_activity_filter_values_response.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_activity_filter_values_response.py @@ -45,102 +45,81 @@ class V1GetActivityFilterValuesResponse(object): and the value is json key in definition. """ swagger_types = { + 'cluster_ids': 'list[str]', 'project_ids': 'list[str]', - 'resource_ids': 'list[V1NamedFilterValue]', - 'resource_ids_truncated': 'bool', 'resource_types': 'list[str]', + 'subfilters': 'V1ActivitySubfilterValues', 'user_ids': 'list[str]' } attribute_map = { + 'cluster_ids': 'clusterIds', 'project_ids': 'projectIds', - 'resource_ids': 'resourceIds', - 'resource_ids_truncated': 'resourceIdsTruncated', 'resource_types': 'resourceTypes', + 'subfilters': 'subfilters', 'user_ids': 'userIds' } - def __init__(self, project_ids: 'list[str]' =None, resource_ids: 'list[V1NamedFilterValue]' =None, resource_ids_truncated: 'bool' =None, resource_types: 'list[str]' =None, user_ids: 'list[str]' =None): # noqa: E501 + def __init__(self, cluster_ids: 'list[str]' =None, project_ids: 'list[str]' =None, resource_types: 'list[str]' =None, subfilters: 'V1ActivitySubfilterValues' =None, user_ids: 'list[str]' =None): # noqa: E501 """V1GetActivityFilterValuesResponse - a model defined in Swagger""" # noqa: E501 + self._cluster_ids = None self._project_ids = None - self._resource_ids = None - self._resource_ids_truncated = None self._resource_types = None + self._subfilters = None self._user_ids = None self.discriminator = None + if cluster_ids is not None: + self.cluster_ids = cluster_ids if project_ids is not None: self.project_ids = project_ids - if resource_ids is not None: - self.resource_ids = resource_ids - if resource_ids_truncated is not None: - self.resource_ids_truncated = resource_ids_truncated if resource_types is not None: self.resource_types = resource_types + if subfilters is not None: + self.subfilters = subfilters if user_ids is not None: self.user_ids = user_ids @property - def project_ids(self) -> 'list[str]': - """Gets the project_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 + def cluster_ids(self) -> 'list[str]': + """Gets the cluster_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 - :return: The project_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 + :return: The cluster_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 :rtype: list[str] """ - return self._project_ids + return self._cluster_ids - @project_ids.setter - def project_ids(self, project_ids: 'list[str]'): - """Sets the project_ids of this V1GetActivityFilterValuesResponse. + @cluster_ids.setter + def cluster_ids(self, cluster_ids: 'list[str]'): + """Sets the cluster_ids of this V1GetActivityFilterValuesResponse. - :param project_ids: The project_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 + :param cluster_ids: The cluster_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 :type: list[str] """ - self._project_ids = project_ids - - @property - def resource_ids(self) -> 'list[V1NamedFilterValue]': - """Gets the resource_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 - - - :return: The resource_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 - :rtype: list[V1NamedFilterValue] - """ - return self._resource_ids - - @resource_ids.setter - def resource_ids(self, resource_ids: 'list[V1NamedFilterValue]'): - """Sets the resource_ids of this V1GetActivityFilterValuesResponse. - - - :param resource_ids: The resource_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 - :type: list[V1NamedFilterValue] - """ - - self._resource_ids = resource_ids + self._cluster_ids = cluster_ids @property - def resource_ids_truncated(self) -> 'bool': - """Gets the resource_ids_truncated of this V1GetActivityFilterValuesResponse. # noqa: E501 + def project_ids(self) -> 'list[str]': + """Gets the project_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 - :return: The resource_ids_truncated of this V1GetActivityFilterValuesResponse. # noqa: E501 - :rtype: bool + :return: The project_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 + :rtype: list[str] """ - return self._resource_ids_truncated + return self._project_ids - @resource_ids_truncated.setter - def resource_ids_truncated(self, resource_ids_truncated: 'bool'): - """Sets the resource_ids_truncated of this V1GetActivityFilterValuesResponse. + @project_ids.setter + def project_ids(self, project_ids: 'list[str]'): + """Sets the project_ids of this V1GetActivityFilterValuesResponse. - :param resource_ids_truncated: The resource_ids_truncated of this V1GetActivityFilterValuesResponse. # noqa: E501 - :type: bool + :param project_ids: The project_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 + :type: list[str] """ - self._resource_ids_truncated = resource_ids_truncated + self._project_ids = project_ids @property def resource_types(self) -> 'list[str]': @@ -163,6 +142,27 @@ def resource_types(self, resource_types: 'list[str]'): self._resource_types = resource_types + @property + def subfilters(self) -> 'V1ActivitySubfilterValues': + """Gets the subfilters of this V1GetActivityFilterValuesResponse. # noqa: E501 + + + :return: The subfilters of this V1GetActivityFilterValuesResponse. # noqa: E501 + :rtype: V1ActivitySubfilterValues + """ + return self._subfilters + + @subfilters.setter + def subfilters(self, subfilters: 'V1ActivitySubfilterValues'): + """Sets the subfilters of this V1GetActivityFilterValuesResponse. + + + :param subfilters: The subfilters of this V1GetActivityFilterValuesResponse. # noqa: E501 + :type: V1ActivitySubfilterValues + """ + + self._subfilters = subfilters + @property def user_ids(self) -> 'list[str]': """Gets the user_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_cluster_details_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_cluster_details_response.py new file mode 100644 index 000000000..c4f167601 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_cluster_details_response.py @@ -0,0 +1,127 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1GetClusterDetailsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'details': 'V1ClusterDetails' + } + + attribute_map = { + 'details': 'details' + } + + def __init__(self, details: 'V1ClusterDetails' =None): # noqa: E501 + """V1GetClusterDetailsResponse - a model defined in Swagger""" # noqa: E501 + self._details = None + self.discriminator = None + if details is not None: + self.details = details + + @property + def details(self) -> 'V1ClusterDetails': + """Gets the details of this V1GetClusterDetailsResponse. # noqa: E501 + + + :return: The details of this V1GetClusterDetailsResponse. # noqa: E501 + :rtype: V1ClusterDetails + """ + return self._details + + @details.setter + def details(self, details: 'V1ClusterDetails'): + """Sets the details of this V1GetClusterDetailsResponse. + + + :param details: The details of this V1GetClusterDetailsResponse. # noqa: E501 + :type: V1ClusterDetails + """ + + self._details = details + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1GetClusterDetailsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1GetClusterDetailsResponse') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1GetClusterDetailsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1GetClusterDetailsResponse') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_cluster_reservation_usage_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_cluster_reservation_usage_response.py new file mode 100644 index 000000000..35d4b3408 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_cluster_reservation_usage_response.py @@ -0,0 +1,183 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1GetClusterReservationUsageResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'points': 'list[V1ClusterReservationUsagePoint]', + 'recorded_credits': 'float', + 'warnings': 'list[str]' + } + + attribute_map = { + 'points': 'points', + 'recorded_credits': 'recordedCredits', + 'warnings': 'warnings' + } + + def __init__(self, points: 'list[V1ClusterReservationUsagePoint]' =None, recorded_credits: 'float' =None, warnings: 'list[str]' =None): # noqa: E501 + """V1GetClusterReservationUsageResponse - a model defined in Swagger""" # noqa: E501 + self._points = None + self._recorded_credits = None + self._warnings = None + self.discriminator = None + if points is not None: + self.points = points + if recorded_credits is not None: + self.recorded_credits = recorded_credits + if warnings is not None: + self.warnings = warnings + + @property + def points(self) -> 'list[V1ClusterReservationUsagePoint]': + """Gets the points of this V1GetClusterReservationUsageResponse. # noqa: E501 + + Time-weighted occupied GPUs using the durable scheduler workload classification. # noqa: E501 + + :return: The points of this V1GetClusterReservationUsageResponse. # noqa: E501 + :rtype: list[V1ClusterReservationUsagePoint] + """ + return self._points + + @points.setter + def points(self, points: 'list[V1ClusterReservationUsagePoint]'): + """Sets the points of this V1GetClusterReservationUsageResponse. + + Time-weighted occupied GPUs using the durable scheduler workload classification. # noqa: E501 + + :param points: The points of this V1GetClusterReservationUsageResponse. # noqa: E501 + :type: list[V1ClusterReservationUsagePoint] + """ + + self._points = points + + @property + def recorded_credits(self) -> 'float': + """Gets the recorded_credits of this V1GetClusterReservationUsageResponse. # noqa: E501 + + Owner-wide compute telemetry for matching GPU types in this cluster and window. This is not a per-reservation ledger or a statement of cash collected. # noqa: E501 + + :return: The recorded_credits of this V1GetClusterReservationUsageResponse. # noqa: E501 + :rtype: float + """ + return self._recorded_credits + + @recorded_credits.setter + def recorded_credits(self, recorded_credits: 'float'): + """Sets the recorded_credits of this V1GetClusterReservationUsageResponse. + + Owner-wide compute telemetry for matching GPU types in this cluster and window. This is not a per-reservation ledger or a statement of cash collected. # noqa: E501 + + :param recorded_credits: The recorded_credits of this V1GetClusterReservationUsageResponse. # noqa: E501 + :type: float + """ + + self._recorded_credits = recorded_credits + + @property + def warnings(self) -> 'list[str]': + """Gets the warnings of this V1GetClusterReservationUsageResponse. # noqa: E501 + + + :return: The warnings of this V1GetClusterReservationUsageResponse. # noqa: E501 + :rtype: list[str] + """ + return self._warnings + + @warnings.setter + def warnings(self, warnings: 'list[str]'): + """Sets the warnings of this V1GetClusterReservationUsageResponse. + + + :param warnings: The warnings of this V1GetClusterReservationUsageResponse. # noqa: E501 + :type: list[str] + """ + + self._warnings = warnings + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1GetClusterReservationUsageResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1GetClusterReservationUsageResponse') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1GetClusterReservationUsageResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1GetClusterReservationUsageResponse') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_coding_usage_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_coding_usage_response.py new file mode 100644 index 000000000..b6091bae6 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_coding_usage_response.py @@ -0,0 +1,157 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1GetCodingUsageResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'model_weights': 'list[V1CodingModelWeight]', + 'plans': 'list[V1CodingPlanUsage]' + } + + attribute_map = { + 'model_weights': 'modelWeights', + 'plans': 'plans' + } + + def __init__(self, model_weights: 'list[V1CodingModelWeight]' =None, plans: 'list[V1CodingPlanUsage]' =None): # noqa: E501 + """V1GetCodingUsageResponse - a model defined in Swagger""" # noqa: E501 + self._model_weights = None + self._plans = None + self.discriminator = None + if model_weights is not None: + self.model_weights = model_weights + if plans is not None: + self.plans = plans + + @property + def model_weights(self) -> 'list[V1CodingModelWeight]': + """Gets the model_weights of this V1GetCodingUsageResponse. # noqa: E501 + + How much each credit of list-price usage counts against the allowance, per model. # noqa: E501 + + :return: The model_weights of this V1GetCodingUsageResponse. # noqa: E501 + :rtype: list[V1CodingModelWeight] + """ + return self._model_weights + + @model_weights.setter + def model_weights(self, model_weights: 'list[V1CodingModelWeight]'): + """Sets the model_weights of this V1GetCodingUsageResponse. + + How much each credit of list-price usage counts against the allowance, per model. # noqa: E501 + + :param model_weights: The model_weights of this V1GetCodingUsageResponse. # noqa: E501 + :type: list[V1CodingModelWeight] + """ + + self._model_weights = model_weights + + @property + def plans(self) -> 'list[V1CodingPlanUsage]': + """Gets the plans of this V1GetCodingUsageResponse. # noqa: E501 + + The caller's personal plan first, then each org of theirs whose plan includes coding usage. # noqa: E501 + + :return: The plans of this V1GetCodingUsageResponse. # noqa: E501 + :rtype: list[V1CodingPlanUsage] + """ + return self._plans + + @plans.setter + def plans(self, plans: 'list[V1CodingPlanUsage]'): + """Sets the plans of this V1GetCodingUsageResponse. + + The caller's personal plan first, then each org of theirs whose plan includes coding usage. # noqa: E501 + + :param plans: The plans of this V1GetCodingUsageResponse. # noqa: E501 + :type: list[V1CodingPlanUsage] + """ + + self._plans = plans + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1GetCodingUsageResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1GetCodingUsageResponse') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1GetCodingUsageResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1GetCodingUsageResponse') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_gallery_lightningapps_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_k8_s_cluster_kubeconfig_url_response.py similarity index 71% rename from python/lightning_sdk/lightning_cloud/openapi/models/v1_list_gallery_lightningapps_response.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_get_k8_s_cluster_kubeconfig_url_response.py index 05ae32b26..5e4cba4fa 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_gallery_lightningapps_response.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_k8_s_cluster_kubeconfig_url_response.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class V1ListGalleryLightningappsResponse(object): +class V1GetK8SClusterKubeconfigURLResponse(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -45,40 +45,40 @@ class V1ListGalleryLightningappsResponse(object): and the value is json key in definition. """ swagger_types = { - 'apps': 'list[V1GalleryApp]' + 'url': 'str' } attribute_map = { - 'apps': 'apps' + 'url': 'url' } - def __init__(self, apps: 'list[V1GalleryApp]' =None): # noqa: E501 - """V1ListGalleryLightningappsResponse - a model defined in Swagger""" # noqa: E501 - self._apps = None + def __init__(self, url: 'str' =None): # noqa: E501 + """V1GetK8SClusterKubeconfigURLResponse - a model defined in Swagger""" # noqa: E501 + self._url = None self.discriminator = None - if apps is not None: - self.apps = apps + if url is not None: + self.url = url @property - def apps(self) -> 'list[V1GalleryApp]': - """Gets the apps of this V1ListGalleryLightningappsResponse. # noqa: E501 + def url(self) -> 'str': + """Gets the url of this V1GetK8SClusterKubeconfigURLResponse. # noqa: E501 - :return: The apps of this V1ListGalleryLightningappsResponse. # noqa: E501 - :rtype: list[V1GalleryApp] + :return: The url of this V1GetK8SClusterKubeconfigURLResponse. # noqa: E501 + :rtype: str """ - return self._apps + return self._url - @apps.setter - def apps(self, apps: 'list[V1GalleryApp]'): - """Sets the apps of this V1ListGalleryLightningappsResponse. + @url.setter + def url(self, url: 'str'): + """Sets the url of this V1GetK8SClusterKubeconfigURLResponse. - :param apps: The apps of this V1ListGalleryLightningappsResponse. # noqa: E501 - :type: list[V1GalleryApp] + :param url: The url of this V1GetK8SClusterKubeconfigURLResponse. # noqa: E501 + :type: str """ - self._apps = apps + self._url = url def to_dict(self) -> dict: """Returns the model properties as a dict""" @@ -101,7 +101,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(V1ListGalleryLightningappsResponse, dict): + if issubclass(V1GetK8SClusterKubeconfigURLResponse, dict): for key, value in self.items(): result[key] = value @@ -115,13 +115,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'V1ListGalleryLightningappsResponse') -> bool: + def __eq__(self, other: 'V1GetK8SClusterKubeconfigURLResponse') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, V1ListGalleryLightningappsResponse): + if not isinstance(other, V1GetK8SClusterKubeconfigURLResponse): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'V1ListGalleryLightningappsResponse') -> bool: + def __ne__(self, other: 'V1GetK8SClusterKubeconfigURLResponse') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_cloud_space_apps_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_machine_setup_url_response.py similarity index 71% rename from python/lightning_sdk/lightning_cloud/openapi/models/v1_list_cloud_space_apps_response.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_get_machine_setup_url_response.py index 706741506..8251e8ef9 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_cloud_space_apps_response.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_machine_setup_url_response.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class V1ListCloudSpaceAppsResponse(object): +class V1GetMachineSetupURLResponse(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -45,40 +45,42 @@ class V1ListCloudSpaceAppsResponse(object): and the value is json key in definition. """ swagger_types = { - 'apps': 'list[V1CloudSpaceApp]' + 'url': 'str' } attribute_map = { - 'apps': 'apps' + 'url': 'url' } - def __init__(self, apps: 'list[V1CloudSpaceApp]' =None): # noqa: E501 - """V1ListCloudSpaceAppsResponse - a model defined in Swagger""" # noqa: E501 - self._apps = None + def __init__(self, url: 'str' =None): # noqa: E501 + """V1GetMachineSetupURLResponse - a model defined in Swagger""" # noqa: E501 + self._url = None self.discriminator = None - if apps is not None: - self.apps = apps + if url is not None: + self.url = url @property - def apps(self) -> 'list[V1CloudSpaceApp]': - """Gets the apps of this V1ListCloudSpaceAppsResponse. # noqa: E501 + def url(self) -> 'str': + """Gets the url of this V1GetMachineSetupURLResponse. # noqa: E501 + /setup/machine URL carrying a user token that expires within minutes. # noqa: E501 - :return: The apps of this V1ListCloudSpaceAppsResponse. # noqa: E501 - :rtype: list[V1CloudSpaceApp] + :return: The url of this V1GetMachineSetupURLResponse. # noqa: E501 + :rtype: str """ - return self._apps + return self._url - @apps.setter - def apps(self, apps: 'list[V1CloudSpaceApp]'): - """Sets the apps of this V1ListCloudSpaceAppsResponse. + @url.setter + def url(self, url: 'str'): + """Sets the url of this V1GetMachineSetupURLResponse. + /setup/machine URL carrying a user token that expires within minutes. # noqa: E501 - :param apps: The apps of this V1ListCloudSpaceAppsResponse. # noqa: E501 - :type: list[V1CloudSpaceApp] + :param url: The url of this V1GetMachineSetupURLResponse. # noqa: E501 + :type: str """ - self._apps = apps + self._url = url def to_dict(self) -> dict: """Returns the model properties as a dict""" @@ -101,7 +103,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(V1ListCloudSpaceAppsResponse, dict): + if issubclass(V1GetMachineSetupURLResponse, dict): for key, value in self.items(): result[key] = value @@ -115,13 +117,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'V1ListCloudSpaceAppsResponse') -> bool: + def __eq__(self, other: 'V1GetMachineSetupURLResponse') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, V1ListCloudSpaceAppsResponse): + if not isinstance(other, V1GetMachineSetupURLResponse): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'V1ListCloudSpaceAppsResponse') -> bool: + def __ne__(self, other: 'V1GetMachineSetupURLResponse') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_organization_storage_metadata_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_organization_storage_metadata_response.py index 0441550e0..ae1e3933f 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_organization_storage_metadata_response.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_organization_storage_metadata_response.py @@ -46,6 +46,7 @@ class V1GetOrganizationStorageMetadataResponse(object): """ swagger_types = { 'account_limit_bytes': 'str', + 'account_limit_reason': 'V1StorageLimitReason', 'estimated_daily_cost': 'float', 'estimated_daily_efs_cost': 'float', 'id': 'str', @@ -64,6 +65,7 @@ class V1GetOrganizationStorageMetadataResponse(object): attribute_map = { 'account_limit_bytes': 'accountLimitBytes', + 'account_limit_reason': 'accountLimitReason', 'estimated_daily_cost': 'estimatedDailyCost', 'estimated_daily_efs_cost': 'estimatedDailyEfsCost', 'id': 'id', @@ -80,9 +82,10 @@ class V1GetOrganizationStorageMetadataResponse(object): 'total_upload_storage_bytes': 'totalUploadStorageBytes' } - def __init__(self, account_limit_bytes: 'str' =None, estimated_daily_cost: 'float' =None, estimated_daily_efs_cost: 'float' =None, id: 'str' =None, project_metadata: 'list[V1ProjectStorage]' =None, total_billable_bytes: 'str' =None, total_cloudspace_storage_bytes: 'str' =None, total_container_registry_storage_bytes: 'str' =None, total_data_connection_storage_bytes: 'str' =None, total_folder_storage_bytes: 'str' =None, total_free_storage_bytes: 'str' =None, total_job_storage_bytes: 'str' =None, total_model_storage_bytes: 'str' =None, total_storage_bytes: 'str' =None, total_upload_storage_bytes: 'str' =None): # noqa: E501 + def __init__(self, account_limit_bytes: 'str' =None, account_limit_reason: 'V1StorageLimitReason' =None, estimated_daily_cost: 'float' =None, estimated_daily_efs_cost: 'float' =None, id: 'str' =None, project_metadata: 'list[V1ProjectStorage]' =None, total_billable_bytes: 'str' =None, total_cloudspace_storage_bytes: 'str' =None, total_container_registry_storage_bytes: 'str' =None, total_data_connection_storage_bytes: 'str' =None, total_folder_storage_bytes: 'str' =None, total_free_storage_bytes: 'str' =None, total_job_storage_bytes: 'str' =None, total_model_storage_bytes: 'str' =None, total_storage_bytes: 'str' =None, total_upload_storage_bytes: 'str' =None): # noqa: E501 """V1GetOrganizationStorageMetadataResponse - a model defined in Swagger""" # noqa: E501 self._account_limit_bytes = None + self._account_limit_reason = None self._estimated_daily_cost = None self._estimated_daily_efs_cost = None self._id = None @@ -100,6 +103,8 @@ def __init__(self, account_limit_bytes: 'str' =None, estimated_daily_cost: 'floa self.discriminator = None if account_limit_bytes is not None: self.account_limit_bytes = account_limit_bytes + if account_limit_reason is not None: + self.account_limit_reason = account_limit_reason if estimated_daily_cost is not None: self.estimated_daily_cost = estimated_daily_cost if estimated_daily_efs_cost is not None: @@ -150,6 +155,27 @@ def account_limit_bytes(self, account_limit_bytes: 'str'): self._account_limit_bytes = account_limit_bytes + @property + def account_limit_reason(self) -> 'V1StorageLimitReason': + """Gets the account_limit_reason of this V1GetOrganizationStorageMetadataResponse. # noqa: E501 + + + :return: The account_limit_reason of this V1GetOrganizationStorageMetadataResponse. # noqa: E501 + :rtype: V1StorageLimitReason + """ + return self._account_limit_reason + + @account_limit_reason.setter + def account_limit_reason(self, account_limit_reason: 'V1StorageLimitReason'): + """Sets the account_limit_reason of this V1GetOrganizationStorageMetadataResponse. + + + :param account_limit_reason: The account_limit_reason of this V1GetOrganizationStorageMetadataResponse. # noqa: E501 + :type: V1StorageLimitReason + """ + + self._account_limit_reason = account_limit_reason + @property def estimated_daily_cost(self) -> 'float': """Gets the estimated_daily_cost of this V1GetOrganizationStorageMetadataResponse. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_ssh_setup_url_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_ssh_setup_url_response.py new file mode 100644 index 000000000..0de16f115 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_ssh_setup_url_response.py @@ -0,0 +1,153 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1GetSSHSetupURLResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'url': 'str', + 'windows_url': 'str' + } + + attribute_map = { + 'url': 'url', + 'windows_url': 'windowsUrl' + } + + def __init__(self, url: 'str' =None, windows_url: 'str' =None): # noqa: E501 + """V1GetSSHSetupURLResponse - a model defined in Swagger""" # noqa: E501 + self._url = None + self._windows_url = None + self.discriminator = None + if url is not None: + self.url = url + if windows_url is not None: + self.windows_url = windows_url + + @property + def url(self) -> 'str': + """Gets the url of this V1GetSSHSetupURLResponse. # noqa: E501 + + + :return: The url of this V1GetSSHSetupURLResponse. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url: 'str'): + """Sets the url of this V1GetSSHSetupURLResponse. + + + :param url: The url of this V1GetSSHSetupURLResponse. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def windows_url(self) -> 'str': + """Gets the windows_url of this V1GetSSHSetupURLResponse. # noqa: E501 + + + :return: The windows_url of this V1GetSSHSetupURLResponse. # noqa: E501 + :rtype: str + """ + return self._windows_url + + @windows_url.setter + def windows_url(self, windows_url: 'str'): + """Sets the windows_url of this V1GetSSHSetupURLResponse. + + + :param windows_url: The windows_url of this V1GetSSHSetupURLResponse. # noqa: E501 + :type: str + """ + + self._windows_url = windows_url + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1GetSSHSetupURLResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1GetSSHSetupURLResponse') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1GetSSHSetupURLResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1GetSSHSetupURLResponse') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py index 3411c5cf2..b358b8550 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py @@ -46,10 +46,7 @@ class V1GetUserResponse(object): """ swagger_types = { 'agree_to_terms_and_conditions': 'bool', - 'allow_credits_auto_replenish': 'bool', 'api_key': 'str', - 'auto_replenish_amount': 'float', - 'auto_replenish_threshold': 'float', 'country': 'str', 'disable_shell_persistence': 'bool', 'eligible_for_credit_card_unlock': 'bool', @@ -94,10 +91,7 @@ class V1GetUserResponse(object): attribute_map = { 'agree_to_terms_and_conditions': 'agreeToTermsAndConditions', - 'allow_credits_auto_replenish': 'allowCreditsAutoReplenish', 'api_key': 'apiKey', - 'auto_replenish_amount': 'autoReplenishAmount', - 'auto_replenish_threshold': 'autoReplenishThreshold', 'country': 'country', 'disable_shell_persistence': 'disableShellPersistence', 'eligible_for_credit_card_unlock': 'eligibleForCreditCardUnlock', @@ -140,13 +134,10 @@ class V1GetUserResponse(object): 'website': 'website' } - def __init__(self, agree_to_terms_and_conditions: 'bool' =None, allow_credits_auto_replenish: 'bool' =None, api_key: 'str' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, country: 'str' =None, disable_shell_persistence: 'bool' =None, eligible_for_credit_card_unlock: 'bool' =None, email: 'str' =None, experimentation_id: 'str' =None, features: 'V1UserFeatures' =None, first_name: 'str' =None, general_audience_mode: 'bool' =None, id: 'str' =None, internal_billing_admin: 'bool' =None, internal_blog_admin: 'bool' =None, internal_docs_admin: 'bool' =None, internal_model_apis_admin: 'bool' =None, invite_code: 'str' =None, is_internal: 'bool' =None, last_name: 'str' =None, linux_username: 'str' =None, non_developer_mode: 'bool' =None, opted_in_marketing_emails: 'bool' =None, organization: 'str' =None, organizations: 'list[V1Organization]' =None, phone_number: 'str' =None, picture_url: 'str' =None, preferred_color_scheme: 'str' =None, preferred_ide: 'str' =None, preferred_shell: 'str' =None, preferred_vscode_marketplace: 'str' =None, role: 'str' =None, saw_create_first_project_dialog: 'bool' =None, saw_forums_login_merge_dialog: 'bool' =None, saw_free_credits_notification: 'bool' =None, sb: 'bool' =None, source: 'str' =None, status: 'Externalv1UserStatus' =None, storage_bytes: 'str' =None, storage_overuse_deletion_at: 'datetime' =None, test_user: 'bool' =None, user_metadata: 'str' =None, username: 'str' =None, website: 'str' =None): # noqa: E501 + def __init__(self, agree_to_terms_and_conditions: 'bool' =None, api_key: 'str' =None, country: 'str' =None, disable_shell_persistence: 'bool' =None, eligible_for_credit_card_unlock: 'bool' =None, email: 'str' =None, experimentation_id: 'str' =None, features: 'V1UserFeatures' =None, first_name: 'str' =None, general_audience_mode: 'bool' =None, id: 'str' =None, internal_billing_admin: 'bool' =None, internal_blog_admin: 'bool' =None, internal_docs_admin: 'bool' =None, internal_model_apis_admin: 'bool' =None, invite_code: 'str' =None, is_internal: 'bool' =None, last_name: 'str' =None, linux_username: 'str' =None, non_developer_mode: 'bool' =None, opted_in_marketing_emails: 'bool' =None, organization: 'str' =None, organizations: 'list[V1Organization]' =None, phone_number: 'str' =None, picture_url: 'str' =None, preferred_color_scheme: 'str' =None, preferred_ide: 'str' =None, preferred_shell: 'str' =None, preferred_vscode_marketplace: 'str' =None, role: 'str' =None, saw_create_first_project_dialog: 'bool' =None, saw_forums_login_merge_dialog: 'bool' =None, saw_free_credits_notification: 'bool' =None, sb: 'bool' =None, source: 'str' =None, status: 'Externalv1UserStatus' =None, storage_bytes: 'str' =None, storage_overuse_deletion_at: 'datetime' =None, test_user: 'bool' =None, user_metadata: 'str' =None, username: 'str' =None, website: 'str' =None): # noqa: E501 """V1GetUserResponse - a model defined in Swagger""" # noqa: E501 self._agree_to_terms_and_conditions = None - self._allow_credits_auto_replenish = None self._api_key = None - self._auto_replenish_amount = None - self._auto_replenish_threshold = None self._country = None self._disable_shell_persistence = None self._eligible_for_credit_card_unlock = None @@ -190,14 +181,8 @@ def __init__(self, agree_to_terms_and_conditions: 'bool' =None, allow_credits_au self.discriminator = None if agree_to_terms_and_conditions is not None: self.agree_to_terms_and_conditions = agree_to_terms_and_conditions - if allow_credits_auto_replenish is not None: - self.allow_credits_auto_replenish = allow_credits_auto_replenish if api_key is not None: self.api_key = api_key - if auto_replenish_amount is not None: - self.auto_replenish_amount = auto_replenish_amount - if auto_replenish_threshold is not None: - self.auto_replenish_threshold = auto_replenish_threshold if country is not None: self.country = country if disable_shell_persistence is not None: @@ -300,29 +285,6 @@ def agree_to_terms_and_conditions(self, agree_to_terms_and_conditions: 'bool'): self._agree_to_terms_and_conditions = agree_to_terms_and_conditions - @property - def allow_credits_auto_replenish(self) -> 'bool': - """Gets the allow_credits_auto_replenish of this V1GetUserResponse. # noqa: E501 - - If true, credits will be auto-replenished from the credit card on file. # noqa: E501 - - :return: The allow_credits_auto_replenish of this V1GetUserResponse. # noqa: E501 - :rtype: bool - """ - return self._allow_credits_auto_replenish - - @allow_credits_auto_replenish.setter - def allow_credits_auto_replenish(self, allow_credits_auto_replenish: 'bool'): - """Sets the allow_credits_auto_replenish of this V1GetUserResponse. - - If true, credits will be auto-replenished from the credit card on file. # noqa: E501 - - :param allow_credits_auto_replenish: The allow_credits_auto_replenish of this V1GetUserResponse. # noqa: E501 - :type: bool - """ - - self._allow_credits_auto_replenish = allow_credits_auto_replenish - @property def api_key(self) -> 'str': """Gets the api_key of this V1GetUserResponse. # noqa: E501 @@ -344,48 +306,6 @@ def api_key(self, api_key: 'str'): self._api_key = api_key - @property - def auto_replenish_amount(self) -> 'float': - """Gets the auto_replenish_amount of this V1GetUserResponse. # noqa: E501 - - - :return: The auto_replenish_amount of this V1GetUserResponse. # noqa: E501 - :rtype: float - """ - return self._auto_replenish_amount - - @auto_replenish_amount.setter - def auto_replenish_amount(self, auto_replenish_amount: 'float'): - """Sets the auto_replenish_amount of this V1GetUserResponse. - - - :param auto_replenish_amount: The auto_replenish_amount of this V1GetUserResponse. # noqa: E501 - :type: float - """ - - self._auto_replenish_amount = auto_replenish_amount - - @property - def auto_replenish_threshold(self) -> 'float': - """Gets the auto_replenish_threshold of this V1GetUserResponse. # noqa: E501 - - - :return: The auto_replenish_threshold of this V1GetUserResponse. # noqa: E501 - :rtype: float - """ - return self._auto_replenish_threshold - - @auto_replenish_threshold.setter - def auto_replenish_threshold(self, auto_replenish_threshold: 'float'): - """Sets the auto_replenish_threshold of this V1GetUserResponse. - - - :param auto_replenish_threshold: The auto_replenish_threshold of this V1GetUserResponse. # noqa: E501 - :type: float - """ - - self._auto_replenish_threshold = auto_replenish_threshold - @property def country(self) -> 'str': """Gets the country of this V1GetUserResponse. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py index 51f0ce03a..540d94131 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py @@ -62,6 +62,7 @@ class V1GoogleCloudDirectV1(object): 'service_account_email': 'str', 'source_cidr_ips': 'list[str]', 'subnets': 'list[V1SubnetSpec]', + 'uniform_disk_setup': 'bool', 'vpcs': 'list[V1GCPDirectVPC]' } @@ -83,10 +84,11 @@ class V1GoogleCloudDirectV1(object): 'service_account_email': 'serviceAccountEmail', 'source_cidr_ips': 'sourceCidrIps', 'subnets': 'subnets', + 'uniform_disk_setup': 'uniformDiskSetup', 'vpcs': 'vpcs' } - def __init__(self, bucket_name: 'str' =None, check_reservations: 'bool' =None, compute_project_role: 'str' =None, compute_service_account_email: 'str' =None, credentials_secret_id: 'str' =None, credentials_service_account_email: 'str' =None, custom_subnet_mode: 'bool' =None, filestore_firewall_mode_enabled: 'bool' =None, inventory_dataset: 'str' =None, inventory_table: 'str' =None, primary_region: 'str' =None, project_id: 'str' =None, project_sa_enabled: 'bool' =None, regions: 'list[str]' =None, service_account_email: 'str' =None, source_cidr_ips: 'list[str]' =None, subnets: 'list[V1SubnetSpec]' =None, vpcs: 'list[V1GCPDirectVPC]' =None): # noqa: E501 + def __init__(self, bucket_name: 'str' =None, check_reservations: 'bool' =None, compute_project_role: 'str' =None, compute_service_account_email: 'str' =None, credentials_secret_id: 'str' =None, credentials_service_account_email: 'str' =None, custom_subnet_mode: 'bool' =None, filestore_firewall_mode_enabled: 'bool' =None, inventory_dataset: 'str' =None, inventory_table: 'str' =None, primary_region: 'str' =None, project_id: 'str' =None, project_sa_enabled: 'bool' =None, regions: 'list[str]' =None, service_account_email: 'str' =None, source_cidr_ips: 'list[str]' =None, subnets: 'list[V1SubnetSpec]' =None, uniform_disk_setup: 'bool' =None, vpcs: 'list[V1GCPDirectVPC]' =None): # noqa: E501 """V1GoogleCloudDirectV1 - a model defined in Swagger""" # noqa: E501 self._bucket_name = None self._check_reservations = None @@ -105,6 +107,7 @@ def __init__(self, bucket_name: 'str' =None, check_reservations: 'bool' =None, c self._service_account_email = None self._source_cidr_ips = None self._subnets = None + self._uniform_disk_setup = None self._vpcs = None self.discriminator = None if bucket_name is not None: @@ -141,6 +144,8 @@ def __init__(self, bucket_name: 'str' =None, check_reservations: 'bool' =None, c self.source_cidr_ips = source_cidr_ips if subnets is not None: self.subnets = subnets + if uniform_disk_setup is not None: + self.uniform_disk_setup = uniform_disk_setup if vpcs is not None: self.vpcs = vpcs @@ -507,6 +512,27 @@ def subnets(self, subnets: 'list[V1SubnetSpec]'): self._subnets = subnets + @property + def uniform_disk_setup(self) -> 'bool': + """Gets the uniform_disk_setup of this V1GoogleCloudDirectV1. # noqa: E501 + + + :return: The uniform_disk_setup of this V1GoogleCloudDirectV1. # noqa: E501 + :rtype: bool + """ + return self._uniform_disk_setup + + @uniform_disk_setup.setter + def uniform_disk_setup(self, uniform_disk_setup: 'bool'): + """Sets the uniform_disk_setup of this V1GoogleCloudDirectV1. + + + :param uniform_disk_setup: The uniform_disk_setup of this V1GoogleCloudDirectV1. # noqa: E501 + :type: bool + """ + + self._uniform_disk_setup = uniform_disk_setup + @property def vpcs(self) -> 'list[V1GCPDirectVPC]': """Gets the vpcs of this V1GoogleCloudDirectV1. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_host_health.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_host_health.py index 255d3beba..d37be5f2f 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_host_health.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_host_health.py @@ -48,6 +48,10 @@ class V1HostHealth(object): 'aer_counters': 'list[V1AERCounter]', 'fabric_manager': 'V1FabricManagerHealth', 'gpu_create_host_crash': 'V1GPUCreateHostCrash', + 'ib_guids': 'list[V1HostIBGUIDRail]', + 'ib_pkeys': 'V1HostIBPKeysHealth', + 'inband_netplan': 'V1InbandNetplanHealth', + 'litaccess_ib_pkeys': 'V1HostIBPKeysHealth', 'node_fitness': 'V1NodeFitness', 'nvlink_fm_topology': 'V1NVLinkFMTopology', 'nvswitch_fatal': 'V1NVSwitchFatal', @@ -60,6 +64,10 @@ class V1HostHealth(object): 'aer_counters': 'aerCounters', 'fabric_manager': 'fabricManager', 'gpu_create_host_crash': 'gpuCreateHostCrash', + 'ib_guids': 'ibGuids', + 'ib_pkeys': 'ibPkeys', + 'inband_netplan': 'inbandNetplan', + 'litaccess_ib_pkeys': 'litaccessIbPkeys', 'node_fitness': 'nodeFitness', 'nvlink_fm_topology': 'nvlinkFmTopology', 'nvswitch_fatal': 'nvswitchFatal', @@ -68,11 +76,15 @@ class V1HostHealth(object): 'system': 'system' } - def __init__(self, aer_counters: 'list[V1AERCounter]' =None, fabric_manager: 'V1FabricManagerHealth' =None, gpu_create_host_crash: 'V1GPUCreateHostCrash' =None, node_fitness: 'V1NodeFitness' =None, nvlink_fm_topology: 'V1NVLinkFMTopology' =None, nvswitch_fatal: 'V1NVSwitchFatal' =None, recent_dmesg_errors: 'list[str]' =None, storage: 'V1HostStorage' =None, system: 'V1MachineSystemInfo' =None): # noqa: E501 + def __init__(self, aer_counters: 'list[V1AERCounter]' =None, fabric_manager: 'V1FabricManagerHealth' =None, gpu_create_host_crash: 'V1GPUCreateHostCrash' =None, ib_guids: 'list[V1HostIBGUIDRail]' =None, ib_pkeys: 'V1HostIBPKeysHealth' =None, inband_netplan: 'V1InbandNetplanHealth' =None, litaccess_ib_pkeys: 'V1HostIBPKeysHealth' =None, node_fitness: 'V1NodeFitness' =None, nvlink_fm_topology: 'V1NVLinkFMTopology' =None, nvswitch_fatal: 'V1NVSwitchFatal' =None, recent_dmesg_errors: 'list[str]' =None, storage: 'V1HostStorage' =None, system: 'V1MachineSystemInfo' =None): # noqa: E501 """V1HostHealth - a model defined in Swagger""" # noqa: E501 self._aer_counters = None self._fabric_manager = None self._gpu_create_host_crash = None + self._ib_guids = None + self._ib_pkeys = None + self._inband_netplan = None + self._litaccess_ib_pkeys = None self._node_fitness = None self._nvlink_fm_topology = None self._nvswitch_fatal = None @@ -86,6 +98,14 @@ def __init__(self, aer_counters: 'list[V1AERCounter]' =None, fabric_manager: 'V1 self.fabric_manager = fabric_manager if gpu_create_host_crash is not None: self.gpu_create_host_crash = gpu_create_host_crash + if ib_guids is not None: + self.ib_guids = ib_guids + if ib_pkeys is not None: + self.ib_pkeys = ib_pkeys + if inband_netplan is not None: + self.inband_netplan = inband_netplan + if litaccess_ib_pkeys is not None: + self.litaccess_ib_pkeys = litaccess_ib_pkeys if node_fitness is not None: self.node_fitness = node_fitness if nvlink_fm_topology is not None: @@ -162,6 +182,90 @@ def gpu_create_host_crash(self, gpu_create_host_crash: 'V1GPUCreateHostCrash'): self._gpu_create_host_crash = gpu_create_host_crash + @property + def ib_guids(self) -> 'list[V1HostIBGUIDRail]': + """Gets the ib_guids of this V1HostHealth. # noqa: E501 + + + :return: The ib_guids of this V1HostHealth. # noqa: E501 + :rtype: list[V1HostIBGUIDRail] + """ + return self._ib_guids + + @ib_guids.setter + def ib_guids(self, ib_guids: 'list[V1HostIBGUIDRail]'): + """Sets the ib_guids of this V1HostHealth. + + + :param ib_guids: The ib_guids of this V1HostHealth. # noqa: E501 + :type: list[V1HostIBGUIDRail] + """ + + self._ib_guids = ib_guids + + @property + def ib_pkeys(self) -> 'V1HostIBPKeysHealth': + """Gets the ib_pkeys of this V1HostHealth. # noqa: E501 + + + :return: The ib_pkeys of this V1HostHealth. # noqa: E501 + :rtype: V1HostIBPKeysHealth + """ + return self._ib_pkeys + + @ib_pkeys.setter + def ib_pkeys(self, ib_pkeys: 'V1HostIBPKeysHealth'): + """Sets the ib_pkeys of this V1HostHealth. + + + :param ib_pkeys: The ib_pkeys of this V1HostHealth. # noqa: E501 + :type: V1HostIBPKeysHealth + """ + + self._ib_pkeys = ib_pkeys + + @property + def inband_netplan(self) -> 'V1InbandNetplanHealth': + """Gets the inband_netplan of this V1HostHealth. # noqa: E501 + + + :return: The inband_netplan of this V1HostHealth. # noqa: E501 + :rtype: V1InbandNetplanHealth + """ + return self._inband_netplan + + @inband_netplan.setter + def inband_netplan(self, inband_netplan: 'V1InbandNetplanHealth'): + """Sets the inband_netplan of this V1HostHealth. + + + :param inband_netplan: The inband_netplan of this V1HostHealth. # noqa: E501 + :type: V1InbandNetplanHealth + """ + + self._inband_netplan = inband_netplan + + @property + def litaccess_ib_pkeys(self) -> 'V1HostIBPKeysHealth': + """Gets the litaccess_ib_pkeys of this V1HostHealth. # noqa: E501 + + + :return: The litaccess_ib_pkeys of this V1HostHealth. # noqa: E501 + :rtype: V1HostIBPKeysHealth + """ + return self._litaccess_ib_pkeys + + @litaccess_ib_pkeys.setter + def litaccess_ib_pkeys(self, litaccess_ib_pkeys: 'V1HostIBPKeysHealth'): + """Sets the litaccess_ib_pkeys of this V1HostHealth. + + + :param litaccess_ib_pkeys: The litaccess_ib_pkeys of this V1HostHealth. # noqa: E501 + :type: V1HostIBPKeysHealth + """ + + self._litaccess_ib_pkeys = litaccess_ib_pkeys + @property def node_fitness(self) -> 'V1NodeFitness': """Gets the node_fitness of this V1HostHealth. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_host_ib_rail_p_keys.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_host_ib_rail_p_keys.py new file mode 100644 index 000000000..30b444d79 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_host_ib_rail_p_keys.py @@ -0,0 +1,231 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1HostIBRailPKeys(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'device': 'str', + 'guid': 'str', + 'host_index': 'int', + 'pkeys': 'list[str]', + 'port': 'str' + } + + attribute_map = { + 'device': 'device', + 'guid': 'guid', + 'host_index': 'hostIndex', + 'pkeys': 'pkeys', + 'port': 'port' + } + + def __init__(self, device: 'str' =None, guid: 'str' =None, host_index: 'int' =None, pkeys: 'list[str]' =None, port: 'str' =None): # noqa: E501 + """V1HostIBRailPKeys - a model defined in Swagger""" # noqa: E501 + self._device = None + self._guid = None + self._host_index = None + self._pkeys = None + self._port = None + self.discriminator = None + if device is not None: + self.device = device + if guid is not None: + self.guid = guid + if host_index is not None: + self.host_index = host_index + if pkeys is not None: + self.pkeys = pkeys + if port is not None: + self.port = port + + @property + def device(self) -> 'str': + """Gets the device of this V1HostIBRailPKeys. # noqa: E501 + + + :return: The device of this V1HostIBRailPKeys. # noqa: E501 + :rtype: str + """ + return self._device + + @device.setter + def device(self, device: 'str'): + """Sets the device of this V1HostIBRailPKeys. + + + :param device: The device of this V1HostIBRailPKeys. # noqa: E501 + :type: str + """ + + self._device = device + + @property + def guid(self) -> 'str': + """Gets the guid of this V1HostIBRailPKeys. # noqa: E501 + + + :return: The guid of this V1HostIBRailPKeys. # noqa: E501 + :rtype: str + """ + return self._guid + + @guid.setter + def guid(self, guid: 'str'): + """Sets the guid of this V1HostIBRailPKeys. + + + :param guid: The guid of this V1HostIBRailPKeys. # noqa: E501 + :type: str + """ + + self._guid = guid + + @property + def host_index(self) -> 'int': + """Gets the host_index of this V1HostIBRailPKeys. # noqa: E501 + + + :return: The host_index of this V1HostIBRailPKeys. # noqa: E501 + :rtype: int + """ + return self._host_index + + @host_index.setter + def host_index(self, host_index: 'int'): + """Sets the host_index of this V1HostIBRailPKeys. + + + :param host_index: The host_index of this V1HostIBRailPKeys. # noqa: E501 + :type: int + """ + + self._host_index = host_index + + @property + def pkeys(self) -> 'list[str]': + """Gets the pkeys of this V1HostIBRailPKeys. # noqa: E501 + + + :return: The pkeys of this V1HostIBRailPKeys. # noqa: E501 + :rtype: list[str] + """ + return self._pkeys + + @pkeys.setter + def pkeys(self, pkeys: 'list[str]'): + """Sets the pkeys of this V1HostIBRailPKeys. + + + :param pkeys: The pkeys of this V1HostIBRailPKeys. # noqa: E501 + :type: list[str] + """ + + self._pkeys = pkeys + + @property + def port(self) -> 'str': + """Gets the port of this V1HostIBRailPKeys. # noqa: E501 + + + :return: The port of this V1HostIBRailPKeys. # noqa: E501 + :rtype: str + """ + return self._port + + @port.setter + def port(self, port: 'str'): + """Sets the port of this V1HostIBRailPKeys. + + + :param port: The port of this V1HostIBRailPKeys. # noqa: E501 + :type: str + """ + + self._port = port + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1HostIBRailPKeys, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1HostIBRailPKeys') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1HostIBRailPKeys): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1HostIBRailPKeys') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_app_action.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_host_ibguid_rail.py similarity index 63% rename from python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_app_action.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_host_ibguid_rail.py index cf05cecdc..0738c5af0 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_app_action.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_host_ibguid_rail.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class V1CloudSpaceAppAction(object): +class V1HostIBGUIDRail(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -45,66 +45,66 @@ class V1CloudSpaceAppAction(object): and the value is json key in definition. """ swagger_types = { - 'content': 'str', - 'type': 'V1CloudSpaceAppActionType' + 'guid': 'str', + 'host_index': 'int' } attribute_map = { - 'content': 'content', - 'type': 'type' + 'guid': 'guid', + 'host_index': 'hostIndex' } - def __init__(self, content: 'str' =None, type: 'V1CloudSpaceAppActionType' =None): # noqa: E501 - """V1CloudSpaceAppAction - a model defined in Swagger""" # noqa: E501 - self._content = None - self._type = None + def __init__(self, guid: 'str' =None, host_index: 'int' =None): # noqa: E501 + """V1HostIBGUIDRail - a model defined in Swagger""" # noqa: E501 + self._guid = None + self._host_index = None self.discriminator = None - if content is not None: - self.content = content - if type is not None: - self.type = type + if guid is not None: + self.guid = guid + if host_index is not None: + self.host_index = host_index @property - def content(self) -> 'str': - """Gets the content of this V1CloudSpaceAppAction. # noqa: E501 + def guid(self) -> 'str': + """Gets the guid of this V1HostIBGUIDRail. # noqa: E501 - :return: The content of this V1CloudSpaceAppAction. # noqa: E501 + :return: The guid of this V1HostIBGUIDRail. # noqa: E501 :rtype: str """ - return self._content + return self._guid - @content.setter - def content(self, content: 'str'): - """Sets the content of this V1CloudSpaceAppAction. + @guid.setter + def guid(self, guid: 'str'): + """Sets the guid of this V1HostIBGUIDRail. - :param content: The content of this V1CloudSpaceAppAction. # noqa: E501 + :param guid: The guid of this V1HostIBGUIDRail. # noqa: E501 :type: str """ - self._content = content + self._guid = guid @property - def type(self) -> 'V1CloudSpaceAppActionType': - """Gets the type of this V1CloudSpaceAppAction. # noqa: E501 + def host_index(self) -> 'int': + """Gets the host_index of this V1HostIBGUIDRail. # noqa: E501 - :return: The type of this V1CloudSpaceAppAction. # noqa: E501 - :rtype: V1CloudSpaceAppActionType + :return: The host_index of this V1HostIBGUIDRail. # noqa: E501 + :rtype: int """ - return self._type + return self._host_index - @type.setter - def type(self, type: 'V1CloudSpaceAppActionType'): - """Sets the type of this V1CloudSpaceAppAction. + @host_index.setter + def host_index(self, host_index: 'int'): + """Sets the host_index of this V1HostIBGUIDRail. - :param type: The type of this V1CloudSpaceAppAction. # noqa: E501 - :type: V1CloudSpaceAppActionType + :param host_index: The host_index of this V1HostIBGUIDRail. # noqa: E501 + :type: int """ - self._type = type + self._host_index = host_index def to_dict(self) -> dict: """Returns the model properties as a dict""" @@ -127,7 +127,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(V1CloudSpaceAppAction, dict): + if issubclass(V1HostIBGUIDRail, dict): for key, value in self.items(): result[key] = value @@ -141,13 +141,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'V1CloudSpaceAppAction') -> bool: + def __eq__(self, other: 'V1HostIBGUIDRail') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, V1CloudSpaceAppAction): + if not isinstance(other, V1HostIBGUIDRail): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'V1CloudSpaceAppAction') -> bool: + def __ne__(self, other: 'V1HostIBGUIDRail') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_host_ibp_keys_health.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_host_ibp_keys_health.py new file mode 100644 index 000000000..8dfefa2e8 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_host_ibp_keys_health.py @@ -0,0 +1,205 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1HostIBPKeysHealth(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'detail': 'str', + 'observed_at': 'datetime', + 'rails': 'list[V1HostIBRailPKeys]', + 'state': 'str' + } + + attribute_map = { + 'detail': 'detail', + 'observed_at': 'observedAt', + 'rails': 'rails', + 'state': 'state' + } + + def __init__(self, detail: 'str' =None, observed_at: 'datetime' =None, rails: 'list[V1HostIBRailPKeys]' =None, state: 'str' =None): # noqa: E501 + """V1HostIBPKeysHealth - a model defined in Swagger""" # noqa: E501 + self._detail = None + self._observed_at = None + self._rails = None + self._state = None + self.discriminator = None + if detail is not None: + self.detail = detail + if observed_at is not None: + self.observed_at = observed_at + if rails is not None: + self.rails = rails + if state is not None: + self.state = state + + @property + def detail(self) -> 'str': + """Gets the detail of this V1HostIBPKeysHealth. # noqa: E501 + + + :return: The detail of this V1HostIBPKeysHealth. # noqa: E501 + :rtype: str + """ + return self._detail + + @detail.setter + def detail(self, detail: 'str'): + """Sets the detail of this V1HostIBPKeysHealth. + + + :param detail: The detail of this V1HostIBPKeysHealth. # noqa: E501 + :type: str + """ + + self._detail = detail + + @property + def observed_at(self) -> 'datetime': + """Gets the observed_at of this V1HostIBPKeysHealth. # noqa: E501 + + + :return: The observed_at of this V1HostIBPKeysHealth. # noqa: E501 + :rtype: datetime + """ + return self._observed_at + + @observed_at.setter + def observed_at(self, observed_at: 'datetime'): + """Sets the observed_at of this V1HostIBPKeysHealth. + + + :param observed_at: The observed_at of this V1HostIBPKeysHealth. # noqa: E501 + :type: datetime + """ + + self._observed_at = observed_at + + @property + def rails(self) -> 'list[V1HostIBRailPKeys]': + """Gets the rails of this V1HostIBPKeysHealth. # noqa: E501 + + + :return: The rails of this V1HostIBPKeysHealth. # noqa: E501 + :rtype: list[V1HostIBRailPKeys] + """ + return self._rails + + @rails.setter + def rails(self, rails: 'list[V1HostIBRailPKeys]'): + """Sets the rails of this V1HostIBPKeysHealth. + + + :param rails: The rails of this V1HostIBPKeysHealth. # noqa: E501 + :type: list[V1HostIBRailPKeys] + """ + + self._rails = rails + + @property + def state(self) -> 'str': + """Gets the state of this V1HostIBPKeysHealth. # noqa: E501 + + + :return: The state of this V1HostIBPKeysHealth. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state: 'str'): + """Sets the state of this V1HostIBPKeysHealth. + + + :param state: The state of this V1HostIBPKeysHealth. # noqa: E501 + :type: str + """ + + self._state = state + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1HostIBPKeysHealth, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1HostIBPKeysHealth') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1HostIBPKeysHealth): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1HostIBPKeysHealth') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_vultr_direct_v1.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_inband_netplan_health.py similarity index 51% rename from python/lightning_sdk/lightning_cloud/openapi/models/v1_vultr_direct_v1.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_inband_netplan_health.py index 40b4cacd9..90bb97f06 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_vultr_direct_v1.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_inband_netplan_health.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class V1VultrDirectV1(object): +class V1InbandNetplanHealth(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -45,94 +45,118 @@ class V1VultrDirectV1(object): and the value is json key in definition. """ swagger_types = { - 'credentials_secret_id': 'str', - 'primary_region': 'str', - 'regions': 'list[str]' + 'detail': 'str', + 'interface': 'str', + 'state': 'str', + 'subnet': 'str' } attribute_map = { - 'credentials_secret_id': 'credentialsSecretId', - 'primary_region': 'primaryRegion', - 'regions': 'regions' + 'detail': 'detail', + 'interface': 'interface', + 'state': 'state', + 'subnet': 'subnet' } - def __init__(self, credentials_secret_id: 'str' =None, primary_region: 'str' =None, regions: 'list[str]' =None): # noqa: E501 - """V1VultrDirectV1 - a model defined in Swagger""" # noqa: E501 - self._credentials_secret_id = None - self._primary_region = None - self._regions = None + def __init__(self, detail: 'str' =None, interface: 'str' =None, state: 'str' =None, subnet: 'str' =None): # noqa: E501 + """V1InbandNetplanHealth - a model defined in Swagger""" # noqa: E501 + self._detail = None + self._interface = None + self._state = None + self._subnet = None self.discriminator = None - if credentials_secret_id is not None: - self.credentials_secret_id = credentials_secret_id - if primary_region is not None: - self.primary_region = primary_region - if regions is not None: - self.regions = regions + if detail is not None: + self.detail = detail + if interface is not None: + self.interface = interface + if state is not None: + self.state = state + if subnet is not None: + self.subnet = subnet @property - def credentials_secret_id(self) -> 'str': - """Gets the credentials_secret_id of this V1VultrDirectV1. # noqa: E501 + def detail(self) -> 'str': + """Gets the detail of this V1InbandNetplanHealth. # noqa: E501 - ID of the secret that contains the Vultr API key. # noqa: E501 - :return: The credentials_secret_id of this V1VultrDirectV1. # noqa: E501 + :return: The detail of this V1InbandNetplanHealth. # noqa: E501 :rtype: str """ - return self._credentials_secret_id + return self._detail - @credentials_secret_id.setter - def credentials_secret_id(self, credentials_secret_id: 'str'): - """Sets the credentials_secret_id of this V1VultrDirectV1. + @detail.setter + def detail(self, detail: 'str'): + """Sets the detail of this V1InbandNetplanHealth. - ID of the secret that contains the Vultr API key. # noqa: E501 - :param credentials_secret_id: The credentials_secret_id of this V1VultrDirectV1. # noqa: E501 + :param detail: The detail of this V1InbandNetplanHealth. # noqa: E501 :type: str """ - self._credentials_secret_id = credentials_secret_id + self._detail = detail @property - def primary_region(self) -> 'str': - """Gets the primary_region of this V1VultrDirectV1. # noqa: E501 + def interface(self) -> 'str': + """Gets the interface of this V1InbandNetplanHealth. # noqa: E501 - :return: The primary_region of this V1VultrDirectV1. # noqa: E501 + :return: The interface of this V1InbandNetplanHealth. # noqa: E501 :rtype: str """ - return self._primary_region + return self._interface - @primary_region.setter - def primary_region(self, primary_region: 'str'): - """Sets the primary_region of this V1VultrDirectV1. + @interface.setter + def interface(self, interface: 'str'): + """Sets the interface of this V1InbandNetplanHealth. - :param primary_region: The primary_region of this V1VultrDirectV1. # noqa: E501 + :param interface: The interface of this V1InbandNetplanHealth. # noqa: E501 :type: str """ - self._primary_region = primary_region + self._interface = interface @property - def regions(self) -> 'list[str]': - """Gets the regions of this V1VultrDirectV1. # noqa: E501 + def state(self) -> 'str': + """Gets the state of this V1InbandNetplanHealth. # noqa: E501 - :return: The regions of this V1VultrDirectV1. # noqa: E501 - :rtype: list[str] + :return: The state of this V1InbandNetplanHealth. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state: 'str'): + """Sets the state of this V1InbandNetplanHealth. + + + :param state: The state of this V1InbandNetplanHealth. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def subnet(self) -> 'str': + """Gets the subnet of this V1InbandNetplanHealth. # noqa: E501 + + + :return: The subnet of this V1InbandNetplanHealth. # noqa: E501 + :rtype: str """ - return self._regions + return self._subnet - @regions.setter - def regions(self, regions: 'list[str]'): - """Sets the regions of this V1VultrDirectV1. + @subnet.setter + def subnet(self, subnet: 'str'): + """Sets the subnet of this V1InbandNetplanHealth. - :param regions: The regions of this V1VultrDirectV1. # noqa: E501 - :type: list[str] + :param subnet: The subnet of this V1InbandNetplanHealth. # noqa: E501 + :type: str """ - self._regions = regions + self._subnet = subnet def to_dict(self) -> dict: """Returns the model properties as a dict""" @@ -155,7 +179,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(V1VultrDirectV1, dict): + if issubclass(V1InbandNetplanHealth, dict): for key, value in self.items(): result[key] = value @@ -169,13 +193,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'V1VultrDirectV1') -> bool: + def __eq__(self, other: 'V1InbandNetplanHealth') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, V1VultrDirectV1): + if not isinstance(other, V1InbandNetplanHealth): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'V1VultrDirectV1') -> bool: + def __ne__(self, other: 'V1InbandNetplanHealth') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_cluster_reservations_for_usage_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_cluster_reservations_for_usage_response.py new file mode 100644 index 000000000..a189900b6 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_cluster_reservations_for_usage_response.py @@ -0,0 +1,231 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1ListClusterReservationsForUsageResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'current_usage': 'list[V1ClusterDetailsReservation]', + 'org_by_project': 'dict(str, str)', + 'org_names': 'dict(str, str)', + 'project_names': 'dict(str, str)', + 'reservations': 'list[V1ClusterCapacityReservation]' + } + + attribute_map = { + 'current_usage': 'currentUsage', + 'org_by_project': 'orgByProject', + 'org_names': 'orgNames', + 'project_names': 'projectNames', + 'reservations': 'reservations' + } + + def __init__(self, current_usage: 'list[V1ClusterDetailsReservation]' =None, org_by_project: 'dict(str, str)' =None, org_names: 'dict(str, str)' =None, project_names: 'dict(str, str)' =None, reservations: 'list[V1ClusterCapacityReservation]' =None): # noqa: E501 + """V1ListClusterReservationsForUsageResponse - a model defined in Swagger""" # noqa: E501 + self._current_usage = None + self._org_by_project = None + self._org_names = None + self._project_names = None + self._reservations = None + self.discriminator = None + if current_usage is not None: + self.current_usage = current_usage + if org_by_project is not None: + self.org_by_project = org_by_project + if org_names is not None: + self.org_names = org_names + if project_names is not None: + self.project_names = project_names + if reservations is not None: + self.reservations = reservations + + @property + def current_usage(self) -> 'list[V1ClusterDetailsReservation]': + """Gets the current_usage of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + + + :return: The current_usage of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + :rtype: list[V1ClusterDetailsReservation] + """ + return self._current_usage + + @current_usage.setter + def current_usage(self, current_usage: 'list[V1ClusterDetailsReservation]'): + """Sets the current_usage of this V1ListClusterReservationsForUsageResponse. + + + :param current_usage: The current_usage of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + :type: list[V1ClusterDetailsReservation] + """ + + self._current_usage = current_usage + + @property + def org_by_project(self) -> 'dict(str, str)': + """Gets the org_by_project of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + + + :return: The org_by_project of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + :rtype: dict(str, str) + """ + return self._org_by_project + + @org_by_project.setter + def org_by_project(self, org_by_project: 'dict(str, str)'): + """Sets the org_by_project of this V1ListClusterReservationsForUsageResponse. + + + :param org_by_project: The org_by_project of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + :type: dict(str, str) + """ + + self._org_by_project = org_by_project + + @property + def org_names(self) -> 'dict(str, str)': + """Gets the org_names of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + + + :return: The org_names of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + :rtype: dict(str, str) + """ + return self._org_names + + @org_names.setter + def org_names(self, org_names: 'dict(str, str)'): + """Sets the org_names of this V1ListClusterReservationsForUsageResponse. + + + :param org_names: The org_names of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + :type: dict(str, str) + """ + + self._org_names = org_names + + @property + def project_names(self) -> 'dict(str, str)': + """Gets the project_names of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + + + :return: The project_names of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + :rtype: dict(str, str) + """ + return self._project_names + + @project_names.setter + def project_names(self, project_names: 'dict(str, str)'): + """Sets the project_names of this V1ListClusterReservationsForUsageResponse. + + + :param project_names: The project_names of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + :type: dict(str, str) + """ + + self._project_names = project_names + + @property + def reservations(self) -> 'list[V1ClusterCapacityReservation]': + """Gets the reservations of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + + + :return: The reservations of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + :rtype: list[V1ClusterCapacityReservation] + """ + return self._reservations + + @reservations.setter + def reservations(self, reservations: 'list[V1ClusterCapacityReservation]'): + """Sets the reservations of this V1ListClusterReservationsForUsageResponse. + + + :param reservations: The reservations of this V1ListClusterReservationsForUsageResponse. # noqa: E501 + :type: list[V1ClusterCapacityReservation] + """ + + self._reservations = reservations + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1ListClusterReservationsForUsageResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1ListClusterReservationsForUsageResponse') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1ListClusterReservationsForUsageResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1ListClusterReservationsForUsageResponse') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_jobs_sort_by.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_jobs_sort_by.py index 7b6eeb7a9..936834ba3 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_jobs_sort_by.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_jobs_sort_by.py @@ -48,6 +48,8 @@ class V1ListJobsSortBy(object): INSTANCE_TYPE = "LIST_JOBS_SORT_BY_INSTANCE_TYPE" USER_ID = "LIST_JOBS_SORT_BY_USER_ID" CLUSTER_ID = "LIST_JOBS_SORT_BY_CLUSTER_ID" + STATE = "LIST_JOBS_SORT_BY_STATE" + DURATION = "LIST_JOBS_SORT_BY_DURATION" """ Attributes: swagger_types (dict): The key is attribute name diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_provider_fleet_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_provider_fleet_response.py new file mode 100644 index 000000000..969c78c91 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_provider_fleet_response.py @@ -0,0 +1,361 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1ListProviderFleetResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'configured': 'bool', + 'control_plane_environment': 'str', + 'last_observed_at': 'datetime', + 'nodes': 'list[V1ProviderFleetNode]', + 'provider': 'str', + 'provider_organization_id': 'str', + 'registered_nodes_outside_fleet': 'int', + 'stale': 'bool', + 'usage_history': 'list[V1ProviderFleetUsagePoint]', + 'usage_interval_seconds': 'int' + } + + attribute_map = { + 'configured': 'configured', + 'control_plane_environment': 'controlPlaneEnvironment', + 'last_observed_at': 'lastObservedAt', + 'nodes': 'nodes', + 'provider': 'provider', + 'provider_organization_id': 'providerOrganizationId', + 'registered_nodes_outside_fleet': 'registeredNodesOutsideFleet', + 'stale': 'stale', + 'usage_history': 'usageHistory', + 'usage_interval_seconds': 'usageIntervalSeconds' + } + + def __init__(self, configured: 'bool' =None, control_plane_environment: 'str' =None, last_observed_at: 'datetime' =None, nodes: 'list[V1ProviderFleetNode]' =None, provider: 'str' =None, provider_organization_id: 'str' =None, registered_nodes_outside_fleet: 'int' =None, stale: 'bool' =None, usage_history: 'list[V1ProviderFleetUsagePoint]' =None, usage_interval_seconds: 'int' =None): # noqa: E501 + """V1ListProviderFleetResponse - a model defined in Swagger""" # noqa: E501 + self._configured = None + self._control_plane_environment = None + self._last_observed_at = None + self._nodes = None + self._provider = None + self._provider_organization_id = None + self._registered_nodes_outside_fleet = None + self._stale = None + self._usage_history = None + self._usage_interval_seconds = None + self.discriminator = None + if configured is not None: + self.configured = configured + if control_plane_environment is not None: + self.control_plane_environment = control_plane_environment + if last_observed_at is not None: + self.last_observed_at = last_observed_at + if nodes is not None: + self.nodes = nodes + if provider is not None: + self.provider = provider + if provider_organization_id is not None: + self.provider_organization_id = provider_organization_id + if registered_nodes_outside_fleet is not None: + self.registered_nodes_outside_fleet = registered_nodes_outside_fleet + if stale is not None: + self.stale = stale + if usage_history is not None: + self.usage_history = usage_history + if usage_interval_seconds is not None: + self.usage_interval_seconds = usage_interval_seconds + + @property + def configured(self) -> 'bool': + """Gets the configured of this V1ListProviderFleetResponse. # noqa: E501 + + + :return: The configured of this V1ListProviderFleetResponse. # noqa: E501 + :rtype: bool + """ + return self._configured + + @configured.setter + def configured(self, configured: 'bool'): + """Sets the configured of this V1ListProviderFleetResponse. + + + :param configured: The configured of this V1ListProviderFleetResponse. # noqa: E501 + :type: bool + """ + + self._configured = configured + + @property + def control_plane_environment(self) -> 'str': + """Gets the control_plane_environment of this V1ListProviderFleetResponse. # noqa: E501 + + + :return: The control_plane_environment of this V1ListProviderFleetResponse. # noqa: E501 + :rtype: str + """ + return self._control_plane_environment + + @control_plane_environment.setter + def control_plane_environment(self, control_plane_environment: 'str'): + """Sets the control_plane_environment of this V1ListProviderFleetResponse. + + + :param control_plane_environment: The control_plane_environment of this V1ListProviderFleetResponse. # noqa: E501 + :type: str + """ + + self._control_plane_environment = control_plane_environment + + @property + def last_observed_at(self) -> 'datetime': + """Gets the last_observed_at of this V1ListProviderFleetResponse. # noqa: E501 + + + :return: The last_observed_at of this V1ListProviderFleetResponse. # noqa: E501 + :rtype: datetime + """ + return self._last_observed_at + + @last_observed_at.setter + def last_observed_at(self, last_observed_at: 'datetime'): + """Sets the last_observed_at of this V1ListProviderFleetResponse. + + + :param last_observed_at: The last_observed_at of this V1ListProviderFleetResponse. # noqa: E501 + :type: datetime + """ + + self._last_observed_at = last_observed_at + + @property + def nodes(self) -> 'list[V1ProviderFleetNode]': + """Gets the nodes of this V1ListProviderFleetResponse. # noqa: E501 + + + :return: The nodes of this V1ListProviderFleetResponse. # noqa: E501 + :rtype: list[V1ProviderFleetNode] + """ + return self._nodes + + @nodes.setter + def nodes(self, nodes: 'list[V1ProviderFleetNode]'): + """Sets the nodes of this V1ListProviderFleetResponse. + + + :param nodes: The nodes of this V1ListProviderFleetResponse. # noqa: E501 + :type: list[V1ProviderFleetNode] + """ + + self._nodes = nodes + + @property + def provider(self) -> 'str': + """Gets the provider of this V1ListProviderFleetResponse. # noqa: E501 + + + :return: The provider of this V1ListProviderFleetResponse. # noqa: E501 + :rtype: str + """ + return self._provider + + @provider.setter + def provider(self, provider: 'str'): + """Sets the provider of this V1ListProviderFleetResponse. + + + :param provider: The provider of this V1ListProviderFleetResponse. # noqa: E501 + :type: str + """ + + self._provider = provider + + @property + def provider_organization_id(self) -> 'str': + """Gets the provider_organization_id of this V1ListProviderFleetResponse. # noqa: E501 + + + :return: The provider_organization_id of this V1ListProviderFleetResponse. # noqa: E501 + :rtype: str + """ + return self._provider_organization_id + + @provider_organization_id.setter + def provider_organization_id(self, provider_organization_id: 'str'): + """Sets the provider_organization_id of this V1ListProviderFleetResponse. + + + :param provider_organization_id: The provider_organization_id of this V1ListProviderFleetResponse. # noqa: E501 + :type: str + """ + + self._provider_organization_id = provider_organization_id + + @property + def registered_nodes_outside_fleet(self) -> 'int': + """Gets the registered_nodes_outside_fleet of this V1ListProviderFleetResponse. # noqa: E501 + + + :return: The registered_nodes_outside_fleet of this V1ListProviderFleetResponse. # noqa: E501 + :rtype: int + """ + return self._registered_nodes_outside_fleet + + @registered_nodes_outside_fleet.setter + def registered_nodes_outside_fleet(self, registered_nodes_outside_fleet: 'int'): + """Sets the registered_nodes_outside_fleet of this V1ListProviderFleetResponse. + + + :param registered_nodes_outside_fleet: The registered_nodes_outside_fleet of this V1ListProviderFleetResponse. # noqa: E501 + :type: int + """ + + self._registered_nodes_outside_fleet = registered_nodes_outside_fleet + + @property + def stale(self) -> 'bool': + """Gets the stale of this V1ListProviderFleetResponse. # noqa: E501 + + + :return: The stale of this V1ListProviderFleetResponse. # noqa: E501 + :rtype: bool + """ + return self._stale + + @stale.setter + def stale(self, stale: 'bool'): + """Sets the stale of this V1ListProviderFleetResponse. + + + :param stale: The stale of this V1ListProviderFleetResponse. # noqa: E501 + :type: bool + """ + + self._stale = stale + + @property + def usage_history(self) -> 'list[V1ProviderFleetUsagePoint]': + """Gets the usage_history of this V1ListProviderFleetResponse. # noqa: E501 + + + :return: The usage_history of this V1ListProviderFleetResponse. # noqa: E501 + :rtype: list[V1ProviderFleetUsagePoint] + """ + return self._usage_history + + @usage_history.setter + def usage_history(self, usage_history: 'list[V1ProviderFleetUsagePoint]'): + """Sets the usage_history of this V1ListProviderFleetResponse. + + + :param usage_history: The usage_history of this V1ListProviderFleetResponse. # noqa: E501 + :type: list[V1ProviderFleetUsagePoint] + """ + + self._usage_history = usage_history + + @property + def usage_interval_seconds(self) -> 'int': + """Gets the usage_interval_seconds of this V1ListProviderFleetResponse. # noqa: E501 + + + :return: The usage_interval_seconds of this V1ListProviderFleetResponse. # noqa: E501 + :rtype: int + """ + return self._usage_interval_seconds + + @usage_interval_seconds.setter + def usage_interval_seconds(self, usage_interval_seconds: 'int'): + """Sets the usage_interval_seconds of this V1ListProviderFleetResponse. + + + :param usage_interval_seconds: The usage_interval_seconds of this V1ListProviderFleetResponse. # noqa: E501 + :type: int + """ + + self._usage_interval_seconds = usage_interval_seconds + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1ListProviderFleetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1ListProviderFleetResponse') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1ListProviderFleetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1ListProviderFleetResponse') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_login_request.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_login_request.py index 488dcc6bc..0aa0b186e 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_login_request.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_login_request.py @@ -47,25 +47,30 @@ class V1LoginRequest(object): swagger_types = { 'api_key': 'str', 'duration': 'str', + 'issue_session': 'bool', 'username': 'str' } attribute_map = { 'api_key': 'apiKey', 'duration': 'duration', + 'issue_session': 'issueSession', 'username': 'username' } - def __init__(self, api_key: 'str' =None, duration: 'str' =None, username: 'str' =None): # noqa: E501 + def __init__(self, api_key: 'str' =None, duration: 'str' =None, issue_session: 'bool' =None, username: 'str' =None): # noqa: E501 """V1LoginRequest - a model defined in Swagger""" # noqa: E501 self._api_key = None self._duration = None + self._issue_session = None self._username = None self.discriminator = None if api_key is not None: self.api_key = api_key if duration is not None: self.duration = duration + if issue_session is not None: + self.issue_session = issue_session if username is not None: self.username = username @@ -111,6 +116,29 @@ def duration(self, duration: 'str'): self._duration = duration + @property + def issue_session(self) -> 'bool': + """Gets the issue_session of this V1LoginRequest. # noqa: E501 + + Issue a server-side session cookie alongside the token. Browser sign-in only: API and CLI callers drop the cookie, and each one left behind counts against the user's session cap. # noqa: E501 + + :return: The issue_session of this V1LoginRequest. # noqa: E501 + :rtype: bool + """ + return self._issue_session + + @issue_session.setter + def issue_session(self, issue_session: 'bool'): + """Sets the issue_session of this V1LoginRequest. + + Issue a server-side session cookie alongside the token. Browser sign-in only: API and CLI callers drop the cookie, and each one left behind counts against the user's session cap. # noqa: E501 + + :param issue_session: The issue_session of this V1LoginRequest. # noqa: E501 + :type: bool + """ + + self._issue_session = issue_session + @property def username(self) -> 'str': """Gets the username of this V1LoginRequest. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine.py index 7e1d0edbf..ed0c05e22 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine.py @@ -51,6 +51,7 @@ class V1Machine(object): 'capacity_reservation_id': 'str', 'cluster_id': 'str', 'created_at': 'datetime', + 'customer_networks': 'list[V1MachineCustomerNetwork]', 'disable_monitoring': 'bool', 'env': 'list[V1EnvVar]', 'health': 'V1MachineHealth', @@ -99,6 +100,7 @@ class V1Machine(object): 'capacity_reservation_id': 'capacityReservationId', 'cluster_id': 'clusterId', 'created_at': 'createdAt', + 'customer_networks': 'customerNetworks', 'disable_monitoring': 'disableMonitoring', 'env': 'env', 'health': 'health', @@ -140,7 +142,7 @@ class V1Machine(object): 'warning_message': 'warningMessage' } - def __init__(self, added_by: 'str' =None, address: 'str' =None, auth_token: 'str' =None, capacity_reservation_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, disable_monitoring: 'bool' =None, env: 'list[V1EnvVar]' =None, health: 'V1MachineHealth' =None, id: 'str' =None, idrac_address: 'str' =None, inband_subnet: 'str' =None, instance_type: 'str' =None, management_api_url: 'str' =None, mode: 'str' =None, name: 'str' =None, only_spot: 'bool' =None, ordering_index: 'int' =None, org_id: 'str' =None, owned_by_lightning: 'bool' =None, private_address: 'str' =None, project_id: 'str' =None, provider: 'str' =None, provider_availability_zone: 'str' =None, provider_fabric_group: 'str' =None, provider_instance_id: 'str' =None, provider_node_id: 'str' =None, provider_region: 'str' =None, provisioning_method: 'str' =None, purpose: 'str' =None, ready_at: 'datetime' =None, requires_maintenance: 'bool' =None, requires_maintenance_reason: 'str' =None, requires_maintenance_started_at: 'datetime' =None, requires_maintenance_user_id: 'str' =None, resource_id: 'str' =None, resource_type: 'str' =None, resources: 'V1Resources' =None, schedulable_affinity: 'V1SchedulableAffinity' =None, ssh_username: 'str' =None, status: 'str' =None, switch_ip: 'str' =None, unschedulable: 'bool' =None, updated_at: 'datetime' =None, warning_message: 'str' =None): # noqa: E501 + def __init__(self, added_by: 'str' =None, address: 'str' =None, auth_token: 'str' =None, capacity_reservation_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, customer_networks: 'list[V1MachineCustomerNetwork]' =None, disable_monitoring: 'bool' =None, env: 'list[V1EnvVar]' =None, health: 'V1MachineHealth' =None, id: 'str' =None, idrac_address: 'str' =None, inband_subnet: 'str' =None, instance_type: 'str' =None, management_api_url: 'str' =None, mode: 'str' =None, name: 'str' =None, only_spot: 'bool' =None, ordering_index: 'int' =None, org_id: 'str' =None, owned_by_lightning: 'bool' =None, private_address: 'str' =None, project_id: 'str' =None, provider: 'str' =None, provider_availability_zone: 'str' =None, provider_fabric_group: 'str' =None, provider_instance_id: 'str' =None, provider_node_id: 'str' =None, provider_region: 'str' =None, provisioning_method: 'str' =None, purpose: 'str' =None, ready_at: 'datetime' =None, requires_maintenance: 'bool' =None, requires_maintenance_reason: 'str' =None, requires_maintenance_started_at: 'datetime' =None, requires_maintenance_user_id: 'str' =None, resource_id: 'str' =None, resource_type: 'str' =None, resources: 'V1Resources' =None, schedulable_affinity: 'V1SchedulableAffinity' =None, ssh_username: 'str' =None, status: 'str' =None, switch_ip: 'str' =None, unschedulable: 'bool' =None, updated_at: 'datetime' =None, warning_message: 'str' =None): # noqa: E501 """V1Machine - a model defined in Swagger""" # noqa: E501 self._added_by = None self._address = None @@ -148,6 +150,7 @@ def __init__(self, added_by: 'str' =None, address: 'str' =None, auth_token: 'str self._capacity_reservation_id = None self._cluster_id = None self._created_at = None + self._customer_networks = None self._disable_monitoring = None self._env = None self._health = None @@ -200,6 +203,8 @@ def __init__(self, added_by: 'str' =None, address: 'str' =None, auth_token: 'str self.cluster_id = cluster_id if created_at is not None: self.created_at = created_at + if customer_networks is not None: + self.customer_networks = customer_networks if disable_monitoring is not None: self.disable_monitoring = disable_monitoring if env is not None: @@ -405,6 +410,29 @@ def created_at(self, created_at: 'datetime'): self._created_at = created_at + @property + def customer_networks(self) -> 'list[V1MachineCustomerNetwork]': + """Gets the customer_networks of this V1Machine. # noqa: E501 + + The customer networks a vpn-gateway machine serves. Set only for Lightning staff, since it names other orgs' networks. # noqa: E501 + + :return: The customer_networks of this V1Machine. # noqa: E501 + :rtype: list[V1MachineCustomerNetwork] + """ + return self._customer_networks + + @customer_networks.setter + def customer_networks(self, customer_networks: 'list[V1MachineCustomerNetwork]'): + """Sets the customer_networks of this V1Machine. + + The customer networks a vpn-gateway machine serves. Set only for Lightning staff, since it names other orgs' networks. # noqa: E501 + + :param customer_networks: The customer_networks of this V1Machine. # noqa: E501 + :type: list[V1MachineCustomerNetwork] + """ + + self._customer_networks = customer_networks + @property def disable_monitoring(self) -> 'bool': """Gets the disable_monitoring of this V1Machine. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_customer_network.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_customer_network.py new file mode 100644 index 000000000..c6f5eb28a --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_customer_network.py @@ -0,0 +1,179 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1MachineCustomerNetwork(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'org_id': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'org_id': 'orgId' + } + + def __init__(self, id: 'str' =None, name: 'str' =None, org_id: 'str' =None): # noqa: E501 + """V1MachineCustomerNetwork - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self._org_id = None + self.discriminator = None + if id is not None: + self.id = id + if name is not None: + self.name = name + if org_id is not None: + self.org_id = org_id + + @property + def id(self) -> 'str': + """Gets the id of this V1MachineCustomerNetwork. # noqa: E501 + + + :return: The id of this V1MachineCustomerNetwork. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id: 'str'): + """Sets the id of this V1MachineCustomerNetwork. + + + :param id: The id of this V1MachineCustomerNetwork. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self) -> 'str': + """Gets the name of this V1MachineCustomerNetwork. # noqa: E501 + + + :return: The name of this V1MachineCustomerNetwork. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name: 'str'): + """Sets the name of this V1MachineCustomerNetwork. + + + :param name: The name of this V1MachineCustomerNetwork. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def org_id(self) -> 'str': + """Gets the org_id of this V1MachineCustomerNetwork. # noqa: E501 + + + :return: The org_id of this V1MachineCustomerNetwork. # noqa: E501 + :rtype: str + """ + return self._org_id + + @org_id.setter + def org_id(self, org_id: 'str'): + """Sets the org_id of this V1MachineCustomerNetwork. + + + :param org_id: The org_id of this V1MachineCustomerNetwork. # noqa: E501 + :type: str + """ + + self._org_id = org_id + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1MachineCustomerNetwork, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1MachineCustomerNetwork') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1MachineCustomerNetwork): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1MachineCustomerNetwork') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_details.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_details.py index 9f6f9498d..0af5ee724 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_details.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_details.py @@ -61,7 +61,8 @@ class V1MachineDetails(object): 'memory_total_mb': 'int', 'memory_used_mb': 'int', 'os_info': 'str', - 'vm_instances': 'list[V1VMInstance]' + 'vm_instances': 'list[V1VMInstance]', + 'vpn_services': 'V1MachineVPNServicesStatus' } attribute_map = { @@ -81,10 +82,11 @@ class V1MachineDetails(object): 'memory_total_mb': 'memoryTotalMb', 'memory_used_mb': 'memoryUsedMb', 'os_info': 'osInfo', - 'vm_instances': 'vmInstances' + 'vm_instances': 'vmInstances', + 'vpn_services': 'vpnServices' } - def __init__(self, allocated_servers: 'list[V1Server]' =None, app_uptime_ms: 'str' =None, app_version: 'str' =None, boot_params: 'str' =None, disk_total_gb: 'int' =None, disk_used_gb: 'int' =None, gpu_diagnostics: 'V1GPUDiagnosticReport' =None, gpus_allocated: 'int' =None, gpus_total: 'int' =None, host_uptime_ms: 'str' =None, instance_count: 'int' =None, kernel_version: 'str' =None, machine_images: 'list[V1MachineImageStatus]' =None, memory_total_mb: 'int' =None, memory_used_mb: 'int' =None, os_info: 'str' =None, vm_instances: 'list[V1VMInstance]' =None): # noqa: E501 + def __init__(self, allocated_servers: 'list[V1Server]' =None, app_uptime_ms: 'str' =None, app_version: 'str' =None, boot_params: 'str' =None, disk_total_gb: 'int' =None, disk_used_gb: 'int' =None, gpu_diagnostics: 'V1GPUDiagnosticReport' =None, gpus_allocated: 'int' =None, gpus_total: 'int' =None, host_uptime_ms: 'str' =None, instance_count: 'int' =None, kernel_version: 'str' =None, machine_images: 'list[V1MachineImageStatus]' =None, memory_total_mb: 'int' =None, memory_used_mb: 'int' =None, os_info: 'str' =None, vm_instances: 'list[V1VMInstance]' =None, vpn_services: 'V1MachineVPNServicesStatus' =None): # noqa: E501 """V1MachineDetails - a model defined in Swagger""" # noqa: E501 self._allocated_servers = None self._app_uptime_ms = None @@ -103,6 +105,7 @@ def __init__(self, allocated_servers: 'list[V1Server]' =None, app_uptime_ms: 'st self._memory_used_mb = None self._os_info = None self._vm_instances = None + self._vpn_services = None self.discriminator = None if allocated_servers is not None: self.allocated_servers = allocated_servers @@ -138,6 +141,8 @@ def __init__(self, allocated_servers: 'list[V1Server]' =None, app_uptime_ms: 'st self.os_info = os_info if vm_instances is not None: self.vm_instances = vm_instances + if vpn_services is not None: + self.vpn_services = vpn_services @property def allocated_servers(self) -> 'list[V1Server]': @@ -496,6 +501,27 @@ def vm_instances(self, vm_instances: 'list[V1VMInstance]'): self._vm_instances = vm_instances + @property + def vpn_services(self) -> 'V1MachineVPNServicesStatus': + """Gets the vpn_services of this V1MachineDetails. # noqa: E501 + + + :return: The vpn_services of this V1MachineDetails. # noqa: E501 + :rtype: V1MachineVPNServicesStatus + """ + return self._vpn_services + + @vpn_services.setter + def vpn_services(self, vpn_services: 'V1MachineVPNServicesStatus'): + """Sets the vpn_services of this V1MachineDetails. + + + :param vpn_services: The vpn_services of this V1MachineDetails. # noqa: E501 + :type: V1MachineVPNServicesStatus + """ + + self._vpn_services = vpn_services + def to_dict(self) -> dict: """Returns the model properties as a dict""" result = {} diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_exclusion.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_exclusion.py new file mode 100644 index 000000000..83441587d --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_exclusion.py @@ -0,0 +1,153 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1MachineExclusion(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'recorded_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'recorded_at': 'recordedAt' + } + + def __init__(self, id: 'str' =None, recorded_at: 'datetime' =None): # noqa: E501 + """V1MachineExclusion - a model defined in Swagger""" # noqa: E501 + self._id = None + self._recorded_at = None + self.discriminator = None + if id is not None: + self.id = id + if recorded_at is not None: + self.recorded_at = recorded_at + + @property + def id(self) -> 'str': + """Gets the id of this V1MachineExclusion. # noqa: E501 + + + :return: The id of this V1MachineExclusion. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id: 'str'): + """Sets the id of this V1MachineExclusion. + + + :param id: The id of this V1MachineExclusion. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def recorded_at(self) -> 'datetime': + """Gets the recorded_at of this V1MachineExclusion. # noqa: E501 + + + :return: The recorded_at of this V1MachineExclusion. # noqa: E501 + :rtype: datetime + """ + return self._recorded_at + + @recorded_at.setter + def recorded_at(self, recorded_at: 'datetime'): + """Sets the recorded_at of this V1MachineExclusion. + + + :param recorded_at: The recorded_at of this V1MachineExclusion. # noqa: E501 + :type: datetime + """ + + self._recorded_at = recorded_at + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1MachineExclusion, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1MachineExclusion') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1MachineExclusion): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1MachineExclusion') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_vpn_service_unit.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_vpn_service_unit.py new file mode 100644 index 000000000..aa79a3c07 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_vpn_service_unit.py @@ -0,0 +1,155 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1MachineVPNServiceUnit(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'state': 'str' + } + + attribute_map = { + 'name': 'name', + 'state': 'state' + } + + def __init__(self, name: 'str' =None, state: 'str' =None): # noqa: E501 + """V1MachineVPNServiceUnit - a model defined in Swagger""" # noqa: E501 + self._name = None + self._state = None + self.discriminator = None + if name is not None: + self.name = name + if state is not None: + self.state = state + + @property + def name(self) -> 'str': + """Gets the name of this V1MachineVPNServiceUnit. # noqa: E501 + + + :return: The name of this V1MachineVPNServiceUnit. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name: 'str'): + """Sets the name of this V1MachineVPNServiceUnit. + + + :param name: The name of this V1MachineVPNServiceUnit. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def state(self) -> 'str': + """Gets the state of this V1MachineVPNServiceUnit. # noqa: E501 + + systemd's ActiveState, e.g. \"active\", \"inactive\", \"failed\". # noqa: E501 + + :return: The state of this V1MachineVPNServiceUnit. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state: 'str'): + """Sets the state of this V1MachineVPNServiceUnit. + + systemd's ActiveState, e.g. \"active\", \"inactive\", \"failed\". # noqa: E501 + + :param state: The state of this V1MachineVPNServiceUnit. # noqa: E501 + :type: str + """ + + self._state = state + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1MachineVPNServiceUnit, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1MachineVPNServiceUnit') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1MachineVPNServiceUnit): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1MachineVPNServiceUnit') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_vpn_services_status.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_vpn_services_status.py new file mode 100644 index 000000000..6f4ca4a33 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine_vpn_services_status.py @@ -0,0 +1,155 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1MachineVPNServicesStatus(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'running': 'bool', + 'units': 'list[V1MachineVPNServiceUnit]' + } + + attribute_map = { + 'running': 'running', + 'units': 'units' + } + + def __init__(self, running: 'bool' =None, units: 'list[V1MachineVPNServiceUnit]' =None): # noqa: E501 + """V1MachineVPNServicesStatus - a model defined in Swagger""" # noqa: E501 + self._running = None + self._units = None + self.discriminator = None + if running is not None: + self.running = running + if units is not None: + self.units = units + + @property + def running(self) -> 'bool': + """Gets the running of this V1MachineVPNServicesStatus. # noqa: E501 + + True only when every unit is active. # noqa: E501 + + :return: The running of this V1MachineVPNServicesStatus. # noqa: E501 + :rtype: bool + """ + return self._running + + @running.setter + def running(self, running: 'bool'): + """Sets the running of this V1MachineVPNServicesStatus. + + True only when every unit is active. # noqa: E501 + + :param running: The running of this V1MachineVPNServicesStatus. # noqa: E501 + :type: bool + """ + + self._running = running + + @property + def units(self) -> 'list[V1MachineVPNServiceUnit]': + """Gets the units of this V1MachineVPNServicesStatus. # noqa: E501 + + + :return: The units of this V1MachineVPNServicesStatus. # noqa: E501 + :rtype: list[V1MachineVPNServiceUnit] + """ + return self._units + + @units.setter + def units(self, units: 'list[V1MachineVPNServiceUnit]'): + """Sets the units of this V1MachineVPNServicesStatus. + + + :param units: The units of this V1MachineVPNServicesStatus. # noqa: E501 + :type: list[V1MachineVPNServiceUnit] + """ + + self._units = units + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1MachineVPNServicesStatus, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1MachineVPNServicesStatus') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1MachineVPNServicesStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1MachineVPNServicesStatus') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_managed_model.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_managed_model.py index 729f970fb..9b0eb06d3 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_managed_model.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_managed_model.py @@ -62,6 +62,7 @@ class V1ManagedModel(object): 'name': 'str', 'prompt_token_price': 'float', 'prompt_token_price_above_threshold': 'float', + 'publish_status': 'str', 'status': 'V1AssistantModelStatus', 'temperature': 'float', 'throughput': 'float', @@ -89,6 +90,7 @@ class V1ManagedModel(object): 'name': 'name', 'prompt_token_price': 'promptTokenPrice', 'prompt_token_price_above_threshold': 'promptTokenPriceAboveThreshold', + 'publish_status': 'publishStatus', 'status': 'status', 'temperature': 'temperature', 'throughput': 'throughput', @@ -98,7 +100,7 @@ class V1ManagedModel(object): 'user_id': 'userId' } - def __init__(self, abilities: 'V1ManagedModelAbilities' =None, cache_creation_token_price: 'float' =None, cache_creation_token_price1h: 'float' =None, cache_read_token_price: 'float' =None, completion_token_price: 'float' =None, completion_token_price_above_threshold: 'float' =None, context_length: 'str' =None, created_at: 'datetime' =None, deployment_details: 'V1DeploymentDetails' =None, description: 'str' =None, display_name: 'str' =None, endpoint_id: 'str' =None, id: 'str' =None, max_completion_tokens: 'str' =None, name: 'str' =None, prompt_token_price: 'float' =None, prompt_token_price_above_threshold: 'float' =None, status: 'V1AssistantModelStatus' =None, temperature: 'float' =None, throughput: 'float' =None, time_to_first_token: 'float' =None, token_threshold: 'str' =None, top_k: 'str' =None, user_id: 'str' =None): # noqa: E501 + def __init__(self, abilities: 'V1ManagedModelAbilities' =None, cache_creation_token_price: 'float' =None, cache_creation_token_price1h: 'float' =None, cache_read_token_price: 'float' =None, completion_token_price: 'float' =None, completion_token_price_above_threshold: 'float' =None, context_length: 'str' =None, created_at: 'datetime' =None, deployment_details: 'V1DeploymentDetails' =None, description: 'str' =None, display_name: 'str' =None, endpoint_id: 'str' =None, id: 'str' =None, max_completion_tokens: 'str' =None, name: 'str' =None, prompt_token_price: 'float' =None, prompt_token_price_above_threshold: 'float' =None, publish_status: 'str' =None, status: 'V1AssistantModelStatus' =None, temperature: 'float' =None, throughput: 'float' =None, time_to_first_token: 'float' =None, token_threshold: 'str' =None, top_k: 'str' =None, user_id: 'str' =None): # noqa: E501 """V1ManagedModel - a model defined in Swagger""" # noqa: E501 self._abilities = None self._cache_creation_token_price = None @@ -117,6 +119,7 @@ def __init__(self, abilities: 'V1ManagedModelAbilities' =None, cache_creation_to self._name = None self._prompt_token_price = None self._prompt_token_price_above_threshold = None + self._publish_status = None self._status = None self._temperature = None self._throughput = None @@ -159,6 +162,8 @@ def __init__(self, abilities: 'V1ManagedModelAbilities' =None, cache_creation_to self.prompt_token_price = prompt_token_price if prompt_token_price_above_threshold is not None: self.prompt_token_price_above_threshold = prompt_token_price_above_threshold + if publish_status is not None: + self.publish_status = publish_status if status is not None: self.status = status if temperature is not None: @@ -531,6 +536,27 @@ def prompt_token_price_above_threshold(self, prompt_token_price_above_threshold: self._prompt_token_price_above_threshold = prompt_token_price_above_threshold + @property + def publish_status(self) -> 'str': + """Gets the publish_status of this V1ManagedModel. # noqa: E501 + + + :return: The publish_status of this V1ManagedModel. # noqa: E501 + :rtype: str + """ + return self._publish_status + + @publish_status.setter + def publish_status(self, publish_status: 'str'): + """Sets the publish_status of this V1ManagedModel. + + + :param publish_status: The publish_status of this V1ManagedModel. # noqa: E501 + :type: str + """ + + self._publish_status = publish_status + @property def status(self) -> 'V1AssistantModelStatus': """Gets the status of this V1ManagedModel. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_membership.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_membership.py index 37ca94744..089d355b3 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_membership.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_membership.py @@ -378,6 +378,7 @@ def free_storage_bytes(self, free_storage_bytes: 'str'): def is_default(self) -> 'bool': """Gets the is_default of this V1Membership. # noqa: E501 + The creator can leave, and an authorized caller can delete the teamspace. # noqa: E501 :return: The is_default of this V1Membership. # noqa: E501 :rtype: bool @@ -388,6 +389,7 @@ def is_default(self) -> 'bool': def is_default(self, is_default: 'bool'): """Sets the is_default of this V1Membership. + The creator can leave, and an authorized caller can delete the teamspace. # noqa: E501 :param is_default: The is_default of this V1Membership. # noqa: E501 :type: bool diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_node_fitness.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_node_fitness.py index 586742a94..34c96b2ef 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_node_fitness.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_node_fitness.py @@ -50,6 +50,7 @@ class V1NodeFitness(object): 'collection_posture': 'str', 'dma_entry_limit': 'V1DMAEntryLimit', 'dmi': 'V1DMIInfo', + 'firmware_inventory': 'V1FirmwareInventory', 'gpu_isolation': 'list[V1DeviceIsolationFitness]', 'iommu_collection_state': 'str', 'libnvfm': 'V1LibNVFMFitness', @@ -68,6 +69,7 @@ class V1NodeFitness(object): 'collection_posture': 'collectionPosture', 'dma_entry_limit': 'dmaEntryLimit', 'dmi': 'dmi', + 'firmware_inventory': 'firmwareInventory', 'gpu_isolation': 'gpuIsolation', 'iommu_collection_state': 'iommuCollectionState', 'libnvfm': 'libnvfm', @@ -80,13 +82,14 @@ class V1NodeFitness(object): 'rail_nic_isolation': 'railNicIsolation' } - def __init__(self, acs_collection_state: 'str' =None, ats_collection_state: 'str' =None, collection_posture: 'str' =None, dma_entry_limit: 'V1DMAEntryLimit' =None, dmi: 'V1DMIInfo' =None, gpu_isolation: 'list[V1DeviceIsolationFitness]' =None, iommu_collection_state: 'str' =None, libnvfm: 'V1LibNVFMFitness' =None, nic_firmware: 'list[V1NICFirmware]' =None, nics: 'list[V1NICFitness]' =None, pcie_ports: 'list[V1PciePortFitness]' =None, per_gpu: 'list[V1GpuFitness]' =None, pex_switch_fw: 'V1PexSwitchFWFitness' =None, quarantined_gpus: 'list[str]' =None, rail_nic_isolation: 'list[V1DeviceIsolationFitness]' =None): # noqa: E501 + def __init__(self, acs_collection_state: 'str' =None, ats_collection_state: 'str' =None, collection_posture: 'str' =None, dma_entry_limit: 'V1DMAEntryLimit' =None, dmi: 'V1DMIInfo' =None, firmware_inventory: 'V1FirmwareInventory' =None, gpu_isolation: 'list[V1DeviceIsolationFitness]' =None, iommu_collection_state: 'str' =None, libnvfm: 'V1LibNVFMFitness' =None, nic_firmware: 'list[V1NICFirmware]' =None, nics: 'list[V1NICFitness]' =None, pcie_ports: 'list[V1PciePortFitness]' =None, per_gpu: 'list[V1GpuFitness]' =None, pex_switch_fw: 'V1PexSwitchFWFitness' =None, quarantined_gpus: 'list[str]' =None, rail_nic_isolation: 'list[V1DeviceIsolationFitness]' =None): # noqa: E501 """V1NodeFitness - a model defined in Swagger""" # noqa: E501 self._acs_collection_state = None self._ats_collection_state = None self._collection_posture = None self._dma_entry_limit = None self._dmi = None + self._firmware_inventory = None self._gpu_isolation = None self._iommu_collection_state = None self._libnvfm = None @@ -108,6 +111,8 @@ def __init__(self, acs_collection_state: 'str' =None, ats_collection_state: 'str self.dma_entry_limit = dma_entry_limit if dmi is not None: self.dmi = dmi + if firmware_inventory is not None: + self.firmware_inventory = firmware_inventory if gpu_isolation is not None: self.gpu_isolation = gpu_isolation if iommu_collection_state is not None: @@ -238,6 +243,27 @@ def dmi(self, dmi: 'V1DMIInfo'): self._dmi = dmi + @property + def firmware_inventory(self) -> 'V1FirmwareInventory': + """Gets the firmware_inventory of this V1NodeFitness. # noqa: E501 + + + :return: The firmware_inventory of this V1NodeFitness. # noqa: E501 + :rtype: V1FirmwareInventory + """ + return self._firmware_inventory + + @firmware_inventory.setter + def firmware_inventory(self, firmware_inventory: 'V1FirmwareInventory'): + """Sets the firmware_inventory of this V1NodeFitness. + + + :param firmware_inventory: The firmware_inventory of this V1NodeFitness. # noqa: E501 + :type: V1FirmwareInventory + """ + + self._firmware_inventory = firmware_inventory + @property def gpu_isolation(self) -> 'list[V1DeviceIsolationFitness]': """Gets the gpu_isolation of this V1NodeFitness. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_organization.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_organization.py index 5ad02e10a..eb81071ae 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_organization.py @@ -67,6 +67,7 @@ class V1Organization(object): 'default_machine_image_version': 'str', 'default_machine_type': 'str', 'default_project_id': 'str', + 'default_teamspace_ids': 'list[str]', 'description': 'str', 'disable_coding_agents': 'bool', 'disable_public_templates': 'bool', @@ -76,8 +77,6 @@ class V1Organization(object): 'disallow_lambda_saas': 'bool', 'disallow_lightning_saas': 'bool', 'disallow_nebius_saas': 'bool', - 'disallow_voltage_park_saas': 'bool', - 'disallow_vultr_saas': 'bool', 'display_name': 'str', 'domain': 'str', 'email': 'str', @@ -89,6 +88,7 @@ class V1Organization(object): 'is_personal_org': 'bool', 'last_storage_overuse_notification_sent_at': 'datetime', 'location': 'str', + 'nairr': 'bool', 'name': 'str', 'preferred_cluster': 'str', 'preferred_deployment_provider': 'str', @@ -131,6 +131,7 @@ class V1Organization(object): 'default_machine_image_version': 'defaultMachineImageVersion', 'default_machine_type': 'defaultMachineType', 'default_project_id': 'defaultProjectId', + 'default_teamspace_ids': 'defaultTeamspaceIds', 'description': 'description', 'disable_coding_agents': 'disableCodingAgents', 'disable_public_templates': 'disablePublicTemplates', @@ -140,8 +141,6 @@ class V1Organization(object): 'disallow_lambda_saas': 'disallowLambdaSaas', 'disallow_lightning_saas': 'disallowLightningSaas', 'disallow_nebius_saas': 'disallowNebiusSaas', - 'disallow_voltage_park_saas': 'disallowVoltageParkSaas', - 'disallow_vultr_saas': 'disallowVultrSaas', 'display_name': 'displayName', 'domain': 'domain', 'email': 'email', @@ -153,6 +152,7 @@ class V1Organization(object): 'is_personal_org': 'isPersonalOrg', 'last_storage_overuse_notification_sent_at': 'lastStorageOveruseNotificationSentAt', 'location': 'location', + 'nairr': 'nairr', 'name': 'name', 'preferred_cluster': 'preferredCluster', 'preferred_deployment_provider': 'preferredDeploymentProvider', @@ -172,7 +172,7 @@ class V1Organization(object): 'workload_max_run_duration': 'workloadMaxRunDuration' } - def __init__(self, alerts_config: 'V1OrgAlertsConfig' =None, allow_billing_activity_page_v2: 'bool' =None, allow_budgeting: 'bool' =None, allow_cloud_space_publish: 'bool' =None, allow_credits_auto_replenish: 'bool' =None, allow_external_project_duplication: 'bool' =None, allow_guest: 'bool' =None, allow_lightning_hosted_models: 'bool' =None, allow_marketplace: 'bool' =None, allow_member_invitations: 'bool' =None, allow_member_teamspace_creation: 'bool' =None, auto_invite_by_domain: 'bool' =None, auto_join_domain_validations: 'dict(str, V1AutoJoinDomainValidation)' =None, auto_join_domains: 'list[str]' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, auto_switch_machine: 'bool' =None, created_at: 'datetime' =None, creator_id: 'str' =None, default_machine_image_version: 'str' =None, default_machine_type: 'str' =None, default_project_id: 'str' =None, description: 'str' =None, disable_coding_agents: 'bool' =None, disable_public_templates: 'bool' =None, disallow_aws_saas: 'bool' =None, disallow_dgx_saas: 'bool' =None, disallow_gcp_saas: 'bool' =None, disallow_lambda_saas: 'bool' =None, disallow_lightning_saas: 'bool' =None, disallow_nebius_saas: 'bool' =None, disallow_voltage_park_saas: 'bool' =None, disallow_vultr_saas: 'bool' =None, display_name: 'str' =None, domain: 'str' =None, email: 'str' =None, featured_gallery: 'bool' =None, full_story_end_date: 'datetime' =None, full_story_start_date: 'datetime' =None, general_teamspace: 'bool' =None, id: 'str' =None, is_personal_org: 'bool' =None, last_storage_overuse_notification_sent_at: 'datetime' =None, location: 'str' =None, name: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, show_max_mmt_capacity: 'bool' =None, show_model_apis_tab: 'bool' =None, skip_phone_verification: 'bool' =None, start_studios_on_spot_instance: 'bool' =None, storage_overuse_bytes: 'str' =None, storage_overuse_deletion_at: 'datetime' =None, storage_overuse_notification_count: 'int' =None, switch_to_default_machine_on_idle: 'bool' =None, teamspace_default_credits: 'float' =None, timezone: 'str' =None, twitter_username: 'str' =None, updated_at: 'datetime' =None, workload_max_run_duration: 'str' =None): # noqa: E501 + def __init__(self, alerts_config: 'V1OrgAlertsConfig' =None, allow_billing_activity_page_v2: 'bool' =None, allow_budgeting: 'bool' =None, allow_cloud_space_publish: 'bool' =None, allow_credits_auto_replenish: 'bool' =None, allow_external_project_duplication: 'bool' =None, allow_guest: 'bool' =None, allow_lightning_hosted_models: 'bool' =None, allow_marketplace: 'bool' =None, allow_member_invitations: 'bool' =None, allow_member_teamspace_creation: 'bool' =None, auto_invite_by_domain: 'bool' =None, auto_join_domain_validations: 'dict(str, V1AutoJoinDomainValidation)' =None, auto_join_domains: 'list[str]' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, auto_switch_machine: 'bool' =None, created_at: 'datetime' =None, creator_id: 'str' =None, default_machine_image_version: 'str' =None, default_machine_type: 'str' =None, default_project_id: 'str' =None, default_teamspace_ids: 'list[str]' =None, description: 'str' =None, disable_coding_agents: 'bool' =None, disable_public_templates: 'bool' =None, disallow_aws_saas: 'bool' =None, disallow_dgx_saas: 'bool' =None, disallow_gcp_saas: 'bool' =None, disallow_lambda_saas: 'bool' =None, disallow_lightning_saas: 'bool' =None, disallow_nebius_saas: 'bool' =None, display_name: 'str' =None, domain: 'str' =None, email: 'str' =None, featured_gallery: 'bool' =None, full_story_end_date: 'datetime' =None, full_story_start_date: 'datetime' =None, general_teamspace: 'bool' =None, id: 'str' =None, is_personal_org: 'bool' =None, last_storage_overuse_notification_sent_at: 'datetime' =None, location: 'str' =None, nairr: 'bool' =None, name: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, show_max_mmt_capacity: 'bool' =None, show_model_apis_tab: 'bool' =None, skip_phone_verification: 'bool' =None, start_studios_on_spot_instance: 'bool' =None, storage_overuse_bytes: 'str' =None, storage_overuse_deletion_at: 'datetime' =None, storage_overuse_notification_count: 'int' =None, switch_to_default_machine_on_idle: 'bool' =None, teamspace_default_credits: 'float' =None, timezone: 'str' =None, twitter_username: 'str' =None, updated_at: 'datetime' =None, workload_max_run_duration: 'str' =None): # noqa: E501 """V1Organization - a model defined in Swagger""" # noqa: E501 self._alerts_config = None self._allow_billing_activity_page_v2 = None @@ -196,6 +196,7 @@ def __init__(self, alerts_config: 'V1OrgAlertsConfig' =None, allow_billing_activ self._default_machine_image_version = None self._default_machine_type = None self._default_project_id = None + self._default_teamspace_ids = None self._description = None self._disable_coding_agents = None self._disable_public_templates = None @@ -205,8 +206,6 @@ def __init__(self, alerts_config: 'V1OrgAlertsConfig' =None, allow_billing_activ self._disallow_lambda_saas = None self._disallow_lightning_saas = None self._disallow_nebius_saas = None - self._disallow_voltage_park_saas = None - self._disallow_vultr_saas = None self._display_name = None self._domain = None self._email = None @@ -218,6 +217,7 @@ def __init__(self, alerts_config: 'V1OrgAlertsConfig' =None, allow_billing_activ self._is_personal_org = None self._last_storage_overuse_notification_sent_at = None self._location = None + self._nairr = None self._name = None self._preferred_cluster = None self._preferred_deployment_provider = None @@ -280,6 +280,8 @@ def __init__(self, alerts_config: 'V1OrgAlertsConfig' =None, allow_billing_activ self.default_machine_type = default_machine_type if default_project_id is not None: self.default_project_id = default_project_id + if default_teamspace_ids is not None: + self.default_teamspace_ids = default_teamspace_ids if description is not None: self.description = description if disable_coding_agents is not None: @@ -298,10 +300,6 @@ def __init__(self, alerts_config: 'V1OrgAlertsConfig' =None, allow_billing_activ self.disallow_lightning_saas = disallow_lightning_saas if disallow_nebius_saas is not None: self.disallow_nebius_saas = disallow_nebius_saas - if disallow_voltage_park_saas is not None: - self.disallow_voltage_park_saas = disallow_voltage_park_saas - if disallow_vultr_saas is not None: - self.disallow_vultr_saas = disallow_vultr_saas if display_name is not None: self.display_name = display_name if domain is not None: @@ -324,6 +322,8 @@ def __init__(self, alerts_config: 'V1OrgAlertsConfig' =None, allow_billing_activ self.last_storage_overuse_notification_sent_at = last_storage_overuse_notification_sent_at if location is not None: self.location = location + if nairr is not None: + self.nairr = nairr if name is not None: self.name = name if preferred_cluster is not None: @@ -823,6 +823,29 @@ def default_project_id(self, default_project_id: 'str'): self._default_project_id = default_project_id + @property + def default_teamspace_ids(self) -> 'list[str]': + """Gets the default_teamspace_ids of this V1Organization. # noqa: E501 + + Teamspaces a new member joins, in list order. Empty means the member joins none. An unset column is also empty here. # noqa: E501 + + :return: The default_teamspace_ids of this V1Organization. # noqa: E501 + :rtype: list[str] + """ + return self._default_teamspace_ids + + @default_teamspace_ids.setter + def default_teamspace_ids(self, default_teamspace_ids: 'list[str]'): + """Sets the default_teamspace_ids of this V1Organization. + + Teamspaces a new member joins, in list order. Empty means the member joins none. An unset column is also empty here. # noqa: E501 + + :param default_teamspace_ids: The default_teamspace_ids of this V1Organization. # noqa: E501 + :type: list[str] + """ + + self._default_teamspace_ids = default_teamspace_ids + @property def description(self) -> 'str': """Gets the description of this V1Organization. # noqa: E501 @@ -1012,48 +1035,6 @@ def disallow_nebius_saas(self, disallow_nebius_saas: 'bool'): self._disallow_nebius_saas = disallow_nebius_saas - @property - def disallow_voltage_park_saas(self) -> 'bool': - """Gets the disallow_voltage_park_saas of this V1Organization. # noqa: E501 - - - :return: The disallow_voltage_park_saas of this V1Organization. # noqa: E501 - :rtype: bool - """ - return self._disallow_voltage_park_saas - - @disallow_voltage_park_saas.setter - def disallow_voltage_park_saas(self, disallow_voltage_park_saas: 'bool'): - """Sets the disallow_voltage_park_saas of this V1Organization. - - - :param disallow_voltage_park_saas: The disallow_voltage_park_saas of this V1Organization. # noqa: E501 - :type: bool - """ - - self._disallow_voltage_park_saas = disallow_voltage_park_saas - - @property - def disallow_vultr_saas(self) -> 'bool': - """Gets the disallow_vultr_saas of this V1Organization. # noqa: E501 - - - :return: The disallow_vultr_saas of this V1Organization. # noqa: E501 - :rtype: bool - """ - return self._disallow_vultr_saas - - @disallow_vultr_saas.setter - def disallow_vultr_saas(self, disallow_vultr_saas: 'bool'): - """Sets the disallow_vultr_saas of this V1Organization. - - - :param disallow_vultr_saas: The disallow_vultr_saas of this V1Organization. # noqa: E501 - :type: bool - """ - - self._disallow_vultr_saas = disallow_vultr_saas - @property def display_name(self) -> 'str': """Gets the display_name of this V1Organization. # noqa: E501 @@ -1285,6 +1266,29 @@ def location(self, location: 'str'): self._location = location + @property + def nairr(self) -> 'bool': + """Gets the nairr of this V1Organization. # noqa: E501 + + Operator-managed NAIRR grant recipient; read-only in the customer API. # noqa: E501 + + :return: The nairr of this V1Organization. # noqa: E501 + :rtype: bool + """ + return self._nairr + + @nairr.setter + def nairr(self, nairr: 'bool'): + """Sets the nairr of this V1Organization. + + Operator-managed NAIRR grant recipient; read-only in the customer API. # noqa: E501 + + :param nairr: The nairr of this V1Organization. # noqa: E501 + :type: bool + """ + + self._nairr = nairr + @property def name(self) -> 'str': """Gets the name of this V1Organization. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_project.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_project.py index 993de88f4..cbecfd947 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_project.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_project.py @@ -331,6 +331,7 @@ def id(self, id: 'str'): def is_default(self) -> 'bool': """Gets the is_default of this V1Project. # noqa: E501 + The creator can leave, and an authorized caller can delete the teamspace. # noqa: E501 :return: The is_default of this V1Project. # noqa: E501 :rtype: bool @@ -341,6 +342,7 @@ def is_default(self) -> 'bool': def is_default(self, is_default: 'bool'): """Sets the is_default of this V1Project. + The creator can leave, and an authorized caller can delete the teamspace. # noqa: E501 :param is_default: The is_default of this V1Project. # noqa: E501 :type: bool diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py index dcbde2641..e615f4286 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py @@ -502,6 +502,7 @@ def inactive(self, inactive: 'bool'): def is_default(self) -> 'bool': """Gets the is_default of this V1ProjectMembership. # noqa: E501 + The creator can leave, and an authorized caller can delete the teamspace. # noqa: E501 :return: The is_default of this V1ProjectMembership. # noqa: E501 :rtype: bool @@ -512,6 +513,7 @@ def is_default(self) -> 'bool': def is_default(self, is_default: 'bool'): """Sets the is_default of this V1ProjectMembership. + The creator can leave, and an authorized caller can delete the teamspace. # noqa: E501 :param is_default: The is_default of this V1ProjectMembership. # noqa: E501 :type: bool diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py index f6c5aa67e..b52c9f6e8 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py @@ -53,8 +53,6 @@ class V1ProjectSettings(object): 'allow_lambda_saas': 'bool', 'allow_lightning_saas': 'bool', 'allow_nebius_saas': 'bool', - 'allow_voltage_park_saas': 'bool', - 'allow_vultr_saas': 'bool', 'auto_replenish_amount': 'float', 'auto_replenish_threshold': 'float', 'auto_switch_machine': 'bool', @@ -79,8 +77,6 @@ class V1ProjectSettings(object): 'allow_lambda_saas': 'allowLambdaSaas', 'allow_lightning_saas': 'allowLightningSaas', 'allow_nebius_saas': 'allowNebiusSaas', - 'allow_voltage_park_saas': 'allowVoltageParkSaas', - 'allow_vultr_saas': 'allowVultrSaas', 'auto_replenish_amount': 'autoReplenishAmount', 'auto_replenish_threshold': 'autoReplenishThreshold', 'auto_switch_machine': 'autoSwitchMachine', @@ -96,7 +92,7 @@ class V1ProjectSettings(object): 'switch_to_default_machine_on_idle': 'switchToDefaultMachineOnIdle' } - def __init__(self, allow_aws_saas: 'bool' =None, allow_credits_auto_replenish: 'bool' =None, allow_dgx_saas: 'bool' =None, allow_external_project_duplication: 'bool' =None, allow_gcp_saas: 'bool' =None, allow_lambda_saas: 'bool' =None, allow_lightning_saas: 'bool' =None, allow_nebius_saas: 'bool' =None, allow_voltage_park_saas: 'bool' =None, allow_vultr_saas: 'bool' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, auto_switch_machine: 'bool' =None, budgeting_enabled: 'bool' =None, custom_tags: 'list[V1ProjectResourceTag]' =None, default_machine_image_version: 'str' =None, default_machine_type: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, same_compute_on_resume: 'bool' =None, start_studio_on_spot_instance: 'bool' =None, switch_to_default_machine_on_idle: 'bool' =None): # noqa: E501 + def __init__(self, allow_aws_saas: 'bool' =None, allow_credits_auto_replenish: 'bool' =None, allow_dgx_saas: 'bool' =None, allow_external_project_duplication: 'bool' =None, allow_gcp_saas: 'bool' =None, allow_lambda_saas: 'bool' =None, allow_lightning_saas: 'bool' =None, allow_nebius_saas: 'bool' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, auto_switch_machine: 'bool' =None, budgeting_enabled: 'bool' =None, custom_tags: 'list[V1ProjectResourceTag]' =None, default_machine_image_version: 'str' =None, default_machine_type: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, same_compute_on_resume: 'bool' =None, start_studio_on_spot_instance: 'bool' =None, switch_to_default_machine_on_idle: 'bool' =None): # noqa: E501 """V1ProjectSettings - a model defined in Swagger""" # noqa: E501 self._allow_aws_saas = None self._allow_credits_auto_replenish = None @@ -106,8 +102,6 @@ def __init__(self, allow_aws_saas: 'bool' =None, allow_credits_auto_replenish: ' self._allow_lambda_saas = None self._allow_lightning_saas = None self._allow_nebius_saas = None - self._allow_voltage_park_saas = None - self._allow_vultr_saas = None self._auto_replenish_amount = None self._auto_replenish_threshold = None self._auto_switch_machine = None @@ -138,10 +132,6 @@ def __init__(self, allow_aws_saas: 'bool' =None, allow_credits_auto_replenish: ' self.allow_lightning_saas = allow_lightning_saas if allow_nebius_saas is not None: self.allow_nebius_saas = allow_nebius_saas - if allow_voltage_park_saas is not None: - self.allow_voltage_park_saas = allow_voltage_park_saas - if allow_vultr_saas is not None: - self.allow_vultr_saas = allow_vultr_saas if auto_replenish_amount is not None: self.auto_replenish_amount = auto_replenish_amount if auto_replenish_threshold is not None: @@ -339,48 +329,6 @@ def allow_nebius_saas(self, allow_nebius_saas: 'bool'): self._allow_nebius_saas = allow_nebius_saas - @property - def allow_voltage_park_saas(self) -> 'bool': - """Gets the allow_voltage_park_saas of this V1ProjectSettings. # noqa: E501 - - - :return: The allow_voltage_park_saas of this V1ProjectSettings. # noqa: E501 - :rtype: bool - """ - return self._allow_voltage_park_saas - - @allow_voltage_park_saas.setter - def allow_voltage_park_saas(self, allow_voltage_park_saas: 'bool'): - """Sets the allow_voltage_park_saas of this V1ProjectSettings. - - - :param allow_voltage_park_saas: The allow_voltage_park_saas of this V1ProjectSettings. # noqa: E501 - :type: bool - """ - - self._allow_voltage_park_saas = allow_voltage_park_saas - - @property - def allow_vultr_saas(self) -> 'bool': - """Gets the allow_vultr_saas of this V1ProjectSettings. # noqa: E501 - - - :return: The allow_vultr_saas of this V1ProjectSettings. # noqa: E501 - :rtype: bool - """ - return self._allow_vultr_saas - - @allow_vultr_saas.setter - def allow_vultr_saas(self, allow_vultr_saas: 'bool'): - """Sets the allow_vultr_saas of this V1ProjectSettings. - - - :param allow_vultr_saas: The allow_vultr_saas of this V1ProjectSettings. # noqa: E501 - :type: bool - """ - - self._allow_vultr_saas = allow_vultr_saas - @property def auto_replenish_amount(self) -> 'float': """Gets the auto_replenish_amount of this V1ProjectSettings. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_provider_fleet_node.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_provider_fleet_node.py new file mode 100644 index 000000000..8e08dfd64 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_provider_fleet_node.py @@ -0,0 +1,467 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1ProviderFleetNode(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'first_seen_at': 'datetime', + 'gpu_count': 'int', + 'gpu_type': 'str', + 'hostname': 'str', + 'last_seen_at': 'datetime', + 'machine_id': 'str', + 'machine_status': 'str', + 'node_id': 'str', + 'owner': 'V1ProviderFleetOwner', + 'private_ip': 'str', + 'public_ip': 'str', + 'registration_matches': 'int', + 'rental_id': 'str', + 'rental_status': 'str' + } + + attribute_map = { + 'first_seen_at': 'firstSeenAt', + 'gpu_count': 'gpuCount', + 'gpu_type': 'gpuType', + 'hostname': 'hostname', + 'last_seen_at': 'lastSeenAt', + 'machine_id': 'machineId', + 'machine_status': 'machineStatus', + 'node_id': 'nodeId', + 'owner': 'owner', + 'private_ip': 'privateIp', + 'public_ip': 'publicIp', + 'registration_matches': 'registrationMatches', + 'rental_id': 'rentalId', + 'rental_status': 'rentalStatus' + } + + def __init__(self, first_seen_at: 'datetime' =None, gpu_count: 'int' =None, gpu_type: 'str' =None, hostname: 'str' =None, last_seen_at: 'datetime' =None, machine_id: 'str' =None, machine_status: 'str' =None, node_id: 'str' =None, owner: 'V1ProviderFleetOwner' =None, private_ip: 'str' =None, public_ip: 'str' =None, registration_matches: 'int' =None, rental_id: 'str' =None, rental_status: 'str' =None): # noqa: E501 + """V1ProviderFleetNode - a model defined in Swagger""" # noqa: E501 + self._first_seen_at = None + self._gpu_count = None + self._gpu_type = None + self._hostname = None + self._last_seen_at = None + self._machine_id = None + self._machine_status = None + self._node_id = None + self._owner = None + self._private_ip = None + self._public_ip = None + self._registration_matches = None + self._rental_id = None + self._rental_status = None + self.discriminator = None + if first_seen_at is not None: + self.first_seen_at = first_seen_at + if gpu_count is not None: + self.gpu_count = gpu_count + if gpu_type is not None: + self.gpu_type = gpu_type + if hostname is not None: + self.hostname = hostname + if last_seen_at is not None: + self.last_seen_at = last_seen_at + if machine_id is not None: + self.machine_id = machine_id + if machine_status is not None: + self.machine_status = machine_status + if node_id is not None: + self.node_id = node_id + if owner is not None: + self.owner = owner + if private_ip is not None: + self.private_ip = private_ip + if public_ip is not None: + self.public_ip = public_ip + if registration_matches is not None: + self.registration_matches = registration_matches + if rental_id is not None: + self.rental_id = rental_id + if rental_status is not None: + self.rental_status = rental_status + + @property + def first_seen_at(self) -> 'datetime': + """Gets the first_seen_at of this V1ProviderFleetNode. # noqa: E501 + + + :return: The first_seen_at of this V1ProviderFleetNode. # noqa: E501 + :rtype: datetime + """ + return self._first_seen_at + + @first_seen_at.setter + def first_seen_at(self, first_seen_at: 'datetime'): + """Sets the first_seen_at of this V1ProviderFleetNode. + + + :param first_seen_at: The first_seen_at of this V1ProviderFleetNode. # noqa: E501 + :type: datetime + """ + + self._first_seen_at = first_seen_at + + @property + def gpu_count(self) -> 'int': + """Gets the gpu_count of this V1ProviderFleetNode. # noqa: E501 + + + :return: The gpu_count of this V1ProviderFleetNode. # noqa: E501 + :rtype: int + """ + return self._gpu_count + + @gpu_count.setter + def gpu_count(self, gpu_count: 'int'): + """Sets the gpu_count of this V1ProviderFleetNode. + + + :param gpu_count: The gpu_count of this V1ProviderFleetNode. # noqa: E501 + :type: int + """ + + self._gpu_count = gpu_count + + @property + def gpu_type(self) -> 'str': + """Gets the gpu_type of this V1ProviderFleetNode. # noqa: E501 + + + :return: The gpu_type of this V1ProviderFleetNode. # noqa: E501 + :rtype: str + """ + return self._gpu_type + + @gpu_type.setter + def gpu_type(self, gpu_type: 'str'): + """Sets the gpu_type of this V1ProviderFleetNode. + + + :param gpu_type: The gpu_type of this V1ProviderFleetNode. # noqa: E501 + :type: str + """ + + self._gpu_type = gpu_type + + @property + def hostname(self) -> 'str': + """Gets the hostname of this V1ProviderFleetNode. # noqa: E501 + + + :return: The hostname of this V1ProviderFleetNode. # noqa: E501 + :rtype: str + """ + return self._hostname + + @hostname.setter + def hostname(self, hostname: 'str'): + """Sets the hostname of this V1ProviderFleetNode. + + + :param hostname: The hostname of this V1ProviderFleetNode. # noqa: E501 + :type: str + """ + + self._hostname = hostname + + @property + def last_seen_at(self) -> 'datetime': + """Gets the last_seen_at of this V1ProviderFleetNode. # noqa: E501 + + + :return: The last_seen_at of this V1ProviderFleetNode. # noqa: E501 + :rtype: datetime + """ + return self._last_seen_at + + @last_seen_at.setter + def last_seen_at(self, last_seen_at: 'datetime'): + """Sets the last_seen_at of this V1ProviderFleetNode. + + + :param last_seen_at: The last_seen_at of this V1ProviderFleetNode. # noqa: E501 + :type: datetime + """ + + self._last_seen_at = last_seen_at + + @property + def machine_id(self) -> 'str': + """Gets the machine_id of this V1ProviderFleetNode. # noqa: E501 + + Empty means no unique provider-ID match in this control plane. # noqa: E501 + + :return: The machine_id of this V1ProviderFleetNode. # noqa: E501 + :rtype: str + """ + return self._machine_id + + @machine_id.setter + def machine_id(self, machine_id: 'str'): + """Sets the machine_id of this V1ProviderFleetNode. + + Empty means no unique provider-ID match in this control plane. # noqa: E501 + + :param machine_id: The machine_id of this V1ProviderFleetNode. # noqa: E501 + :type: str + """ + + self._machine_id = machine_id + + @property + def machine_status(self) -> 'str': + """Gets the machine_status of this V1ProviderFleetNode. # noqa: E501 + + + :return: The machine_status of this V1ProviderFleetNode. # noqa: E501 + :rtype: str + """ + return self._machine_status + + @machine_status.setter + def machine_status(self, machine_status: 'str'): + """Sets the machine_status of this V1ProviderFleetNode. + + + :param machine_status: The machine_status of this V1ProviderFleetNode. # noqa: E501 + :type: str + """ + + self._machine_status = machine_status + + @property + def node_id(self) -> 'str': + """Gets the node_id of this V1ProviderFleetNode. # noqa: E501 + + + :return: The node_id of this V1ProviderFleetNode. # noqa: E501 + :rtype: str + """ + return self._node_id + + @node_id.setter + def node_id(self, node_id: 'str'): + """Sets the node_id of this V1ProviderFleetNode. + + + :param node_id: The node_id of this V1ProviderFleetNode. # noqa: E501 + :type: str + """ + + self._node_id = node_id + + @property + def owner(self) -> 'V1ProviderFleetOwner': + """Gets the owner of this V1ProviderFleetNode. # noqa: E501 + + + :return: The owner of this V1ProviderFleetNode. # noqa: E501 + :rtype: V1ProviderFleetOwner + """ + return self._owner + + @owner.setter + def owner(self, owner: 'V1ProviderFleetOwner'): + """Sets the owner of this V1ProviderFleetNode. + + + :param owner: The owner of this V1ProviderFleetNode. # noqa: E501 + :type: V1ProviderFleetOwner + """ + + self._owner = owner + + @property + def private_ip(self) -> 'str': + """Gets the private_ip of this V1ProviderFleetNode. # noqa: E501 + + + :return: The private_ip of this V1ProviderFleetNode. # noqa: E501 + :rtype: str + """ + return self._private_ip + + @private_ip.setter + def private_ip(self, private_ip: 'str'): + """Sets the private_ip of this V1ProviderFleetNode. + + + :param private_ip: The private_ip of this V1ProviderFleetNode. # noqa: E501 + :type: str + """ + + self._private_ip = private_ip + + @property + def public_ip(self) -> 'str': + """Gets the public_ip of this V1ProviderFleetNode. # noqa: E501 + + + :return: The public_ip of this V1ProviderFleetNode. # noqa: E501 + :rtype: str + """ + return self._public_ip + + @public_ip.setter + def public_ip(self, public_ip: 'str'): + """Sets the public_ip of this V1ProviderFleetNode. + + + :param public_ip: The public_ip of this V1ProviderFleetNode. # noqa: E501 + :type: str + """ + + self._public_ip = public_ip + + @property + def registration_matches(self) -> 'int': + """Gets the registration_matches of this V1ProviderFleetNode. # noqa: E501 + + + :return: The registration_matches of this V1ProviderFleetNode. # noqa: E501 + :rtype: int + """ + return self._registration_matches + + @registration_matches.setter + def registration_matches(self, registration_matches: 'int'): + """Sets the registration_matches of this V1ProviderFleetNode. + + + :param registration_matches: The registration_matches of this V1ProviderFleetNode. # noqa: E501 + :type: int + """ + + self._registration_matches = registration_matches + + @property + def rental_id(self) -> 'str': + """Gets the rental_id of this V1ProviderFleetNode. # noqa: E501 + + + :return: The rental_id of this V1ProviderFleetNode. # noqa: E501 + :rtype: str + """ + return self._rental_id + + @rental_id.setter + def rental_id(self, rental_id: 'str'): + """Sets the rental_id of this V1ProviderFleetNode. + + + :param rental_id: The rental_id of this V1ProviderFleetNode. # noqa: E501 + :type: str + """ + + self._rental_id = rental_id + + @property + def rental_status(self) -> 'str': + """Gets the rental_status of this V1ProviderFleetNode. # noqa: E501 + + + :return: The rental_status of this V1ProviderFleetNode. # noqa: E501 + :rtype: str + """ + return self._rental_status + + @rental_status.setter + def rental_status(self, rental_status: 'str'): + """Sets the rental_status of this V1ProviderFleetNode. + + + :param rental_status: The rental_status of this V1ProviderFleetNode. # noqa: E501 + :type: str + """ + + self._rental_status = rental_status + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1ProviderFleetNode, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1ProviderFleetNode') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1ProviderFleetNode): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1ProviderFleetNode') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_provider_fleet_owner.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_provider_fleet_owner.py new file mode 100644 index 000000000..86e408e00 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_provider_fleet_owner.py @@ -0,0 +1,257 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1ProviderFleetOwner(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'actor_id': 'str', + 'environment': 'str', + 'label': 'str', + 'revision': 'str', + 'updated_at': 'datetime', + 'username': 'str' + } + + attribute_map = { + 'actor_id': 'actorId', + 'environment': 'environment', + 'label': 'label', + 'revision': 'revision', + 'updated_at': 'updatedAt', + 'username': 'username' + } + + def __init__(self, actor_id: 'str' =None, environment: 'str' =None, label: 'str' =None, revision: 'str' =None, updated_at: 'datetime' =None, username: 'str' =None): # noqa: E501 + """V1ProviderFleetOwner - a model defined in Swagger""" # noqa: E501 + self._actor_id = None + self._environment = None + self._label = None + self._revision = None + self._updated_at = None + self._username = None + self.discriminator = None + if actor_id is not None: + self.actor_id = actor_id + if environment is not None: + self.environment = environment + if label is not None: + self.label = label + if revision is not None: + self.revision = revision + if updated_at is not None: + self.updated_at = updated_at + if username is not None: + self.username = username + + @property + def actor_id(self) -> 'str': + """Gets the actor_id of this V1ProviderFleetOwner. # noqa: E501 + + + :return: The actor_id of this V1ProviderFleetOwner. # noqa: E501 + :rtype: str + """ + return self._actor_id + + @actor_id.setter + def actor_id(self, actor_id: 'str'): + """Sets the actor_id of this V1ProviderFleetOwner. + + + :param actor_id: The actor_id of this V1ProviderFleetOwner. # noqa: E501 + :type: str + """ + + self._actor_id = actor_id + + @property + def environment(self) -> 'str': + """Gets the environment of this V1ProviderFleetOwner. # noqa: E501 + + + :return: The environment of this V1ProviderFleetOwner. # noqa: E501 + :rtype: str + """ + return self._environment + + @environment.setter + def environment(self, environment: 'str'): + """Sets the environment of this V1ProviderFleetOwner. + + + :param environment: The environment of this V1ProviderFleetOwner. # noqa: E501 + :type: str + """ + + self._environment = environment + + @property + def label(self) -> 'str': + """Gets the label of this V1ProviderFleetOwner. # noqa: E501 + + + :return: The label of this V1ProviderFleetOwner. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label: 'str'): + """Sets the label of this V1ProviderFleetOwner. + + + :param label: The label of this V1ProviderFleetOwner. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def revision(self) -> 'str': + """Gets the revision of this V1ProviderFleetOwner. # noqa: E501 + + + :return: The revision of this V1ProviderFleetOwner. # noqa: E501 + :rtype: str + """ + return self._revision + + @revision.setter + def revision(self, revision: 'str'): + """Sets the revision of this V1ProviderFleetOwner. + + + :param revision: The revision of this V1ProviderFleetOwner. # noqa: E501 + :type: str + """ + + self._revision = revision + + @property + def updated_at(self) -> 'datetime': + """Gets the updated_at of this V1ProviderFleetOwner. # noqa: E501 + + + :return: The updated_at of this V1ProviderFleetOwner. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at: 'datetime'): + """Sets the updated_at of this V1ProviderFleetOwner. + + + :param updated_at: The updated_at of this V1ProviderFleetOwner. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def username(self) -> 'str': + """Gets the username of this V1ProviderFleetOwner. # noqa: E501 + + + :return: The username of this V1ProviderFleetOwner. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username: 'str'): + """Sets the username of this V1ProviderFleetOwner. + + + :param username: The username of this V1ProviderFleetOwner. # noqa: E501 + :type: str + """ + + self._username = username + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1ProviderFleetOwner, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1ProviderFleetOwner') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1ProviderFleetOwner): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1ProviderFleetOwner') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_provider_fleet_usage_point.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_provider_fleet_usage_point.py new file mode 100644 index 000000000..7b71d0f3b --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_provider_fleet_usage_point.py @@ -0,0 +1,387 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1ProviderFleetUsagePoint(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'available_external_gpus': 'int', + 'available_gpus': 'int', + 'available_internal_gpus': 'int', + 'categories': 'dict(str, int)', + 'external_gpus': 'int', + 'fleet_nodes': 'int', + 'internal_gpus': 'int', + 'observed_at': 'datetime', + 'registered_nodes': 'int', + 'total_gpus': 'int', + 'unknown_nodes': 'int' + } + + attribute_map = { + 'available_external_gpus': 'availableExternalGpus', + 'available_gpus': 'availableGpus', + 'available_internal_gpus': 'availableInternalGpus', + 'categories': 'categories', + 'external_gpus': 'externalGpus', + 'fleet_nodes': 'fleetNodes', + 'internal_gpus': 'internalGpus', + 'observed_at': 'observedAt', + 'registered_nodes': 'registeredNodes', + 'total_gpus': 'totalGpus', + 'unknown_nodes': 'unknownNodes' + } + + def __init__(self, available_external_gpus: 'int' =None, available_gpus: 'int' =None, available_internal_gpus: 'int' =None, categories: 'dict(str, int)' =None, external_gpus: 'int' =None, fleet_nodes: 'int' =None, internal_gpus: 'int' =None, observed_at: 'datetime' =None, registered_nodes: 'int' =None, total_gpus: 'int' =None, unknown_nodes: 'int' =None): # noqa: E501 + """V1ProviderFleetUsagePoint - a model defined in Swagger""" # noqa: E501 + self._available_external_gpus = None + self._available_gpus = None + self._available_internal_gpus = None + self._categories = None + self._external_gpus = None + self._fleet_nodes = None + self._internal_gpus = None + self._observed_at = None + self._registered_nodes = None + self._total_gpus = None + self._unknown_nodes = None + self.discriminator = None + if available_external_gpus is not None: + self.available_external_gpus = available_external_gpus + if available_gpus is not None: + self.available_gpus = available_gpus + if available_internal_gpus is not None: + self.available_internal_gpus = available_internal_gpus + if categories is not None: + self.categories = categories + if external_gpus is not None: + self.external_gpus = external_gpus + if fleet_nodes is not None: + self.fleet_nodes = fleet_nodes + if internal_gpus is not None: + self.internal_gpus = internal_gpus + if observed_at is not None: + self.observed_at = observed_at + if registered_nodes is not None: + self.registered_nodes = registered_nodes + if total_gpus is not None: + self.total_gpus = total_gpus + if unknown_nodes is not None: + self.unknown_nodes = unknown_nodes + + @property + def available_external_gpus(self) -> 'int': + """Gets the available_external_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + + + :return: The available_external_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + :rtype: int + """ + return self._available_external_gpus + + @available_external_gpus.setter + def available_external_gpus(self, available_external_gpus: 'int'): + """Sets the available_external_gpus of this V1ProviderFleetUsagePoint. + + + :param available_external_gpus: The available_external_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + :type: int + """ + + self._available_external_gpus = available_external_gpus + + @property + def available_gpus(self) -> 'int': + """Gets the available_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + + + :return: The available_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + :rtype: int + """ + return self._available_gpus + + @available_gpus.setter + def available_gpus(self, available_gpus: 'int'): + """Sets the available_gpus of this V1ProviderFleetUsagePoint. + + + :param available_gpus: The available_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + :type: int + """ + + self._available_gpus = available_gpus + + @property + def available_internal_gpus(self) -> 'int': + """Gets the available_internal_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + + + :return: The available_internal_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + :rtype: int + """ + return self._available_internal_gpus + + @available_internal_gpus.setter + def available_internal_gpus(self, available_internal_gpus: 'int'): + """Sets the available_internal_gpus of this V1ProviderFleetUsagePoint. + + + :param available_internal_gpus: The available_internal_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + :type: int + """ + + self._available_internal_gpus = available_internal_gpus + + @property + def categories(self) -> 'dict(str, int)': + """Gets the categories of this V1ProviderFleetUsagePoint. # noqa: E501 + + + :return: The categories of this V1ProviderFleetUsagePoint. # noqa: E501 + :rtype: dict(str, int) + """ + return self._categories + + @categories.setter + def categories(self, categories: 'dict(str, int)'): + """Sets the categories of this V1ProviderFleetUsagePoint. + + + :param categories: The categories of this V1ProviderFleetUsagePoint. # noqa: E501 + :type: dict(str, int) + """ + + self._categories = categories + + @property + def external_gpus(self) -> 'int': + """Gets the external_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + + + :return: The external_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + :rtype: int + """ + return self._external_gpus + + @external_gpus.setter + def external_gpus(self, external_gpus: 'int'): + """Sets the external_gpus of this V1ProviderFleetUsagePoint. + + + :param external_gpus: The external_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + :type: int + """ + + self._external_gpus = external_gpus + + @property + def fleet_nodes(self) -> 'int': + """Gets the fleet_nodes of this V1ProviderFleetUsagePoint. # noqa: E501 + + + :return: The fleet_nodes of this V1ProviderFleetUsagePoint. # noqa: E501 + :rtype: int + """ + return self._fleet_nodes + + @fleet_nodes.setter + def fleet_nodes(self, fleet_nodes: 'int'): + """Sets the fleet_nodes of this V1ProviderFleetUsagePoint. + + + :param fleet_nodes: The fleet_nodes of this V1ProviderFleetUsagePoint. # noqa: E501 + :type: int + """ + + self._fleet_nodes = fleet_nodes + + @property + def internal_gpus(self) -> 'int': + """Gets the internal_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + + + :return: The internal_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + :rtype: int + """ + return self._internal_gpus + + @internal_gpus.setter + def internal_gpus(self, internal_gpus: 'int'): + """Sets the internal_gpus of this V1ProviderFleetUsagePoint. + + + :param internal_gpus: The internal_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + :type: int + """ + + self._internal_gpus = internal_gpus + + @property + def observed_at(self) -> 'datetime': + """Gets the observed_at of this V1ProviderFleetUsagePoint. # noqa: E501 + + + :return: The observed_at of this V1ProviderFleetUsagePoint. # noqa: E501 + :rtype: datetime + """ + return self._observed_at + + @observed_at.setter + def observed_at(self, observed_at: 'datetime'): + """Sets the observed_at of this V1ProviderFleetUsagePoint. + + + :param observed_at: The observed_at of this V1ProviderFleetUsagePoint. # noqa: E501 + :type: datetime + """ + + self._observed_at = observed_at + + @property + def registered_nodes(self) -> 'int': + """Gets the registered_nodes of this V1ProviderFleetUsagePoint. # noqa: E501 + + + :return: The registered_nodes of this V1ProviderFleetUsagePoint. # noqa: E501 + :rtype: int + """ + return self._registered_nodes + + @registered_nodes.setter + def registered_nodes(self, registered_nodes: 'int'): + """Sets the registered_nodes of this V1ProviderFleetUsagePoint. + + + :param registered_nodes: The registered_nodes of this V1ProviderFleetUsagePoint. # noqa: E501 + :type: int + """ + + self._registered_nodes = registered_nodes + + @property + def total_gpus(self) -> 'int': + """Gets the total_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + + + :return: The total_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + :rtype: int + """ + return self._total_gpus + + @total_gpus.setter + def total_gpus(self, total_gpus: 'int'): + """Sets the total_gpus of this V1ProviderFleetUsagePoint. + + + :param total_gpus: The total_gpus of this V1ProviderFleetUsagePoint. # noqa: E501 + :type: int + """ + + self._total_gpus = total_gpus + + @property + def unknown_nodes(self) -> 'int': + """Gets the unknown_nodes of this V1ProviderFleetUsagePoint. # noqa: E501 + + + :return: The unknown_nodes of this V1ProviderFleetUsagePoint. # noqa: E501 + :rtype: int + """ + return self._unknown_nodes + + @unknown_nodes.setter + def unknown_nodes(self, unknown_nodes: 'int'): + """Sets the unknown_nodes of this V1ProviderFleetUsagePoint. + + + :param unknown_nodes: The unknown_nodes of this V1ProviderFleetUsagePoint. # noqa: E501 + :type: int + """ + + self._unknown_nodes = unknown_nodes + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1ProviderFleetUsagePoint, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1ProviderFleetUsagePoint') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1ProviderFleetUsagePoint): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1ProviderFleetUsagePoint') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_publish_community_model_request.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_publish_community_model_request.py index e751a6ff2..e87a0353e 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_publish_community_model_request.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_publish_community_model_request.py @@ -48,8 +48,12 @@ class V1PublishCommunityModelRequest(object): 'aliases': 'list[str]', 'api_base_url': 'str', 'api_key': 'str', + 'cache_creation_token_price': 'float', + 'cache_creation_token_price1h': 'float', + 'cache_read_token_price': 'float', 'completion_token_price': 'float', 'context_length': 'str', + 'description': 'str', 'display_name': 'str', 'max_completion_tokens': 'str', 'model_id': 'str', @@ -62,8 +66,12 @@ class V1PublishCommunityModelRequest(object): 'aliases': 'aliases', 'api_base_url': 'apiBaseUrl', 'api_key': 'apiKey', + 'cache_creation_token_price': 'cacheCreationTokenPrice', + 'cache_creation_token_price1h': 'cacheCreationTokenPrice1h', + 'cache_read_token_price': 'cacheReadTokenPrice', 'completion_token_price': 'completionTokenPrice', 'context_length': 'contextLength', + 'description': 'description', 'display_name': 'displayName', 'max_completion_tokens': 'maxCompletionTokens', 'model_id': 'modelId', @@ -72,13 +80,17 @@ class V1PublishCommunityModelRequest(object): 'provider': 'provider' } - def __init__(self, aliases: 'list[str]' =None, api_base_url: 'str' =None, api_key: 'str' =None, completion_token_price: 'float' =None, context_length: 'str' =None, display_name: 'str' =None, max_completion_tokens: 'str' =None, model_id: 'str' =None, nvidia_usage_enabled: 'bool' =None, prompt_token_price: 'float' =None, provider: 'V1ModelAPIProvider' =None): # noqa: E501 + def __init__(self, aliases: 'list[str]' =None, api_base_url: 'str' =None, api_key: 'str' =None, cache_creation_token_price: 'float' =None, cache_creation_token_price1h: 'float' =None, cache_read_token_price: 'float' =None, completion_token_price: 'float' =None, context_length: 'str' =None, description: 'str' =None, display_name: 'str' =None, max_completion_tokens: 'str' =None, model_id: 'str' =None, nvidia_usage_enabled: 'bool' =None, prompt_token_price: 'float' =None, provider: 'V1ModelAPIProvider' =None): # noqa: E501 """V1PublishCommunityModelRequest - a model defined in Swagger""" # noqa: E501 self._aliases = None self._api_base_url = None self._api_key = None + self._cache_creation_token_price = None + self._cache_creation_token_price1h = None + self._cache_read_token_price = None self._completion_token_price = None self._context_length = None + self._description = None self._display_name = None self._max_completion_tokens = None self._model_id = None @@ -92,10 +104,18 @@ def __init__(self, aliases: 'list[str]' =None, api_base_url: 'str' =None, api_ke self.api_base_url = api_base_url if api_key is not None: self.api_key = api_key + if cache_creation_token_price is not None: + self.cache_creation_token_price = cache_creation_token_price + if cache_creation_token_price1h is not None: + self.cache_creation_token_price1h = cache_creation_token_price1h + if cache_read_token_price is not None: + self.cache_read_token_price = cache_read_token_price if completion_token_price is not None: self.completion_token_price = completion_token_price if context_length is not None: self.context_length = context_length + if description is not None: + self.description = description if display_name is not None: self.display_name = display_name if max_completion_tokens is not None: @@ -172,6 +192,69 @@ def api_key(self, api_key: 'str'): self._api_key = api_key + @property + def cache_creation_token_price(self) -> 'float': + """Gets the cache_creation_token_price of this V1PublishCommunityModelRequest. # noqa: E501 + + + :return: The cache_creation_token_price of this V1PublishCommunityModelRequest. # noqa: E501 + :rtype: float + """ + return self._cache_creation_token_price + + @cache_creation_token_price.setter + def cache_creation_token_price(self, cache_creation_token_price: 'float'): + """Sets the cache_creation_token_price of this V1PublishCommunityModelRequest. + + + :param cache_creation_token_price: The cache_creation_token_price of this V1PublishCommunityModelRequest. # noqa: E501 + :type: float + """ + + self._cache_creation_token_price = cache_creation_token_price + + @property + def cache_creation_token_price1h(self) -> 'float': + """Gets the cache_creation_token_price1h of this V1PublishCommunityModelRequest. # noqa: E501 + + + :return: The cache_creation_token_price1h of this V1PublishCommunityModelRequest. # noqa: E501 + :rtype: float + """ + return self._cache_creation_token_price1h + + @cache_creation_token_price1h.setter + def cache_creation_token_price1h(self, cache_creation_token_price1h: 'float'): + """Sets the cache_creation_token_price1h of this V1PublishCommunityModelRequest. + + + :param cache_creation_token_price1h: The cache_creation_token_price1h of this V1PublishCommunityModelRequest. # noqa: E501 + :type: float + """ + + self._cache_creation_token_price1h = cache_creation_token_price1h + + @property + def cache_read_token_price(self) -> 'float': + """Gets the cache_read_token_price of this V1PublishCommunityModelRequest. # noqa: E501 + + + :return: The cache_read_token_price of this V1PublishCommunityModelRequest. # noqa: E501 + :rtype: float + """ + return self._cache_read_token_price + + @cache_read_token_price.setter + def cache_read_token_price(self, cache_read_token_price: 'float'): + """Sets the cache_read_token_price of this V1PublishCommunityModelRequest. + + + :param cache_read_token_price: The cache_read_token_price of this V1PublishCommunityModelRequest. # noqa: E501 + :type: float + """ + + self._cache_read_token_price = cache_read_token_price + @property def completion_token_price(self) -> 'float': """Gets the completion_token_price of this V1PublishCommunityModelRequest. # noqa: E501 @@ -214,6 +297,27 @@ def context_length(self, context_length: 'str'): self._context_length = context_length + @property + def description(self) -> 'str': + """Gets the description of this V1PublishCommunityModelRequest. # noqa: E501 + + + :return: The description of this V1PublishCommunityModelRequest. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: 'str'): + """Sets the description of this V1PublishCommunityModelRequest. + + + :param description: The description of this V1PublishCommunityModelRequest. # noqa: E501 + :type: str + """ + + self._description = description + @property def display_name(self) -> 'str': """Gets the display_name of this V1PublishCommunityModelRequest. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_report_inference_usage_request.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_report_inference_usage_request.py index 190c3e317..3cb7475af 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_report_inference_usage_request.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_report_inference_usage_request.py @@ -47,6 +47,7 @@ class V1ReportInferenceUsageRequest(object): swagger_types = { 'cache_creation_tokens': 'str', 'cache_read_tokens': 'str', + 'coding_plan': 'bool', 'completion_tokens': 'str', 'model': 'str', 'prompt_tokens': 'str' @@ -55,15 +56,17 @@ class V1ReportInferenceUsageRequest(object): attribute_map = { 'cache_creation_tokens': 'cacheCreationTokens', 'cache_read_tokens': 'cacheReadTokens', + 'coding_plan': 'codingPlan', 'completion_tokens': 'completionTokens', 'model': 'model', 'prompt_tokens': 'promptTokens' } - def __init__(self, cache_creation_tokens: 'str' =None, cache_read_tokens: 'str' =None, completion_tokens: 'str' =None, model: 'str' =None, prompt_tokens: 'str' =None): # noqa: E501 + def __init__(self, cache_creation_tokens: 'str' =None, cache_read_tokens: 'str' =None, coding_plan: 'bool' =None, completion_tokens: 'str' =None, model: 'str' =None, prompt_tokens: 'str' =None): # noqa: E501 """V1ReportInferenceUsageRequest - a model defined in Swagger""" # noqa: E501 self._cache_creation_tokens = None self._cache_read_tokens = None + self._coding_plan = None self._completion_tokens = None self._model = None self._prompt_tokens = None @@ -72,6 +75,8 @@ def __init__(self, cache_creation_tokens: 'str' =None, cache_read_tokens: 'str' self.cache_creation_tokens = cache_creation_tokens if cache_read_tokens is not None: self.cache_read_tokens = cache_read_tokens + if coding_plan is not None: + self.coding_plan = coding_plan if completion_tokens is not None: self.completion_tokens = completion_tokens if model is not None: @@ -121,6 +126,29 @@ def cache_read_tokens(self, cache_read_tokens: 'str'): self._cache_read_tokens = cache_read_tokens + @property + def coding_plan(self) -> 'bool': + """Gets the coding_plan of this V1ReportInferenceUsageRequest. # noqa: E501 + + Counts the usage against the caller's coding plan windows (code.lightning.ai traffic). # noqa: E501 + + :return: The coding_plan of this V1ReportInferenceUsageRequest. # noqa: E501 + :rtype: bool + """ + return self._coding_plan + + @coding_plan.setter + def coding_plan(self, coding_plan: 'bool'): + """Sets the coding_plan of this V1ReportInferenceUsageRequest. + + Counts the usage against the caller's coding plan windows (code.lightning.ai traffic). # noqa: E501 + + :param coding_plan: The coding_plan of this V1ReportInferenceUsageRequest. # noqa: E501 + :type: bool + """ + + self._coding_plan = coding_plan + @property def completion_tokens(self) -> 'str': """Gets the completion_tokens of this V1ReportInferenceUsageRequest. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py index 8d5948110..7f3e70eac 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py @@ -89,6 +89,7 @@ class V1RuleResource(object): KUBERNETESTEMPLATE = "kubernetesTemplate" K8S_JOB = "k8s_job" SANDBOX = "sandbox" + WORKLOADTAG = "workloadTag" """ Attributes: swagger_types (dict): The key is attribute name diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_sandbox.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_sandbox.py index 61dba4863..5010b1eaa 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_sandbox.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_sandbox.py @@ -48,6 +48,7 @@ class V1Sandbox(object): 'cloudspace_id': 'str', 'cluster_id': 'str', 'created_at': 'datetime', + 'docker_data_root_on_disk': 'bool', 'id': 'str', 'idle_timeout': 'str', 'image': 'str', @@ -81,6 +82,7 @@ class V1Sandbox(object): 'cloudspace_id': 'cloudspaceId', 'cluster_id': 'clusterId', 'created_at': 'createdAt', + 'docker_data_root_on_disk': 'dockerDataRootOnDisk', 'id': 'id', 'idle_timeout': 'idleTimeout', 'image': 'image', @@ -110,11 +112,12 @@ class V1Sandbox(object): 'warm_secrets': 'warmSecrets' } - def __init__(self, cloudspace_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, id: 'str' =None, idle_timeout: 'str' =None, image: 'str' =None, image_secret_ref: 'str' =None, instance_type: 'str' =None, machine_id: 'str' =None, memory_snapshot_compatible: 'bool' =None, name: 'str' =None, network_policy: 'V1NetworkPolicy' =None, organization_id: 'str' =None, persistent: 'bool' =None, phase_durations: 'list[V1SandboxPhaseDuration]' =None, port_urls: 'dict(str, str)' =None, ports: 'list[str]' =None, project_id: 'str' =None, purpose: 'V1SandboxPurpose' =None, restore: 'V1SandboxRestore' =None, runtime: 'str' =None, snapshot_id: 'str' =None, spot: 'bool' =None, status: 'str' =None, storage_gb: 'str' =None, timeout: 'str' =None, updated_at: 'datetime' =None, user_id: 'str' =None, warm: 'V1SandboxWarmStatus' =None, warm_secrets: 'dict(str, str)' =None): # noqa: E501 + def __init__(self, cloudspace_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, docker_data_root_on_disk: 'bool' =None, id: 'str' =None, idle_timeout: 'str' =None, image: 'str' =None, image_secret_ref: 'str' =None, instance_type: 'str' =None, machine_id: 'str' =None, memory_snapshot_compatible: 'bool' =None, name: 'str' =None, network_policy: 'V1NetworkPolicy' =None, organization_id: 'str' =None, persistent: 'bool' =None, phase_durations: 'list[V1SandboxPhaseDuration]' =None, port_urls: 'dict(str, str)' =None, ports: 'list[str]' =None, project_id: 'str' =None, purpose: 'V1SandboxPurpose' =None, restore: 'V1SandboxRestore' =None, runtime: 'str' =None, snapshot_id: 'str' =None, spot: 'bool' =None, status: 'str' =None, storage_gb: 'str' =None, timeout: 'str' =None, updated_at: 'datetime' =None, user_id: 'str' =None, warm: 'V1SandboxWarmStatus' =None, warm_secrets: 'dict(str, str)' =None): # noqa: E501 """V1Sandbox - a model defined in Swagger""" # noqa: E501 self._cloudspace_id = None self._cluster_id = None self._created_at = None + self._docker_data_root_on_disk = None self._id = None self._idle_timeout = None self._image = None @@ -149,6 +152,8 @@ def __init__(self, cloudspace_id: 'str' =None, cluster_id: 'str' =None, created_ self.cluster_id = cluster_id if created_at is not None: self.created_at = created_at + if docker_data_root_on_disk is not None: + self.docker_data_root_on_disk = docker_data_root_on_disk if id is not None: self.id = id if idle_timeout is not None: @@ -267,6 +272,27 @@ def created_at(self, created_at: 'datetime'): self._created_at = created_at + @property + def docker_data_root_on_disk(self) -> 'bool': + """Gets the docker_data_root_on_disk of this V1Sandbox. # noqa: E501 + + + :return: The docker_data_root_on_disk of this V1Sandbox. # noqa: E501 + :rtype: bool + """ + return self._docker_data_root_on_disk + + @docker_data_root_on_disk.setter + def docker_data_root_on_disk(self, docker_data_root_on_disk: 'bool'): + """Sets the docker_data_root_on_disk of this V1Sandbox. + + + :param docker_data_root_on_disk: The docker_data_root_on_disk of this V1Sandbox. # noqa: E501 + :type: bool + """ + + self._docker_data_root_on_disk = docker_data_root_on_disk + @property def id(self) -> 'str': """Gets the id of this V1Sandbox. # noqa: E501 @@ -537,7 +563,7 @@ def phase_durations(self, phase_durations: 'list[V1SandboxPhaseDuration]'): def port_urls(self) -> 'dict(str, str)': """Gets the port_urls of this V1Sandbox. # noqa: E501 - Public HTTPS URLs for the sandbox's user-exposed `ports`, keyed by the port number as a string (e.g. \"8080\" -> \"https://8080--s.cloudspaces.litng.ai\"). Each URL routes through the cluster proxy to that port inside the sandbox. Only the ports the caller requested at create time are included; the internal sandbox API port is never exposed. Populated on create / get / list / update responses; empty when the sandbox has no user ports. # noqa: E501 + Public HTTPS URLs for the sandbox's user-exposed `ports`, keyed by the port number as a string (e.g. \"8080\" -> \"https://8080--s.cloudspaces.litng.ai\"). Each URL routes through the cluster proxy to that port inside the sandbox. Only the ports requested at create time or through ExposeSandboxPorts are included; the internal sandbox API port is never exposed. Populated on create / get / list / update responses; empty when the sandbox has no user ports. # noqa: E501 :return: The port_urls of this V1Sandbox. # noqa: E501 :rtype: dict(str, str) @@ -548,7 +574,7 @@ def port_urls(self) -> 'dict(str, str)': def port_urls(self, port_urls: 'dict(str, str)'): """Sets the port_urls of this V1Sandbox. - Public HTTPS URLs for the sandbox's user-exposed `ports`, keyed by the port number as a string (e.g. \"8080\" -> \"https://8080--s.cloudspaces.litng.ai\"). Each URL routes through the cluster proxy to that port inside the sandbox. Only the ports the caller requested at create time are included; the internal sandbox API port is never exposed. Populated on create / get / list / update responses; empty when the sandbox has no user ports. # noqa: E501 + Public HTTPS URLs for the sandbox's user-exposed `ports`, keyed by the port number as a string (e.g. \"8080\" -> \"https://8080--s.cloudspaces.litng.ai\"). Each URL routes through the cluster proxy to that port inside the sandbox. Only the ports requested at create time or through ExposeSandboxPorts are included; the internal sandbox API port is never exposed. Populated on create / get / list / update responses; empty when the sandbox has no user ports. # noqa: E501 :param port_urls: The port_urls of this V1Sandbox. # noqa: E501 :type: dict(str, str) diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_sentinel_one_health.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_sentinel_one_health.py new file mode 100644 index 000000000..5298f98ee --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_sentinel_one_health.py @@ -0,0 +1,207 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1SentinelOneHealth(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'anti_tamper': 'str', + 'connectivity': 'str', + 'error': 'str', + 'uuid': 'str' + } + + attribute_map = { + 'anti_tamper': 'antiTamper', + 'connectivity': 'connectivity', + 'error': 'error', + 'uuid': 'uuid' + } + + def __init__(self, anti_tamper: 'str' =None, connectivity: 'str' =None, error: 'str' =None, uuid: 'str' =None): # noqa: E501 + """V1SentinelOneHealth - a model defined in Swagger""" # noqa: E501 + self._anti_tamper = None + self._connectivity = None + self._error = None + self._uuid = None + self.discriminator = None + if anti_tamper is not None: + self.anti_tamper = anti_tamper + if connectivity is not None: + self.connectivity = connectivity + if error is not None: + self.error = error + if uuid is not None: + self.uuid = uuid + + @property + def anti_tamper(self) -> 'str': + """Gets the anti_tamper of this V1SentinelOneHealth. # noqa: E501 + + + :return: The anti_tamper of this V1SentinelOneHealth. # noqa: E501 + :rtype: str + """ + return self._anti_tamper + + @anti_tamper.setter + def anti_tamper(self, anti_tamper: 'str'): + """Sets the anti_tamper of this V1SentinelOneHealth. + + + :param anti_tamper: The anti_tamper of this V1SentinelOneHealth. # noqa: E501 + :type: str + """ + + self._anti_tamper = anti_tamper + + @property + def connectivity(self) -> 'str': + """Gets the connectivity of this V1SentinelOneHealth. # noqa: E501 + + Observed guest status: On, Off, or unknown. These are not admission gates. # noqa: E501 + + :return: The connectivity of this V1SentinelOneHealth. # noqa: E501 + :rtype: str + """ + return self._connectivity + + @connectivity.setter + def connectivity(self, connectivity: 'str'): + """Sets the connectivity of this V1SentinelOneHealth. + + Observed guest status: On, Off, or unknown. These are not admission gates. # noqa: E501 + + :param connectivity: The connectivity of this V1SentinelOneHealth. # noqa: E501 + :type: str + """ + + self._connectivity = connectivity + + @property + def error(self) -> 'str': + """Gets the error of this V1SentinelOneHealth. # noqa: E501 + + + :return: The error of this V1SentinelOneHealth. # noqa: E501 + :rtype: str + """ + return self._error + + @error.setter + def error(self, error: 'str'): + """Sets the error of this V1SentinelOneHealth. + + + :param error: The error of this V1SentinelOneHealth. # noqa: E501 + :type: str + """ + + self._error = error + + @property + def uuid(self) -> 'str': + """Gets the uuid of this V1SentinelOneHealth. # noqa: E501 + + + :return: The uuid of this V1SentinelOneHealth. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid: 'str'): + """Sets the uuid of this V1SentinelOneHealth. + + + :param uuid: The uuid of this V1SentinelOneHealth. # noqa: E501 + :type: str + """ + + self._uuid = uuid + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1SentinelOneHealth, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1SentinelOneHealth') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1SentinelOneHealth): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1SentinelOneHealth') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_sentinel_one_mitigation.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_sentinel_one_mitigation.py new file mode 100644 index 000000000..bc79ec297 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_sentinel_one_mitigation.py @@ -0,0 +1,309 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1SentinelOneMitigation(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'classification': 'str', + 'kill_completed_at': 'datetime', + 'mitigated_at': 'datetime', + 'process_killed': 'bool', + 'reason': 'str', + 'threat_id': 'str', + 'threat_name': 'str', + 'threat_updated_at': 'datetime' + } + + attribute_map = { + 'classification': 'classification', + 'kill_completed_at': 'killCompletedAt', + 'mitigated_at': 'mitigatedAt', + 'process_killed': 'processKilled', + 'reason': 'reason', + 'threat_id': 'threatId', + 'threat_name': 'threatName', + 'threat_updated_at': 'threatUpdatedAt' + } + + def __init__(self, classification: 'str' =None, kill_completed_at: 'datetime' =None, mitigated_at: 'datetime' =None, process_killed: 'bool' =None, reason: 'str' =None, threat_id: 'str' =None, threat_name: 'str' =None, threat_updated_at: 'datetime' =None): # noqa: E501 + """V1SentinelOneMitigation - a model defined in Swagger""" # noqa: E501 + self._classification = None + self._kill_completed_at = None + self._mitigated_at = None + self._process_killed = None + self._reason = None + self._threat_id = None + self._threat_name = None + self._threat_updated_at = None + self.discriminator = None + if classification is not None: + self.classification = classification + if kill_completed_at is not None: + self.kill_completed_at = kill_completed_at + if mitigated_at is not None: + self.mitigated_at = mitigated_at + if process_killed is not None: + self.process_killed = process_killed + if reason is not None: + self.reason = reason + if threat_id is not None: + self.threat_id = threat_id + if threat_name is not None: + self.threat_name = threat_name + if threat_updated_at is not None: + self.threat_updated_at = threat_updated_at + + @property + def classification(self) -> 'str': + """Gets the classification of this V1SentinelOneMitigation. # noqa: E501 + + + :return: The classification of this V1SentinelOneMitigation. # noqa: E501 + :rtype: str + """ + return self._classification + + @classification.setter + def classification(self, classification: 'str'): + """Sets the classification of this V1SentinelOneMitigation. + + + :param classification: The classification of this V1SentinelOneMitigation. # noqa: E501 + :type: str + """ + + self._classification = classification + + @property + def kill_completed_at(self) -> 'datetime': + """Gets the kill_completed_at of this V1SentinelOneMitigation. # noqa: E501 + + + :return: The kill_completed_at of this V1SentinelOneMitigation. # noqa: E501 + :rtype: datetime + """ + return self._kill_completed_at + + @kill_completed_at.setter + def kill_completed_at(self, kill_completed_at: 'datetime'): + """Sets the kill_completed_at of this V1SentinelOneMitigation. + + + :param kill_completed_at: The kill_completed_at of this V1SentinelOneMitigation. # noqa: E501 + :type: datetime + """ + + self._kill_completed_at = kill_completed_at + + @property + def mitigated_at(self) -> 'datetime': + """Gets the mitigated_at of this V1SentinelOneMitigation. # noqa: E501 + + + :return: The mitigated_at of this V1SentinelOneMitigation. # noqa: E501 + :rtype: datetime + """ + return self._mitigated_at + + @mitigated_at.setter + def mitigated_at(self, mitigated_at: 'datetime'): + """Sets the mitigated_at of this V1SentinelOneMitigation. + + + :param mitigated_at: The mitigated_at of this V1SentinelOneMitigation. # noqa: E501 + :type: datetime + """ + + self._mitigated_at = mitigated_at + + @property + def process_killed(self) -> 'bool': + """Gets the process_killed of this V1SentinelOneMitigation. # noqa: E501 + + + :return: The process_killed of this V1SentinelOneMitigation. # noqa: E501 + :rtype: bool + """ + return self._process_killed + + @process_killed.setter + def process_killed(self, process_killed: 'bool'): + """Sets the process_killed of this V1SentinelOneMitigation. + + + :param process_killed: The process_killed of this V1SentinelOneMitigation. # noqa: E501 + :type: bool + """ + + self._process_killed = process_killed + + @property + def reason(self) -> 'str': + """Gets the reason of this V1SentinelOneMitigation. # noqa: E501 + + + :return: The reason of this V1SentinelOneMitigation. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason: 'str'): + """Sets the reason of this V1SentinelOneMitigation. + + + :param reason: The reason of this V1SentinelOneMitigation. # noqa: E501 + :type: str + """ + + self._reason = reason + + @property + def threat_id(self) -> 'str': + """Gets the threat_id of this V1SentinelOneMitigation. # noqa: E501 + + + :return: The threat_id of this V1SentinelOneMitigation. # noqa: E501 + :rtype: str + """ + return self._threat_id + + @threat_id.setter + def threat_id(self, threat_id: 'str'): + """Sets the threat_id of this V1SentinelOneMitigation. + + + :param threat_id: The threat_id of this V1SentinelOneMitigation. # noqa: E501 + :type: str + """ + + self._threat_id = threat_id + + @property + def threat_name(self) -> 'str': + """Gets the threat_name of this V1SentinelOneMitigation. # noqa: E501 + + + :return: The threat_name of this V1SentinelOneMitigation. # noqa: E501 + :rtype: str + """ + return self._threat_name + + @threat_name.setter + def threat_name(self, threat_name: 'str'): + """Sets the threat_name of this V1SentinelOneMitigation. + + + :param threat_name: The threat_name of this V1SentinelOneMitigation. # noqa: E501 + :type: str + """ + + self._threat_name = threat_name + + @property + def threat_updated_at(self) -> 'datetime': + """Gets the threat_updated_at of this V1SentinelOneMitigation. # noqa: E501 + + + :return: The threat_updated_at of this V1SentinelOneMitigation. # noqa: E501 + :rtype: datetime + """ + return self._threat_updated_at + + @threat_updated_at.setter + def threat_updated_at(self, threat_updated_at: 'datetime'): + """Sets the threat_updated_at of this V1SentinelOneMitigation. + + + :param threat_updated_at: The threat_updated_at of this V1SentinelOneMitigation. # noqa: E501 + :type: datetime + """ + + self._threat_updated_at = threat_updated_at + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1SentinelOneMitigation, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1SentinelOneMitigation') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1SentinelOneMitigation): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1SentinelOneMitigation') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_sentinel_one_state.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_sentinel_one_state.py new file mode 100644 index 000000000..675358b84 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_sentinel_one_state.py @@ -0,0 +1,285 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1SentinelOneState(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'anti_tamper': 'bool', + 'connectivity': 'bool', + 'connectivity_reached_at': 'float', + 'last_mitigation': 'V1SentinelOneMitigation', + 'mitigated': 'bool', + 'tagged': 'bool', + 'uuid': 'str' + } + + attribute_map = { + 'anti_tamper': 'antiTamper', + 'connectivity': 'connectivity', + 'connectivity_reached_at': 'connectivityReachedAt', + 'last_mitigation': 'lastMitigation', + 'mitigated': 'mitigated', + 'tagged': 'tagged', + 'uuid': 'uuid' + } + + def __init__(self, anti_tamper: 'bool' =None, connectivity: 'bool' =None, connectivity_reached_at: 'float' =None, last_mitigation: 'V1SentinelOneMitigation' =None, mitigated: 'bool' =None, tagged: 'bool' =None, uuid: 'str' =None): # noqa: E501 + """V1SentinelOneState - a model defined in Swagger""" # noqa: E501 + self._anti_tamper = None + self._connectivity = None + self._connectivity_reached_at = None + self._last_mitigation = None + self._mitigated = None + self._tagged = None + self._uuid = None + self.discriminator = None + if anti_tamper is not None: + self.anti_tamper = anti_tamper + if connectivity is not None: + self.connectivity = connectivity + if connectivity_reached_at is not None: + self.connectivity_reached_at = connectivity_reached_at + if last_mitigation is not None: + self.last_mitigation = last_mitigation + if mitigated is not None: + self.mitigated = mitigated + if tagged is not None: + self.tagged = tagged + if uuid is not None: + self.uuid = uuid + + @property + def anti_tamper(self) -> 'bool': + """Gets the anti_tamper of this V1SentinelOneState. # noqa: E501 + + + :return: The anti_tamper of this V1SentinelOneState. # noqa: E501 + :rtype: bool + """ + return self._anti_tamper + + @anti_tamper.setter + def anti_tamper(self, anti_tamper: 'bool'): + """Sets the anti_tamper of this V1SentinelOneState. + + + :param anti_tamper: The anti_tamper of this V1SentinelOneState. # noqa: E501 + :type: bool + """ + + self._anti_tamper = anti_tamper + + @property + def connectivity(self) -> 'bool': + """Gets the connectivity of this V1SentinelOneState. # noqa: E501 + + + :return: The connectivity of this V1SentinelOneState. # noqa: E501 + :rtype: bool + """ + return self._connectivity + + @connectivity.setter + def connectivity(self, connectivity: 'bool'): + """Sets the connectivity of this V1SentinelOneState. + + + :param connectivity: The connectivity of this V1SentinelOneState. # noqa: E501 + :type: bool + """ + + self._connectivity = connectivity + + @property + def connectivity_reached_at(self) -> 'float': + """Gets the connectivity_reached_at of this V1SentinelOneState. # noqa: E501 + + VM uptime in seconds when Connectivity=On was first observed. # noqa: E501 + + :return: The connectivity_reached_at of this V1SentinelOneState. # noqa: E501 + :rtype: float + """ + return self._connectivity_reached_at + + @connectivity_reached_at.setter + def connectivity_reached_at(self, connectivity_reached_at: 'float'): + """Sets the connectivity_reached_at of this V1SentinelOneState. + + VM uptime in seconds when Connectivity=On was first observed. # noqa: E501 + + :param connectivity_reached_at: The connectivity_reached_at of this V1SentinelOneState. # noqa: E501 + :type: float + """ + + self._connectivity_reached_at = connectivity_reached_at + + @property + def last_mitigation(self) -> 'V1SentinelOneMitigation': + """Gets the last_mitigation of this V1SentinelOneState. # noqa: E501 + + + :return: The last_mitigation of this V1SentinelOneState. # noqa: E501 + :rtype: V1SentinelOneMitigation + """ + return self._last_mitigation + + @last_mitigation.setter + def last_mitigation(self, last_mitigation: 'V1SentinelOneMitigation'): + """Sets the last_mitigation of this V1SentinelOneState. + + + :param last_mitigation: The last_mitigation of this V1SentinelOneState. # noqa: E501 + :type: V1SentinelOneMitigation + """ + + self._last_mitigation = last_mitigation + + @property + def mitigated(self) -> 'bool': + """Gets the mitigated of this V1SentinelOneState. # noqa: E501 + + + :return: The mitigated of this V1SentinelOneState. # noqa: E501 + :rtype: bool + """ + return self._mitigated + + @mitigated.setter + def mitigated(self, mitigated: 'bool'): + """Sets the mitigated of this V1SentinelOneState. + + + :param mitigated: The mitigated of this V1SentinelOneState. # noqa: E501 + :type: bool + """ + + self._mitigated = mitigated + + @property + def tagged(self) -> 'bool': + """Gets the tagged of this V1SentinelOneState. # noqa: E501 + + + :return: The tagged of this V1SentinelOneState. # noqa: E501 + :rtype: bool + """ + return self._tagged + + @tagged.setter + def tagged(self, tagged: 'bool'): + """Sets the tagged of this V1SentinelOneState. + + + :param tagged: The tagged of this V1SentinelOneState. # noqa: E501 + :type: bool + """ + + self._tagged = tagged + + @property + def uuid(self) -> 'str': + """Gets the uuid of this V1SentinelOneState. # noqa: E501 + + + :return: The uuid of this V1SentinelOneState. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid: 'str'): + """Sets the uuid of this V1SentinelOneState. + + + :param uuid: The uuid of this V1SentinelOneState. # noqa: E501 + :type: str + """ + + self._uuid = uuid + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1SentinelOneState, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1SentinelOneState') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1SentinelOneState): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1SentinelOneState') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_server_spec.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_server_spec.py index 831cec7a8..0a3ff3b75 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_server_spec.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_server_spec.py @@ -63,6 +63,7 @@ class V1ServerSpec(object): 'deployment_id': 'str', 'desired_machine_id': 'str', 'dws': 'bool', + 'exclude_machine_ids': 'list[V1MachineExclusion]', 'forward_ports': 'list[int]', 'free': 'bool', 'gpu_assignments': 'list[int]', @@ -83,6 +84,7 @@ class V1ServerSpec(object): 'machine_image_version': 'str', 'memory_zones': 'list[V1MemoryZone]', 'multi_machine_job_id': 'str', + 'multi_node_ib_cost_per_hour': 'float', 'network_interfaces': 'list[V1NetworkInterface]', 'nvlink_fm_partition': 'V1NvlinkFMPartitionBinding', 'parent_resource_id': 'str', @@ -105,6 +107,7 @@ class V1ServerSpec(object): 'reservation_time_minutes': 'str', 'resource_id': 'str', 'resource_type': 'str', + 'sentinelone': 'V1SentinelOneState', 'server_type': 'V1ServerType', 'skip_graceful_shutdown': 'bool', 'spot': 'bool', @@ -140,6 +143,7 @@ class V1ServerSpec(object): 'deployment_id': 'deploymentId', 'desired_machine_id': 'desiredMachineId', 'dws': 'dws', + 'exclude_machine_ids': 'excludeMachineIds', 'forward_ports': 'forwardPorts', 'free': 'free', 'gpu_assignments': 'gpuAssignments', @@ -160,6 +164,7 @@ class V1ServerSpec(object): 'machine_image_version': 'machineImageVersion', 'memory_zones': 'memoryZones', 'multi_machine_job_id': 'multiMachineJobId', + 'multi_node_ib_cost_per_hour': 'multiNodeIbCostPerHour', 'network_interfaces': 'networkInterfaces', 'nvlink_fm_partition': 'nvlinkFmPartition', 'parent_resource_id': 'parentResourceId', @@ -182,6 +187,7 @@ class V1ServerSpec(object): 'reservation_time_minutes': 'reservationTimeMinutes', 'resource_id': 'resourceId', 'resource_type': 'resourceType', + 'sentinelone': 'sentinelone', 'server_type': 'serverType', 'skip_graceful_shutdown': 'skipGracefulShutdown', 'spot': 'spot', @@ -198,7 +204,7 @@ class V1ServerSpec(object): 'workload_name': 'workloadName' } - def __init__(self, accelerator_type: 'V1AcceleratorType' =None, address: 'str' =None, affinity_identifier: 'str' =None, agent_version: 'str' =None, apparent_provider: 'str' =None, availability_zone: 'str' =None, batch_id: 'str' =None, ca_cert: 'str' =None, ca_key: 'str' =None, capacity_reservation_id: 'str' =None, cloud_init_run_cmds: 'list[str]' =None, cloud_space_id: 'str' =None, cluster_id: 'str' =None, customer_network_ids: 'list[str]' =None, delete_protection: 'bool' =None, deployment_id: 'str' =None, desired_machine_id: 'str' =None, dws: 'bool' =None, forward_ports: 'list[int]' =None, free: 'bool' =None, gpu_assignments: 'list[int]' =None, gpu_uuids: 'list[str]' =None, guest_accelerators: 'list[V1ServerAccelerator]' =None, ib_device_infos: 'list[V1IBDeviceInfo]' =None, ib_membership_source: 'str' =None, ib_membership_test_mode: 'bool' =None, inband_ip: 'str' =None, instance_managed_group_id: 'str' =None, instance_template_id: 'str' =None, instance_type: 'str' =None, keep_after_stop: 'bool' =None, launch_template_id: 'str' =None, lightning_interruptible: 'bool' =None, machine_id: 'str' =None, machine_image: 'str' =None, machine_image_version: 'str' =None, memory_zones: 'list[V1MemoryZone]' =None, multi_machine_job_id: 'str' =None, network_interfaces: 'list[V1NetworkInterface]' =None, nvlink_fm_partition: 'V1NvlinkFMPartitionBinding' =None, parent_resource_id: 'str' =None, parent_server_id: 'str' =None, persistent_disk_id: 'str' =None, placement_group_id: 'str' =None, port_forwarding_rules: 'list[V1PortForwardRule]' =None, port_overrides: 'V1PortOverrides' =None, private_address: 'str' =None, private_addresses: 'list[str]' =None, provider: 'str' =None, provider_config: 'str' =None, provider_instance_id: 'str' =None, provider_instance_url: 'str' =None, rank: 'int' =None, region: 'str' =None, regions: 'list[str]' =None, requested_run_duration_seconds: 'str' =None, required_machine_id: 'str' =None, reservation_time_minutes: 'str' =None, resource_id: 'str' =None, resource_type: 'str' =None, server_type: 'V1ServerType' =None, skip_graceful_shutdown: 'bool' =None, spot: 'bool' =None, ssh_public_keys: 'list[str]' =None, state: 'V1ServerState' =None, termination_time: 'datetime' =None, tls_cert: 'str' =None, tls_key: 'str' =None, user_cloud_init: 'str' =None, user_id: 'str' =None, volume_size: 'str' =None, volume_type: 'str' =None, volumes: 'list[V1Volume]' =None, workload_name: 'str' =None): # noqa: E501 + def __init__(self, accelerator_type: 'V1AcceleratorType' =None, address: 'str' =None, affinity_identifier: 'str' =None, agent_version: 'str' =None, apparent_provider: 'str' =None, availability_zone: 'str' =None, batch_id: 'str' =None, ca_cert: 'str' =None, ca_key: 'str' =None, capacity_reservation_id: 'str' =None, cloud_init_run_cmds: 'list[str]' =None, cloud_space_id: 'str' =None, cluster_id: 'str' =None, customer_network_ids: 'list[str]' =None, delete_protection: 'bool' =None, deployment_id: 'str' =None, desired_machine_id: 'str' =None, dws: 'bool' =None, exclude_machine_ids: 'list[V1MachineExclusion]' =None, forward_ports: 'list[int]' =None, free: 'bool' =None, gpu_assignments: 'list[int]' =None, gpu_uuids: 'list[str]' =None, guest_accelerators: 'list[V1ServerAccelerator]' =None, ib_device_infos: 'list[V1IBDeviceInfo]' =None, ib_membership_source: 'str' =None, ib_membership_test_mode: 'bool' =None, inband_ip: 'str' =None, instance_managed_group_id: 'str' =None, instance_template_id: 'str' =None, instance_type: 'str' =None, keep_after_stop: 'bool' =None, launch_template_id: 'str' =None, lightning_interruptible: 'bool' =None, machine_id: 'str' =None, machine_image: 'str' =None, machine_image_version: 'str' =None, memory_zones: 'list[V1MemoryZone]' =None, multi_machine_job_id: 'str' =None, multi_node_ib_cost_per_hour: 'float' =None, network_interfaces: 'list[V1NetworkInterface]' =None, nvlink_fm_partition: 'V1NvlinkFMPartitionBinding' =None, parent_resource_id: 'str' =None, parent_server_id: 'str' =None, persistent_disk_id: 'str' =None, placement_group_id: 'str' =None, port_forwarding_rules: 'list[V1PortForwardRule]' =None, port_overrides: 'V1PortOverrides' =None, private_address: 'str' =None, private_addresses: 'list[str]' =None, provider: 'str' =None, provider_config: 'str' =None, provider_instance_id: 'str' =None, provider_instance_url: 'str' =None, rank: 'int' =None, region: 'str' =None, regions: 'list[str]' =None, requested_run_duration_seconds: 'str' =None, required_machine_id: 'str' =None, reservation_time_minutes: 'str' =None, resource_id: 'str' =None, resource_type: 'str' =None, sentinelone: 'V1SentinelOneState' =None, server_type: 'V1ServerType' =None, skip_graceful_shutdown: 'bool' =None, spot: 'bool' =None, ssh_public_keys: 'list[str]' =None, state: 'V1ServerState' =None, termination_time: 'datetime' =None, tls_cert: 'str' =None, tls_key: 'str' =None, user_cloud_init: 'str' =None, user_id: 'str' =None, volume_size: 'str' =None, volume_type: 'str' =None, volumes: 'list[V1Volume]' =None, workload_name: 'str' =None): # noqa: E501 """V1ServerSpec - a model defined in Swagger""" # noqa: E501 self._accelerator_type = None self._address = None @@ -218,6 +224,7 @@ def __init__(self, accelerator_type: 'V1AcceleratorType' =None, address: 'str' = self._deployment_id = None self._desired_machine_id = None self._dws = None + self._exclude_machine_ids = None self._forward_ports = None self._free = None self._gpu_assignments = None @@ -238,6 +245,7 @@ def __init__(self, accelerator_type: 'V1AcceleratorType' =None, address: 'str' = self._machine_image_version = None self._memory_zones = None self._multi_machine_job_id = None + self._multi_node_ib_cost_per_hour = None self._network_interfaces = None self._nvlink_fm_partition = None self._parent_resource_id = None @@ -260,6 +268,7 @@ def __init__(self, accelerator_type: 'V1AcceleratorType' =None, address: 'str' = self._reservation_time_minutes = None self._resource_id = None self._resource_type = None + self._sentinelone = None self._server_type = None self._skip_graceful_shutdown = None self._spot = None @@ -311,6 +320,8 @@ def __init__(self, accelerator_type: 'V1AcceleratorType' =None, address: 'str' = self.desired_machine_id = desired_machine_id if dws is not None: self.dws = dws + if exclude_machine_ids is not None: + self.exclude_machine_ids = exclude_machine_ids if forward_ports is not None: self.forward_ports = forward_ports if free is not None: @@ -351,6 +362,8 @@ def __init__(self, accelerator_type: 'V1AcceleratorType' =None, address: 'str' = self.memory_zones = memory_zones if multi_machine_job_id is not None: self.multi_machine_job_id = multi_machine_job_id + if multi_node_ib_cost_per_hour is not None: + self.multi_node_ib_cost_per_hour = multi_node_ib_cost_per_hour if network_interfaces is not None: self.network_interfaces = network_interfaces if nvlink_fm_partition is not None: @@ -395,6 +408,8 @@ def __init__(self, accelerator_type: 'V1AcceleratorType' =None, address: 'str' = self.resource_id = resource_id if resource_type is not None: self.resource_type = resource_type + if sentinelone is not None: + self.sentinelone = sentinelone if server_type is not None: self.server_type = server_type if skip_graceful_shutdown is not None: @@ -804,6 +819,29 @@ def dws(self, dws: 'bool'): self._dws = dws + @property + def exclude_machine_ids(self) -> 'list[V1MachineExclusion]': + """Gets the exclude_machine_ids of this V1ServerSpec. # noqa: E501 + + Admission rejections apply only to this server and expire after the configured debounce period. # noqa: E501 + + :return: The exclude_machine_ids of this V1ServerSpec. # noqa: E501 + :rtype: list[V1MachineExclusion] + """ + return self._exclude_machine_ids + + @exclude_machine_ids.setter + def exclude_machine_ids(self, exclude_machine_ids: 'list[V1MachineExclusion]'): + """Sets the exclude_machine_ids of this V1ServerSpec. + + Admission rejections apply only to this server and expire after the configured debounce period. # noqa: E501 + + :param exclude_machine_ids: The exclude_machine_ids of this V1ServerSpec. # noqa: E501 + :type: list[V1MachineExclusion] + """ + + self._exclude_machine_ids = exclude_machine_ids + @property def forward_ports(self) -> 'list[int]': """Gets the forward_ports of this V1ServerSpec. # noqa: E501 @@ -1232,6 +1270,29 @@ def multi_machine_job_id(self, multi_machine_job_id: 'str'): self._multi_machine_job_id = multi_machine_job_id + @property + def multi_node_ib_cost_per_hour(self) -> 'float': + """Gets the multi_node_ib_cost_per_hour of this V1ServerSpec. # noqa: E501 + + Allocation-time rate retained for billing after placement-group peers are deleted. # noqa: E501 + + :return: The multi_node_ib_cost_per_hour of this V1ServerSpec. # noqa: E501 + :rtype: float + """ + return self._multi_node_ib_cost_per_hour + + @multi_node_ib_cost_per_hour.setter + def multi_node_ib_cost_per_hour(self, multi_node_ib_cost_per_hour: 'float'): + """Sets the multi_node_ib_cost_per_hour of this V1ServerSpec. + + Allocation-time rate retained for billing after placement-group peers are deleted. # noqa: E501 + + :param multi_node_ib_cost_per_hour: The multi_node_ib_cost_per_hour of this V1ServerSpec. # noqa: E501 + :type: float + """ + + self._multi_node_ib_cost_per_hour = multi_node_ib_cost_per_hour + @property def network_interfaces(self) -> 'list[V1NetworkInterface]': """Gets the network_interfaces of this V1ServerSpec. # noqa: E501 @@ -1696,6 +1757,27 @@ def resource_type(self, resource_type: 'str'): self._resource_type = resource_type + @property + def sentinelone(self) -> 'V1SentinelOneState': + """Gets the sentinelone of this V1ServerSpec. # noqa: E501 + + + :return: The sentinelone of this V1ServerSpec. # noqa: E501 + :rtype: V1SentinelOneState + """ + return self._sentinelone + + @sentinelone.setter + def sentinelone(self, sentinelone: 'V1SentinelOneState'): + """Sets the sentinelone of this V1ServerSpec. + + + :param sentinelone: The sentinelone of this V1ServerSpec. # noqa: E501 + :type: V1SentinelOneState + """ + + self._sentinelone = sentinelone + @property def server_type(self) -> 'V1ServerType': """Gets the server_type of this V1ServerSpec. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_server_status.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_server_status.py index c7900a538..51c0cb671 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_server_status.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_server_status.py @@ -58,6 +58,7 @@ class V1ServerStatus(object): 'requires_maintenance': 'bool', 'retried_at': 'datetime', 'retries': 'str', + 'scheduler_attempted': 'bool', 'started_at': 'datetime', 'stop_retried_at': 'datetime', 'stop_retries': 'str', @@ -84,6 +85,7 @@ class V1ServerStatus(object): 'requires_maintenance': 'requiresMaintenance', 'retried_at': 'retriedAt', 'retries': 'retries', + 'scheduler_attempted': 'schedulerAttempted', 'started_at': 'startedAt', 'stop_retried_at': 'stopRetriedAt', 'stop_retries': 'stopRetries', @@ -96,7 +98,7 @@ class V1ServerStatus(object): 'workload_taken_at': 'workloadTakenAt' } - def __init__(self, alert: 'V1ServerAlert' =None, allocate_duration_seconds: 'str' =None, container_image: 'list[str]' =None, created_at: 'datetime' =None, error: 'str' =None, install_duration_seconds: 'str' =None, interruption_notice_received: 'bool' =None, interruption_notice_received_at: 'datetime' =None, last_seen_at: 'datetime' =None, logs_uploaded_at: 'datetime' =None, requires_maintenance: 'bool' =None, retried_at: 'datetime' =None, retries: 'str' =None, started_at: 'datetime' =None, stop_retried_at: 'datetime' =None, stop_retries: 'str' =None, stopped_at: 'datetime' =None, updated_at: 'datetime' =None, workload_container_restarts_count: 'str' =None, workload_runtime: 'str' =None, workload_state: 'str' =None, workload_state_details: 'str' =None, workload_taken_at: 'datetime' =None): # noqa: E501 + def __init__(self, alert: 'V1ServerAlert' =None, allocate_duration_seconds: 'str' =None, container_image: 'list[str]' =None, created_at: 'datetime' =None, error: 'str' =None, install_duration_seconds: 'str' =None, interruption_notice_received: 'bool' =None, interruption_notice_received_at: 'datetime' =None, last_seen_at: 'datetime' =None, logs_uploaded_at: 'datetime' =None, requires_maintenance: 'bool' =None, retried_at: 'datetime' =None, retries: 'str' =None, scheduler_attempted: 'bool' =None, started_at: 'datetime' =None, stop_retried_at: 'datetime' =None, stop_retries: 'str' =None, stopped_at: 'datetime' =None, updated_at: 'datetime' =None, workload_container_restarts_count: 'str' =None, workload_runtime: 'str' =None, workload_state: 'str' =None, workload_state_details: 'str' =None, workload_taken_at: 'datetime' =None): # noqa: E501 """V1ServerStatus - a model defined in Swagger""" # noqa: E501 self._alert = None self._allocate_duration_seconds = None @@ -111,6 +113,7 @@ def __init__(self, alert: 'V1ServerAlert' =None, allocate_duration_seconds: 'str self._requires_maintenance = None self._retried_at = None self._retries = None + self._scheduler_attempted = None self._started_at = None self._stop_retried_at = None self._stop_retries = None @@ -148,6 +151,8 @@ def __init__(self, alert: 'V1ServerAlert' =None, allocate_duration_seconds: 'str self.retried_at = retried_at if retries is not None: self.retries = retries + if scheduler_attempted is not None: + self.scheduler_attempted = scheduler_attempted if started_at is not None: self.started_at = started_at if stop_retried_at is not None: @@ -444,6 +449,29 @@ def retries(self, retries: 'str'): self._retries = retries + @property + def scheduler_attempted(self) -> 'bool': + """Gets the scheduler_attempted of this V1ServerStatus. # noqa: E501 + + True once the machine-cluster scheduler has run at least once for this server. Sticky; placement is recorded separately (machine_id / provider). # noqa: E501 + + :return: The scheduler_attempted of this V1ServerStatus. # noqa: E501 + :rtype: bool + """ + return self._scheduler_attempted + + @scheduler_attempted.setter + def scheduler_attempted(self, scheduler_attempted: 'bool'): + """Sets the scheduler_attempted of this V1ServerStatus. + + True once the machine-cluster scheduler has run at least once for this server. Sticky; placement is recorded separately (machine_id / provider). # noqa: E501 + + :param scheduler_attempted: The scheduler_attempted of this V1ServerStatus. # noqa: E501 + :type: bool + """ + + self._scheduler_attempted = scheduler_attempted + @property def started_at(self) -> 'datetime': """Gets the started_at of this V1ServerStatus. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_delete_lightningwork_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_set_machine_vpn_services_response.py similarity index 87% rename from python/lightning_sdk/lightning_cloud/openapi/models/v1_delete_lightningwork_response.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_set_machine_vpn_services_response.py index a3975050b..b34191b36 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_delete_lightningwork_response.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_set_machine_vpn_services_response.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class V1DeleteLightningworkResponse(object): +class V1SetMachineVPNServicesResponse(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -51,7 +51,7 @@ class V1DeleteLightningworkResponse(object): } def __init__(self): # noqa: E501 - """V1DeleteLightningworkResponse - a model defined in Swagger""" # noqa: E501 + """V1SetMachineVPNServicesResponse - a model defined in Swagger""" # noqa: E501 self.discriminator = None def to_dict(self) -> dict: @@ -75,7 +75,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(V1DeleteLightningworkResponse, dict): + if issubclass(V1SetMachineVPNServicesResponse, dict): for key, value in self.items(): result[key] = value @@ -89,13 +89,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'V1DeleteLightningworkResponse') -> bool: + def __eq__(self, other: 'V1SetMachineVPNServicesResponse') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, V1DeleteLightningworkResponse): + if not isinstance(other, V1SetMachineVPNServicesResponse): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'V1DeleteLightningworkResponse') -> bool: + def __ne__(self, other: 'V1SetMachineVPNServicesResponse') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_app_action_type.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_storage_limit_reason.py similarity index 85% rename from python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_app_action_type.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_storage_limit_reason.py index 1f21b07ad..39643f699 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_app_action_type.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_storage_limit_reason.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class V1CloudSpaceAppActionType(object): +class V1StorageLimitReason(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -41,8 +41,9 @@ class V1CloudSpaceAppActionType(object): """ allowed enum values """ - TOAST = "TOAST" - NAVIGATE_TO = "NAVIGATE_TO" + UNSPECIFIED = "STORAGE_LIMIT_REASON_UNSPECIFIED" + PLAN = "STORAGE_LIMIT_REASON_PLAN" + OUT_OF_CREDITS = "STORAGE_LIMIT_REASON_OUT_OF_CREDITS" """ Attributes: swagger_types (dict): The key is attribute name @@ -57,7 +58,7 @@ class V1CloudSpaceAppActionType(object): } def __init__(self): # noqa: E501 - """V1CloudSpaceAppActionType - a model defined in Swagger""" # noqa: E501 + """V1StorageLimitReason - a model defined in Swagger""" # noqa: E501 self.discriminator = None def to_dict(self) -> dict: @@ -81,7 +82,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(V1CloudSpaceAppActionType, dict): + if issubclass(V1StorageLimitReason, dict): for key, value in self.items(): result[key] = value @@ -95,13 +96,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'V1CloudSpaceAppActionType') -> bool: + def __eq__(self, other: 'V1StorageLimitReason') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, V1CloudSpaceAppActionType): + if not isinstance(other, V1StorageLimitReason): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'V1CloudSpaceAppActionType') -> bool: + def __ne__(self, other: 'V1StorageLimitReason') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_update_coding_usage_settings_request.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_update_coding_usage_settings_request.py new file mode 100644 index 000000000..cfe9c70d8 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_update_coding_usage_settings_request.py @@ -0,0 +1,153 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1UpdateCodingUsageSettingsRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'org_id': 'str', + 'usage_credits_enabled': 'bool' + } + + attribute_map = { + 'org_id': 'orgId', + 'usage_credits_enabled': 'usageCreditsEnabled' + } + + def __init__(self, org_id: 'str' =None, usage_credits_enabled: 'bool' =None): # noqa: E501 + """V1UpdateCodingUsageSettingsRequest - a model defined in Swagger""" # noqa: E501 + self._org_id = None + self._usage_credits_enabled = None + self.discriminator = None + if org_id is not None: + self.org_id = org_id + if usage_credits_enabled is not None: + self.usage_credits_enabled = usage_credits_enabled + + @property + def org_id(self) -> 'str': + """Gets the org_id of this V1UpdateCodingUsageSettingsRequest. # noqa: E501 + + + :return: The org_id of this V1UpdateCodingUsageSettingsRequest. # noqa: E501 + :rtype: str + """ + return self._org_id + + @org_id.setter + def org_id(self, org_id: 'str'): + """Sets the org_id of this V1UpdateCodingUsageSettingsRequest. + + + :param org_id: The org_id of this V1UpdateCodingUsageSettingsRequest. # noqa: E501 + :type: str + """ + + self._org_id = org_id + + @property + def usage_credits_enabled(self) -> 'bool': + """Gets the usage_credits_enabled of this V1UpdateCodingUsageSettingsRequest. # noqa: E501 + + + :return: The usage_credits_enabled of this V1UpdateCodingUsageSettingsRequest. # noqa: E501 + :rtype: bool + """ + return self._usage_credits_enabled + + @usage_credits_enabled.setter + def usage_credits_enabled(self, usage_credits_enabled: 'bool'): + """Sets the usage_credits_enabled of this V1UpdateCodingUsageSettingsRequest. + + + :param usage_credits_enabled: The usage_credits_enabled of this V1UpdateCodingUsageSettingsRequest. # noqa: E501 + :type: bool + """ + + self._usage_credits_enabled = usage_credits_enabled + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1UpdateCodingUsageSettingsRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1UpdateCodingUsageSettingsRequest') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1UpdateCodingUsageSettingsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1UpdateCodingUsageSettingsRequest') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/lightningwork_service_update_lightningwork_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_update_coding_usage_settings_response.py similarity index 65% rename from python/lightning_sdk/lightning_cloud/openapi/models/lightningwork_service_update_lightningwork_body.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_update_coding_usage_settings_response.py index 5a4b595a9..a63a343d5 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/lightningwork_service_update_lightningwork_body.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_update_coding_usage_settings_response.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class LightningworkServiceUpdateLightningworkBody(object): +class V1UpdateCodingUsageSettingsResponse(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -45,40 +45,40 @@ class LightningworkServiceUpdateLightningworkBody(object): and the value is json key in definition. """ swagger_types = { - 'spec': 'LightningworkServiceCreateLightningworkBodySpec' + 'usage_credits_enabled': 'bool' } attribute_map = { - 'spec': 'spec' + 'usage_credits_enabled': 'usageCreditsEnabled' } - def __init__(self, spec: 'LightningworkServiceCreateLightningworkBodySpec' =None): # noqa: E501 - """LightningworkServiceUpdateLightningworkBody - a model defined in Swagger""" # noqa: E501 - self._spec = None + def __init__(self, usage_credits_enabled: 'bool' =None): # noqa: E501 + """V1UpdateCodingUsageSettingsResponse - a model defined in Swagger""" # noqa: E501 + self._usage_credits_enabled = None self.discriminator = None - if spec is not None: - self.spec = spec + if usage_credits_enabled is not None: + self.usage_credits_enabled = usage_credits_enabled @property - def spec(self) -> 'LightningworkServiceCreateLightningworkBodySpec': - """Gets the spec of this LightningworkServiceUpdateLightningworkBody. # noqa: E501 + def usage_credits_enabled(self) -> 'bool': + """Gets the usage_credits_enabled of this V1UpdateCodingUsageSettingsResponse. # noqa: E501 - :return: The spec of this LightningworkServiceUpdateLightningworkBody. # noqa: E501 - :rtype: LightningworkServiceCreateLightningworkBodySpec + :return: The usage_credits_enabled of this V1UpdateCodingUsageSettingsResponse. # noqa: E501 + :rtype: bool """ - return self._spec + return self._usage_credits_enabled - @spec.setter - def spec(self, spec: 'LightningworkServiceCreateLightningworkBodySpec'): - """Sets the spec of this LightningworkServiceUpdateLightningworkBody. + @usage_credits_enabled.setter + def usage_credits_enabled(self, usage_credits_enabled: 'bool'): + """Sets the usage_credits_enabled of this V1UpdateCodingUsageSettingsResponse. - :param spec: The spec of this LightningworkServiceUpdateLightningworkBody. # noqa: E501 - :type: LightningworkServiceCreateLightningworkBodySpec + :param usage_credits_enabled: The usage_credits_enabled of this V1UpdateCodingUsageSettingsResponse. # noqa: E501 + :type: bool """ - self._spec = spec + self._usage_credits_enabled = usage_credits_enabled def to_dict(self) -> dict: """Returns the model properties as a dict""" @@ -101,7 +101,7 @@ def to_dict(self) -> dict: )) else: result[attr] = value - if issubclass(LightningworkServiceUpdateLightningworkBody, dict): + if issubclass(V1UpdateCodingUsageSettingsResponse, dict): for key, value in self.items(): result[key] = value @@ -115,13 +115,13 @@ def __repr__(self) -> str: """For `print` and `pprint`""" return self.to_str() - def __eq__(self, other: 'LightningworkServiceUpdateLightningworkBody') -> bool: + def __eq__(self, other: 'V1UpdateCodingUsageSettingsResponse') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, LightningworkServiceUpdateLightningworkBody): + if not isinstance(other, V1UpdateCodingUsageSettingsResponse): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'LightningworkServiceUpdateLightningworkBody') -> bool: + def __ne__(self, other: 'V1UpdateCodingUsageSettingsResponse') -> bool: """Returns true if both objects are not equal""" return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py index c7207b3ad..fb74dce06 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py @@ -46,9 +46,6 @@ class V1UpdateUserRequest(object): """ swagger_types = { 'agree_to_terms_and_conditions': 'bool', - 'allow_credits_auto_replenish': 'bool', - 'auto_replenish_amount': 'float', - 'auto_replenish_threshold': 'float', 'complete_sign_up': 'bool', 'completed_project_onboarding': 'bool', 'country': 'str', @@ -77,9 +74,6 @@ class V1UpdateUserRequest(object): attribute_map = { 'agree_to_terms_and_conditions': 'agreeToTermsAndConditions', - 'allow_credits_auto_replenish': 'allowCreditsAutoReplenish', - 'auto_replenish_amount': 'autoReplenishAmount', - 'auto_replenish_threshold': 'autoReplenishThreshold', 'complete_sign_up': 'completeSignUp', 'completed_project_onboarding': 'completedProjectOnboarding', 'country': 'country', @@ -106,12 +100,9 @@ class V1UpdateUserRequest(object): 'website': 'website' } - def __init__(self, agree_to_terms_and_conditions: 'bool' =None, allow_credits_auto_replenish: 'bool' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, complete_sign_up: 'bool' =None, completed_project_onboarding: 'bool' =None, country: 'str' =None, disable_shell_persistence: 'bool' =None, email: 'str' =None, experimentation_id: 'str' =None, first_name: 'str' =None, general_audience_mode: 'bool' =None, last_name: 'str' =None, linux_username: 'str' =None, non_developer_mode: 'bool' =None, opted_in_marketing_emails: 'bool' =None, organization: 'str' =None, preferred_color_scheme: 'str' =None, preferred_ide: 'str' =None, preferred_shell: 'str' =None, preferred_vscode_marketplace: 'str' =None, role: 'str' =None, saw_create_first_project_dialog: 'bool' =None, saw_forums_login_merge_dialog: 'bool' =None, saw_free_credits_notification: 'bool' =None, user_metadata: 'str' =None, username: 'str' =None, website: 'str' =None): # noqa: E501 + def __init__(self, agree_to_terms_and_conditions: 'bool' =None, complete_sign_up: 'bool' =None, completed_project_onboarding: 'bool' =None, country: 'str' =None, disable_shell_persistence: 'bool' =None, email: 'str' =None, experimentation_id: 'str' =None, first_name: 'str' =None, general_audience_mode: 'bool' =None, last_name: 'str' =None, linux_username: 'str' =None, non_developer_mode: 'bool' =None, opted_in_marketing_emails: 'bool' =None, organization: 'str' =None, preferred_color_scheme: 'str' =None, preferred_ide: 'str' =None, preferred_shell: 'str' =None, preferred_vscode_marketplace: 'str' =None, role: 'str' =None, saw_create_first_project_dialog: 'bool' =None, saw_forums_login_merge_dialog: 'bool' =None, saw_free_credits_notification: 'bool' =None, user_metadata: 'str' =None, username: 'str' =None, website: 'str' =None): # noqa: E501 """V1UpdateUserRequest - a model defined in Swagger""" # noqa: E501 self._agree_to_terms_and_conditions = None - self._allow_credits_auto_replenish = None - self._auto_replenish_amount = None - self._auto_replenish_threshold = None self._complete_sign_up = None self._completed_project_onboarding = None self._country = None @@ -139,12 +130,6 @@ def __init__(self, agree_to_terms_and_conditions: 'bool' =None, allow_credits_au self.discriminator = None if agree_to_terms_and_conditions is not None: self.agree_to_terms_and_conditions = agree_to_terms_and_conditions - if allow_credits_auto_replenish is not None: - self.allow_credits_auto_replenish = allow_credits_auto_replenish - if auto_replenish_amount is not None: - self.auto_replenish_amount = auto_replenish_amount - if auto_replenish_threshold is not None: - self.auto_replenish_threshold = auto_replenish_threshold if complete_sign_up is not None: self.complete_sign_up = complete_sign_up if completed_project_onboarding is not None: @@ -215,71 +200,6 @@ def agree_to_terms_and_conditions(self, agree_to_terms_and_conditions: 'bool'): self._agree_to_terms_and_conditions = agree_to_terms_and_conditions - @property - def allow_credits_auto_replenish(self) -> 'bool': - """Gets the allow_credits_auto_replenish of this V1UpdateUserRequest. # noqa: E501 - - If true, credits will be auto-replenished from the credit card on file. # noqa: E501 - - :return: The allow_credits_auto_replenish of this V1UpdateUserRequest. # noqa: E501 - :rtype: bool - """ - return self._allow_credits_auto_replenish - - @allow_credits_auto_replenish.setter - def allow_credits_auto_replenish(self, allow_credits_auto_replenish: 'bool'): - """Sets the allow_credits_auto_replenish of this V1UpdateUserRequest. - - If true, credits will be auto-replenished from the credit card on file. # noqa: E501 - - :param allow_credits_auto_replenish: The allow_credits_auto_replenish of this V1UpdateUserRequest. # noqa: E501 - :type: bool - """ - - self._allow_credits_auto_replenish = allow_credits_auto_replenish - - @property - def auto_replenish_amount(self) -> 'float': - """Gets the auto_replenish_amount of this V1UpdateUserRequest. # noqa: E501 - - - :return: The auto_replenish_amount of this V1UpdateUserRequest. # noqa: E501 - :rtype: float - """ - return self._auto_replenish_amount - - @auto_replenish_amount.setter - def auto_replenish_amount(self, auto_replenish_amount: 'float'): - """Sets the auto_replenish_amount of this V1UpdateUserRequest. - - - :param auto_replenish_amount: The auto_replenish_amount of this V1UpdateUserRequest. # noqa: E501 - :type: float - """ - - self._auto_replenish_amount = auto_replenish_amount - - @property - def auto_replenish_threshold(self) -> 'float': - """Gets the auto_replenish_threshold of this V1UpdateUserRequest. # noqa: E501 - - - :return: The auto_replenish_threshold of this V1UpdateUserRequest. # noqa: E501 - :rtype: float - """ - return self._auto_replenish_threshold - - @auto_replenish_threshold.setter - def auto_replenish_threshold(self, auto_replenish_threshold: 'float'): - """Sets the auto_replenish_threshold of this V1UpdateUserRequest. - - - :param auto_replenish_threshold: The auto_replenish_threshold of this V1UpdateUserRequest. # noqa: E501 - :type: float - """ - - self._auto_replenish_threshold = auto_replenish_threshold - @property def complete_sign_up(self) -> 'bool': """Gets the complete_sign_up of this V1UpdateUserRequest. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_usage_report_subfilters.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_usage_report_subfilters.py new file mode 100644 index 000000000..e5cb7d498 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_usage_report_subfilters.py @@ -0,0 +1,205 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1UsageReportSubfilters(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'assistant_message': 'V1AssistantMessageSubfilter', + 'deployment': 'V1WorkloadTagSubfilter', + 'job': 'V1WorkloadTagSubfilter', + 'multi_machine_job': 'V1WorkloadTagSubfilter' + } + + attribute_map = { + 'assistant_message': 'assistantMessage', + 'deployment': 'deployment', + 'job': 'job', + 'multi_machine_job': 'multiMachineJob' + } + + def __init__(self, assistant_message: 'V1AssistantMessageSubfilter' =None, deployment: 'V1WorkloadTagSubfilter' =None, job: 'V1WorkloadTagSubfilter' =None, multi_machine_job: 'V1WorkloadTagSubfilter' =None): # noqa: E501 + """V1UsageReportSubfilters - a model defined in Swagger""" # noqa: E501 + self._assistant_message = None + self._deployment = None + self._job = None + self._multi_machine_job = None + self.discriminator = None + if assistant_message is not None: + self.assistant_message = assistant_message + if deployment is not None: + self.deployment = deployment + if job is not None: + self.job = job + if multi_machine_job is not None: + self.multi_machine_job = multi_machine_job + + @property + def assistant_message(self) -> 'V1AssistantMessageSubfilter': + """Gets the assistant_message of this V1UsageReportSubfilters. # noqa: E501 + + + :return: The assistant_message of this V1UsageReportSubfilters. # noqa: E501 + :rtype: V1AssistantMessageSubfilter + """ + return self._assistant_message + + @assistant_message.setter + def assistant_message(self, assistant_message: 'V1AssistantMessageSubfilter'): + """Sets the assistant_message of this V1UsageReportSubfilters. + + + :param assistant_message: The assistant_message of this V1UsageReportSubfilters. # noqa: E501 + :type: V1AssistantMessageSubfilter + """ + + self._assistant_message = assistant_message + + @property + def deployment(self) -> 'V1WorkloadTagSubfilter': + """Gets the deployment of this V1UsageReportSubfilters. # noqa: E501 + + + :return: The deployment of this V1UsageReportSubfilters. # noqa: E501 + :rtype: V1WorkloadTagSubfilter + """ + return self._deployment + + @deployment.setter + def deployment(self, deployment: 'V1WorkloadTagSubfilter'): + """Sets the deployment of this V1UsageReportSubfilters. + + + :param deployment: The deployment of this V1UsageReportSubfilters. # noqa: E501 + :type: V1WorkloadTagSubfilter + """ + + self._deployment = deployment + + @property + def job(self) -> 'V1WorkloadTagSubfilter': + """Gets the job of this V1UsageReportSubfilters. # noqa: E501 + + + :return: The job of this V1UsageReportSubfilters. # noqa: E501 + :rtype: V1WorkloadTagSubfilter + """ + return self._job + + @job.setter + def job(self, job: 'V1WorkloadTagSubfilter'): + """Sets the job of this V1UsageReportSubfilters. + + + :param job: The job of this V1UsageReportSubfilters. # noqa: E501 + :type: V1WorkloadTagSubfilter + """ + + self._job = job + + @property + def multi_machine_job(self) -> 'V1WorkloadTagSubfilter': + """Gets the multi_machine_job of this V1UsageReportSubfilters. # noqa: E501 + + + :return: The multi_machine_job of this V1UsageReportSubfilters. # noqa: E501 + :rtype: V1WorkloadTagSubfilter + """ + return self._multi_machine_job + + @multi_machine_job.setter + def multi_machine_job(self, multi_machine_job: 'V1WorkloadTagSubfilter'): + """Sets the multi_machine_job of this V1UsageReportSubfilters. + + + :param multi_machine_job: The multi_machine_job of this V1UsageReportSubfilters. # noqa: E501 + :type: V1WorkloadTagSubfilter + """ + + self._multi_machine_job = multi_machine_job + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1UsageReportSubfilters, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1UsageReportSubfilters') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1UsageReportSubfilters): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1UsageReportSubfilters') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py index 7d441d801..c19465b5b 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py @@ -72,7 +72,6 @@ class V1UserFeatures(object): 'f252': 'bool', 'f253': 'bool', 'f254': 'bool', - 'f258': 'bool', 'f259': 'bool', 'f266': 'bool', 'f268': 'bool', @@ -118,11 +117,9 @@ class V1UserFeatures(object): 'f347': 'bool', 'f348': 'bool', 'f349': 'bool', - 'f352': 'bool', 'f353': 'bool', 'f355': 'bool', 'f356': 'bool', - 'f357': 'bool', 'f358': 'bool', 'f359': 'bool', 'f361': 'bool', @@ -133,19 +130,23 @@ class V1UserFeatures(object): 'f366': 'bool', 'f367': 'bool', 'f369': 'bool', - 'f370': 'bool', - 'f371': 'bool', 'f372': 'bool', - 'f373': 'bool', - 'f374': 'bool', 'f375': 'bool', 'f376': 'bool', - 'f377': 'bool', 'f378': 'bool', - 'f379': 'bool', 'f380': 'bool', 'f381': 'bool', - 'f382': 'bool', + 'f383': 'bool', + 'f384': 'bool', + 'f385': 'bool', + 'f386': 'bool', + 'f387': 'bool', + 'f388': 'bool', + 'f389': 'bool', + 'f390': 'bool', + 'f391': 'bool', + 'f392': 'bool', + 'f393': 'bool', 'fair_share': 'bool', 'featured_studios_admin': 'bool', 'job_artifacts_v2': 'bool', @@ -177,8 +178,7 @@ class V1UserFeatures(object): 'slurm': 'bool', 'specialised_studios': 'bool', 'studio_config': 'bool', - 'studio_version_visibility': 'bool', - 'vultr': 'bool' + 'studio_version_visibility': 'bool' } attribute_map = { @@ -209,7 +209,6 @@ class V1UserFeatures(object): 'f252': 'f252', 'f253': 'f253', 'f254': 'f254', - 'f258': 'f258', 'f259': 'f259', 'f266': 'f266', 'f268': 'f268', @@ -255,11 +254,9 @@ class V1UserFeatures(object): 'f347': 'f347', 'f348': 'f348', 'f349': 'f349', - 'f352': 'f352', 'f353': 'f353', 'f355': 'f355', 'f356': 'f356', - 'f357': 'f357', 'f358': 'f358', 'f359': 'f359', 'f361': 'f361', @@ -270,19 +267,23 @@ class V1UserFeatures(object): 'f366': 'f366', 'f367': 'f367', 'f369': 'f369', - 'f370': 'f370', - 'f371': 'f371', 'f372': 'f372', - 'f373': 'f373', - 'f374': 'f374', 'f375': 'f375', 'f376': 'f376', - 'f377': 'f377', 'f378': 'f378', - 'f379': 'f379', 'f380': 'f380', 'f381': 'f381', - 'f382': 'f382', + 'f383': 'f383', + 'f384': 'f384', + 'f385': 'f385', + 'f386': 'f386', + 'f387': 'f387', + 'f388': 'f388', + 'f389': 'f389', + 'f390': 'f390', + 'f391': 'f391', + 'f392': 'f392', + 'f393': 'f393', 'fair_share': 'fairShare', 'featured_studios_admin': 'featuredStudiosAdmin', 'job_artifacts_v2': 'jobArtifactsV2', @@ -314,11 +315,10 @@ class V1UserFeatures(object): 'slurm': 'slurm', 'specialised_studios': 'specialisedStudios', 'studio_config': 'studioConfig', - 'studio_version_visibility': 'studioVersionVisibility', - 'vultr': 'vultr' + 'studio_version_visibility': 'studioVersionVisibility' } - def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, b2c_experience: 'bool' =None, byo_machine_type: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, chat_models: 'bool' =None, cloudspace_schedules: 'bool' =None, collab_screen_sharing: 'bool' =None, control_center_monitoring: 'bool' =None, cost_attribution_settings: 'bool' =None, datasets: 'bool' =None, default_one_cluster: 'bool' =None, enterprise_compute_admin: 'bool' =None, f234: 'bool' =None, f240: 'bool' =None, f241: 'bool' =None, f243: 'bool' =None, f245: 'bool' =None, f247: 'bool' =None, f250: 'bool' =None, f252: 'bool' =None, f253: 'bool' =None, f254: 'bool' =None, f258: 'bool' =None, f259: 'bool' =None, f266: 'bool' =None, f268: 'bool' =None, f270: 'bool' =None, f271: 'bool' =None, f272: 'bool' =None, f279: 'bool' =None, f281: 'bool' =None, f283: 'bool' =None, f287: 'bool' =None, f288: 'bool' =None, f293: 'bool' =None, f294: 'bool' =None, f297: 'bool' =None, f298: 'bool' =None, f299: 'bool' =None, f300: 'bool' =None, f302: 'bool' =None, f303: 'bool' =None, f305: 'bool' =None, f313: 'bool' =None, f314: 'bool' =None, f316: 'bool' =None, f317: 'bool' =None, f321: 'bool' =None, f322: 'bool' =None, f323: 'bool' =None, f324: 'bool' =None, f327: 'bool' =None, f328: 'bool' =None, f329: 'bool' =None, f331: 'bool' =None, f332: 'bool' =None, f333: 'bool' =None, f336: 'bool' =None, f337: 'bool' =None, f338: 'bool' =None, f339: 'bool' =None, f340: 'bool' =None, f341: 'bool' =None, f345: 'bool' =None, f346: 'bool' =None, f347: 'bool' =None, f348: 'bool' =None, f349: 'bool' =None, f352: 'bool' =None, f353: 'bool' =None, f355: 'bool' =None, f356: 'bool' =None, f357: 'bool' =None, f358: 'bool' =None, f359: 'bool' =None, f361: 'bool' =None, f362: 'bool' =None, f363: 'bool' =None, f364: 'bool' =None, f365: 'bool' =None, f366: 'bool' =None, f367: 'bool' =None, f369: 'bool' =None, f370: 'bool' =None, f371: 'bool' =None, f372: 'bool' =None, f373: 'bool' =None, f374: 'bool' =None, f375: 'bool' =None, f376: 'bool' =None, f377: 'bool' =None, f378: 'bool' =None, f379: 'bool' =None, f380: 'bool' =None, f381: 'bool' =None, f382: 'bool' =None, fair_share: 'bool' =None, featured_studios_admin: 'bool' =None, job_artifacts_v2: 'bool' =None, kubernetes_cluster_ui: 'bool' =None, kubernetes_clusters: 'bool' =None, landing_studios: 'bool' =None, marketplace: 'bool' =None, mmt_fault_tolerance: 'bool' =None, mmt_strategy_selector: 'bool' =None, multiple_studio_versions: 'bool' =None, nerf_fs_nonpaying: 'bool' =None, org_level_member_permissions: 'bool' =None, org_usage_limits: 'bool' =None, persistent_disk: 'bool' =None, plugin_distributed: 'bool' =None, plugin_inference: 'bool' =None, plugin_label_studio: 'bool' =None, plugin_langflow: 'bool' =None, plugin_python_profiler: 'bool' =None, plugin_sweeps: 'bool' =None, product_generator: 'bool' =None, product_license: 'bool' =None, publish_pipelines: 'bool' =None, reserved_machines_tab: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, security_docs: 'bool' =None, show_dev_admin: 'bool' =None, slurm: 'bool' =None, specialised_studios: 'bool' =None, studio_config: 'bool' =None, studio_version_visibility: 'bool' =None, vultr: 'bool' =None): # noqa: E501 + def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, b2c_experience: 'bool' =None, byo_machine_type: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, chat_models: 'bool' =None, cloudspace_schedules: 'bool' =None, collab_screen_sharing: 'bool' =None, control_center_monitoring: 'bool' =None, cost_attribution_settings: 'bool' =None, datasets: 'bool' =None, default_one_cluster: 'bool' =None, enterprise_compute_admin: 'bool' =None, f234: 'bool' =None, f240: 'bool' =None, f241: 'bool' =None, f243: 'bool' =None, f245: 'bool' =None, f247: 'bool' =None, f250: 'bool' =None, f252: 'bool' =None, f253: 'bool' =None, f254: 'bool' =None, f259: 'bool' =None, f266: 'bool' =None, f268: 'bool' =None, f270: 'bool' =None, f271: 'bool' =None, f272: 'bool' =None, f279: 'bool' =None, f281: 'bool' =None, f283: 'bool' =None, f287: 'bool' =None, f288: 'bool' =None, f293: 'bool' =None, f294: 'bool' =None, f297: 'bool' =None, f298: 'bool' =None, f299: 'bool' =None, f300: 'bool' =None, f302: 'bool' =None, f303: 'bool' =None, f305: 'bool' =None, f313: 'bool' =None, f314: 'bool' =None, f316: 'bool' =None, f317: 'bool' =None, f321: 'bool' =None, f322: 'bool' =None, f323: 'bool' =None, f324: 'bool' =None, f327: 'bool' =None, f328: 'bool' =None, f329: 'bool' =None, f331: 'bool' =None, f332: 'bool' =None, f333: 'bool' =None, f336: 'bool' =None, f337: 'bool' =None, f338: 'bool' =None, f339: 'bool' =None, f340: 'bool' =None, f341: 'bool' =None, f345: 'bool' =None, f346: 'bool' =None, f347: 'bool' =None, f348: 'bool' =None, f349: 'bool' =None, f353: 'bool' =None, f355: 'bool' =None, f356: 'bool' =None, f358: 'bool' =None, f359: 'bool' =None, f361: 'bool' =None, f362: 'bool' =None, f363: 'bool' =None, f364: 'bool' =None, f365: 'bool' =None, f366: 'bool' =None, f367: 'bool' =None, f369: 'bool' =None, f372: 'bool' =None, f375: 'bool' =None, f376: 'bool' =None, f378: 'bool' =None, f380: 'bool' =None, f381: 'bool' =None, f383: 'bool' =None, f384: 'bool' =None, f385: 'bool' =None, f386: 'bool' =None, f387: 'bool' =None, f388: 'bool' =None, f389: 'bool' =None, f390: 'bool' =None, f391: 'bool' =None, f392: 'bool' =None, f393: 'bool' =None, fair_share: 'bool' =None, featured_studios_admin: 'bool' =None, job_artifacts_v2: 'bool' =None, kubernetes_cluster_ui: 'bool' =None, kubernetes_clusters: 'bool' =None, landing_studios: 'bool' =None, marketplace: 'bool' =None, mmt_fault_tolerance: 'bool' =None, mmt_strategy_selector: 'bool' =None, multiple_studio_versions: 'bool' =None, nerf_fs_nonpaying: 'bool' =None, org_level_member_permissions: 'bool' =None, org_usage_limits: 'bool' =None, persistent_disk: 'bool' =None, plugin_distributed: 'bool' =None, plugin_inference: 'bool' =None, plugin_label_studio: 'bool' =None, plugin_langflow: 'bool' =None, plugin_python_profiler: 'bool' =None, plugin_sweeps: 'bool' =None, product_generator: 'bool' =None, product_license: 'bool' =None, publish_pipelines: 'bool' =None, reserved_machines_tab: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, security_docs: 'bool' =None, show_dev_admin: 'bool' =None, slurm: 'bool' =None, specialised_studios: 'bool' =None, studio_config: 'bool' =None, studio_version_visibility: 'bool' =None): # noqa: E501 """V1UserFeatures - a model defined in Swagger""" # noqa: E501 self._affiliate_links = None self._ai_hub_monetization = None @@ -347,7 +347,6 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N self._f252 = None self._f253 = None self._f254 = None - self._f258 = None self._f259 = None self._f266 = None self._f268 = None @@ -393,11 +392,9 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N self._f347 = None self._f348 = None self._f349 = None - self._f352 = None self._f353 = None self._f355 = None self._f356 = None - self._f357 = None self._f358 = None self._f359 = None self._f361 = None @@ -408,19 +405,23 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N self._f366 = None self._f367 = None self._f369 = None - self._f370 = None - self._f371 = None self._f372 = None - self._f373 = None - self._f374 = None self._f375 = None self._f376 = None - self._f377 = None self._f378 = None - self._f379 = None self._f380 = None self._f381 = None - self._f382 = None + self._f383 = None + self._f384 = None + self._f385 = None + self._f386 = None + self._f387 = None + self._f388 = None + self._f389 = None + self._f390 = None + self._f391 = None + self._f392 = None + self._f393 = None self._fair_share = None self._featured_studios_admin = None self._job_artifacts_v2 = None @@ -453,7 +454,6 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N self._specialised_studios = None self._studio_config = None self._studio_version_visibility = None - self._vultr = None self.discriminator = None if affiliate_links is not None: self.affiliate_links = affiliate_links @@ -509,8 +509,6 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N self.f253 = f253 if f254 is not None: self.f254 = f254 - if f258 is not None: - self.f258 = f258 if f259 is not None: self.f259 = f259 if f266 is not None: @@ -601,16 +599,12 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N self.f348 = f348 if f349 is not None: self.f349 = f349 - if f352 is not None: - self.f352 = f352 if f353 is not None: self.f353 = f353 if f355 is not None: self.f355 = f355 if f356 is not None: self.f356 = f356 - if f357 is not None: - self.f357 = f357 if f358 is not None: self.f358 = f358 if f359 is not None: @@ -631,32 +625,40 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N self.f367 = f367 if f369 is not None: self.f369 = f369 - if f370 is not None: - self.f370 = f370 - if f371 is not None: - self.f371 = f371 if f372 is not None: self.f372 = f372 - if f373 is not None: - self.f373 = f373 - if f374 is not None: - self.f374 = f374 if f375 is not None: self.f375 = f375 if f376 is not None: self.f376 = f376 - if f377 is not None: - self.f377 = f377 if f378 is not None: self.f378 = f378 - if f379 is not None: - self.f379 = f379 if f380 is not None: self.f380 = f380 if f381 is not None: self.f381 = f381 - if f382 is not None: - self.f382 = f382 + if f383 is not None: + self.f383 = f383 + if f384 is not None: + self.f384 = f384 + if f385 is not None: + self.f385 = f385 + if f386 is not None: + self.f386 = f386 + if f387 is not None: + self.f387 = f387 + if f388 is not None: + self.f388 = f388 + if f389 is not None: + self.f389 = f389 + if f390 is not None: + self.f390 = f390 + if f391 is not None: + self.f391 = f391 + if f392 is not None: + self.f392 = f392 + if f393 is not None: + self.f393 = f393 if fair_share is not None: self.fair_share = fair_share if featured_studios_admin is not None: @@ -721,8 +723,6 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N self.studio_config = studio_config if studio_version_visibility is not None: self.studio_version_visibility = studio_version_visibility - if vultr is not None: - self.vultr = vultr @property def affiliate_links(self) -> 'bool': @@ -1291,27 +1291,6 @@ def f254(self, f254: 'bool'): self._f254 = f254 - @property - def f258(self) -> 'bool': - """Gets the f258 of this V1UserFeatures. # noqa: E501 - - - :return: The f258 of this V1UserFeatures. # noqa: E501 - :rtype: bool - """ - return self._f258 - - @f258.setter - def f258(self, f258: 'bool'): - """Sets the f258 of this V1UserFeatures. - - - :param f258: The f258 of this V1UserFeatures. # noqa: E501 - :type: bool - """ - - self._f258 = f258 - @property def f259(self) -> 'bool': """Gets the f259 of this V1UserFeatures. # noqa: E501 @@ -2257,27 +2236,6 @@ def f349(self, f349: 'bool'): self._f349 = f349 - @property - def f352(self) -> 'bool': - """Gets the f352 of this V1UserFeatures. # noqa: E501 - - - :return: The f352 of this V1UserFeatures. # noqa: E501 - :rtype: bool - """ - return self._f352 - - @f352.setter - def f352(self, f352: 'bool'): - """Sets the f352 of this V1UserFeatures. - - - :param f352: The f352 of this V1UserFeatures. # noqa: E501 - :type: bool - """ - - self._f352 = f352 - @property def f353(self) -> 'bool': """Gets the f353 of this V1UserFeatures. # noqa: E501 @@ -2341,27 +2299,6 @@ def f356(self, f356: 'bool'): self._f356 = f356 - @property - def f357(self) -> 'bool': - """Gets the f357 of this V1UserFeatures. # noqa: E501 - - - :return: The f357 of this V1UserFeatures. # noqa: E501 - :rtype: bool - """ - return self._f357 - - @f357.setter - def f357(self, f357: 'bool'): - """Sets the f357 of this V1UserFeatures. - - - :param f357: The f357 of this V1UserFeatures. # noqa: E501 - :type: bool - """ - - self._f357 = f357 - @property def f358(self) -> 'bool': """Gets the f358 of this V1UserFeatures. # noqa: E501 @@ -2573,277 +2510,361 @@ def f369(self, f369: 'bool'): self._f369 = f369 @property - def f370(self) -> 'bool': - """Gets the f370 of this V1UserFeatures. # noqa: E501 + def f372(self) -> 'bool': + """Gets the f372 of this V1UserFeatures. # noqa: E501 - :return: The f370 of this V1UserFeatures. # noqa: E501 + :return: The f372 of this V1UserFeatures. # noqa: E501 :rtype: bool """ - return self._f370 + return self._f372 - @f370.setter - def f370(self, f370: 'bool'): - """Sets the f370 of this V1UserFeatures. + @f372.setter + def f372(self, f372: 'bool'): + """Sets the f372 of this V1UserFeatures. - :param f370: The f370 of this V1UserFeatures. # noqa: E501 + :param f372: The f372 of this V1UserFeatures. # noqa: E501 :type: bool """ - self._f370 = f370 + self._f372 = f372 @property - def f371(self) -> 'bool': - """Gets the f371 of this V1UserFeatures. # noqa: E501 + def f375(self) -> 'bool': + """Gets the f375 of this V1UserFeatures. # noqa: E501 - :return: The f371 of this V1UserFeatures. # noqa: E501 + :return: The f375 of this V1UserFeatures. # noqa: E501 :rtype: bool """ - return self._f371 + return self._f375 - @f371.setter - def f371(self, f371: 'bool'): - """Sets the f371 of this V1UserFeatures. + @f375.setter + def f375(self, f375: 'bool'): + """Sets the f375 of this V1UserFeatures. - :param f371: The f371 of this V1UserFeatures. # noqa: E501 + :param f375: The f375 of this V1UserFeatures. # noqa: E501 :type: bool """ - self._f371 = f371 + self._f375 = f375 @property - def f372(self) -> 'bool': - """Gets the f372 of this V1UserFeatures. # noqa: E501 + def f376(self) -> 'bool': + """Gets the f376 of this V1UserFeatures. # noqa: E501 - :return: The f372 of this V1UserFeatures. # noqa: E501 + :return: The f376 of this V1UserFeatures. # noqa: E501 :rtype: bool """ - return self._f372 + return self._f376 - @f372.setter - def f372(self, f372: 'bool'): - """Sets the f372 of this V1UserFeatures. + @f376.setter + def f376(self, f376: 'bool'): + """Sets the f376 of this V1UserFeatures. - :param f372: The f372 of this V1UserFeatures. # noqa: E501 + :param f376: The f376 of this V1UserFeatures. # noqa: E501 :type: bool """ - self._f372 = f372 + self._f376 = f376 @property - def f373(self) -> 'bool': - """Gets the f373 of this V1UserFeatures. # noqa: E501 + def f378(self) -> 'bool': + """Gets the f378 of this V1UserFeatures. # noqa: E501 - :return: The f373 of this V1UserFeatures. # noqa: E501 + :return: The f378 of this V1UserFeatures. # noqa: E501 :rtype: bool """ - return self._f373 + return self._f378 - @f373.setter - def f373(self, f373: 'bool'): - """Sets the f373 of this V1UserFeatures. + @f378.setter + def f378(self, f378: 'bool'): + """Sets the f378 of this V1UserFeatures. - :param f373: The f373 of this V1UserFeatures. # noqa: E501 + :param f378: The f378 of this V1UserFeatures. # noqa: E501 :type: bool """ - self._f373 = f373 + self._f378 = f378 @property - def f374(self) -> 'bool': - """Gets the f374 of this V1UserFeatures. # noqa: E501 + def f380(self) -> 'bool': + """Gets the f380 of this V1UserFeatures. # noqa: E501 - :return: The f374 of this V1UserFeatures. # noqa: E501 + :return: The f380 of this V1UserFeatures. # noqa: E501 :rtype: bool """ - return self._f374 + return self._f380 - @f374.setter - def f374(self, f374: 'bool'): - """Sets the f374 of this V1UserFeatures. + @f380.setter + def f380(self, f380: 'bool'): + """Sets the f380 of this V1UserFeatures. - :param f374: The f374 of this V1UserFeatures. # noqa: E501 + :param f380: The f380 of this V1UserFeatures. # noqa: E501 :type: bool """ - self._f374 = f374 + self._f380 = f380 @property - def f375(self) -> 'bool': - """Gets the f375 of this V1UserFeatures. # noqa: E501 + def f381(self) -> 'bool': + """Gets the f381 of this V1UserFeatures. # noqa: E501 - :return: The f375 of this V1UserFeatures. # noqa: E501 + :return: The f381 of this V1UserFeatures. # noqa: E501 :rtype: bool """ - return self._f375 + return self._f381 - @f375.setter - def f375(self, f375: 'bool'): - """Sets the f375 of this V1UserFeatures. + @f381.setter + def f381(self, f381: 'bool'): + """Sets the f381 of this V1UserFeatures. - :param f375: The f375 of this V1UserFeatures. # noqa: E501 + :param f381: The f381 of this V1UserFeatures. # noqa: E501 :type: bool """ - self._f375 = f375 + self._f381 = f381 @property - def f376(self) -> 'bool': - """Gets the f376 of this V1UserFeatures. # noqa: E501 + def f383(self) -> 'bool': + """Gets the f383 of this V1UserFeatures. # noqa: E501 - :return: The f376 of this V1UserFeatures. # noqa: E501 + :return: The f383 of this V1UserFeatures. # noqa: E501 :rtype: bool """ - return self._f376 + return self._f383 - @f376.setter - def f376(self, f376: 'bool'): - """Sets the f376 of this V1UserFeatures. + @f383.setter + def f383(self, f383: 'bool'): + """Sets the f383 of this V1UserFeatures. - :param f376: The f376 of this V1UserFeatures. # noqa: E501 + :param f383: The f383 of this V1UserFeatures. # noqa: E501 :type: bool """ - self._f376 = f376 + self._f383 = f383 @property - def f377(self) -> 'bool': - """Gets the f377 of this V1UserFeatures. # noqa: E501 + def f384(self) -> 'bool': + """Gets the f384 of this V1UserFeatures. # noqa: E501 - :return: The f377 of this V1UserFeatures. # noqa: E501 + :return: The f384 of this V1UserFeatures. # noqa: E501 :rtype: bool """ - return self._f377 + return self._f384 - @f377.setter - def f377(self, f377: 'bool'): - """Sets the f377 of this V1UserFeatures. + @f384.setter + def f384(self, f384: 'bool'): + """Sets the f384 of this V1UserFeatures. - :param f377: The f377 of this V1UserFeatures. # noqa: E501 + :param f384: The f384 of this V1UserFeatures. # noqa: E501 :type: bool """ - self._f377 = f377 + self._f384 = f384 @property - def f378(self) -> 'bool': - """Gets the f378 of this V1UserFeatures. # noqa: E501 + def f385(self) -> 'bool': + """Gets the f385 of this V1UserFeatures. # noqa: E501 - :return: The f378 of this V1UserFeatures. # noqa: E501 + :return: The f385 of this V1UserFeatures. # noqa: E501 :rtype: bool """ - return self._f378 + return self._f385 - @f378.setter - def f378(self, f378: 'bool'): - """Sets the f378 of this V1UserFeatures. + @f385.setter + def f385(self, f385: 'bool'): + """Sets the f385 of this V1UserFeatures. - :param f378: The f378 of this V1UserFeatures. # noqa: E501 + :param f385: The f385 of this V1UserFeatures. # noqa: E501 :type: bool """ - self._f378 = f378 + self._f385 = f385 @property - def f379(self) -> 'bool': - """Gets the f379 of this V1UserFeatures. # noqa: E501 + def f386(self) -> 'bool': + """Gets the f386 of this V1UserFeatures. # noqa: E501 - :return: The f379 of this V1UserFeatures. # noqa: E501 + :return: The f386 of this V1UserFeatures. # noqa: E501 :rtype: bool """ - return self._f379 + return self._f386 - @f379.setter - def f379(self, f379: 'bool'): - """Sets the f379 of this V1UserFeatures. + @f386.setter + def f386(self, f386: 'bool'): + """Sets the f386 of this V1UserFeatures. - :param f379: The f379 of this V1UserFeatures. # noqa: E501 + :param f386: The f386 of this V1UserFeatures. # noqa: E501 :type: bool """ - self._f379 = f379 + self._f386 = f386 @property - def f380(self) -> 'bool': - """Gets the f380 of this V1UserFeatures. # noqa: E501 + def f387(self) -> 'bool': + """Gets the f387 of this V1UserFeatures. # noqa: E501 - :return: The f380 of this V1UserFeatures. # noqa: E501 + :return: The f387 of this V1UserFeatures. # noqa: E501 :rtype: bool """ - return self._f380 + return self._f387 - @f380.setter - def f380(self, f380: 'bool'): - """Sets the f380 of this V1UserFeatures. + @f387.setter + def f387(self, f387: 'bool'): + """Sets the f387 of this V1UserFeatures. - :param f380: The f380 of this V1UserFeatures. # noqa: E501 + :param f387: The f387 of this V1UserFeatures. # noqa: E501 :type: bool """ - self._f380 = f380 + self._f387 = f387 @property - def f381(self) -> 'bool': - """Gets the f381 of this V1UserFeatures. # noqa: E501 + def f388(self) -> 'bool': + """Gets the f388 of this V1UserFeatures. # noqa: E501 - :return: The f381 of this V1UserFeatures. # noqa: E501 + :return: The f388 of this V1UserFeatures. # noqa: E501 :rtype: bool """ - return self._f381 + return self._f388 - @f381.setter - def f381(self, f381: 'bool'): - """Sets the f381 of this V1UserFeatures. + @f388.setter + def f388(self, f388: 'bool'): + """Sets the f388 of this V1UserFeatures. - :param f381: The f381 of this V1UserFeatures. # noqa: E501 + :param f388: The f388 of this V1UserFeatures. # noqa: E501 :type: bool """ - self._f381 = f381 + self._f388 = f388 + + @property + def f389(self) -> 'bool': + """Gets the f389 of this V1UserFeatures. # noqa: E501 + + + :return: The f389 of this V1UserFeatures. # noqa: E501 + :rtype: bool + """ + return self._f389 + + @f389.setter + def f389(self, f389: 'bool'): + """Sets the f389 of this V1UserFeatures. + + + :param f389: The f389 of this V1UserFeatures. # noqa: E501 + :type: bool + """ + + self._f389 = f389 + + @property + def f390(self) -> 'bool': + """Gets the f390 of this V1UserFeatures. # noqa: E501 + + + :return: The f390 of this V1UserFeatures. # noqa: E501 + :rtype: bool + """ + return self._f390 + + @f390.setter + def f390(self, f390: 'bool'): + """Sets the f390 of this V1UserFeatures. + + + :param f390: The f390 of this V1UserFeatures. # noqa: E501 + :type: bool + """ + + self._f390 = f390 @property - def f382(self) -> 'bool': - """Gets the f382 of this V1UserFeatures. # noqa: E501 + def f391(self) -> 'bool': + """Gets the f391 of this V1UserFeatures. # noqa: E501 - :return: The f382 of this V1UserFeatures. # noqa: E501 + :return: The f391 of this V1UserFeatures. # noqa: E501 :rtype: bool """ - return self._f382 + return self._f391 - @f382.setter - def f382(self, f382: 'bool'): - """Sets the f382 of this V1UserFeatures. + @f391.setter + def f391(self, f391: 'bool'): + """Sets the f391 of this V1UserFeatures. - :param f382: The f382 of this V1UserFeatures. # noqa: E501 + :param f391: The f391 of this V1UserFeatures. # noqa: E501 :type: bool """ - self._f382 = f382 + self._f391 = f391 + + @property + def f392(self) -> 'bool': + """Gets the f392 of this V1UserFeatures. # noqa: E501 + + + :return: The f392 of this V1UserFeatures. # noqa: E501 + :rtype: bool + """ + return self._f392 + + @f392.setter + def f392(self, f392: 'bool'): + """Sets the f392 of this V1UserFeatures. + + + :param f392: The f392 of this V1UserFeatures. # noqa: E501 + :type: bool + """ + + self._f392 = f392 + + @property + def f393(self) -> 'bool': + """Gets the f393 of this V1UserFeatures. # noqa: E501 + + + :return: The f393 of this V1UserFeatures. # noqa: E501 + :rtype: bool + """ + return self._f393 + + @f393.setter + def f393(self, f393: 'bool'): + """Sets the f393 of this V1UserFeatures. + + + :param f393: The f393 of this V1UserFeatures. # noqa: E501 + :type: bool + """ + + self._f393 = f393 @property def fair_share(self) -> 'bool': @@ -3517,27 +3538,6 @@ def studio_version_visibility(self, studio_version_visibility: 'bool'): self._studio_version_visibility = studio_version_visibility - @property - def vultr(self) -> 'bool': - """Gets the vultr of this V1UserFeatures. # noqa: E501 - - - :return: The vultr of this V1UserFeatures. # noqa: E501 - :rtype: bool - """ - return self._vultr - - @vultr.setter - def vultr(self, vultr: 'bool'): - """Sets the vultr of this V1UserFeatures. - - - :param vultr: The vultr of this V1UserFeatures. # noqa: E501 - :type: bool - """ - - self._vultr = vultr - def to_dict(self) -> dict: """Returns the model properties as a dict""" result = {} diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_vm_health.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_vm_health.py index ef34e3a3b..0945cbe5f 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_vm_health.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_vm_health.py @@ -65,6 +65,7 @@ class V1VMHealth(object): 'nvidia_smi_error': 'str', 'nvlinks': 'list[V1NVLinkStatus]', 'running_compute': 'list[V1ComputeApp]', + 'sentinelone': 'V1SentinelOneHealth', 'ssh_error': 'str', 'ssh_reachable': 'bool', 'status_details': 'str', @@ -95,6 +96,7 @@ class V1VMHealth(object): 'nvidia_smi_error': 'nvidiaSmiError', 'nvlinks': 'nvlinks', 'running_compute': 'runningCompute', + 'sentinelone': 'sentinelone', 'ssh_error': 'sshError', 'ssh_reachable': 'sshReachable', 'status_details': 'statusDetails', @@ -104,7 +106,7 @@ class V1VMHealth(object): 'xids': 'xids' } - def __init__(self, alive: 'bool' =None, ch_log_failures: 'list[str]' =None, ch_log_last_failure: 'str' =None, ch_log_path: 'str' =None, ch_log_scan_error: 'str' =None, ch_log_size_bytes: 'str' =None, checked_at: 'datetime' =None, filesystems: 'list[V1VMFilesystemUsage]' =None, gpu_status: 'list[V1GPUStatus]' =None, gpus: 'list[str]' =None, guest_channel_error: 'str' =None, guest_channel_reachable: 'bool' =None, guest_transport: 'str' =None, ib_pkeys_info: 'list[V1VMIBPKeyInfo]' =None, ip: 'str' =None, memory: 'V1VMMemoryUsage' =None, name: 'str' =None, nvidia_smi_error: 'str' =None, nvlinks: 'list[V1NVLinkStatus]' =None, running_compute: 'list[V1ComputeApp]' =None, ssh_error: 'str' =None, ssh_reachable: 'bool' =None, status_details: 'str' =None, user_ssh_error: 'str' =None, user_ssh_reachable: 'bool' =None, vm_id: 'str' =None, xids: 'list[V1XidEvent]' =None): # noqa: E501 + def __init__(self, alive: 'bool' =None, ch_log_failures: 'list[str]' =None, ch_log_last_failure: 'str' =None, ch_log_path: 'str' =None, ch_log_scan_error: 'str' =None, ch_log_size_bytes: 'str' =None, checked_at: 'datetime' =None, filesystems: 'list[V1VMFilesystemUsage]' =None, gpu_status: 'list[V1GPUStatus]' =None, gpus: 'list[str]' =None, guest_channel_error: 'str' =None, guest_channel_reachable: 'bool' =None, guest_transport: 'str' =None, ib_pkeys_info: 'list[V1VMIBPKeyInfo]' =None, ip: 'str' =None, memory: 'V1VMMemoryUsage' =None, name: 'str' =None, nvidia_smi_error: 'str' =None, nvlinks: 'list[V1NVLinkStatus]' =None, running_compute: 'list[V1ComputeApp]' =None, sentinelone: 'V1SentinelOneHealth' =None, ssh_error: 'str' =None, ssh_reachable: 'bool' =None, status_details: 'str' =None, user_ssh_error: 'str' =None, user_ssh_reachable: 'bool' =None, vm_id: 'str' =None, xids: 'list[V1XidEvent]' =None): # noqa: E501 """V1VMHealth - a model defined in Swagger""" # noqa: E501 self._alive = None self._ch_log_failures = None @@ -126,6 +128,7 @@ def __init__(self, alive: 'bool' =None, ch_log_failures: 'list[str]' =None, ch_l self._nvidia_smi_error = None self._nvlinks = None self._running_compute = None + self._sentinelone = None self._ssh_error = None self._ssh_reachable = None self._status_details = None @@ -174,6 +177,8 @@ def __init__(self, alive: 'bool' =None, ch_log_failures: 'list[str]' =None, ch_l self.nvlinks = nvlinks if running_compute is not None: self.running_compute = running_compute + if sentinelone is not None: + self.sentinelone = sentinelone if ssh_error is not None: self.ssh_error = ssh_error if ssh_reachable is not None: @@ -621,6 +626,27 @@ def running_compute(self, running_compute: 'list[V1ComputeApp]'): self._running_compute = running_compute + @property + def sentinelone(self) -> 'V1SentinelOneHealth': + """Gets the sentinelone of this V1VMHealth. # noqa: E501 + + + :return: The sentinelone of this V1VMHealth. # noqa: E501 + :rtype: V1SentinelOneHealth + """ + return self._sentinelone + + @sentinelone.setter + def sentinelone(self, sentinelone: 'V1SentinelOneHealth'): + """Sets the sentinelone of this V1VMHealth. + + + :param sentinelone: The sentinelone of this V1VMHealth. # noqa: E501 + :type: V1SentinelOneHealth + """ + + self._sentinelone = sentinelone + @property def ssh_error(self) -> 'str': """Gets the ssh_error of this V1VMHealth. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_vmibp_key_info.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_vmibp_key_info.py index c97e73645..73d41f339 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_vmibp_key_info.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_vmibp_key_info.py @@ -314,7 +314,7 @@ def physical_state(self, physical_state: 'str'): def pkey(self) -> 'str': """Gets the pkey of this V1VMIBPKeyInfo. # noqa: E501 - Expected single non-default pool P_Key, e.g. 0x881a. # noqa: E501 + Canonical low-15-bit identity of the expected single non-default pool P_Key (membership bit removed), e.g. 0x081a. # noqa: E501 :return: The pkey of this V1VMIBPKeyInfo. # noqa: E501 :rtype: str @@ -325,7 +325,7 @@ def pkey(self) -> 'str': def pkey(self, pkey: 'str'): """Sets the pkey of this V1VMIBPKeyInfo. - Expected single non-default pool P_Key, e.g. 0x881a. # noqa: E501 + Canonical low-15-bit identity of the expected single non-default pool P_Key (membership bit removed), e.g. 0x081a. # noqa: E501 :param pkey: The pkey of this V1VMIBPKeyInfo. # noqa: E501 :type: str diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_voltage_park_direct_v1.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_voltage_park_direct_v1.py deleted file mode 100644 index a23925994..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_voltage_park_direct_v1.py +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 -# This file is vendored. -# Do not edit it directly; changes will be overwritten. -# Make changes in the internal upstream repository instead. - - -""" - external/v1/auth_service.proto - - No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 - - OpenAPI spec version: version not set - - Generated by: https://github.com/swagger-api/swagger-codegen.git - - NOTE - ---- - standard swagger-codegen-cli for this python client has been modified - by custom templates. The purpose of these templates is to include - typing information in the API and Model code. Please refer to the - main grid repository for more info -""" - -import pprint -import re # noqa: F401 - -from typing import TYPE_CHECKING - -import six - -if TYPE_CHECKING: - from datetime import datetime - from lightning_sdk.lightning_cloud.openapi.models import * - -class V1VoltageParkDirectV1(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'credentials_secret_id': 'str', - 'primary_region': 'str', - 'regions': 'list[str]', - 'reserved_instance_ids': 'list[str]', - 'subnet_cidr_ranges': 'list[str]' - } - - attribute_map = { - 'credentials_secret_id': 'credentialsSecretId', - 'primary_region': 'primaryRegion', - 'regions': 'regions', - 'reserved_instance_ids': 'reservedInstanceIds', - 'subnet_cidr_ranges': 'subnetCidrRanges' - } - - def __init__(self, credentials_secret_id: 'str' =None, primary_region: 'str' =None, regions: 'list[str]' =None, reserved_instance_ids: 'list[str]' =None, subnet_cidr_ranges: 'list[str]' =None): # noqa: E501 - """V1VoltageParkDirectV1 - a model defined in Swagger""" # noqa: E501 - self._credentials_secret_id = None - self._primary_region = None - self._regions = None - self._reserved_instance_ids = None - self._subnet_cidr_ranges = None - self.discriminator = None - if credentials_secret_id is not None: - self.credentials_secret_id = credentials_secret_id - if primary_region is not None: - self.primary_region = primary_region - if regions is not None: - self.regions = regions - if reserved_instance_ids is not None: - self.reserved_instance_ids = reserved_instance_ids - if subnet_cidr_ranges is not None: - self.subnet_cidr_ranges = subnet_cidr_ranges - - @property - def credentials_secret_id(self) -> 'str': - """Gets the credentials_secret_id of this V1VoltageParkDirectV1. # noqa: E501 - - ID of the secret that contains the Vultr API key. # noqa: E501 - - :return: The credentials_secret_id of this V1VoltageParkDirectV1. # noqa: E501 - :rtype: str - """ - return self._credentials_secret_id - - @credentials_secret_id.setter - def credentials_secret_id(self, credentials_secret_id: 'str'): - """Sets the credentials_secret_id of this V1VoltageParkDirectV1. - - ID of the secret that contains the Vultr API key. # noqa: E501 - - :param credentials_secret_id: The credentials_secret_id of this V1VoltageParkDirectV1. # noqa: E501 - :type: str - """ - - self._credentials_secret_id = credentials_secret_id - - @property - def primary_region(self) -> 'str': - """Gets the primary_region of this V1VoltageParkDirectV1. # noqa: E501 - - - :return: The primary_region of this V1VoltageParkDirectV1. # noqa: E501 - :rtype: str - """ - return self._primary_region - - @primary_region.setter - def primary_region(self, primary_region: 'str'): - """Sets the primary_region of this V1VoltageParkDirectV1. - - - :param primary_region: The primary_region of this V1VoltageParkDirectV1. # noqa: E501 - :type: str - """ - - self._primary_region = primary_region - - @property - def regions(self) -> 'list[str]': - """Gets the regions of this V1VoltageParkDirectV1. # noqa: E501 - - - :return: The regions of this V1VoltageParkDirectV1. # noqa: E501 - :rtype: list[str] - """ - return self._regions - - @regions.setter - def regions(self, regions: 'list[str]'): - """Sets the regions of this V1VoltageParkDirectV1. - - - :param regions: The regions of this V1VoltageParkDirectV1. # noqa: E501 - :type: list[str] - """ - - self._regions = regions - - @property - def reserved_instance_ids(self) -> 'list[str]': - """Gets the reserved_instance_ids of this V1VoltageParkDirectV1. # noqa: E501 - - - :return: The reserved_instance_ids of this V1VoltageParkDirectV1. # noqa: E501 - :rtype: list[str] - """ - return self._reserved_instance_ids - - @reserved_instance_ids.setter - def reserved_instance_ids(self, reserved_instance_ids: 'list[str]'): - """Sets the reserved_instance_ids of this V1VoltageParkDirectV1. - - - :param reserved_instance_ids: The reserved_instance_ids of this V1VoltageParkDirectV1. # noqa: E501 - :type: list[str] - """ - - self._reserved_instance_ids = reserved_instance_ids - - @property - def subnet_cidr_ranges(self) -> 'list[str]': - """Gets the subnet_cidr_ranges of this V1VoltageParkDirectV1. # noqa: E501 - - - :return: The subnet_cidr_ranges of this V1VoltageParkDirectV1. # noqa: E501 - :rtype: list[str] - """ - return self._subnet_cidr_ranges - - @subnet_cidr_ranges.setter - def subnet_cidr_ranges(self, subnet_cidr_ranges: 'list[str]'): - """Sets the subnet_cidr_ranges of this V1VoltageParkDirectV1. - - - :param subnet_cidr_ranges: The subnet_cidr_ranges of this V1VoltageParkDirectV1. # noqa: E501 - :type: list[str] - """ - - self._subnet_cidr_ranges = subnet_cidr_ranges - - def to_dict(self) -> dict: - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(V1VoltageParkDirectV1, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self) -> str: - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other: 'V1VoltageParkDirectV1') -> bool: - """Returns true if both objects are equal""" - if not isinstance(other, V1VoltageParkDirectV1): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'V1VoltageParkDirectV1') -> bool: - """Returns true if both objects are not equal""" - return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_workload_subfilter_values.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_workload_subfilter_values.py new file mode 100644 index 000000000..bff99102e --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_workload_subfilter_values.py @@ -0,0 +1,153 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1WorkloadSubfilterValues(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'resource_type': 'str', + 'tags': 'list[V1NamedFilterValue]' + } + + attribute_map = { + 'resource_type': 'resourceType', + 'tags': 'tags' + } + + def __init__(self, resource_type: 'str' =None, tags: 'list[V1NamedFilterValue]' =None): # noqa: E501 + """V1WorkloadSubfilterValues - a model defined in Swagger""" # noqa: E501 + self._resource_type = None + self._tags = None + self.discriminator = None + if resource_type is not None: + self.resource_type = resource_type + if tags is not None: + self.tags = tags + + @property + def resource_type(self) -> 'str': + """Gets the resource_type of this V1WorkloadSubfilterValues. # noqa: E501 + + + :return: The resource_type of this V1WorkloadSubfilterValues. # noqa: E501 + :rtype: str + """ + return self._resource_type + + @resource_type.setter + def resource_type(self, resource_type: 'str'): + """Sets the resource_type of this V1WorkloadSubfilterValues. + + + :param resource_type: The resource_type of this V1WorkloadSubfilterValues. # noqa: E501 + :type: str + """ + + self._resource_type = resource_type + + @property + def tags(self) -> 'list[V1NamedFilterValue]': + """Gets the tags of this V1WorkloadSubfilterValues. # noqa: E501 + + + :return: The tags of this V1WorkloadSubfilterValues. # noqa: E501 + :rtype: list[V1NamedFilterValue] + """ + return self._tags + + @tags.setter + def tags(self, tags: 'list[V1NamedFilterValue]'): + """Sets the tags of this V1WorkloadSubfilterValues. + + + :param tags: The tags of this V1WorkloadSubfilterValues. # noqa: E501 + :type: list[V1NamedFilterValue] + """ + + self._tags = tags + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1WorkloadSubfilterValues, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1WorkloadSubfilterValues') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1WorkloadSubfilterValues): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1WorkloadSubfilterValues') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_workload_tag_subfilter.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_workload_tag_subfilter.py new file mode 100644 index 000000000..bd31e919c --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_workload_tag_subfilter.py @@ -0,0 +1,153 @@ +# coding: utf-8 +# This file is vendored. +# Do not edit it directly; changes will be overwritten. +# Make changes in the internal upstream repository instead. + + +""" + external/v1/auth_service.proto + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: version not set + + Generated by: https://github.com/swagger-api/swagger-codegen.git + + NOTE + ---- + standard swagger-codegen-cli for this python client has been modified + by custom templates. The purpose of these templates is to include + typing information in the API and Model code. Please refer to the + main grid repository for more info +""" + +import pprint +import re # noqa: F401 + +from typing import TYPE_CHECKING + +import six + +if TYPE_CHECKING: + from datetime import datetime + from lightning_sdk.lightning_cloud.openapi.models import * + +class V1WorkloadTagSubfilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'match_all_tags': 'bool', + 'tag_ids': 'list[str]' + } + + attribute_map = { + 'match_all_tags': 'matchAllTags', + 'tag_ids': 'tagIds' + } + + def __init__(self, match_all_tags: 'bool' =None, tag_ids: 'list[str]' =None): # noqa: E501 + """V1WorkloadTagSubfilter - a model defined in Swagger""" # noqa: E501 + self._match_all_tags = None + self._tag_ids = None + self.discriminator = None + if match_all_tags is not None: + self.match_all_tags = match_all_tags + if tag_ids is not None: + self.tag_ids = tag_ids + + @property + def match_all_tags(self) -> 'bool': + """Gets the match_all_tags of this V1WorkloadTagSubfilter. # noqa: E501 + + + :return: The match_all_tags of this V1WorkloadTagSubfilter. # noqa: E501 + :rtype: bool + """ + return self._match_all_tags + + @match_all_tags.setter + def match_all_tags(self, match_all_tags: 'bool'): + """Sets the match_all_tags of this V1WorkloadTagSubfilter. + + + :param match_all_tags: The match_all_tags of this V1WorkloadTagSubfilter. # noqa: E501 + :type: bool + """ + + self._match_all_tags = match_all_tags + + @property + def tag_ids(self) -> 'list[str]': + """Gets the tag_ids of this V1WorkloadTagSubfilter. # noqa: E501 + + + :return: The tag_ids of this V1WorkloadTagSubfilter. # noqa: E501 + :rtype: list[str] + """ + return self._tag_ids + + @tag_ids.setter + def tag_ids(self, tag_ids: 'list[str]'): + """Sets the tag_ids of this V1WorkloadTagSubfilter. + + + :param tag_ids: The tag_ids of this V1WorkloadTagSubfilter. # noqa: E501 + :type: list[str] + """ + + self._tag_ids = tag_ids + + def to_dict(self) -> dict: + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1WorkloadTagSubfilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self) -> str: + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other: 'V1WorkloadTagSubfilter') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1WorkloadTagSubfilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1WorkloadTagSubfilter') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/rest_client.py b/python/lightning_sdk/lightning_cloud/rest_client.py index d97d85e73..3193821c1 100644 --- a/python/lightning_sdk/lightning_cloud/rest_client.py +++ b/python/lightning_sdk/lightning_cloud/rest_client.py @@ -29,7 +29,6 @@ GpuTelemetryServiceApi, JobsServiceApi, LightningappInstanceServiceApi, - LightningappV2ServiceApi, LightningworkServiceApi, LitLoggerServiceApi, LitRegistryServiceApi, @@ -89,7 +88,6 @@ def create_swagger_client(check_context: bool = True, with_auth: bool = True): class GridRestClient( LightningappInstanceServiceApi, - LightningappV2ServiceApi, AuthServiceApi, CloudSpaceServiceApi, ClusterServiceApi,