diff --git a/cdp-sdk-go/Makefile b/cdp-sdk-go/Makefile index 5637d9c2..598e622f 100644 --- a/cdp-sdk-go/Makefile +++ b/cdp-sdk-go/Makefile @@ -11,7 +11,7 @@ GO_FLAGS:="" SWAGGER_REPO_RAW=https://raw.githubusercontent.com/cloudera/cdp-dev-docs/ -API_DEFINITION_TAG ?= cdp-api-0.9.125 +API_DEFINITION_TAG ?= cdp-api-0.9.128 SWAGGER=$(SWAGGER_REPO_RAW)/$(API_DEFINITION_TAG)/api-docs-beta/swagger all: check-go test build diff --git a/cdp-sdk-go/gen/datahub/client/operations/operations_client.go b/cdp-sdk-go/gen/datahub/client/operations/operations_client.go index d95f4b92..2d9f6db4 100644 --- a/cdp-sdk-go/gen/datahub/client/operations/operations_client.go +++ b/cdp-sdk-go/gen/datahub/client/operations/operations_client.go @@ -168,6 +168,8 @@ type ClientService interface { SetCatalog(params *SetCatalogParams, opts ...ClientOption) (*SetCatalogOK, error) + SetDefaultJavaVersion(params *SetDefaultJavaVersionParams, opts ...ClientOption) (*SetDefaultJavaVersionOK, error) + StartCluster(params *StartClusterParams, opts ...ClientOption) (*StartClusterOK, error) StartClusterVerticalScaling(params *StartClusterVerticalScalingParams, opts ...ClientOption) (*StartClusterVerticalScalingOK, error) @@ -2420,6 +2422,45 @@ func (a *Client) SetCatalog(params *SetCatalogParams, opts ...ClientOption) (*Se return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +SetDefaultJavaVersion configures the default java version for the data hub + +Configures the default Java version for the Data Hub. This command updates the system's default Java version and will restart both the Cluster Manager and the services. +*/ +func (a *Client) SetDefaultJavaVersion(params *SetDefaultJavaVersionParams, opts ...ClientOption) (*SetDefaultJavaVersionOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewSetDefaultJavaVersionParams() + } + op := &runtime.ClientOperation{ + ID: "setDefaultJavaVersion", + Method: "POST", + PathPattern: "/api/v1/datahub/setDefaultJavaVersion", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &SetDefaultJavaVersionReader{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 + } + success, ok := result.(*SetDefaultJavaVersionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*SetDefaultJavaVersionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* StartCluster starts a stopped workload cluster diff --git a/cdp-sdk-go/gen/datahub/client/operations/set_default_java_version_parameters.go b/cdp-sdk-go/gen/datahub/client/operations/set_default_java_version_parameters.go new file mode 100644 index 00000000..bc27c2db --- /dev/null +++ b/cdp-sdk-go/gen/datahub/client/operations/set_default_java_version_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/datahub/models" +) + +// NewSetDefaultJavaVersionParams creates a new SetDefaultJavaVersionParams 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 NewSetDefaultJavaVersionParams() *SetDefaultJavaVersionParams { + return &SetDefaultJavaVersionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewSetDefaultJavaVersionParamsWithTimeout creates a new SetDefaultJavaVersionParams object +// with the ability to set a timeout on a request. +func NewSetDefaultJavaVersionParamsWithTimeout(timeout time.Duration) *SetDefaultJavaVersionParams { + return &SetDefaultJavaVersionParams{ + timeout: timeout, + } +} + +// NewSetDefaultJavaVersionParamsWithContext creates a new SetDefaultJavaVersionParams object +// with the ability to set a context for a request. +func NewSetDefaultJavaVersionParamsWithContext(ctx context.Context) *SetDefaultJavaVersionParams { + return &SetDefaultJavaVersionParams{ + Context: ctx, + } +} + +// NewSetDefaultJavaVersionParamsWithHTTPClient creates a new SetDefaultJavaVersionParams object +// with the ability to set a custom HTTPClient for a request. +func NewSetDefaultJavaVersionParamsWithHTTPClient(client *http.Client) *SetDefaultJavaVersionParams { + return &SetDefaultJavaVersionParams{ + HTTPClient: client, + } +} + +/* +SetDefaultJavaVersionParams contains all the parameters to send to the API endpoint + + for the set default java version operation. + + Typically these are written to a http.Request. +*/ +type SetDefaultJavaVersionParams struct { + + // Input. + Input *models.SetDefaultJavaVersionRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the set default java version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *SetDefaultJavaVersionParams) WithDefaults() *SetDefaultJavaVersionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the set default java version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *SetDefaultJavaVersionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the set default java version params +func (o *SetDefaultJavaVersionParams) WithTimeout(timeout time.Duration) *SetDefaultJavaVersionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the set default java version params +func (o *SetDefaultJavaVersionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the set default java version params +func (o *SetDefaultJavaVersionParams) WithContext(ctx context.Context) *SetDefaultJavaVersionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the set default java version params +func (o *SetDefaultJavaVersionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the set default java version params +func (o *SetDefaultJavaVersionParams) WithHTTPClient(client *http.Client) *SetDefaultJavaVersionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the set default java version params +func (o *SetDefaultJavaVersionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInput adds the input to the set default java version params +func (o *SetDefaultJavaVersionParams) WithInput(input *models.SetDefaultJavaVersionRequest) *SetDefaultJavaVersionParams { + o.SetInput(input) + return o +} + +// SetInput adds the input to the set default java version params +func (o *SetDefaultJavaVersionParams) SetInput(input *models.SetDefaultJavaVersionRequest) { + o.Input = input +} + +// WriteToRequest writes these params to a swagger request +func (o *SetDefaultJavaVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Input != nil { + if err := r.SetBodyParam(o.Input); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/cdp-sdk-go/gen/datahub/client/operations/set_default_java_version_responses.go b/cdp-sdk-go/gen/datahub/client/operations/set_default_java_version_responses.go new file mode 100644 index 00000000..e204ced9 --- /dev/null +++ b/cdp-sdk-go/gen/datahub/client/operations/set_default_java_version_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/datahub/models" +) + +// SetDefaultJavaVersionReader is a Reader for the SetDefaultJavaVersion structure. +type SetDefaultJavaVersionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *SetDefaultJavaVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewSetDefaultJavaVersionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewSetDefaultJavaVersionDefault(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 + } +} + +// NewSetDefaultJavaVersionOK creates a SetDefaultJavaVersionOK with default headers values +func NewSetDefaultJavaVersionOK() *SetDefaultJavaVersionOK { + return &SetDefaultJavaVersionOK{} +} + +/* +SetDefaultJavaVersionOK describes a response with status code 200, with default header values. + +Expected response to a valid request. +*/ +type SetDefaultJavaVersionOK struct { + Payload *models.SetDefaultJavaVersionResponse +} + +// IsSuccess returns true when this set default java version o k response has a 2xx status code +func (o *SetDefaultJavaVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this set default java version o k response has a 3xx status code +func (o *SetDefaultJavaVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this set default java version o k response has a 4xx status code +func (o *SetDefaultJavaVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this set default java version o k response has a 5xx status code +func (o *SetDefaultJavaVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this set default java version o k response a status code equal to that given +func (o *SetDefaultJavaVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the set default java version o k response +func (o *SetDefaultJavaVersionOK) Code() int { + return 200 +} + +func (o *SetDefaultJavaVersionOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/datahub/setDefaultJavaVersion][%d] setDefaultJavaVersionOK %s", 200, payload) +} + +func (o *SetDefaultJavaVersionOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/datahub/setDefaultJavaVersion][%d] setDefaultJavaVersionOK %s", 200, payload) +} + +func (o *SetDefaultJavaVersionOK) GetPayload() *models.SetDefaultJavaVersionResponse { + return o.Payload +} + +func (o *SetDefaultJavaVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SetDefaultJavaVersionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewSetDefaultJavaVersionDefault creates a SetDefaultJavaVersionDefault with default headers values +func NewSetDefaultJavaVersionDefault(code int) *SetDefaultJavaVersionDefault { + return &SetDefaultJavaVersionDefault{ + _statusCode: code, + } +} + +/* +SetDefaultJavaVersionDefault describes a response with status code -1, with default header values. + +The default response on an error. +*/ +type SetDefaultJavaVersionDefault struct { + _statusCode int + + Payload *models.Error +} + +// IsSuccess returns true when this set default java version default response has a 2xx status code +func (o *SetDefaultJavaVersionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this set default java version default response has a 3xx status code +func (o *SetDefaultJavaVersionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this set default java version default response has a 4xx status code +func (o *SetDefaultJavaVersionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this set default java version default response has a 5xx status code +func (o *SetDefaultJavaVersionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this set default java version default response a status code equal to that given +func (o *SetDefaultJavaVersionDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the set default java version default response +func (o *SetDefaultJavaVersionDefault) Code() int { + return o._statusCode +} + +func (o *SetDefaultJavaVersionDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/datahub/setDefaultJavaVersion][%d] setDefaultJavaVersion default %s", o._statusCode, payload) +} + +func (o *SetDefaultJavaVersionDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/datahub/setDefaultJavaVersion][%d] setDefaultJavaVersion default %s", o._statusCode, payload) +} + +func (o *SetDefaultJavaVersionDefault) GetPayload() *models.Error { + return o.Payload +} + +func (o *SetDefaultJavaVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/cdp-sdk-go/gen/datahub/models/create_recipe_request.go b/cdp-sdk-go/gen/datahub/models/create_recipe_request.go index 738b3b73..3d14d8bc 100644 --- a/cdp-sdk-go/gen/datahub/models/create_recipe_request.go +++ b/cdp-sdk-go/gen/datahub/models/create_recipe_request.go @@ -33,7 +33,7 @@ type CreateRecipeRequest struct { // Min Length: 5 RecipeName *string `json:"recipeName"` - // The type of recipe. Supported values are : PRE_CLOUDERA_MANAGER_START, PRE_TERMINATION, POST_CLOUDERA_MANAGER_START, POST_CLUSTER_INSTALL. + // The type of recipe. Supported values are : PRE_SERVICE_DEPLOYMENT, PRE_TERMINATION, POST_SERVICE_DEPLOYMENT, POST_CLOUDERA_MANAGER_START. // Required: true Type *string `json:"type"` } diff --git a/cdp-sdk-go/gen/datahub/models/recipe.go b/cdp-sdk-go/gen/datahub/models/recipe.go index f155332c..86fdcace 100644 --- a/cdp-sdk-go/gen/datahub/models/recipe.go +++ b/cdp-sdk-go/gen/datahub/models/recipe.go @@ -36,7 +36,7 @@ type Recipe struct { // Required: true RecipeName *string `json:"recipeName"` - // The type of recipe. Supported values are : PRE_CLOUDERA_MANAGER_START, PRE_TERMINATION, POST_CLOUDERA_MANAGER_START, POST_CLUSTER_INSTALL. + // The type of recipe. Supported values are : PRE_SERVICE_DEPLOYMENT, PRE_TERMINATION, POST_SERVICE_DEPLOYMENT, POST_CLOUDERA_MANAGER_START. Type string `json:"type,omitempty"` } diff --git a/cdp-sdk-go/gen/datahub/models/recipe_summary.go b/cdp-sdk-go/gen/datahub/models/recipe_summary.go index f56fb50d..8f0a2154 100644 --- a/cdp-sdk-go/gen/datahub/models/recipe_summary.go +++ b/cdp-sdk-go/gen/datahub/models/recipe_summary.go @@ -30,7 +30,7 @@ type RecipeSummary struct { // Required: true RecipeName *string `json:"recipeName"` - // The type of recipe. Supported values are : PRE_CLOUDERA_MANAGER_START, PRE_TERMINATION, POST_CLOUDERA_MANAGER_START, POST_CLUSTER_INSTALL. + // The type of recipe. Supported values are : PRE_SERVICE_DEPLOYMENT, PRE_TERMINATION, POST_SERVICE_DEPLOYMENT, POST_CLOUDERA_MANAGER_START. Type string `json:"type,omitempty"` } diff --git a/cdp-sdk-go/gen/datahub/models/set_default_java_version_request.go b/cdp-sdk-go/gen/datahub/models/set_default_java_version_request.go new file mode 100644 index 00000000..88645c6e --- /dev/null +++ b/cdp-sdk-go/gen/datahub/models/set_default_java_version_request.go @@ -0,0 +1,88 @@ +// 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" +) + +// SetDefaultJavaVersionRequest Request object for setting the default Java version on the Data Hub cluster. +// +// swagger:model SetDefaultJavaVersionRequest +type SetDefaultJavaVersionRequest struct { + + // The CRN of the Data Hub cluster. + // Required: true + ClusterCrn *string `json:"clusterCrn"` + + // The Java version to set as default. + // Required: true + JavaVersion *string `json:"javaVersion"` +} + +// Validate validates this set default java version request +func (m *SetDefaultJavaVersionRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterCrn(formats); err != nil { + res = append(res, err) + } + + if err := m.validateJavaVersion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SetDefaultJavaVersionRequest) validateClusterCrn(formats strfmt.Registry) error { + + if err := validate.Required("clusterCrn", "body", m.ClusterCrn); err != nil { + return err + } + + return nil +} + +func (m *SetDefaultJavaVersionRequest) validateJavaVersion(formats strfmt.Registry) error { + + if err := validate.Required("javaVersion", "body", m.JavaVersion); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this set default java version request based on context it is used +func (m *SetDefaultJavaVersionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SetDefaultJavaVersionRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SetDefaultJavaVersionRequest) UnmarshalBinary(b []byte) error { + var res SetDefaultJavaVersionRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/datahub/models/set_default_java_version_response.go b/cdp-sdk-go/gen/datahub/models/set_default_java_version_response.go new file mode 100644 index 00000000..d37ca08b --- /dev/null +++ b/cdp-sdk-go/gen/datahub/models/set_default_java_version_response.go @@ -0,0 +1,50 @@ +// 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" +) + +// SetDefaultJavaVersionResponse Response object for setting the default Java version on the Data Hub cluster. +// +// swagger:model SetDefaultJavaVersionResponse +type SetDefaultJavaVersionResponse struct { + + // The id of the related operation. + OperationID string `json:"operationId,omitempty"` +} + +// Validate validates this set default java version response +func (m *SetDefaultJavaVersionResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this set default java version response based on context it is used +func (m *SetDefaultJavaVersionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SetDefaultJavaVersionResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SetDefaultJavaVersionResponse) UnmarshalBinary(b []byte) error { + var res SetDefaultJavaVersionResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/datalake/client/operations/operations_client.go b/cdp-sdk-go/gen/datalake/client/operations/operations_client.go index 7251a995..38facf71 100644 --- a/cdp-sdk-go/gen/datalake/client/operations/operations_client.go +++ b/cdp-sdk-go/gen/datalake/client/operations/operations_client.go @@ -138,6 +138,8 @@ type ClientService interface { SetCatalog(params *SetCatalogParams, opts ...ClientOption) (*SetCatalogOK, error) + SetDefaultJavaVersion(params *SetDefaultJavaVersionParams, opts ...ClientOption) (*SetDefaultJavaVersionOK, error) + StartDatabaseUpgrade(params *StartDatabaseUpgradeParams, opts ...ClientOption) (*StartDatabaseUpgradeOK, error) StartDatalake(params *StartDatalakeParams, opts ...ClientOption) (*StartDatalakeOK, error) @@ -1801,6 +1803,45 @@ func (a *Client) SetCatalog(params *SetCatalogParams, opts ...ClientOption) (*Se return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +SetDefaultJavaVersion configures the default java version for the data lake + +Configures the default Java version for the Data Lake. This command updates the system's default Java version and will restart both the Cluster Manager and the services. +*/ +func (a *Client) SetDefaultJavaVersion(params *SetDefaultJavaVersionParams, opts ...ClientOption) (*SetDefaultJavaVersionOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewSetDefaultJavaVersionParams() + } + op := &runtime.ClientOperation{ + ID: "setDefaultJavaVersion", + Method: "POST", + PathPattern: "/api/v1/datalake/setDefaultJavaVersion", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &SetDefaultJavaVersionReader{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 + } + success, ok := result.(*SetDefaultJavaVersionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*SetDefaultJavaVersionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* StartDatabaseUpgrade upgrades the database of the data lake cluster diff --git a/cdp-sdk-go/gen/datalake/client/operations/set_default_java_version_parameters.go b/cdp-sdk-go/gen/datalake/client/operations/set_default_java_version_parameters.go new file mode 100644 index 00000000..ccbd1246 --- /dev/null +++ b/cdp-sdk-go/gen/datalake/client/operations/set_default_java_version_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/datalake/models" +) + +// NewSetDefaultJavaVersionParams creates a new SetDefaultJavaVersionParams 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 NewSetDefaultJavaVersionParams() *SetDefaultJavaVersionParams { + return &SetDefaultJavaVersionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewSetDefaultJavaVersionParamsWithTimeout creates a new SetDefaultJavaVersionParams object +// with the ability to set a timeout on a request. +func NewSetDefaultJavaVersionParamsWithTimeout(timeout time.Duration) *SetDefaultJavaVersionParams { + return &SetDefaultJavaVersionParams{ + timeout: timeout, + } +} + +// NewSetDefaultJavaVersionParamsWithContext creates a new SetDefaultJavaVersionParams object +// with the ability to set a context for a request. +func NewSetDefaultJavaVersionParamsWithContext(ctx context.Context) *SetDefaultJavaVersionParams { + return &SetDefaultJavaVersionParams{ + Context: ctx, + } +} + +// NewSetDefaultJavaVersionParamsWithHTTPClient creates a new SetDefaultJavaVersionParams object +// with the ability to set a custom HTTPClient for a request. +func NewSetDefaultJavaVersionParamsWithHTTPClient(client *http.Client) *SetDefaultJavaVersionParams { + return &SetDefaultJavaVersionParams{ + HTTPClient: client, + } +} + +/* +SetDefaultJavaVersionParams contains all the parameters to send to the API endpoint + + for the set default java version operation. + + Typically these are written to a http.Request. +*/ +type SetDefaultJavaVersionParams struct { + + // Input. + Input *models.SetDefaultJavaVersionRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the set default java version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *SetDefaultJavaVersionParams) WithDefaults() *SetDefaultJavaVersionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the set default java version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *SetDefaultJavaVersionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the set default java version params +func (o *SetDefaultJavaVersionParams) WithTimeout(timeout time.Duration) *SetDefaultJavaVersionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the set default java version params +func (o *SetDefaultJavaVersionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the set default java version params +func (o *SetDefaultJavaVersionParams) WithContext(ctx context.Context) *SetDefaultJavaVersionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the set default java version params +func (o *SetDefaultJavaVersionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the set default java version params +func (o *SetDefaultJavaVersionParams) WithHTTPClient(client *http.Client) *SetDefaultJavaVersionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the set default java version params +func (o *SetDefaultJavaVersionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInput adds the input to the set default java version params +func (o *SetDefaultJavaVersionParams) WithInput(input *models.SetDefaultJavaVersionRequest) *SetDefaultJavaVersionParams { + o.SetInput(input) + return o +} + +// SetInput adds the input to the set default java version params +func (o *SetDefaultJavaVersionParams) SetInput(input *models.SetDefaultJavaVersionRequest) { + o.Input = input +} + +// WriteToRequest writes these params to a swagger request +func (o *SetDefaultJavaVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Input != nil { + if err := r.SetBodyParam(o.Input); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/cdp-sdk-go/gen/datalake/client/operations/set_default_java_version_responses.go b/cdp-sdk-go/gen/datalake/client/operations/set_default_java_version_responses.go new file mode 100644 index 00000000..9585b4d1 --- /dev/null +++ b/cdp-sdk-go/gen/datalake/client/operations/set_default_java_version_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/datalake/models" +) + +// SetDefaultJavaVersionReader is a Reader for the SetDefaultJavaVersion structure. +type SetDefaultJavaVersionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *SetDefaultJavaVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewSetDefaultJavaVersionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewSetDefaultJavaVersionDefault(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 + } +} + +// NewSetDefaultJavaVersionOK creates a SetDefaultJavaVersionOK with default headers values +func NewSetDefaultJavaVersionOK() *SetDefaultJavaVersionOK { + return &SetDefaultJavaVersionOK{} +} + +/* +SetDefaultJavaVersionOK describes a response with status code 200, with default header values. + +Expected response to a valid request. +*/ +type SetDefaultJavaVersionOK struct { + Payload *models.SetDefaultJavaVersionResponse +} + +// IsSuccess returns true when this set default java version o k response has a 2xx status code +func (o *SetDefaultJavaVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this set default java version o k response has a 3xx status code +func (o *SetDefaultJavaVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this set default java version o k response has a 4xx status code +func (o *SetDefaultJavaVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this set default java version o k response has a 5xx status code +func (o *SetDefaultJavaVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this set default java version o k response a status code equal to that given +func (o *SetDefaultJavaVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the set default java version o k response +func (o *SetDefaultJavaVersionOK) Code() int { + return 200 +} + +func (o *SetDefaultJavaVersionOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/datalake/setDefaultJavaVersion][%d] setDefaultJavaVersionOK %s", 200, payload) +} + +func (o *SetDefaultJavaVersionOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/datalake/setDefaultJavaVersion][%d] setDefaultJavaVersionOK %s", 200, payload) +} + +func (o *SetDefaultJavaVersionOK) GetPayload() *models.SetDefaultJavaVersionResponse { + return o.Payload +} + +func (o *SetDefaultJavaVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SetDefaultJavaVersionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewSetDefaultJavaVersionDefault creates a SetDefaultJavaVersionDefault with default headers values +func NewSetDefaultJavaVersionDefault(code int) *SetDefaultJavaVersionDefault { + return &SetDefaultJavaVersionDefault{ + _statusCode: code, + } +} + +/* +SetDefaultJavaVersionDefault describes a response with status code -1, with default header values. + +The default response on an error. +*/ +type SetDefaultJavaVersionDefault struct { + _statusCode int + + Payload *models.Error +} + +// IsSuccess returns true when this set default java version default response has a 2xx status code +func (o *SetDefaultJavaVersionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this set default java version default response has a 3xx status code +func (o *SetDefaultJavaVersionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this set default java version default response has a 4xx status code +func (o *SetDefaultJavaVersionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this set default java version default response has a 5xx status code +func (o *SetDefaultJavaVersionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this set default java version default response a status code equal to that given +func (o *SetDefaultJavaVersionDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the set default java version default response +func (o *SetDefaultJavaVersionDefault) Code() int { + return o._statusCode +} + +func (o *SetDefaultJavaVersionDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/datalake/setDefaultJavaVersion][%d] setDefaultJavaVersion default %s", o._statusCode, payload) +} + +func (o *SetDefaultJavaVersionDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/datalake/setDefaultJavaVersion][%d] setDefaultJavaVersion default %s", o._statusCode, payload) +} + +func (o *SetDefaultJavaVersionDefault) GetPayload() *models.Error { + return o.Payload +} + +func (o *SetDefaultJavaVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/cdp-sdk-go/gen/datalake/models/set_default_java_version_request.go b/cdp-sdk-go/gen/datalake/models/set_default_java_version_request.go new file mode 100644 index 00000000..aa8dd9b3 --- /dev/null +++ b/cdp-sdk-go/gen/datalake/models/set_default_java_version_request.go @@ -0,0 +1,88 @@ +// 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" +) + +// SetDefaultJavaVersionRequest Request object for setting the default Java version on the Data Lake cluster. +// +// swagger:model SetDefaultJavaVersionRequest +type SetDefaultJavaVersionRequest struct { + + // The CRN of the Data Lake cluster. + // Required: true + Crn *string `json:"crn"` + + // The default Java version to be set on the Data Lake cluster. + // Required: true + JavaVersion *string `json:"javaVersion"` +} + +// Validate validates this set default java version request +func (m *SetDefaultJavaVersionRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCrn(formats); err != nil { + res = append(res, err) + } + + if err := m.validateJavaVersion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SetDefaultJavaVersionRequest) validateCrn(formats strfmt.Registry) error { + + if err := validate.Required("crn", "body", m.Crn); err != nil { + return err + } + + return nil +} + +func (m *SetDefaultJavaVersionRequest) validateJavaVersion(formats strfmt.Registry) error { + + if err := validate.Required("javaVersion", "body", m.JavaVersion); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this set default java version request based on context it is used +func (m *SetDefaultJavaVersionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SetDefaultJavaVersionRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SetDefaultJavaVersionRequest) UnmarshalBinary(b []byte) error { + var res SetDefaultJavaVersionRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/datalake/models/set_default_java_version_response.go b/cdp-sdk-go/gen/datalake/models/set_default_java_version_response.go new file mode 100644 index 00000000..51bd9127 --- /dev/null +++ b/cdp-sdk-go/gen/datalake/models/set_default_java_version_response.go @@ -0,0 +1,50 @@ +// 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" +) + +// SetDefaultJavaVersionResponse Response object for setting the default Java version on the Data Lake cluster. +// +// swagger:model SetDefaultJavaVersionResponse +type SetDefaultJavaVersionResponse struct { + + // The id of the related operation. + OperationID string `json:"operationId,omitempty"` +} + +// Validate validates this set default java version response +func (m *SetDefaultJavaVersionResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this set default java version response based on context it is used +func (m *SetDefaultJavaVersionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SetDefaultJavaVersionResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SetDefaultJavaVersionResponse) UnmarshalBinary(b []byte) error { + var res SetDefaultJavaVersionResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/de/models/restore_service_request.go b/cdp-sdk-go/gen/de/models/restore_service_request.go index 9e2cffa6..e7532061 100644 --- a/cdp-sdk-go/gen/de/models/restore_service_request.go +++ b/cdp-sdk-go/gen/de/models/restore_service_request.go @@ -27,7 +27,7 @@ type RestoreServiceRequest struct { // Required: true EnvironmentCrn *string `json:"environmentCrn"` - // Specify the restored service ID. If not specified, the service ID from the backup will be reused. + // Specify the restored service ID. If not specified, a new service ID will be generated. ServiceID string `json:"serviceId,omitempty"` // Specify the restored service name. If not specified, the service name from the backup will be reused. diff --git a/cdp-sdk-go/gen/dw/client/operations/operations_client.go b/cdp-sdk-go/gen/dw/client/operations/operations_client.go index 8489ed14..f29e73e4 100644 --- a/cdp-sdk-go/gen/dw/client/operations/operations_client.go +++ b/cdp-sdk-go/gen/dw/client/operations/operations_client.go @@ -3052,7 +3052,7 @@ func (a *Client) RestoreCluster(params *RestoreClusterParams, opts ...ClientOpti /* ResumeCluster resumes cloudera data warehouse cluster -Resume Cloudera Data Warehouse cluster. Supported only on Azure. Resume cluster will start a stopped CDW cluster. Resuming a cluster in "Running" or "Error" state is not supported. Resume will start the AKS instance which belongs to this CDW. Please refer to the following AKS documentation for start/stop feature https://learn.microsoft.com/en-us/azure/aks/start-stop-cluster?tabs=azure-cli +Resume Cloudera Data Warehouse cluster. Resume cluster will start a stopped CDW cluster. Resuming a cluster in "Running" or "Error" state is not supported. Resume will start the AKS or EKS instance which belongs to this CDW. Please refer to the following AKS documentation for start/stop feature https://learn.microsoft.com/en-us/azure/aks/start-stop-cluster?tabs=azure-cli */ func (a *Client) ResumeCluster(params *ResumeClusterParams, opts ...ClientOption) (*ResumeClusterOK, error) { // TODO: Validate the params before sending @@ -3130,7 +3130,7 @@ func (a *Client) StartVw(params *StartVwParams, opts ...ClientOption) (*StartVwO /* SuspendCluster suspends cloudera data warehouse cluster -Suspend Cloudera Data Warehouse cluster. Supported only on Azure. Suspend cluster requires a "Running" Azure CDW, trying to suspend a cluster already in "Stopped" or "Error" state is not supported. Every Virtual Warehouse and Database Catalog which belongs to that CDW must be stopped first. This operation will stop the AKS cluster for this CDW instance, however leaves other cloud resources in "Running" state, including the Postgres database. Please refer to the following AKS documentation for start/stop feature https://learn.microsoft.com/en-us/azure/aks/start-stop-cluster?tabs=azure-cli +Suspend Cloudera Data Warehouse cluster. Suspend cluster requires a "Running" Azure or AWS CDW, trying to suspend a cluster already in "Stopped" or "Error" state is not supported. Every Virtual Warehouse and Database Catalog which belongs to that CDW must be stopped first. This operation will stop the AKS or EKS cluster for this CDW instance, however leaves other cloud resources in "Running" state, including the Postgres database. Please refer to the following AKS documentation for start/stop feature https://learn.microsoft.com/en-us/azure/aks/start-stop-cluster?tabs=azure-cli */ func (a *Client) SuspendCluster(params *SuspendClusterParams, opts ...ClientOption) (*SuspendClusterOK, error) { // TODO: Validate the params before sending diff --git a/cdp-sdk-go/gen/dw/models/allowed_instance_types.go b/cdp-sdk-go/gen/dw/models/allowed_instance_types.go index 0cbad098..685700b2 100644 --- a/cdp-sdk-go/gen/dw/models/allowed_instance_types.go +++ b/cdp-sdk-go/gen/dw/models/allowed_instance_types.go @@ -29,6 +29,9 @@ type AllowedInstanceTypes struct { // Allowed instance types for Impala Virtual Warehouses. Impala *AllowedInstanceTypesWithDefault `json:"impala,omitempty"` + + // Allowed instance types for Trino Virtual Warehouses. + Trino *AllowedInstanceTypesWithDefault `json:"trino,omitempty"` } // Validate validates this allowed instance types @@ -43,6 +46,10 @@ func (m *AllowedInstanceTypes) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTrino(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -87,6 +94,25 @@ func (m *AllowedInstanceTypes) validateImpala(formats strfmt.Registry) error { return nil } +func (m *AllowedInstanceTypes) validateTrino(formats strfmt.Registry) error { + if swag.IsZero(m.Trino) { // not required + return nil + } + + if m.Trino != nil { + if err := m.Trino.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("trino") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("trino") + } + return err + } + } + + return nil +} + // ContextValidate validate this allowed instance types based on the context it is used func (m *AllowedInstanceTypes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -99,6 +125,10 @@ func (m *AllowedInstanceTypes) ContextValidate(ctx context.Context, formats strf res = append(res, err) } + if err := m.contextValidateTrino(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -147,6 +177,27 @@ func (m *AllowedInstanceTypes) contextValidateImpala(ctx context.Context, format return nil } +func (m *AllowedInstanceTypes) contextValidateTrino(ctx context.Context, formats strfmt.Registry) error { + + if m.Trino != nil { + + if swag.IsZero(m.Trino) { // not required + return nil + } + + if err := m.Trino.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("trino") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("trino") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *AllowedInstanceTypes) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/cdp-sdk-go/gen/dw/models/aws_activation_options.go b/cdp-sdk-go/gen/dw/models/aws_activation_options.go index e862bd35..e1f0c616 100644 --- a/cdp-sdk-go/gen/dw/models/aws_activation_options.go +++ b/cdp-sdk-go/gen/dw/models/aws_activation_options.go @@ -17,9 +17,6 @@ import ( // swagger:model AwsActivationOptions type AwsActivationOptions struct { - // DEPRECATED: Additional compute instance types will be removed in subsequent releases. Additional (fallback) instance types listed in their priority order. They will be used instead of the primary compute instance type in case it is unavailable. You cannot include any instance type that was already indicated in computeInstanceTypes. Use describe-allowed-instance-types to see currently supported values and also the default value when nothing is provided for the computeInstanceTypes. - AdditionalInstanceTypes []string `json:"additionalInstanceTypes"` - // NOTE: The cluster level instance type selection will be replaced by virtual warehouse level selection. AWS compute instance types that the environment is restricted to use. This affects the creation of virtual warehouses where this restriction will apply. Select an instance type that meets your computing, memory, networking, or storage needs. As of now, only a single instance type can be listed. Use describe-allowed-instance-types to see currently possible values. ComputeInstanceTypes []string `json:"computeInstanceTypes"` diff --git a/cdp-sdk-go/gen/dw/models/cluster_create_diagnostic_data_download_options.go b/cdp-sdk-go/gen/dw/models/cluster_create_diagnostic_data_download_options.go index 26850061..f5edcb82 100644 --- a/cdp-sdk-go/gen/dw/models/cluster_create_diagnostic_data_download_options.go +++ b/cdp-sdk-go/gen/dw/models/cluster_create_diagnostic_data_download_options.go @@ -12,21 +12,21 @@ import ( "github.com/go-openapi/swag" ) -// ClusterCreateDiagnosticDataDownloadOptions Flags that denote which diagnostics to include for the cluster. +// ClusterCreateDiagnosticDataDownloadOptions DEPRECATED: Included by default, no need to specify // // swagger:model ClusterCreateDiagnosticDataDownloadOptions type ClusterCreateDiagnosticDataDownloadOptions struct { - // Include cluster info. + // DEPRECATED: Included by default, no need to specify IncludeClusterInfo *bool `json:"includeClusterInfo,omitempty"` - // Include Istio system. + // DEPRECATED: Included by default, no need to specify IncludeIstioSystem *bool `json:"includeIstioSystem,omitempty"` - // Include Kube system. + // DEPRECATED: Included by default, no need to specify IncludeKubeSystem *bool `json:"includeKubeSystem,omitempty"` - // Include shared services. + // DEPRECATED: Included by default, no need to specify IncludeSharedServices *bool `json:"includeSharedServices,omitempty"` } diff --git a/cdp-sdk-go/gen/dw/models/cluster_summary_product_support_response.go b/cdp-sdk-go/gen/dw/models/cluster_summary_product_support_response.go new file mode 100644 index 00000000..7a8d4f16 --- /dev/null +++ b/cdp-sdk-go/gen/dw/models/cluster_summary_product_support_response.go @@ -0,0 +1,80 @@ +// 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" +) + +// ClusterSummaryProductSupportResponse Support lifecycle details of the given Cluster version (see version field). Learn more at Support lifecycle site: https://www.cloudera.com/services-and-support/support-lifecycle-policy.html. +// +// swagger:model ClusterSummaryProductSupportResponse +type ClusterSummaryProductSupportResponse struct { + + // Shows the expiration date of the support for this Cluster version. + // Format: date-time + ExpiryDate strfmt.DateTime `json:"expiryDate,omitempty"` + + // Message. + Message string `json:"message,omitempty"` + + // Status of the support lifecycle. *COVERED*: The Cluster version has active support. *EXPIRED*: The Cluster version is no-longer supported. *UNKNOWN*: The Cluster version is missing or incorrect. + Status string `json:"status,omitempty"` +} + +// Validate validates this cluster summary product support response +func (m *ClusterSummaryProductSupportResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateExpiryDate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClusterSummaryProductSupportResponse) validateExpiryDate(formats strfmt.Registry) error { + if swag.IsZero(m.ExpiryDate) { // not required + return nil + } + + if err := validate.FormatOf("expiryDate", "body", "date-time", m.ExpiryDate.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this cluster summary product support response based on context it is used +func (m *ClusterSummaryProductSupportResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ClusterSummaryProductSupportResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClusterSummaryProductSupportResponse) UnmarshalBinary(b []byte) error { + var res ClusterSummaryProductSupportResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/dw/models/cluster_summary_response.go b/cdp-sdk-go/gen/dw/models/cluster_summary_response.go index 9c4753bf..4a27b49c 100644 --- a/cdp-sdk-go/gen/dw/models/cluster_summary_response.go +++ b/cdp-sdk-go/gen/dw/models/cluster_summary_response.go @@ -20,9 +20,6 @@ import ( // swagger:model ClusterSummaryResponse type ClusterSummaryResponse struct { - // DEPRECATED: Additional compute instance types will be removed in subsequent releases. Additional (fallback) instance types listed in their priority order. They are used instead of the primary compute instance type in case it is unavailable. Since additional instance types are not supported for Azure, this is always empty for it. - AdditionalInstanceTypes []string `json:"additionalInstanceTypes"` - // Response object of AWS related cluster options. AwsOptions *AwsOptionsResponse `json:"awsOptions,omitempty"` @@ -66,6 +63,9 @@ type ClusterSummaryResponse struct { // Name of the cluster (same as the name of the environment). Name string `json:"name,omitempty"` + // Support lifecycle details of the given Cluster version (see version field). Learn more at Support lifecycle site: https://www.cloudera.com/services-and-support/support-lifecycle-policy.html. + ProductSupport *ClusterSummaryProductSupportResponse `json:"productSupport,omitempty"` + // DEPRECATED - will be removed in future releases. Number of additional reserved nodes for executors and coordinators to use during autoscaling. ReservedComputeNodes int32 `json:"reservedComputeNodes,omitempty"` @@ -115,6 +115,10 @@ func (m *ClusterSummaryResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateProductSupport(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -216,6 +220,25 @@ func (m *ClusterSummaryResponse) validateExternalBuckets(formats strfmt.Registry return nil } +func (m *ClusterSummaryResponse) validateProductSupport(formats strfmt.Registry) error { + if swag.IsZero(m.ProductSupport) { // not required + return nil + } + + if m.ProductSupport != nil { + if err := m.ProductSupport.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("productSupport") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("productSupport") + } + return err + } + } + + return nil +} + // ContextValidate validate this cluster summary response based on the context it is used func (m *ClusterSummaryResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -236,6 +259,10 @@ func (m *ClusterSummaryResponse) ContextValidate(ctx context.Context, formats st res = append(res, err) } + if err := m.contextValidateProductSupport(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -330,6 +357,27 @@ func (m *ClusterSummaryResponse) contextValidateExternalBuckets(ctx context.Cont return nil } +func (m *ClusterSummaryResponse) contextValidateProductSupport(ctx context.Context, formats strfmt.Registry) error { + + if m.ProductSupport != nil { + + if swag.IsZero(m.ProductSupport) { // not required + return nil + } + + if err := m.ProductSupport.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("productSupport") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("productSupport") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *ClusterSummaryResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/cdp-sdk-go/gen/dw/models/create_aws_cluster_request.go b/cdp-sdk-go/gen/dw/models/create_aws_cluster_request.go index dce2196b..d5cf27e3 100644 --- a/cdp-sdk-go/gen/dw/models/create_aws_cluster_request.go +++ b/cdp-sdk-go/gen/dw/models/create_aws_cluster_request.go @@ -19,9 +19,6 @@ import ( // swagger:model CreateAwsClusterRequest type CreateAwsClusterRequest struct { - // DEPRECATED: Additional compute instance types will be removed in subsequent releases. Additional (fallback) instance types listed in their priority order. They will be used instead of the primary compute instance type in case it is unavailable. You cannot include any instance type that was already indicated in computeInstanceTypes. Use describe-allowed-instance-types to see currently supported values and also the default value when nothing is provided for the computeInstanceTypes. - AdditionalInstanceTypes []string `json:"additionalInstanceTypes"` - // NOTE: The cluster level instance type selection will be replaced by virtual warehouse level selection. AWS compute instance types that the environment is restricted to use. This affects the creation of virtual warehouses where this restriction will apply. Select an instance type that meets your computing, memory, networking, or storage needs. As of now, only a single instance type can be listed. Use describe-allowed-instance-types to see currently possible values. ComputeInstanceTypes []string `json:"computeInstanceTypes"` diff --git a/cdp-sdk-go/gen/dw/models/create_cluster_diagnostic_data_job_request.go b/cdp-sdk-go/gen/dw/models/create_cluster_diagnostic_data_job_request.go index 67c032b3..82f40b09 100644 --- a/cdp-sdk-go/gen/dw/models/create_cluster_diagnostic_data_job_request.go +++ b/cdp-sdk-go/gen/dw/models/create_cluster_diagnostic_data_job_request.go @@ -35,7 +35,7 @@ type CreateClusterDiagnosticDataJobRequest struct { // Enum: ["UPLOAD_TO_CLOUDERA","DOWNLOAD"] Destination *string `json:"destination"` - // Cluster diagnostic options. If not provided, everything will be included in the Diagnostic Data. + // DEPRECATED: All logs are included by default. No need to specify options DownloadOptions *ClusterCreateDiagnosticDataDownloadOptions `json:"downloadOptions,omitempty"` // The resulting bundle will contain logs/metrics before the specified end time. If not indicated, then the current time is taken as the end time. diff --git a/cdp-sdk-go/gen/dw/models/create_data_visualization_request.go b/cdp-sdk-go/gen/dw/models/create_data_visualization_request.go index 4d65ce96..e43e54ff 100644 --- a/cdp-sdk-go/gen/dw/models/create_data_visualization_request.go +++ b/cdp-sdk-go/gen/dw/models/create_data_visualization_request.go @@ -34,8 +34,8 @@ type CreateDataVisualizationRequest struct { // Required: true Name *string `json:"name"` - // DEPRECATED: Use resourceTemplate parameter instead that will be made available in the upcoming release. The template size for the Cloudera Data Visualization. - TemplateName string `json:"templateName,omitempty"` + // The name of the available resource template to use for the Cloudera Data Visualization. + ResourceTemplate string `json:"resourceTemplate,omitempty"` } // Validate validates this create data visualization request diff --git a/cdp-sdk-go/gen/dw/models/create_dbc_diagnostic_data_job_request.go b/cdp-sdk-go/gen/dw/models/create_dbc_diagnostic_data_job_request.go index 052cc5ac..afc4aa84 100644 --- a/cdp-sdk-go/gen/dw/models/create_dbc_diagnostic_data_job_request.go +++ b/cdp-sdk-go/gen/dw/models/create_dbc_diagnostic_data_job_request.go @@ -39,7 +39,7 @@ type CreateDbcDiagnosticDataJobRequest struct { // Enum: ["UPLOAD_TO_CLOUDERA","DOWNLOAD"] Destination *string `json:"destination"` - // Database Catalog diagnostic options. If not provided, everything will be included in the Diagnostic Data. + // DEPRECATED: All logs are included by default DownloadOptions *DBCCreateDiagnosticDataDownloadOptions `json:"downloadOptions,omitempty"` // The resulting bundle will contain logs/metrics before the specified end time. If not indicated, then the current time is taken as the end time. diff --git a/cdp-sdk-go/gen/dw/models/create_dbc_request.go b/cdp-sdk-go/gen/dw/models/create_dbc_request.go index 360aab94..ad0db6d8 100644 --- a/cdp-sdk-go/gen/dw/models/create_dbc_request.go +++ b/cdp-sdk-go/gen/dw/models/create_dbc_request.go @@ -24,13 +24,13 @@ type CreateDbcRequest struct { // Required: true ClusterID *string `json:"clusterId"` - // The name of the DAS database. Not required for embedded databases. + // DEPRECATED: Current Private Cloud releases only support embedded database, the value of this field is ignored. The name of the DAS database. Not required for embedded databases. DbDas string `json:"dbDas,omitempty"` - // The name of the HUE database. Not required for embedded databases. + // DEPRECATED: Current Private Cloud releases only support embedded database, the value of this field is ignored. The name of the HUE database. Not required for embedded databases. DbHue string `json:"dbHue,omitempty"` - // The name of the Metastore database. + // DEPRECATED: Current Private Cloud releases only support embedded database, the value of this field is ignored. The name of the Metastore database. DbMetastore string `json:"dbMetastore,omitempty"` // Version of the Database Catalog. diff --git a/cdp-sdk-go/gen/dw/models/create_private_cluster_request.go b/cdp-sdk-go/gen/dw/models/create_private_cluster_request.go index e6c53a91..5852e945 100644 --- a/cdp-sdk-go/gen/dw/models/create_private_cluster_request.go +++ b/cdp-sdk-go/gen/dw/models/create_private_cluster_request.go @@ -41,7 +41,7 @@ type CreatePrivateClusterRequest struct { // The Resource Pool of the cluster. ResourcePool string `json:"resourcePool,omitempty"` - // The name of the Hive Security Context Constraint. + // DEPRECATED: This option will be removed in future releases. Instead of creating a custom Security Context Constraint, we rely on the cluster default. The name of the Hive Security Context Constraint. SecurityContextConstraintName string `json:"securityContextConstraintName,omitempty"` // The storage class for the Local Storage Operator. diff --git a/cdp-sdk-go/gen/dw/models/create_vw_diagnostic_data_job_request.go b/cdp-sdk-go/gen/dw/models/create_vw_diagnostic_data_job_request.go index 226c63e2..61ac51f2 100644 --- a/cdp-sdk-go/gen/dw/models/create_vw_diagnostic_data_job_request.go +++ b/cdp-sdk-go/gen/dw/models/create_vw_diagnostic_data_job_request.go @@ -42,10 +42,10 @@ type CreateVwDiagnosticDataJobRequest struct { // Forced recreation of the diagnostic job. Force *bool `json:"force,omitempty"` - // Hive diagnostic options. If not provided, everything will be included into the Diagnostic Data. + // DEPRECATED: All logs are included by default HiveDownloadOptions *HiveCreateDiagnosticDataDownloadOptions `json:"hiveDownloadOptions,omitempty"` - // Impala diagnostic options. If not provided, everything will be included into the Diagnostic Data. + // DEPRECATED: All logs are included by default ImpalaDownloadOptions *ImpalaCreateDiagnosticDataDownloadOptions `json:"impalaDownloadOptions,omitempty"` // The resulting bundle will contain logs/metrics after the specified start time. If not indicated, then 30 minutes ago from now is taken as the start time. diff --git a/cdp-sdk-go/gen/dw/models/create_vw_request.go b/cdp-sdk-go/gen/dw/models/create_vw_request.go index 21ce15c8..ed8cdb62 100644 --- a/cdp-sdk-go/gen/dw/models/create_vw_request.go +++ b/cdp-sdk-go/gen/dw/models/create_vw_request.go @@ -81,13 +81,13 @@ type CreateVwRequest struct { // The Resource Pool of the Virtual Warehouse. ResourcePool string `json:"resourcePool,omitempty"` + // Name of T-shirt size to use, which will determine the number of nodes. + // Enum: ["xsmall","small","medium","large"] + TShirtSize string `json:"tShirtSize,omitempty"` + // Tags associated with the resources. Tags []*TagRequest `json:"tags"` - // DEPRECATED: It will be replaced by the tShirtSize parameter in an upcoming release. Name of configuration template to use. - // Enum: ["xsmall","small","medium","large"] - Template string `json:"template,omitempty"` - // Type of Virtual Warehouse to be created. // Required: true VwType *VwType `json:"vwType"` @@ -129,11 +129,11 @@ func (m *CreateVwRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateTags(formats); err != nil { + if err := m.validateTShirtSize(formats); err != nil { res = append(res, err) } - if err := m.validateTemplate(formats); err != nil { + if err := m.validateTags(formats); err != nil { res = append(res, err) } @@ -269,33 +269,7 @@ func (m *CreateVwRequest) validateQueryIsolationOptions(formats strfmt.Registry) return nil } -func (m *CreateVwRequest) 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 { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var createVwRequestTypeTemplatePropEnum []interface{} +var createVwRequestTypeTShirtSizePropEnum []interface{} func init() { var res []string @@ -303,46 +277,72 @@ func init() { panic(err) } for _, v := range res { - createVwRequestTypeTemplatePropEnum = append(createVwRequestTypeTemplatePropEnum, v) + createVwRequestTypeTShirtSizePropEnum = append(createVwRequestTypeTShirtSizePropEnum, v) } } const ( - // CreateVwRequestTemplateXsmall captures enum value "xsmall" - CreateVwRequestTemplateXsmall string = "xsmall" + // CreateVwRequestTShirtSizeXsmall captures enum value "xsmall" + CreateVwRequestTShirtSizeXsmall string = "xsmall" - // CreateVwRequestTemplateSmall captures enum value "small" - CreateVwRequestTemplateSmall string = "small" + // CreateVwRequestTShirtSizeSmall captures enum value "small" + CreateVwRequestTShirtSizeSmall string = "small" - // CreateVwRequestTemplateMedium captures enum value "medium" - CreateVwRequestTemplateMedium string = "medium" + // CreateVwRequestTShirtSizeMedium captures enum value "medium" + CreateVwRequestTShirtSizeMedium string = "medium" - // CreateVwRequestTemplateLarge captures enum value "large" - CreateVwRequestTemplateLarge string = "large" + // CreateVwRequestTShirtSizeLarge captures enum value "large" + CreateVwRequestTShirtSizeLarge string = "large" ) // prop value enum -func (m *CreateVwRequest) validateTemplateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createVwRequestTypeTemplatePropEnum, true); err != nil { +func (m *CreateVwRequest) validateTShirtSizeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, createVwRequestTypeTShirtSizePropEnum, true); err != nil { return err } return nil } -func (m *CreateVwRequest) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(m.Template) { // not required +func (m *CreateVwRequest) validateTShirtSize(formats strfmt.Registry) error { + if swag.IsZero(m.TShirtSize) { // not required return nil } // value enum - if err := m.validateTemplateEnum("template", "body", m.Template); err != nil { + if err := m.validateTShirtSizeEnum("tShirtSize", "body", m.TShirtSize); err != nil { return err } return nil } +func (m *CreateVwRequest) 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 { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *CreateVwRequest) validateVwType(formats strfmt.Registry) error { if err := validate.Required("vwType", "body", m.VwType); err != nil { diff --git a/cdp-sdk-go/gen/dw/models/d_b_c_create_diagnostic_data_download_options.go b/cdp-sdk-go/gen/dw/models/d_b_c_create_diagnostic_data_download_options.go index 78d2ee6d..a0b5336d 100644 --- a/cdp-sdk-go/gen/dw/models/d_b_c_create_diagnostic_data_download_options.go +++ b/cdp-sdk-go/gen/dw/models/d_b_c_create_diagnostic_data_download_options.go @@ -12,12 +12,12 @@ import ( "github.com/go-openapi/swag" ) -// DBCCreateDiagnosticDataDownloadOptions Flags that denote which diagnostics to include for a Database Catalog. +// DBCCreateDiagnosticDataDownloadOptions DEPRECATED: Included by default, no need to specify // // swagger:model DBCCreateDiagnosticDataDownloadOptions type DBCCreateDiagnosticDataDownloadOptions struct { - // Include kubernetes resource info. + // DEPRECATED: Included by default, no need to specify IncludeKubernetesResourceInfo *bool `json:"includeKubernetesResourceInfo,omitempty"` } diff --git a/cdp-sdk-go/gen/dw/models/hive_create_diagnostic_data_download_options.go b/cdp-sdk-go/gen/dw/models/hive_create_diagnostic_data_download_options.go index dfa7d9fc..a17ad537 100644 --- a/cdp-sdk-go/gen/dw/models/hive_create_diagnostic_data_download_options.go +++ b/cdp-sdk-go/gen/dw/models/hive_create_diagnostic_data_download_options.go @@ -12,30 +12,30 @@ import ( "github.com/go-openapi/swag" ) -// HiveCreateDiagnosticDataDownloadOptions Flags that denote which diagnostics to include for a Hive Virtual Warehouse. +// HiveCreateDiagnosticDataDownloadOptions DEPRECATED: Included by default, no need to specify // // swagger:model HiveCreateDiagnosticDataDownloadOptions type HiveCreateDiagnosticDataDownloadOptions struct { - // Include compute resource info. + // DEPRECATED: Included by default, no need to specify IncludeComputeResourceInfo *bool `json:"includeComputeResourceInfo,omitempty"` - // Include the error dump. + // DEPRECATED: Included by default, no need to specify IncludeErrordump *bool `json:"includeErrordump,omitempty"` - // Include the Garbage collector logs. + // DEPRECATED: Included by default, no need to specify IncludeGclogs *bool `json:"includeGclogs,omitempty"` - // Include the heap-dump. + // DEPRECATED: Included by default, no need to specify IncludeHeapdump *bool `json:"includeHeapdump,omitempty"` - // Include the HMS diagnostics. + // DEPRECATED: Included by default, no need to specify IncludeHms *bool `json:"includeHms,omitempty"` - // Include Kubernetes resource info. + // DEPRECATED: Included by default, no need to specify IncludeKubernetesResourceInfo *bool `json:"includeKubernetesResourceInfo,omitempty"` - // Include logs. + // DEPRECATED: Included by default, no need to specify IncludeLogs *bool `json:"includeLogs,omitempty"` } diff --git a/cdp-sdk-go/gen/dw/models/impala_create_diagnostic_data_download_options.go b/cdp-sdk-go/gen/dw/models/impala_create_diagnostic_data_download_options.go index 13ed7384..2b3f938f 100644 --- a/cdp-sdk-go/gen/dw/models/impala_create_diagnostic_data_download_options.go +++ b/cdp-sdk-go/gen/dw/models/impala_create_diagnostic_data_download_options.go @@ -12,27 +12,27 @@ import ( "github.com/go-openapi/swag" ) -// ImpalaCreateDiagnosticDataDownloadOptions Flags that denote which diagnostics to include for an Impala Virtual Warehouse. +// ImpalaCreateDiagnosticDataDownloadOptions DEPRECATED: Included by default, no need to specify // // swagger:model ImpalaCreateDiagnosticDataDownloadOptions type ImpalaCreateDiagnosticDataDownloadOptions struct { - // Include the HMS diagnostics. + // DEPRECATED: Included by default, no need to specify IncludeHms *bool `json:"includeHms,omitempty"` - // Include kubernetes resource info. + // DEPRECATED: Included by default, no need to specify IncludeKubernetesResourceInfo *bool `json:"includeKubernetesResourceInfo,omitempty"` - // Include the minidump. + // DEPRECATED: Included by default, no need to specify IncludeMinidump *bool `json:"includeMinidump,omitempty"` - // Include the profile. + // DEPRECATED: Included by default, no need to specify IncludeProfile *bool `json:"includeProfile,omitempty"` - // Include the sidecar diagnostics. + // DEPRECATED: Included by default, no need to specify IncludeSidecar *bool `json:"includeSidecar,omitempty"` - // Include the workload diagnostics. + // DEPRECATED: Included by default, no need to specify IncludeWorkload *bool `json:"includeWorkload,omitempty"` } diff --git a/cdp-sdk-go/gen/dw/models/private_cloud_activation_options.go b/cdp-sdk-go/gen/dw/models/private_cloud_activation_options.go index 34ff82f2..7b2eb44b 100644 --- a/cdp-sdk-go/gen/dw/models/private_cloud_activation_options.go +++ b/cdp-sdk-go/gen/dw/models/private_cloud_activation_options.go @@ -21,10 +21,10 @@ type PrivateCloudActivationOptions struct { // A certificate and private key pair belonging together for mutual SSL handshake when Database Catalog (aka DBC) connects to the metastore database. DbClientCredentials *KeyPairCredentials `json:"dbClientCredentials,omitempty"` - // The name of the DAS database. Not required for embedded databases + // DEPRECATED: Current Private Cloud releases only support embedded database, the value of this field is ignored. The name of the DAS database. Not required for embedded databases. DbDas string `json:"dbDas,omitempty"` - // The name of the HUE database. Not required for embedded databases. + // DEPRECATED: Current Private Cloud releases only support embedded database, the value of this field is ignored. The name of the HUE database. Not required for embedded databases. DbHue string `json:"dbHue,omitempty"` // Enable to use dedicated nodes exclusively for executors and coordinators, and improve performance. You can enable this only if you reserved nodes while adding a CDP Private Cloud containerized ECS cluster. When disabled, non-compute pods such as MetaStore and Data Visualization can also use the reserved nodes. @@ -36,7 +36,7 @@ type PrivateCloudActivationOptions struct { // DEPRECATED: As of PVC 1.5.4 we no longer use delegation user. Name of delegation user. This user is used between Hue - Impala to create a session, as Hue should not pass the user credentials, instead Hue authenticates with the delegation user, then this user will impersonate the logged in user. This means that the Delegation User and Password should be able to authenticate through LDAP. DelegationUsername string `json:"delegationUsername,omitempty"` - // The name of the Hive Security Context Constraint. + // DEPRECATED: This option will be removed in future releases. Instead of creating a custom Security Context Constraint, we rely on the cluster default. The name of the Hive Security Context Constraint. SecurityContextConstraintName string `json:"securityContextConstraintName,omitempty"` // The storage class for the Local Storage Operator. diff --git a/cdp-sdk-go/gen/dw/models/restore_cluster_request.go b/cdp-sdk-go/gen/dw/models/restore_cluster_request.go index a7f0357c..7df7285d 100644 --- a/cdp-sdk-go/gen/dw/models/restore_cluster_request.go +++ b/cdp-sdk-go/gen/dw/models/restore_cluster_request.go @@ -23,7 +23,7 @@ type RestoreClusterRequest struct { // Required: true ClusterID *string `json:"clusterId"` - // Dump of configuration received by calling "dump-cluster" command. + // Backup data of configuration received by calling "backup-cluster" command. // Required: true Data *string `json:"data"` } diff --git a/cdp-sdk-go/gen/dw/models/update_vw_request.go b/cdp-sdk-go/gen/dw/models/update_vw_request.go index 995ab168..eca76a49 100644 --- a/cdp-sdk-go/gen/dw/models/update_vw_request.go +++ b/cdp-sdk-go/gen/dw/models/update_vw_request.go @@ -54,9 +54,9 @@ type UpdateVwRequest struct { // Used to set the resource pool of the Virtual Warehouses that are not enrolled for quota management. ResourcePool string `json:"resourcePool,omitempty"` - // DEPRECATED: It will be replaced by the tShirtSize parameter in an upcoming release. Name of configuration template to use. + // Name of T-shirt size to use, which will determine the number of nodes. // Enum: ["xsmall","small","medium","large"] - Template string `json:"template,omitempty"` + TShirtSize string `json:"tShirtSize,omitempty"` // ID of the Virtual Warehouse. // Required: true @@ -87,7 +87,7 @@ func (m *UpdateVwRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateTemplate(formats); err != nil { + if err := m.validateTShirtSize(formats); err != nil { res = append(res, err) } @@ -186,7 +186,7 @@ func (m *UpdateVwRequest) validateQueryIsolationOptions(formats strfmt.Registry) return nil } -var updateVwRequestTypeTemplatePropEnum []interface{} +var updateVwRequestTypeTShirtSizePropEnum []interface{} func init() { var res []string @@ -194,40 +194,40 @@ func init() { panic(err) } for _, v := range res { - updateVwRequestTypeTemplatePropEnum = append(updateVwRequestTypeTemplatePropEnum, v) + updateVwRequestTypeTShirtSizePropEnum = append(updateVwRequestTypeTShirtSizePropEnum, v) } } const ( - // UpdateVwRequestTemplateXsmall captures enum value "xsmall" - UpdateVwRequestTemplateXsmall string = "xsmall" + // UpdateVwRequestTShirtSizeXsmall captures enum value "xsmall" + UpdateVwRequestTShirtSizeXsmall string = "xsmall" - // UpdateVwRequestTemplateSmall captures enum value "small" - UpdateVwRequestTemplateSmall string = "small" + // UpdateVwRequestTShirtSizeSmall captures enum value "small" + UpdateVwRequestTShirtSizeSmall string = "small" - // UpdateVwRequestTemplateMedium captures enum value "medium" - UpdateVwRequestTemplateMedium string = "medium" + // UpdateVwRequestTShirtSizeMedium captures enum value "medium" + UpdateVwRequestTShirtSizeMedium string = "medium" - // UpdateVwRequestTemplateLarge captures enum value "large" - UpdateVwRequestTemplateLarge string = "large" + // UpdateVwRequestTShirtSizeLarge captures enum value "large" + UpdateVwRequestTShirtSizeLarge string = "large" ) // prop value enum -func (m *UpdateVwRequest) validateTemplateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateVwRequestTypeTemplatePropEnum, true); err != nil { +func (m *UpdateVwRequest) validateTShirtSizeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, updateVwRequestTypeTShirtSizePropEnum, true); err != nil { return err } return nil } -func (m *UpdateVwRequest) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(m.Template) { // not required +func (m *UpdateVwRequest) validateTShirtSize(formats strfmt.Registry) error { + if swag.IsZero(m.TShirtSize) { // not required return nil } // value enum - if err := m.validateTemplateEnum("template", "body", m.Template); err != nil { + if err := m.validateTShirtSizeEnum("tShirtSize", "body", m.TShirtSize); err != nil { return err } diff --git a/cdp-sdk-go/gen/dw/models/vw_summary.go b/cdp-sdk-go/gen/dw/models/vw_summary.go index cc290c10..e72e73d3 100644 --- a/cdp-sdk-go/gen/dw/models/vw_summary.go +++ b/cdp-sdk-go/gen/dw/models/vw_summary.go @@ -830,6 +830,9 @@ type VwSummaryEndpoints struct { // Port for clients to use when connecting to the VW. Port int32 `json:"port,omitempty"` + + // Command-line client that connects to Trino Virtual Warehouse to execute SQL queries. + TrinoCli string `json:"trinoCli,omitempty"` } // Validate validates this vw summary endpoints diff --git a/cdp-sdk-go/gen/environments/client/operations/initialize_a_w_s_compute_cluster_responses.go b/cdp-sdk-go/gen/environments/client/operations/initialize_a_w_s_compute_cluster_responses.go index 6dfc909c..71d91670 100644 --- a/cdp-sdk-go/gen/environments/client/operations/initialize_a_w_s_compute_cluster_responses.go +++ b/cdp-sdk-go/gen/environments/client/operations/initialize_a_w_s_compute_cluster_responses.go @@ -53,7 +53,7 @@ InitializeAWSComputeClusterOK describes a response with status code 200, with de Expected response to a valid request. */ type InitializeAWSComputeClusterOK struct { - Payload models.InitializeAWSComputeClusterResponse + Payload *models.InitializeAWSComputeClusterResponse } // IsSuccess returns true when this initialize a w s compute cluster o k response has a 2xx status code @@ -96,14 +96,16 @@ func (o *InitializeAWSComputeClusterOK) String() string { return fmt.Sprintf("[POST /api/v1/environments2/initializeAWSComputeCluster][%d] initializeAWSComputeClusterOK %s", 200, payload) } -func (o *InitializeAWSComputeClusterOK) GetPayload() models.InitializeAWSComputeClusterResponse { +func (o *InitializeAWSComputeClusterOK) GetPayload() *models.InitializeAWSComputeClusterResponse { return o.Payload } func (o *InitializeAWSComputeClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(models.InitializeAWSComputeClusterResponse) + // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } diff --git a/cdp-sdk-go/gen/environments/client/operations/initialize_azure_compute_cluster_responses.go b/cdp-sdk-go/gen/environments/client/operations/initialize_azure_compute_cluster_responses.go index 2e9dc001..f6cefbff 100644 --- a/cdp-sdk-go/gen/environments/client/operations/initialize_azure_compute_cluster_responses.go +++ b/cdp-sdk-go/gen/environments/client/operations/initialize_azure_compute_cluster_responses.go @@ -53,7 +53,7 @@ InitializeAzureComputeClusterOK describes a response with status code 200, with Expected response to a valid request. */ type InitializeAzureComputeClusterOK struct { - Payload models.InitializeAzureComputeClusterResponse + Payload *models.InitializeAzureComputeClusterResponse } // IsSuccess returns true when this initialize azure compute cluster o k response has a 2xx status code @@ -96,14 +96,16 @@ func (o *InitializeAzureComputeClusterOK) String() string { return fmt.Sprintf("[POST /api/v1/environments2/initializeAzureComputeCluster][%d] initializeAzureComputeClusterOK %s", 200, payload) } -func (o *InitializeAzureComputeClusterOK) GetPayload() models.InitializeAzureComputeClusterResponse { +func (o *InitializeAzureComputeClusterOK) GetPayload() *models.InitializeAzureComputeClusterResponse { return o.Payload } func (o *InitializeAzureComputeClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(models.InitializeAzureComputeClusterResponse) + // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } diff --git a/cdp-sdk-go/gen/environments/client/operations/last_sync_status_parameters.go b/cdp-sdk-go/gen/environments/client/operations/last_sync_status_parameters.go new file mode 100644 index 00000000..f7b21a18 --- /dev/null +++ b/cdp-sdk-go/gen/environments/client/operations/last_sync_status_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/models" +) + +// NewLastSyncStatusParams creates a new LastSyncStatusParams 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 NewLastSyncStatusParams() *LastSyncStatusParams { + return &LastSyncStatusParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewLastSyncStatusParamsWithTimeout creates a new LastSyncStatusParams object +// with the ability to set a timeout on a request. +func NewLastSyncStatusParamsWithTimeout(timeout time.Duration) *LastSyncStatusParams { + return &LastSyncStatusParams{ + timeout: timeout, + } +} + +// NewLastSyncStatusParamsWithContext creates a new LastSyncStatusParams object +// with the ability to set a context for a request. +func NewLastSyncStatusParamsWithContext(ctx context.Context) *LastSyncStatusParams { + return &LastSyncStatusParams{ + Context: ctx, + } +} + +// NewLastSyncStatusParamsWithHTTPClient creates a new LastSyncStatusParams object +// with the ability to set a custom HTTPClient for a request. +func NewLastSyncStatusParamsWithHTTPClient(client *http.Client) *LastSyncStatusParams { + return &LastSyncStatusParams{ + HTTPClient: client, + } +} + +/* +LastSyncStatusParams contains all the parameters to send to the API endpoint + + for the last sync status operation. + + Typically these are written to a http.Request. +*/ +type LastSyncStatusParams struct { + + // Input. + Input *models.LastSyncStatusRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the last sync status params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LastSyncStatusParams) WithDefaults() *LastSyncStatusParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the last sync status params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LastSyncStatusParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the last sync status params +func (o *LastSyncStatusParams) WithTimeout(timeout time.Duration) *LastSyncStatusParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the last sync status params +func (o *LastSyncStatusParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the last sync status params +func (o *LastSyncStatusParams) WithContext(ctx context.Context) *LastSyncStatusParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the last sync status params +func (o *LastSyncStatusParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the last sync status params +func (o *LastSyncStatusParams) WithHTTPClient(client *http.Client) *LastSyncStatusParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the last sync status params +func (o *LastSyncStatusParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInput adds the input to the last sync status params +func (o *LastSyncStatusParams) WithInput(input *models.LastSyncStatusRequest) *LastSyncStatusParams { + o.SetInput(input) + return o +} + +// SetInput adds the input to the last sync status params +func (o *LastSyncStatusParams) SetInput(input *models.LastSyncStatusRequest) { + o.Input = input +} + +// WriteToRequest writes these params to a swagger request +func (o *LastSyncStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Input != nil { + if err := r.SetBodyParam(o.Input); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/cdp-sdk-go/gen/environments/client/operations/last_sync_status_responses.go b/cdp-sdk-go/gen/environments/client/operations/last_sync_status_responses.go new file mode 100644 index 00000000..91e3058e --- /dev/null +++ b/cdp-sdk-go/gen/environments/client/operations/last_sync_status_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/models" +) + +// LastSyncStatusReader is a Reader for the LastSyncStatus structure. +type LastSyncStatusReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LastSyncStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLastSyncStatusOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewLastSyncStatusDefault(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 + } +} + +// NewLastSyncStatusOK creates a LastSyncStatusOK with default headers values +func NewLastSyncStatusOK() *LastSyncStatusOK { + return &LastSyncStatusOK{} +} + +/* +LastSyncStatusOK describes a response with status code 200, with default header values. + +Expected response to a valid request. +*/ +type LastSyncStatusOK struct { + Payload *models.LastSyncStatusResponse +} + +// IsSuccess returns true when this last sync status o k response has a 2xx status code +func (o *LastSyncStatusOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this last sync status o k response has a 3xx status code +func (o *LastSyncStatusOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this last sync status o k response has a 4xx status code +func (o *LastSyncStatusOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this last sync status o k response has a 5xx status code +func (o *LastSyncStatusOK) IsServerError() bool { + return false +} + +// IsCode returns true when this last sync status o k response a status code equal to that given +func (o *LastSyncStatusOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the last sync status o k response +func (o *LastSyncStatusOK) Code() int { + return 200 +} + +func (o *LastSyncStatusOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/environments2/lastSyncStatus][%d] lastSyncStatusOK %s", 200, payload) +} + +func (o *LastSyncStatusOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/environments2/lastSyncStatus][%d] lastSyncStatusOK %s", 200, payload) +} + +func (o *LastSyncStatusOK) GetPayload() *models.LastSyncStatusResponse { + return o.Payload +} + +func (o *LastSyncStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.LastSyncStatusResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLastSyncStatusDefault creates a LastSyncStatusDefault with default headers values +func NewLastSyncStatusDefault(code int) *LastSyncStatusDefault { + return &LastSyncStatusDefault{ + _statusCode: code, + } +} + +/* +LastSyncStatusDefault describes a response with status code -1, with default header values. + +The default response on an error. +*/ +type LastSyncStatusDefault struct { + _statusCode int + + Payload *models.Error +} + +// IsSuccess returns true when this last sync status default response has a 2xx status code +func (o *LastSyncStatusDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this last sync status default response has a 3xx status code +func (o *LastSyncStatusDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this last sync status default response has a 4xx status code +func (o *LastSyncStatusDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this last sync status default response has a 5xx status code +func (o *LastSyncStatusDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this last sync status default response a status code equal to that given +func (o *LastSyncStatusDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the last sync status default response +func (o *LastSyncStatusDefault) Code() int { + return o._statusCode +} + +func (o *LastSyncStatusDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/environments2/lastSyncStatus][%d] lastSyncStatus default %s", o._statusCode, payload) +} + +func (o *LastSyncStatusDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/environments2/lastSyncStatus][%d] lastSyncStatus default %s", o._statusCode, payload) +} + +func (o *LastSyncStatusDefault) GetPayload() *models.Error { + return o.Payload +} + +func (o *LastSyncStatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/cdp-sdk-go/gen/environments/client/operations/operations_client.go b/cdp-sdk-go/gen/environments/client/operations/operations_client.go index 1de96871..023b8754 100644 --- a/cdp-sdk-go/gen/environments/client/operations/operations_client.go +++ b/cdp-sdk-go/gen/environments/client/operations/operations_client.go @@ -146,6 +146,8 @@ type ClientService interface { InitializeAzureComputeCluster(params *InitializeAzureComputeClusterParams, opts ...ClientOption) (*InitializeAzureComputeClusterOK, error) + LastSyncStatus(params *LastSyncStatusParams, opts ...ClientOption) (*LastSyncStatusOK, error) + ListAuditCredentials(params *ListAuditCredentialsParams, opts ...ClientOption) (*ListAuditCredentialsOK, error) ListConnectedDataServices(params *ListConnectedDataServicesParams, opts ...ClientOption) (*ListConnectedDataServicesOK, error) @@ -2049,6 +2051,45 @@ func (a *Client) InitializeAzureComputeCluster(params *InitializeAzureComputeClu return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +LastSyncStatus returns status of the sync operation for the environment crn + +Returns status of the sync operation for the environment based on crn. +*/ +func (a *Client) LastSyncStatus(params *LastSyncStatusParams, opts ...ClientOption) (*LastSyncStatusOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLastSyncStatusParams() + } + op := &runtime.ClientOperation{ + ID: "lastSyncStatus", + Method: "POST", + PathPattern: "/api/v1/environments2/lastSyncStatus", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LastSyncStatusReader{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 + } + success, ok := result.(*LastSyncStatusOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*LastSyncStatusDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ListAuditCredentials lists audit credentials diff --git a/cdp-sdk-go/gen/environments/models/a_w_s_compute_cluster_configuration_request.go b/cdp-sdk-go/gen/environments/models/a_w_s_compute_cluster_configuration_request.go index 094499f9..6150bc71 100644 --- a/cdp-sdk-go/gen/environments/models/a_w_s_compute_cluster_configuration_request.go +++ b/cdp-sdk-go/gen/environments/models/a_w_s_compute_cluster_configuration_request.go @@ -17,7 +17,7 @@ import ( // swagger:model AWSComputeClusterConfigurationRequest type AWSComputeClusterConfigurationRequest struct { - // Kubernetes API authorized IP ranges in CIDR notation. Mutually exclusive with privateCluster. Default value is 0.0.0.0/0. + // Kubernetes API authorized IP ranges in CIDR notation. Mutually exclusive with privateCluster. KubeAPIAuthorizedIPRanges []string `json:"kubeApiAuthorizedIpRanges"` // If true, creates private cluster. diff --git a/cdp-sdk-go/gen/environments/models/azure_compute_cluster_configuration_request.go b/cdp-sdk-go/gen/environments/models/azure_compute_cluster_configuration_request.go index 41daf403..628ba433 100644 --- a/cdp-sdk-go/gen/environments/models/azure_compute_cluster_configuration_request.go +++ b/cdp-sdk-go/gen/environments/models/azure_compute_cluster_configuration_request.go @@ -20,7 +20,7 @@ import ( // swagger:model AzureComputeClusterConfigurationRequest type AzureComputeClusterConfigurationRequest struct { - // Kubernetes API authorized IP ranges in CIDR notation. Mutually exclusive with privateCluster. Default value is 0.0.0.0/0. + // Kubernetes API authorized IP ranges in CIDR notation. Mutually exclusive with privateCluster. KubeAPIAuthorizedIPRanges []string `json:"kubeApiAuthorizedIpRanges"` // Customize cluster egress with defined outbound type in Azure Kubernetes Service. diff --git a/cdp-sdk-go/gen/environments/models/create_a_w_s_environment_request.go b/cdp-sdk-go/gen/environments/models/create_a_w_s_environment_request.go index 4ea3371d..4733fd03 100644 --- a/cdp-sdk-go/gen/environments/models/create_a_w_s_environment_request.go +++ b/cdp-sdk-go/gen/environments/models/create_a_w_s_environment_request.go @@ -87,7 +87,7 @@ type CreateAWSEnvironmentRequest struct { // When true, this will report additional diagnostic information back to Cloudera. ReportDeploymentLogs bool `json:"reportDeploymentLogs,omitempty"` - // The name for the DynamoDB table backing S3Guard. + // Deprecated. S3Guard was used to ensure consistent S3 updates when S3 was still eventually consistent. With the introduction of Consistent S3, the goal and usage of S3 Guard have become superfluous and defunct. S3GuardTableName string `json:"s3GuardTableName,omitempty"` // Security control for FreeIPA and Data Lake deployment. diff --git a/cdp-sdk-go/gen/environments/models/create_a_w_s_gov_cloud_environment_request.go b/cdp-sdk-go/gen/environments/models/create_a_w_s_gov_cloud_environment_request.go index 1806c615..165ebb88 100644 --- a/cdp-sdk-go/gen/environments/models/create_a_w_s_gov_cloud_environment_request.go +++ b/cdp-sdk-go/gen/environments/models/create_a_w_s_gov_cloud_environment_request.go @@ -81,7 +81,7 @@ type CreateAWSGovCloudEnvironmentRequest struct { // When true, this will report additional diagnostic information back to Cloudera. ReportDeploymentLogs bool `json:"reportDeploymentLogs,omitempty"` - // The name for the DynamoDB table backing S3Guard. + // Deprecated. S3Guard was used to ensure consistent S3 updates when S3 was still eventually consistent. With the introduction of Consistent S3, the goal and usage of S3 Guard have become superfluous and defunct. S3GuardTableName string `json:"s3GuardTableName,omitempty"` // Security control for FreeIPA and Data Lake deployment. diff --git a/cdp-sdk-go/gen/environments/models/credential.go b/cdp-sdk-go/gen/environments/models/credential.go index 070f0fd2..fea353be 100644 --- a/cdp-sdk-go/gen/environments/models/credential.go +++ b/cdp-sdk-go/gen/environments/models/credential.go @@ -46,6 +46,12 @@ type Credential struct { // The credential properties that closely related to those that have been created on GCP. GcpCredentialProperties *GCPCredentialProperties `json:"gcpCredentialProperties,omitempty"` + + // Skips organization policy decisions during cloud storage validation. + SkipOrgPolicyDecisions *bool `json:"skipOrgPolicyDecisions,omitempty"` + + // When true, verifies credential permissions. + VerifyPermissions *bool `json:"verifyPermissions,omitempty"` } // Validate validates this credential diff --git a/cdp-sdk-go/gen/environments/models/environment.go b/cdp-sdk-go/gen/environments/models/environment.go index 1d12fc3c..172b0753 100644 --- a/cdp-sdk-go/gen/environments/models/environment.go +++ b/cdp-sdk-go/gen/environments/models/environment.go @@ -31,6 +31,9 @@ type Environment struct { // The Externalized Azure k8s configuration for the environment. AzureComputeClusterConfiguration *AzureComputeClusterConfiguration `json:"azureComputeClusterConfiguration,omitempty"` + // azure details + AzureDetails *EnvironmentAzureDetails `json:"azureDetails,omitempty"` + // Storage configuration for backup. BackupStorage *BackupStorage `json:"backupStorage,omitempty"` @@ -136,6 +139,10 @@ func (m *Environment) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateAzureDetails(formats); err != nil { + res = append(res, err) + } + if err := m.validateBackupStorage(formats); err != nil { res = append(res, err) } @@ -290,6 +297,25 @@ func (m *Environment) validateAzureComputeClusterConfiguration(formats strfmt.Re return nil } +func (m *Environment) validateAzureDetails(formats strfmt.Registry) error { + if swag.IsZero(m.AzureDetails) { // not required + return nil + } + + if m.AzureDetails != nil { + if err := m.AzureDetails.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azureDetails") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azureDetails") + } + return err + } + } + + return nil +} + func (m *Environment) validateBackupStorage(formats strfmt.Registry) error { if swag.IsZero(m.BackupStorage) { // not required return nil @@ -585,6 +611,10 @@ func (m *Environment) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } + if err := m.contextValidateAzureDetails(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateBackupStorage(ctx, formats); err != nil { res = append(res, err) } @@ -719,6 +749,27 @@ func (m *Environment) contextValidateAzureComputeClusterConfiguration(ctx contex return nil } +func (m *Environment) contextValidateAzureDetails(ctx context.Context, formats strfmt.Registry) error { + + if m.AzureDetails != nil { + + if swag.IsZero(m.AzureDetails) { // not required + return nil + } + + if err := m.AzureDetails.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azureDetails") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azureDetails") + } + return err + } + } + + return nil +} + func (m *Environment) contextValidateBackupStorage(ctx context.Context, formats strfmt.Registry) error { if m.BackupStorage != nil { @@ -962,7 +1013,7 @@ func (m *Environment) UnmarshalBinary(b []byte) error { // swagger:model EnvironmentAwsDetails type EnvironmentAwsDetails struct { - // The name for the DynamoDB table backing S3Guard. + // Deprecated. S3Guard was used to ensure consistent S3 updates when S3 was still eventually consistent. With the introduction of Consistent S3, the goal and usage of S3 Guard have become superfluous and defunct. S3GuardTableName string `json:"s3GuardTableName,omitempty"` } @@ -994,6 +1045,104 @@ func (m *EnvironmentAwsDetails) UnmarshalBinary(b []byte) error { return nil } +// EnvironmentAzureDetails Azure specific environment configuration information. +// +// swagger:model EnvironmentAzureDetails +type EnvironmentAzureDetails struct { + + // Object containing details of encryption parameters for Azure cloud. + ResourceEncryptionParameters *AzureResourceEncryptionParameters `json:"resourceEncryptionParameters,omitempty"` + + // Name of an existing Azure resource group to be used for the environment. If it is not specified then new resource groups will be generated. + ResourceGroupName string `json:"resourceGroupName,omitempty"` +} + +// Validate validates this environment azure details +func (m *EnvironmentAzureDetails) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResourceEncryptionParameters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *EnvironmentAzureDetails) validateResourceEncryptionParameters(formats strfmt.Registry) error { + if swag.IsZero(m.ResourceEncryptionParameters) { // not required + return nil + } + + if m.ResourceEncryptionParameters != nil { + if err := m.ResourceEncryptionParameters.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azureDetails" + "." + "resourceEncryptionParameters") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azureDetails" + "." + "resourceEncryptionParameters") + } + return err + } + } + + return nil +} + +// ContextValidate validate this environment azure details based on the context it is used +func (m *EnvironmentAzureDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateResourceEncryptionParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *EnvironmentAzureDetails) contextValidateResourceEncryptionParameters(ctx context.Context, formats strfmt.Registry) error { + + if m.ResourceEncryptionParameters != nil { + + if swag.IsZero(m.ResourceEncryptionParameters) { // not required + return nil + } + + if err := m.ResourceEncryptionParameters.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azureDetails" + "." + "resourceEncryptionParameters") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azureDetails" + "." + "resourceEncryptionParameters") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *EnvironmentAzureDetails) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EnvironmentAzureDetails) UnmarshalBinary(b []byte) error { + var res EnvironmentAzureDetails + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + // EnvironmentGcpDetails GCP specific environment configuration information. // // swagger:model EnvironmentGcpDetails diff --git a/cdp-sdk-go/gen/environments/models/initialize_a_w_s_compute_cluster_response.go b/cdp-sdk-go/gen/environments/models/initialize_a_w_s_compute_cluster_response.go index 8cf9038f..5b05224f 100644 --- a/cdp-sdk-go/gen/environments/models/initialize_a_w_s_compute_cluster_response.go +++ b/cdp-sdk-go/gen/environments/models/initialize_a_w_s_compute_cluster_response.go @@ -5,7 +5,46 @@ 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" +) + // InitializeAWSComputeClusterResponse Response object for an initialize AWS default compute cluster request. // // swagger:model InitializeAWSComputeClusterResponse -type InitializeAWSComputeClusterResponse interface{} +type InitializeAWSComputeClusterResponse struct { + + // The id of the related operation. + OperationID string `json:"operationId,omitempty"` +} + +// Validate validates this initialize a w s compute cluster response +func (m *InitializeAWSComputeClusterResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this initialize a w s compute cluster response based on context it is used +func (m *InitializeAWSComputeClusterResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *InitializeAWSComputeClusterResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InitializeAWSComputeClusterResponse) UnmarshalBinary(b []byte) error { + var res InitializeAWSComputeClusterResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/environments/models/initialize_azure_compute_cluster_response.go b/cdp-sdk-go/gen/environments/models/initialize_azure_compute_cluster_response.go index a113fa96..94914dea 100644 --- a/cdp-sdk-go/gen/environments/models/initialize_azure_compute_cluster_response.go +++ b/cdp-sdk-go/gen/environments/models/initialize_azure_compute_cluster_response.go @@ -5,7 +5,46 @@ 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" +) + // InitializeAzureComputeClusterResponse Response object for an initialize Azure default compute cluster request. // // swagger:model InitializeAzureComputeClusterResponse -type InitializeAzureComputeClusterResponse interface{} +type InitializeAzureComputeClusterResponse struct { + + // The id of the related operation. + OperationID string `json:"operationId,omitempty"` +} + +// Validate validates this initialize azure compute cluster response +func (m *InitializeAzureComputeClusterResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this initialize azure compute cluster response based on context it is used +func (m *InitializeAzureComputeClusterResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *InitializeAzureComputeClusterResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InitializeAzureComputeClusterResponse) UnmarshalBinary(b []byte) error { + var res InitializeAzureComputeClusterResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/environments/models/last_sync_status_request.go b/cdp-sdk-go/gen/environments/models/last_sync_status_request.go new file mode 100644 index 00000000..75ed34da --- /dev/null +++ b/cdp-sdk-go/gen/environments/models/last_sync_status_request.go @@ -0,0 +1,71 @@ +// 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" +) + +// LastSyncStatusRequest Request object for Sync Status. +// +// swagger:model LastSyncStatusRequest +type LastSyncStatusRequest struct { + + // Name or Crn of the environment. + // Required: true + EnvNameOrCrn *string `json:"envNameOrCrn"` +} + +// Validate validates this last sync status request +func (m *LastSyncStatusRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEnvNameOrCrn(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *LastSyncStatusRequest) validateEnvNameOrCrn(formats strfmt.Registry) error { + + if err := validate.Required("envNameOrCrn", "body", m.EnvNameOrCrn); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this last sync status request based on context it is used +func (m *LastSyncStatusRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *LastSyncStatusRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *LastSyncStatusRequest) UnmarshalBinary(b []byte) error { + var res LastSyncStatusRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/environments/models/last_sync_status_response.go b/cdp-sdk-go/gen/environments/models/last_sync_status_response.go new file mode 100644 index 00000000..496a57d9 --- /dev/null +++ b/cdp-sdk-go/gen/environments/models/last_sync_status_response.go @@ -0,0 +1,336 @@ +// 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" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// LastSyncStatusResponse Response object for Sync Operation. +// +// swagger:model LastSyncStatusResponse +type LastSyncStatusResponse struct { + + // Date when the sync operation ended. Omitted if operation has not ended. + // Format: date-time + EndDate strfmt.DateTime `json:"endDate,omitempty"` + + // If there is any error associated. The error will be populated on any error and it may be populated when the operation failure details are empty. + Error string `json:"error,omitempty"` + + // List of sync operation details for all failed environments. + Failure []*SyncOperationDetails `json:"failure"` + + // UUID of the request for this operation. This Id can be used for geting status on the operation. + // Required: true + OperationID *string `json:"operationId"` + + // Operation type, set password or user sync + OperationType OperationType `json:"operationType,omitempty"` + + // Date when the sync operation started. + // Format: date-time + StartDate strfmt.DateTime `json:"startDate,omitempty"` + + // Status of this operation. Status can be one of these values (REQUESTED, RUNNING, COMPLETED, FAILED, REJECTED, TIMEDOUT) + Status SyncStatus `json:"status,omitempty"` + + // List of sync operation details for all succeeded environments. + Success []*SyncOperationDetails `json:"success"` +} + +// Validate validates this last sync status response +func (m *LastSyncStatusResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEndDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFailure(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperationType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSuccess(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *LastSyncStatusResponse) validateEndDate(formats strfmt.Registry) error { + if swag.IsZero(m.EndDate) { // not required + return nil + } + + if err := validate.FormatOf("endDate", "body", "date-time", m.EndDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *LastSyncStatusResponse) validateFailure(formats strfmt.Registry) error { + if swag.IsZero(m.Failure) { // not required + return nil + } + + for i := 0; i < len(m.Failure); i++ { + if swag.IsZero(m.Failure[i]) { // not required + continue + } + + if m.Failure[i] != nil { + if err := m.Failure[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("failure" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("failure" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *LastSyncStatusResponse) validateOperationID(formats strfmt.Registry) error { + + if err := validate.Required("operationId", "body", m.OperationID); err != nil { + return err + } + + return nil +} + +func (m *LastSyncStatusResponse) validateOperationType(formats strfmt.Registry) error { + if swag.IsZero(m.OperationType) { // not required + return nil + } + + if err := m.OperationType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("operationType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("operationType") + } + return err + } + + return nil +} + +func (m *LastSyncStatusResponse) validateStartDate(formats strfmt.Registry) error { + if swag.IsZero(m.StartDate) { // not required + return nil + } + + if err := validate.FormatOf("startDate", "body", "date-time", m.StartDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *LastSyncStatusResponse) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + + return nil +} + +func (m *LastSyncStatusResponse) validateSuccess(formats strfmt.Registry) error { + if swag.IsZero(m.Success) { // not required + return nil + } + + for i := 0; i < len(m.Success); i++ { + if swag.IsZero(m.Success[i]) { // not required + continue + } + + if m.Success[i] != nil { + if err := m.Success[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("success" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("success" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this last sync status response based on the context it is used +func (m *LastSyncStatusResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateFailure(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateOperationType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSuccess(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *LastSyncStatusResponse) contextValidateFailure(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Failure); i++ { + + if m.Failure[i] != nil { + + if swag.IsZero(m.Failure[i]) { // not required + return nil + } + + if err := m.Failure[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("failure" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("failure" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *LastSyncStatusResponse) contextValidateOperationType(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.OperationType) { // not required + return nil + } + + if err := m.OperationType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("operationType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("operationType") + } + return err + } + + return nil +} + +func (m *LastSyncStatusResponse) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + + return nil +} + +func (m *LastSyncStatusResponse) contextValidateSuccess(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Success); i++ { + + if m.Success[i] != nil { + + if swag.IsZero(m.Success[i]) { // not required + return nil + } + + if err := m.Success[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("success" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("success" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *LastSyncStatusResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *LastSyncStatusResponse) UnmarshalBinary(b []byte) error { + var res LastSyncStatusResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/ml/models/backup_detail.go b/cdp-sdk-go/gen/ml/models/backup_detail.go index 40d02e1b..ae47548b 100644 --- a/cdp-sdk-go/gen/ml/models/backup_detail.go +++ b/cdp-sdk-go/gen/ml/models/backup_detail.go @@ -35,9 +35,6 @@ type BackupDetail struct { // The CRN of the creator. CreatorCrn string `json:"creatorCrn,omitempty"` - // Status whether the backup is cross namespace enabled. - IsCrossNsBackup bool `json:"isCrossNsBackup,omitempty"` - // The version of the backed-up workbench at the time of backup. WorkspaceVersionAtBackup string `json:"workspaceVersionAtBackup,omitempty"` } diff --git a/cdp-sdk-go/gen/ml/models/create_workspace_request.go b/cdp-sdk-go/gen/ml/models/create_workspace_request.go index c838271c..20f71f49 100644 --- a/cdp-sdk-go/gen/ml/models/create_workspace_request.go +++ b/cdp-sdk-go/gen/ml/models/create_workspace_request.go @@ -51,9 +51,6 @@ type CreateWorkspaceRequest struct { // The whitelist of IPs for load balancer. LoadBalancerIPWhitelists []string `json:"loadBalancerIPWhitelists"` - // The version of ML workload app to install. - MlVersion string `json:"mlVersion,omitempty"` - // The NFS Protocol version of the NFS server we are using for Azure and Private Cloud. NfsVersion string `json:"nfsVersion,omitempty"` diff --git a/cdp-sdk-go/gen/opdb/client/operations/list_certificates_parameters.go b/cdp-sdk-go/gen/opdb/client/operations/list_certificates_parameters.go new file mode 100644 index 00000000..c9a59469 --- /dev/null +++ b/cdp-sdk-go/gen/opdb/client/operations/list_certificates_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/opdb/models" +) + +// NewListCertificatesParams creates a new ListCertificatesParams 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 NewListCertificatesParams() *ListCertificatesParams { + return &ListCertificatesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewListCertificatesParamsWithTimeout creates a new ListCertificatesParams object +// with the ability to set a timeout on a request. +func NewListCertificatesParamsWithTimeout(timeout time.Duration) *ListCertificatesParams { + return &ListCertificatesParams{ + timeout: timeout, + } +} + +// NewListCertificatesParamsWithContext creates a new ListCertificatesParams object +// with the ability to set a context for a request. +func NewListCertificatesParamsWithContext(ctx context.Context) *ListCertificatesParams { + return &ListCertificatesParams{ + Context: ctx, + } +} + +// NewListCertificatesParamsWithHTTPClient creates a new ListCertificatesParams object +// with the ability to set a custom HTTPClient for a request. +func NewListCertificatesParamsWithHTTPClient(client *http.Client) *ListCertificatesParams { + return &ListCertificatesParams{ + HTTPClient: client, + } +} + +/* +ListCertificatesParams contains all the parameters to send to the API endpoint + + for the list certificates operation. + + Typically these are written to a http.Request. +*/ +type ListCertificatesParams struct { + + // Input. + Input *models.ListCertificatesRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the list certificates params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ListCertificatesParams) WithDefaults() *ListCertificatesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the list certificates params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ListCertificatesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the list certificates params +func (o *ListCertificatesParams) WithTimeout(timeout time.Duration) *ListCertificatesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the list certificates params +func (o *ListCertificatesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the list certificates params +func (o *ListCertificatesParams) WithContext(ctx context.Context) *ListCertificatesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the list certificates params +func (o *ListCertificatesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the list certificates params +func (o *ListCertificatesParams) WithHTTPClient(client *http.Client) *ListCertificatesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the list certificates params +func (o *ListCertificatesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInput adds the input to the list certificates params +func (o *ListCertificatesParams) WithInput(input *models.ListCertificatesRequest) *ListCertificatesParams { + o.SetInput(input) + return o +} + +// SetInput adds the input to the list certificates params +func (o *ListCertificatesParams) SetInput(input *models.ListCertificatesRequest) { + o.Input = input +} + +// WriteToRequest writes these params to a swagger request +func (o *ListCertificatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Input != nil { + if err := r.SetBodyParam(o.Input); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/cdp-sdk-go/gen/opdb/client/operations/list_certificates_responses.go b/cdp-sdk-go/gen/opdb/client/operations/list_certificates_responses.go new file mode 100644 index 00000000..fcee4a7b --- /dev/null +++ b/cdp-sdk-go/gen/opdb/client/operations/list_certificates_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/opdb/models" +) + +// ListCertificatesReader is a Reader for the ListCertificates structure. +type ListCertificatesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ListCertificatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewListCertificatesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewListCertificatesDefault(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 + } +} + +// NewListCertificatesOK creates a ListCertificatesOK with default headers values +func NewListCertificatesOK() *ListCertificatesOK { + return &ListCertificatesOK{} +} + +/* +ListCertificatesOK describes a response with status code 200, with default header values. + +Expected response to a valid request. +*/ +type ListCertificatesOK struct { + Payload *models.ListCertificatesResponse +} + +// IsSuccess returns true when this list certificates o k response has a 2xx status code +func (o *ListCertificatesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this list certificates o k response has a 3xx status code +func (o *ListCertificatesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list certificates o k response has a 4xx status code +func (o *ListCertificatesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this list certificates o k response has a 5xx status code +func (o *ListCertificatesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this list certificates o k response a status code equal to that given +func (o *ListCertificatesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the list certificates o k response +func (o *ListCertificatesOK) Code() int { + return 200 +} + +func (o *ListCertificatesOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/opdb/listCertificates][%d] listCertificatesOK %s", 200, payload) +} + +func (o *ListCertificatesOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/opdb/listCertificates][%d] listCertificatesOK %s", 200, payload) +} + +func (o *ListCertificatesOK) GetPayload() *models.ListCertificatesResponse { + return o.Payload +} + +func (o *ListCertificatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ListCertificatesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewListCertificatesDefault creates a ListCertificatesDefault with default headers values +func NewListCertificatesDefault(code int) *ListCertificatesDefault { + return &ListCertificatesDefault{ + _statusCode: code, + } +} + +/* +ListCertificatesDefault describes a response with status code -1, with default header values. + +The default response on an error. +*/ +type ListCertificatesDefault struct { + _statusCode int + + Payload *models.Error +} + +// IsSuccess returns true when this list certificates default response has a 2xx status code +func (o *ListCertificatesDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this list certificates default response has a 3xx status code +func (o *ListCertificatesDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this list certificates default response has a 4xx status code +func (o *ListCertificatesDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this list certificates default response has a 5xx status code +func (o *ListCertificatesDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this list certificates default response a status code equal to that given +func (o *ListCertificatesDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the list certificates default response +func (o *ListCertificatesDefault) Code() int { + return o._statusCode +} + +func (o *ListCertificatesDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/opdb/listCertificates][%d] listCertificates default %s", o._statusCode, payload) +} + +func (o *ListCertificatesDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/opdb/listCertificates][%d] listCertificates default %s", o._statusCode, payload) +} + +func (o *ListCertificatesDefault) GetPayload() *models.Error { + return o.Payload +} + +func (o *ListCertificatesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/cdp-sdk-go/gen/opdb/client/operations/list_supported_instance_types_parameters.go b/cdp-sdk-go/gen/opdb/client/operations/list_supported_instance_types_parameters.go new file mode 100644 index 00000000..0c77754b --- /dev/null +++ b/cdp-sdk-go/gen/opdb/client/operations/list_supported_instance_types_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/opdb/models" +) + +// NewListSupportedInstanceTypesParams creates a new ListSupportedInstanceTypesParams 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 NewListSupportedInstanceTypesParams() *ListSupportedInstanceTypesParams { + return &ListSupportedInstanceTypesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewListSupportedInstanceTypesParamsWithTimeout creates a new ListSupportedInstanceTypesParams object +// with the ability to set a timeout on a request. +func NewListSupportedInstanceTypesParamsWithTimeout(timeout time.Duration) *ListSupportedInstanceTypesParams { + return &ListSupportedInstanceTypesParams{ + timeout: timeout, + } +} + +// NewListSupportedInstanceTypesParamsWithContext creates a new ListSupportedInstanceTypesParams object +// with the ability to set a context for a request. +func NewListSupportedInstanceTypesParamsWithContext(ctx context.Context) *ListSupportedInstanceTypesParams { + return &ListSupportedInstanceTypesParams{ + Context: ctx, + } +} + +// NewListSupportedInstanceTypesParamsWithHTTPClient creates a new ListSupportedInstanceTypesParams object +// with the ability to set a custom HTTPClient for a request. +func NewListSupportedInstanceTypesParamsWithHTTPClient(client *http.Client) *ListSupportedInstanceTypesParams { + return &ListSupportedInstanceTypesParams{ + HTTPClient: client, + } +} + +/* +ListSupportedInstanceTypesParams contains all the parameters to send to the API endpoint + + for the list supported instance types operation. + + Typically these are written to a http.Request. +*/ +type ListSupportedInstanceTypesParams struct { + + // Input. + Input *models.ListSupportedInstanceTypesRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the list supported instance types params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ListSupportedInstanceTypesParams) WithDefaults() *ListSupportedInstanceTypesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the list supported instance types params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ListSupportedInstanceTypesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the list supported instance types params +func (o *ListSupportedInstanceTypesParams) WithTimeout(timeout time.Duration) *ListSupportedInstanceTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the list supported instance types params +func (o *ListSupportedInstanceTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the list supported instance types params +func (o *ListSupportedInstanceTypesParams) WithContext(ctx context.Context) *ListSupportedInstanceTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the list supported instance types params +func (o *ListSupportedInstanceTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the list supported instance types params +func (o *ListSupportedInstanceTypesParams) WithHTTPClient(client *http.Client) *ListSupportedInstanceTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the list supported instance types params +func (o *ListSupportedInstanceTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInput adds the input to the list supported instance types params +func (o *ListSupportedInstanceTypesParams) WithInput(input *models.ListSupportedInstanceTypesRequest) *ListSupportedInstanceTypesParams { + o.SetInput(input) + return o +} + +// SetInput adds the input to the list supported instance types params +func (o *ListSupportedInstanceTypesParams) SetInput(input *models.ListSupportedInstanceTypesRequest) { + o.Input = input +} + +// WriteToRequest writes these params to a swagger request +func (o *ListSupportedInstanceTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Input != nil { + if err := r.SetBodyParam(o.Input); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/cdp-sdk-go/gen/opdb/client/operations/list_supported_instance_types_responses.go b/cdp-sdk-go/gen/opdb/client/operations/list_supported_instance_types_responses.go new file mode 100644 index 00000000..c5a630c6 --- /dev/null +++ b/cdp-sdk-go/gen/opdb/client/operations/list_supported_instance_types_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/opdb/models" +) + +// ListSupportedInstanceTypesReader is a Reader for the ListSupportedInstanceTypes structure. +type ListSupportedInstanceTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ListSupportedInstanceTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewListSupportedInstanceTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewListSupportedInstanceTypesDefault(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 + } +} + +// NewListSupportedInstanceTypesOK creates a ListSupportedInstanceTypesOK with default headers values +func NewListSupportedInstanceTypesOK() *ListSupportedInstanceTypesOK { + return &ListSupportedInstanceTypesOK{} +} + +/* +ListSupportedInstanceTypesOK describes a response with status code 200, with default header values. + +Expected response to a valid request. +*/ +type ListSupportedInstanceTypesOK struct { + Payload *models.ListSupportedInstanceTypesResponse +} + +// IsSuccess returns true when this list supported instance types o k response has a 2xx status code +func (o *ListSupportedInstanceTypesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this list supported instance types o k response has a 3xx status code +func (o *ListSupportedInstanceTypesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list supported instance types o k response has a 4xx status code +func (o *ListSupportedInstanceTypesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this list supported instance types o k response has a 5xx status code +func (o *ListSupportedInstanceTypesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this list supported instance types o k response a status code equal to that given +func (o *ListSupportedInstanceTypesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the list supported instance types o k response +func (o *ListSupportedInstanceTypesOK) Code() int { + return 200 +} + +func (o *ListSupportedInstanceTypesOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/opdb/listSupportedInstanceTypes][%d] listSupportedInstanceTypesOK %s", 200, payload) +} + +func (o *ListSupportedInstanceTypesOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/opdb/listSupportedInstanceTypes][%d] listSupportedInstanceTypesOK %s", 200, payload) +} + +func (o *ListSupportedInstanceTypesOK) GetPayload() *models.ListSupportedInstanceTypesResponse { + return o.Payload +} + +func (o *ListSupportedInstanceTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ListSupportedInstanceTypesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewListSupportedInstanceTypesDefault creates a ListSupportedInstanceTypesDefault with default headers values +func NewListSupportedInstanceTypesDefault(code int) *ListSupportedInstanceTypesDefault { + return &ListSupportedInstanceTypesDefault{ + _statusCode: code, + } +} + +/* +ListSupportedInstanceTypesDefault describes a response with status code -1, with default header values. + +The default response on an error. +*/ +type ListSupportedInstanceTypesDefault struct { + _statusCode int + + Payload *models.Error +} + +// IsSuccess returns true when this list supported instance types default response has a 2xx status code +func (o *ListSupportedInstanceTypesDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this list supported instance types default response has a 3xx status code +func (o *ListSupportedInstanceTypesDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this list supported instance types default response has a 4xx status code +func (o *ListSupportedInstanceTypesDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this list supported instance types default response has a 5xx status code +func (o *ListSupportedInstanceTypesDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this list supported instance types default response a status code equal to that given +func (o *ListSupportedInstanceTypesDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the list supported instance types default response +func (o *ListSupportedInstanceTypesDefault) Code() int { + return o._statusCode +} + +func (o *ListSupportedInstanceTypesDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/opdb/listSupportedInstanceTypes][%d] listSupportedInstanceTypes default %s", o._statusCode, payload) +} + +func (o *ListSupportedInstanceTypesDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/opdb/listSupportedInstanceTypes][%d] listSupportedInstanceTypes default %s", o._statusCode, payload) +} + +func (o *ListSupportedInstanceTypesDefault) GetPayload() *models.Error { + return o.Payload +} + +func (o *ListSupportedInstanceTypesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/cdp-sdk-go/gen/opdb/client/operations/operations_client.go b/cdp-sdk-go/gen/opdb/client/operations/operations_client.go index f2f781b6..6fa895cd 100644 --- a/cdp-sdk-go/gen/opdb/client/operations/operations_client.go +++ b/cdp-sdk-go/gen/opdb/client/operations/operations_client.go @@ -74,6 +74,8 @@ type ClientService interface { DropDatabase(params *DropDatabaseParams, opts ...ClientOption) (*DropDatabaseOK, error) + ListCertificates(params *ListCertificatesParams, opts ...ClientOption) (*ListCertificatesOK, error) + ListCoprocessors(params *ListCoprocessorsParams, opts ...ClientOption) (*ListCoprocessorsOK, error) ListDatabases(params *ListDatabasesParams, opts ...ClientOption) (*ListDatabasesOK, error) @@ -92,6 +94,8 @@ type ClientService interface { ListSupportedEnvironments(params *ListSupportedEnvironmentsParams, opts ...ClientOption) (*ListSupportedEnvironmentsOK, error) + ListSupportedInstanceTypes(params *ListSupportedInstanceTypesParams, opts ...ClientOption) (*ListSupportedInstanceTypesOK, error) + PrepareUpgradeDatabase(params *PrepareUpgradeDatabaseParams, opts ...ClientOption) (*PrepareUpgradeDatabaseOK, error) RemoveCoprocessor(params *RemoveCoprocessorParams, opts ...ClientOption) (*RemoveCoprocessorOK, error) @@ -110,6 +114,8 @@ type ClientService interface { UpgradeDatabase(params *UpgradeDatabaseParams, opts ...ClientOption) (*UpgradeDatabaseOK, error) + UploadCertificate(params *UploadCertificateParams, opts ...ClientOption) (*UploadCertificateOK, error) + SetTransport(transport runtime.ClientTransport) } @@ -233,7 +239,7 @@ func (a *Client) CreateDatabase(params *CreateDatabaseParams, opts ...ClientOpti /* CreateSnapshot creates a snapshot for a specific table -Returns id state and creation time +Returns id state and creation time. */ func (a *Client) CreateSnapshot(params *CreateSnapshotParams, opts ...ClientOption) (*CreateSnapshotOK, error) { // TODO: Validate the params before sending @@ -272,7 +278,7 @@ func (a *Client) CreateSnapshot(params *CreateSnapshotParams, opts ...ClientOpti /* DeleteSnapshot deletes a snapshot -Returns state of operation +Returns the snapshot that is deleted. */ func (a *Client) DeleteSnapshot(params *DeleteSnapshotParams, opts ...ClientOption) (*DeleteSnapshotOK, error) { // TODO: Validate the params before sending @@ -503,6 +509,45 @@ func (a *Client) DropDatabase(params *DropDatabaseParams, opts ...ClientOption) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ListCertificates lists certificates + +List SHA-1 fingerprints of certificates in Global Trust Store +*/ +func (a *Client) ListCertificates(params *ListCertificatesParams, opts ...ClientOption) (*ListCertificatesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewListCertificatesParams() + } + op := &runtime.ClientOperation{ + ID: "listCertificates", + Method: "POST", + PathPattern: "/api/v1/opdb/listCertificates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ListCertificatesReader{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 + } + success, ok := result.(*ListCertificatesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ListCertificatesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ListCoprocessors lists coprocessors in a database @@ -779,7 +824,7 @@ func (a *Client) ListScalingEvents(params *ListScalingEventsParams, opts ...Clie /* ListSnapshots shows snapshot for a table name in a specific location -Returns list of snapshot names +Returns list of snapshot names. */ func (a *Client) ListSnapshots(params *ListSnapshotsParams, opts ...ClientOption) (*ListSnapshotsOK, error) { // TODO: Validate the params before sending @@ -854,6 +899,45 @@ func (a *Client) ListSupportedEnvironments(params *ListSupportedEnvironmentsPara return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ListSupportedInstanceTypes lists instance types supported by c o d + +Lists instance types supported by COD. +*/ +func (a *Client) ListSupportedInstanceTypes(params *ListSupportedInstanceTypesParams, opts ...ClientOption) (*ListSupportedInstanceTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewListSupportedInstanceTypesParams() + } + op := &runtime.ClientOperation{ + ID: "listSupportedInstanceTypes", + Method: "POST", + PathPattern: "/api/v1/opdb/listSupportedInstanceTypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ListSupportedInstanceTypesReader{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 + } + success, ok := result.(*ListSupportedInstanceTypesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ListSupportedInstanceTypesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* PrepareUpgradeDatabase prepares database upgrade @@ -935,7 +1019,7 @@ func (a *Client) RemoveCoprocessor(params *RemoveCoprocessorParams, opts ...Clie /* RestoreSnapshot restores a snapshot -Returns state of operation +Returns the snapshot that was restored. */ func (a *Client) RestoreSnapshot(params *RestoreSnapshotParams, opts ...ClientOption) (*RestoreSnapshotOK, error) { // TODO: Validate the params before sending @@ -1205,6 +1289,45 @@ func (a *Client) UpgradeDatabase(params *UpgradeDatabaseParams, opts ...ClientOp return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +UploadCertificate uploads custom certificate + +Upload a custom certificate to Global Trust Store +*/ +func (a *Client) UploadCertificate(params *UploadCertificateParams, opts ...ClientOption) (*UploadCertificateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUploadCertificateParams() + } + op := &runtime.ClientOperation{ + ID: "uploadCertificate", + Method: "POST", + PathPattern: "/api/v1/opdb/uploadCertificate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &UploadCertificateReader{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 + } + success, ok := result.(*UploadCertificateOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*UploadCertificateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + // SetTransport changes the transport on the client func (a *Client) SetTransport(transport runtime.ClientTransport) { a.transport = transport diff --git a/cdp-sdk-go/gen/opdb/client/operations/upload_certificate_parameters.go b/cdp-sdk-go/gen/opdb/client/operations/upload_certificate_parameters.go new file mode 100644 index 00000000..49947d84 --- /dev/null +++ b/cdp-sdk-go/gen/opdb/client/operations/upload_certificate_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/opdb/models" +) + +// NewUploadCertificateParams creates a new UploadCertificateParams 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 NewUploadCertificateParams() *UploadCertificateParams { + return &UploadCertificateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUploadCertificateParamsWithTimeout creates a new UploadCertificateParams object +// with the ability to set a timeout on a request. +func NewUploadCertificateParamsWithTimeout(timeout time.Duration) *UploadCertificateParams { + return &UploadCertificateParams{ + timeout: timeout, + } +} + +// NewUploadCertificateParamsWithContext creates a new UploadCertificateParams object +// with the ability to set a context for a request. +func NewUploadCertificateParamsWithContext(ctx context.Context) *UploadCertificateParams { + return &UploadCertificateParams{ + Context: ctx, + } +} + +// NewUploadCertificateParamsWithHTTPClient creates a new UploadCertificateParams object +// with the ability to set a custom HTTPClient for a request. +func NewUploadCertificateParamsWithHTTPClient(client *http.Client) *UploadCertificateParams { + return &UploadCertificateParams{ + HTTPClient: client, + } +} + +/* +UploadCertificateParams contains all the parameters to send to the API endpoint + + for the upload certificate operation. + + Typically these are written to a http.Request. +*/ +type UploadCertificateParams struct { + + // Input. + Input *models.UploadCertificateRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the upload certificate params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UploadCertificateParams) WithDefaults() *UploadCertificateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the upload certificate params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UploadCertificateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the upload certificate params +func (o *UploadCertificateParams) WithTimeout(timeout time.Duration) *UploadCertificateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the upload certificate params +func (o *UploadCertificateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the upload certificate params +func (o *UploadCertificateParams) WithContext(ctx context.Context) *UploadCertificateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the upload certificate params +func (o *UploadCertificateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the upload certificate params +func (o *UploadCertificateParams) WithHTTPClient(client *http.Client) *UploadCertificateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the upload certificate params +func (o *UploadCertificateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInput adds the input to the upload certificate params +func (o *UploadCertificateParams) WithInput(input *models.UploadCertificateRequest) *UploadCertificateParams { + o.SetInput(input) + return o +} + +// SetInput adds the input to the upload certificate params +func (o *UploadCertificateParams) SetInput(input *models.UploadCertificateRequest) { + o.Input = input +} + +// WriteToRequest writes these params to a swagger request +func (o *UploadCertificateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Input != nil { + if err := r.SetBodyParam(o.Input); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/cdp-sdk-go/gen/opdb/client/operations/upload_certificate_responses.go b/cdp-sdk-go/gen/opdb/client/operations/upload_certificate_responses.go new file mode 100644 index 00000000..3ea27946 --- /dev/null +++ b/cdp-sdk-go/gen/opdb/client/operations/upload_certificate_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/opdb/models" +) + +// UploadCertificateReader is a Reader for the UploadCertificate structure. +type UploadCertificateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UploadCertificateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUploadCertificateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewUploadCertificateDefault(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 + } +} + +// NewUploadCertificateOK creates a UploadCertificateOK with default headers values +func NewUploadCertificateOK() *UploadCertificateOK { + return &UploadCertificateOK{} +} + +/* +UploadCertificateOK describes a response with status code 200, with default header values. + +Expected response to a valid request. +*/ +type UploadCertificateOK struct { + Payload *models.UploadCertificateResponse +} + +// IsSuccess returns true when this upload certificate o k response has a 2xx status code +func (o *UploadCertificateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this upload certificate o k response has a 3xx status code +func (o *UploadCertificateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this upload certificate o k response has a 4xx status code +func (o *UploadCertificateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this upload certificate o k response has a 5xx status code +func (o *UploadCertificateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this upload certificate o k response a status code equal to that given +func (o *UploadCertificateOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the upload certificate o k response +func (o *UploadCertificateOK) Code() int { + return 200 +} + +func (o *UploadCertificateOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/opdb/uploadCertificate][%d] uploadCertificateOK %s", 200, payload) +} + +func (o *UploadCertificateOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/opdb/uploadCertificate][%d] uploadCertificateOK %s", 200, payload) +} + +func (o *UploadCertificateOK) GetPayload() *models.UploadCertificateResponse { + return o.Payload +} + +func (o *UploadCertificateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.UploadCertificateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUploadCertificateDefault creates a UploadCertificateDefault with default headers values +func NewUploadCertificateDefault(code int) *UploadCertificateDefault { + return &UploadCertificateDefault{ + _statusCode: code, + } +} + +/* +UploadCertificateDefault describes a response with status code -1, with default header values. + +The default response on an error. +*/ +type UploadCertificateDefault struct { + _statusCode int + + Payload *models.Error +} + +// IsSuccess returns true when this upload certificate default response has a 2xx status code +func (o *UploadCertificateDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this upload certificate default response has a 3xx status code +func (o *UploadCertificateDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this upload certificate default response has a 4xx status code +func (o *UploadCertificateDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this upload certificate default response has a 5xx status code +func (o *UploadCertificateDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this upload certificate default response a status code equal to that given +func (o *UploadCertificateDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the upload certificate default response +func (o *UploadCertificateDefault) Code() int { + return o._statusCode +} + +func (o *UploadCertificateDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/opdb/uploadCertificate][%d] uploadCertificate default %s", o._statusCode, payload) +} + +func (o *UploadCertificateDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/v1/opdb/uploadCertificate][%d] uploadCertificate default %s", o._statusCode, payload) +} + +func (o *UploadCertificateDefault) GetPayload() *models.Error { + return o.Payload +} + +func (o *UploadCertificateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/cdp-sdk-go/gen/opdb/models/architecture_type.go b/cdp-sdk-go/gen/opdb/models/architecture_type.go new file mode 100644 index 00000000..d2e04613 --- /dev/null +++ b/cdp-sdk-go/gen/opdb/models/architecture_type.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// ArchitectureType Architecture type for cluster. +// +// `X86_64` - X64 CPU Architecture is used for the cluster. `ARM64` - ARM64 CPU Architecture is used for the cluster. +// +// swagger:model ArchitectureType +type ArchitectureType string + +func NewArchitectureType(value ArchitectureType) *ArchitectureType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ArchitectureType. +func (m ArchitectureType) Pointer() *ArchitectureType { + return &m +} + +const ( + + // ArchitectureTypeX8664 captures enum value "X86_64" + ArchitectureTypeX8664 ArchitectureType = "X86_64" + + // ArchitectureTypeARM64 captures enum value "ARM64" + ArchitectureTypeARM64 ArchitectureType = "ARM64" +) + +// for schema +var architectureTypeEnum []interface{} + +func init() { + var res []ArchitectureType + if err := json.Unmarshal([]byte(`["X86_64","ARM64"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + architectureTypeEnum = append(architectureTypeEnum, v) + } +} + +func (m ArchitectureType) validateArchitectureTypeEnum(path, location string, value ArchitectureType) error { + if err := validate.EnumCase(path, location, value, architectureTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this architecture type +func (m ArchitectureType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateArchitectureTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this architecture type based on context it is used +func (m ArchitectureType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/cdp-sdk-go/gen/opdb/models/cloud_platform.go b/cdp-sdk-go/gen/opdb/models/cloud_platform.go new file mode 100644 index 00000000..da464bbd --- /dev/null +++ b/cdp-sdk-go/gen/opdb/models/cloud_platform.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// CloudPlatform Cloud Provider that cluster is exhibited on. +// +// `AWS` - AWS `AZURE` - Azure `GCP` - GCP +// +// swagger:model CloudPlatform +type CloudPlatform string + +func NewCloudPlatform(value CloudPlatform) *CloudPlatform { + return &value +} + +// Pointer returns a pointer to a freshly-allocated CloudPlatform. +func (m CloudPlatform) Pointer() *CloudPlatform { + return &m +} + +const ( + + // CloudPlatformAWS captures enum value "AWS" + CloudPlatformAWS CloudPlatform = "AWS" + + // CloudPlatformAZURE captures enum value "AZURE" + CloudPlatformAZURE CloudPlatform = "AZURE" + + // CloudPlatformGCP captures enum value "GCP" + CloudPlatformGCP CloudPlatform = "GCP" +) + +// for schema +var cloudPlatformEnum []interface{} + +func init() { + var res []CloudPlatform + if err := json.Unmarshal([]byte(`["AWS","AZURE","GCP"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + cloudPlatformEnum = append(cloudPlatformEnum, v) + } +} + +func (m CloudPlatform) validateCloudPlatformEnum(path, location string, value CloudPlatform) error { + if err := validate.EnumCase(path, location, value, cloudPlatformEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this cloud platform +func (m CloudPlatform) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateCloudPlatformEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this cloud platform based on context it is used +func (m CloudPlatform) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/cdp-sdk-go/gen/opdb/models/create_database_request.go b/cdp-sdk-go/gen/opdb/models/create_database_request.go index e406b2ec..a046c388 100644 --- a/cdp-sdk-go/gen/opdb/models/create_database_request.go +++ b/cdp-sdk-go/gen/opdb/models/create_database_request.go @@ -20,6 +20,9 @@ import ( // swagger:model CreateDatabaseRequest type CreateDatabaseRequest struct { + // Specifies the Architecture of the cluster nodes. + Architecture ArchitectureType `json:"architecture,omitempty"` + // Attached storage for the worker nodes for AWS, Azure, and GCP cloud providers. AttachedStorageForWorkers *AttachedStorageForWorkers `json:"attachedStorageForWorkers,omitempty"` @@ -105,6 +108,10 @@ type CreateDatabaseRequest struct { func (m *CreateDatabaseRequest) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateArchitecture(formats); err != nil { + res = append(res, err) + } + if err := m.validateAttachedStorageForWorkers(formats); err != nil { res = append(res, err) } @@ -155,6 +162,23 @@ func (m *CreateDatabaseRequest) Validate(formats strfmt.Registry) error { return nil } +func (m *CreateDatabaseRequest) validateArchitecture(formats strfmt.Registry) error { + if swag.IsZero(m.Architecture) { // not required + return nil + } + + if err := m.Architecture.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("architecture") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("architecture") + } + return err + } + + return nil +} + func (m *CreateDatabaseRequest) validateAttachedStorageForWorkers(formats strfmt.Registry) error { if swag.IsZero(m.AttachedStorageForWorkers) { // not required return nil @@ -365,6 +389,10 @@ func (m *CreateDatabaseRequest) validateVolumeEncryptions(formats strfmt.Registr func (m *CreateDatabaseRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateArchitecture(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateAttachedStorageForWorkers(ctx, formats); err != nil { res = append(res, err) } @@ -407,6 +435,24 @@ func (m *CreateDatabaseRequest) ContextValidate(ctx context.Context, formats str return nil } +func (m *CreateDatabaseRequest) contextValidateArchitecture(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.Architecture) { // not required + return nil + } + + if err := m.Architecture.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("architecture") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("architecture") + } + return err + } + + return nil +} + func (m *CreateDatabaseRequest) contextValidateAttachedStorageForWorkers(ctx context.Context, formats strfmt.Registry) error { if m.AttachedStorageForWorkers != nil { diff --git a/cdp-sdk-go/gen/opdb/models/create_snapshot_request.go b/cdp-sdk-go/gen/opdb/models/create_snapshot_request.go index ff47f41e..97a72f81 100644 --- a/cdp-sdk-go/gen/opdb/models/create_snapshot_request.go +++ b/cdp-sdk-go/gen/opdb/models/create_snapshot_request.go @@ -23,11 +23,11 @@ type CreateSnapshotRequest struct { // Required: true DatabaseName *string `json:"databaseName"` - // The name of the environment + // The name of the environment. // Required: true EnvironmentName *string `json:"environmentName"` - // Snapshot location URL on object store + // The snapshot location URL on object store. // Required: true SnapshotLocation *string `json:"snapshotLocation"` @@ -35,7 +35,7 @@ type CreateSnapshotRequest struct { // Required: true SnapshotName *string `json:"snapshotName"` - // fully qualified table name + // The fully qualified table name. // Required: true TableName *string `json:"tableName"` } diff --git a/cdp-sdk-go/gen/opdb/models/create_snapshot_response.go b/cdp-sdk-go/gen/opdb/models/create_snapshot_response.go index 20aeaf6c..70a504b7 100644 --- a/cdp-sdk-go/gen/opdb/models/create_snapshot_response.go +++ b/cdp-sdk-go/gen/opdb/models/create_snapshot_response.go @@ -18,22 +18,22 @@ import ( // swagger:model CreateSnapshotResponse type CreateSnapshotResponse struct { - // command id + // The submitted Command ID of the create snapshot. CommandID int64 `json:"commandID,omitempty"` - // When the snapshot was created + // When the snapshot was created. CreationTime int64 `json:"creationTime,omitempty"` - // The name of the database + // The name of the database. DatabaseName string `json:"databaseName,omitempty"` - // The name of the environment + // The name of the environment. EnvironmentName string `json:"environmentName,omitempty"` - // Status + // The status of the create snapshot. Status SnapshotStatusType `json:"status,omitempty"` - // Reason for the status + // Reason for the status. StatusReason string `json:"statusReason,omitempty"` } diff --git a/cdp-sdk-go/gen/opdb/models/custom_instance_type.go b/cdp-sdk-go/gen/opdb/models/custom_instance_type.go new file mode 100644 index 00000000..c6db4e09 --- /dev/null +++ b/cdp-sdk-go/gen/opdb/models/custom_instance_type.go @@ -0,0 +1,107 @@ +// 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" +) + +// CustomInstanceType Parameters to configure custom VM Instance Types. +// +// swagger:model CustomInstanceType +type CustomInstanceType struct { + + // The Instance Group Type. + InstanceGroup InstanceGroupType `json:"instanceGroup,omitempty"` + + // The Custom VM Instance Type. + InstanceType string `json:"instanceType,omitempty"` +} + +// Validate validates this custom instance type +func (m *CustomInstanceType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceGroup(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CustomInstanceType) validateInstanceGroup(formats strfmt.Registry) error { + if swag.IsZero(m.InstanceGroup) { // not required + return nil + } + + if err := m.InstanceGroup.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceGroup") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("instanceGroup") + } + return err + } + + return nil +} + +// ContextValidate validate this custom instance type based on the context it is used +func (m *CustomInstanceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateInstanceGroup(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CustomInstanceType) contextValidateInstanceGroup(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceGroup) { // not required + return nil + } + + if err := m.InstanceGroup.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceGroup") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("instanceGroup") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CustomInstanceType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CustomInstanceType) UnmarshalBinary(b []byte) error { + var res CustomInstanceType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/opdb/models/database_details.go b/cdp-sdk-go/gen/opdb/models/database_details.go index 0166700b..1d3ca7fa 100644 --- a/cdp-sdk-go/gen/opdb/models/database_details.go +++ b/cdp-sdk-go/gen/opdb/models/database_details.go @@ -20,6 +20,9 @@ import ( // swagger:model DatabaseDetails type DatabaseDetails struct { + // Specifies the architecture of the cluster nodes. + Architecture ArchitectureType `json:"architecture,omitempty"` + // The autoscaling config AutoScalingConfig *AutoScalingConfig `json:"autoScalingConfig,omitempty"` @@ -93,6 +96,10 @@ type DatabaseDetails struct { func (m *DatabaseDetails) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateArchitecture(formats); err != nil { + res = append(res, err) + } + if err := m.validateAutoScalingConfig(formats); err != nil { res = append(res, err) } @@ -131,6 +138,23 @@ func (m *DatabaseDetails) Validate(formats strfmt.Registry) error { return nil } +func (m *DatabaseDetails) validateArchitecture(formats strfmt.Registry) error { + if swag.IsZero(m.Architecture) { // not required + return nil + } + + if err := m.Architecture.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("architecture") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("architecture") + } + return err + } + + return nil +} + func (m *DatabaseDetails) validateAutoScalingConfig(formats strfmt.Registry) error { if swag.IsZero(m.AutoScalingConfig) { // not required return nil @@ -254,6 +278,10 @@ func (m *DatabaseDetails) validateStorageDetailsForWorkers(formats strfmt.Regist func (m *DatabaseDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateArchitecture(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateAutoScalingConfig(ctx, formats); err != nil { res = append(res, err) } @@ -276,6 +304,24 @@ func (m *DatabaseDetails) ContextValidate(ctx context.Context, formats strfmt.Re return nil } +func (m *DatabaseDetails) contextValidateArchitecture(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.Architecture) { // not required + return nil + } + + if err := m.Architecture.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("architecture") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("architecture") + } + return err + } + + return nil +} + func (m *DatabaseDetails) contextValidateAutoScalingConfig(ctx context.Context, formats strfmt.Registry) error { if m.AutoScalingConfig != nil { diff --git a/cdp-sdk-go/gen/opdb/models/delete_snapshot_request.go b/cdp-sdk-go/gen/opdb/models/delete_snapshot_request.go index c5a3a6dd..cc10b0e2 100644 --- a/cdp-sdk-go/gen/opdb/models/delete_snapshot_request.go +++ b/cdp-sdk-go/gen/opdb/models/delete_snapshot_request.go @@ -14,20 +14,20 @@ import ( "github.com/go-openapi/validate" ) -// DeleteSnapshotRequest Delete Snapshot Request. +// DeleteSnapshotRequest Request object for the DeleteSnapshot method. // // swagger:model DeleteSnapshotRequest type DeleteSnapshotRequest struct { - // The name of the database + // The name of the database. // Required: true DatabaseName *string `json:"databaseName"` - // The name of the environment + // The name of the environment. // Required: true EnvironmentName *string `json:"environmentName"` - // Snapshot name + // The name of the snapshot. // Required: true SnapshotName *string `json:"snapshotName"` } diff --git a/cdp-sdk-go/gen/opdb/models/delete_snapshot_response.go b/cdp-sdk-go/gen/opdb/models/delete_snapshot_response.go index fd40c5c0..a75bb29d 100644 --- a/cdp-sdk-go/gen/opdb/models/delete_snapshot_response.go +++ b/cdp-sdk-go/gen/opdb/models/delete_snapshot_response.go @@ -13,27 +13,27 @@ import ( "github.com/go-openapi/swag" ) -// DeleteSnapshotResponse Delete Snapshot Response. +// DeleteSnapshotResponse Response object of the DeleteSnapshot method. // // swagger:model DeleteSnapshotResponse type DeleteSnapshotResponse struct { - // command id + // The submitted Command ID of the delete snapshot. CommandID int64 `json:"commandID,omitempty"` - // The name of the database + // The name of the database. DatabaseName string `json:"databaseName,omitempty"` - // The name of the environment + // The name of the environment. EnvironmentName string `json:"environmentName,omitempty"` - // Snapshot name + // The name of the snapshot. SnapshotName string `json:"snapshotName,omitempty"` - // Status + // The status of the delete snapshot. Status SnapshotStatusType `json:"status,omitempty"` - // Reason for the status + // Reason for the status. StatusReason string `json:"statusReason,omitempty"` } diff --git a/cdp-sdk-go/gen/opdb/models/list_certificates_request.go b/cdp-sdk-go/gen/opdb/models/list_certificates_request.go new file mode 100644 index 00000000..513c9188 --- /dev/null +++ b/cdp-sdk-go/gen/opdb/models/list_certificates_request.go @@ -0,0 +1,88 @@ +// 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" +) + +// ListCertificatesRequest The request of listing SHA-1 fingerprints of certificates in Global Trust Store +// +// swagger:model ListCertificatesRequest +type ListCertificatesRequest struct { + + // The name or CRN of the database. + // Required: true + Database *string `json:"database"` + + // The name or CRN of the environment. + // Required: true + Environment *string `json:"environment"` +} + +// Validate validates this list certificates request +func (m *ListCertificatesRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDatabase(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEnvironment(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ListCertificatesRequest) validateDatabase(formats strfmt.Registry) error { + + if err := validate.Required("database", "body", m.Database); err != nil { + return err + } + + return nil +} + +func (m *ListCertificatesRequest) validateEnvironment(formats strfmt.Registry) error { + + if err := validate.Required("environment", "body", m.Environment); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this list certificates request based on context it is used +func (m *ListCertificatesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ListCertificatesRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ListCertificatesRequest) UnmarshalBinary(b []byte) error { + var res ListCertificatesRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/opdb/models/list_certificates_response.go b/cdp-sdk-go/gen/opdb/models/list_certificates_response.go new file mode 100644 index 00000000..fe30e971 --- /dev/null +++ b/cdp-sdk-go/gen/opdb/models/list_certificates_response.go @@ -0,0 +1,50 @@ +// 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" +) + +// ListCertificatesResponse The response of listing fingerprints of certificates in Global Trust Store +// +// swagger:model ListCertificatesResponse +type ListCertificatesResponse struct { + + // List of certificate SHA-1 fingerprints in Global Trust Store + Fingerprints []string `json:"fingerprints"` +} + +// Validate validates this list certificates response +func (m *ListCertificatesResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this list certificates response based on context it is used +func (m *ListCertificatesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ListCertificatesResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ListCertificatesResponse) UnmarshalBinary(b []byte) error { + var res ListCertificatesResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/opdb/models/list_restore_snapshots_request.go b/cdp-sdk-go/gen/opdb/models/list_restore_snapshots_request.go index 7e90f80f..43610453 100644 --- a/cdp-sdk-go/gen/opdb/models/list_restore_snapshots_request.go +++ b/cdp-sdk-go/gen/opdb/models/list_restore_snapshots_request.go @@ -19,14 +19,14 @@ import ( // swagger:model ListRestoreSnapshotsRequest type ListRestoreSnapshotsRequest struct { - // Command Id + // The submitted Command ID of the snapshot. CommandID int64 `json:"commandId,omitempty"` - // The name of the database + // The name of the database. // Required: true DatabaseName *string `json:"databaseName"` - // The name of the environment + // The name of the environment. // Required: true EnvironmentName *string `json:"environmentName"` @@ -34,13 +34,13 @@ type ListRestoreSnapshotsRequest struct { // Format: date-time FromRestoreTime strfmt.DateTime `json:"fromRestoreTime,omitempty"` - // Snapshot Name + // The name of the snapshot. SnapshotName string `json:"snapshotName,omitempty"` - // The name of the target database + // The name of the target database. TargetDatabaseName string `json:"targetDatabaseName,omitempty"` - // The name of the target environment + // The name of the target environment. TargetEnvironmentName string `json:"targetEnvironmentName,omitempty"` // The ending snapshot restore time to search restore snapshots (inclusive). diff --git a/cdp-sdk-go/gen/opdb/models/list_snapshots_request.go b/cdp-sdk-go/gen/opdb/models/list_snapshots_request.go index 4a42dabf..ef5b502e 100644 --- a/cdp-sdk-go/gen/opdb/models/list_snapshots_request.go +++ b/cdp-sdk-go/gen/opdb/models/list_snapshots_request.go @@ -19,25 +19,25 @@ import ( // swagger:model ListSnapshotsRequest type ListSnapshotsRequest struct { - // Command Id + // The submitted Command ID of the snapshots. CommandID int64 `json:"commandId,omitempty"` - // The name of the database + // The name of the database. // Required: true DatabaseName *string `json:"databaseName"` - // The name of the environment + // The name of the environment. // Required: true EnvironmentName *string `json:"environmentName"` - // The starting snapshot creation time to search snapshots (inclusive). + // The creation time of the snapshots to search (inclusive). // Format: date-time FromCreationTime strfmt.DateTime `json:"fromCreationTime,omitempty"` - // Table name + // The table name. TableName string `json:"tableName,omitempty"` - // The ending snapshot creation time to search snapshots (inclusive). + // The ending time of the snapshot creation to search (inclusive). // Format: date-time ToCreationTime strfmt.DateTime `json:"toCreationTime,omitempty"` } diff --git a/cdp-sdk-go/gen/opdb/models/list_snapshots_response.go b/cdp-sdk-go/gen/opdb/models/list_snapshots_response.go index d4b4291c..dc2b0103 100644 --- a/cdp-sdk-go/gen/opdb/models/list_snapshots_response.go +++ b/cdp-sdk-go/gen/opdb/models/list_snapshots_response.go @@ -20,21 +20,21 @@ import ( // swagger:model ListSnapshotsResponse type ListSnapshotsResponse struct { - // The name of the database + // The name of the database. // Required: true DatabaseName *string `json:"databaseName"` - // The name of the environment + // The name of the environment. // Required: true EnvironmentName *string `json:"environmentName"` - // List of snapshots + // List of snapshots. Snapshots []*Snapshot `json:"snapshots"` - // Status + // The status of the list snapshots. Status SnapshotStatusType `json:"status,omitempty"` - // Reason for the status + // Reason for the status. StatusReason string `json:"statusReason,omitempty"` } diff --git a/cdp-sdk-go/gen/opdb/models/list_supported_instance_types_request.go b/cdp-sdk-go/gen/opdb/models/list_supported_instance_types_request.go new file mode 100644 index 00000000..6a4451b0 --- /dev/null +++ b/cdp-sdk-go/gen/opdb/models/list_supported_instance_types_request.go @@ -0,0 +1,310 @@ +// 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" +) + +// ListSupportedInstanceTypesRequest The request for listing supported instance types. +// +// swagger:model ListSupportedInstanceTypesRequest +type ListSupportedInstanceTypesRequest struct { + + // The Architecture. + Architecture ArchitectureType `json:"architecture,omitempty"` + + // The name of Cloud Platform. + // Required: true + CloudPlatform *CloudPlatform `json:"cloudPlatform"` + + // The Instance Group Type. + InstanceGroup InstanceGroupType `json:"instanceGroup,omitempty"` + + // The Scale Type. + // Required: true + ScaleType *ScaleType `json:"scaleType"` + + // The Storage Type. + // Required: true + StorageType *StorageType `json:"storageType"` +} + +// Validate validates this list supported instance types request +func (m *ListSupportedInstanceTypesRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateArchitecture(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudPlatform(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstanceGroup(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScaleType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStorageType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ListSupportedInstanceTypesRequest) validateArchitecture(formats strfmt.Registry) error { + if swag.IsZero(m.Architecture) { // not required + return nil + } + + if err := m.Architecture.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("architecture") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("architecture") + } + return err + } + + return nil +} + +func (m *ListSupportedInstanceTypesRequest) validateCloudPlatform(formats strfmt.Registry) error { + + if err := validate.Required("cloudPlatform", "body", m.CloudPlatform); err != nil { + return err + } + + if err := validate.Required("cloudPlatform", "body", m.CloudPlatform); err != nil { + return err + } + + if m.CloudPlatform != nil { + if err := m.CloudPlatform.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudPlatform") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cloudPlatform") + } + return err + } + } + + return nil +} + +func (m *ListSupportedInstanceTypesRequest) validateInstanceGroup(formats strfmt.Registry) error { + if swag.IsZero(m.InstanceGroup) { // not required + return nil + } + + if err := m.InstanceGroup.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceGroup") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("instanceGroup") + } + return err + } + + return nil +} + +func (m *ListSupportedInstanceTypesRequest) validateScaleType(formats strfmt.Registry) error { + + if err := validate.Required("scaleType", "body", m.ScaleType); err != nil { + return err + } + + if err := validate.Required("scaleType", "body", m.ScaleType); err != nil { + return err + } + + if m.ScaleType != nil { + if err := m.ScaleType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scaleType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scaleType") + } + return err + } + } + + return nil +} + +func (m *ListSupportedInstanceTypesRequest) validateStorageType(formats strfmt.Registry) error { + + if err := validate.Required("storageType", "body", m.StorageType); err != nil { + return err + } + + if err := validate.Required("storageType", "body", m.StorageType); err != nil { + return err + } + + if m.StorageType != nil { + if err := m.StorageType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storageType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storageType") + } + return err + } + } + + return nil +} + +// ContextValidate validate this list supported instance types request based on the context it is used +func (m *ListSupportedInstanceTypesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateArchitecture(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCloudPlatform(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateInstanceGroup(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateScaleType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStorageType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ListSupportedInstanceTypesRequest) contextValidateArchitecture(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.Architecture) { // not required + return nil + } + + if err := m.Architecture.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("architecture") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("architecture") + } + return err + } + + return nil +} + +func (m *ListSupportedInstanceTypesRequest) contextValidateCloudPlatform(ctx context.Context, formats strfmt.Registry) error { + + if m.CloudPlatform != nil { + + if err := m.CloudPlatform.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudPlatform") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cloudPlatform") + } + return err + } + } + + return nil +} + +func (m *ListSupportedInstanceTypesRequest) contextValidateInstanceGroup(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceGroup) { // not required + return nil + } + + if err := m.InstanceGroup.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceGroup") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("instanceGroup") + } + return err + } + + return nil +} + +func (m *ListSupportedInstanceTypesRequest) contextValidateScaleType(ctx context.Context, formats strfmt.Registry) error { + + if m.ScaleType != nil { + + if err := m.ScaleType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scaleType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scaleType") + } + return err + } + } + + return nil +} + +func (m *ListSupportedInstanceTypesRequest) contextValidateStorageType(ctx context.Context, formats strfmt.Registry) error { + + if m.StorageType != nil { + + if err := m.StorageType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storageType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storageType") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ListSupportedInstanceTypesRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ListSupportedInstanceTypesRequest) UnmarshalBinary(b []byte) error { + var res ListSupportedInstanceTypesRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/opdb/models/list_supported_instance_types_response.go b/cdp-sdk-go/gen/opdb/models/list_supported_instance_types_response.go new file mode 100644 index 00000000..9a1a33d9 --- /dev/null +++ b/cdp-sdk-go/gen/opdb/models/list_supported_instance_types_response.go @@ -0,0 +1,121 @@ +// 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" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ListSupportedInstanceTypesResponse The response for listing supported instance types. +// +// swagger:model ListSupportedInstanceTypesResponse +type ListSupportedInstanceTypesResponse struct { + + // List of supported instance types. + SupportedInstances []*SupportedInstanceTypesList `json:"supportedInstances"` +} + +// Validate validates this list supported instance types response +func (m *ListSupportedInstanceTypesResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSupportedInstances(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ListSupportedInstanceTypesResponse) validateSupportedInstances(formats strfmt.Registry) error { + if swag.IsZero(m.SupportedInstances) { // not required + return nil + } + + for i := 0; i < len(m.SupportedInstances); i++ { + if swag.IsZero(m.SupportedInstances[i]) { // not required + continue + } + + if m.SupportedInstances[i] != nil { + if err := m.SupportedInstances[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("supportedInstances" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("supportedInstances" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this list supported instance types response based on the context it is used +func (m *ListSupportedInstanceTypesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSupportedInstances(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ListSupportedInstanceTypesResponse) contextValidateSupportedInstances(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.SupportedInstances); i++ { + + if m.SupportedInstances[i] != nil { + + if swag.IsZero(m.SupportedInstances[i]) { // not required + return nil + } + + if err := m.SupportedInstances[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("supportedInstances" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("supportedInstances" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ListSupportedInstanceTypesResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ListSupportedInstanceTypesResponse) UnmarshalBinary(b []byte) error { + var res ListSupportedInstanceTypesResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/opdb/models/restore_snapshot.go b/cdp-sdk-go/gen/opdb/models/restore_snapshot.go index 40da4fa9..3050fcaa 100644 --- a/cdp-sdk-go/gen/opdb/models/restore_snapshot.go +++ b/cdp-sdk-go/gen/opdb/models/restore_snapshot.go @@ -18,25 +18,25 @@ import ( // swagger:model RestoreSnapshot type RestoreSnapshot struct { - // Command id + // The submitted Command ID of the restore snapshot. CommandID int64 `json:"commandID,omitempty"` // Reason for the failure in case of restore snapshot failed. FailureReason string `json:"failureReason,omitempty"` - // When the snapshot restore was started + // The time when the snapshot restore was started. RestoreTime int64 `json:"restoreTime,omitempty"` - // The snapshot name + // The name of the snapshot. SnapshotName string `json:"snapshotName,omitempty"` - // Status + // The status of the restore snapshot. Status SnapshotStatusType `json:"status,omitempty"` - // The name of the target database + // The name of the target database. TargetDatabaseName string `json:"targetDatabaseName,omitempty"` - // The name of the target environment + // The name of the target environment. TargetEnvironmentName string `json:"targetEnvironmentName,omitempty"` } diff --git a/cdp-sdk-go/gen/opdb/models/restore_snapshot_request.go b/cdp-sdk-go/gen/opdb/models/restore_snapshot_request.go index be7ad0da..7aba5b63 100644 --- a/cdp-sdk-go/gen/opdb/models/restore_snapshot_request.go +++ b/cdp-sdk-go/gen/opdb/models/restore_snapshot_request.go @@ -19,23 +19,23 @@ import ( // swagger:model RestoreSnapshotRequest type RestoreSnapshotRequest struct { - // The name of the original database + // The name of the original database. // Required: true DatabaseName *string `json:"databaseName"` - // The name of the original environment + // The name of the original environment. // Required: true EnvironmentName *string `json:"environmentName"` - // Snapshot name + // The name of the snapshot. // Required: true SnapshotName *string `json:"snapshotName"` - // The name of the target database where the snapshot should be restored + // The name of the target database where the snapshot should be restored. // Required: true TargetDatabaseName *string `json:"targetDatabaseName"` - // The name of the target environment where the snapshot should be restored + // The name of the target environment where the snapshot should be restored. // Required: true TargetEnvironmentName *string `json:"targetEnvironmentName"` } diff --git a/cdp-sdk-go/gen/opdb/models/restore_snapshot_response.go b/cdp-sdk-go/gen/opdb/models/restore_snapshot_response.go index 23593a69..9cd8260f 100644 --- a/cdp-sdk-go/gen/opdb/models/restore_snapshot_response.go +++ b/cdp-sdk-go/gen/opdb/models/restore_snapshot_response.go @@ -13,36 +13,36 @@ import ( "github.com/go-openapi/swag" ) -// RestoreSnapshotResponse Restore Snapshot Response. +// RestoreSnapshotResponse Response object for the RestoreSnapshot method. // // swagger:model RestoreSnapshotResponse type RestoreSnapshotResponse struct { - // Command id + // The submitted Command ID of the restore snapshot. CommandID int64 `json:"commandID,omitempty"` - // The name of the database + // The name of the database. DatabaseName string `json:"databaseName,omitempty"` - // The name of the environment + // The name of the environment. EnvironmentName string `json:"environmentName,omitempty"` - // When the snapshot restore was started + // The time when the snapshot restore was started. RestoreTime int64 `json:"restoreTime,omitempty"` - // The snapshot name + // The name of the snapshot. SnapshotName string `json:"snapshotName,omitempty"` - // Status + // The status of the restore snapshot. Status SnapshotStatusType `json:"status,omitempty"` - // Reason for the status + // Reason for the status. StatusReason string `json:"statusReason,omitempty"` - // The name of the target database + // The name of the target database. TargetDatabaseName string `json:"targetDatabaseName,omitempty"` - // The name of the target environment + // The name of the target environment. TargetEnvironmentName string `json:"targetEnvironmentName,omitempty"` } diff --git a/cdp-sdk-go/gen/opdb/models/snapshot.go b/cdp-sdk-go/gen/opdb/models/snapshot.go index a14a4e1b..bcebb526 100644 --- a/cdp-sdk-go/gen/opdb/models/snapshot.go +++ b/cdp-sdk-go/gen/opdb/models/snapshot.go @@ -19,26 +19,26 @@ import ( // swagger:model Snapshot type Snapshot struct { - // Command id + // The submitted Command ID of the snapshot. CommandID int64 `json:"commandID,omitempty"` - // Creation Time + // The creation time of the snapshot. CreationTime int64 `json:"creationTime,omitempty"` // Reason for the failure in case of snapshot creation failed. FailureReason string `json:"failureReason,omitempty"` - // Snapshot location + // The location of the snapshot. SnapshotLocation string `json:"snapshotLocation,omitempty"` - // Snapshot Name + // The name of the snapshot. // Required: true SnapshotName *string `json:"snapshotName"` - // Status + // The status of the snapshot. Status SnapshotStatusType `json:"status,omitempty"` - // Table Name + // The table name. // Required: true TableName *string `json:"tableName"` } diff --git a/cdp-sdk-go/gen/opdb/models/snapshot_status_type.go b/cdp-sdk-go/gen/opdb/models/snapshot_status_type.go index bbac18d2..1522d45c 100644 --- a/cdp-sdk-go/gen/opdb/models/snapshot_status_type.go +++ b/cdp-sdk-go/gen/opdb/models/snapshot_status_type.go @@ -53,6 +53,9 @@ const ( // SnapshotStatusTypeCORRUPT captures enum value "CORRUPT" SnapshotStatusTypeCORRUPT SnapshotStatusType = "CORRUPT" + // SnapshotStatusTypeDELETING captures enum value "DELETING" + SnapshotStatusTypeDELETING SnapshotStatusType = "DELETING" + // SnapshotStatusTypeUNKNOWN captures enum value "UNKNOWN" SnapshotStatusTypeUNKNOWN SnapshotStatusType = "UNKNOWN" ) @@ -62,7 +65,7 @@ var snapshotStatusTypeEnum []interface{} func init() { var res []SnapshotStatusType - if err := json.Unmarshal([]byte(`["NEW","IN_PROGRESS","FAILED","SUCCESSFUL","LOCKED","DELETED","CORRUPT","UNKNOWN"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["NEW","IN_PROGRESS","FAILED","SUCCESSFUL","LOCKED","DELETED","CORRUPT","DELETING","UNKNOWN"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/cdp-sdk-go/gen/opdb/models/supported_instance_types_list.go b/cdp-sdk-go/gen/opdb/models/supported_instance_types_list.go new file mode 100644 index 00000000..f3efc7ff --- /dev/null +++ b/cdp-sdk-go/gen/opdb/models/supported_instance_types_list.go @@ -0,0 +1,56 @@ +// 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" +) + +// SupportedInstanceTypesList Instance Types list for listing supported instance types. +// +// swagger:model SupportedInstanceTypesList +type SupportedInstanceTypesList struct { + + // The default instance type. + DefaultInstanceTypes string `json:"defaultInstanceTypes,omitempty"` + + // The Instance Group Type. + InstanceGroup string `json:"instanceGroup,omitempty"` + + // The other instance types supported. + SupportedInstanceTypes []string `json:"supportedInstanceTypes"` +} + +// Validate validates this supported instance types list +func (m *SupportedInstanceTypesList) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this supported instance types list based on context it is used +func (m *SupportedInstanceTypesList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SupportedInstanceTypesList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SupportedInstanceTypesList) UnmarshalBinary(b []byte) error { + var res SupportedInstanceTypesList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/opdb/models/update_database_request.go b/cdp-sdk-go/gen/opdb/models/update_database_request.go index 934aa739..33f89e9a 100644 --- a/cdp-sdk-go/gen/opdb/models/update_database_request.go +++ b/cdp-sdk-go/gen/opdb/models/update_database_request.go @@ -45,6 +45,9 @@ type UpdateDatabaseRequest struct { // Removes any strong meta servers provisioned for this database. Requires the COD_STRONG_META_SERVERS entitlement. RemoveStrongMetaServers bool `json:"removeStrongMetaServers,omitempty"` + // Provide custom VM instance types to switch instance types for instance groups. Requires COD_USE_CUSTOM_INSTANCE_TYPES entitlement. + SwitchInstanceType *CustomInstanceType `json:"switchInstanceType,omitempty"` + // Vertical Scale request for database. VerticalScale GroupType `json:"verticalScale,omitempty"` } @@ -65,6 +68,10 @@ func (m *UpdateDatabaseRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSwitchInstanceType(formats); err != nil { + res = append(res, err) + } + if err := m.validateVerticalScale(formats); err != nil { res = append(res, err) } @@ -112,6 +119,25 @@ func (m *UpdateDatabaseRequest) validateEnvironmentName(formats strfmt.Registry) return nil } +func (m *UpdateDatabaseRequest) validateSwitchInstanceType(formats strfmt.Registry) error { + if swag.IsZero(m.SwitchInstanceType) { // not required + return nil + } + + if m.SwitchInstanceType != nil { + if err := m.SwitchInstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("switchInstanceType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("switchInstanceType") + } + return err + } + } + + return nil +} + func (m *UpdateDatabaseRequest) validateVerticalScale(formats strfmt.Registry) error { if swag.IsZero(m.VerticalScale) { // not required return nil @@ -137,6 +163,10 @@ func (m *UpdateDatabaseRequest) ContextValidate(ctx context.Context, formats str res = append(res, err) } + if err := m.contextValidateSwitchInstanceType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateVerticalScale(ctx, formats); err != nil { res = append(res, err) } @@ -168,6 +198,27 @@ func (m *UpdateDatabaseRequest) contextValidateAutoScalingParameters(ctx context return nil } +func (m *UpdateDatabaseRequest) contextValidateSwitchInstanceType(ctx context.Context, formats strfmt.Registry) error { + + if m.SwitchInstanceType != nil { + + if swag.IsZero(m.SwitchInstanceType) { // not required + return nil + } + + if err := m.SwitchInstanceType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("switchInstanceType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("switchInstanceType") + } + return err + } + } + + return nil +} + func (m *UpdateDatabaseRequest) contextValidateVerticalScale(ctx context.Context, formats strfmt.Registry) error { if swag.IsZero(m.VerticalScale) { // not required diff --git a/cdp-sdk-go/gen/opdb/models/upload_certificate_request.go b/cdp-sdk-go/gen/opdb/models/upload_certificate_request.go new file mode 100644 index 00000000..cd90e89d --- /dev/null +++ b/cdp-sdk-go/gen/opdb/models/upload_certificate_request.go @@ -0,0 +1,105 @@ +// 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" +) + +// UploadCertificateRequest The request of uploading a custom certificate to Global Trust Store +// +// swagger:model UploadCertificateRequest +type UploadCertificateRequest struct { + + // Custom certificate in PEM format + // Required: true + Certificate *string `json:"certificate"` + + // The name or CRN of the database. + // Required: true + Database *string `json:"database"` + + // The name or CRN of the environment. + // Required: true + Environment *string `json:"environment"` +} + +// Validate validates this upload certificate request +func (m *UploadCertificateRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCertificate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDatabase(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEnvironment(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *UploadCertificateRequest) validateCertificate(formats strfmt.Registry) error { + + if err := validate.Required("certificate", "body", m.Certificate); err != nil { + return err + } + + return nil +} + +func (m *UploadCertificateRequest) validateDatabase(formats strfmt.Registry) error { + + if err := validate.Required("database", "body", m.Database); err != nil { + return err + } + + return nil +} + +func (m *UploadCertificateRequest) validateEnvironment(formats strfmt.Registry) error { + + if err := validate.Required("environment", "body", m.Environment); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this upload certificate request based on context it is used +func (m *UploadCertificateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *UploadCertificateRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *UploadCertificateRequest) UnmarshalBinary(b []byte) error { + var res UploadCertificateRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/gen/opdb/models/upload_certificate_response.go b/cdp-sdk-go/gen/opdb/models/upload_certificate_response.go new file mode 100644 index 00000000..60615ea0 --- /dev/null +++ b/cdp-sdk-go/gen/opdb/models/upload_certificate_response.go @@ -0,0 +1,50 @@ +// 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" +) + +// UploadCertificateResponse The response of uploading a custom certificate to Global Trust Store +// +// swagger:model UploadCertificateResponse +type UploadCertificateResponse struct { + + // SHA-1 fingerprint of the newly added certificate + Fingerprint string `json:"fingerprint,omitempty"` +} + +// Validate validates this upload certificate response +func (m *UploadCertificateResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this upload certificate response based on context it is used +func (m *UploadCertificateResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *UploadCertificateResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *UploadCertificateResponse) UnmarshalBinary(b []byte) error { + var res UploadCertificateResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/cdp-sdk-go/resources/swagger/datahub.yaml b/cdp-sdk-go/resources/swagger/datahub.yaml index 85e73d39..a61cd788 100644 --- a/cdp-sdk-go/resources/swagger/datahub.yaml +++ b/cdp-sdk-go/resources/swagger/datahub.yaml @@ -6,7 +6,7 @@ x-form-factors: public x-cdp-releases: PUBLIC x-audit: true info: - version: 0.9.124 (BETA) + version: 0.9.127 (BETA) title: Cloudera Data hub Service license: name: Apache 2.0 @@ -1498,6 +1498,27 @@ paths: description: The default response on an error. schema: $ref: '#/definitions/Error' + /api/v1/datahub/setDefaultJavaVersion: + post: + summary: Configures the default Java version for the Data Hub. + description: Configures the default Java version for the Data Hub. This command updates the system's default Java version and will restart both the Cluster Manager and the services. + operationId: setDefaultJavaVersion + x-mutating: true + parameters: + - name: input + in: body + required: true + schema: + $ref: '#/definitions/SetDefaultJavaVersionRequest' + responses: + 200: + description: Expected response to a valid request. + schema: + $ref: '#/definitions/SetDefaultJavaVersionResponse' + default: + description: The default response on an error. + schema: + $ref: '#/definitions/Error' definitions: Error: type: object @@ -1952,7 +1973,7 @@ definitions: description: The content of the recipe. type: type: string - description: 'The type of recipe. Supported values are : PRE_CLOUDERA_MANAGER_START, PRE_TERMINATION, POST_CLOUDERA_MANAGER_START, POST_CLUSTER_INSTALL.' + description: 'The type of recipe. Supported values are : PRE_SERVICE_DEPLOYMENT, PRE_TERMINATION, POST_SERVICE_DEPLOYMENT, POST_CLOUDERA_MANAGER_START.' creatorCrn: type: string description: The CRN of the creator of the recipe. @@ -1974,7 +1995,7 @@ definitions: description: The CRN of the recipe. type: type: string - description: 'The type of recipe. Supported values are : PRE_CLOUDERA_MANAGER_START, PRE_TERMINATION, POST_CLOUDERA_MANAGER_START, POST_CLUSTER_INSTALL.' + description: 'The type of recipe. Supported values are : PRE_SERVICE_DEPLOYMENT, PRE_TERMINATION, POST_SERVICE_DEPLOYMENT, POST_CLOUDERA_MANAGER_START.' description: type: string description: The description of the recipe. @@ -3302,7 +3323,7 @@ definitions: description: The content of the recipe. type: type: string - description: 'The type of recipe. Supported values are : PRE_CLOUDERA_MANAGER_START, PRE_TERMINATION, POST_CLOUDERA_MANAGER_START, POST_CLUSTER_INSTALL.' + description: 'The type of recipe. Supported values are : PRE_SERVICE_DEPLOYMENT, PRE_TERMINATION, POST_SERVICE_DEPLOYMENT, POST_CLOUDERA_MANAGER_START.' description: type: string description: The description of the recipe. The description can have a maximum of 1000 characters. @@ -4991,3 +5012,23 @@ definitions: UpdateToAwsImdsV1Response: type: object description: Response object for updating Data Hub to AWS IMDSv1. + SetDefaultJavaVersionRequest: + type: object + description: Request object for setting the default Java version on the Data Hub cluster. + required: + - clusterCrn + - javaVersion + properties: + clusterCrn: + type: string + description: The CRN of the Data Hub cluster. + javaVersion: + type: string + description: The Java version to set as default. + SetDefaultJavaVersionResponse: + type: object + description: Response object for setting the default Java version on the Data Hub cluster. + properties: + operationId: + type: string + description: The id of the related operation. diff --git a/cdp-sdk-go/resources/swagger/datalake.yaml b/cdp-sdk-go/resources/swagger/datalake.yaml index e912fa12..45db138f 100644 --- a/cdp-sdk-go/resources/swagger/datalake.yaml +++ b/cdp-sdk-go/resources/swagger/datalake.yaml @@ -6,7 +6,7 @@ x-form-factors: public x-cdp-releases: PUBLIC x-audit: true info: - version: 0.9.124 (BETA) + version: 0.9.127 (BETA) title: Cloudera Datalake Service license: name: Apache 2.0 @@ -1138,6 +1138,27 @@ paths: description: The default response on an error. schema: $ref: '#/definitions/Error' + /api/v1/datalake/setDefaultJavaVersion: + post: + summary: Configures the default Java version for the Data Lake. + description: Configures the default Java version for the Data Lake. This command updates the system's default Java version and will restart both the Cluster Manager and the services. + operationId: setDefaultJavaVersion + x-mutating: true + parameters: + - name: input + in: body + required: true + schema: + $ref: '#/definitions/SetDefaultJavaVersionRequest' + responses: + 200: + description: Expected response to a valid request. + schema: + $ref: '#/definitions/SetDefaultJavaVersionResponse' + default: + description: The default response on an error. + schema: + $ref: '#/definitions/Error' definitions: Error: type: object @@ -3796,3 +3817,23 @@ definitions: type: integer format: int32 description: The modified storage size for the database. + SetDefaultJavaVersionRequest: + type: object + description: Request object for setting the default Java version on the Data Lake cluster. + required: + - crn + - javaVersion + properties: + crn: + type: string + description: The CRN of the Data Lake cluster. + javaVersion: + type: string + description: The default Java version to be set on the Data Lake cluster. + SetDefaultJavaVersionResponse: + type: object + description: Response object for setting the default Java version on the Data Lake cluster. + properties: + operationId: + type: string + description: The id of the related operation. diff --git a/cdp-sdk-go/resources/swagger/de.yaml b/cdp-sdk-go/resources/swagger/de.yaml index a6809730..714741a1 100644 --- a/cdp-sdk-go/resources/swagger/de.yaml +++ b/cdp-sdk-go/resources/swagger/de.yaml @@ -5,7 +5,7 @@ x-form-factors: public,private x-cdp-releases: PUBLIC x-audit: true info: - version: 0.9.124 (BETA) + version: 0.9.127 (BETA) title: Cloudera Data Engineering license: name: Apache 2.0 @@ -1848,7 +1848,7 @@ definitions: description: CRN of the CDP environment with which a restored CDE service will be associated. Currently, CDE service can be restored only to the same CDP environment, with which a backed-up service was associated. serviceId: type: string - description: Specify the restored service ID. If not specified, the service ID from the backup will be reused. + description: Specify the restored service ID. If not specified, a new service ID will be generated. serviceName: type: string description: Specify the restored service name. If not specified, the service name from the backup will be reused. diff --git a/cdp-sdk-go/resources/swagger/dw.yaml b/cdp-sdk-go/resources/swagger/dw.yaml index f21f656d..876586fe 100644 --- a/cdp-sdk-go/resources/swagger/dw.yaml +++ b/cdp-sdk-go/resources/swagger/dw.yaml @@ -4,7 +4,7 @@ x-products: CDP x-form-factors: public,private x-cdp-releases: PUBLIC info: - version: 0.9.124 (BETA) + version: 0.9.127 (BETA) title: Cloudera Data Warehouse [EXPERIMENTAL] license: name: Apache 2.0 @@ -335,7 +335,7 @@ paths: x-mutating: true x-form-factors: public summary: Suspend Cloudera Data Warehouse cluster. - description: Suspend Cloudera Data Warehouse cluster. Supported only on Azure. Suspend cluster requires a "Running" Azure CDW, trying to suspend a cluster already in "Stopped" or "Error" state is not supported. Every Virtual Warehouse and Database Catalog which belongs to that CDW must be stopped first. This operation will stop the AKS cluster for this CDW instance, however leaves other cloud resources in "Running" state, including the Postgres database. Please refer to the following AKS documentation for start/stop feature https://learn.microsoft.com/en-us/azure/aks/start-stop-cluster?tabs=azure-cli + description: Suspend Cloudera Data Warehouse cluster. Suspend cluster requires a "Running" Azure or AWS CDW, trying to suspend a cluster already in "Stopped" or "Error" state is not supported. Every Virtual Warehouse and Database Catalog which belongs to that CDW must be stopped first. This operation will stop the AKS or EKS cluster for this CDW instance, however leaves other cloud resources in "Running" state, including the Postgres database. Please refer to the following AKS documentation for start/stop feature https://learn.microsoft.com/en-us/azure/aks/start-stop-cluster?tabs=azure-cli operationId: suspendCluster parameters: - name: input @@ -358,7 +358,7 @@ paths: x-mutating: true x-form-factors: public summary: Resume Cloudera Data Warehouse cluster. - description: Resume Cloudera Data Warehouse cluster. Supported only on Azure. Resume cluster will start a stopped CDW cluster. Resuming a cluster in "Running" or "Error" state is not supported. Resume will start the AKS instance which belongs to this CDW. Please refer to the following AKS documentation for start/stop feature https://learn.microsoft.com/en-us/azure/aks/start-stop-cluster?tabs=azure-cli + description: Resume Cloudera Data Warehouse cluster. Resume cluster will start a stopped CDW cluster. Resuming a cluster in "Running" or "Error" state is not supported. Resume will start the AKS or EKS instance which belongs to this CDW. Please refer to the following AKS documentation for start/stop feature https://learn.microsoft.com/en-us/azure/aks/start-stop-cluster?tabs=azure-cli operationId: resumeCluster parameters: - name: input @@ -2148,6 +2148,10 @@ definitions: x-form-factors: public description: Allowed instance types for Impala Virtual Warehouses. $ref: '#/definitions/AllowedInstanceTypesWithDefault' + trino: + x-form-factors: public + description: Allowed instance types for Trino Virtual Warehouses. + $ref: '#/definitions/AllowedInstanceTypesWithDefault' AllowedInstanceTypesWithDefault: x-form-factors: public type: object @@ -2480,12 +2484,6 @@ definitions: items: type: string description: 'NOTE: The cluster level instance type selection will be replaced by virtual warehouse level selection. AWS compute instance types that the environment is restricted to use. This affects the creation of virtual warehouses where this restriction will apply. Select an instance type that meets your computing, memory, networking, or storage needs. As of now, only a single instance type can be listed. Use describe-allowed-instance-types to see currently possible values.' - additionalInstanceTypes: - x-deprecated: true - type: array - items: - type: string - description: 'DEPRECATED: Additional compute instance types will be removed in subsequent releases. Additional (fallback) instance types listed in their priority order. They will be used instead of the primary compute instance type in case it is unavailable. You cannot include any instance type that was already indicated in computeInstanceTypes. Use describe-allowed-instance-types to see currently supported values and also the default value when nothing is provided for the computeInstanceTypes.' CreateAzureClusterRequest: type: object description: Request object for the createAzureCluster method. @@ -2620,8 +2618,9 @@ definitions: type: string description: 'DEPRECATED: As of PVC 1.5.4 we no longer use delegation user. Password of delegation user.' securityContextConstraintName: + x-deprecated: true type: string - description: The name of the Hive Security Context Constraint. + description: 'DEPRECATED: This option will be removed in future releases. Instead of creating a custom Security Context Constraint, we rely on the cluster default. The name of the Hive Security Context Constraint.' storageClass: type: string description: The storage class for the Local Storage Operator. @@ -2681,7 +2680,7 @@ definitions: description: The ID of the cluster. data: type: string - description: Dump of configuration received by calling "dump-cluster" command. + description: Backup data of configuration received by calling "backup-cluster" command. RestoreClusterResponse: type: object description: Response object for the restoreCluster method. @@ -2789,12 +2788,6 @@ definitions: items: type: string description: 'NOTE: The cluster level instance type selection will be replaced by virtual warehouse level selection. AWS compute instance types that the environment is restricted to use. This affects the creation of virtual warehouses where this restriction will apply. Select an instance type that meets your computing, memory, networking, or storage needs. As of now, only a single instance type can be listed. Use describe-allowed-instance-types to see currently possible values.' - additionalInstanceTypes: - x-deprecated: true - type: array - items: - type: string - description: 'DEPRECATED: Additional compute instance types will be removed in subsequent releases. Additional (fallback) instance types listed in their priority order. They will be used instead of the primary compute instance type in case it is unavailable. You cannot include any instance type that was already indicated in computeInstanceTypes. Use describe-allowed-instance-types to see currently supported values and also the default value when nothing is provided for the computeInstanceTypes.' AzureActivationOptions: type: object description: Options for activating an Azure environment. @@ -2864,17 +2857,20 @@ definitions: type: string description: 'DEPRECATED: As of PVC 1.5.4 we no longer use delegation user. Password of delegation user.' securityContextConstraintName: + x-deprecated: true type: string - description: The name of the Hive Security Context Constraint. + description: 'DEPRECATED: This option will be removed in future releases. Instead of creating a custom Security Context Constraint, we rely on the cluster default. The name of the Hive Security Context Constraint.' storageClass: type: string description: The storage class for the Local Storage Operator. dbDas: + x-deprecated: true type: string - description: The name of the DAS database. Not required for embedded databases + description: 'DEPRECATED: Current Private Cloud releases only support embedded database, the value of this field is ignored. The name of the DAS database. Not required for embedded databases.' dbHue: + x-deprecated: true type: string - description: The name of the HUE database. Not required for embedded databases. + description: 'DEPRECATED: Current Private Cloud releases only support embedded database, the value of this field is ignored. The name of the HUE database. Not required for embedded databases.' dedicatedExecutorNodes: type: boolean description: Enable to use dedicated nodes exclusively for executors and coordinators, and improve performance. You can enable this only if you reserved nodes while adding a CDP Private Cloud containerized ECS cluster. When disabled, non-compute pods such as MetaStore and Data Visualization can also use the reserved nodes. @@ -3186,10 +3182,9 @@ definitions: type: string description: Version of the Cloudera Data Visualization. x-form-factors: public - templateName: + resourceTemplate: type: string - description: 'DEPRECATED: Use resourceTemplate parameter instead that will be made available in the upcoming release. The template size for the Cloudera Data Visualization.' - x-deprecated: true + description: The name of the available resource template to use for the Cloudera Data Visualization. CreateDataVisualizationResponse: type: object description: Response object for the createDataVisualization method. @@ -3312,18 +3307,21 @@ definitions: description: 'NOTE: creating Default Database Catalogs is deprecated and explicitly disabled. Denotes if Default Database Catalog creation needed.' default: false dbMetastore: + x-deprecated: true type: string - description: The name of the Metastore database. + description: 'DEPRECATED: Current Private Cloud releases only support embedded database, the value of this field is ignored. The name of the Metastore database.' default: '' x-form-factors: private dbDas: + x-deprecated: true type: string - description: The name of the DAS database. Not required for embedded databases. + description: 'DEPRECATED: Current Private Cloud releases only support embedded database, the value of this field is ignored. The name of the DAS database. Not required for embedded databases.' default: '' x-form-factors: private dbHue: + x-deprecated: true type: string - description: The name of the HUE database. Not required for embedded databases. + description: 'DEPRECATED: Current Private Cloud releases only support embedded database, the value of this field is ignored. The name of the HUE database. Not required for embedded databases.' default: '' x-form-factors: private CreateClusterDiagnosticDataJobRequest: @@ -3364,7 +3362,8 @@ definitions: default: false description: Forced recreation of the diagnostic job. downloadOptions: - description: Cluster diagnostic options. If not provided, everything will be included in the Diagnostic Data. + x-deprecated: true + description: 'DEPRECATED: All logs are included by default. No need to specify options' $ref: '#/definitions/ClusterCreateDiagnosticDataDownloadOptions' CreateClusterDiagnosticDataJobResponse: type: object @@ -3533,7 +3532,8 @@ definitions: default: false description: Forced recreation of the diagnostic job. downloadOptions: - description: Database Catalog diagnostic options. If not provided, everything will be included in the Diagnostic Data. + x-deprecated: true + description: 'DEPRECATED: All logs are included by default' $ref: '#/definitions/DBCCreateDiagnosticDataDownloadOptions' CreateDbcDiagnosticDataJobResponse: type: object @@ -4253,10 +4253,9 @@ definitions: description: version of the Virtual Warehouse. default: '' x-form-factors: public - template: + tShirtSize: type: string - description: 'DEPRECATED: It will be replaced by the tShirtSize parameter in an upcoming release. Name of configuration template to use.' - x-deprecated: true + description: Name of T-shirt size to use, which will determine the number of nodes. enum: - xsmall - small @@ -4618,10 +4617,12 @@ definitions: default: false description: Forced recreation of the diagnostic job. hiveDownloadOptions: - description: Hive diagnostic options. If not provided, everything will be included into the Diagnostic Data. + x-deprecated: true + description: 'DEPRECATED: All logs are included by default' $ref: '#/definitions/HiveCreateDiagnosticDataDownloadOptions' impalaDownloadOptions: - description: Impala diagnostic options. If not provided, everything will be included into the Diagnostic Data. + x-deprecated: true + description: 'DEPRECATED: All logs are included by default' $ref: '#/definitions/ImpalaCreateDiagnosticDataDownloadOptions' CreateVwDiagnosticDataJobResponse: type: object @@ -4791,97 +4792,119 @@ definitions: items: $ref: '#/definitions/EventResponse' HiveCreateDiagnosticDataDownloadOptions: + x-deprecated: true type: object - description: Flags that denote which diagnostics to include for a Hive Virtual Warehouse. + description: 'DEPRECATED: Included by default, no need to specify' x-form-factors: public properties: includeHms: + x-deprecated: true type: boolean default: false - description: Include the HMS diagnostics. + description: 'DEPRECATED: Included by default, no need to specify' includeErrordump: + x-deprecated: true type: boolean default: false - description: Include the error dump. + description: 'DEPRECATED: Included by default, no need to specify' includeGclogs: + x-deprecated: true type: boolean default: false - description: Include the Garbage collector logs. + description: 'DEPRECATED: Included by default, no need to specify' includeHeapdump: + x-deprecated: true type: boolean default: false - description: Include the heap-dump. + description: 'DEPRECATED: Included by default, no need to specify' includeLogs: + x-deprecated: true type: boolean default: false - description: Include logs. + description: 'DEPRECATED: Included by default, no need to specify' includeComputeResourceInfo: + x-deprecated: true type: boolean default: false - description: Include compute resource info. + description: 'DEPRECATED: Included by default, no need to specify' includeKubernetesResourceInfo: + x-deprecated: true type: boolean default: false - description: Include Kubernetes resource info. + description: 'DEPRECATED: Included by default, no need to specify' ImpalaCreateDiagnosticDataDownloadOptions: + x-deprecated: true type: object - description: Flags that denote which diagnostics to include for an Impala Virtual Warehouse. + description: 'DEPRECATED: Included by default, no need to specify' x-form-factors: public properties: includeHms: + x-deprecated: true type: boolean default: false - description: Include the HMS diagnostics. + description: 'DEPRECATED: Included by default, no need to specify' includeMinidump: + x-deprecated: true type: boolean default: false - description: Include the minidump. + description: 'DEPRECATED: Included by default, no need to specify' includeProfile: + x-deprecated: true type: boolean default: false - description: Include the profile. + description: 'DEPRECATED: Included by default, no need to specify' includeSidecar: + x-deprecated: true type: boolean default: false - description: Include the sidecar diagnostics. + description: 'DEPRECATED: Included by default, no need to specify' includeWorkload: + x-deprecated: true type: boolean default: false - description: Include the workload diagnostics. + description: 'DEPRECATED: Included by default, no need to specify' includeKubernetesResourceInfo: + x-deprecated: true type: boolean default: false - description: Include kubernetes resource info. + description: 'DEPRECATED: Included by default, no need to specify' DBCCreateDiagnosticDataDownloadOptions: + x-deprecated: true type: object - description: Flags that denote which diagnostics to include for a Database Catalog. + description: 'DEPRECATED: Included by default, no need to specify' x-form-factors: public properties: includeKubernetesResourceInfo: + x-deprecated: true type: boolean default: false - description: Include kubernetes resource info. + description: 'DEPRECATED: Included by default, no need to specify' ClusterCreateDiagnosticDataDownloadOptions: type: object - description: Flags that denote which diagnostics to include for the cluster. x-form-factors: public + x-deprecated: true + description: 'DEPRECATED: Included by default, no need to specify' properties: includeClusterInfo: + x-deprecated: true type: boolean default: false - description: Include cluster info. + description: 'DEPRECATED: Included by default, no need to specify' includeIstioSystem: + x-deprecated: true type: boolean default: false - description: Include Istio system. + description: 'DEPRECATED: Included by default, no need to specify' includeSharedServices: + x-deprecated: true type: boolean default: false - description: Include shared services. + description: 'DEPRECATED: Included by default, no need to specify' includeKubeSystem: + x-deprecated: true type: boolean default: false - description: Include Kube system. + description: 'DEPRECATED: Included by default, no need to specify' ExternalBucket: type: object description: External bucket details. @@ -4924,6 +4947,10 @@ definitions: version: type: string description: The version of the deployed CDW cluster. + productSupport: + x-form-factors: public,private + $ref: '#/definitions/ClusterSummaryProductSupportResponse' + description: 'Support lifecycle details of the given Cluster version (see version field). Learn more at Support lifecycle site: https://www.cloudera.com/services-and-support/support-lifecycle-policy.html.' enableSpotInstances: x-form-factors: public type: boolean @@ -4945,12 +4972,6 @@ definitions: items: type: string description: 'NOTE: The cluster level instance type selection will be replaced by virtual warehouse level selection. Compute instance types that the environment is restricted to use. This affects the creation of the virtual warehouses where this restriction will apply.' - additionalInstanceTypes: - x-deprecated: true - type: array - items: - type: string - description: 'DEPRECATED: Additional compute instance types will be removed in subsequent releases. Additional (fallback) instance types listed in their priority order. They are used instead of the primary compute instance type in case it is unavailable. Since additional instance types are not supported for Azure, this is always empty for it.' awsOptions: $ref: '#/definitions/AwsOptionsResponse' description: Response object of AWS related cluster options. @@ -4985,6 +5006,21 @@ definitions: description: External buckets attached to the environment. items: $ref: '#/definitions/ExternalBucket' + ClusterSummaryProductSupportResponse: + x-form-factors: public,private + type: object + description: 'Support lifecycle details of the given Cluster version (see version field). Learn more at Support lifecycle site: https://www.cloudera.com/services-and-support/support-lifecycle-policy.html.' + properties: + status: + type: string + description: 'Status of the support lifecycle. *COVERED*: The Cluster version has active support. *EXPIRED*: The Cluster version is no-longer supported. *UNKNOWN*: The Cluster version is missing or incorrect.' + expiryDate: + type: string + format: date-time + description: Shows the expiration date of the support for this Cluster version. + message: + type: string + description: Message. DataVisualizationSummary: type: object description: A Cloudera Data Visualization. @@ -5160,6 +5196,9 @@ definitions: type: string x-form-factors: private description: Command to use impala-shell for Impala Virtual Warehouses with Kerberos authentication. + trinoCli: + type: string + description: Command-line client that connects to Trino Virtual Warehouse to execute SQL queries. hue: type: string description: URL of Hue for both Hive and Impala Virtual Warehouses. @@ -5464,10 +5503,9 @@ definitions: vwId: type: string description: ID of the Virtual Warehouse. - template: + tShirtSize: type: string - description: 'DEPRECATED: It will be replaced by the tShirtSize parameter in an upcoming release. Name of configuration template to use.' - x-deprecated: true + description: Name of T-shirt size to use, which will determine the number of nodes. enum: - xsmall - small @@ -6918,7 +6956,7 @@ definitions: description: Storage related information. x-nullable: true x-mutating: false - x-form-factors: private + x-form-factors: private,public properties: scratch: type: string diff --git a/cdp-sdk-go/resources/swagger/environments.yaml b/cdp-sdk-go/resources/swagger/environments.yaml index f6a37b16..2b3efe15 100644 --- a/cdp-sdk-go/resources/swagger/environments.yaml +++ b/cdp-sdk-go/resources/swagger/environments.yaml @@ -6,7 +6,7 @@ x-form-factors: public,private x-cdp-releases: PUBLIC x-audit: true info: - version: 0.9.124 (BETA) + version: 0.9.127 (BETA) title: Cloudera Environments Service license: name: Apache 2.0 @@ -588,6 +588,27 @@ paths: description: The default response on an error. schema: $ref: '#/definitions/Error' + /api/v1/environments2/lastSyncStatus: + post: + summary: Returns status of the sync operation for the environment crn. + description: Returns status of the sync operation for the environment based on crn. + operationId: lastSyncStatus + x-mutating: false + parameters: + - name: input + in: body + required: true + schema: + $ref: '#/definitions/LastSyncStatusRequest' + responses: + 200: + description: Expected response to a valid request. + schema: + $ref: '#/definitions/LastSyncStatusResponse' + default: + description: The default response on an error. + schema: + $ref: '#/definitions/Error' /api/v1/environments2/listConnectedDataServices: post: summary: Returns the list of Data Services and their cluster names that are attached the given environment. @@ -2410,6 +2431,14 @@ definitions: description: type: string description: A description for the credential. + skipOrgPolicyDecisions: + type: boolean + default: false + description: Skips organization policy decisions during cloud storage validation. + verifyPermissions: + type: boolean + default: false + description: When true, verifies credential permissions. awsCredentialProperties: description: The credential properties that closely related to those that have been created on AWS. $ref: '#/definitions/AwsCredentialProperties' @@ -2682,7 +2711,8 @@ definitions: description: The subnets to use for endpoint access gateway. s3GuardTableName: type: string - description: The name for the DynamoDB table backing S3Guard. + description: Deprecated. S3Guard was used to ensure consistent S3 updates when S3 was still eventually consistent. With the introduction of Consistent S3, the goal and usage of S3 Guard have become superfluous and defunct. + x-deprecated: true description: type: string description: An description of the environment. @@ -2782,7 +2812,8 @@ definitions: description: The subnets to use for endpoint access gateway. s3GuardTableName: type: string - description: The name for the DynamoDB table backing S3Guard. + description: Deprecated. S3Guard was used to ensure consistent S3 updates when S3 was still eventually consistent. With the introduction of Consistent S3, the goal and usage of S3 Guard have become superfluous and defunct. + x-deprecated: true description: type: string description: An description of the environment. @@ -3121,9 +3152,17 @@ definitions: InitializeAWSComputeClusterResponse: type: object description: Response object for an initialize AWS default compute cluster request. + properties: + operationId: + type: string + description: The id of the related operation. InitializeAzureComputeClusterResponse: type: object description: Response object for an initialize Azure default compute cluster request. + properties: + operationId: + type: string + description: The id of the related operation. CreateAzureEnvironmentResponse: type: object description: Response object for a create Azure environment request. @@ -3783,7 +3822,18 @@ definitions: properties: s3GuardTableName: type: string - description: The name for the DynamoDB table backing S3Guard. + description: Deprecated. S3Guard was used to ensure consistent S3 updates when S3 was still eventually consistent. With the introduction of Consistent S3, the goal and usage of S3 Guard have become superfluous and defunct. + x-deprecated: true + azureDetails: + type: object + description: Azure specific environment configuration information. + properties: + resourceGroupName: + type: string + description: Name of an existing Azure resource group to be used for the environment. If it is not specified then new resource groups will be generated. + resourceEncryptionParameters: + $ref: '#/definitions/AzureResourceEncryptionParameters' + description: Object containing details of encryption parameters for Azure cloud. gcpDetails: type: object description: GCP specific environment configuration information. @@ -4193,6 +4243,15 @@ definitions: endTime: type: string description: Sync operation end timestamp. + LastSyncStatusRequest: + type: object + description: Request object for Sync Status. + required: + - envNameOrCrn + properties: + envNameOrCrn: + type: string + description: Name or Crn of the environment. ListConnectedDataServicesRequest: type: object description: Request object for listing connected Data Service(s) for a given environment. @@ -4228,6 +4287,42 @@ definitions: description: List of resource names for the given Data Service. items: type: string + LastSyncStatusResponse: + type: object + description: Response object for Sync Operation. + required: + - operationId + properties: + operationId: + type: string + description: UUID of the request for this operation. This Id can be used for geting status on the operation. + operationType: + description: Operation type, set password or user sync + $ref: '#/definitions/OperationType' + status: + description: Status of this operation. Status can be one of these values (REQUESTED, RUNNING, COMPLETED, FAILED, REJECTED, TIMEDOUT) + $ref: '#/definitions/SyncStatus' + success: + type: array + description: List of sync operation details for all succeeded environments. + items: + $ref: '#/definitions/SyncOperationDetails' + failure: + type: array + description: List of sync operation details for all failed environments. + items: + $ref: '#/definitions/SyncOperationDetails' + error: + type: string + description: If there is any error associated. The error will be populated on any error and it may be populated when the operation failure details are empty. + startDate: + type: string + format: date-time + description: Date when the sync operation started. + endDate: + type: string + format: date-time + description: Date when the sync operation ended. Omitted if operation has not ended. GetEnvironmentUserSyncStateRequest: type: object description: Request object for retrieving the user sync state of an environment. @@ -5203,7 +5298,7 @@ definitions: type: array items: type: string - description: Kubernetes API authorized IP ranges in CIDR notation. Mutually exclusive with privateCluster. Default value is 0.0.0.0/0. + description: Kubernetes API authorized IP ranges in CIDR notation. Mutually exclusive with privateCluster. workerNodeSubnets: type: array items: @@ -5220,7 +5315,7 @@ definitions: type: array items: type: string - description: Kubernetes API authorized IP ranges in CIDR notation. Mutually exclusive with privateCluster. Default value is 0.0.0.0/0. + description: Kubernetes API authorized IP ranges in CIDR notation. Mutually exclusive with privateCluster. outboundType: type: string enum: diff --git a/cdp-sdk-go/resources/swagger/iam.yaml b/cdp-sdk-go/resources/swagger/iam.yaml index b3abb5b9..08b2aec9 100644 --- a/cdp-sdk-go/resources/swagger/iam.yaml +++ b/cdp-sdk-go/resources/swagger/iam.yaml @@ -7,7 +7,7 @@ x-cdp-releases: PUBLIC x-audit: true x-extensions: pvcapipath info: - version: 0.9.124 (BETA) + version: 0.9.127 (BETA) title: Cloudera IAM Service license: name: Apache 2.0 @@ -116,7 +116,7 @@ paths: summary: Deletes a user and all associated resources. description: Deletes a user. This includes deleting all associated access keys and unassigning all roles and resource roles assigned to the user. The user is also removed from all groups it belongs to. If the call succeeds the user will not be able to login interactively, or use any access keys to access the CDP control plane. This feature is under development and some resources may be left behind after a successful call. Note that user-sync is not triggered yet by this call and the caller must trigger that to ensure that the user loses access to all environments as soon as possible. operationId: deleteUser - x-form-factors: public + x-form-factors: public,private x-right: iam/deleteUser x-mutating: true parameters: diff --git a/cdp-sdk-go/resources/swagger/ml.yaml b/cdp-sdk-go/resources/swagger/ml.yaml index 6c915f8d..f4ba22e3 100644 --- a/cdp-sdk-go/resources/swagger/ml.yaml +++ b/cdp-sdk-go/resources/swagger/ml.yaml @@ -5,7 +5,7 @@ x-products: CDP x-form-factors: public,private x-cdp-releases: PUBLIC info: - version: 0.9.124 (BETA) + version: 0.9.127 (BETA) title: Cloudera AI license: name: Apache 2.0 @@ -1479,9 +1479,6 @@ definitions: nfsVersion: type: string description: The NFS Protocol version of the NFS server we are using for Azure and Private Cloud. - mlVersion: - type: string - description: The version of ML workload app to install. enableModelMetrics: type: boolean description: Enables the model metrics service for exporting metrics for models to a metrics store. @@ -1615,9 +1612,6 @@ definitions: backupStatus: type: string description: The status of the backup. - isCrossNsBackup: - type: boolean - description: Status whether the backup is cross namespace enabled. ListWorkspaceBackupsResponse: type: object description: Response object for ListWorkspaceBackups method. diff --git a/cdp-sdk-go/resources/swagger/opdb.yaml b/cdp-sdk-go/resources/swagger/opdb.yaml index 3732ceb7..f8bf35dc 100644 --- a/cdp-sdk-go/resources/swagger/opdb.yaml +++ b/cdp-sdk-go/resources/swagger/opdb.yaml @@ -5,7 +5,7 @@ x-products: CDP x-form-factors: public x-cdp-releases: PUBLIC info: - version: 0.9.124 (BETA) + version: 0.9.127 (BETA) title: Operational Database service license: name: Apache 2.0 @@ -84,8 +84,8 @@ paths: x-mutating: true /api/v1/opdb/createSnapshot: post: - summary: Creates a snapshot for a specific table - description: Returns id state and creation time + summary: Creates a snapshot for a specific table. + description: Returns id state and creation time. operationId: createSnapshot parameters: - name: input @@ -105,8 +105,8 @@ paths: x-mutating: true /api/v1/opdb/deleteSnapshot: post: - summary: Deletes a snapshot - description: Returns state of operation + summary: Deletes a snapshot. + description: Returns the snapshot that is deleted. operationId: deleteSnapshot parameters: - name: input @@ -229,6 +229,27 @@ paths: schema: $ref: '#/definitions/Error' x-mutating: true + /api/v1/opdb/listCertificates: + post: + summary: List certificates + description: List SHA-1 fingerprints of certificates in Global Trust Store + operationId: listCertificates + parameters: + - name: input + in: body + required: true + schema: + $ref: '#/definitions/ListCertificatesRequest' + responses: + 200: + description: Expected response to a valid request. + schema: + $ref: '#/definitions/ListCertificatesResponse' + default: + description: The default response on an error. + schema: + $ref: '#/definitions/Error' + x-mutating: false /api/v1/opdb/listCoprocessors: post: summary: Lists coprocessors in a database @@ -339,7 +360,7 @@ paths: x-mutating: false /api/v1/opdb/listRestoreSnapshots: post: - summary: Lists instances when a snapshot was restored to a database + summary: Lists instances when a snapshot was restored to a database. description: Returns a list of snapshots restored into a database. operationId: listRestoreSnapshots parameters: @@ -382,8 +403,8 @@ paths: x-mutating: false /api/v1/opdb/listSnapshots: post: - summary: Shows snapshot for a table name in a specific location - description: Returns list of snapshot names + summary: Shows snapshot for a table name in a specific location. + description: Returns list of snapshot names. operationId: listSnapshots parameters: - name: input @@ -422,6 +443,27 @@ paths: schema: $ref: '#/definitions/Error' x-mutating: false + /api/v1/opdb/listSupportedInstanceTypes: + post: + summary: Lists instance types supported by COD + description: Lists instance types supported by COD. + operationId: listSupportedInstanceTypes + parameters: + - name: input + in: body + required: true + schema: + $ref: '#/definitions/ListSupportedInstanceTypesRequest' + responses: + 200: + description: Expected response to a valid request. + schema: + $ref: '#/definitions/ListSupportedInstanceTypesResponse' + default: + description: The default response on an error. + schema: + $ref: '#/definitions/Error' + x-mutating: false /api/v1/opdb/prepareUpgradeDatabase: post: summary: Prepare database upgrade. @@ -467,8 +509,8 @@ paths: x-mutating: true /api/v1/opdb/restoreSnapshot: post: - summary: Restores a snapshot - description: Returns state of operation + summary: Restores a snapshot. + description: Returns the snapshot that was restored. operationId: restoreSnapshot parameters: - name: input @@ -612,6 +654,27 @@ paths: schema: $ref: '#/definitions/Error' x-mutating: true + /api/v1/opdb/uploadCertificate: + post: + summary: Upload custom certificate + description: Upload a custom certificate to Global Trust Store + operationId: uploadCertificate + parameters: + - name: input + in: body + required: true + schema: + $ref: '#/definitions/UploadCertificateRequest' + responses: + 200: + description: Expected response to a valid request. + schema: + $ref: '#/definitions/UploadCertificateResponse' + default: + description: The default response on an error. + schema: + $ref: '#/definitions/Error' + x-mutating: true definitions: Error: type: object @@ -838,6 +901,9 @@ definitions: computeClusterCrn: type: string description: Utilizes the existing compute cluster with the provided CRN instead of creating a new one. + architecture: + description: Specifies the Architecture of the cluster nodes. + $ref: '#/definitions/ArchitectureType' customInstanceTypes: description: Provide custom VM instance types for master, worker, gateway, leader, edge and compute groups. $ref: '#/definitions/CustomInstanceTypes' @@ -901,6 +967,12 @@ definitions: - CLOUD_WITH_EPHEMERAL - CLOUD - HDFS + ArchitectureType: + type: string + description: "Architecture type for cluster.\n `X86_64` - X64 CPU Architecture is used for the cluster. `ARM64` - ARM64 CPU Architecture is used for the cluster." + enum: + - X86_64 + - ARM64 UpdateDatabaseRequest: type: object description: A request to update the database @@ -937,6 +1009,19 @@ definitions: removeRestworkerNodes: type: boolean description: Removes any REST Worker nodes provisioned for this database. Requires the COD_RESTWORKERS entitlement. + switchInstanceType: + description: Provide custom VM instance types to switch instance types for instance groups. Requires COD_USE_CUSTOM_INSTANCE_TYPES entitlement. + $ref: '#/definitions/CustomInstanceType' + CustomInstanceType: + type: object + description: Parameters to configure custom VM Instance Types. + properties: + instanceGroup: + description: The Instance Group Type. + $ref: '#/definitions/InstanceGroupType' + instanceType: + type: string + description: The Custom VM Instance Type. AutoScalingParameters: type: object description: A Parameters to configure AutoScaling @@ -1333,6 +1418,9 @@ definitions: type: integer format: int32 description: Number of REST Worker nodes for the database. + architecture: + description: Specifies the architecture of the cluster nodes. + $ref: '#/definitions/ArchitectureType' StorageDetailsForWorker: type: object description: Storage details for the worker node for AWS, Azure, and GCP cloud providers. @@ -1348,6 +1436,13 @@ definitions: volumeType: description: The volume type. $ref: '#/definitions/VolumeType' + CloudPlatform: + type: string + description: "Cloud Provider that cluster is exhibited on.\n `AWS` - AWS `AZURE` - Azure `GCP` - GCP" + enum: + - AWS + - AZURE + - GCP DescribeDatabaseRequest: type: object description: request to get details of the database in a particular environment @@ -1379,6 +1474,7 @@ definitions: - LOCKED - DELETED - CORRUPT + - DELETING - UNKNOWN CreateSnapshotRequest: type: object @@ -1392,43 +1488,43 @@ definitions: properties: environmentName: type: string - description: The name of the environment + description: The name of the environment. databaseName: type: string description: The name of the database. tableName: type: string - description: fully qualified table name + description: The fully qualified table name. snapshotName: type: string description: Snapshot name unique per database. snapshotLocation: type: string - description: Snapshot location URL on object store + description: The snapshot location URL on object store. CreateSnapshotResponse: type: object description: Create Snapshot Response. properties: environmentName: type: string - description: The name of the environment + description: The name of the environment. databaseName: type: string - description: The name of the database + description: The name of the database. status: - description: Status + description: The status of the create snapshot. $ref: '#/definitions/SnapshotStatusType' creationTime: type: integer format: int64 - description: When the snapshot was created + description: When the snapshot was created. commandID: type: integer format: int64 - description: command id + description: The submitted Command ID of the create snapshot. statusReason: type: string - description: Reason for the status + description: Reason for the status. RestoreSnapshotRequest: type: object description: Restore Snapshot Request. @@ -1441,55 +1537,55 @@ definitions: properties: environmentName: type: string - description: The name of the original environment + description: The name of the original environment. databaseName: type: string - description: The name of the original database + description: The name of the original database. snapshotName: type: string - description: Snapshot name + description: The name of the snapshot. targetEnvironmentName: type: string - description: The name of the target environment where the snapshot should be restored + description: The name of the target environment where the snapshot should be restored. targetDatabaseName: type: string - description: The name of the target database where the snapshot should be restored + description: The name of the target database where the snapshot should be restored. RestoreSnapshotResponse: type: object - description: Restore Snapshot Response. + description: Response object for the RestoreSnapshot method. properties: environmentName: type: string - description: The name of the environment + description: The name of the environment. databaseName: type: string - description: The name of the database + description: The name of the database. snapshotName: type: string - description: The snapshot name + description: The name of the snapshot. targetEnvironmentName: type: string - description: The name of the target environment + description: The name of the target environment. targetDatabaseName: type: string - description: The name of the target database + description: The name of the target database. status: - description: Status + description: The status of the restore snapshot. $ref: '#/definitions/SnapshotStatusType' restoreTime: type: integer format: int64 - description: When the snapshot restore was started + description: The time when the snapshot restore was started. commandID: type: integer format: int64 - description: Command id + description: The submitted Command ID of the restore snapshot. statusReason: type: string - description: Reason for the status + description: Reason for the status. DeleteSnapshotRequest: type: object - description: Delete Snapshot Request. + description: Request object for the DeleteSnapshot method. required: - environmentName - databaseName @@ -1497,36 +1593,36 @@ definitions: properties: environmentName: type: string - description: The name of the environment + description: The name of the environment. databaseName: type: string - description: The name of the database + description: The name of the database. snapshotName: type: string - description: Snapshot name + description: The name of the snapshot. DeleteSnapshotResponse: type: object - description: Delete Snapshot Response. + description: Response object of the DeleteSnapshot method. properties: environmentName: type: string - description: The name of the environment + description: The name of the environment. databaseName: type: string - description: The name of the database + description: The name of the database. status: - description: Status + description: The status of the delete snapshot. $ref: '#/definitions/SnapshotStatusType' commandID: type: integer format: int64 - description: command id + description: The submitted Command ID of the delete snapshot. statusReason: type: string - description: Reason for the status + description: Reason for the status. snapshotName: type: string - description: Snapshot name + description: The name of the snapshot. Snapshot: type: object description: An instance of a table's snapshot. @@ -1536,24 +1632,24 @@ definitions: properties: tableName: type: string - description: Table Name + description: The table name. snapshotName: type: string - description: Snapshot Name + description: The name of the snapshot. creationTime: type: integer format: int64 - description: Creation Time + description: The creation time of the snapshot. status: - description: Status + description: The status of the snapshot. $ref: '#/definitions/SnapshotStatusType' commandID: type: integer format: int64 - description: Command id + description: The submitted Command ID of the snapshot. snapshotLocation: type: string - description: Snapshot location + description: The location of the snapshot. failureReason: type: string description: Reason for the failure in case of snapshot creation failed. @@ -1566,25 +1662,25 @@ definitions: properties: environmentName: type: string - description: The name of the environment + description: The name of the environment. databaseName: type: string - description: The name of the database + description: The name of the database. tableName: type: string - description: Table name + description: The table name. commandId: type: integer format: int64 - description: Command Id + description: The submitted Command ID of the snapshots. fromCreationTime: type: string format: date-time - description: The starting snapshot creation time to search snapshots (inclusive). + description: The creation time of the snapshots to search (inclusive). toCreationTime: type: string format: date-time - description: The ending snapshot creation time to search snapshots (inclusive). + description: The ending time of the snapshot creation to search (inclusive). ListSnapshotsResponse: type: object description: Show Snapshots Response. @@ -1594,21 +1690,21 @@ definitions: properties: environmentName: type: string - description: The name of the environment + description: The name of the environment. databaseName: type: string - description: The name of the database + description: The name of the database. snapshots: type: array items: $ref: '#/definitions/Snapshot' - description: List of snapshots + description: List of snapshots. status: - description: Status + description: The status of the list snapshots. $ref: '#/definitions/SnapshotStatusType' statusReason: type: string - description: Reason for the status + description: Reason for the status. ListRestoreSnapshotsRequest: type: object description: Show Restore Snapshots Request. @@ -1618,23 +1714,23 @@ definitions: properties: environmentName: type: string - description: The name of the environment + description: The name of the environment. databaseName: type: string - description: The name of the database + description: The name of the database. snapshotName: type: string - description: Snapshot Name + description: The name of the snapshot. targetEnvironmentName: type: string - description: The name of the target environment + description: The name of the target environment. targetDatabaseName: type: string - description: The name of the target database + description: The name of the target database. commandId: type: integer format: int64 - description: Command Id + description: The submitted Command ID of the snapshot. fromRestoreTime: type: string format: date-time @@ -1649,24 +1745,24 @@ definitions: properties: snapshotName: type: string - description: The snapshot name + description: The name of the snapshot. targetEnvironmentName: type: string - description: The name of the target environment + description: The name of the target environment. targetDatabaseName: type: string - description: The name of the target database + description: The name of the target database. status: - description: Status + description: The status of the restore snapshot. $ref: '#/definitions/SnapshotStatusType' restoreTime: type: integer format: int64 - description: When the snapshot restore was started + description: The time when the snapshot restore was started. commandID: type: integer format: int64 - description: Command id + description: The submitted Command ID of the restore snapshot. failureReason: type: string description: Reason for the failure in case of restore snapshot failed. @@ -2383,4 +2479,98 @@ definitions: enum: - GATEWAY - MASTER + ListCertificatesRequest: + type: object + description: The request of listing SHA-1 fingerprints of certificates in Global Trust Store + required: + - environment + - database + properties: + environment: + type: string + description: The name or CRN of the environment. + database: + type: string + description: The name or CRN of the database. + ListCertificatesResponse: + type: object + description: The response of listing fingerprints of certificates in Global Trust Store + properties: + fingerprints: + type: array + items: + type: string + description: List of certificate SHA-1 fingerprints in Global Trust Store + UploadCertificateRequest: + type: object + description: The request of uploading a custom certificate to Global Trust Store + required: + - environment + - database + - certificate + properties: + environment: + type: string + description: The name or CRN of the environment. + database: + type: string + description: The name or CRN of the database. + certificate: + type: string + description: Custom certificate in PEM format + x-sensitive: true + UploadCertificateResponse: + type: object + description: The response of uploading a custom certificate to Global Trust Store + properties: + fingerprint: + type: string + description: SHA-1 fingerprint of the newly added certificate + ListSupportedInstanceTypesRequest: + type: object + description: The request for listing supported instance types. + required: + - cloudPlatform + - storageType + - scaleType + properties: + cloudPlatform: + description: The name of Cloud Platform. + $ref: '#/definitions/CloudPlatform' + storageType: + description: The Storage Type. + $ref: '#/definitions/StorageType' + scaleType: + description: The Scale Type. + $ref: '#/definitions/ScaleType' + instanceGroup: + description: The Instance Group Type. + $ref: '#/definitions/InstanceGroupType' + architecture: + description: The Architecture. + $ref: '#/definitions/ArchitectureType' + ListSupportedInstanceTypesResponse: + type: object + description: The response for listing supported instance types. + properties: + supportedInstances: + type: array + items: + $ref: '#/definitions/SupportedInstanceTypesList' + description: List of supported instance types. + SupportedInstanceTypesList: + type: object + description: Instance Types list for listing supported instance types. + properties: + instanceGroup: + type: string + description: The Instance Group Type. + defaultInstanceTypes: + type: string + description: The default instance type. + supportedInstanceTypes: + type: array + items: + type: string + description: The other instance types supported. x-audit: true diff --git a/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/dw/client/operations/MockDwClientService.go b/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/dw/client/operations/MockDwClientService.go index 0f747498..1a47a235 100644 --- a/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/dw/client/operations/MockDwClientService.go +++ b/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/dw/client/operations/MockDwClientService.go @@ -5379,7 +5379,7 @@ func (_c *MockDwClientService_SetTransport_Call) Return() *MockDwClientService_S } func (_c *MockDwClientService_SetTransport_Call) RunAndReturn(run func(runtime.ClientTransport)) *MockDwClientService_SetTransport_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations/MockEnvironmentClientService.go b/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations/MockEnvironmentClientService.go index f22bc88f..553f2a2f 100644 --- a/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations/MockEnvironmentClientService.go +++ b/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations/MockEnvironmentClientService.go @@ -3379,6 +3379,79 @@ func (_c *MockEnvironmentClientService_InitializeAzureComputeCluster_Call) RunAn return _c } +// LastSyncStatus provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) LastSyncStatus(params *operations.LastSyncStatusParams, opts ...operations.ClientOption) (*operations.LastSyncStatusOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for LastSyncStatus") + } + + var r0 *operations.LastSyncStatusOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.LastSyncStatusParams, ...operations.ClientOption) (*operations.LastSyncStatusOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.LastSyncStatusParams, ...operations.ClientOption) *operations.LastSyncStatusOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.LastSyncStatusOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.LastSyncStatusParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_LastSyncStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LastSyncStatus' +type MockEnvironmentClientService_LastSyncStatus_Call struct { + *mock.Call +} + +// LastSyncStatus is a helper method to define mock.On call +// - params *operations.LastSyncStatusParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) LastSyncStatus(params interface{}, opts ...interface{}) *MockEnvironmentClientService_LastSyncStatus_Call { + return &MockEnvironmentClientService_LastSyncStatus_Call{Call: _e.mock.On("LastSyncStatus", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_LastSyncStatus_Call) Run(run func(params *operations.LastSyncStatusParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_LastSyncStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.LastSyncStatusParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_LastSyncStatus_Call) Return(_a0 *operations.LastSyncStatusOK, _a1 error) *MockEnvironmentClientService_LastSyncStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_LastSyncStatus_Call) RunAndReturn(run func(*operations.LastSyncStatusParams, ...operations.ClientOption) (*operations.LastSyncStatusOK, error)) *MockEnvironmentClientService_LastSyncStatus_Call { + _c.Call.Return(run) + return _c +} + // ListAuditCredentials provides a mock function with given fields: params, opts func (_m *MockEnvironmentClientService) ListAuditCredentials(params *operations.ListAuditCredentialsParams, opts ...operations.ClientOption) (*operations.ListAuditCredentialsOK, error) { _va := make([]interface{}, len(opts)) @@ -5087,7 +5160,7 @@ func (_c *MockEnvironmentClientService_SetTransport_Call) Return() *MockEnvironm } func (_c *MockEnvironmentClientService_SetTransport_Call) RunAndReturn(run func(runtime.ClientTransport)) *MockEnvironmentClientService_SetTransport_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/iam/client/operations/MockIamClientService.go b/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/iam/client/operations/MockIamClientService.go index daa76fb8..fe2a8052 100644 --- a/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/iam/client/operations/MockIamClientService.go +++ b/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/iam/client/operations/MockIamClientService.go @@ -4430,7 +4430,7 @@ func (_c *MockIamClientService_SetTransport_Call) Return() *MockIamClientService } func (_c *MockIamClientService_SetTransport_Call) RunAndReturn(run func(runtime.ClientTransport)) *MockIamClientService_SetTransport_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/resources/dw/cluster/aws/model_cluster.go b/resources/dw/cluster/aws/model_cluster.go index 4b811c49..5e4f7831 100644 --- a/resources/dw/cluster/aws/model_cluster.go +++ b/resources/dw/cluster/aws/model_cluster.go @@ -74,7 +74,6 @@ func (p *resourceModel) convertToCreateAwsClusterRequest() *models.CreateAwsClus EnableSpotInstances: p.getEnableSpotInstances(), CustomAmiID: p.getCustomAmiID(), ComputeInstanceTypes: p.getComputeInstanceTypes(), - AdditionalInstanceTypes: p.getAdditionalInstanceTypes(), } } @@ -99,13 +98,6 @@ func (p *resourceModel) getComputeInstanceTypes() []string { return nil } -func (p *resourceModel) getAdditionalInstanceTypes() []string { - if i := p.InstanceSettings; i != nil { - return utils.FromListValueToStringList(p.InstanceSettings.AdditionalInstanceTypes) - } - return nil -} - func (p *resourceModel) getCustomRegistryOptions() *models.CustomRegistryOptions { if cro := p.CustomRegistryOptions; cro != nil { return &models.CustomRegistryOptions{ diff --git a/resources/dw/cluster/aws/model_cluster_test.go b/resources/dw/cluster/aws/model_cluster_test.go index e3ba72ca..e0ef71a0 100644 --- a/resources/dw/cluster/aws/model_cluster_test.go +++ b/resources/dw/cluster/aws/model_cluster_test.go @@ -60,7 +60,6 @@ func (s *DwClusterModelTestSuite) TestConvertToCreateAwsClusterRequest() { s.Equal(false, *awsCluster.EnableSpotInstances) s.Equal("", awsCluster.CustomAmiID) s.Equal([]string{}, awsCluster.ComputeInstanceTypes) - s.Equal([]string{}, awsCluster.AdditionalInstanceTypes) } func (s *DwClusterModelTestSuite) TestGetPollingTimeout() { diff --git a/resources/ml/resource_workspace.go b/resources/ml/resource_workspace.go index 5106c9fc..eba36f7b 100644 --- a/resources/ml/resource_workspace.go +++ b/resources/ml/resource_workspace.go @@ -290,7 +290,6 @@ func modelToCreateWorkspaceRequest(ctx context.Context, data *workspaceResourceM ExistingDatabaseConfig: exDbCfgReq, ExistingNFS: data.ExistingNFS.ValueString(), LoadBalancerIPWhitelists: utils.FromSetValueToStringList(data.LoadBalancerIPWhitelists), - MlVersion: data.MlVersion.ValueString(), NfsVersion: data.NfsVersion.ValueString(), OutboundTypes: obTypes, PrivateCluster: data.PrivateCluster.ValueBool(),