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 1c7287e3a..2ef166da6 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 @@ -166,6 +166,8 @@ type ClientService interface { ClusterServicePurchaseOrgCapacityBlock(params *ClusterServicePurchaseOrgCapacityBlockParams, opts ...ClientOption) (*ClusterServicePurchaseOrgCapacityBlockOK, error) + ClusterServiceRenewDockerstoreCredentials(params *ClusterServiceRenewDockerstoreCredentialsParams, opts ...ClientOption) (*ClusterServiceRenewDockerstoreCredentialsOK, error) + ClusterServiceRenewSandboxSnapshotCredentials(params *ClusterServiceRenewSandboxSnapshotCredentialsParams, opts ...ClientOption) (*ClusterServiceRenewSandboxSnapshotCredentialsOK, error) ClusterServiceReportMachineSystemMetrics(params *ClusterServiceReportMachineSystemMetricsParams, opts ...ClientOption) (*ClusterServiceReportMachineSystemMetricsOK, error) @@ -2473,6 +2475,48 @@ func (a *Client) ClusterServicePurchaseOrgCapacityBlock(params *ClusterServicePu return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ClusterServiceRenewDockerstoreCredentials cluster service renew dockerstore credentials API +*/ +func (a *Client) ClusterServiceRenewDockerstoreCredentials(params *ClusterServiceRenewDockerstoreCredentialsParams, opts ...ClientOption) (*ClusterServiceRenewDockerstoreCredentialsOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewClusterServiceRenewDockerstoreCredentialsParams() + } + op := &runtime.ClientOperation{ + ID: "ClusterService_RenewDockerstoreCredentials", + Method: "POST", + PathPattern: "/v1/core/servers/{serverId}/dockerstore-credentials", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterServiceRenewDockerstoreCredentialsReader{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.(*ClusterServiceRenewDockerstoreCredentialsOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*ClusterServiceRenewDockerstoreCredentialsDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ClusterServiceRenewSandboxSnapshotCredentials res mints scoped short lived object store read credentials for a snapshot so a baremetal agent doing a lazy f u s e lower restore can keep fetching cold blobs after the credentials issued at restore time expire the agent re calls this before expiry auth mirrors mint sandbox logs token a valid machine bearer token and the machine must belong to the named cluster */ diff --git a/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_renew_dockerstore_credentials_parameters.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_renew_dockerstore_credentials_parameters.go new file mode 100644 index 000000000..df05a5464 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_renew_dockerstore_credentials_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 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" +) + +// NewClusterServiceRenewDockerstoreCredentialsParams creates a new ClusterServiceRenewDockerstoreCredentialsParams 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 NewClusterServiceRenewDockerstoreCredentialsParams() *ClusterServiceRenewDockerstoreCredentialsParams { + return &ClusterServiceRenewDockerstoreCredentialsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterServiceRenewDockerstoreCredentialsParamsWithTimeout creates a new ClusterServiceRenewDockerstoreCredentialsParams object +// with the ability to set a timeout on a request. +func NewClusterServiceRenewDockerstoreCredentialsParamsWithTimeout(timeout time.Duration) *ClusterServiceRenewDockerstoreCredentialsParams { + return &ClusterServiceRenewDockerstoreCredentialsParams{ + timeout: timeout, + } +} + +// NewClusterServiceRenewDockerstoreCredentialsParamsWithContext creates a new ClusterServiceRenewDockerstoreCredentialsParams object +// with the ability to set a context for a request. +func NewClusterServiceRenewDockerstoreCredentialsParamsWithContext(ctx context.Context) *ClusterServiceRenewDockerstoreCredentialsParams { + return &ClusterServiceRenewDockerstoreCredentialsParams{ + Context: ctx, + } +} + +// NewClusterServiceRenewDockerstoreCredentialsParamsWithHTTPClient creates a new ClusterServiceRenewDockerstoreCredentialsParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterServiceRenewDockerstoreCredentialsParamsWithHTTPClient(client *http.Client) *ClusterServiceRenewDockerstoreCredentialsParams { + return &ClusterServiceRenewDockerstoreCredentialsParams{ + HTTPClient: client, + } +} + +/* +ClusterServiceRenewDockerstoreCredentialsParams contains all the parameters to send to the API endpoint + + for the cluster service renew dockerstore credentials operation. + + Typically these are written to a http.Request. +*/ +type ClusterServiceRenewDockerstoreCredentialsParams struct { + + // Body. + Body *models.ClusterServiceRenewDockerstoreCredentialsBody + + // ServerID. + ServerID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster service renew dockerstore credentials params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceRenewDockerstoreCredentialsParams) WithDefaults() *ClusterServiceRenewDockerstoreCredentialsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster service renew dockerstore credentials params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterServiceRenewDockerstoreCredentialsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cluster service renew dockerstore credentials params +func (o *ClusterServiceRenewDockerstoreCredentialsParams) WithTimeout(timeout time.Duration) *ClusterServiceRenewDockerstoreCredentialsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster service renew dockerstore credentials params +func (o *ClusterServiceRenewDockerstoreCredentialsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster service renew dockerstore credentials params +func (o *ClusterServiceRenewDockerstoreCredentialsParams) WithContext(ctx context.Context) *ClusterServiceRenewDockerstoreCredentialsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster service renew dockerstore credentials params +func (o *ClusterServiceRenewDockerstoreCredentialsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster service renew dockerstore credentials params +func (o *ClusterServiceRenewDockerstoreCredentialsParams) WithHTTPClient(client *http.Client) *ClusterServiceRenewDockerstoreCredentialsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster service renew dockerstore credentials params +func (o *ClusterServiceRenewDockerstoreCredentialsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the cluster service renew dockerstore credentials params +func (o *ClusterServiceRenewDockerstoreCredentialsParams) WithBody(body *models.ClusterServiceRenewDockerstoreCredentialsBody) *ClusterServiceRenewDockerstoreCredentialsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the cluster service renew dockerstore credentials params +func (o *ClusterServiceRenewDockerstoreCredentialsParams) SetBody(body *models.ClusterServiceRenewDockerstoreCredentialsBody) { + o.Body = body +} + +// WithServerID adds the serverID to the cluster service renew dockerstore credentials params +func (o *ClusterServiceRenewDockerstoreCredentialsParams) WithServerID(serverID string) *ClusterServiceRenewDockerstoreCredentialsParams { + o.SetServerID(serverID) + return o +} + +// SetServerID adds the serverId to the cluster service renew dockerstore credentials params +func (o *ClusterServiceRenewDockerstoreCredentialsParams) SetServerID(serverID string) { + o.ServerID = serverID +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterServiceRenewDockerstoreCredentialsParams) 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 serverId + if err := r.SetPathParam("serverId", o.ServerID); 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_renew_dockerstore_credentials_responses.go b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_renew_dockerstore_credentials_responses.go new file mode 100644 index 000000000..51365ad91 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/cluster_service/cluster_service_renew_dockerstore_credentials_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" +) + +// ClusterServiceRenewDockerstoreCredentialsReader is a Reader for the ClusterServiceRenewDockerstoreCredentials structure. +type ClusterServiceRenewDockerstoreCredentialsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterServiceRenewDockerstoreCredentialsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewClusterServiceRenewDockerstoreCredentialsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewClusterServiceRenewDockerstoreCredentialsDefault(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 + } +} + +// NewClusterServiceRenewDockerstoreCredentialsOK creates a ClusterServiceRenewDockerstoreCredentialsOK with default headers values +func NewClusterServiceRenewDockerstoreCredentialsOK() *ClusterServiceRenewDockerstoreCredentialsOK { + return &ClusterServiceRenewDockerstoreCredentialsOK{} +} + +/* +ClusterServiceRenewDockerstoreCredentialsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterServiceRenewDockerstoreCredentialsOK struct { + Payload *models.V1RenewSandboxSnapshotCredentialsResponse +} + +// IsSuccess returns true when this cluster service renew dockerstore credentials o k response has a 2xx status code +func (o *ClusterServiceRenewDockerstoreCredentialsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cluster service renew dockerstore credentials o k response has a 3xx status code +func (o *ClusterServiceRenewDockerstoreCredentialsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cluster service renew dockerstore credentials o k response has a 4xx status code +func (o *ClusterServiceRenewDockerstoreCredentialsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cluster service renew dockerstore credentials o k response has a 5xx status code +func (o *ClusterServiceRenewDockerstoreCredentialsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cluster service renew dockerstore credentials o k response a status code equal to that given +func (o *ClusterServiceRenewDockerstoreCredentialsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cluster service renew dockerstore credentials o k response +func (o *ClusterServiceRenewDockerstoreCredentialsOK) Code() int { + return 200 +} + +func (o *ClusterServiceRenewDockerstoreCredentialsOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/core/servers/{serverId}/dockerstore-credentials][%d] clusterServiceRenewDockerstoreCredentialsOK %s", 200, payload) +} + +func (o *ClusterServiceRenewDockerstoreCredentialsOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/core/servers/{serverId}/dockerstore-credentials][%d] clusterServiceRenewDockerstoreCredentialsOK %s", 200, payload) +} + +func (o *ClusterServiceRenewDockerstoreCredentialsOK) GetPayload() *models.V1RenewSandboxSnapshotCredentialsResponse { + return o.Payload +} + +func (o *ClusterServiceRenewDockerstoreCredentialsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1RenewSandboxSnapshotCredentialsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewClusterServiceRenewDockerstoreCredentialsDefault creates a ClusterServiceRenewDockerstoreCredentialsDefault with default headers values +func NewClusterServiceRenewDockerstoreCredentialsDefault(code int) *ClusterServiceRenewDockerstoreCredentialsDefault { + return &ClusterServiceRenewDockerstoreCredentialsDefault{ + _statusCode: code, + } +} + +/* +ClusterServiceRenewDockerstoreCredentialsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterServiceRenewDockerstoreCredentialsDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this cluster service renew dockerstore credentials default response has a 2xx status code +func (o *ClusterServiceRenewDockerstoreCredentialsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this cluster service renew dockerstore credentials default response has a 3xx status code +func (o *ClusterServiceRenewDockerstoreCredentialsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this cluster service renew dockerstore credentials default response has a 4xx status code +func (o *ClusterServiceRenewDockerstoreCredentialsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this cluster service renew dockerstore credentials default response has a 5xx status code +func (o *ClusterServiceRenewDockerstoreCredentialsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this cluster service renew dockerstore credentials default response a status code equal to that given +func (o *ClusterServiceRenewDockerstoreCredentialsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the cluster service renew dockerstore credentials default response +func (o *ClusterServiceRenewDockerstoreCredentialsDefault) Code() int { + return o._statusCode +} + +func (o *ClusterServiceRenewDockerstoreCredentialsDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/core/servers/{serverId}/dockerstore-credentials][%d] ClusterService_RenewDockerstoreCredentials default %s", o._statusCode, payload) +} + +func (o *ClusterServiceRenewDockerstoreCredentialsDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/core/servers/{serverId}/dockerstore-credentials][%d] ClusterService_RenewDockerstoreCredentials default %s", o._statusCode, payload) +} + +func (o *ClusterServiceRenewDockerstoreCredentialsDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ClusterServiceRenewDockerstoreCredentialsDefault) 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_client.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_client.go index b806e4748..04feb89ba 100644 --- a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_client.go +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_client.go @@ -68,6 +68,8 @@ type ClientService interface { JobsServiceCreateMultiMachineJob(params *JobsServiceCreateMultiMachineJobParams, opts ...ClientOption) (*JobsServiceCreateMultiMachineJobOK, error) + JobsServiceCreateWorkloadTag(params *JobsServiceCreateWorkloadTagParams, opts ...ClientOption) (*JobsServiceCreateWorkloadTagOK, error) + JobsServiceDeleteDeployment(params *JobsServiceDeleteDeploymentParams, opts ...ClientOption) (*JobsServiceDeleteDeploymentOK, error) JobsServiceDeleteDeploymentAlertingPolicy(params *JobsServiceDeleteDeploymentAlertingPolicyParams, opts ...ClientOption) (*JobsServiceDeleteDeploymentAlertingPolicyOK, error) @@ -78,6 +80,8 @@ type ClientService interface { JobsServiceDeleteMultiMachineJob(params *JobsServiceDeleteMultiMachineJobParams, opts ...ClientOption) (*JobsServiceDeleteMultiMachineJobOK, error) + JobsServiceDeleteWorkloadTag(params *JobsServiceDeleteWorkloadTagParams, opts ...ClientOption) (*JobsServiceDeleteWorkloadTagOK, error) + JobsServiceDownloadJobLogs(params *JobsServiceDownloadJobLogsParams, opts ...ClientOption) (*JobsServiceDownloadJobLogsOK, error) JobsServiceDuplicateDeployment(params *JobsServiceDuplicateDeploymentParams, opts ...ClientOption) (*JobsServiceDuplicateDeploymentOK, error) @@ -146,6 +150,8 @@ type ClientService interface { JobsServiceListOrgDeployments(params *JobsServiceListOrgDeploymentsParams, opts ...ClientOption) (*JobsServiceListOrgDeploymentsOK, error) + JobsServiceListWorkloadTags(params *JobsServiceListWorkloadTagsParams, opts ...ClientOption) (*JobsServiceListWorkloadTagsOK, error) + JobsServiceReloadDeploymentWeights(params *JobsServiceReloadDeploymentWeightsParams, opts ...ClientOption) (*JobsServiceReloadDeploymentWeightsOK, error) JobsServiceReportDeploymentRoutingTelemetry(params *JobsServiceReportDeploymentRoutingTelemetryParams, opts ...ClientOption) (*JobsServiceReportDeploymentRoutingTelemetryOK, error) @@ -160,6 +166,8 @@ type ClientService interface { JobsServiceSearchJobLogs(params *JobsServiceSearchJobLogsParams, opts ...ClientOption) (*JobsServiceSearchJobLogsOK, error) + JobsServiceSetWorkloadTags(params *JobsServiceSetWorkloadTagsParams, opts ...ClientOption) (*JobsServiceSetWorkloadTagsOK, error) + JobsServiceUpdateDeployment(params *JobsServiceUpdateDeploymentParams, opts ...ClientOption) (*JobsServiceUpdateDeploymentOK, error) JobsServiceUpdateDeploymentAlertingEvent(params *JobsServiceUpdateDeploymentAlertingEventParams, opts ...ClientOption) (*JobsServiceUpdateDeploymentAlertingEventOK, error) @@ -178,6 +186,8 @@ type ClientService interface { JobsServiceUpdateOrgDeploymentVisibility(params *JobsServiceUpdateOrgDeploymentVisibilityParams, opts ...ClientOption) (*JobsServiceUpdateOrgDeploymentVisibilityOK, error) + JobsServiceUpdateWorkloadTag(params *JobsServiceUpdateWorkloadTagParams, opts ...ClientOption) (*JobsServiceUpdateWorkloadTagOK, error) + JobsServiceValidateDeploymentImage(params *JobsServiceValidateDeploymentImageParams, opts ...ClientOption) (*JobsServiceValidateDeploymentImageOK, error) SetTransport(transport runtime.ClientTransport) @@ -393,6 +403,48 @@ func (a *Client) JobsServiceCreateMultiMachineJob(params *JobsServiceCreateMulti return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +JobsServiceCreateWorkloadTag jobs service create workload tag API +*/ +func (a *Client) JobsServiceCreateWorkloadTag(params *JobsServiceCreateWorkloadTagParams, opts ...ClientOption) (*JobsServiceCreateWorkloadTagOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewJobsServiceCreateWorkloadTagParams() + } + op := &runtime.ClientOperation{ + ID: "JobsService_CreateWorkloadTag", + Method: "POST", + PathPattern: "/v1/projects/{projectId}/workload-tags", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &JobsServiceCreateWorkloadTagReader{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.(*JobsServiceCreateWorkloadTagOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*JobsServiceCreateWorkloadTagDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* JobsServiceDeleteDeployment jobs service delete deployment API */ @@ -603,6 +655,48 @@ func (a *Client) JobsServiceDeleteMultiMachineJob(params *JobsServiceDeleteMulti return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +JobsServiceDeleteWorkloadTag jobs service delete workload tag API +*/ +func (a *Client) JobsServiceDeleteWorkloadTag(params *JobsServiceDeleteWorkloadTagParams, opts ...ClientOption) (*JobsServiceDeleteWorkloadTagOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewJobsServiceDeleteWorkloadTagParams() + } + op := &runtime.ClientOperation{ + ID: "JobsService_DeleteWorkloadTag", + Method: "DELETE", + PathPattern: "/v1/projects/{projectId}/workload-tags/{id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &JobsServiceDeleteWorkloadTagReader{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.(*JobsServiceDeleteWorkloadTagOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*JobsServiceDeleteWorkloadTagDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* JobsServiceDownloadJobLogs jobs service download job logs API */ @@ -2031,6 +2125,48 @@ func (a *Client) JobsServiceListOrgDeployments(params *JobsServiceListOrgDeploym return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +JobsServiceListWorkloadTags jobs service list workload tags API +*/ +func (a *Client) JobsServiceListWorkloadTags(params *JobsServiceListWorkloadTagsParams, opts ...ClientOption) (*JobsServiceListWorkloadTagsOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewJobsServiceListWorkloadTagsParams() + } + op := &runtime.ClientOperation{ + ID: "JobsService_ListWorkloadTags", + Method: "GET", + PathPattern: "/v1/projects/{projectId}/workload-tags", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &JobsServiceListWorkloadTagsReader{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.(*JobsServiceListWorkloadTagsOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*JobsServiceListWorkloadTagsDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* JobsServiceReloadDeploymentWeights weights reload b y o m sidecar */ @@ -2325,6 +2461,48 @@ func (a *Client) JobsServiceSearchJobLogs(params *JobsServiceSearchJobLogsParams return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +JobsServiceSetWorkloadTags jobs service set workload tags API +*/ +func (a *Client) JobsServiceSetWorkloadTags(params *JobsServiceSetWorkloadTagsParams, opts ...ClientOption) (*JobsServiceSetWorkloadTagsOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewJobsServiceSetWorkloadTagsParams() + } + op := &runtime.ClientOperation{ + ID: "JobsService_SetWorkloadTags", + Method: "PUT", + PathPattern: "/v1/projects/{projectId}/workloads/{workloadType}/{workloadId}/tags", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &JobsServiceSetWorkloadTagsReader{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.(*JobsServiceSetWorkloadTagsOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*JobsServiceSetWorkloadTagsDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* JobsServiceUpdateDeployment jobs service update deployment API */ @@ -2703,6 +2881,48 @@ func (a *Client) JobsServiceUpdateOrgDeploymentVisibility(params *JobsServiceUpd return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +JobsServiceUpdateWorkloadTag jobs service update workload tag API +*/ +func (a *Client) JobsServiceUpdateWorkloadTag(params *JobsServiceUpdateWorkloadTagParams, opts ...ClientOption) (*JobsServiceUpdateWorkloadTagOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewJobsServiceUpdateWorkloadTagParams() + } + op := &runtime.ClientOperation{ + ID: "JobsService_UpdateWorkloadTag", + Method: "PUT", + PathPattern: "/v1/projects/{projectId}/workload-tags/{id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &JobsServiceUpdateWorkloadTagReader{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.(*JobsServiceUpdateWorkloadTagOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*JobsServiceUpdateWorkloadTagDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* JobsServiceValidateDeploymentImage jobs deployments */ diff --git a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_create_workload_tag_parameters.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_create_workload_tag_parameters.go new file mode 100644 index 000000000..77868dec7 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_create_workload_tag_parameters.go @@ -0,0 +1,176 @@ +// 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 jobs_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" +) + +// NewJobsServiceCreateWorkloadTagParams creates a new JobsServiceCreateWorkloadTagParams 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 NewJobsServiceCreateWorkloadTagParams() *JobsServiceCreateWorkloadTagParams { + return &JobsServiceCreateWorkloadTagParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewJobsServiceCreateWorkloadTagParamsWithTimeout creates a new JobsServiceCreateWorkloadTagParams object +// with the ability to set a timeout on a request. +func NewJobsServiceCreateWorkloadTagParamsWithTimeout(timeout time.Duration) *JobsServiceCreateWorkloadTagParams { + return &JobsServiceCreateWorkloadTagParams{ + timeout: timeout, + } +} + +// NewJobsServiceCreateWorkloadTagParamsWithContext creates a new JobsServiceCreateWorkloadTagParams object +// with the ability to set a context for a request. +func NewJobsServiceCreateWorkloadTagParamsWithContext(ctx context.Context) *JobsServiceCreateWorkloadTagParams { + return &JobsServiceCreateWorkloadTagParams{ + Context: ctx, + } +} + +// NewJobsServiceCreateWorkloadTagParamsWithHTTPClient creates a new JobsServiceCreateWorkloadTagParams object +// with the ability to set a custom HTTPClient for a request. +func NewJobsServiceCreateWorkloadTagParamsWithHTTPClient(client *http.Client) *JobsServiceCreateWorkloadTagParams { + return &JobsServiceCreateWorkloadTagParams{ + HTTPClient: client, + } +} + +/* +JobsServiceCreateWorkloadTagParams contains all the parameters to send to the API endpoint + + for the jobs service create workload tag operation. + + Typically these are written to a http.Request. +*/ +type JobsServiceCreateWorkloadTagParams struct { + + // Body. + Body *models.JobsServiceCreateWorkloadTagBody + + /* ProjectID. + + Required + */ + ProjectID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the jobs service create workload tag params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobsServiceCreateWorkloadTagParams) WithDefaults() *JobsServiceCreateWorkloadTagParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the jobs service create workload tag params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobsServiceCreateWorkloadTagParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the jobs service create workload tag params +func (o *JobsServiceCreateWorkloadTagParams) WithTimeout(timeout time.Duration) *JobsServiceCreateWorkloadTagParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the jobs service create workload tag params +func (o *JobsServiceCreateWorkloadTagParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the jobs service create workload tag params +func (o *JobsServiceCreateWorkloadTagParams) WithContext(ctx context.Context) *JobsServiceCreateWorkloadTagParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the jobs service create workload tag params +func (o *JobsServiceCreateWorkloadTagParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the jobs service create workload tag params +func (o *JobsServiceCreateWorkloadTagParams) WithHTTPClient(client *http.Client) *JobsServiceCreateWorkloadTagParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the jobs service create workload tag params +func (o *JobsServiceCreateWorkloadTagParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the jobs service create workload tag params +func (o *JobsServiceCreateWorkloadTagParams) WithBody(body *models.JobsServiceCreateWorkloadTagBody) *JobsServiceCreateWorkloadTagParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the jobs service create workload tag params +func (o *JobsServiceCreateWorkloadTagParams) SetBody(body *models.JobsServiceCreateWorkloadTagBody) { + o.Body = body +} + +// WithProjectID adds the projectID to the jobs service create workload tag params +func (o *JobsServiceCreateWorkloadTagParams) WithProjectID(projectID string) *JobsServiceCreateWorkloadTagParams { + o.SetProjectID(projectID) + return o +} + +// SetProjectID adds the projectId to the jobs service create workload tag params +func (o *JobsServiceCreateWorkloadTagParams) SetProjectID(projectID string) { + o.ProjectID = projectID +} + +// WriteToRequest writes these params to a swagger request +func (o *JobsServiceCreateWorkloadTagParams) 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 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/jobs_service/jobs_service_create_workload_tag_responses.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_create_workload_tag_responses.go new file mode 100644 index 000000000..04ad43b12 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_create_workload_tag_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 jobs_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" +) + +// JobsServiceCreateWorkloadTagReader is a Reader for the JobsServiceCreateWorkloadTag structure. +type JobsServiceCreateWorkloadTagReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobsServiceCreateWorkloadTagReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewJobsServiceCreateWorkloadTagOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewJobsServiceCreateWorkloadTagDefault(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 + } +} + +// NewJobsServiceCreateWorkloadTagOK creates a JobsServiceCreateWorkloadTagOK with default headers values +func NewJobsServiceCreateWorkloadTagOK() *JobsServiceCreateWorkloadTagOK { + return &JobsServiceCreateWorkloadTagOK{} +} + +/* +JobsServiceCreateWorkloadTagOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type JobsServiceCreateWorkloadTagOK struct { + Payload *models.V1WorkloadTag +} + +// IsSuccess returns true when this jobs service create workload tag o k response has a 2xx status code +func (o *JobsServiceCreateWorkloadTagOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this jobs service create workload tag o k response has a 3xx status code +func (o *JobsServiceCreateWorkloadTagOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this jobs service create workload tag o k response has a 4xx status code +func (o *JobsServiceCreateWorkloadTagOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this jobs service create workload tag o k response has a 5xx status code +func (o *JobsServiceCreateWorkloadTagOK) IsServerError() bool { + return false +} + +// IsCode returns true when this jobs service create workload tag o k response a status code equal to that given +func (o *JobsServiceCreateWorkloadTagOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the jobs service create workload tag o k response +func (o *JobsServiceCreateWorkloadTagOK) Code() int { + return 200 +} + +func (o *JobsServiceCreateWorkloadTagOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/projects/{projectId}/workload-tags][%d] jobsServiceCreateWorkloadTagOK %s", 200, payload) +} + +func (o *JobsServiceCreateWorkloadTagOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/projects/{projectId}/workload-tags][%d] jobsServiceCreateWorkloadTagOK %s", 200, payload) +} + +func (o *JobsServiceCreateWorkloadTagOK) GetPayload() *models.V1WorkloadTag { + return o.Payload +} + +func (o *JobsServiceCreateWorkloadTagOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkloadTag) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewJobsServiceCreateWorkloadTagDefault creates a JobsServiceCreateWorkloadTagDefault with default headers values +func NewJobsServiceCreateWorkloadTagDefault(code int) *JobsServiceCreateWorkloadTagDefault { + return &JobsServiceCreateWorkloadTagDefault{ + _statusCode: code, + } +} + +/* +JobsServiceCreateWorkloadTagDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type JobsServiceCreateWorkloadTagDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this jobs service create workload tag default response has a 2xx status code +func (o *JobsServiceCreateWorkloadTagDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this jobs service create workload tag default response has a 3xx status code +func (o *JobsServiceCreateWorkloadTagDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this jobs service create workload tag default response has a 4xx status code +func (o *JobsServiceCreateWorkloadTagDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this jobs service create workload tag default response has a 5xx status code +func (o *JobsServiceCreateWorkloadTagDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this jobs service create workload tag default response a status code equal to that given +func (o *JobsServiceCreateWorkloadTagDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the jobs service create workload tag default response +func (o *JobsServiceCreateWorkloadTagDefault) Code() int { + return o._statusCode +} + +func (o *JobsServiceCreateWorkloadTagDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/projects/{projectId}/workload-tags][%d] JobsService_CreateWorkloadTag default %s", o._statusCode, payload) +} + +func (o *JobsServiceCreateWorkloadTagDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/projects/{projectId}/workload-tags][%d] JobsService_CreateWorkloadTag default %s", o._statusCode, payload) +} + +func (o *JobsServiceCreateWorkloadTagDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *JobsServiceCreateWorkloadTagDefault) 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_delete_workload_tag_parameters.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_delete_workload_tag_parameters.go new file mode 100644 index 000000000..5712fb8af --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_delete_workload_tag_parameters.go @@ -0,0 +1,177 @@ +// 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 jobs_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" +) + +// NewJobsServiceDeleteWorkloadTagParams creates a new JobsServiceDeleteWorkloadTagParams 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 NewJobsServiceDeleteWorkloadTagParams() *JobsServiceDeleteWorkloadTagParams { + return &JobsServiceDeleteWorkloadTagParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewJobsServiceDeleteWorkloadTagParamsWithTimeout creates a new JobsServiceDeleteWorkloadTagParams object +// with the ability to set a timeout on a request. +func NewJobsServiceDeleteWorkloadTagParamsWithTimeout(timeout time.Duration) *JobsServiceDeleteWorkloadTagParams { + return &JobsServiceDeleteWorkloadTagParams{ + timeout: timeout, + } +} + +// NewJobsServiceDeleteWorkloadTagParamsWithContext creates a new JobsServiceDeleteWorkloadTagParams object +// with the ability to set a context for a request. +func NewJobsServiceDeleteWorkloadTagParamsWithContext(ctx context.Context) *JobsServiceDeleteWorkloadTagParams { + return &JobsServiceDeleteWorkloadTagParams{ + Context: ctx, + } +} + +// NewJobsServiceDeleteWorkloadTagParamsWithHTTPClient creates a new JobsServiceDeleteWorkloadTagParams object +// with the ability to set a custom HTTPClient for a request. +func NewJobsServiceDeleteWorkloadTagParamsWithHTTPClient(client *http.Client) *JobsServiceDeleteWorkloadTagParams { + return &JobsServiceDeleteWorkloadTagParams{ + HTTPClient: client, + } +} + +/* +JobsServiceDeleteWorkloadTagParams contains all the parameters to send to the API endpoint + + for the jobs service delete workload tag operation. + + Typically these are written to a http.Request. +*/ +type JobsServiceDeleteWorkloadTagParams struct { + + /* ID. + + Required + */ + ID string + + /* ProjectID. + + Required + */ + ProjectID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the jobs service delete workload tag params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobsServiceDeleteWorkloadTagParams) WithDefaults() *JobsServiceDeleteWorkloadTagParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the jobs service delete workload tag params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobsServiceDeleteWorkloadTagParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the jobs service delete workload tag params +func (o *JobsServiceDeleteWorkloadTagParams) WithTimeout(timeout time.Duration) *JobsServiceDeleteWorkloadTagParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the jobs service delete workload tag params +func (o *JobsServiceDeleteWorkloadTagParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the jobs service delete workload tag params +func (o *JobsServiceDeleteWorkloadTagParams) WithContext(ctx context.Context) *JobsServiceDeleteWorkloadTagParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the jobs service delete workload tag params +func (o *JobsServiceDeleteWorkloadTagParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the jobs service delete workload tag params +func (o *JobsServiceDeleteWorkloadTagParams) WithHTTPClient(client *http.Client) *JobsServiceDeleteWorkloadTagParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the jobs service delete workload tag params +func (o *JobsServiceDeleteWorkloadTagParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the jobs service delete workload tag params +func (o *JobsServiceDeleteWorkloadTagParams) WithID(id string) *JobsServiceDeleteWorkloadTagParams { + o.SetID(id) + return o +} + +// SetID adds the id to the jobs service delete workload tag params +func (o *JobsServiceDeleteWorkloadTagParams) SetID(id string) { + o.ID = id +} + +// WithProjectID adds the projectID to the jobs service delete workload tag params +func (o *JobsServiceDeleteWorkloadTagParams) WithProjectID(projectID string) *JobsServiceDeleteWorkloadTagParams { + o.SetProjectID(projectID) + return o +} + +// SetProjectID adds the projectId to the jobs service delete workload tag params +func (o *JobsServiceDeleteWorkloadTagParams) SetProjectID(projectID string) { + o.ProjectID = projectID +} + +// WriteToRequest writes these params to a swagger request +func (o *JobsServiceDeleteWorkloadTagParams) 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 + } + + // 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/jobs_service/jobs_service_delete_workload_tag_responses.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_delete_workload_tag_responses.go new file mode 100644 index 000000000..f6de2cf13 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_delete_workload_tag_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 jobs_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" +) + +// JobsServiceDeleteWorkloadTagReader is a Reader for the JobsServiceDeleteWorkloadTag structure. +type JobsServiceDeleteWorkloadTagReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobsServiceDeleteWorkloadTagReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewJobsServiceDeleteWorkloadTagOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewJobsServiceDeleteWorkloadTagDefault(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 + } +} + +// NewJobsServiceDeleteWorkloadTagOK creates a JobsServiceDeleteWorkloadTagOK with default headers values +func NewJobsServiceDeleteWorkloadTagOK() *JobsServiceDeleteWorkloadTagOK { + return &JobsServiceDeleteWorkloadTagOK{} +} + +/* +JobsServiceDeleteWorkloadTagOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type JobsServiceDeleteWorkloadTagOK struct { + Payload models.V1DeleteWorkloadTagResponse +} + +// IsSuccess returns true when this jobs service delete workload tag o k response has a 2xx status code +func (o *JobsServiceDeleteWorkloadTagOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this jobs service delete workload tag o k response has a 3xx status code +func (o *JobsServiceDeleteWorkloadTagOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this jobs service delete workload tag o k response has a 4xx status code +func (o *JobsServiceDeleteWorkloadTagOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this jobs service delete workload tag o k response has a 5xx status code +func (o *JobsServiceDeleteWorkloadTagOK) IsServerError() bool { + return false +} + +// IsCode returns true when this jobs service delete workload tag o k response a status code equal to that given +func (o *JobsServiceDeleteWorkloadTagOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the jobs service delete workload tag o k response +func (o *JobsServiceDeleteWorkloadTagOK) Code() int { + return 200 +} + +func (o *JobsServiceDeleteWorkloadTagOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/projects/{projectId}/workload-tags/{id}][%d] jobsServiceDeleteWorkloadTagOK %s", 200, payload) +} + +func (o *JobsServiceDeleteWorkloadTagOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/projects/{projectId}/workload-tags/{id}][%d] jobsServiceDeleteWorkloadTagOK %s", 200, payload) +} + +func (o *JobsServiceDeleteWorkloadTagOK) GetPayload() models.V1DeleteWorkloadTagResponse { + return o.Payload +} + +func (o *JobsServiceDeleteWorkloadTagOK) 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 +} + +// NewJobsServiceDeleteWorkloadTagDefault creates a JobsServiceDeleteWorkloadTagDefault with default headers values +func NewJobsServiceDeleteWorkloadTagDefault(code int) *JobsServiceDeleteWorkloadTagDefault { + return &JobsServiceDeleteWorkloadTagDefault{ + _statusCode: code, + } +} + +/* +JobsServiceDeleteWorkloadTagDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type JobsServiceDeleteWorkloadTagDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this jobs service delete workload tag default response has a 2xx status code +func (o *JobsServiceDeleteWorkloadTagDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this jobs service delete workload tag default response has a 3xx status code +func (o *JobsServiceDeleteWorkloadTagDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this jobs service delete workload tag default response has a 4xx status code +func (o *JobsServiceDeleteWorkloadTagDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this jobs service delete workload tag default response has a 5xx status code +func (o *JobsServiceDeleteWorkloadTagDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this jobs service delete workload tag default response a status code equal to that given +func (o *JobsServiceDeleteWorkloadTagDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the jobs service delete workload tag default response +func (o *JobsServiceDeleteWorkloadTagDefault) Code() int { + return o._statusCode +} + +func (o *JobsServiceDeleteWorkloadTagDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/projects/{projectId}/workload-tags/{id}][%d] JobsService_DeleteWorkloadTag default %s", o._statusCode, payload) +} + +func (o *JobsServiceDeleteWorkloadTagDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/projects/{projectId}/workload-tags/{id}][%d] JobsService_DeleteWorkloadTag default %s", o._statusCode, payload) +} + +func (o *JobsServiceDeleteWorkloadTagDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *JobsServiceDeleteWorkloadTagDefault) 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_list_all_jobs_parameters.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_all_jobs_parameters.go index 03f588018..14dc18635 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 @@ -83,6 +83,12 @@ type JobsServiceListAllJobsParams struct { // Format: int64 Limit *int64 + /* MatchAllTags. + + Require every tag in tag_ids rather than any + */ + MatchAllTags *bool + // OrgID. OrgID *string @@ -114,6 +120,12 @@ type JobsServiceListAllJobsParams struct { // States. States []string + /* TagIds. + + Match any of these tags + */ + TagIds []string + // UserID. UserID *string @@ -206,6 +218,17 @@ func (o *JobsServiceListAllJobsParams) SetLimit(limit *int64) { o.Limit = limit } +// WithMatchAllTags adds the matchAllTags to the jobs service list all jobs params +func (o *JobsServiceListAllJobsParams) WithMatchAllTags(matchAllTags *bool) *JobsServiceListAllJobsParams { + o.SetMatchAllTags(matchAllTags) + return o +} + +// SetMatchAllTags adds the matchAllTags to the jobs service list all jobs params +func (o *JobsServiceListAllJobsParams) SetMatchAllTags(matchAllTags *bool) { + o.MatchAllTags = matchAllTags +} + // WithOrgID adds the orgID to the jobs service list all jobs params func (o *JobsServiceListAllJobsParams) WithOrgID(orgID *string) *JobsServiceListAllJobsParams { o.SetOrgID(orgID) @@ -283,6 +306,17 @@ func (o *JobsServiceListAllJobsParams) SetStates(states []string) { o.States = states } +// WithTagIds adds the tagIds to the jobs service list all jobs params +func (o *JobsServiceListAllJobsParams) WithTagIds(tagIds []string) *JobsServiceListAllJobsParams { + o.SetTagIds(tagIds) + return o +} + +// SetTagIds adds the tagIds to the jobs service list all jobs params +func (o *JobsServiceListAllJobsParams) SetTagIds(tagIds []string) { + o.TagIds = tagIds +} + // WithUserID adds the userID to the jobs service list all jobs params func (o *JobsServiceListAllJobsParams) WithUserID(userID *string) *JobsServiceListAllJobsParams { o.SetUserID(userID) @@ -330,6 +364,23 @@ func (o *JobsServiceListAllJobsParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.MatchAllTags != nil { + + // query param matchAllTags + var qrMatchAllTags bool + + if o.MatchAllTags != nil { + qrMatchAllTags = *o.MatchAllTags + } + qMatchAllTags := swag.FormatBool(qrMatchAllTags) + if qMatchAllTags != "" { + + if err := r.SetQueryParam("matchAllTags", qMatchAllTags); err != nil { + return err + } + } + } + if o.OrgID != nil { // query param orgId @@ -443,6 +494,17 @@ func (o *JobsServiceListAllJobsParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.TagIds != nil { + + // binding items for tagIds + joinedTagIds := o.bindParamTagIds(reg) + + // query array param tagIds + if err := r.SetQueryParam("tagIds", joinedTagIds...); err != nil { + return err + } + } + if o.UserID != nil { // query param userId @@ -499,3 +561,20 @@ func (o *JobsServiceListAllJobsParams) bindParamStates(formats strfmt.Registry) return statesIS } + +// bindParamJobsServiceListAllJobs binds the parameter tagIds +func (o *JobsServiceListAllJobsParams) bindParamTagIds(formats strfmt.Registry) []string { + tagIdsIR := o.TagIds + + var tagIdsIC []string + for _, tagIdsIIR := range tagIdsIR { // explode []string + + tagIdsIIV := tagIdsIIR // string as string + tagIdsIC = append(tagIdsIC, tagIdsIIV) + } + + // items.CollectionFormat: "multi" + tagIdsIS := swag.JoinByFormat(tagIdsIC, "multi") + + return tagIdsIS +} diff --git a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_jobs_parameters.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_jobs_parameters.go index 62bd270ca..14ee50401 100644 --- a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_jobs_parameters.go +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_jobs_parameters.go @@ -117,6 +117,12 @@ type JobsServiceListJobsParams struct { */ State *string + /* TagIds. + + Match any of these tags + */ + TagIds []string + // UserID. UserID *string @@ -297,6 +303,17 @@ func (o *JobsServiceListJobsParams) SetState(state *string) { o.State = state } +// WithTagIds adds the tagIds to the jobs service list jobs params +func (o *JobsServiceListJobsParams) WithTagIds(tagIds []string) *JobsServiceListJobsParams { + o.SetTagIds(tagIds) + return o +} + +// SetTagIds adds the tagIds to the jobs service list jobs params +func (o *JobsServiceListJobsParams) SetTagIds(tagIds []string) { + o.TagIds = tagIds +} + // WithUserID adds the userID to the jobs service list jobs params func (o *JobsServiceListJobsParams) WithUserID(userID *string) *JobsServiceListJobsParams { o.SetUserID(userID) @@ -474,6 +491,17 @@ func (o *JobsServiceListJobsParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.TagIds != nil { + + // binding items for tagIds + joinedTagIds := o.bindParamTagIds(reg) + + // query array param tagIds + if err := r.SetQueryParam("tagIds", joinedTagIds...); err != nil { + return err + } + } + if o.UserID != nil { // query param userId @@ -496,3 +524,20 @@ func (o *JobsServiceListJobsParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } + +// bindParamJobsServiceListJobs binds the parameter tagIds +func (o *JobsServiceListJobsParams) bindParamTagIds(formats strfmt.Registry) []string { + tagIdsIR := o.TagIds + + var tagIdsIC []string + for _, tagIdsIIR := range tagIdsIR { // explode []string + + tagIdsIIV := tagIdsIIR // string as string + tagIdsIC = append(tagIdsIC, tagIdsIIV) + } + + // items.CollectionFormat: "multi" + tagIdsIS := swag.JoinByFormat(tagIdsIC, "multi") + + return tagIdsIS +} diff --git a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_workload_tags_parameters.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_workload_tags_parameters.go new file mode 100644 index 000000000..7907dd52d --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_workload_tags_parameters.go @@ -0,0 +1,187 @@ +// 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 jobs_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" +) + +// NewJobsServiceListWorkloadTagsParams creates a new JobsServiceListWorkloadTagsParams 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 NewJobsServiceListWorkloadTagsParams() *JobsServiceListWorkloadTagsParams { + return &JobsServiceListWorkloadTagsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewJobsServiceListWorkloadTagsParamsWithTimeout creates a new JobsServiceListWorkloadTagsParams object +// with the ability to set a timeout on a request. +func NewJobsServiceListWorkloadTagsParamsWithTimeout(timeout time.Duration) *JobsServiceListWorkloadTagsParams { + return &JobsServiceListWorkloadTagsParams{ + timeout: timeout, + } +} + +// NewJobsServiceListWorkloadTagsParamsWithContext creates a new JobsServiceListWorkloadTagsParams object +// with the ability to set a context for a request. +func NewJobsServiceListWorkloadTagsParamsWithContext(ctx context.Context) *JobsServiceListWorkloadTagsParams { + return &JobsServiceListWorkloadTagsParams{ + Context: ctx, + } +} + +// NewJobsServiceListWorkloadTagsParamsWithHTTPClient creates a new JobsServiceListWorkloadTagsParams object +// with the ability to set a custom HTTPClient for a request. +func NewJobsServiceListWorkloadTagsParamsWithHTTPClient(client *http.Client) *JobsServiceListWorkloadTagsParams { + return &JobsServiceListWorkloadTagsParams{ + HTTPClient: client, + } +} + +/* +JobsServiceListWorkloadTagsParams contains all the parameters to send to the API endpoint + + for the jobs service list workload tags operation. + + Typically these are written to a http.Request. +*/ +type JobsServiceListWorkloadTagsParams struct { + + // IncludeUsageCounts. + IncludeUsageCounts *bool + + /* ProjectID. + + Required + */ + ProjectID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the jobs service list workload tags params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobsServiceListWorkloadTagsParams) WithDefaults() *JobsServiceListWorkloadTagsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the jobs service list workload tags params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobsServiceListWorkloadTagsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the jobs service list workload tags params +func (o *JobsServiceListWorkloadTagsParams) WithTimeout(timeout time.Duration) *JobsServiceListWorkloadTagsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the jobs service list workload tags params +func (o *JobsServiceListWorkloadTagsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the jobs service list workload tags params +func (o *JobsServiceListWorkloadTagsParams) WithContext(ctx context.Context) *JobsServiceListWorkloadTagsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the jobs service list workload tags params +func (o *JobsServiceListWorkloadTagsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the jobs service list workload tags params +func (o *JobsServiceListWorkloadTagsParams) WithHTTPClient(client *http.Client) *JobsServiceListWorkloadTagsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the jobs service list workload tags params +func (o *JobsServiceListWorkloadTagsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIncludeUsageCounts adds the includeUsageCounts to the jobs service list workload tags params +func (o *JobsServiceListWorkloadTagsParams) WithIncludeUsageCounts(includeUsageCounts *bool) *JobsServiceListWorkloadTagsParams { + o.SetIncludeUsageCounts(includeUsageCounts) + return o +} + +// SetIncludeUsageCounts adds the includeUsageCounts to the jobs service list workload tags params +func (o *JobsServiceListWorkloadTagsParams) SetIncludeUsageCounts(includeUsageCounts *bool) { + o.IncludeUsageCounts = includeUsageCounts +} + +// WithProjectID adds the projectID to the jobs service list workload tags params +func (o *JobsServiceListWorkloadTagsParams) WithProjectID(projectID string) *JobsServiceListWorkloadTagsParams { + o.SetProjectID(projectID) + return o +} + +// SetProjectID adds the projectId to the jobs service list workload tags params +func (o *JobsServiceListWorkloadTagsParams) SetProjectID(projectID string) { + o.ProjectID = projectID +} + +// WriteToRequest writes these params to a swagger request +func (o *JobsServiceListWorkloadTagsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.IncludeUsageCounts != nil { + + // query param includeUsageCounts + var qrIncludeUsageCounts bool + + if o.IncludeUsageCounts != nil { + qrIncludeUsageCounts = *o.IncludeUsageCounts + } + qIncludeUsageCounts := swag.FormatBool(qrIncludeUsageCounts) + if qIncludeUsageCounts != "" { + + if err := r.SetQueryParam("includeUsageCounts", qIncludeUsageCounts); 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/jobs_service/jobs_service_list_workload_tags_responses.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_workload_tags_responses.go new file mode 100644 index 000000000..93457f45e --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_list_workload_tags_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 jobs_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" +) + +// JobsServiceListWorkloadTagsReader is a Reader for the JobsServiceListWorkloadTags structure. +type JobsServiceListWorkloadTagsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobsServiceListWorkloadTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewJobsServiceListWorkloadTagsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewJobsServiceListWorkloadTagsDefault(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 + } +} + +// NewJobsServiceListWorkloadTagsOK creates a JobsServiceListWorkloadTagsOK with default headers values +func NewJobsServiceListWorkloadTagsOK() *JobsServiceListWorkloadTagsOK { + return &JobsServiceListWorkloadTagsOK{} +} + +/* +JobsServiceListWorkloadTagsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type JobsServiceListWorkloadTagsOK struct { + Payload *models.V1ListWorkloadTagsResponse +} + +// IsSuccess returns true when this jobs service list workload tags o k response has a 2xx status code +func (o *JobsServiceListWorkloadTagsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this jobs service list workload tags o k response has a 3xx status code +func (o *JobsServiceListWorkloadTagsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this jobs service list workload tags o k response has a 4xx status code +func (o *JobsServiceListWorkloadTagsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this jobs service list workload tags o k response has a 5xx status code +func (o *JobsServiceListWorkloadTagsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this jobs service list workload tags o k response a status code equal to that given +func (o *JobsServiceListWorkloadTagsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the jobs service list workload tags o k response +func (o *JobsServiceListWorkloadTagsOK) Code() int { + return 200 +} + +func (o *JobsServiceListWorkloadTagsOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/projects/{projectId}/workload-tags][%d] jobsServiceListWorkloadTagsOK %s", 200, payload) +} + +func (o *JobsServiceListWorkloadTagsOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/projects/{projectId}/workload-tags][%d] jobsServiceListWorkloadTagsOK %s", 200, payload) +} + +func (o *JobsServiceListWorkloadTagsOK) GetPayload() *models.V1ListWorkloadTagsResponse { + return o.Payload +} + +func (o *JobsServiceListWorkloadTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ListWorkloadTagsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewJobsServiceListWorkloadTagsDefault creates a JobsServiceListWorkloadTagsDefault with default headers values +func NewJobsServiceListWorkloadTagsDefault(code int) *JobsServiceListWorkloadTagsDefault { + return &JobsServiceListWorkloadTagsDefault{ + _statusCode: code, + } +} + +/* +JobsServiceListWorkloadTagsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type JobsServiceListWorkloadTagsDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this jobs service list workload tags default response has a 2xx status code +func (o *JobsServiceListWorkloadTagsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this jobs service list workload tags default response has a 3xx status code +func (o *JobsServiceListWorkloadTagsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this jobs service list workload tags default response has a 4xx status code +func (o *JobsServiceListWorkloadTagsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this jobs service list workload tags default response has a 5xx status code +func (o *JobsServiceListWorkloadTagsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this jobs service list workload tags default response a status code equal to that given +func (o *JobsServiceListWorkloadTagsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the jobs service list workload tags default response +func (o *JobsServiceListWorkloadTagsDefault) Code() int { + return o._statusCode +} + +func (o *JobsServiceListWorkloadTagsDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/projects/{projectId}/workload-tags][%d] JobsService_ListWorkloadTags default %s", o._statusCode, payload) +} + +func (o *JobsServiceListWorkloadTagsDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/projects/{projectId}/workload-tags][%d] JobsService_ListWorkloadTags default %s", o._statusCode, payload) +} + +func (o *JobsServiceListWorkloadTagsDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *JobsServiceListWorkloadTagsDefault) 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_set_workload_tags_parameters.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_set_workload_tags_parameters.go new file mode 100644 index 000000000..a7206bff3 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_set_workload_tags_parameters.go @@ -0,0 +1,220 @@ +// 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 jobs_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" +) + +// NewJobsServiceSetWorkloadTagsParams creates a new JobsServiceSetWorkloadTagsParams 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 NewJobsServiceSetWorkloadTagsParams() *JobsServiceSetWorkloadTagsParams { + return &JobsServiceSetWorkloadTagsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewJobsServiceSetWorkloadTagsParamsWithTimeout creates a new JobsServiceSetWorkloadTagsParams object +// with the ability to set a timeout on a request. +func NewJobsServiceSetWorkloadTagsParamsWithTimeout(timeout time.Duration) *JobsServiceSetWorkloadTagsParams { + return &JobsServiceSetWorkloadTagsParams{ + timeout: timeout, + } +} + +// NewJobsServiceSetWorkloadTagsParamsWithContext creates a new JobsServiceSetWorkloadTagsParams object +// with the ability to set a context for a request. +func NewJobsServiceSetWorkloadTagsParamsWithContext(ctx context.Context) *JobsServiceSetWorkloadTagsParams { + return &JobsServiceSetWorkloadTagsParams{ + Context: ctx, + } +} + +// NewJobsServiceSetWorkloadTagsParamsWithHTTPClient creates a new JobsServiceSetWorkloadTagsParams object +// with the ability to set a custom HTTPClient for a request. +func NewJobsServiceSetWorkloadTagsParamsWithHTTPClient(client *http.Client) *JobsServiceSetWorkloadTagsParams { + return &JobsServiceSetWorkloadTagsParams{ + HTTPClient: client, + } +} + +/* +JobsServiceSetWorkloadTagsParams contains all the parameters to send to the API endpoint + + for the jobs service set workload tags operation. + + Typically these are written to a http.Request. +*/ +type JobsServiceSetWorkloadTagsParams struct { + + // Body. + Body *models.JobsServiceSetWorkloadTagsBody + + /* ProjectID. + + Required + */ + ProjectID string + + /* WorkloadID. + + Required + */ + WorkloadID string + + /* WorkloadType. + + Required, one of the `type` values ListAllJobs returns + */ + WorkloadType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the jobs service set workload tags params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobsServiceSetWorkloadTagsParams) WithDefaults() *JobsServiceSetWorkloadTagsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the jobs service set workload tags params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobsServiceSetWorkloadTagsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) WithTimeout(timeout time.Duration) *JobsServiceSetWorkloadTagsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) WithContext(ctx context.Context) *JobsServiceSetWorkloadTagsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) WithHTTPClient(client *http.Client) *JobsServiceSetWorkloadTagsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) WithBody(body *models.JobsServiceSetWorkloadTagsBody) *JobsServiceSetWorkloadTagsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) SetBody(body *models.JobsServiceSetWorkloadTagsBody) { + o.Body = body +} + +// WithProjectID adds the projectID to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) WithProjectID(projectID string) *JobsServiceSetWorkloadTagsParams { + o.SetProjectID(projectID) + return o +} + +// SetProjectID adds the projectId to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) SetProjectID(projectID string) { + o.ProjectID = projectID +} + +// WithWorkloadID adds the workloadID to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) WithWorkloadID(workloadID string) *JobsServiceSetWorkloadTagsParams { + o.SetWorkloadID(workloadID) + return o +} + +// SetWorkloadID adds the workloadId to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) SetWorkloadID(workloadID string) { + o.WorkloadID = workloadID +} + +// WithWorkloadType adds the workloadType to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) WithWorkloadType(workloadType string) *JobsServiceSetWorkloadTagsParams { + o.SetWorkloadType(workloadType) + return o +} + +// SetWorkloadType adds the workloadType to the jobs service set workload tags params +func (o *JobsServiceSetWorkloadTagsParams) SetWorkloadType(workloadType string) { + o.WorkloadType = workloadType +} + +// WriteToRequest writes these params to a swagger request +func (o *JobsServiceSetWorkloadTagsParams) 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 projectId + if err := r.SetPathParam("projectId", o.ProjectID); err != nil { + return err + } + + // path param workloadId + if err := r.SetPathParam("workloadId", o.WorkloadID); err != nil { + return err + } + + // path param workloadType + if err := r.SetPathParam("workloadType", o.WorkloadType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_set_workload_tags_responses.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_set_workload_tags_responses.go new file mode 100644 index 000000000..98b688d74 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_set_workload_tags_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 jobs_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" +) + +// JobsServiceSetWorkloadTagsReader is a Reader for the JobsServiceSetWorkloadTags structure. +type JobsServiceSetWorkloadTagsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobsServiceSetWorkloadTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewJobsServiceSetWorkloadTagsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewJobsServiceSetWorkloadTagsDefault(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 + } +} + +// NewJobsServiceSetWorkloadTagsOK creates a JobsServiceSetWorkloadTagsOK with default headers values +func NewJobsServiceSetWorkloadTagsOK() *JobsServiceSetWorkloadTagsOK { + return &JobsServiceSetWorkloadTagsOK{} +} + +/* +JobsServiceSetWorkloadTagsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type JobsServiceSetWorkloadTagsOK struct { + Payload *models.V1SetWorkloadTagsResponse +} + +// IsSuccess returns true when this jobs service set workload tags o k response has a 2xx status code +func (o *JobsServiceSetWorkloadTagsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this jobs service set workload tags o k response has a 3xx status code +func (o *JobsServiceSetWorkloadTagsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this jobs service set workload tags o k response has a 4xx status code +func (o *JobsServiceSetWorkloadTagsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this jobs service set workload tags o k response has a 5xx status code +func (o *JobsServiceSetWorkloadTagsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this jobs service set workload tags o k response a status code equal to that given +func (o *JobsServiceSetWorkloadTagsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the jobs service set workload tags o k response +func (o *JobsServiceSetWorkloadTagsOK) Code() int { + return 200 +} + +func (o *JobsServiceSetWorkloadTagsOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/projects/{projectId}/workloads/{workloadType}/{workloadId}/tags][%d] jobsServiceSetWorkloadTagsOK %s", 200, payload) +} + +func (o *JobsServiceSetWorkloadTagsOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/projects/{projectId}/workloads/{workloadType}/{workloadId}/tags][%d] jobsServiceSetWorkloadTagsOK %s", 200, payload) +} + +func (o *JobsServiceSetWorkloadTagsOK) GetPayload() *models.V1SetWorkloadTagsResponse { + return o.Payload +} + +func (o *JobsServiceSetWorkloadTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SetWorkloadTagsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewJobsServiceSetWorkloadTagsDefault creates a JobsServiceSetWorkloadTagsDefault with default headers values +func NewJobsServiceSetWorkloadTagsDefault(code int) *JobsServiceSetWorkloadTagsDefault { + return &JobsServiceSetWorkloadTagsDefault{ + _statusCode: code, + } +} + +/* +JobsServiceSetWorkloadTagsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type JobsServiceSetWorkloadTagsDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this jobs service set workload tags default response has a 2xx status code +func (o *JobsServiceSetWorkloadTagsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this jobs service set workload tags default response has a 3xx status code +func (o *JobsServiceSetWorkloadTagsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this jobs service set workload tags default response has a 4xx status code +func (o *JobsServiceSetWorkloadTagsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this jobs service set workload tags default response has a 5xx status code +func (o *JobsServiceSetWorkloadTagsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this jobs service set workload tags default response a status code equal to that given +func (o *JobsServiceSetWorkloadTagsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the jobs service set workload tags default response +func (o *JobsServiceSetWorkloadTagsDefault) Code() int { + return o._statusCode +} + +func (o *JobsServiceSetWorkloadTagsDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/projects/{projectId}/workloads/{workloadType}/{workloadId}/tags][%d] JobsService_SetWorkloadTags default %s", o._statusCode, payload) +} + +func (o *JobsServiceSetWorkloadTagsDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/projects/{projectId}/workloads/{workloadType}/{workloadId}/tags][%d] JobsService_SetWorkloadTags default %s", o._statusCode, payload) +} + +func (o *JobsServiceSetWorkloadTagsDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *JobsServiceSetWorkloadTagsDefault) 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_update_workload_tag_parameters.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_update_workload_tag_parameters.go new file mode 100644 index 000000000..c1cdddca3 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_update_workload_tag_parameters.go @@ -0,0 +1,198 @@ +// 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 jobs_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" +) + +// NewJobsServiceUpdateWorkloadTagParams creates a new JobsServiceUpdateWorkloadTagParams 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 NewJobsServiceUpdateWorkloadTagParams() *JobsServiceUpdateWorkloadTagParams { + return &JobsServiceUpdateWorkloadTagParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewJobsServiceUpdateWorkloadTagParamsWithTimeout creates a new JobsServiceUpdateWorkloadTagParams object +// with the ability to set a timeout on a request. +func NewJobsServiceUpdateWorkloadTagParamsWithTimeout(timeout time.Duration) *JobsServiceUpdateWorkloadTagParams { + return &JobsServiceUpdateWorkloadTagParams{ + timeout: timeout, + } +} + +// NewJobsServiceUpdateWorkloadTagParamsWithContext creates a new JobsServiceUpdateWorkloadTagParams object +// with the ability to set a context for a request. +func NewJobsServiceUpdateWorkloadTagParamsWithContext(ctx context.Context) *JobsServiceUpdateWorkloadTagParams { + return &JobsServiceUpdateWorkloadTagParams{ + Context: ctx, + } +} + +// NewJobsServiceUpdateWorkloadTagParamsWithHTTPClient creates a new JobsServiceUpdateWorkloadTagParams object +// with the ability to set a custom HTTPClient for a request. +func NewJobsServiceUpdateWorkloadTagParamsWithHTTPClient(client *http.Client) *JobsServiceUpdateWorkloadTagParams { + return &JobsServiceUpdateWorkloadTagParams{ + HTTPClient: client, + } +} + +/* +JobsServiceUpdateWorkloadTagParams contains all the parameters to send to the API endpoint + + for the jobs service update workload tag operation. + + Typically these are written to a http.Request. +*/ +type JobsServiceUpdateWorkloadTagParams struct { + + // Body. + Body *models.JobsServiceUpdateWorkloadTagBody + + /* ID. + + Required + */ + ID string + + /* ProjectID. + + Required + */ + ProjectID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the jobs service update workload tag params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobsServiceUpdateWorkloadTagParams) WithDefaults() *JobsServiceUpdateWorkloadTagParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the jobs service update workload tag params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobsServiceUpdateWorkloadTagParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the jobs service update workload tag params +func (o *JobsServiceUpdateWorkloadTagParams) WithTimeout(timeout time.Duration) *JobsServiceUpdateWorkloadTagParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the jobs service update workload tag params +func (o *JobsServiceUpdateWorkloadTagParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the jobs service update workload tag params +func (o *JobsServiceUpdateWorkloadTagParams) WithContext(ctx context.Context) *JobsServiceUpdateWorkloadTagParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the jobs service update workload tag params +func (o *JobsServiceUpdateWorkloadTagParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the jobs service update workload tag params +func (o *JobsServiceUpdateWorkloadTagParams) WithHTTPClient(client *http.Client) *JobsServiceUpdateWorkloadTagParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the jobs service update workload tag params +func (o *JobsServiceUpdateWorkloadTagParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the jobs service update workload tag params +func (o *JobsServiceUpdateWorkloadTagParams) WithBody(body *models.JobsServiceUpdateWorkloadTagBody) *JobsServiceUpdateWorkloadTagParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the jobs service update workload tag params +func (o *JobsServiceUpdateWorkloadTagParams) SetBody(body *models.JobsServiceUpdateWorkloadTagBody) { + o.Body = body +} + +// WithID adds the id to the jobs service update workload tag params +func (o *JobsServiceUpdateWorkloadTagParams) WithID(id string) *JobsServiceUpdateWorkloadTagParams { + o.SetID(id) + return o +} + +// SetID adds the id to the jobs service update workload tag params +func (o *JobsServiceUpdateWorkloadTagParams) SetID(id string) { + o.ID = id +} + +// WithProjectID adds the projectID to the jobs service update workload tag params +func (o *JobsServiceUpdateWorkloadTagParams) WithProjectID(projectID string) *JobsServiceUpdateWorkloadTagParams { + o.SetProjectID(projectID) + return o +} + +// SetProjectID adds the projectId to the jobs service update workload tag params +func (o *JobsServiceUpdateWorkloadTagParams) SetProjectID(projectID string) { + o.ProjectID = projectID +} + +// WriteToRequest writes these params to a swagger request +func (o *JobsServiceUpdateWorkloadTagParams) 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 + } + + // 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/jobs_service/jobs_service_update_workload_tag_responses.go b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_update_workload_tag_responses.go new file mode 100644 index 000000000..51a102013 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/client/jobs_service/jobs_service_update_workload_tag_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 jobs_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" +) + +// JobsServiceUpdateWorkloadTagReader is a Reader for the JobsServiceUpdateWorkloadTag structure. +type JobsServiceUpdateWorkloadTagReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobsServiceUpdateWorkloadTagReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewJobsServiceUpdateWorkloadTagOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewJobsServiceUpdateWorkloadTagDefault(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 + } +} + +// NewJobsServiceUpdateWorkloadTagOK creates a JobsServiceUpdateWorkloadTagOK with default headers values +func NewJobsServiceUpdateWorkloadTagOK() *JobsServiceUpdateWorkloadTagOK { + return &JobsServiceUpdateWorkloadTagOK{} +} + +/* +JobsServiceUpdateWorkloadTagOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type JobsServiceUpdateWorkloadTagOK struct { + Payload *models.V1WorkloadTag +} + +// IsSuccess returns true when this jobs service update workload tag o k response has a 2xx status code +func (o *JobsServiceUpdateWorkloadTagOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this jobs service update workload tag o k response has a 3xx status code +func (o *JobsServiceUpdateWorkloadTagOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this jobs service update workload tag o k response has a 4xx status code +func (o *JobsServiceUpdateWorkloadTagOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this jobs service update workload tag o k response has a 5xx status code +func (o *JobsServiceUpdateWorkloadTagOK) IsServerError() bool { + return false +} + +// IsCode returns true when this jobs service update workload tag o k response a status code equal to that given +func (o *JobsServiceUpdateWorkloadTagOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the jobs service update workload tag o k response +func (o *JobsServiceUpdateWorkloadTagOK) Code() int { + return 200 +} + +func (o *JobsServiceUpdateWorkloadTagOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/projects/{projectId}/workload-tags/{id}][%d] jobsServiceUpdateWorkloadTagOK %s", 200, payload) +} + +func (o *JobsServiceUpdateWorkloadTagOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/projects/{projectId}/workload-tags/{id}][%d] jobsServiceUpdateWorkloadTagOK %s", 200, payload) +} + +func (o *JobsServiceUpdateWorkloadTagOK) GetPayload() *models.V1WorkloadTag { + return o.Payload +} + +func (o *JobsServiceUpdateWorkloadTagOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkloadTag) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewJobsServiceUpdateWorkloadTagDefault creates a JobsServiceUpdateWorkloadTagDefault with default headers values +func NewJobsServiceUpdateWorkloadTagDefault(code int) *JobsServiceUpdateWorkloadTagDefault { + return &JobsServiceUpdateWorkloadTagDefault{ + _statusCode: code, + } +} + +/* +JobsServiceUpdateWorkloadTagDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type JobsServiceUpdateWorkloadTagDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this jobs service update workload tag default response has a 2xx status code +func (o *JobsServiceUpdateWorkloadTagDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this jobs service update workload tag default response has a 3xx status code +func (o *JobsServiceUpdateWorkloadTagDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this jobs service update workload tag default response has a 4xx status code +func (o *JobsServiceUpdateWorkloadTagDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this jobs service update workload tag default response has a 5xx status code +func (o *JobsServiceUpdateWorkloadTagDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this jobs service update workload tag default response a status code equal to that given +func (o *JobsServiceUpdateWorkloadTagDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the jobs service update workload tag default response +func (o *JobsServiceUpdateWorkloadTagDefault) Code() int { + return o._statusCode +} + +func (o *JobsServiceUpdateWorkloadTagDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/projects/{projectId}/workload-tags/{id}][%d] JobsService_UpdateWorkloadTag default %s", o._statusCode, payload) +} + +func (o *JobsServiceUpdateWorkloadTagDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/projects/{projectId}/workload-tags/{id}][%d] JobsService_UpdateWorkloadTag default %s", o._statusCode, payload) +} + +func (o *JobsServiceUpdateWorkloadTagDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *JobsServiceUpdateWorkloadTagDefault) 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/user_service/user_service_list_notification_dialogs_parameters.go b/go/internal/lightningcloud/openapi/generated/client/user_service/user_service_list_notification_dialogs_parameters.go index b6409c84e..cb34b687a 100644 --- a/go/internal/lightningcloud/openapi/generated/client/user_service/user_service_list_notification_dialogs_parameters.go +++ b/go/internal/lightningcloud/openapi/generated/client/user_service/user_service_list_notification_dialogs_parameters.go @@ -66,6 +66,12 @@ UserServiceListNotificationDialogsParams contains all the parameters to send to */ type UserServiceListNotificationDialogsParams struct { + /* OrgID. + + org whose billing tier decides which targeted features are returned; empty returns only untargeted ones + */ + OrgID *string + /* Unseen. if true, only return unseen features @@ -125,6 +131,17 @@ func (o *UserServiceListNotificationDialogsParams) SetHTTPClient(client *http.Cl o.HTTPClient = client } +// WithOrgID adds the orgID to the user service list notification dialogs params +func (o *UserServiceListNotificationDialogsParams) WithOrgID(orgID *string) *UserServiceListNotificationDialogsParams { + o.SetOrgID(orgID) + return o +} + +// SetOrgID adds the orgId to the user service list notification dialogs params +func (o *UserServiceListNotificationDialogsParams) SetOrgID(orgID *string) { + o.OrgID = orgID +} + // WithUnseen adds the unseen to the user service list notification dialogs params func (o *UserServiceListNotificationDialogsParams) WithUnseen(unseen *bool) *UserServiceListNotificationDialogsParams { o.SetUnseen(unseen) @@ -144,6 +161,23 @@ func (o *UserServiceListNotificationDialogsParams) WriteToRequest(r runtime.Clie } 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.Unseen != nil { // query param unseen diff --git a/go/internal/lightningcloud/openapi/generated/models/cluster_service_renew_dockerstore_credentials_body.go b/go/internal/lightningcloud/openapi/generated/models/cluster_service_renew_dockerstore_credentials_body.go new file mode 100644 index 000000000..a9f1645a0 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/cluster_service_renew_dockerstore_credentials_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" +) + +// ClusterServiceRenewDockerstoreCredentialsBody cluster service renew dockerstore credentials body +// +// swagger:model ClusterServiceRenewDockerstoreCredentialsBody +type ClusterServiceRenewDockerstoreCredentialsBody struct { + + // manifest key + ManifestKey string `json:"manifestKey,omitempty"` +} + +// Validate validates this cluster service renew dockerstore credentials body +func (m *ClusterServiceRenewDockerstoreCredentialsBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this cluster service renew dockerstore credentials body based on context it is used +func (m *ClusterServiceRenewDockerstoreCredentialsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ClusterServiceRenewDockerstoreCredentialsBody) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClusterServiceRenewDockerstoreCredentialsBody) UnmarshalBinary(b []byte) error { + var res ClusterServiceRenewDockerstoreCredentialsBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_deployment_body.go b/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_deployment_body.go index cf10dca99..878449509 100644 --- a/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_deployment_body.go +++ b/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_deployment_body.go @@ -87,6 +87,9 @@ type JobsServiceCreateDeploymentBody struct { // The release strategy Strategy *V1DeploymentStrategy `json:"strategy,omitempty"` + // Tag names, created in the teamspace if they don't exist yet + Tags []string `json:"tags"` + // Kind-specific config. At most one should be set; unset defaults to vm-instances. VMInstancesConfig V1VMInstancesConfig `json:"vmInstancesConfig,omitempty"` } diff --git a/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_job_body.go b/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_job_body.go index 9bfdda3e7..e71187408 100644 --- a/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_job_body.go +++ b/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_job_body.go @@ -33,6 +33,9 @@ type JobsServiceCreateJobBody struct { // spec Spec *V1JobSpec `json:"spec,omitempty"` + + // Tag names, created in the teamspace if they don't exist yet + Tags []string `json:"tags"` } // Validate validates this jobs service create job body diff --git a/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_multi_machine_job_body.go b/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_multi_machine_job_body.go index bcb07e0ba..ff1424ae7 100644 --- a/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_multi_machine_job_body.go +++ b/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_multi_machine_job_body.go @@ -41,6 +41,9 @@ type JobsServiceCreateMultiMachineJobBody struct { // Compute + run configuration Spec *V1JobSpec `json:"spec,omitempty"` + // Tag names, created in the teamspace if they don't exist yet + Tags []string `json:"tags"` + // Optional ordered machine ids. Entry i is the required host for rank i. TargetMachineIds []string `json:"targetMachineIds"` } diff --git a/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_workload_tag_body.go b/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_workload_tag_body.go new file mode 100644 index 000000000..b00c7c80a --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/jobs_service_create_workload_tag_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" +) + +// JobsServiceCreateWorkloadTagBody jobs service create workload tag body +// +// swagger:model JobsServiceCreateWorkloadTagBody +type JobsServiceCreateWorkloadTagBody struct { + + // Required + Name string `json:"name,omitempty"` +} + +// Validate validates this jobs service create workload tag body +func (m *JobsServiceCreateWorkloadTagBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this jobs service create workload tag body based on context it is used +func (m *JobsServiceCreateWorkloadTagBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *JobsServiceCreateWorkloadTagBody) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JobsServiceCreateWorkloadTagBody) UnmarshalBinary(b []byte) error { + var res JobsServiceCreateWorkloadTagBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/jobs_service_set_workload_tags_body.go b/go/internal/lightningcloud/openapi/generated/models/jobs_service_set_workload_tags_body.go new file mode 100644 index 000000000..ae6c37b86 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/jobs_service_set_workload_tags_body.go @@ -0,0 +1,55 @@ +// 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" +) + +// JobsServiceSetWorkloadTagsBody SetWorkloadTags replaces the workload's tags with exactly these names. Names +// that don't exist in the teamspace yet are created. +// +// swagger:model JobsServiceSetWorkloadTagsBody +type JobsServiceSetWorkloadTagsBody struct { + + // tags + Tags []string `json:"tags"` +} + +// Validate validates this jobs service set workload tags body +func (m *JobsServiceSetWorkloadTagsBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this jobs service set workload tags body based on context it is used +func (m *JobsServiceSetWorkloadTagsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *JobsServiceSetWorkloadTagsBody) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JobsServiceSetWorkloadTagsBody) UnmarshalBinary(b []byte) error { + var res JobsServiceSetWorkloadTagsBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/jobs_service_update_workload_tag_body.go b/go/internal/lightningcloud/openapi/generated/models/jobs_service_update_workload_tag_body.go new file mode 100644 index 000000000..6dab42399 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/jobs_service_update_workload_tag_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" +) + +// JobsServiceUpdateWorkloadTagBody jobs service update workload tag body +// +// swagger:model JobsServiceUpdateWorkloadTagBody +type JobsServiceUpdateWorkloadTagBody struct { + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this jobs service update workload tag body +func (m *JobsServiceUpdateWorkloadTagBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this jobs service update workload tag body based on context it is used +func (m *JobsServiceUpdateWorkloadTagBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *JobsServiceUpdateWorkloadTagBody) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JobsServiceUpdateWorkloadTagBody) UnmarshalBinary(b []byte) error { + var res JobsServiceUpdateWorkloadTagBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_a_w_s_direct_v1.go b/go/internal/lightningcloud/openapi/generated/models/v1_a_w_s_direct_v1.go index ab76ef643..3625fb137 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_a_w_s_direct_v1.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_a_w_s_direct_v1.go @@ -70,6 +70,9 @@ type V1AWSDirectV1 struct { // The CIDR block prefix that will be used to create the private subnets for this cluster's VPC, defaults to 10.192 SubnetCIDRPrefix string `json:"subnetCIDRPrefix,omitempty"` + // Support local AZs for this cluster, e.g. us-west-2-phx-2a + SupportLocalAvailabilityZones bool `json:"supportLocalAvailabilityZones,omitempty"` + // Run instances from launch templates only (JPMC setup) UseLaunchTemplates bool `json:"useLaunchTemplates,omitempty"` diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_create_deployment_request.go b/go/internal/lightningcloud/openapi/generated/models/v1_create_deployment_request.go index 6ecb60057..e923b7312 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_create_deployment_request.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_create_deployment_request.go @@ -90,6 +90,9 @@ type V1CreateDeploymentRequest struct { // The release strategy Strategy *V1DeploymentStrategy `json:"strategy,omitempty"` + // Tag names, created in the teamspace if they don't exist yet + Tags []string `json:"tags"` + // Kind-specific config. At most one should be set; unset defaults to vm-instances. VMInstancesConfig V1VMInstancesConfig `json:"vmInstancesConfig,omitempty"` } diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_create_job_request.go b/go/internal/lightningcloud/openapi/generated/models/v1_create_job_request.go index 096e0cc7d..b4658c7e5 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_create_job_request.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_create_job_request.go @@ -36,6 +36,9 @@ type V1CreateJobRequest struct { // spec Spec *V1JobSpec `json:"spec,omitempty"` + + // Tag names, created in the teamspace if they don't exist yet + Tags []string `json:"tags"` } // Validate validates this v1 create job request diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_create_multi_machine_job_request.go b/go/internal/lightningcloud/openapi/generated/models/v1_create_multi_machine_job_request.go index f474fe9ac..92312e640 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_create_multi_machine_job_request.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_create_multi_machine_job_request.go @@ -44,6 +44,9 @@ type V1CreateMultiMachineJobRequest struct { // Compute + run configuration Spec *V1JobSpec `json:"spec,omitempty"` + // Tag names, created in the teamspace if they don't exist yet + Tags []string `json:"tags"` + // Optional ordered machine ids. Entry i is the required host for rank i. TargetMachineIds []string `json:"targetMachineIds"` } diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_delete_workload_tag_response.go b/go/internal/lightningcloud/openapi/generated/models/v1_delete_workload_tag_response.go new file mode 100644 index 000000000..0c48013ce --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_delete_workload_tag_response.go @@ -0,0 +1,15 @@ +// 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 + +// V1DeleteWorkloadTagResponse v1 delete workload tag response +// +// swagger:model v1DeleteWorkloadTagResponse +type V1DeleteWorkloadTagResponse any 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 c7451a2d4..96c0c3c0f 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_generic_job.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_generic_job.go @@ -12,6 +12,7 @@ package models import ( "context" stderrors "errors" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -52,6 +53,9 @@ type V1GenericJob struct { // state State string `json:"state,omitempty"` + // tags + Tags []*V1WorkloadTag `json:"tags"` + // type Type string `json:"type,omitempty"` @@ -71,6 +75,10 @@ func (m *V1GenericJob) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -112,6 +120,36 @@ func (m *V1GenericJob) validateSpec(formats strfmt.Registry) error { return nil } +func (m *V1GenericJob) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // ContextValidate validate this v1 generic job based on the context it is used func (m *V1GenericJob) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -120,6 +158,10 @@ func (m *V1GenericJob) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -151,6 +193,35 @@ func (m *V1GenericJob) contextValidateSpec(ctx context.Context, formats strfmt.R return nil } +func (m *V1GenericJob) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + + if swag.IsZero(m.Tags[i]) { // not required + return nil + } + + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // MarshalBinary interface implementation func (m *V1GenericJob) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_job.go b/go/internal/lightningcloud/openapi/generated/models/v1_job.go index 63bcbe903..37f516c68 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_job.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_job.go @@ -127,6 +127,9 @@ type V1Job struct { // Format: date-time StoppedAt strfmt.DateTime `json:"stoppedAt,omitempty"` + // Read only, set through SetWorkloadTags + Tags []*V1WorkloadTag `json:"tags"` + // User-generated startup timing measurements Timings map[string]V1JobTiming `json:"timings,omitempty"` @@ -200,6 +203,10 @@ func (m *V1Job) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateTimings(formats); err != nil { res = append(res, err) } @@ -382,6 +389,36 @@ func (m *V1Job) validateStoppedAt(formats strfmt.Registry) error { return nil } +func (m *V1Job) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + func (m *V1Job) validateTimings(formats strfmt.Registry) error { if swag.IsZero(m.Timings) { // not required return nil @@ -475,6 +512,10 @@ func (m *V1Job) ContextValidate(ctx context.Context, formats strfmt.Registry) er res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTimings(ctx, formats); err != nil { res = append(res, err) } @@ -568,6 +609,35 @@ func (m *V1Job) contextValidateSpec(ctx context.Context, formats strfmt.Registry return nil } +func (m *V1Job) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + + if swag.IsZero(m.Tags[i]) { // not required + return nil + } + + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + func (m *V1Job) contextValidateTimings(ctx context.Context, formats strfmt.Registry) error { for k := range m.Timings { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_job_spec.go b/go/internal/lightningcloud/openapi/generated/models/v1_job_spec.go index fa79f492b..e8d6e8b0a 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_job_spec.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_job_spec.go @@ -80,6 +80,9 @@ type V1JobSpec struct { // Read only InstanceType string `json:"instanceType,omitempty"` + // Whether to keep the machine running after the job is stopped + KeepMachineAfterStop bool `json:"keepMachineAfterStop,omitempty"` + // Allows us to bind a job to a machine or virtual machine MachineID string `json:"machineId,omitempty"` diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_list_workload_tags_response.go b/go/internal/lightningcloud/openapi/generated/models/v1_list_workload_tags_response.go new file mode 100644 index 000000000..cb278804a --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_list_workload_tags_response.go @@ -0,0 +1,134 @@ +// 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" +) + +// V1ListWorkloadTagsResponse v1 list workload tags response +// +// swagger:model v1ListWorkloadTagsResponse +type V1ListWorkloadTagsResponse struct { + + // tags + Tags []*V1WorkloadTag `json:"tags"` +} + +// Validate validates this v1 list workload tags response +func (m *V1ListWorkloadTagsResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ListWorkloadTagsResponse) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 list workload tags response based on the context it is used +func (m *V1ListWorkloadTagsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ListWorkloadTagsResponse) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + + if swag.IsZero(m.Tags[i]) { // not required + return nil + } + + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ListWorkloadTagsResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ListWorkloadTagsResponse) UnmarshalBinary(b []byte) error { + var res V1ListWorkloadTagsResponse + 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 fdd4528b6..06470b60d 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_machine.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_machine.go @@ -56,6 +56,12 @@ type V1Machine struct { // id ID string `json:"id,omitempty"` + // Out-of-band management address + IdracAddress string `json:"idracAddress,omitempty"` + + // Host VM subnet assigned by the provider + InbandSubnet string `json:"inbandSubnet,omitempty"` + // instance type InstanceType string `json:"instanceType,omitempty"` @@ -89,12 +95,18 @@ type V1Machine struct { // provider Provider string `json:"provider,omitempty"` + // Provider availability zone (for example, "C1") + ProviderAvailabilityZone string `json:"providerAvailabilityZone,omitempty"` + // Physical cluster, machines connected to the same switch or just a few hops away (high qos) ProviderFabricGroup string `json:"providerFabricGroup,omitempty"` // Where applicable ProviderInstanceID string `json:"providerInstanceId,omitempty"` + // Provider inventory node identifier + ProviderNodeID string `json:"providerNodeId,omitempty"` + // provider region ProviderRegion string `json:"providerRegion,omitempty"` diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_multi_machine_job.go b/go/internal/lightningcloud/openapi/generated/models/v1_multi_machine_job.go index 17e9d6624..806ab18d3 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_multi_machine_job.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_multi_machine_job.go @@ -12,6 +12,7 @@ package models import ( "context" stderrors "errors" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -76,6 +77,9 @@ type V1MultiMachineJob struct { // status Status *V1MultiMachineJobStatus `json:"status,omitempty"` + // Read only, set through SetWorkloadTags + Tags []*V1WorkloadTag `json:"tags"` + // Optional ordered machine ids. Entry i is the required host for rank i. TargetMachineIds []string `json:"targetMachineIds"` @@ -118,6 +122,10 @@ func (m *V1MultiMachineJob) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateUpdatedAt(formats); err != nil { res = append(res, err) } @@ -255,6 +263,36 @@ func (m *V1MultiMachineJob) validateStatus(formats strfmt.Registry) error { return nil } +func (m *V1MultiMachineJob) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + func (m *V1MultiMachineJob) validateUpdatedAt(formats strfmt.Registry) error { if swag.IsZero(m.UpdatedAt) { // not required return nil @@ -291,6 +329,10 @@ func (m *V1MultiMachineJob) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -422,6 +464,35 @@ func (m *V1MultiMachineJob) contextValidateStatus(ctx context.Context, formats s return nil } +func (m *V1MultiMachineJob) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + + if swag.IsZero(m.Tags[i]) { // not required + return nil + } + + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // MarshalBinary interface implementation func (m *V1MultiMachineJob) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_new_feature.go b/go/internal/lightningcloud/openapi/generated/models/v1_new_feature.go index bcb5bb8fa..4c9c7638e 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_new_feature.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_new_feature.go @@ -23,6 +23,9 @@ import ( // swagger:model v1NewFeature type V1NewFeature struct { + // badge text + BadgeText string `json:"badgeText,omitempty"` + // time to stop showing the banner // Format: date-time BannerEndTime strfmt.DateTime `json:"bannerEndTime,omitempty"` @@ -46,6 +49,9 @@ type V1NewFeature struct { // feature name FeatureName string `json:"featureName,omitempty"` + // hide close button + HideCloseButton bool `json:"hideCloseButton,omitempty"` + // list of highlights for the feature Highlights []string `json:"highlights"` @@ -61,6 +67,9 @@ type V1NewFeature struct { // placeholder meanwhile video is loading PosterURL string `json:"posterUrl,omitempty"` + // show on page load + ShowOnPageLoad bool `json:"showOnPageLoad,omitempty"` + // title Title string `json:"title,omitempty"` 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 7e373c614..1cf35be48 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_server_status.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_server_status.go @@ -90,6 +90,9 @@ type V1ServerStatus struct { // How many times the workload container has restarted WorkloadContainerRestartsCount string `json:"workloadContainerRestartsCount,omitempty"` + // How the guest workload was started: "docker", "runc", or "runsc". + WorkloadRuntime string `json:"workloadRuntime,omitempty"` + // workload state WorkloadState string `json:"workloadState,omitempty"` diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_set_workload_tags_response.go b/go/internal/lightningcloud/openapi/generated/models/v1_set_workload_tags_response.go new file mode 100644 index 000000000..6a021a101 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_set_workload_tags_response.go @@ -0,0 +1,134 @@ +// 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" +) + +// V1SetWorkloadTagsResponse v1 set workload tags response +// +// swagger:model v1SetWorkloadTagsResponse +type V1SetWorkloadTagsResponse struct { + + // tags + Tags []*V1WorkloadTag `json:"tags"` +} + +// Validate validates this v1 set workload tags response +func (m *V1SetWorkloadTagsResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SetWorkloadTagsResponse) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 set workload tags response based on the context it is used +func (m *V1SetWorkloadTagsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SetWorkloadTagsResponse) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + + if swag.IsZero(m.Tags[i]) { // not required + return nil + } + + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SetWorkloadTagsResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SetWorkloadTagsResponse) UnmarshalBinary(b []byte) error { + var res V1SetWorkloadTagsResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} 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 9410389b8..3f0b1536c 100644 --- a/go/internal/lightningcloud/openapi/generated/models/v1_vm_health.go +++ b/go/internal/lightningcloud/openapi/generated/models/v1_vm_health.go @@ -99,6 +99,13 @@ type V1VMHealth struct { // status details StatusDetails string `json:"statusDetails,omitempty"` + // Failure returned while checking the Studio SSH endpoint. + UserSSHError string `json:"userSshError,omitempty"` + + // Studio SSH endpoint reachability on guest port 2222. This is separate from + // ssh_reachable, which checks the guest's administrative SSH service on port 22. + UserSSHReachable bool `json:"userSshReachable,omitempty"` + // vm Id VMID string `json:"vmId,omitempty"` diff --git a/go/internal/lightningcloud/openapi/generated/models/v1_workload_tag.go b/go/internal/lightningcloud/openapi/generated/models/v1_workload_tag.go new file mode 100644 index 000000000..f2cbf31a2 --- /dev/null +++ b/go/internal/lightningcloud/openapi/generated/models/v1_workload_tag.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" +) + +// V1WorkloadTag v1 workload tag +// +// swagger:model v1WorkloadTag +type V1WorkloadTag struct { + + // created at + // Format: date-time + CreatedAt strfmt.DateTime `json:"createdAt,omitempty"` + + // created by + CreatedBy string `json:"createdBy,omitempty"` + + // id + ID string `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // project Id + ProjectID string `json:"projectId,omitempty"` + + // usage count + UsageCount string `json:"usageCount,omitempty"` +} + +// Validate validates this v1 workload tag +func (m *V1WorkloadTag) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreatedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkloadTag) 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 +} + +// ContextValidate validates this v1 workload tag based on context it is used +func (m *V1WorkloadTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkloadTag) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkloadTag) UnmarshalBinary(b []byte) error { + var res V1WorkloadTag + 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 b6b285ec0..200bfdef4 100644 --- a/js/src/lightning_cloud/openapi/SandboxesService.ts +++ b/js/src/lightning_cloud/openapi/SandboxesService.ts @@ -144,6 +144,7 @@ export class SandboxesService< * @default "SANDBOX_PURPOSE_UNSPECIFIED" */ purpose?: "SANDBOX_PURPOSE_UNSPECIFIED" | "SANDBOX_PURPOSE_NOTEBOOK"; + sourceSandboxId?: string; }, params: RequestParams = {}, ) => diff --git a/python/lightning_sdk/lightning_cloud/openapi/__init__.py b/python/lightning_sdk/lightning_cloud/openapi/__init__.py index 6cb056a0d..d534ea01e 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/__init__.py +++ b/python/lightning_sdk/lightning_cloud/openapi/__init__.py @@ -128,6 +128,7 @@ from lightning_sdk.lightning_cloud.openapi.models.cluster_service_provision_machine_body import ClusterServiceProvisionMachineBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_purchase_capacity_block_body import ClusterServicePurchaseCapacityBlockBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_purchase_org_capacity_block_body import ClusterServicePurchaseOrgCapacityBlockBody +from lightning_sdk.lightning_cloud.openapi.models.cluster_service_renew_dockerstore_credentials_body import ClusterServiceRenewDockerstoreCredentialsBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_renew_sandbox_snapshot_credentials_body import ClusterServiceRenewSandboxSnapshotCredentialsBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_report_machine_system_metrics_body import ClusterServiceReportMachineSystemMetricsBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_report_sandbox_resource_metrics_body import ClusterServiceReportSandboxResourceMetricsBody @@ -169,6 +170,7 @@ from lightning_sdk.lightning_cloud.openapi.models.jobs_service_create_deployment_body import JobsServiceCreateDeploymentBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_create_job_body import JobsServiceCreateJobBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_create_multi_machine_job_body import JobsServiceCreateMultiMachineJobBody +from lightning_sdk.lightning_cloud.openapi.models.jobs_service_create_workload_tag_body import JobsServiceCreateWorkloadTagBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_duplicate_deployment_body import JobsServiceDuplicateDeploymentBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_reload_deployment_weights_body import JobsServiceReloadDeploymentWeightsBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_report_deployment_routing_telemetry_body import JobsServiceReportDeploymentRoutingTelemetryBody @@ -176,6 +178,7 @@ from lightning_sdk.lightning_cloud.openapi.models.jobs_service_report_logs_activity_body import JobsServiceReportLogsActivityBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_report_restart_timings_body import JobsServiceReportRestartTimingsBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_restore_deployment_release_body import JobsServiceRestoreDeploymentReleaseBody +from lightning_sdk.lightning_cloud.openapi.models.jobs_service_set_workload_tags_body import JobsServiceSetWorkloadTagsBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_deployment_alerting_event_body import JobsServiceUpdateDeploymentAlertingEventBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_deployment_alerting_events_bulk_body import JobsServiceUpdateDeploymentAlertingEventsBulkBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_deployment_alerting_policy_body import JobsServiceUpdateDeploymentAlertingPolicyBody @@ -185,6 +188,7 @@ from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_job_visibility_body import JobsServiceUpdateJobVisibilityBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_multi_machine_job_body import JobsServiceUpdateMultiMachineJobBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_org_deployment_visibility_body import JobsServiceUpdateOrgDeploymentVisibilityBody +from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_workload_tag_body import JobsServiceUpdateWorkloadTagBody from lightning_sdk.lightning_cloud.openapi.models.k8_s_cluster_service_create_kubernetes_job_body import K8SClusterServiceCreateKubernetesJobBody from lightning_sdk.lightning_cloud.openapi.models.k8_s_cluster_service_create_kubernetes_pod_event_body import K8SClusterServiceCreateKubernetesPodEventBody from lightning_sdk.lightning_cloud.openapi.models.k8_s_cluster_service_create_kubernetes_template_body import K8SClusterServiceCreateKubernetesTemplateBody @@ -547,6 +551,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_shared_artifact_response import V1DeleteSharedArtifactResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_shared_metrics_stream_response import V1DeleteSharedMetricsStreamResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_user_slurm_job_response import V1DeleteUserSLURMJobResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_delete_workload_tag_response import V1DeleteWorkloadTagResponse from lightning_sdk.lightning_cloud.openapi.models.v1_dependency_cache_state import V1DependencyCacheState from lightning_sdk.lightning_cloud.openapi.models.v1_dependency_file_info import V1DependencyFileInfo from lightning_sdk.lightning_cloud.openapi.models.v1_deployment import V1Deployment @@ -636,6 +641,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_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 from lightning_sdk.lightning_cloud.openapi.models.v1_get_cloud_space_cold_start_metrics_stats_response import V1GetCloudSpaceColdStartMetricsStatsResponse @@ -687,6 +693,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_resource_sessions_response import V1GetResourceSessionsResponse 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 @@ -917,6 +924,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_shared_artifacts_response import V1ListSharedArtifactsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_storage_transfers_response import V1ListStorageTransfersResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_user_slurm_jobs_response import V1ListUserSLURMJobsResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_list_workload_tags_response import V1ListWorkloadTagsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_lit_logger_media import V1LitLoggerMedia from lightning_sdk.lightning_cloud.openapi.models.v1_lit_registry_artifact import V1LitRegistryArtifact from lightning_sdk.lightning_cloud.openapi.models.v1_lit_registry_project import V1LitRegistryProject @@ -992,6 +1000,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_nv_link_status import V1NVLinkStatus from lightning_sdk.lightning_cloud.openapi.models.v1_nv_switch_fatal import V1NVSwitchFatal from lightning_sdk.lightning_cloud.openapi.models.v1_nv_switch_fatal_affected_vm import V1NVSwitchFatalAffectedVM +from lightning_sdk.lightning_cloud.openapi.models.v1_named_filter_value import V1NamedFilterValue from lightning_sdk.lightning_cloud.openapi.models.v1_named_get_logger_metrics import V1NamedGetLoggerMetrics from lightning_sdk.lightning_cloud.openapi.models.v1_namespace_metrics import V1NamespaceMetrics from lightning_sdk.lightning_cloud.openapi.models.v1_nebius_direct_v1 import V1NebiusDirectV1 @@ -1177,6 +1186,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_service_health import V1ServiceHealth 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 from lightning_sdk.lightning_cloud.openapi.models.v1_setup_confirmed_ssh_public_key_response import V1SetupConfirmedSSHPublicKeyResponse from lightning_sdk.lightning_cloud.openapi.models.v1_setup_data_connection_response import V1SetupDataConnectionResponse from lightning_sdk.lightning_cloud.openapi.models.v1_shared_artifact import V1SharedArtifact @@ -1236,8 +1246,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_transfer_org_balance_response import V1TransferOrgBalanceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_transfer_org_member_resources_response import V1TransferOrgMemberResourcesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_transfer_project_balance_response import V1TransferProjectBalanceResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_transfer_user_balance_request import V1TransferUserBalanceRequest -from lightning_sdk.lightning_cloud.openapi.models.v1_transfer_user_balance_response import V1TransferUserBalanceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_unpublish_cloud_space_response import V1UnpublishCloudSpaceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_update_billing_subscription_request import V1UpdateBillingSubscriptionRequest from lightning_sdk.lightning_cloud.openapi.models.v1_update_cloud_space_collab_response import V1UpdateCloudSpaceCollabResponse @@ -1311,6 +1319,7 @@ 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_tag import V1WorkloadTag 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/billing_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/billing_service_api.py index 28b6aa463..c59027bdb 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,99 @@ 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_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 + + 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_values(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 + :return: V1GetActivityFilterValuesResponse + 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_values_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.billing_service_get_activity_filter_values_with_http_info(**kwargs) # noqa: E501 + return data + + def billing_service_get_activity_filter_values_with_http_info(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 + + 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_values_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 + :return: V1GetActivityFilterValuesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org_id', '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 billing_service_get_activity_filter_values" % 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 + + 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', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1GetActivityFilterValuesResponse', # 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_assistant_session_daily_aggregated(self, **kwargs) -> 'V1GetAssistantSessionDailyAggregatedResponse': # noqa: E501 """Aggregated assistant session endpoint to get credits spending information. Provides credits consumption data by particular project according to filters given. # noqa: E501 @@ -1324,6 +1417,115 @@ def billing_service_get_project_compute_usage_with_http_info(self, project_id: ' _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def billing_service_get_resource_sessions(self, **kwargs) -> 'V1GetResourceSessionsResponse': # noqa: E501 + """Returns the individual billing sessions for a single resource, paginated by started_at. Used to drill down from an aggregated rollup usage report row into the sessions that make it up. # 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_resource_sessions(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: + :param str resource_id: + :param str resource_type: + :param int limit: page size; UI should always send one + :param datetime search_after: only sessions strictly after this started_at + :param str search_after_session_id: tie-break when sessions share started_at + :return: V1GetResourceSessionsResponse + 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_resource_sessions_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.billing_service_get_resource_sessions_with_http_info(**kwargs) # noqa: E501 + return data + + def billing_service_get_resource_sessions_with_http_info(self, **kwargs) -> 'V1GetResourceSessionsResponse': # noqa: E501 + """Returns the individual billing sessions for a single resource, paginated by started_at. Used to drill down from an aggregated rollup usage report row into the sessions that make it up. # 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_resource_sessions_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: + :param str resource_id: + :param str resource_type: + :param int limit: page size; UI should always send one + :param datetime search_after: only sessions strictly after this started_at + :param str search_after_session_id: tie-break when sessions share started_at + :return: V1GetResourceSessionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'resource_id', 'resource_type', 'limit', 'search_after', 'search_after_session_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 billing_service_get_resource_sessions" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'project_id' in params: + query_params.append(('projectId', params['project_id'])) # noqa: E501 + if 'resource_id' in params: + query_params.append(('resourceId', params['resource_id'])) # noqa: E501 + if 'resource_type' in params: + query_params.append(('resourceType', params['resource_type'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + if 'search_after' in params: + query_params.append(('searchAfter', params['search_after'])) # noqa: E501 + if 'search_after_session_id' in params: + query_params.append(('searchAfterSessionId', params['search_after_session_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/billing/resource-sessions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1GetResourceSessionsResponse', # 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_rollup_usage_report(self, **kwargs) -> 'V1UsageReport': # noqa: E501 """V2 Usage report endpoint to get credits spending information. Provides credits consumption data by particular project according to filters given. Uses the new daily rollup table # noqa: E501 @@ -1346,6 +1548,8 @@ def billing_service_get_rollup_usage_report(self, **kwargs) -> 'V1UsageReport': :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: resource type is necessary since daily rollup table is keyed on resource_id, not billable_resource_id, which is not unique across different resource types 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 bool include_unassigned_project: Rows in the daily rollup table can have an empty project_id/user_id (some legitimately, some due to bugs upstream). By default such rows are neither specifically included nor excluded by project_id/user_id filters (see below). Optional, only used by the daily rollup billing activity endpoint. If project_id is also set, also include rows with no project_id, in addition to the matched project. If project_id is not set, restricts results to rows with no project_id. + :param bool include_unassigned_user: Optional, only used by the daily rollup billing activity endpoint. If user_id is also set, also include rows with no user_id, in addition to the matched user. If user_id is not set, restricts results to rows with no user_id. :return: V1UsageReport If the method is called asynchronously, returns the request thread. @@ -1379,12 +1583,14 @@ def billing_service_get_rollup_usage_report_with_http_info(self, **kwargs) -> 'V :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: resource type is necessary since daily rollup table is keyed on resource_id, not billable_resource_id, which is not unique across different resource types 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 bool include_unassigned_project: Rows in the daily rollup table can have an empty project_id/user_id (some legitimately, some due to bugs upstream). By default such rows are neither specifically included nor excluded by project_id/user_id filters (see below). Optional, only used by the daily rollup billing activity endpoint. If project_id is also set, also include rows with no project_id, in addition to the matched project. If project_id is not set, restricts results to rows with no project_id. + :param bool include_unassigned_user: Optional, only used by the daily rollup billing activity endpoint. If user_id is also set, also include rows with no user_id, in addition to the matched user. If user_id is not set, restricts results to rows with no user_id. :return: V1UsageReport If the method is called asynchronously, returns the request thread. """ - all_params = ['org_id', 'project_id', 'cluster_id', 'resource_type', 'resource_id', '_from', 'to', 'user_id', 'time_zone', 'limit', 'search_after', 'search_after_resource_id', 'search_after_resource_type'] # noqa: E501 + all_params = ['org_id', 'project_id', 'cluster_id', 'resource_type', 'resource_id', '_from', 'to', 'user_id', 'time_zone', 'limit', 'search_after', 'search_after_resource_id', 'search_after_resource_type', 'include_unassigned_project', 'include_unassigned_user'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1431,6 +1637,10 @@ def billing_service_get_rollup_usage_report_with_http_info(self, **kwargs) -> 'V 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 'include_unassigned_project' in params: + query_params.append(('includeUnassignedProject', params['include_unassigned_project'])) # noqa: E501 + if 'include_unassigned_user' in params: + query_params.append(('includeUnassignedUser', params['include_unassigned_user'])) # noqa: E501 header_params = {} @@ -1693,6 +1903,8 @@ def billing_service_get_usage_report(self, **kwargs) -> 'V1UsageReport': # noqa :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: resource type is necessary since daily rollup table is keyed on resource_id, not billable_resource_id, which is not unique across different resource types 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 bool include_unassigned_project: Rows in the daily rollup table can have an empty project_id/user_id (some legitimately, some due to bugs upstream). By default such rows are neither specifically included nor excluded by project_id/user_id filters (see below). Optional, only used by the daily rollup billing activity endpoint. If project_id is also set, also include rows with no project_id, in addition to the matched project. If project_id is not set, restricts results to rows with no project_id. + :param bool include_unassigned_user: Optional, only used by the daily rollup billing activity endpoint. If user_id is also set, also include rows with no user_id, in addition to the matched user. If user_id is not set, restricts results to rows with no user_id. :return: V1UsageReport If the method is called asynchronously, returns the request thread. @@ -1726,12 +1938,14 @@ def billing_service_get_usage_report_with_http_info(self, **kwargs) -> 'V1UsageR :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: resource type is necessary since daily rollup table is keyed on resource_id, not billable_resource_id, which is not unique across different resource types 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 bool include_unassigned_project: Rows in the daily rollup table can have an empty project_id/user_id (some legitimately, some due to bugs upstream). By default such rows are neither specifically included nor excluded by project_id/user_id filters (see below). Optional, only used by the daily rollup billing activity endpoint. If project_id is also set, also include rows with no project_id, in addition to the matched project. If project_id is not set, restricts results to rows with no project_id. + :param bool include_unassigned_user: Optional, only used by the daily rollup billing activity endpoint. If user_id is also set, also include rows with no user_id, in addition to the matched user. If user_id is not set, restricts results to rows with no user_id. :return: V1UsageReport If the method is called asynchronously, returns the request thread. """ - all_params = ['org_id', 'project_id', 'cluster_id', 'resource_type', 'resource_id', '_from', 'to', 'user_id', 'time_zone', 'limit', 'search_after', 'search_after_resource_id', 'search_after_resource_type'] # noqa: E501 + all_params = ['org_id', 'project_id', 'cluster_id', 'resource_type', 'resource_id', '_from', 'to', 'user_id', 'time_zone', 'limit', 'search_after', 'search_after_resource_id', 'search_after_resource_type', 'include_unassigned_project', 'include_unassigned_user'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1778,6 +1992,10 @@ def billing_service_get_usage_report_with_http_info(self, **kwargs) -> 'V1UsageR 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 'include_unassigned_project' in params: + query_params.append(('includeUnassignedProject', params['include_unassigned_project'])) # noqa: E501 + if 'include_unassigned_user' in params: + query_params.append(('includeUnassignedUser', params['include_unassigned_user'])) # noqa: E501 header_params = {} @@ -2487,103 +2705,6 @@ def billing_service_transfer_project_balance_with_http_info(self, body: 'Billing _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def billing_service_transfer_user_balance(self, body: 'V1TransferUserBalanceRequest', **kwargs) -> 'V1TransferUserBalanceResponse': # noqa: E501 - """billing_service_transfer_user_balance # 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_transfer_user_balance(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param V1TransferUserBalanceRequest body: (required) - :return: V1TransferUserBalanceResponse - 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_transfer_user_balance_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.billing_service_transfer_user_balance_with_http_info(body, **kwargs) # noqa: E501 - return data - - def billing_service_transfer_user_balance_with_http_info(self, body: 'V1TransferUserBalanceRequest', **kwargs) -> 'V1TransferUserBalanceResponse': # noqa: E501 - """billing_service_transfer_user_balance # 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_transfer_user_balance_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param V1TransferUserBalanceRequest body: (required) - :return: V1TransferUserBalanceResponse - 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_transfer_user_balance" % 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_transfer_user_balance`") # 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/users/billing/transfer', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1TransferUserBalanceResponse', # 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_update_billing_subscription(self, body: 'V1UpdateBillingSubscriptionRequest', **kwargs) -> 'V1BillingSubscription': # noqa: E501 """billing_service_update_billing_subscription # 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 b1230d912..b2d3cb67d 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 @@ -5791,6 +5791,111 @@ def cluster_service_purchase_org_capacity_block_with_http_info(self, body: 'Clus _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def cluster_service_renew_dockerstore_credentials(self, body: 'ClusterServiceRenewDockerstoreCredentialsBody', server_id: 'str', **kwargs) -> 'V1RenewSandboxSnapshotCredentialsResponse': # noqa: E501 + """cluster_service_renew_dockerstore_credentials # 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_renew_dockerstore_credentials(body, server_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ClusterServiceRenewDockerstoreCredentialsBody body: (required) + :param str server_id: (required) + :return: V1RenewSandboxSnapshotCredentialsResponse + 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_renew_dockerstore_credentials_with_http_info(body, server_id, **kwargs) # noqa: E501 + else: + (data) = self.cluster_service_renew_dockerstore_credentials_with_http_info(body, server_id, **kwargs) # noqa: E501 + return data + + def cluster_service_renew_dockerstore_credentials_with_http_info(self, body: 'ClusterServiceRenewDockerstoreCredentialsBody', server_id: 'str', **kwargs) -> 'V1RenewSandboxSnapshotCredentialsResponse': # noqa: E501 + """cluster_service_renew_dockerstore_credentials # 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_renew_dockerstore_credentials_with_http_info(body, server_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ClusterServiceRenewDockerstoreCredentialsBody body: (required) + :param str server_id: (required) + :return: V1RenewSandboxSnapshotCredentialsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'server_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_renew_dockerstore_credentials" % 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_renew_dockerstore_credentials`") # noqa: E501 + # verify the required parameter 'server_id' is set + if ('server_id' not in params or + params['server_id'] is None): + raise ValueError("Missing the required parameter `server_id` when calling `cluster_service_renew_dockerstore_credentials`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server_id' in params: + path_params['serverId'] = params['server_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/servers/{serverId}/dockerstore-credentials', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1RenewSandboxSnapshotCredentialsResponse', # 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_renew_sandbox_snapshot_credentials(self, body: 'ClusterServiceRenewSandboxSnapshotCredentialsBody', cluster_id: 'str', machine_id: 'str', **kwargs) -> 'V1RenewSandboxSnapshotCredentialsResponse': # noqa: E501 """Re-mints scoped, short-lived object-store read credentials for a snapshot so a baremetal agent doing a lazy (FUSE-lower) restore can keep fetching cold blobs after the credentials issued at restore time expire. The agent re-calls this before expiry. Auth mirrors MintSandboxLogsToken: a valid machine bearer token, and the machine must belong to the named cluster. # 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 138b69c76..8ada66fa0 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 @@ -596,6 +596,111 @@ def jobs_service_create_multi_machine_job_with_http_info(self, body: 'JobsServic _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def jobs_service_create_workload_tag(self, body: 'JobsServiceCreateWorkloadTagBody', project_id: 'str', **kwargs) -> 'V1WorkloadTag': # noqa: E501 + """jobs_service_create_workload_tag # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.jobs_service_create_workload_tag(body, project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param JobsServiceCreateWorkloadTagBody body: (required) + :param str project_id: Required (required) + :return: V1WorkloadTag + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.jobs_service_create_workload_tag_with_http_info(body, project_id, **kwargs) # noqa: E501 + else: + (data) = self.jobs_service_create_workload_tag_with_http_info(body, project_id, **kwargs) # noqa: E501 + return data + + def jobs_service_create_workload_tag_with_http_info(self, body: 'JobsServiceCreateWorkloadTagBody', project_id: 'str', **kwargs) -> 'V1WorkloadTag': # noqa: E501 + """jobs_service_create_workload_tag # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.jobs_service_create_workload_tag_with_http_info(body, project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param JobsServiceCreateWorkloadTagBody body: (required) + :param str project_id: Required (required) + :return: V1WorkloadTag + 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 jobs_service_create_workload_tag" % 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 `jobs_service_create_workload_tag`") # 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 `jobs_service_create_workload_tag`") # 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}/workload-tags', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1WorkloadTag', # 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 jobs_service_delete_deployment(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteDeploymentResponse': # noqa: E501 """jobs_service_delete_deployment # noqa: E501 @@ -1125,6 +1230,107 @@ def jobs_service_delete_multi_machine_job_with_http_info(self, project_id: 'str' _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def jobs_service_delete_workload_tag(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteWorkloadTagResponse': # noqa: E501 + """jobs_service_delete_workload_tag # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.jobs_service_delete_workload_tag(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: Required (required) + :param str id: Required (required) + :return: V1DeleteWorkloadTagResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.jobs_service_delete_workload_tag_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.jobs_service_delete_workload_tag_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def jobs_service_delete_workload_tag_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteWorkloadTagResponse': # noqa: E501 + """jobs_service_delete_workload_tag # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.jobs_service_delete_workload_tag_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: Required (required) + :param str id: Required (required) + :return: V1DeleteWorkloadTagResponse + 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 jobs_service_delete_workload_tag" % 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 `jobs_service_delete_workload_tag`") # 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 `jobs_service_delete_workload_tag`") # 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}/workload-tags/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1DeleteWorkloadTagResponse', # 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 jobs_service_download_job_logs(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DownloadJobLogsResponse': # noqa: E501 """jobs_service_download_job_logs # noqa: E501 @@ -3552,6 +3758,8 @@ def jobs_service_list_all_jobs(self, **kwargs) -> 'V1ListAllJobsResponse': # no :param str user_id: :param str sort_by: Column name to sort by :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 :return: V1ListAllJobsResponse If the method is called asynchronously, returns the request thread. @@ -3582,12 +3790,14 @@ def jobs_service_list_all_jobs_with_http_info(self, **kwargs) -> 'V1ListAllJobsR :param str user_id: :param str sort_by: Column name to sort by :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 :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', 'sort_by', 'sort_order'] # noqa: E501 + all_params = ['project_id', 'page_token', 'limit', 'search_query', 'states', 'job_types', 'org_id', 'user_id', 'sort_by', 'sort_order', 'tag_ids', 'match_all_tags'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3630,6 +3840,11 @@ def jobs_service_list_all_jobs_with_http_info(self, **kwargs) -> 'V1ListAllJobsR query_params.append(('sortBy', params['sort_by'])) # noqa: E501 if 'sort_order' in params: query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + if 'tag_ids' in params: + query_params.append(('tagIds', params['tag_ids'])) # noqa: E501 + collection_formats['tagIds'] = 'multi' # noqa: E501 + if 'match_all_tags' in params: + query_params.append(('matchAllTags', params['match_all_tags'])) # noqa: E501 header_params = {} @@ -4493,6 +4708,7 @@ def jobs_service_list_jobs(self, project_id: 'str', **kwargs) -> 'V1ListJobsResp :param str state: For example, running, stopped, completed, failed :param str sort_by: Column name to sort by :param str sort_order: ascending or descending + :param list[str] tag_ids: Match any of these tags :return: V1ListJobsResponse If the method is called asynchronously, returns the request thread. @@ -4524,12 +4740,13 @@ def jobs_service_list_jobs_with_http_info(self, project_id: 'str', **kwargs) -> :param str state: For example, running, stopped, completed, failed :param str sort_by: Column name to sort by :param str sort_order: ascending or descending + :param list[str] tag_ids: Match any of these tags :return: V1ListJobsResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'cloudspace_id', 'user_id', 'deployment_id', 'multi_machine_job_id', 'standalone', 'page_token', 'limit', 'state', 'sort_by', 'sort_order'] # noqa: E501 + all_params = ['project_id', 'cloudspace_id', 'user_id', 'deployment_id', 'multi_machine_job_id', 'standalone', 'page_token', 'limit', 'state', 'sort_by', 'sort_order', 'tag_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -4576,6 +4793,9 @@ def jobs_service_list_jobs_with_http_info(self, project_id: 'str', **kwargs) -> query_params.append(('sortBy', params['sort_by'])) # noqa: E501 if 'sort_order' in params: query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + if 'tag_ids' in params: + query_params.append(('tagIds', params['tag_ids'])) # noqa: E501 + collection_formats['tagIds'] = 'multi' # noqa: E501 header_params = {} @@ -4913,6 +5133,103 @@ def jobs_service_list_org_deployments_with_http_info(self, org_id: 'str', **kwar _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def jobs_service_list_workload_tags(self, project_id: 'str', **kwargs) -> 'V1ListWorkloadTagsResponse': # noqa: E501 + """jobs_service_list_workload_tags # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.jobs_service_list_workload_tags(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: Required (required) + :param bool include_usage_counts: + :return: V1ListWorkloadTagsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.jobs_service_list_workload_tags_with_http_info(project_id, **kwargs) # noqa: E501 + else: + (data) = self.jobs_service_list_workload_tags_with_http_info(project_id, **kwargs) # noqa: E501 + return data + + def jobs_service_list_workload_tags_with_http_info(self, project_id: 'str', **kwargs) -> 'V1ListWorkloadTagsResponse': # noqa: E501 + """jobs_service_list_workload_tags # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.jobs_service_list_workload_tags_with_http_info(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: Required (required) + :param bool include_usage_counts: + :return: V1ListWorkloadTagsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'include_usage_counts'] # 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 jobs_service_list_workload_tags" % 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 `jobs_service_list_workload_tags`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + if 'include_usage_counts' in params: + query_params.append(('includeUsageCounts', params['include_usage_counts'])) # 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}/workload-tags', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1ListWorkloadTagsResponse', # 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 jobs_service_reload_deployment_weights(self, body: 'JobsServiceReloadDeploymentWeightsBody', project_id: 'str', deployment_id: 'str', **kwargs) -> 'V1ReloadDeploymentWeightsResponse': # noqa: E501 """Weight reload (BYOM sidecar) # noqa: E501 @@ -5728,6 +6045,127 @@ def jobs_service_search_job_logs_with_http_info(self, project_id: 'str', **kwarg _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def jobs_service_set_workload_tags(self, body: 'JobsServiceSetWorkloadTagsBody', project_id: 'str', workload_type: 'str', workload_id: 'str', **kwargs) -> 'V1SetWorkloadTagsResponse': # noqa: E501 + """jobs_service_set_workload_tags # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.jobs_service_set_workload_tags(body, project_id, workload_type, workload_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param JobsServiceSetWorkloadTagsBody body: (required) + :param str project_id: Required (required) + :param str workload_type: Required, one of the `type` values ListAllJobs returns (required) + :param str workload_id: Required (required) + :return: V1SetWorkloadTagsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.jobs_service_set_workload_tags_with_http_info(body, project_id, workload_type, workload_id, **kwargs) # noqa: E501 + else: + (data) = self.jobs_service_set_workload_tags_with_http_info(body, project_id, workload_type, workload_id, **kwargs) # noqa: E501 + return data + + def jobs_service_set_workload_tags_with_http_info(self, body: 'JobsServiceSetWorkloadTagsBody', project_id: 'str', workload_type: 'str', workload_id: 'str', **kwargs) -> 'V1SetWorkloadTagsResponse': # noqa: E501 + """jobs_service_set_workload_tags # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.jobs_service_set_workload_tags_with_http_info(body, project_id, workload_type, workload_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param JobsServiceSetWorkloadTagsBody body: (required) + :param str project_id: Required (required) + :param str workload_type: Required, one of the `type` values ListAllJobs returns (required) + :param str workload_id: Required (required) + :return: V1SetWorkloadTagsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'project_id', 'workload_type', 'workload_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 jobs_service_set_workload_tags" % 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 `jobs_service_set_workload_tags`") # 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 `jobs_service_set_workload_tags`") # noqa: E501 + # verify the required parameter 'workload_type' is set + if ('workload_type' not in params or + params['workload_type'] is None): + raise ValueError("Missing the required parameter `workload_type` when calling `jobs_service_set_workload_tags`") # noqa: E501 + # verify the required parameter 'workload_id' is set + if ('workload_id' not in params or + params['workload_id'] is None): + raise ValueError("Missing the required parameter `workload_id` when calling `jobs_service_set_workload_tags`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'workload_type' in params: + path_params['workloadType'] = params['workload_type'] # noqa: E501 + if 'workload_id' in params: + path_params['workloadId'] = params['workload_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}/workloads/{workloadType}/{workloadId}/tags', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1SetWorkloadTagsResponse', # 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 jobs_service_update_deployment(self, body: 'JobsServiceUpdateDeploymentBody', project_id: 'str', id: 'str', **kwargs) -> 'V1Deployment': # noqa: E501 """jobs_service_update_deployment # noqa: E501 @@ -6753,6 +7191,119 @@ def jobs_service_update_org_deployment_visibility_with_http_info(self, body: 'Jo _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def jobs_service_update_workload_tag(self, body: 'JobsServiceUpdateWorkloadTagBody', project_id: 'str', id: 'str', **kwargs) -> 'V1WorkloadTag': # noqa: E501 + """jobs_service_update_workload_tag # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.jobs_service_update_workload_tag(body, project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param JobsServiceUpdateWorkloadTagBody body: (required) + :param str project_id: Required (required) + :param str id: Required (required) + :return: V1WorkloadTag + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.jobs_service_update_workload_tag_with_http_info(body, project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.jobs_service_update_workload_tag_with_http_info(body, project_id, id, **kwargs) # noqa: E501 + return data + + def jobs_service_update_workload_tag_with_http_info(self, body: 'JobsServiceUpdateWorkloadTagBody', project_id: 'str', id: 'str', **kwargs) -> 'V1WorkloadTag': # noqa: E501 + """jobs_service_update_workload_tag # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.jobs_service_update_workload_tag_with_http_info(body, project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param JobsServiceUpdateWorkloadTagBody body: (required) + :param str project_id: Required (required) + :param str id: Required (required) + :return: V1WorkloadTag + 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 jobs_service_update_workload_tag" % 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 `jobs_service_update_workload_tag`") # 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 `jobs_service_update_workload_tag`") # 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 `jobs_service_update_workload_tag`") # 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}/workload-tags/{id}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1WorkloadTag', # 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 jobs_service_validate_deployment_image(self, body: 'V1ValidateDeploymentImageRequest', **kwargs) -> 'V1ValidateDeploymentImageResponse': # noqa: E501 """Job deployments # 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 8a65c5ae3..08fb0a842 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 @@ -1913,6 +1913,7 @@ def sandboxes_service_list_sandbox_snapshots(self, **kwargs) -> 'V1ListSandboxSn :param str name: :param str sort_order: :param str purpose: Purpose filter, matching ListSandboxesRequest.purpose semantics: unset returns every snapshot EXCEPT those captured from product-purposed sandboxes; set returns only snapshots whose source sandbox had that purpose. - SANDBOX_PURPOSE_UNSPECIFIED: User-created; always visible in list surfaces. - SANDBOX_PURPOSE_NOTEBOOK: Kernel backend spawned by Lightning Notebooks; hidden from default list views. + :param str source_sandbox_id: :return: V1ListSandboxSnapshotsResponse If the method is called asynchronously, returns the request thread. @@ -1940,12 +1941,13 @@ def sandboxes_service_list_sandbox_snapshots_with_http_info(self, **kwargs) -> ' :param str name: :param str sort_order: :param str purpose: Purpose filter, matching ListSandboxesRequest.purpose semantics: unset returns every snapshot EXCEPT those captured from product-purposed sandboxes; set returns only snapshots whose source sandbox had that purpose. - SANDBOX_PURPOSE_UNSPECIFIED: User-created; always visible in list surfaces. - SANDBOX_PURPOSE_NOTEBOOK: Kernel backend spawned by Lightning Notebooks; hidden from default list views. + :param str source_sandbox_id: :return: V1ListSandboxSnapshotsResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['organization_id', 'page_token', 'limit', 'project_id', 'name', 'sort_order', 'purpose'] # noqa: E501 + all_params = ['organization_id', 'page_token', 'limit', 'project_id', 'name', 'sort_order', 'purpose', 'source_sandbox_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1980,6 +1982,8 @@ def sandboxes_service_list_sandbox_snapshots_with_http_info(self, **kwargs) -> ' query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 if 'purpose' in params: query_params.append(('purpose', params['purpose'])) # noqa: E501 + if 'source_sandbox_id' in params: + query_params.append(('sourceSandboxId', params['source_sandbox_id'])) # noqa: E501 header_params = {} diff --git a/python/lightning_sdk/lightning_cloud/openapi/api/user_service_api.py b/python/lightning_sdk/lightning_cloud/openapi/api/user_service_api.py index 521c35a49..d141bf554 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/api/user_service_api.py +++ b/python/lightning_sdk/lightning_cloud/openapi/api/user_service_api.py @@ -813,6 +813,7 @@ def user_service_list_notification_dialogs(self, **kwargs) -> 'V1ListNotificatio :param async_req bool :param bool unseen: if true, only return unseen features + :param str org_id: org whose billing tier decides which targeted features are returned; empty returns only untargeted ones :return: V1ListNotificationDialogsResponse If the method is called asynchronously, returns the request thread. @@ -834,12 +835,13 @@ def user_service_list_notification_dialogs_with_http_info(self, **kwargs) -> 'V1 :param async_req bool :param bool unseen: if true, only return unseen features + :param str org_id: org whose billing tier decides which targeted features are returned; empty returns only untargeted ones :return: V1ListNotificationDialogsResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['unseen'] # noqa: E501 + all_params = ['unseen', 'org_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -862,6 +864,8 @@ def user_service_list_notification_dialogs_with_http_info(self, **kwargs) -> 'V1 query_params = [] if 'unseen' in params: query_params.append(('unseen', params['unseen'])) # noqa: E501 + if 'org_id' in params: + query_params.append(('orgId', params['org_id'])) # noqa: E501 header_params = {} diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/__init__.py b/python/lightning_sdk/lightning_cloud/openapi/models/__init__.py index 2f031a4ce..3d5b0d321 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/__init__.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/__init__.py @@ -89,6 +89,7 @@ from lightning_sdk.lightning_cloud.openapi.models.cluster_service_provision_machine_body import ClusterServiceProvisionMachineBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_purchase_capacity_block_body import ClusterServicePurchaseCapacityBlockBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_purchase_org_capacity_block_body import ClusterServicePurchaseOrgCapacityBlockBody +from lightning_sdk.lightning_cloud.openapi.models.cluster_service_renew_dockerstore_credentials_body import ClusterServiceRenewDockerstoreCredentialsBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_renew_sandbox_snapshot_credentials_body import ClusterServiceRenewSandboxSnapshotCredentialsBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_report_machine_system_metrics_body import ClusterServiceReportMachineSystemMetricsBody from lightning_sdk.lightning_cloud.openapi.models.cluster_service_report_sandbox_resource_metrics_body import ClusterServiceReportSandboxResourceMetricsBody @@ -130,6 +131,7 @@ from lightning_sdk.lightning_cloud.openapi.models.jobs_service_create_deployment_body import JobsServiceCreateDeploymentBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_create_job_body import JobsServiceCreateJobBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_create_multi_machine_job_body import JobsServiceCreateMultiMachineJobBody +from lightning_sdk.lightning_cloud.openapi.models.jobs_service_create_workload_tag_body import JobsServiceCreateWorkloadTagBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_duplicate_deployment_body import JobsServiceDuplicateDeploymentBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_reload_deployment_weights_body import JobsServiceReloadDeploymentWeightsBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_report_deployment_routing_telemetry_body import JobsServiceReportDeploymentRoutingTelemetryBody @@ -137,6 +139,7 @@ from lightning_sdk.lightning_cloud.openapi.models.jobs_service_report_logs_activity_body import JobsServiceReportLogsActivityBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_report_restart_timings_body import JobsServiceReportRestartTimingsBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_restore_deployment_release_body import JobsServiceRestoreDeploymentReleaseBody +from lightning_sdk.lightning_cloud.openapi.models.jobs_service_set_workload_tags_body import JobsServiceSetWorkloadTagsBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_deployment_alerting_event_body import JobsServiceUpdateDeploymentAlertingEventBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_deployment_alerting_events_bulk_body import JobsServiceUpdateDeploymentAlertingEventsBulkBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_deployment_alerting_policy_body import JobsServiceUpdateDeploymentAlertingPolicyBody @@ -146,6 +149,7 @@ from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_job_visibility_body import JobsServiceUpdateJobVisibilityBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_multi_machine_job_body import JobsServiceUpdateMultiMachineJobBody from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_org_deployment_visibility_body import JobsServiceUpdateOrgDeploymentVisibilityBody +from lightning_sdk.lightning_cloud.openapi.models.jobs_service_update_workload_tag_body import JobsServiceUpdateWorkloadTagBody from lightning_sdk.lightning_cloud.openapi.models.k8_s_cluster_service_create_kubernetes_job_body import K8SClusterServiceCreateKubernetesJobBody from lightning_sdk.lightning_cloud.openapi.models.k8_s_cluster_service_create_kubernetes_pod_event_body import K8SClusterServiceCreateKubernetesPodEventBody from lightning_sdk.lightning_cloud.openapi.models.k8_s_cluster_service_create_kubernetes_template_body import K8SClusterServiceCreateKubernetesTemplateBody @@ -508,6 +512,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_shared_artifact_response import V1DeleteSharedArtifactResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_shared_metrics_stream_response import V1DeleteSharedMetricsStreamResponse from lightning_sdk.lightning_cloud.openapi.models.v1_delete_user_slurm_job_response import V1DeleteUserSLURMJobResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_delete_workload_tag_response import V1DeleteWorkloadTagResponse from lightning_sdk.lightning_cloud.openapi.models.v1_dependency_cache_state import V1DependencyCacheState from lightning_sdk.lightning_cloud.openapi.models.v1_dependency_file_info import V1DependencyFileInfo from lightning_sdk.lightning_cloud.openapi.models.v1_deployment import V1Deployment @@ -597,6 +602,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_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 from lightning_sdk.lightning_cloud.openapi.models.v1_get_cloud_space_cold_start_metrics_stats_response import V1GetCloudSpaceColdStartMetricsStatsResponse @@ -648,6 +654,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_resource_sessions_response import V1GetResourceSessionsResponse 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 @@ -878,6 +885,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_shared_artifacts_response import V1ListSharedArtifactsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_storage_transfers_response import V1ListStorageTransfersResponse from lightning_sdk.lightning_cloud.openapi.models.v1_list_user_slurm_jobs_response import V1ListUserSLURMJobsResponse +from lightning_sdk.lightning_cloud.openapi.models.v1_list_workload_tags_response import V1ListWorkloadTagsResponse from lightning_sdk.lightning_cloud.openapi.models.v1_lit_logger_media import V1LitLoggerMedia from lightning_sdk.lightning_cloud.openapi.models.v1_lit_registry_artifact import V1LitRegistryArtifact from lightning_sdk.lightning_cloud.openapi.models.v1_lit_registry_project import V1LitRegistryProject @@ -953,6 +961,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_nv_link_status import V1NVLinkStatus from lightning_sdk.lightning_cloud.openapi.models.v1_nv_switch_fatal import V1NVSwitchFatal from lightning_sdk.lightning_cloud.openapi.models.v1_nv_switch_fatal_affected_vm import V1NVSwitchFatalAffectedVM +from lightning_sdk.lightning_cloud.openapi.models.v1_named_filter_value import V1NamedFilterValue from lightning_sdk.lightning_cloud.openapi.models.v1_named_get_logger_metrics import V1NamedGetLoggerMetrics from lightning_sdk.lightning_cloud.openapi.models.v1_namespace_metrics import V1NamespaceMetrics from lightning_sdk.lightning_cloud.openapi.models.v1_nebius_direct_v1 import V1NebiusDirectV1 @@ -1138,6 +1147,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_service_health import V1ServiceHealth 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 from lightning_sdk.lightning_cloud.openapi.models.v1_setup_confirmed_ssh_public_key_response import V1SetupConfirmedSSHPublicKeyResponse from lightning_sdk.lightning_cloud.openapi.models.v1_setup_data_connection_response import V1SetupDataConnectionResponse from lightning_sdk.lightning_cloud.openapi.models.v1_shared_artifact import V1SharedArtifact @@ -1197,8 +1207,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_transfer_org_balance_response import V1TransferOrgBalanceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_transfer_org_member_resources_response import V1TransferOrgMemberResourcesResponse from lightning_sdk.lightning_cloud.openapi.models.v1_transfer_project_balance_response import V1TransferProjectBalanceResponse -from lightning_sdk.lightning_cloud.openapi.models.v1_transfer_user_balance_request import V1TransferUserBalanceRequest -from lightning_sdk.lightning_cloud.openapi.models.v1_transfer_user_balance_response import V1TransferUserBalanceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_unpublish_cloud_space_response import V1UnpublishCloudSpaceResponse from lightning_sdk.lightning_cloud.openapi.models.v1_update_billing_subscription_request import V1UpdateBillingSubscriptionRequest from lightning_sdk.lightning_cloud.openapi.models.v1_update_cloud_space_collab_response import V1UpdateCloudSpaceCollabResponse @@ -1272,6 +1280,7 @@ 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_tag import V1WorkloadTag 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/cluster_service_renew_dockerstore_credentials_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_renew_dockerstore_credentials_body.py new file mode 100644 index 000000000..17932ec6e --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/cluster_service_renew_dockerstore_credentials_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 ClusterServiceRenewDockerstoreCredentialsBody(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 = { + 'manifest_key': 'str' + } + + attribute_map = { + 'manifest_key': 'manifestKey' + } + + def __init__(self, manifest_key: 'str' =None): # noqa: E501 + """ClusterServiceRenewDockerstoreCredentialsBody - a model defined in Swagger""" # noqa: E501 + self._manifest_key = None + self.discriminator = None + if manifest_key is not None: + self.manifest_key = manifest_key + + @property + def manifest_key(self) -> 'str': + """Gets the manifest_key of this ClusterServiceRenewDockerstoreCredentialsBody. # noqa: E501 + + + :return: The manifest_key of this ClusterServiceRenewDockerstoreCredentialsBody. # noqa: E501 + :rtype: str + """ + return self._manifest_key + + @manifest_key.setter + def manifest_key(self, manifest_key: 'str'): + """Sets the manifest_key of this ClusterServiceRenewDockerstoreCredentialsBody. + + + :param manifest_key: The manifest_key of this ClusterServiceRenewDockerstoreCredentialsBody. # noqa: E501 + :type: str + """ + + self._manifest_key = manifest_key + + 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(ClusterServiceRenewDockerstoreCredentialsBody, 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: 'ClusterServiceRenewDockerstoreCredentialsBody') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, ClusterServiceRenewDockerstoreCredentialsBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ClusterServiceRenewDockerstoreCredentialsBody') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/create_checkout_session_request_wallet_type.py b/python/lightning_sdk/lightning_cloud/openapi/models/create_checkout_session_request_wallet_type.py index 5971e9f0d..0d1b685bd 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/create_checkout_session_request_wallet_type.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/create_checkout_session_request_wallet_type.py @@ -42,7 +42,6 @@ class CreateCheckoutSessionRequestWalletType(object): allowed enum values """ PROJECT = "Project" - USER = "User" ORG = "Org" """ Attributes: diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_deployment_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_deployment_body.py index 3534684dd..79ae83c64 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_deployment_body.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_deployment_body.py @@ -66,6 +66,7 @@ class JobsServiceCreateDeploymentBody(object): 'reuse_servers': 'bool', 'spec': 'V1JobSpec', 'strategy': 'V1DeploymentStrategy', + 'tags': 'list[str]', 'vm_instances_config': 'V1VMInstancesConfig' } @@ -91,10 +92,11 @@ class JobsServiceCreateDeploymentBody(object): 'reuse_servers': 'reuseServers', 'spec': 'spec', 'strategy': 'strategy', + 'tags': 'tags', 'vm_instances_config': 'vmInstancesConfig' } - def __init__(self, acknowledged_warnings: 'list[str]' =None, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, autoscaling: 'V1AutoscalingSpec' =None, byom_spec: 'V1BYOMSpec' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, endpoint: 'V1Endpoint' =None, from_litserve: 'bool' =None, from_onboarding: 'bool' =None, k8s_deployment_config: 'V1K8sDeploymentConfig' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, parent_template_id: 'str' =None, pipeline_reuse_deployment_between_runs: 'bool' =None, recipients: 'Externalv1ResourceScopedAlertingRecipients' =None, release_notes: 'str' =None, replicas: 'int' =None, reuse_servers: 'bool' =None, spec: 'V1JobSpec' =None, strategy: 'V1DeploymentStrategy' =None, vm_instances_config: 'V1VMInstancesConfig' =None): # noqa: E501 + def __init__(self, acknowledged_warnings: 'list[str]' =None, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, autoscaling: 'V1AutoscalingSpec' =None, byom_spec: 'V1BYOMSpec' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, endpoint: 'V1Endpoint' =None, from_litserve: 'bool' =None, from_onboarding: 'bool' =None, k8s_deployment_config: 'V1K8sDeploymentConfig' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, parent_template_id: 'str' =None, pipeline_reuse_deployment_between_runs: 'bool' =None, recipients: 'Externalv1ResourceScopedAlertingRecipients' =None, release_notes: 'str' =None, replicas: 'int' =None, reuse_servers: 'bool' =None, spec: 'V1JobSpec' =None, strategy: 'V1DeploymentStrategy' =None, tags: 'list[str]' =None, vm_instances_config: 'V1VMInstancesConfig' =None): # noqa: E501 """JobsServiceCreateDeploymentBody - a model defined in Swagger""" # noqa: E501 self._acknowledged_warnings = None self._api_standard = None @@ -117,6 +119,7 @@ def __init__(self, acknowledged_warnings: 'list[str]' =None, api_standard: 'str' self._reuse_servers = None self._spec = None self._strategy = None + self._tags = None self._vm_instances_config = None self.discriminator = None if acknowledged_warnings is not None: @@ -161,6 +164,8 @@ def __init__(self, acknowledged_warnings: 'list[str]' =None, api_standard: 'str' self.spec = spec if strategy is not None: self.strategy = strategy + if tags is not None: + self.tags = tags if vm_instances_config is not None: self.vm_instances_config = vm_instances_config @@ -605,6 +610,27 @@ def strategy(self, strategy: 'V1DeploymentStrategy'): self._strategy = strategy + @property + def tags(self) -> 'list[str]': + """Gets the tags of this JobsServiceCreateDeploymentBody. # noqa: E501 + + + :return: The tags of this JobsServiceCreateDeploymentBody. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags: 'list[str]'): + """Sets the tags of this JobsServiceCreateDeploymentBody. + + + :param tags: The tags of this JobsServiceCreateDeploymentBody. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + @property def vm_instances_config(self) -> 'V1VMInstancesConfig': """Gets the vm_instances_config of this JobsServiceCreateDeploymentBody. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_job_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_job_body.py index 8a8eba456..636509b24 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_job_body.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_job_body.py @@ -47,20 +47,23 @@ class JobsServiceCreateJobBody(object): swagger_types = { 'endpoint': 'V1Endpoint', 'name': 'str', - 'spec': 'V1JobSpec' + 'spec': 'V1JobSpec', + 'tags': 'list[str]' } attribute_map = { 'endpoint': 'endpoint', 'name': 'name', - 'spec': 'spec' + 'spec': 'spec', + 'tags': 'tags' } - def __init__(self, endpoint: 'V1Endpoint' =None, name: 'str' =None, spec: 'V1JobSpec' =None): # noqa: E501 + def __init__(self, endpoint: 'V1Endpoint' =None, name: 'str' =None, spec: 'V1JobSpec' =None, tags: 'list[str]' =None): # noqa: E501 """JobsServiceCreateJobBody - a model defined in Swagger""" # noqa: E501 self._endpoint = None self._name = None self._spec = None + self._tags = None self.discriminator = None if endpoint is not None: self.endpoint = endpoint @@ -68,6 +71,8 @@ def __init__(self, endpoint: 'V1Endpoint' =None, name: 'str' =None, spec: 'V1Job self.name = name if spec is not None: self.spec = spec + if tags is not None: + self.tags = tags @property def endpoint(self) -> 'V1Endpoint': @@ -132,6 +137,27 @@ def spec(self, spec: 'V1JobSpec'): self._spec = spec + @property + def tags(self) -> 'list[str]': + """Gets the tags of this JobsServiceCreateJobBody. # noqa: E501 + + + :return: The tags of this JobsServiceCreateJobBody. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags: 'list[str]'): + """Sets the tags of this JobsServiceCreateJobBody. + + + :param tags: The tags of this JobsServiceCreateJobBody. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + def to_dict(self) -> dict: """Returns the model properties as a dict""" result = {} diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_multi_machine_job_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_multi_machine_job_body.py index f5c638137..f1f89952c 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_multi_machine_job_body.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_multi_machine_job_body.py @@ -51,6 +51,7 @@ class JobsServiceCreateMultiMachineJobBody(object): 'max_run_attempts': 'int', 'name': 'str', 'spec': 'V1JobSpec', + 'tags': 'list[str]', 'target_machine_ids': 'list[str]' } @@ -61,10 +62,11 @@ class JobsServiceCreateMultiMachineJobBody(object): 'max_run_attempts': 'maxRunAttempts', 'name': 'name', 'spec': 'spec', + 'tags': 'tags', 'target_machine_ids': 'targetMachineIds' } - def __init__(self, cluster_id: 'str' =None, fault_tolerance: 'V1MultiMachineJobFaultTolerance' =None, machines: 'int' =None, max_run_attempts: 'int' =None, name: 'str' =None, spec: 'V1JobSpec' =None, target_machine_ids: 'list[str]' =None): # noqa: E501 + def __init__(self, cluster_id: 'str' =None, fault_tolerance: 'V1MultiMachineJobFaultTolerance' =None, machines: 'int' =None, max_run_attempts: 'int' =None, name: 'str' =None, spec: 'V1JobSpec' =None, tags: 'list[str]' =None, target_machine_ids: 'list[str]' =None): # noqa: E501 """JobsServiceCreateMultiMachineJobBody - a model defined in Swagger""" # noqa: E501 self._cluster_id = None self._fault_tolerance = None @@ -72,6 +74,7 @@ def __init__(self, cluster_id: 'str' =None, fault_tolerance: 'V1MultiMachineJobF self._max_run_attempts = None self._name = None self._spec = None + self._tags = None self._target_machine_ids = None self.discriminator = None if cluster_id is not None: @@ -86,6 +89,8 @@ def __init__(self, cluster_id: 'str' =None, fault_tolerance: 'V1MultiMachineJobF self.name = name if spec is not None: self.spec = spec + if tags is not None: + self.tags = tags if target_machine_ids is not None: self.target_machine_ids = target_machine_ids @@ -217,6 +222,27 @@ def spec(self, spec: 'V1JobSpec'): self._spec = spec + @property + def tags(self) -> 'list[str]': + """Gets the tags of this JobsServiceCreateMultiMachineJobBody. # noqa: E501 + + + :return: The tags of this JobsServiceCreateMultiMachineJobBody. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags: 'list[str]'): + """Sets the tags of this JobsServiceCreateMultiMachineJobBody. + + + :param tags: The tags of this JobsServiceCreateMultiMachineJobBody. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + @property def target_machine_ids(self) -> 'list[str]': """Gets the target_machine_ids of this JobsServiceCreateMultiMachineJobBody. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_workload_tag_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_workload_tag_body.py new file mode 100644 index 000000000..397c82793 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_create_workload_tag_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 JobsServiceCreateWorkloadTagBody(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' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name: 'str' =None): # noqa: E501 + """JobsServiceCreateWorkloadTagBody - a model defined in Swagger""" # noqa: E501 + self._name = None + self.discriminator = None + if name is not None: + self.name = name + + @property + def name(self) -> 'str': + """Gets the name of this JobsServiceCreateWorkloadTagBody. # noqa: E501 + + + :return: The name of this JobsServiceCreateWorkloadTagBody. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name: 'str'): + """Sets the name of this JobsServiceCreateWorkloadTagBody. + + + :param name: The name of this JobsServiceCreateWorkloadTagBody. # noqa: E501 + :type: str + """ + + self._name = 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(JobsServiceCreateWorkloadTagBody, 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: 'JobsServiceCreateWorkloadTagBody') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, JobsServiceCreateWorkloadTagBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'JobsServiceCreateWorkloadTagBody') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_set_workload_tags_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_set_workload_tags_body.py new file mode 100644 index 000000000..d1affa540 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_set_workload_tags_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 JobsServiceSetWorkloadTagsBody(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 = { + 'tags': 'list[str]' + } + + attribute_map = { + 'tags': 'tags' + } + + def __init__(self, tags: 'list[str]' =None): # noqa: E501 + """JobsServiceSetWorkloadTagsBody - a model defined in Swagger""" # noqa: E501 + self._tags = None + self.discriminator = None + if tags is not None: + self.tags = tags + + @property + def tags(self) -> 'list[str]': + """Gets the tags of this JobsServiceSetWorkloadTagsBody. # noqa: E501 + + + :return: The tags of this JobsServiceSetWorkloadTagsBody. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags: 'list[str]'): + """Sets the tags of this JobsServiceSetWorkloadTagsBody. + + + :param tags: The tags of this JobsServiceSetWorkloadTagsBody. # noqa: E501 + :type: list[str] + """ + + 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(JobsServiceSetWorkloadTagsBody, 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: 'JobsServiceSetWorkloadTagsBody') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, JobsServiceSetWorkloadTagsBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'JobsServiceSetWorkloadTagsBody') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_update_workload_tag_body.py b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_update_workload_tag_body.py new file mode 100644 index 000000000..514b3b67b --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/jobs_service_update_workload_tag_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 JobsServiceUpdateWorkloadTagBody(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' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name: 'str' =None): # noqa: E501 + """JobsServiceUpdateWorkloadTagBody - a model defined in Swagger""" # noqa: E501 + self._name = None + self.discriminator = None + if name is not None: + self.name = name + + @property + def name(self) -> 'str': + """Gets the name of this JobsServiceUpdateWorkloadTagBody. # noqa: E501 + + + :return: The name of this JobsServiceUpdateWorkloadTagBody. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name: 'str'): + """Sets the name of this JobsServiceUpdateWorkloadTagBody. + + + :param name: The name of this JobsServiceUpdateWorkloadTagBody. # noqa: E501 + :type: str + """ + + self._name = 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(JobsServiceUpdateWorkloadTagBody, 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: 'JobsServiceUpdateWorkloadTagBody') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, JobsServiceUpdateWorkloadTagBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'JobsServiceUpdateWorkloadTagBody') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_aws_direct_v1.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_aws_direct_v1.py index ef23a2f14..3c48478b4 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_aws_direct_v1.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_aws_direct_v1.py @@ -59,6 +59,7 @@ class V1AWSDirectV1(object): 'role_arn': 'str', 'source_cidr_ips': 'list[str]', 'subnet_cidr_prefix': 'str', + 'support_local_availability_zones': 'bool', 'use_launch_templates': 'bool', 'use_multiple_subnets_per_availability_zone': 'bool' } @@ -78,11 +79,12 @@ class V1AWSDirectV1(object): 'role_arn': 'roleArn', 'source_cidr_ips': 'sourceCidrIps', 'subnet_cidr_prefix': 'subnetCIDRPrefix', + 'support_local_availability_zones': 'supportLocalAvailabilityZones', 'use_launch_templates': 'useLaunchTemplates', 'use_multiple_subnets_per_availability_zone': 'useMultipleSubnetsPerAvailabilityZone' } - def __init__(self, ami_owner_id: 'str' =None, bucket_endpoint: 'str' =None, bucket_name: 'str' =None, cloud_formation_disabled: 'bool' =None, efs_enabled: 'bool' =None, external_id: 'str' =None, inventory_database: 'str' =None, inventory_table: 'str' =None, primary_region: 'str' =None, regional_load_balancers: 'list[V1RegionalLoadBalancer]' =None, regions: 'list[str]' =None, role_arn: 'str' =None, source_cidr_ips: 'list[str]' =None, subnet_cidr_prefix: 'str' =None, use_launch_templates: 'bool' =None, use_multiple_subnets_per_availability_zone: 'bool' =None): # noqa: E501 + def __init__(self, ami_owner_id: 'str' =None, bucket_endpoint: 'str' =None, bucket_name: 'str' =None, cloud_formation_disabled: 'bool' =None, efs_enabled: 'bool' =None, external_id: 'str' =None, inventory_database: 'str' =None, inventory_table: 'str' =None, primary_region: 'str' =None, regional_load_balancers: 'list[V1RegionalLoadBalancer]' =None, regions: 'list[str]' =None, role_arn: 'str' =None, source_cidr_ips: 'list[str]' =None, subnet_cidr_prefix: 'str' =None, support_local_availability_zones: 'bool' =None, use_launch_templates: 'bool' =None, use_multiple_subnets_per_availability_zone: 'bool' =None): # noqa: E501 """V1AWSDirectV1 - a model defined in Swagger""" # noqa: E501 self._ami_owner_id = None self._bucket_endpoint = None @@ -98,6 +100,7 @@ def __init__(self, ami_owner_id: 'str' =None, bucket_endpoint: 'str' =None, buck self._role_arn = None self._source_cidr_ips = None self._subnet_cidr_prefix = None + self._support_local_availability_zones = None self._use_launch_templates = None self._use_multiple_subnets_per_availability_zone = None self.discriminator = None @@ -129,6 +132,8 @@ def __init__(self, ami_owner_id: 'str' =None, bucket_endpoint: 'str' =None, buck self.source_cidr_ips = source_cidr_ips if subnet_cidr_prefix is not None: self.subnet_cidr_prefix = subnet_cidr_prefix + if support_local_availability_zones is not None: + self.support_local_availability_zones = support_local_availability_zones if use_launch_templates is not None: self.use_launch_templates = use_launch_templates if use_multiple_subnets_per_availability_zone is not None: @@ -430,6 +435,27 @@ def subnet_cidr_prefix(self, subnet_cidr_prefix: 'str'): self._subnet_cidr_prefix = subnet_cidr_prefix + @property + def support_local_availability_zones(self) -> 'bool': + """Gets the support_local_availability_zones of this V1AWSDirectV1. # noqa: E501 + + + :return: The support_local_availability_zones of this V1AWSDirectV1. # noqa: E501 + :rtype: bool + """ + return self._support_local_availability_zones + + @support_local_availability_zones.setter + def support_local_availability_zones(self, support_local_availability_zones: 'bool'): + """Sets the support_local_availability_zones of this V1AWSDirectV1. + + + :param support_local_availability_zones: The support_local_availability_zones of this V1AWSDirectV1. # noqa: E501 + :type: bool + """ + + self._support_local_availability_zones = support_local_availability_zones + @property def use_launch_templates(self) -> 'bool': """Gets the use_launch_templates of this V1AWSDirectV1. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_request.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_request.py index bbd498224..90518714a 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_request.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_request.py @@ -67,6 +67,7 @@ class V1CreateDeploymentRequest(object): 'reuse_servers': 'bool', 'spec': 'V1JobSpec', 'strategy': 'V1DeploymentStrategy', + 'tags': 'list[str]', 'vm_instances_config': 'V1VMInstancesConfig' } @@ -93,10 +94,11 @@ class V1CreateDeploymentRequest(object): 'reuse_servers': 'reuseServers', 'spec': 'spec', 'strategy': 'strategy', + 'tags': 'tags', 'vm_instances_config': 'vmInstancesConfig' } - def __init__(self, acknowledged_warnings: 'list[str]' =None, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, autoscaling: 'V1AutoscalingSpec' =None, byom_spec: 'V1BYOMSpec' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, endpoint: 'V1Endpoint' =None, from_litserve: 'bool' =None, from_onboarding: 'bool' =None, k8s_deployment_config: 'V1K8sDeploymentConfig' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, parent_template_id: 'str' =None, pipeline_reuse_deployment_between_runs: 'bool' =None, project_id: 'str' =None, recipients: 'Externalv1ResourceScopedAlertingRecipients' =None, release_notes: 'str' =None, replicas: 'int' =None, reuse_servers: 'bool' =None, spec: 'V1JobSpec' =None, strategy: 'V1DeploymentStrategy' =None, vm_instances_config: 'V1VMInstancesConfig' =None): # noqa: E501 + def __init__(self, acknowledged_warnings: 'list[str]' =None, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, autoscaling: 'V1AutoscalingSpec' =None, byom_spec: 'V1BYOMSpec' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, endpoint: 'V1Endpoint' =None, from_litserve: 'bool' =None, from_onboarding: 'bool' =None, k8s_deployment_config: 'V1K8sDeploymentConfig' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, parent_template_id: 'str' =None, pipeline_reuse_deployment_between_runs: 'bool' =None, project_id: 'str' =None, recipients: 'Externalv1ResourceScopedAlertingRecipients' =None, release_notes: 'str' =None, replicas: 'int' =None, reuse_servers: 'bool' =None, spec: 'V1JobSpec' =None, strategy: 'V1DeploymentStrategy' =None, tags: 'list[str]' =None, vm_instances_config: 'V1VMInstancesConfig' =None): # noqa: E501 """V1CreateDeploymentRequest - a model defined in Swagger""" # noqa: E501 self._acknowledged_warnings = None self._api_standard = None @@ -120,6 +122,7 @@ def __init__(self, acknowledged_warnings: 'list[str]' =None, api_standard: 'str' self._reuse_servers = None self._spec = None self._strategy = None + self._tags = None self._vm_instances_config = None self.discriminator = None if acknowledged_warnings is not None: @@ -166,6 +169,8 @@ def __init__(self, acknowledged_warnings: 'list[str]' =None, api_standard: 'str' self.spec = spec if strategy is not None: self.strategy = strategy + if tags is not None: + self.tags = tags if vm_instances_config is not None: self.vm_instances_config = vm_instances_config @@ -631,6 +636,27 @@ def strategy(self, strategy: 'V1DeploymentStrategy'): self._strategy = strategy + @property + def tags(self) -> 'list[str]': + """Gets the tags of this V1CreateDeploymentRequest. # noqa: E501 + + + :return: The tags of this V1CreateDeploymentRequest. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags: 'list[str]'): + """Sets the tags of this V1CreateDeploymentRequest. + + + :param tags: The tags of this V1CreateDeploymentRequest. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + @property def vm_instances_config(self) -> 'V1VMInstancesConfig': """Gets the vm_instances_config of this V1CreateDeploymentRequest. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_job_request.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_job_request.py index 8abea29b3..f61e88561 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_job_request.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_job_request.py @@ -48,22 +48,25 @@ class V1CreateJobRequest(object): 'endpoint': 'V1Endpoint', 'name': 'str', 'project_id': 'str', - 'spec': 'V1JobSpec' + 'spec': 'V1JobSpec', + 'tags': 'list[str]' } attribute_map = { 'endpoint': 'endpoint', 'name': 'name', 'project_id': 'projectId', - 'spec': 'spec' + 'spec': 'spec', + 'tags': 'tags' } - def __init__(self, endpoint: 'V1Endpoint' =None, name: 'str' =None, project_id: 'str' =None, spec: 'V1JobSpec' =None): # noqa: E501 + def __init__(self, endpoint: 'V1Endpoint' =None, name: 'str' =None, project_id: 'str' =None, spec: 'V1JobSpec' =None, tags: 'list[str]' =None): # noqa: E501 """V1CreateJobRequest - a model defined in Swagger""" # noqa: E501 self._endpoint = None self._name = None self._project_id = None self._spec = None + self._tags = None self.discriminator = None if endpoint is not None: self.endpoint = endpoint @@ -73,6 +76,8 @@ def __init__(self, endpoint: 'V1Endpoint' =None, name: 'str' =None, project_id: self.project_id = project_id if spec is not None: self.spec = spec + if tags is not None: + self.tags = tags @property def endpoint(self) -> 'V1Endpoint': @@ -158,6 +163,27 @@ def spec(self, spec: 'V1JobSpec'): self._spec = spec + @property + def tags(self) -> 'list[str]': + """Gets the tags of this V1CreateJobRequest. # noqa: E501 + + + :return: The tags of this V1CreateJobRequest. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags: 'list[str]'): + """Sets the tags of this V1CreateJobRequest. + + + :param tags: The tags of this V1CreateJobRequest. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + 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_multi_machine_job_request.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_multi_machine_job_request.py index 50e309e20..07dbb7197 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_multi_machine_job_request.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_create_multi_machine_job_request.py @@ -52,6 +52,7 @@ class V1CreateMultiMachineJobRequest(object): 'name': 'str', 'project_id': 'str', 'spec': 'V1JobSpec', + 'tags': 'list[str]', 'target_machine_ids': 'list[str]' } @@ -63,10 +64,11 @@ class V1CreateMultiMachineJobRequest(object): 'name': 'name', 'project_id': 'projectId', 'spec': 'spec', + 'tags': 'tags', 'target_machine_ids': 'targetMachineIds' } - def __init__(self, cluster_id: 'str' =None, fault_tolerance: 'V1MultiMachineJobFaultTolerance' =None, machines: 'int' =None, max_run_attempts: 'int' =None, name: 'str' =None, project_id: 'str' =None, spec: 'V1JobSpec' =None, target_machine_ids: 'list[str]' =None): # noqa: E501 + def __init__(self, cluster_id: 'str' =None, fault_tolerance: 'V1MultiMachineJobFaultTolerance' =None, machines: 'int' =None, max_run_attempts: 'int' =None, name: 'str' =None, project_id: 'str' =None, spec: 'V1JobSpec' =None, tags: 'list[str]' =None, target_machine_ids: 'list[str]' =None): # noqa: E501 """V1CreateMultiMachineJobRequest - a model defined in Swagger""" # noqa: E501 self._cluster_id = None self._fault_tolerance = None @@ -75,6 +77,7 @@ def __init__(self, cluster_id: 'str' =None, fault_tolerance: 'V1MultiMachineJobF self._name = None self._project_id = None self._spec = None + self._tags = None self._target_machine_ids = None self.discriminator = None if cluster_id is not None: @@ -91,6 +94,8 @@ def __init__(self, cluster_id: 'str' =None, fault_tolerance: 'V1MultiMachineJobF self.project_id = project_id if spec is not None: self.spec = spec + if tags is not None: + self.tags = tags if target_machine_ids is not None: self.target_machine_ids = target_machine_ids @@ -243,6 +248,27 @@ def spec(self, spec: 'V1JobSpec'): self._spec = spec + @property + def tags(self) -> 'list[str]': + """Gets the tags of this V1CreateMultiMachineJobRequest. # noqa: E501 + + + :return: The tags of this V1CreateMultiMachineJobRequest. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags: 'list[str]'): + """Sets the tags of this V1CreateMultiMachineJobRequest. + + + :param tags: The tags of this V1CreateMultiMachineJobRequest. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + @property def target_machine_ids(self) -> 'list[str]': """Gets the target_machine_ids of this V1CreateMultiMachineJobRequest. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_transfer_user_balance_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_delete_workload_tag_response.py similarity index 87% rename from python/lightning_sdk/lightning_cloud/openapi/models/v1_transfer_user_balance_response.py rename to python/lightning_sdk/lightning_cloud/openapi/models/v1_delete_workload_tag_response.py index 60e8b692e..fbd47fb0f 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_transfer_user_balance_response.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_delete_workload_tag_response.py @@ -32,7 +32,7 @@ from datetime import datetime from lightning_sdk.lightning_cloud.openapi.models import * -class V1TransferUserBalanceResponse(object): +class V1DeleteWorkloadTagResponse(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -51,7 +51,7 @@ class V1TransferUserBalanceResponse(object): } def __init__(self): # noqa: E501 - """V1TransferUserBalanceResponse - a model defined in Swagger""" # noqa: E501 + """V1DeleteWorkloadTagResponse - 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(V1TransferUserBalanceResponse, dict): + if issubclass(V1DeleteWorkloadTagResponse, 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: 'V1TransferUserBalanceResponse') -> bool: + def __eq__(self, other: 'V1DeleteWorkloadTagResponse') -> bool: """Returns true if both objects are equal""" - if not isinstance(other, V1TransferUserBalanceResponse): + if not isinstance(other, V1DeleteWorkloadTagResponse): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'V1TransferUserBalanceResponse') -> bool: + def __ne__(self, other: 'V1DeleteWorkloadTagResponse') -> 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 32a03c708..21df34fbe 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 @@ -54,6 +54,7 @@ class V1GenericJob(object): 'project_id': 'str', 'spec': 'V1GenericJobSpec', 'state': 'str', + 'tags': 'list[V1WorkloadTag]', 'type': 'str', 'user_id': 'str' } @@ -68,11 +69,12 @@ class V1GenericJob(object): 'project_id': 'projectId', 'spec': 'spec', 'state': 'state', + 'tags': 'tags', 'type': 'type', '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, state: 'str' =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, id: 'str' =None, message: 'str' =None, name: 'str' =None, project_id: 'str' =None, spec: 'V1GenericJobSpec' =None, state: 'str' =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 @@ -83,6 +85,7 @@ def __init__(self, cloud_space_id: 'str' =None, cluster_id: 'str' =None, created self._project_id = None self._spec = None self._state = None + self._tags = None self._type = None self._user_id = None self.discriminator = None @@ -104,6 +107,8 @@ def __init__(self, cloud_space_id: 'str' =None, cluster_id: 'str' =None, created self.spec = spec if state is not None: self.state = state + if tags is not None: + self.tags = tags if type is not None: self.type = type if user_id is not None: @@ -298,6 +303,27 @@ def state(self, state: 'str'): self._state = state + @property + def tags(self) -> 'list[V1WorkloadTag]': + """Gets the tags of this V1GenericJob. # noqa: E501 + + + :return: The tags of this V1GenericJob. # noqa: E501 + :rtype: list[V1WorkloadTag] + """ + return self._tags + + @tags.setter + def tags(self, tags: 'list[V1WorkloadTag]'): + """Sets the tags of this V1GenericJob. + + + :param tags: The tags of this V1GenericJob. # noqa: E501 + :type: list[V1WorkloadTag] + """ + + self._tags = tags + @property def type(self) -> 'str': """Gets the type of this V1GenericJob. # noqa: E501 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 new file mode 100644 index 000000000..573428202 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_activity_filter_values_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 V1GetActivityFilterValuesResponse(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 = { + 'project_ids': 'list[str]', + 'resource_ids': 'list[V1NamedFilterValue]', + 'resource_ids_truncated': 'bool', + 'resource_types': 'list[str]', + 'user_ids': 'list[str]' + } + + attribute_map = { + 'project_ids': 'projectIds', + 'resource_ids': 'resourceIds', + 'resource_ids_truncated': 'resourceIdsTruncated', + 'resource_types': 'resourceTypes', + '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 + """V1GetActivityFilterValuesResponse - a model defined in Swagger""" # noqa: E501 + self._project_ids = None + self._resource_ids = None + self._resource_ids_truncated = None + self._resource_types = None + self._user_ids = None + self.discriminator = None + 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 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 + + + :return: The project_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 + :rtype: list[str] + """ + return self._project_ids + + @project_ids.setter + def project_ids(self, project_ids: 'list[str]'): + """Sets the project_ids of this V1GetActivityFilterValuesResponse. + + + :param project_ids: The project_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 + + @property + def resource_ids_truncated(self) -> 'bool': + """Gets the resource_ids_truncated of this V1GetActivityFilterValuesResponse. # noqa: E501 + + + :return: The resource_ids_truncated of this V1GetActivityFilterValuesResponse. # noqa: E501 + :rtype: bool + """ + return self._resource_ids_truncated + + @resource_ids_truncated.setter + def resource_ids_truncated(self, resource_ids_truncated: 'bool'): + """Sets the resource_ids_truncated of this V1GetActivityFilterValuesResponse. + + + :param resource_ids_truncated: The resource_ids_truncated of this V1GetActivityFilterValuesResponse. # noqa: E501 + :type: bool + """ + + self._resource_ids_truncated = resource_ids_truncated + + @property + def resource_types(self) -> 'list[str]': + """Gets the resource_types of this V1GetActivityFilterValuesResponse. # noqa: E501 + + + :return: The resource_types of this V1GetActivityFilterValuesResponse. # noqa: E501 + :rtype: list[str] + """ + return self._resource_types + + @resource_types.setter + def resource_types(self, resource_types: 'list[str]'): + """Sets the resource_types of this V1GetActivityFilterValuesResponse. + + + :param resource_types: The resource_types of this V1GetActivityFilterValuesResponse. # noqa: E501 + :type: list[str] + """ + + self._resource_types = resource_types + + @property + def user_ids(self) -> 'list[str]': + """Gets the user_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 + + + :return: The user_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 + :rtype: list[str] + """ + return self._user_ids + + @user_ids.setter + def user_ids(self, user_ids: 'list[str]'): + """Sets the user_ids of this V1GetActivityFilterValuesResponse. + + + :param user_ids: The user_ids of this V1GetActivityFilterValuesResponse. # noqa: E501 + :type: list[str] + """ + + self._user_ids = 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(V1GetActivityFilterValuesResponse, 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: 'V1GetActivityFilterValuesResponse') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1GetActivityFilterValuesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1GetActivityFilterValuesResponse') -> 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_resource_sessions_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_resource_sessions_response.py new file mode 100644 index 000000000..0e2583122 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_get_resource_sessions_response.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 V1GetResourceSessionsResponse(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 = { + 'has_more': 'bool', + 'search_after': 'datetime', + 'search_after_session_id': 'str', + 'sessions': 'list[V1Usage]' + } + + attribute_map = { + 'has_more': 'hasMore', + 'search_after': 'searchAfter', + 'search_after_session_id': 'searchAfterSessionId', + 'sessions': 'sessions' + } + + def __init__(self, has_more: 'bool' =None, search_after: 'datetime' =None, search_after_session_id: 'str' =None, sessions: 'list[V1Usage]' =None): # noqa: E501 + """V1GetResourceSessionsResponse - a model defined in Swagger""" # noqa: E501 + self._has_more = None + self._search_after = None + self._search_after_session_id = None + self._sessions = None + self.discriminator = None + if has_more is not None: + self.has_more = has_more + if search_after is not None: + self.search_after = search_after + if search_after_session_id is not None: + self.search_after_session_id = search_after_session_id + if sessions is not None: + self.sessions = sessions + + @property + def has_more(self) -> 'bool': + """Gets the has_more of this V1GetResourceSessionsResponse. # noqa: E501 + + + :return: The has_more of this V1GetResourceSessionsResponse. # noqa: E501 + :rtype: bool + """ + return self._has_more + + @has_more.setter + def has_more(self, has_more: 'bool'): + """Sets the has_more of this V1GetResourceSessionsResponse. + + + :param has_more: The has_more of this V1GetResourceSessionsResponse. # noqa: E501 + :type: bool + """ + + self._has_more = has_more + + @property + def search_after(self) -> 'datetime': + """Gets the search_after of this V1GetResourceSessionsResponse. # noqa: E501 + + + :return: The search_after of this V1GetResourceSessionsResponse. # noqa: E501 + :rtype: datetime + """ + return self._search_after + + @search_after.setter + def search_after(self, search_after: 'datetime'): + """Sets the search_after of this V1GetResourceSessionsResponse. + + + :param search_after: The search_after of this V1GetResourceSessionsResponse. # noqa: E501 + :type: datetime + """ + + self._search_after = search_after + + @property + def search_after_session_id(self) -> 'str': + """Gets the search_after_session_id of this V1GetResourceSessionsResponse. # noqa: E501 + + + :return: The search_after_session_id of this V1GetResourceSessionsResponse. # noqa: E501 + :rtype: str + """ + return self._search_after_session_id + + @search_after_session_id.setter + def search_after_session_id(self, search_after_session_id: 'str'): + """Sets the search_after_session_id of this V1GetResourceSessionsResponse. + + + :param search_after_session_id: The search_after_session_id of this V1GetResourceSessionsResponse. # noqa: E501 + :type: str + """ + + self._search_after_session_id = search_after_session_id + + @property + def sessions(self) -> 'list[V1Usage]': + """Gets the sessions of this V1GetResourceSessionsResponse. # noqa: E501 + + + :return: The sessions of this V1GetResourceSessionsResponse. # noqa: E501 + :rtype: list[V1Usage] + """ + return self._sessions + + @sessions.setter + def sessions(self, sessions: 'list[V1Usage]'): + """Sets the sessions of this V1GetResourceSessionsResponse. + + + :param sessions: The sessions of this V1GetResourceSessionsResponse. # noqa: E501 + :type: list[V1Usage] + """ + + self._sessions = sessions + + 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(V1GetResourceSessionsResponse, 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: 'V1GetResourceSessionsResponse') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1GetResourceSessionsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1GetResourceSessionsResponse') -> 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 de1f57641..3411c5cf2 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 @@ -50,7 +50,6 @@ class V1GetUserResponse(object): 'api_key': 'str', 'auto_replenish_amount': 'float', 'auto_replenish_threshold': 'float', - 'can_see_project_migration_opt_in': 'bool', 'country': 'str', 'disable_shell_persistence': 'bool', 'eligible_for_credit_card_unlock': 'bool', @@ -58,7 +57,6 @@ class V1GetUserResponse(object): 'experimentation_id': 'str', 'features': 'V1UserFeatures', 'first_name': 'str', - 'force_project_migration_at': 'datetime', 'general_audience_mode': 'bool', 'id': 'str', 'internal_billing_admin': 'bool', @@ -73,16 +71,12 @@ class V1GetUserResponse(object): 'opted_in_marketing_emails': 'bool', 'organization': 'str', 'organizations': 'list[V1Organization]', - 'personal_project_migration_at': 'datetime', - 'personal_project_migration_error': 'str', - 'personal_project_migration_status': 'str', 'phone_number': 'str', 'picture_url': 'str', 'preferred_color_scheme': 'str', 'preferred_ide': 'str', 'preferred_shell': 'str', 'preferred_vscode_marketplace': 'str', - 'project_migration_opt_in_at': 'datetime', 'role': 'str', 'saw_create_first_project_dialog': 'bool', 'saw_forums_login_merge_dialog': 'bool', @@ -104,7 +98,6 @@ class V1GetUserResponse(object): 'api_key': 'apiKey', 'auto_replenish_amount': 'autoReplenishAmount', 'auto_replenish_threshold': 'autoReplenishThreshold', - 'can_see_project_migration_opt_in': 'canSeeProjectMigrationOptIn', 'country': 'country', 'disable_shell_persistence': 'disableShellPersistence', 'eligible_for_credit_card_unlock': 'eligibleForCreditCardUnlock', @@ -112,7 +105,6 @@ class V1GetUserResponse(object): 'experimentation_id': 'experimentationId', 'features': 'features', 'first_name': 'firstName', - 'force_project_migration_at': 'forceProjectMigrationAt', 'general_audience_mode': 'generalAudienceMode', 'id': 'id', 'internal_billing_admin': 'internalBillingAdmin', @@ -127,16 +119,12 @@ class V1GetUserResponse(object): 'opted_in_marketing_emails': 'optedInMarketingEmails', 'organization': 'organization', 'organizations': 'organizations', - 'personal_project_migration_at': 'personalProjectMigrationAt', - 'personal_project_migration_error': 'personalProjectMigrationError', - 'personal_project_migration_status': 'personalProjectMigrationStatus', 'phone_number': 'phoneNumber', 'picture_url': 'pictureUrl', 'preferred_color_scheme': 'preferredColorScheme', 'preferred_ide': 'preferredIde', 'preferred_shell': 'preferredShell', 'preferred_vscode_marketplace': 'preferredVscodeMarketplace', - 'project_migration_opt_in_at': 'projectMigrationOptInAt', 'role': 'role', 'saw_create_first_project_dialog': 'sawCreateFirstProjectDialog', 'saw_forums_login_merge_dialog': 'sawForumsLoginMergeDialog', @@ -152,14 +140,13 @@ 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, can_see_project_migration_opt_in: 'bool' =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, force_project_migration_at: 'datetime' =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, personal_project_migration_at: 'datetime' =None, personal_project_migration_error: 'str' =None, personal_project_migration_status: 'str' =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, project_migration_opt_in_at: 'datetime' =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, 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 """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._can_see_project_migration_opt_in = None self._country = None self._disable_shell_persistence = None self._eligible_for_credit_card_unlock = None @@ -167,7 +154,6 @@ def __init__(self, agree_to_terms_and_conditions: 'bool' =None, allow_credits_au self._experimentation_id = None self._features = None self._first_name = None - self._force_project_migration_at = None self._general_audience_mode = None self._id = None self._internal_billing_admin = None @@ -182,16 +168,12 @@ def __init__(self, agree_to_terms_and_conditions: 'bool' =None, allow_credits_au self._opted_in_marketing_emails = None self._organization = None self._organizations = None - self._personal_project_migration_at = None - self._personal_project_migration_error = None - self._personal_project_migration_status = None self._phone_number = None self._picture_url = None self._preferred_color_scheme = None self._preferred_ide = None self._preferred_shell = None self._preferred_vscode_marketplace = None - self._project_migration_opt_in_at = None self._role = None self._saw_create_first_project_dialog = None self._saw_forums_login_merge_dialog = None @@ -216,8 +198,6 @@ def __init__(self, agree_to_terms_and_conditions: 'bool' =None, allow_credits_au self.auto_replenish_amount = auto_replenish_amount if auto_replenish_threshold is not None: self.auto_replenish_threshold = auto_replenish_threshold - if can_see_project_migration_opt_in is not None: - self.can_see_project_migration_opt_in = can_see_project_migration_opt_in if country is not None: self.country = country if disable_shell_persistence is not None: @@ -232,8 +212,6 @@ def __init__(self, agree_to_terms_and_conditions: 'bool' =None, allow_credits_au self.features = features if first_name is not None: self.first_name = first_name - if force_project_migration_at is not None: - self.force_project_migration_at = force_project_migration_at if general_audience_mode is not None: self.general_audience_mode = general_audience_mode if id is not None: @@ -262,12 +240,6 @@ def __init__(self, agree_to_terms_and_conditions: 'bool' =None, allow_credits_au self.organization = organization if organizations is not None: self.organizations = organizations - if personal_project_migration_at is not None: - self.personal_project_migration_at = personal_project_migration_at - if personal_project_migration_error is not None: - self.personal_project_migration_error = personal_project_migration_error - if personal_project_migration_status is not None: - self.personal_project_migration_status = personal_project_migration_status if phone_number is not None: self.phone_number = phone_number if picture_url is not None: @@ -280,8 +252,6 @@ def __init__(self, agree_to_terms_and_conditions: 'bool' =None, allow_credits_au self.preferred_shell = preferred_shell if preferred_vscode_marketplace is not None: self.preferred_vscode_marketplace = preferred_vscode_marketplace - if project_migration_opt_in_at is not None: - self.project_migration_opt_in_at = project_migration_opt_in_at if role is not None: self.role = role if saw_create_first_project_dialog is not None: @@ -416,27 +386,6 @@ def auto_replenish_threshold(self, auto_replenish_threshold: 'float'): self._auto_replenish_threshold = auto_replenish_threshold - @property - def can_see_project_migration_opt_in(self) -> 'bool': - """Gets the can_see_project_migration_opt_in of this V1GetUserResponse. # noqa: E501 - - - :return: The can_see_project_migration_opt_in of this V1GetUserResponse. # noqa: E501 - :rtype: bool - """ - return self._can_see_project_migration_opt_in - - @can_see_project_migration_opt_in.setter - def can_see_project_migration_opt_in(self, can_see_project_migration_opt_in: 'bool'): - """Sets the can_see_project_migration_opt_in of this V1GetUserResponse. - - - :param can_see_project_migration_opt_in: The can_see_project_migration_opt_in of this V1GetUserResponse. # noqa: E501 - :type: bool - """ - - self._can_see_project_migration_opt_in = can_see_project_migration_opt_in - @property def country(self) -> 'str': """Gets the country of this V1GetUserResponse. # noqa: E501 @@ -586,27 +535,6 @@ def first_name(self, first_name: 'str'): self._first_name = first_name - @property - def force_project_migration_at(self) -> 'datetime': - """Gets the force_project_migration_at of this V1GetUserResponse. # noqa: E501 - - - :return: The force_project_migration_at of this V1GetUserResponse. # noqa: E501 - :rtype: datetime - """ - return self._force_project_migration_at - - @force_project_migration_at.setter - def force_project_migration_at(self, force_project_migration_at: 'datetime'): - """Sets the force_project_migration_at of this V1GetUserResponse. - - - :param force_project_migration_at: The force_project_migration_at of this V1GetUserResponse. # noqa: E501 - :type: datetime - """ - - self._force_project_migration_at = force_project_migration_at - @property def general_audience_mode(self) -> 'bool': """Gets the general_audience_mode of this V1GetUserResponse. # noqa: E501 @@ -901,69 +829,6 @@ def organizations(self, organizations: 'list[V1Organization]'): self._organizations = organizations - @property - def personal_project_migration_at(self) -> 'datetime': - """Gets the personal_project_migration_at of this V1GetUserResponse. # noqa: E501 - - - :return: The personal_project_migration_at of this V1GetUserResponse. # noqa: E501 - :rtype: datetime - """ - return self._personal_project_migration_at - - @personal_project_migration_at.setter - def personal_project_migration_at(self, personal_project_migration_at: 'datetime'): - """Sets the personal_project_migration_at of this V1GetUserResponse. - - - :param personal_project_migration_at: The personal_project_migration_at of this V1GetUserResponse. # noqa: E501 - :type: datetime - """ - - self._personal_project_migration_at = personal_project_migration_at - - @property - def personal_project_migration_error(self) -> 'str': - """Gets the personal_project_migration_error of this V1GetUserResponse. # noqa: E501 - - - :return: The personal_project_migration_error of this V1GetUserResponse. # noqa: E501 - :rtype: str - """ - return self._personal_project_migration_error - - @personal_project_migration_error.setter - def personal_project_migration_error(self, personal_project_migration_error: 'str'): - """Sets the personal_project_migration_error of this V1GetUserResponse. - - - :param personal_project_migration_error: The personal_project_migration_error of this V1GetUserResponse. # noqa: E501 - :type: str - """ - - self._personal_project_migration_error = personal_project_migration_error - - @property - def personal_project_migration_status(self) -> 'str': - """Gets the personal_project_migration_status of this V1GetUserResponse. # noqa: E501 - - - :return: The personal_project_migration_status of this V1GetUserResponse. # noqa: E501 - :rtype: str - """ - return self._personal_project_migration_status - - @personal_project_migration_status.setter - def personal_project_migration_status(self, personal_project_migration_status: 'str'): - """Sets the personal_project_migration_status of this V1GetUserResponse. - - - :param personal_project_migration_status: The personal_project_migration_status of this V1GetUserResponse. # noqa: E501 - :type: str - """ - - self._personal_project_migration_status = personal_project_migration_status - @property def phone_number(self) -> 'str': """Gets the phone_number of this V1GetUserResponse. # noqa: E501 @@ -1090,27 +955,6 @@ def preferred_vscode_marketplace(self, preferred_vscode_marketplace: 'str'): self._preferred_vscode_marketplace = preferred_vscode_marketplace - @property - def project_migration_opt_in_at(self) -> 'datetime': - """Gets the project_migration_opt_in_at of this V1GetUserResponse. # noqa: E501 - - - :return: The project_migration_opt_in_at of this V1GetUserResponse. # noqa: E501 - :rtype: datetime - """ - return self._project_migration_opt_in_at - - @project_migration_opt_in_at.setter - def project_migration_opt_in_at(self, project_migration_opt_in_at: 'datetime'): - """Sets the project_migration_opt_in_at of this V1GetUserResponse. - - - :param project_migration_opt_in_at: The project_migration_opt_in_at of this V1GetUserResponse. # noqa: E501 - :type: datetime - """ - - self._project_migration_opt_in_at = project_migration_opt_in_at - @property def role(self) -> 'str': """Gets the role of this V1GetUserResponse. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_job.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_job.py index bbc0859bb..08ff4a9ab 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_job.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_job.py @@ -74,6 +74,7 @@ class V1Job(object): 'started_at': 'datetime', 'state': 'str', 'stopped_at': 'datetime', + 'tags': 'list[V1WorkloadTag]', 'timings': 'dict(str, V1JobTiming)', 'total_cost': 'float', 'total_size_bytes': 'str', @@ -114,6 +115,7 @@ class V1Job(object): 'started_at': 'startedAt', 'state': 'state', 'stopped_at': 'stoppedAt', + 'tags': 'tags', 'timings': 'timings', 'total_cost': 'totalCost', 'total_size_bytes': 'totalSizeBytes', @@ -124,7 +126,7 @@ class V1Job(object): 'visibility': 'visibility' } - def __init__(self, capacity_reservation_id: 'str' =None, created_at: 'datetime' =None, deleted_at: 'datetime' =None, deployment_id: 'str' =None, endpoint: 'V1Endpoint' =None, id: 'str' =None, interruption_notice_received: 'bool' =None, interruption_notice_received_at: 'datetime' =None, is_healthy: 'bool' =None, message: 'str' =None, multi_machine_job_id: 'str' =None, name: 'str' =None, overprovisioned: 'bool' =None, pipeline_id: 'str' =None, private_ip_address: 'str' =None, project_id: 'str' =None, public_ip_address: 'str' =None, ready_at: 'datetime' =None, release_id: 'str' =None, replace_requested: 'bool' =None, replace_requested_at: 'datetime' =None, requires_maintenance: 'bool' =None, restart_count: 'int' =None, restart_timings: 'list[V1RestartTiming]' =None, server_error: 'str' =None, spec: 'V1JobSpec' =None, started_at: 'datetime' =None, state: 'str' =None, stopped_at: 'datetime' =None, timings: 'dict(str, V1JobTiming)' =None, total_cost: 'float' =None, total_size_bytes: 'str' =None, updated_at: 'datetime' =None, urls: 'list[str]' =None, user_id: 'str' =None, user_logs_started_at: 'datetime' =None, visibility: 'V1ResourceVisibility' =None): # noqa: E501 + def __init__(self, capacity_reservation_id: 'str' =None, created_at: 'datetime' =None, deleted_at: 'datetime' =None, deployment_id: 'str' =None, endpoint: 'V1Endpoint' =None, id: 'str' =None, interruption_notice_received: 'bool' =None, interruption_notice_received_at: 'datetime' =None, is_healthy: 'bool' =None, message: 'str' =None, multi_machine_job_id: 'str' =None, name: 'str' =None, overprovisioned: 'bool' =None, pipeline_id: 'str' =None, private_ip_address: 'str' =None, project_id: 'str' =None, public_ip_address: 'str' =None, ready_at: 'datetime' =None, release_id: 'str' =None, replace_requested: 'bool' =None, replace_requested_at: 'datetime' =None, requires_maintenance: 'bool' =None, restart_count: 'int' =None, restart_timings: 'list[V1RestartTiming]' =None, server_error: 'str' =None, spec: 'V1JobSpec' =None, started_at: 'datetime' =None, state: 'str' =None, stopped_at: 'datetime' =None, tags: 'list[V1WorkloadTag]' =None, timings: 'dict(str, V1JobTiming)' =None, total_cost: 'float' =None, total_size_bytes: 'str' =None, updated_at: 'datetime' =None, urls: 'list[str]' =None, user_id: 'str' =None, user_logs_started_at: 'datetime' =None, visibility: 'V1ResourceVisibility' =None): # noqa: E501 """V1Job - a model defined in Swagger""" # noqa: E501 self._capacity_reservation_id = None self._created_at = None @@ -155,6 +157,7 @@ def __init__(self, capacity_reservation_id: 'str' =None, created_at: 'datetime' self._started_at = None self._state = None self._stopped_at = None + self._tags = None self._timings = None self._total_cost = None self._total_size_bytes = None @@ -222,6 +225,8 @@ def __init__(self, capacity_reservation_id: 'str' =None, created_at: 'datetime' self.state = state if stopped_at is not None: self.stopped_at = stopped_at + if tags is not None: + self.tags = tags if timings is not None: self.timings = timings if total_cost is not None: @@ -856,6 +861,27 @@ def stopped_at(self, stopped_at: 'datetime'): self._stopped_at = stopped_at + @property + def tags(self) -> 'list[V1WorkloadTag]': + """Gets the tags of this V1Job. # noqa: E501 + + + :return: The tags of this V1Job. # noqa: E501 + :rtype: list[V1WorkloadTag] + """ + return self._tags + + @tags.setter + def tags(self, tags: 'list[V1WorkloadTag]'): + """Sets the tags of this V1Job. + + + :param tags: The tags of this V1Job. # noqa: E501 + :type: list[V1WorkloadTag] + """ + + self._tags = tags + @property def timings(self) -> 'dict(str, V1JobTiming)': """Gets the timings of this V1Job. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py index e100c5c03..21873cc34 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py @@ -61,6 +61,7 @@ class V1JobSpec(object): 'include_credentials': 'bool', 'instance_name': 'str', 'instance_type': 'str', + 'keep_machine_after_stop': 'bool', 'machine_id': 'str', 'machine_image_version': 'str', 'max_run_attempts': 'int', @@ -101,6 +102,7 @@ class V1JobSpec(object): 'include_credentials': 'includeCredentials', 'instance_name': 'instanceName', 'instance_type': 'instanceType', + 'keep_machine_after_stop': 'keepMachineAfterStop', 'machine_id': 'machineId', 'machine_image_version': 'machineImageVersion', 'max_run_attempts': 'maxRunAttempts', @@ -124,7 +126,7 @@ class V1JobSpec(object): 'volumes': 'volumes' } - def __init__(self, artifacts_destination: 'str' =None, artifacts_source: 'str' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, command: 'str' =None, current_run_attempt: 'int' =None, data_paths: 'list[V1DataPath]' =None, disable_artifacts_persistence: 'bool' =None, entrypoint: 'str' =None, env: 'list[V1EnvVar]' =None, image: 'str' =None, image_cluster_credentials: 'bool' =None, image_secret_ref: 'str' =None, include_credentials: 'bool' =None, instance_name: 'str' =None, instance_type: 'str' =None, machine_id: 'str' =None, machine_image_version: 'str' =None, max_run_attempts: 'int' =None, modified_volume: 'bool' =None, parent_job_id: 'str' =None, path_mappings: 'list[V1PathMapping]' =None, pipeline_id: 'str' =None, placement_group_id: 'str' =None, quantity: 'int' =None, rank: 'int' =None, readiness_probe: 'V1JobHealthCheckConfig' =None, regions: 'list[str]' =None, requested_run_duration_seconds: 'str' =None, resources: 'V1Resources' =None, restart_policy: 'str' =None, run_id: 'str' =None, shutdown_delay_seconds: 'int' =None, shutdown_timeout_seconds: 'int' =None, spot: 'bool' =None, use_tls: 'bool' =None, volumes: 'list[V1Volume]' =None): # noqa: E501 + def __init__(self, artifacts_destination: 'str' =None, artifacts_source: 'str' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, command: 'str' =None, current_run_attempt: 'int' =None, data_paths: 'list[V1DataPath]' =None, disable_artifacts_persistence: 'bool' =None, entrypoint: 'str' =None, env: 'list[V1EnvVar]' =None, image: 'str' =None, image_cluster_credentials: 'bool' =None, image_secret_ref: 'str' =None, include_credentials: 'bool' =None, instance_name: 'str' =None, instance_type: 'str' =None, keep_machine_after_stop: 'bool' =None, machine_id: 'str' =None, machine_image_version: 'str' =None, max_run_attempts: 'int' =None, modified_volume: 'bool' =None, parent_job_id: 'str' =None, path_mappings: 'list[V1PathMapping]' =None, pipeline_id: 'str' =None, placement_group_id: 'str' =None, quantity: 'int' =None, rank: 'int' =None, readiness_probe: 'V1JobHealthCheckConfig' =None, regions: 'list[str]' =None, requested_run_duration_seconds: 'str' =None, resources: 'V1Resources' =None, restart_policy: 'str' =None, run_id: 'str' =None, shutdown_delay_seconds: 'int' =None, shutdown_timeout_seconds: 'int' =None, spot: 'bool' =None, use_tls: 'bool' =None, volumes: 'list[V1Volume]' =None): # noqa: E501 """V1JobSpec - a model defined in Swagger""" # noqa: E501 self._artifacts_destination = None self._artifacts_source = None @@ -142,6 +144,7 @@ def __init__(self, artifacts_destination: 'str' =None, artifacts_source: 'str' = self._include_credentials = None self._instance_name = None self._instance_type = None + self._keep_machine_after_stop = None self._machine_id = None self._machine_image_version = None self._max_run_attempts = None @@ -196,6 +199,8 @@ def __init__(self, artifacts_destination: 'str' =None, artifacts_source: 'str' = self.instance_name = instance_name if instance_type is not None: self.instance_type = instance_type + if keep_machine_after_stop is not None: + self.keep_machine_after_stop = keep_machine_after_stop if machine_id is not None: self.machine_id = machine_id if machine_image_version is not None: @@ -583,6 +588,27 @@ def instance_type(self, instance_type: 'str'): self._instance_type = instance_type + @property + def keep_machine_after_stop(self) -> 'bool': + """Gets the keep_machine_after_stop of this V1JobSpec. # noqa: E501 + + + :return: The keep_machine_after_stop of this V1JobSpec. # noqa: E501 + :rtype: bool + """ + return self._keep_machine_after_stop + + @keep_machine_after_stop.setter + def keep_machine_after_stop(self, keep_machine_after_stop: 'bool'): + """Sets the keep_machine_after_stop of this V1JobSpec. + + + :param keep_machine_after_stop: The keep_machine_after_stop of this V1JobSpec. # noqa: E501 + :type: bool + """ + + self._keep_machine_after_stop = keep_machine_after_stop + @property def machine_id(self) -> 'str': """Gets the machine_id of this V1JobSpec. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_workload_tags_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_workload_tags_response.py new file mode 100644 index 000000000..769ff851b --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_list_workload_tags_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 V1ListWorkloadTagsResponse(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 = { + 'tags': 'list[V1WorkloadTag]' + } + + attribute_map = { + 'tags': 'tags' + } + + def __init__(self, tags: 'list[V1WorkloadTag]' =None): # noqa: E501 + """V1ListWorkloadTagsResponse - a model defined in Swagger""" # noqa: E501 + self._tags = None + self.discriminator = None + if tags is not None: + self.tags = tags + + @property + def tags(self) -> 'list[V1WorkloadTag]': + """Gets the tags of this V1ListWorkloadTagsResponse. # noqa: E501 + + + :return: The tags of this V1ListWorkloadTagsResponse. # noqa: E501 + :rtype: list[V1WorkloadTag] + """ + return self._tags + + @tags.setter + def tags(self, tags: 'list[V1WorkloadTag]'): + """Sets the tags of this V1ListWorkloadTagsResponse. + + + :param tags: The tags of this V1ListWorkloadTagsResponse. # noqa: E501 + :type: list[V1WorkloadTag] + """ + + 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(V1ListWorkloadTagsResponse, 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: 'V1ListWorkloadTagsResponse') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1ListWorkloadTagsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1ListWorkloadTagsResponse') -> 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.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine.py index ecc48413f..7e1d0edbf 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_machine.py @@ -55,6 +55,8 @@ class V1Machine(object): 'env': 'list[V1EnvVar]', 'health': 'V1MachineHealth', 'id': 'str', + 'idrac_address': 'str', + 'inband_subnet': 'str', 'instance_type': 'str', 'management_api_url': 'str', 'mode': 'str', @@ -66,8 +68,10 @@ class V1Machine(object): 'private_address': 'str', 'project_id': 'str', 'provider': 'str', + 'provider_availability_zone': 'str', 'provider_fabric_group': 'str', 'provider_instance_id': 'str', + 'provider_node_id': 'str', 'provider_region': 'str', 'provisioning_method': 'str', 'purpose': 'str', @@ -99,6 +103,8 @@ class V1Machine(object): 'env': 'env', 'health': 'health', 'id': 'id', + 'idrac_address': 'idracAddress', + 'inband_subnet': 'inbandSubnet', 'instance_type': 'instanceType', 'management_api_url': 'managementApiUrl', 'mode': 'mode', @@ -110,8 +116,10 @@ class V1Machine(object): 'private_address': 'privateAddress', 'project_id': 'projectId', 'provider': 'provider', + 'provider_availability_zone': 'providerAvailabilityZone', 'provider_fabric_group': 'providerFabricGroup', 'provider_instance_id': 'providerInstanceId', + 'provider_node_id': 'providerNodeId', 'provider_region': 'providerRegion', 'provisioning_method': 'provisioningMethod', 'purpose': 'purpose', @@ -132,7 +140,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, 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_fabric_group: 'str' =None, provider_instance_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, 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 @@ -144,6 +152,8 @@ def __init__(self, added_by: 'str' =None, address: 'str' =None, auth_token: 'str self._env = None self._health = None self._id = None + self._idrac_address = None + self._inband_subnet = None self._instance_type = None self._management_api_url = None self._mode = None @@ -155,8 +165,10 @@ def __init__(self, added_by: 'str' =None, address: 'str' =None, auth_token: 'str self._private_address = None self._project_id = None self._provider = None + self._provider_availability_zone = None self._provider_fabric_group = None self._provider_instance_id = None + self._provider_node_id = None self._provider_region = None self._provisioning_method = None self._purpose = None @@ -196,6 +208,10 @@ def __init__(self, added_by: 'str' =None, address: 'str' =None, auth_token: 'str self.health = health if id is not None: self.id = id + if idrac_address is not None: + self.idrac_address = idrac_address + if inband_subnet is not None: + self.inband_subnet = inband_subnet if instance_type is not None: self.instance_type = instance_type if management_api_url is not None: @@ -218,10 +234,14 @@ def __init__(self, added_by: 'str' =None, address: 'str' =None, auth_token: 'str self.project_id = project_id if provider is not None: self.provider = provider + if provider_availability_zone is not None: + self.provider_availability_zone = provider_availability_zone if provider_fabric_group is not None: self.provider_fabric_group = provider_fabric_group if provider_instance_id is not None: self.provider_instance_id = provider_instance_id + if provider_node_id is not None: + self.provider_node_id = provider_node_id if provider_region is not None: self.provider_region = provider_region if provisioning_method is not None: @@ -469,6 +489,48 @@ def id(self, id: 'str'): self._id = id + @property + def idrac_address(self) -> 'str': + """Gets the idrac_address of this V1Machine. # noqa: E501 + + + :return: The idrac_address of this V1Machine. # noqa: E501 + :rtype: str + """ + return self._idrac_address + + @idrac_address.setter + def idrac_address(self, idrac_address: 'str'): + """Sets the idrac_address of this V1Machine. + + + :param idrac_address: The idrac_address of this V1Machine. # noqa: E501 + :type: str + """ + + self._idrac_address = idrac_address + + @property + def inband_subnet(self) -> 'str': + """Gets the inband_subnet of this V1Machine. # noqa: E501 + + + :return: The inband_subnet of this V1Machine. # noqa: E501 + :rtype: str + """ + return self._inband_subnet + + @inband_subnet.setter + def inband_subnet(self, inband_subnet: 'str'): + """Sets the inband_subnet of this V1Machine. + + + :param inband_subnet: The inband_subnet of this V1Machine. # noqa: E501 + :type: str + """ + + self._inband_subnet = inband_subnet + @property def instance_type(self) -> 'str': """Gets the instance_type of this V1Machine. # noqa: E501 @@ -700,6 +762,27 @@ def provider(self, provider: 'str'): self._provider = provider + @property + def provider_availability_zone(self) -> 'str': + """Gets the provider_availability_zone of this V1Machine. # noqa: E501 + + + :return: The provider_availability_zone of this V1Machine. # noqa: E501 + :rtype: str + """ + return self._provider_availability_zone + + @provider_availability_zone.setter + def provider_availability_zone(self, provider_availability_zone: 'str'): + """Sets the provider_availability_zone of this V1Machine. + + + :param provider_availability_zone: The provider_availability_zone of this V1Machine. # noqa: E501 + :type: str + """ + + self._provider_availability_zone = provider_availability_zone + @property def provider_fabric_group(self) -> 'str': """Gets the provider_fabric_group of this V1Machine. # noqa: E501 @@ -742,6 +825,27 @@ def provider_instance_id(self, provider_instance_id: 'str'): self._provider_instance_id = provider_instance_id + @property + def provider_node_id(self) -> 'str': + """Gets the provider_node_id of this V1Machine. # noqa: E501 + + + :return: The provider_node_id of this V1Machine. # noqa: E501 + :rtype: str + """ + return self._provider_node_id + + @provider_node_id.setter + def provider_node_id(self, provider_node_id: 'str'): + """Sets the provider_node_id of this V1Machine. + + + :param provider_node_id: The provider_node_id of this V1Machine. # noqa: E501 + :type: str + """ + + self._provider_node_id = provider_node_id + @property def provider_region(self) -> 'str': """Gets the provider_region of this V1Machine. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job.py index 4b0f58339..78e49c3ae 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job.py @@ -62,6 +62,7 @@ class V1MultiMachineJob(object): 'spec': 'V1JobSpec', 'state': 'V1MultiMachineJobState', 'status': 'V1MultiMachineJobStatus', + 'tags': 'list[V1WorkloadTag]', 'target_machine_ids': 'list[str]', 'total_cost': 'float', 'updated_at': 'datetime', @@ -86,13 +87,14 @@ class V1MultiMachineJob(object): 'spec': 'spec', 'state': 'state', 'status': 'status', + 'tags': 'tags', 'target_machine_ids': 'targetMachineIds', 'total_cost': 'totalCost', 'updated_at': 'updatedAt', 'user_id': 'userId' } - def __init__(self, cloudspace_id: 'str' =None, created_at: 'datetime' =None, current_run_attempt: 'int' =None, desired_state: 'V1MultiMachineJobState' =None, fault_tolerance: 'V1MultiMachineJobFaultTolerance' =None, id: 'str' =None, machines: 'int' =None, max_run_attempts: 'int' =None, message: 'str' =None, name: 'str' =None, parent_multi_machine_job_id: 'str' =None, pipeline_id: 'str' =None, project_id: 'str' =None, requires_maintenance: 'bool' =None, spec: 'V1JobSpec' =None, state: 'V1MultiMachineJobState' =None, status: 'V1MultiMachineJobStatus' =None, target_machine_ids: 'list[str]' =None, total_cost: 'float' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501 + def __init__(self, cloudspace_id: 'str' =None, created_at: 'datetime' =None, current_run_attempt: 'int' =None, desired_state: 'V1MultiMachineJobState' =None, fault_tolerance: 'V1MultiMachineJobFaultTolerance' =None, id: 'str' =None, machines: 'int' =None, max_run_attempts: 'int' =None, message: 'str' =None, name: 'str' =None, parent_multi_machine_job_id: 'str' =None, pipeline_id: 'str' =None, project_id: 'str' =None, requires_maintenance: 'bool' =None, spec: 'V1JobSpec' =None, state: 'V1MultiMachineJobState' =None, status: 'V1MultiMachineJobStatus' =None, tags: 'list[V1WorkloadTag]' =None, target_machine_ids: 'list[str]' =None, total_cost: 'float' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501 """V1MultiMachineJob - a model defined in Swagger""" # noqa: E501 self._cloudspace_id = None self._created_at = None @@ -111,6 +113,7 @@ def __init__(self, cloudspace_id: 'str' =None, created_at: 'datetime' =None, cur self._spec = None self._state = None self._status = None + self._tags = None self._target_machine_ids = None self._total_cost = None self._updated_at = None @@ -150,6 +153,8 @@ def __init__(self, cloudspace_id: 'str' =None, created_at: 'datetime' =None, cur self.state = state if status is not None: self.status = status + if tags is not None: + self.tags = tags if target_machine_ids is not None: self.target_machine_ids = target_machine_ids if total_cost is not None: @@ -522,6 +527,27 @@ def status(self, status: 'V1MultiMachineJobStatus'): self._status = status + @property + def tags(self) -> 'list[V1WorkloadTag]': + """Gets the tags of this V1MultiMachineJob. # noqa: E501 + + + :return: The tags of this V1MultiMachineJob. # noqa: E501 + :rtype: list[V1WorkloadTag] + """ + return self._tags + + @tags.setter + def tags(self, tags: 'list[V1WorkloadTag]'): + """Sets the tags of this V1MultiMachineJob. + + + :param tags: The tags of this V1MultiMachineJob. # noqa: E501 + :type: list[V1WorkloadTag] + """ + + self._tags = tags + @property def target_machine_ids(self) -> 'list[str]': """Gets the target_machine_ids of this V1MultiMachineJob. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_named_filter_value.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_named_filter_value.py new file mode 100644 index 000000000..47722b51c --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_named_filter_value.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 V1NamedFilterValue(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' + } + + attribute_map = { + 'id': 'id', + 'name': 'name' + } + + def __init__(self, id: 'str' =None, name: 'str' =None): # noqa: E501 + """V1NamedFilterValue - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self.discriminator = None + if id is not None: + self.id = id + if name is not None: + self.name = name + + @property + def id(self) -> 'str': + """Gets the id of this V1NamedFilterValue. # noqa: E501 + + + :return: The id of this V1NamedFilterValue. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id: 'str'): + """Sets the id of this V1NamedFilterValue. + + + :param id: The id of this V1NamedFilterValue. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self) -> 'str': + """Gets the name of this V1NamedFilterValue. # noqa: E501 + + + :return: The name of this V1NamedFilterValue. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name: 'str'): + """Sets the name of this V1NamedFilterValue. + + + :param name: The name of this V1NamedFilterValue. # noqa: E501 + :type: str + """ + + self._name = 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(V1NamedFilterValue, 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: 'V1NamedFilterValue') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1NamedFilterValue): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1NamedFilterValue') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_new_feature.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_new_feature.py index 4c7f54657..76b85fb91 100644 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_new_feature.py +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_new_feature.py @@ -45,6 +45,7 @@ class V1NewFeature(object): and the value is json key in definition. """ swagger_types = { + 'badge_text': 'str', 'banner_end_time': 'datetime', 'banner_text': 'str', 'banner_url_copy': 'str', @@ -52,17 +53,20 @@ class V1NewFeature(object): 'cta_text': 'str', 'description': 'str', 'feature_name': 'str', + 'hide_close_button': 'bool', 'highlights': 'list[str]', 'id': 'str', 'image_url': 'str', 'learn_more_url': 'str', 'poster_url': 'str', + 'show_on_page_load': 'bool', 'title': 'str', 'video_url': 'str', 'viewed': 'bool' } attribute_map = { + 'badge_text': 'badgeText', 'banner_end_time': 'bannerEndTime', 'banner_text': 'bannerText', 'banner_url_copy': 'bannerUrlCopy', @@ -70,18 +74,21 @@ class V1NewFeature(object): 'cta_text': 'ctaText', 'description': 'description', 'feature_name': 'featureName', + 'hide_close_button': 'hideCloseButton', 'highlights': 'highlights', 'id': 'id', 'image_url': 'imageUrl', 'learn_more_url': 'learnMoreUrl', 'poster_url': 'posterUrl', + 'show_on_page_load': 'showOnPageLoad', 'title': 'title', 'video_url': 'videoUrl', 'viewed': 'viewed' } - def __init__(self, banner_end_time: 'datetime' =None, banner_text: 'str' =None, banner_url_copy: 'str' =None, created_at: 'datetime' =None, cta_text: 'str' =None, description: 'str' =None, feature_name: 'str' =None, highlights: 'list[str]' =None, id: 'str' =None, image_url: 'str' =None, learn_more_url: 'str' =None, poster_url: 'str' =None, title: 'str' =None, video_url: 'str' =None, viewed: 'bool' =None): # noqa: E501 + def __init__(self, badge_text: 'str' =None, banner_end_time: 'datetime' =None, banner_text: 'str' =None, banner_url_copy: 'str' =None, created_at: 'datetime' =None, cta_text: 'str' =None, description: 'str' =None, feature_name: 'str' =None, hide_close_button: 'bool' =None, highlights: 'list[str]' =None, id: 'str' =None, image_url: 'str' =None, learn_more_url: 'str' =None, poster_url: 'str' =None, show_on_page_load: 'bool' =None, title: 'str' =None, video_url: 'str' =None, viewed: 'bool' =None): # noqa: E501 """V1NewFeature - a model defined in Swagger""" # noqa: E501 + self._badge_text = None self._banner_end_time = None self._banner_text = None self._banner_url_copy = None @@ -89,15 +96,19 @@ def __init__(self, banner_end_time: 'datetime' =None, banner_text: 'str' =None, self._cta_text = None self._description = None self._feature_name = None + self._hide_close_button = None self._highlights = None self._id = None self._image_url = None self._learn_more_url = None self._poster_url = None + self._show_on_page_load = None self._title = None self._video_url = None self._viewed = None self.discriminator = None + if badge_text is not None: + self.badge_text = badge_text if banner_end_time is not None: self.banner_end_time = banner_end_time if banner_text is not None: @@ -112,6 +123,8 @@ def __init__(self, banner_end_time: 'datetime' =None, banner_text: 'str' =None, self.description = description if feature_name is not None: self.feature_name = feature_name + if hide_close_button is not None: + self.hide_close_button = hide_close_button if highlights is not None: self.highlights = highlights if id is not None: @@ -122,6 +135,8 @@ def __init__(self, banner_end_time: 'datetime' =None, banner_text: 'str' =None, self.learn_more_url = learn_more_url if poster_url is not None: self.poster_url = poster_url + if show_on_page_load is not None: + self.show_on_page_load = show_on_page_load if title is not None: self.title = title if video_url is not None: @@ -129,6 +144,27 @@ def __init__(self, banner_end_time: 'datetime' =None, banner_text: 'str' =None, if viewed is not None: self.viewed = viewed + @property + def badge_text(self) -> 'str': + """Gets the badge_text of this V1NewFeature. # noqa: E501 + + + :return: The badge_text of this V1NewFeature. # noqa: E501 + :rtype: str + """ + return self._badge_text + + @badge_text.setter + def badge_text(self, badge_text: 'str'): + """Sets the badge_text of this V1NewFeature. + + + :param badge_text: The badge_text of this V1NewFeature. # noqa: E501 + :type: str + """ + + self._badge_text = badge_text + @property def banner_end_time(self) -> 'datetime': """Gets the banner_end_time of this V1NewFeature. # noqa: E501 @@ -276,6 +312,27 @@ def feature_name(self, feature_name: 'str'): self._feature_name = feature_name + @property + def hide_close_button(self) -> 'bool': + """Gets the hide_close_button of this V1NewFeature. # noqa: E501 + + + :return: The hide_close_button of this V1NewFeature. # noqa: E501 + :rtype: bool + """ + return self._hide_close_button + + @hide_close_button.setter + def hide_close_button(self, hide_close_button: 'bool'): + """Sets the hide_close_button of this V1NewFeature. + + + :param hide_close_button: The hide_close_button of this V1NewFeature. # noqa: E501 + :type: bool + """ + + self._hide_close_button = hide_close_button + @property def highlights(self) -> 'list[str]': """Gets the highlights of this V1NewFeature. # noqa: E501 @@ -381,6 +438,27 @@ def poster_url(self, poster_url: 'str'): self._poster_url = poster_url + @property + def show_on_page_load(self) -> 'bool': + """Gets the show_on_page_load of this V1NewFeature. # noqa: E501 + + + :return: The show_on_page_load of this V1NewFeature. # noqa: E501 + :rtype: bool + """ + return self._show_on_page_load + + @show_on_page_load.setter + def show_on_page_load(self, show_on_page_load: 'bool'): + """Sets the show_on_page_load of this V1NewFeature. + + + :param show_on_page_load: The show_on_page_load of this V1NewFeature. # noqa: E501 + :type: bool + """ + + self._show_on_page_load = show_on_page_load + @property def title(self) -> 'str': """Gets the title of this V1NewFeature. # 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 f9966f7e1..c7900a538 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 @@ -64,6 +64,7 @@ class V1ServerStatus(object): 'stopped_at': 'datetime', 'updated_at': 'datetime', 'workload_container_restarts_count': 'str', + 'workload_runtime': 'str', 'workload_state': 'str', 'workload_state_details': 'str', 'workload_taken_at': 'datetime' @@ -89,12 +90,13 @@ class V1ServerStatus(object): 'stopped_at': 'stoppedAt', 'updated_at': 'updatedAt', 'workload_container_restarts_count': 'workloadContainerRestartsCount', + 'workload_runtime': 'workloadRuntime', 'workload_state': 'workloadState', 'workload_state_details': 'workloadStateDetails', '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_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, 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 @@ -115,6 +117,7 @@ def __init__(self, alert: 'V1ServerAlert' =None, allocate_duration_seconds: 'str self._stopped_at = None self._updated_at = None self._workload_container_restarts_count = None + self._workload_runtime = None self._workload_state = None self._workload_state_details = None self._workload_taken_at = None @@ -157,6 +160,8 @@ def __init__(self, alert: 'V1ServerAlert' =None, allocate_duration_seconds: 'str self.updated_at = updated_at if workload_container_restarts_count is not None: self.workload_container_restarts_count = workload_container_restarts_count + if workload_runtime is not None: + self.workload_runtime = workload_runtime if workload_state is not None: self.workload_state = workload_state if workload_state_details is not None: @@ -565,6 +570,29 @@ def workload_container_restarts_count(self, workload_container_restarts_count: ' self._workload_container_restarts_count = workload_container_restarts_count + @property + def workload_runtime(self) -> 'str': + """Gets the workload_runtime of this V1ServerStatus. # noqa: E501 + + How the guest workload was started: \"docker\", \"runc\", or \"runsc\". # noqa: E501 + + :return: The workload_runtime of this V1ServerStatus. # noqa: E501 + :rtype: str + """ + return self._workload_runtime + + @workload_runtime.setter + def workload_runtime(self, workload_runtime: 'str'): + """Sets the workload_runtime of this V1ServerStatus. + + How the guest workload was started: \"docker\", \"runc\", or \"runsc\". # noqa: E501 + + :param workload_runtime: The workload_runtime of this V1ServerStatus. # noqa: E501 + :type: str + """ + + self._workload_runtime = workload_runtime + @property def workload_state(self) -> 'str': """Gets the workload_state of this V1ServerStatus. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_set_workload_tags_response.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_set_workload_tags_response.py new file mode 100644 index 000000000..222c6ce76 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_set_workload_tags_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 V1SetWorkloadTagsResponse(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 = { + 'tags': 'list[V1WorkloadTag]' + } + + attribute_map = { + 'tags': 'tags' + } + + def __init__(self, tags: 'list[V1WorkloadTag]' =None): # noqa: E501 + """V1SetWorkloadTagsResponse - a model defined in Swagger""" # noqa: E501 + self._tags = None + self.discriminator = None + if tags is not None: + self.tags = tags + + @property + def tags(self) -> 'list[V1WorkloadTag]': + """Gets the tags of this V1SetWorkloadTagsResponse. # noqa: E501 + + + :return: The tags of this V1SetWorkloadTagsResponse. # noqa: E501 + :rtype: list[V1WorkloadTag] + """ + return self._tags + + @tags.setter + def tags(self, tags: 'list[V1WorkloadTag]'): + """Sets the tags of this V1SetWorkloadTagsResponse. + + + :param tags: The tags of this V1SetWorkloadTagsResponse. # noqa: E501 + :type: list[V1WorkloadTag] + """ + + 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(V1SetWorkloadTagsResponse, 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: 'V1SetWorkloadTagsResponse') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1SetWorkloadTagsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1SetWorkloadTagsResponse') -> bool: + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_transfer_user_balance_request.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_transfer_user_balance_request.py deleted file mode 100644 index 0c152cca9..000000000 --- a/python/lightning_sdk/lightning_cloud/openapi/models/v1_transfer_user_balance_request.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 V1TransferUserBalanceRequest(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 = { - 'amount': 'float', - 'org_dst_id': 'str', - 'project_dst_id': 'str', - 'project_src_id': 'str', - 'user_dst': 'bool', - 'user_src': 'bool' - } - - attribute_map = { - 'amount': 'amount', - 'org_dst_id': 'orgDstId', - 'project_dst_id': 'projectDstId', - 'project_src_id': 'projectSrcId', - 'user_dst': 'userDst', - 'user_src': 'userSrc' - } - - def __init__(self, amount: 'float' =None, org_dst_id: 'str' =None, project_dst_id: 'str' =None, project_src_id: 'str' =None, user_dst: 'bool' =None, user_src: 'bool' =None): # noqa: E501 - """V1TransferUserBalanceRequest - a model defined in Swagger""" # noqa: E501 - self._amount = None - self._org_dst_id = None - self._project_dst_id = None - self._project_src_id = None - self._user_dst = None - self._user_src = None - self.discriminator = None - if amount is not None: - self.amount = amount - if org_dst_id is not None: - self.org_dst_id = org_dst_id - if project_dst_id is not None: - self.project_dst_id = project_dst_id - if project_src_id is not None: - self.project_src_id = project_src_id - if user_dst is not None: - self.user_dst = user_dst - if user_src is not None: - self.user_src = user_src - - @property - def amount(self) -> 'float': - """Gets the amount of this V1TransferUserBalanceRequest. # noqa: E501 - - - :return: The amount of this V1TransferUserBalanceRequest. # noqa: E501 - :rtype: float - """ - return self._amount - - @amount.setter - def amount(self, amount: 'float'): - """Sets the amount of this V1TransferUserBalanceRequest. - - - :param amount: The amount of this V1TransferUserBalanceRequest. # noqa: E501 - :type: float - """ - - self._amount = amount - - @property - def org_dst_id(self) -> 'str': - """Gets the org_dst_id of this V1TransferUserBalanceRequest. # noqa: E501 - - - :return: The org_dst_id of this V1TransferUserBalanceRequest. # noqa: E501 - :rtype: str - """ - return self._org_dst_id - - @org_dst_id.setter - def org_dst_id(self, org_dst_id: 'str'): - """Sets the org_dst_id of this V1TransferUserBalanceRequest. - - - :param org_dst_id: The org_dst_id of this V1TransferUserBalanceRequest. # noqa: E501 - :type: str - """ - - self._org_dst_id = org_dst_id - - @property - def project_dst_id(self) -> 'str': - """Gets the project_dst_id of this V1TransferUserBalanceRequest. # noqa: E501 - - - :return: The project_dst_id of this V1TransferUserBalanceRequest. # noqa: E501 - :rtype: str - """ - return self._project_dst_id - - @project_dst_id.setter - def project_dst_id(self, project_dst_id: 'str'): - """Sets the project_dst_id of this V1TransferUserBalanceRequest. - - - :param project_dst_id: The project_dst_id of this V1TransferUserBalanceRequest. # noqa: E501 - :type: str - """ - - self._project_dst_id = project_dst_id - - @property - def project_src_id(self) -> 'str': - """Gets the project_src_id of this V1TransferUserBalanceRequest. # noqa: E501 - - - :return: The project_src_id of this V1TransferUserBalanceRequest. # noqa: E501 - :rtype: str - """ - return self._project_src_id - - @project_src_id.setter - def project_src_id(self, project_src_id: 'str'): - """Sets the project_src_id of this V1TransferUserBalanceRequest. - - - :param project_src_id: The project_src_id of this V1TransferUserBalanceRequest. # noqa: E501 - :type: str - """ - - self._project_src_id = project_src_id - - @property - def user_dst(self) -> 'bool': - """Gets the user_dst of this V1TransferUserBalanceRequest. # noqa: E501 - - - :return: The user_dst of this V1TransferUserBalanceRequest. # noqa: E501 - :rtype: bool - """ - return self._user_dst - - @user_dst.setter - def user_dst(self, user_dst: 'bool'): - """Sets the user_dst of this V1TransferUserBalanceRequest. - - - :param user_dst: The user_dst of this V1TransferUserBalanceRequest. # noqa: E501 - :type: bool - """ - - self._user_dst = user_dst - - @property - def user_src(self) -> 'bool': - """Gets the user_src of this V1TransferUserBalanceRequest. # noqa: E501 - - - :return: The user_src of this V1TransferUserBalanceRequest. # noqa: E501 - :rtype: bool - """ - return self._user_src - - @user_src.setter - def user_src(self, user_src: 'bool'): - """Sets the user_src of this V1TransferUserBalanceRequest. - - - :param user_src: The user_src of this V1TransferUserBalanceRequest. # noqa: E501 - :type: bool - """ - - self._user_src = user_src - - 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(V1TransferUserBalanceRequest, 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: 'V1TransferUserBalanceRequest') -> bool: - """Returns true if both objects are equal""" - if not isinstance(other, V1TransferUserBalanceRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'V1TransferUserBalanceRequest') -> 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 0afa978e3..3c80d2bdb 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 @@ -118,7 +118,6 @@ class V1UserFeatures(object): 'f347': 'bool', 'f348': 'bool', 'f349': 'bool', - 'f351': 'bool', 'f352': 'bool', 'f353': 'bool', 'f355': 'bool', @@ -126,7 +125,6 @@ class V1UserFeatures(object): 'f357': 'bool', 'f358': 'bool', 'f359': 'bool', - 'f360': 'bool', 'f361': 'bool', 'f362': 'bool', 'f363': 'bool', @@ -141,6 +139,12 @@ class V1UserFeatures(object): 'f373': 'bool', 'f374': 'bool', 'f375': 'bool', + 'f376': 'bool', + 'f377': 'bool', + 'f378': 'bool', + 'f379': 'bool', + 'f380': 'bool', + 'f381': 'bool', 'fair_share': 'bool', 'featured_studios_admin': 'bool', 'job_artifacts_v2': 'bool', @@ -250,7 +254,6 @@ class V1UserFeatures(object): 'f347': 'f347', 'f348': 'f348', 'f349': 'f349', - 'f351': 'f351', 'f352': 'f352', 'f353': 'f353', 'f355': 'f355', @@ -258,7 +261,6 @@ class V1UserFeatures(object): 'f357': 'f357', 'f358': 'f358', 'f359': 'f359', - 'f360': 'f360', 'f361': 'f361', 'f362': 'f362', 'f363': 'f363', @@ -273,6 +275,12 @@ class V1UserFeatures(object): 'f373': 'f373', 'f374': 'f374', 'f375': 'f375', + 'f376': 'f376', + 'f377': 'f377', + 'f378': 'f378', + 'f379': 'f379', + 'f380': 'f380', + 'f381': 'f381', 'fair_share': 'fairShare', 'featured_studios_admin': 'featuredStudiosAdmin', 'job_artifacts_v2': 'jobArtifactsV2', @@ -308,7 +316,7 @@ class V1UserFeatures(object): 'vultr': 'vultr' } - 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, f351: 'bool' =None, f352: 'bool' =None, f353: 'bool' =None, f355: 'bool' =None, f356: 'bool' =None, f357: 'bool' =None, f358: 'bool' =None, f359: 'bool' =None, f360: '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, 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, 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, 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 """V1UserFeatures - a model defined in Swagger""" # noqa: E501 self._affiliate_links = None self._ai_hub_monetization = None @@ -383,7 +391,6 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N self._f347 = None self._f348 = None self._f349 = None - self._f351 = None self._f352 = None self._f353 = None self._f355 = None @@ -391,7 +398,6 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N self._f357 = None self._f358 = None self._f359 = None - self._f360 = None self._f361 = None self._f362 = None self._f363 = None @@ -406,6 +412,12 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N 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._fair_share = None self._featured_studios_admin = None self._job_artifacts_v2 = None @@ -586,8 +598,6 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N self.f348 = f348 if f349 is not None: self.f349 = f349 - if f351 is not None: - self.f351 = f351 if f352 is not None: self.f352 = f352 if f353 is not None: @@ -602,8 +612,6 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N self.f358 = f358 if f359 is not None: self.f359 = f359 - if f360 is not None: - self.f360 = f360 if f361 is not None: self.f361 = f361 if f362 is not None: @@ -632,6 +640,18 @@ def __init__(self, affiliate_links: 'bool' =None, ai_hub_monetization: 'bool' =N 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 fair_share is not None: self.fair_share = fair_share if featured_studios_admin is not None: @@ -2232,27 +2252,6 @@ def f349(self, f349: 'bool'): self._f349 = f349 - @property - def f351(self) -> 'bool': - """Gets the f351 of this V1UserFeatures. # noqa: E501 - - - :return: The f351 of this V1UserFeatures. # noqa: E501 - :rtype: bool - """ - return self._f351 - - @f351.setter - def f351(self, f351: 'bool'): - """Sets the f351 of this V1UserFeatures. - - - :param f351: The f351 of this V1UserFeatures. # noqa: E501 - :type: bool - """ - - self._f351 = f351 - @property def f352(self) -> 'bool': """Gets the f352 of this V1UserFeatures. # noqa: E501 @@ -2400,27 +2399,6 @@ def f359(self, f359: 'bool'): self._f359 = f359 - @property - def f360(self) -> 'bool': - """Gets the f360 of this V1UserFeatures. # noqa: E501 - - - :return: The f360 of this V1UserFeatures. # noqa: E501 - :rtype: bool - """ - return self._f360 - - @f360.setter - def f360(self, f360: 'bool'): - """Sets the f360 of this V1UserFeatures. - - - :param f360: The f360 of this V1UserFeatures. # noqa: E501 - :type: bool - """ - - self._f360 = f360 - @property def f361(self) -> 'bool': """Gets the f361 of this V1UserFeatures. # noqa: E501 @@ -2715,6 +2693,132 @@ def f375(self, f375: 'bool'): self._f375 = f375 + @property + def f376(self) -> 'bool': + """Gets the f376 of this V1UserFeatures. # noqa: E501 + + + :return: The f376 of this V1UserFeatures. # noqa: E501 + :rtype: bool + """ + return self._f376 + + @f376.setter + def f376(self, f376: 'bool'): + """Sets the f376 of this V1UserFeatures. + + + :param f376: The f376 of this V1UserFeatures. # noqa: E501 + :type: bool + """ + + self._f376 = f376 + + @property + def f377(self) -> 'bool': + """Gets the f377 of this V1UserFeatures. # noqa: E501 + + + :return: The f377 of this V1UserFeatures. # noqa: E501 + :rtype: bool + """ + return self._f377 + + @f377.setter + def f377(self, f377: 'bool'): + """Sets the f377 of this V1UserFeatures. + + + :param f377: The f377 of this V1UserFeatures. # noqa: E501 + :type: bool + """ + + self._f377 = f377 + + @property + def f378(self) -> 'bool': + """Gets the f378 of this V1UserFeatures. # noqa: E501 + + + :return: The f378 of this V1UserFeatures. # noqa: E501 + :rtype: bool + """ + return self._f378 + + @f378.setter + def f378(self, f378: 'bool'): + """Sets the f378 of this V1UserFeatures. + + + :param f378: The f378 of this V1UserFeatures. # noqa: E501 + :type: bool + """ + + self._f378 = f378 + + @property + def f379(self) -> 'bool': + """Gets the f379 of this V1UserFeatures. # noqa: E501 + + + :return: The f379 of this V1UserFeatures. # noqa: E501 + :rtype: bool + """ + return self._f379 + + @f379.setter + def f379(self, f379: 'bool'): + """Sets the f379 of this V1UserFeatures. + + + :param f379: The f379 of this V1UserFeatures. # noqa: E501 + :type: bool + """ + + self._f379 = f379 + + @property + def f380(self) -> 'bool': + """Gets the f380 of this V1UserFeatures. # noqa: E501 + + + :return: The f380 of this V1UserFeatures. # noqa: E501 + :rtype: bool + """ + return self._f380 + + @f380.setter + def f380(self, f380: 'bool'): + """Sets the f380 of this V1UserFeatures. + + + :param f380: The f380 of this V1UserFeatures. # noqa: E501 + :type: bool + """ + + self._f380 = f380 + + @property + def f381(self) -> 'bool': + """Gets the f381 of this V1UserFeatures. # noqa: E501 + + + :return: The f381 of this V1UserFeatures. # noqa: E501 + :rtype: bool + """ + return self._f381 + + @f381.setter + def f381(self, f381: 'bool'): + """Sets the f381 of this V1UserFeatures. + + + :param f381: The f381 of this V1UserFeatures. # noqa: E501 + :type: bool + """ + + self._f381 = f381 + @property def fair_share(self) -> 'bool': """Gets the fair_share of this V1UserFeatures. # noqa: E501 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 13611ae11..ef34e3a3b 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 @@ -68,6 +68,8 @@ class V1VMHealth(object): 'ssh_error': 'str', 'ssh_reachable': 'bool', 'status_details': 'str', + 'user_ssh_error': 'str', + 'user_ssh_reachable': 'bool', 'vm_id': 'str', 'xids': 'list[V1XidEvent]' } @@ -96,11 +98,13 @@ class V1VMHealth(object): 'ssh_error': 'sshError', 'ssh_reachable': 'sshReachable', 'status_details': 'statusDetails', + 'user_ssh_error': 'userSshError', + 'user_ssh_reachable': 'userSshReachable', 'vm_id': 'vmId', '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, 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, 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 @@ -125,6 +129,8 @@ def __init__(self, alive: 'bool' =None, ch_log_failures: 'list[str]' =None, ch_l self._ssh_error = None self._ssh_reachable = None self._status_details = None + self._user_ssh_error = None + self._user_ssh_reachable = None self._vm_id = None self._xids = None self.discriminator = None @@ -174,6 +180,10 @@ def __init__(self, alive: 'bool' =None, ch_log_failures: 'list[str]' =None, ch_l self.ssh_reachable = ssh_reachable if status_details is not None: self.status_details = status_details + if user_ssh_error is not None: + self.user_ssh_error = user_ssh_error + if user_ssh_reachable is not None: + self.user_ssh_reachable = user_ssh_reachable if vm_id is not None: self.vm_id = vm_id if xids is not None: @@ -676,6 +686,52 @@ def status_details(self, status_details: 'str'): self._status_details = status_details + @property + def user_ssh_error(self) -> 'str': + """Gets the user_ssh_error of this V1VMHealth. # noqa: E501 + + Failure returned while checking the Studio SSH endpoint. # noqa: E501 + + :return: The user_ssh_error of this V1VMHealth. # noqa: E501 + :rtype: str + """ + return self._user_ssh_error + + @user_ssh_error.setter + def user_ssh_error(self, user_ssh_error: 'str'): + """Sets the user_ssh_error of this V1VMHealth. + + Failure returned while checking the Studio SSH endpoint. # noqa: E501 + + :param user_ssh_error: The user_ssh_error of this V1VMHealth. # noqa: E501 + :type: str + """ + + self._user_ssh_error = user_ssh_error + + @property + def user_ssh_reachable(self) -> 'bool': + """Gets the user_ssh_reachable of this V1VMHealth. # noqa: E501 + + Studio SSH endpoint reachability on guest port 2222. This is separate from ssh_reachable, which checks the guest's administrative SSH service on port 22. # noqa: E501 + + :return: The user_ssh_reachable of this V1VMHealth. # noqa: E501 + :rtype: bool + """ + return self._user_ssh_reachable + + @user_ssh_reachable.setter + def user_ssh_reachable(self, user_ssh_reachable: 'bool'): + """Sets the user_ssh_reachable of this V1VMHealth. + + Studio SSH endpoint reachability on guest port 2222. This is separate from ssh_reachable, which checks the guest's administrative SSH service on port 22. # noqa: E501 + + :param user_ssh_reachable: The user_ssh_reachable of this V1VMHealth. # noqa: E501 + :type: bool + """ + + self._user_ssh_reachable = user_ssh_reachable + @property def vm_id(self) -> 'str': """Gets the vm_id of this V1VMHealth. # noqa: E501 diff --git a/python/lightning_sdk/lightning_cloud/openapi/models/v1_workload_tag.py b/python/lightning_sdk/lightning_cloud/openapi/models/v1_workload_tag.py new file mode 100644 index 000000000..e2f97a069 --- /dev/null +++ b/python/lightning_sdk/lightning_cloud/openapi/models/v1_workload_tag.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 V1WorkloadTag(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 = { + 'created_at': 'datetime', + 'created_by': 'str', + 'id': 'str', + 'name': 'str', + 'project_id': 'str', + 'usage_count': 'str' + } + + attribute_map = { + 'created_at': 'createdAt', + 'created_by': 'createdBy', + 'id': 'id', + 'name': 'name', + 'project_id': 'projectId', + 'usage_count': 'usageCount' + } + + def __init__(self, created_at: 'datetime' =None, created_by: 'str' =None, id: 'str' =None, name: 'str' =None, project_id: 'str' =None, usage_count: 'str' =None): # noqa: E501 + """V1WorkloadTag - a model defined in Swagger""" # noqa: E501 + self._created_at = None + self._created_by = None + self._id = None + self._name = None + self._project_id = None + self._usage_count = None + self.discriminator = None + if created_at is not None: + self.created_at = created_at + if created_by is not None: + self.created_by = created_by + if id is not None: + self.id = id + if name is not None: + self.name = name + if project_id is not None: + self.project_id = project_id + if usage_count is not None: + self.usage_count = usage_count + + @property + def created_at(self) -> 'datetime': + """Gets the created_at of this V1WorkloadTag. # noqa: E501 + + + :return: The created_at of this V1WorkloadTag. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at: 'datetime'): + """Sets the created_at of this V1WorkloadTag. + + + :param created_at: The created_at of this V1WorkloadTag. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def created_by(self) -> 'str': + """Gets the created_by of this V1WorkloadTag. # noqa: E501 + + + :return: The created_by of this V1WorkloadTag. # noqa: E501 + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by: 'str'): + """Sets the created_by of this V1WorkloadTag. + + + :param created_by: The created_by of this V1WorkloadTag. # noqa: E501 + :type: str + """ + + self._created_by = created_by + + @property + def id(self) -> 'str': + """Gets the id of this V1WorkloadTag. # noqa: E501 + + + :return: The id of this V1WorkloadTag. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id: 'str'): + """Sets the id of this V1WorkloadTag. + + + :param id: The id of this V1WorkloadTag. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self) -> 'str': + """Gets the name of this V1WorkloadTag. # noqa: E501 + + + :return: The name of this V1WorkloadTag. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name: 'str'): + """Sets the name of this V1WorkloadTag. + + + :param name: The name of this V1WorkloadTag. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def project_id(self) -> 'str': + """Gets the project_id of this V1WorkloadTag. # noqa: E501 + + + :return: The project_id of this V1WorkloadTag. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id: 'str'): + """Sets the project_id of this V1WorkloadTag. + + + :param project_id: The project_id of this V1WorkloadTag. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def usage_count(self) -> 'str': + """Gets the usage_count of this V1WorkloadTag. # noqa: E501 + + + :return: The usage_count of this V1WorkloadTag. # noqa: E501 + :rtype: str + """ + return self._usage_count + + @usage_count.setter + def usage_count(self, usage_count: 'str'): + """Sets the usage_count of this V1WorkloadTag. + + + :param usage_count: The usage_count of this V1WorkloadTag. # noqa: E501 + :type: str + """ + + self._usage_count = usage_count + + 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(V1WorkloadTag, 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: 'V1WorkloadTag') -> bool: + """Returns true if both objects are equal""" + if not isinstance(other, V1WorkloadTag): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'V1WorkloadTag') -> bool: + """Returns true if both objects are not equal""" + return not self == other