diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_client.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_client.go index 18f89b60..5ace1726 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_client.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_client.go @@ -152,6 +152,10 @@ type ClientService interface { WaypointServiceListNoCodeModules(params *WaypointServiceListNoCodeModulesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListNoCodeModulesOK, error) + WaypointServiceListNoCodeModules2(params *WaypointServiceListNoCodeModules2Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListNoCodeModules2OK, error) + + WaypointServiceListTFAgentPools(params *WaypointServiceListTFAgentPoolsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListTFAgentPoolsOK, error) + WaypointServiceListTFCOrganizations(params *WaypointServiceListTFCOrganizationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListTFCOrganizationsOK, error) WaypointServiceListTFCProjects(params *WaypointServiceListTFCProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListTFCProjectsOK, error) @@ -1178,7 +1182,7 @@ func (a *Client) WaypointServiceDestroyAddOn2(params *WaypointServiceDestroyAddO } /* -WaypointServiceDestroyApplication waypoint service destroy application API +WaypointServiceDestroyApplication destroys application destroys an existing application a destroy operation is queued for the application s terraform workspace and the application is deleted from h c p waypoint */ func (a *Client) WaypointServiceDestroyApplication(params *WaypointServiceDestroyApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceDestroyApplicationOK, error) { // TODO: Validate the params before sending @@ -1216,7 +1220,7 @@ func (a *Client) WaypointServiceDestroyApplication(params *WaypointServiceDestro } /* -WaypointServiceDestroyApplication2 waypoint service destroy application2 API +WaypointServiceDestroyApplication2 destroys application destroys an existing application a destroy operation is queued for the application s terraform workspace and the application is deleted from h c p waypoint */ func (a *Client) WaypointServiceDestroyApplication2(params *WaypointServiceDestroyApplication2Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceDestroyApplication2OK, error) { // TODO: Validate the params before sending @@ -1558,7 +1562,7 @@ func (a *Client) WaypointServiceGetAgentGroup(params *WaypointServiceGetAgentGro } /* -WaypointServiceGetApplication waypoint service get application API +WaypointServiceGetApplication gets application returns an application by ID or name */ func (a *Client) WaypointServiceGetApplication(params *WaypointServiceGetApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceGetApplicationOK, error) { // TODO: Validate the params before sending @@ -1596,7 +1600,7 @@ func (a *Client) WaypointServiceGetApplication(params *WaypointServiceGetApplica } /* -WaypointServiceGetApplication2 waypoint service get application2 API +WaypointServiceGetApplication2 gets application returns an application by ID or name */ func (a *Client) WaypointServiceGetApplication2(params *WaypointServiceGetApplication2Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceGetApplication2OK, error) { // TODO: Validate the params before sending @@ -1862,7 +1866,7 @@ func (a *Client) WaypointServiceGetTFCConfig(params *WaypointServiceGetTFCConfig } /* -WaypointServiceGetTFModuleDetails waypoint service get t f module details API +WaypointServiceGetTFModuleDetails gets t f module details returns the details of a specific no code module */ func (a *Client) WaypointServiceGetTFModuleDetails(params *WaypointServiceGetTFModuleDetailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceGetTFModuleDetailsOK, error) { // TODO: Validate the params before sending @@ -1900,7 +1904,7 @@ func (a *Client) WaypointServiceGetTFModuleDetails(params *WaypointServiceGetTFM } /* -WaypointServiceGetTFModuleDetails2 waypoint service get t f module details2 API +WaypointServiceGetTFModuleDetails2 gets t f module details returns the details of a specific no code module */ func (a *Client) WaypointServiceGetTFModuleDetails2(params *WaypointServiceGetTFModuleDetails2Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceGetTFModuleDetails2OK, error) { // TODO: Validate the params before sending @@ -2508,7 +2512,7 @@ func (a *Client) WaypointServiceListApplicationTemplates2(params *WaypointServic } /* -WaypointServiceListApplications waypoint service list applications API +WaypointServiceListApplications lists applications returns a list of all applications */ func (a *Client) WaypointServiceListApplications(params *WaypointServiceListApplicationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListApplicationsOK, error) { // TODO: Validate the params before sending @@ -2584,7 +2588,83 @@ func (a *Client) WaypointServiceListNoCodeModules(params *WaypointServiceListNoC } /* -WaypointServiceListTFCOrganizations waypoint service list t f c organizations API +WaypointServiceListNoCodeModules2 lists no code modules returns a list of available no code module for the configured t f c organization +*/ +func (a *Client) WaypointServiceListNoCodeModules2(params *WaypointServiceListNoCodeModules2Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListNoCodeModules2OK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWaypointServiceListNoCodeModules2Params() + } + op := &runtime.ClientOperation{ + ID: "WaypointService_ListNoCodeModules2", + Method: "GET", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace.id}/tfmodules", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &WaypointServiceListNoCodeModules2Reader{formats: a.formats}, + AuthInfo: authInfo, + 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.(*WaypointServiceListNoCodeModules2OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*WaypointServiceListNoCodeModules2Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +WaypointServiceListTFAgentPools lists t f agent pools returns a list of h c p terraform agent pools +*/ +func (a *Client) WaypointServiceListTFAgentPools(params *WaypointServiceListTFAgentPoolsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListTFAgentPoolsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWaypointServiceListTFAgentPoolsParams() + } + op := &runtime.ClientOperation{ + ID: "WaypointService_ListTFAgentPools", + Method: "GET", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace.id}/tf-agent-pools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &WaypointServiceListTFAgentPoolsReader{formats: a.formats}, + AuthInfo: authInfo, + 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.(*WaypointServiceListTFAgentPoolsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*WaypointServiceListTFAgentPoolsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +WaypointServiceListTFCOrganizations lists t f c organizations returns a list of available h c p terraform organizations which can be used by the currently set token */ func (a *Client) WaypointServiceListTFCOrganizations(params *WaypointServiceListTFCOrganizationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListTFCOrganizationsOK, error) { // TODO: Validate the params before sending @@ -2888,7 +2968,7 @@ func (a *Client) WaypointServiceStartingAction(params *WaypointServiceStartingAc } /* -WaypointServiceUIListActionConfigBundles UIs bundle endpoints +WaypointServiceUIListActionConfigBundles waypoint service UI list action config bundles API */ func (a *Client) WaypointServiceUIListActionConfigBundles(params *WaypointServiceUIListActionConfigBundlesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceUIListActionConfigBundlesOK, error) { // TODO: Validate the params before sending @@ -3078,7 +3158,7 @@ func (a *Client) WaypointServiceUIGetActionConfigBundle2(params *WaypointService } /* -WaypointServiceUIGetApplicationBundle gets application bundle will return an application and any associated action configs it may have +WaypointServiceUIGetApplicationBundle UIs get application bundle returns an application and any associated action configs it may have */ func (a *Client) WaypointServiceUIGetApplicationBundle(params *WaypointServiceUIGetApplicationBundleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceUIGetApplicationBundleOK, error) { // TODO: Validate the params before sending @@ -3116,7 +3196,7 @@ func (a *Client) WaypointServiceUIGetApplicationBundle(params *WaypointServiceUI } /* -WaypointServiceUIGetApplicationBundle2 gets application bundle will return an application and any associated action configs it may have +WaypointServiceUIGetApplicationBundle2 UIs get application bundle returns an application and any associated action configs it may have */ func (a *Client) WaypointServiceUIGetApplicationBundle2(params *WaypointServiceUIGetApplicationBundle2Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceUIGetApplicationBundle2OK, error) { // TODO: Validate the params before sending @@ -3154,7 +3234,7 @@ func (a *Client) WaypointServiceUIGetApplicationBundle2(params *WaypointServiceU } /* -WaypointServiceUIGetApplicationTemplateBundle gets application template returns a application template by the application template name or id +WaypointServiceUIGetApplicationTemplateBundle UIs get application template bundle returns a template using a name or id to look it up this RPC is used by the h c p waypoint UI */ func (a *Client) WaypointServiceUIGetApplicationTemplateBundle(params *WaypointServiceUIGetApplicationTemplateBundleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceUIGetApplicationTemplateBundleOK, error) { // TODO: Validate the params before sending @@ -3192,7 +3272,7 @@ func (a *Client) WaypointServiceUIGetApplicationTemplateBundle(params *WaypointS } /* -WaypointServiceUIGetApplicationTemplateBundle2 gets application template returns a application template by the application template name or id +WaypointServiceUIGetApplicationTemplateBundle2 UIs get application template bundle returns a template using a name or id to look it up this RPC is used by the h c p waypoint UI */ func (a *Client) WaypointServiceUIGetApplicationTemplateBundle2(params *WaypointServiceUIGetApplicationTemplateBundle2Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceUIGetApplicationTemplateBundle2OK, error) { // TODO: Validate the params before sending @@ -3496,7 +3576,7 @@ func (a *Client) WaypointServiceUpdateAgentGroup(params *WaypointServiceUpdateAg } /* -WaypointServiceUpdateApplication waypoint service update application API +WaypointServiceUpdateApplication updates application updates an existing application */ func (a *Client) WaypointServiceUpdateApplication(params *WaypointServiceUpdateApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceUpdateApplicationOK, error) { // TODO: Validate the params before sending @@ -3534,7 +3614,7 @@ func (a *Client) WaypointServiceUpdateApplication(params *WaypointServiceUpdateA } /* -WaypointServiceUpdateApplication2 waypoint service update application2 API +WaypointServiceUpdateApplication2 updates application updates an existing application */ func (a *Client) WaypointServiceUpdateApplication2(params *WaypointServiceUpdateApplication2Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceUpdateApplication2OK, error) { // TODO: Validate the params before sending diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_no_code_modules2_parameters.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_no_code_modules2_parameters.go new file mode 100644 index 00000000..4c9b87b4 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_no_code_modules2_parameters.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package waypoint_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewWaypointServiceListNoCodeModules2Params creates a new WaypointServiceListNoCodeModules2Params 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 NewWaypointServiceListNoCodeModules2Params() *WaypointServiceListNoCodeModules2Params { + return &WaypointServiceListNoCodeModules2Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewWaypointServiceListNoCodeModules2ParamsWithTimeout creates a new WaypointServiceListNoCodeModules2Params object +// with the ability to set a timeout on a request. +func NewWaypointServiceListNoCodeModules2ParamsWithTimeout(timeout time.Duration) *WaypointServiceListNoCodeModules2Params { + return &WaypointServiceListNoCodeModules2Params{ + timeout: timeout, + } +} + +// NewWaypointServiceListNoCodeModules2ParamsWithContext creates a new WaypointServiceListNoCodeModules2Params object +// with the ability to set a context for a request. +func NewWaypointServiceListNoCodeModules2ParamsWithContext(ctx context.Context) *WaypointServiceListNoCodeModules2Params { + return &WaypointServiceListNoCodeModules2Params{ + Context: ctx, + } +} + +// NewWaypointServiceListNoCodeModules2ParamsWithHTTPClient creates a new WaypointServiceListNoCodeModules2Params object +// with the ability to set a custom HTTPClient for a request. +func NewWaypointServiceListNoCodeModules2ParamsWithHTTPClient(client *http.Client) *WaypointServiceListNoCodeModules2Params { + return &WaypointServiceListNoCodeModules2Params{ + HTTPClient: client, + } +} + +/* +WaypointServiceListNoCodeModules2Params contains all the parameters to send to the API endpoint + + for the waypoint service list no code modules2 operation. + + Typically these are written to a http.Request. +*/ +type WaypointServiceListNoCodeModules2Params struct { + + // NamespaceID. + NamespaceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the waypoint service list no code modules2 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WaypointServiceListNoCodeModules2Params) WithDefaults() *WaypointServiceListNoCodeModules2Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the waypoint service list no code modules2 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WaypointServiceListNoCodeModules2Params) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the waypoint service list no code modules2 params +func (o *WaypointServiceListNoCodeModules2Params) WithTimeout(timeout time.Duration) *WaypointServiceListNoCodeModules2Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the waypoint service list no code modules2 params +func (o *WaypointServiceListNoCodeModules2Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the waypoint service list no code modules2 params +func (o *WaypointServiceListNoCodeModules2Params) WithContext(ctx context.Context) *WaypointServiceListNoCodeModules2Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the waypoint service list no code modules2 params +func (o *WaypointServiceListNoCodeModules2Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the waypoint service list no code modules2 params +func (o *WaypointServiceListNoCodeModules2Params) WithHTTPClient(client *http.Client) *WaypointServiceListNoCodeModules2Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the waypoint service list no code modules2 params +func (o *WaypointServiceListNoCodeModules2Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespaceID adds the namespaceID to the waypoint service list no code modules2 params +func (o *WaypointServiceListNoCodeModules2Params) WithNamespaceID(namespaceID string) *WaypointServiceListNoCodeModules2Params { + o.SetNamespaceID(namespaceID) + return o +} + +// SetNamespaceID adds the namespaceId to the waypoint service list no code modules2 params +func (o *WaypointServiceListNoCodeModules2Params) SetNamespaceID(namespaceID string) { + o.NamespaceID = namespaceID +} + +// WriteToRequest writes these params to a swagger request +func (o *WaypointServiceListNoCodeModules2Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param namespace.id + if err := r.SetPathParam("namespace.id", o.NamespaceID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_no_code_modules2_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_no_code_modules2_responses.go new file mode 100644 index 00000000..a97e7018 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_no_code_modules2_responses.go @@ -0,0 +1,183 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package waypoint_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + cloud "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models" + "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2023-08-18/models" +) + +// WaypointServiceListNoCodeModules2Reader is a Reader for the WaypointServiceListNoCodeModules2 structure. +type WaypointServiceListNoCodeModules2Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WaypointServiceListNoCodeModules2Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWaypointServiceListNoCodeModules2OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewWaypointServiceListNoCodeModules2Default(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 + } +} + +// NewWaypointServiceListNoCodeModules2OK creates a WaypointServiceListNoCodeModules2OK with default headers values +func NewWaypointServiceListNoCodeModules2OK() *WaypointServiceListNoCodeModules2OK { + return &WaypointServiceListNoCodeModules2OK{} +} + +/* +WaypointServiceListNoCodeModules2OK describes a response with status code 200, with default header values. + +A successful response. +*/ +type WaypointServiceListNoCodeModules2OK struct { + Payload *models.HashicorpCloudWaypointListNoCodeModulesResponse +} + +// IsSuccess returns true when this waypoint service list no code modules2 o k response has a 2xx status code +func (o *WaypointServiceListNoCodeModules2OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this waypoint service list no code modules2 o k response has a 3xx status code +func (o *WaypointServiceListNoCodeModules2OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this waypoint service list no code modules2 o k response has a 4xx status code +func (o *WaypointServiceListNoCodeModules2OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this waypoint service list no code modules2 o k response has a 5xx status code +func (o *WaypointServiceListNoCodeModules2OK) IsServerError() bool { + return false +} + +// IsCode returns true when this waypoint service list no code modules2 o k response a status code equal to that given +func (o *WaypointServiceListNoCodeModules2OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the waypoint service list no code modules2 o k response +func (o *WaypointServiceListNoCodeModules2OK) Code() int { + return 200 +} + +func (o *WaypointServiceListNoCodeModules2OK) Error() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tfmodules][%d] waypointServiceListNoCodeModules2OK %+v", 200, o.Payload) +} + +func (o *WaypointServiceListNoCodeModules2OK) String() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tfmodules][%d] waypointServiceListNoCodeModules2OK %+v", 200, o.Payload) +} + +func (o *WaypointServiceListNoCodeModules2OK) GetPayload() *models.HashicorpCloudWaypointListNoCodeModulesResponse { + return o.Payload +} + +func (o *WaypointServiceListNoCodeModules2OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.HashicorpCloudWaypointListNoCodeModulesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWaypointServiceListNoCodeModules2Default creates a WaypointServiceListNoCodeModules2Default with default headers values +func NewWaypointServiceListNoCodeModules2Default(code int) *WaypointServiceListNoCodeModules2Default { + return &WaypointServiceListNoCodeModules2Default{ + _statusCode: code, + } +} + +/* +WaypointServiceListNoCodeModules2Default describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type WaypointServiceListNoCodeModules2Default struct { + _statusCode int + + Payload *cloud.GoogleRPCStatus +} + +// IsSuccess returns true when this waypoint service list no code modules2 default response has a 2xx status code +func (o *WaypointServiceListNoCodeModules2Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this waypoint service list no code modules2 default response has a 3xx status code +func (o *WaypointServiceListNoCodeModules2Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this waypoint service list no code modules2 default response has a 4xx status code +func (o *WaypointServiceListNoCodeModules2Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this waypoint service list no code modules2 default response has a 5xx status code +func (o *WaypointServiceListNoCodeModules2Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this waypoint service list no code modules2 default response a status code equal to that given +func (o *WaypointServiceListNoCodeModules2Default) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the waypoint service list no code modules2 default response +func (o *WaypointServiceListNoCodeModules2Default) Code() int { + return o._statusCode +} + +func (o *WaypointServiceListNoCodeModules2Default) Error() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tfmodules][%d] WaypointService_ListNoCodeModules2 default %+v", o._statusCode, o.Payload) +} + +func (o *WaypointServiceListNoCodeModules2Default) String() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tfmodules][%d] WaypointService_ListNoCodeModules2 default %+v", o._statusCode, o.Payload) +} + +func (o *WaypointServiceListNoCodeModules2Default) GetPayload() *cloud.GoogleRPCStatus { + return o.Payload +} + +func (o *WaypointServiceListNoCodeModules2Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(cloud.GoogleRPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_agent_pools_parameters.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_agent_pools_parameters.go new file mode 100644 index 00000000..4f759cd9 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_agent_pools_parameters.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package waypoint_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewWaypointServiceListTFAgentPoolsParams creates a new WaypointServiceListTFAgentPoolsParams 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 NewWaypointServiceListTFAgentPoolsParams() *WaypointServiceListTFAgentPoolsParams { + return &WaypointServiceListTFAgentPoolsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWaypointServiceListTFAgentPoolsParamsWithTimeout creates a new WaypointServiceListTFAgentPoolsParams object +// with the ability to set a timeout on a request. +func NewWaypointServiceListTFAgentPoolsParamsWithTimeout(timeout time.Duration) *WaypointServiceListTFAgentPoolsParams { + return &WaypointServiceListTFAgentPoolsParams{ + timeout: timeout, + } +} + +// NewWaypointServiceListTFAgentPoolsParamsWithContext creates a new WaypointServiceListTFAgentPoolsParams object +// with the ability to set a context for a request. +func NewWaypointServiceListTFAgentPoolsParamsWithContext(ctx context.Context) *WaypointServiceListTFAgentPoolsParams { + return &WaypointServiceListTFAgentPoolsParams{ + Context: ctx, + } +} + +// NewWaypointServiceListTFAgentPoolsParamsWithHTTPClient creates a new WaypointServiceListTFAgentPoolsParams object +// with the ability to set a custom HTTPClient for a request. +func NewWaypointServiceListTFAgentPoolsParamsWithHTTPClient(client *http.Client) *WaypointServiceListTFAgentPoolsParams { + return &WaypointServiceListTFAgentPoolsParams{ + HTTPClient: client, + } +} + +/* +WaypointServiceListTFAgentPoolsParams contains all the parameters to send to the API endpoint + + for the waypoint service list t f agent pools operation. + + Typically these are written to a http.Request. +*/ +type WaypointServiceListTFAgentPoolsParams struct { + + // NamespaceID. + NamespaceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the waypoint service list t f agent pools params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WaypointServiceListTFAgentPoolsParams) WithDefaults() *WaypointServiceListTFAgentPoolsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the waypoint service list t f agent pools params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WaypointServiceListTFAgentPoolsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the waypoint service list t f agent pools params +func (o *WaypointServiceListTFAgentPoolsParams) WithTimeout(timeout time.Duration) *WaypointServiceListTFAgentPoolsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the waypoint service list t f agent pools params +func (o *WaypointServiceListTFAgentPoolsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the waypoint service list t f agent pools params +func (o *WaypointServiceListTFAgentPoolsParams) WithContext(ctx context.Context) *WaypointServiceListTFAgentPoolsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the waypoint service list t f agent pools params +func (o *WaypointServiceListTFAgentPoolsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the waypoint service list t f agent pools params +func (o *WaypointServiceListTFAgentPoolsParams) WithHTTPClient(client *http.Client) *WaypointServiceListTFAgentPoolsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the waypoint service list t f agent pools params +func (o *WaypointServiceListTFAgentPoolsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespaceID adds the namespaceID to the waypoint service list t f agent pools params +func (o *WaypointServiceListTFAgentPoolsParams) WithNamespaceID(namespaceID string) *WaypointServiceListTFAgentPoolsParams { + o.SetNamespaceID(namespaceID) + return o +} + +// SetNamespaceID adds the namespaceId to the waypoint service list t f agent pools params +func (o *WaypointServiceListTFAgentPoolsParams) SetNamespaceID(namespaceID string) { + o.NamespaceID = namespaceID +} + +// WriteToRequest writes these params to a swagger request +func (o *WaypointServiceListTFAgentPoolsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param namespace.id + if err := r.SetPathParam("namespace.id", o.NamespaceID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_agent_pools_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_agent_pools_responses.go new file mode 100644 index 00000000..6a406bc6 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_agent_pools_responses.go @@ -0,0 +1,183 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package waypoint_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + cloud "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models" + "github.com/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2023-08-18/models" +) + +// WaypointServiceListTFAgentPoolsReader is a Reader for the WaypointServiceListTFAgentPools structure. +type WaypointServiceListTFAgentPoolsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WaypointServiceListTFAgentPoolsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWaypointServiceListTFAgentPoolsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewWaypointServiceListTFAgentPoolsDefault(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 + } +} + +// NewWaypointServiceListTFAgentPoolsOK creates a WaypointServiceListTFAgentPoolsOK with default headers values +func NewWaypointServiceListTFAgentPoolsOK() *WaypointServiceListTFAgentPoolsOK { + return &WaypointServiceListTFAgentPoolsOK{} +} + +/* +WaypointServiceListTFAgentPoolsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type WaypointServiceListTFAgentPoolsOK struct { + Payload *models.HashicorpCloudWaypointListTFAgentPoolsResponse +} + +// IsSuccess returns true when this waypoint service list t f agent pools o k response has a 2xx status code +func (o *WaypointServiceListTFAgentPoolsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this waypoint service list t f agent pools o k response has a 3xx status code +func (o *WaypointServiceListTFAgentPoolsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this waypoint service list t f agent pools o k response has a 4xx status code +func (o *WaypointServiceListTFAgentPoolsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this waypoint service list t f agent pools o k response has a 5xx status code +func (o *WaypointServiceListTFAgentPoolsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this waypoint service list t f agent pools o k response a status code equal to that given +func (o *WaypointServiceListTFAgentPoolsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the waypoint service list t f agent pools o k response +func (o *WaypointServiceListTFAgentPoolsOK) Code() int { + return 200 +} + +func (o *WaypointServiceListTFAgentPoolsOK) Error() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tf-agent-pools][%d] waypointServiceListTFAgentPoolsOK %+v", 200, o.Payload) +} + +func (o *WaypointServiceListTFAgentPoolsOK) String() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tf-agent-pools][%d] waypointServiceListTFAgentPoolsOK %+v", 200, o.Payload) +} + +func (o *WaypointServiceListTFAgentPoolsOK) GetPayload() *models.HashicorpCloudWaypointListTFAgentPoolsResponse { + return o.Payload +} + +func (o *WaypointServiceListTFAgentPoolsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.HashicorpCloudWaypointListTFAgentPoolsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWaypointServiceListTFAgentPoolsDefault creates a WaypointServiceListTFAgentPoolsDefault with default headers values +func NewWaypointServiceListTFAgentPoolsDefault(code int) *WaypointServiceListTFAgentPoolsDefault { + return &WaypointServiceListTFAgentPoolsDefault{ + _statusCode: code, + } +} + +/* +WaypointServiceListTFAgentPoolsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type WaypointServiceListTFAgentPoolsDefault struct { + _statusCode int + + Payload *cloud.GoogleRPCStatus +} + +// IsSuccess returns true when this waypoint service list t f agent pools default response has a 2xx status code +func (o *WaypointServiceListTFAgentPoolsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this waypoint service list t f agent pools default response has a 3xx status code +func (o *WaypointServiceListTFAgentPoolsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this waypoint service list t f agent pools default response has a 4xx status code +func (o *WaypointServiceListTFAgentPoolsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this waypoint service list t f agent pools default response has a 5xx status code +func (o *WaypointServiceListTFAgentPoolsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this waypoint service list t f agent pools default response a status code equal to that given +func (o *WaypointServiceListTFAgentPoolsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the waypoint service list t f agent pools default response +func (o *WaypointServiceListTFAgentPoolsDefault) Code() int { + return o._statusCode +} + +func (o *WaypointServiceListTFAgentPoolsDefault) Error() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tf-agent-pools][%d] WaypointService_ListTFAgentPools default %+v", o._statusCode, o.Payload) +} + +func (o *WaypointServiceListTFAgentPoolsDefault) String() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tf-agent-pools][%d] WaypointService_ListTFAgentPools default %+v", o._statusCode, o.Payload) +} + +func (o *WaypointServiceListTFAgentPoolsDefault) GetPayload() *cloud.GoogleRPCStatus { + return o.Payload +} + +func (o *WaypointServiceListTFAgentPoolsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(cloud.GoogleRPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_add_on.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_add_on.go index ffcce37a..3876f6a6 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_add_on.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_add_on.go @@ -31,7 +31,7 @@ type HashicorpCloudWaypointAddOn struct { // Format: date-time CreatedAt strfmt.DateTime `json:"created_at,omitempty"` - // created_by indicates what created the Add-on + // DEPRECATED: Do not use. CreatedBy string `json:"created_by,omitempty"` // The Add-on definition from which this Add-on was created @@ -74,9 +74,6 @@ type HashicorpCloudWaypointAddOn struct { // kv tags Tags []*HashicorpCloudWaypointTag `json:"tags"` - // DEPRECATED: Do not use. - TerraformNocodeModule *HashicorpCloudWaypointTerraformNocodeModule `json:"terraform_nocode_module,omitempty"` - // Terraform workspace ID // Read Only: true TerraformWorkspaceID string `json:"terraform_workspace_id,omitempty"` @@ -110,10 +107,6 @@ func (m *HashicorpCloudWaypointAddOn) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateTerraformNocodeModule(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -241,25 +234,6 @@ func (m *HashicorpCloudWaypointAddOn) validateTags(formats strfmt.Registry) erro return nil } -func (m *HashicorpCloudWaypointAddOn) validateTerraformNocodeModule(formats strfmt.Registry) error { - if swag.IsZero(m.TerraformNocodeModule) { // not required - return nil - } - - if m.TerraformNocodeModule != nil { - if err := m.TerraformNocodeModule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_nocode_module") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_nocode_module") - } - return err - } - } - - return nil -} - // ContextValidate validate this hashicorp cloud waypoint add on based on the context it is used func (m *HashicorpCloudWaypointAddOn) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -284,10 +258,6 @@ func (m *HashicorpCloudWaypointAddOn) ContextValidate(ctx context.Context, forma res = append(res, err) } - if err := m.contextValidateTerraformNocodeModule(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateTerraformWorkspaceID(ctx, formats); err != nil { res = append(res, err) } @@ -411,27 +381,6 @@ func (m *HashicorpCloudWaypointAddOn) contextValidateTags(ctx context.Context, f return nil } -func (m *HashicorpCloudWaypointAddOn) contextValidateTerraformNocodeModule(ctx context.Context, formats strfmt.Registry) error { - - if m.TerraformNocodeModule != nil { - - if swag.IsZero(m.TerraformNocodeModule) { // not required - return nil - } - - if err := m.TerraformNocodeModule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_nocode_module") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_nocode_module") - } - return err - } - } - - return nil -} - func (m *HashicorpCloudWaypointAddOn) contextValidateTerraformWorkspaceID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "terraform_workspace_id", "body", string(m.TerraformWorkspaceID)); err != nil { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_add_on_definition.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_add_on_definition.go index df4f7dbb..1e01a869 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_add_on_definition.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_add_on_definition.go @@ -24,11 +24,16 @@ type HashicorpCloudWaypointAddOnDefinition struct { Description string `json:"description,omitempty"` // Unique identifier of the Add-on definition + // Read Only: true ID string `json:"id,omitempty"` // A list of descriptive labels for an Add-on Labels []string `json:"labels"` + // module_id is the ID of the template's Terraform module. Clients are + // expected to set this field when creating a new application template. + ModuleID string `json:"module_id,omitempty"` + // module_source is where to find the source code for the desired child module. ModuleSource string `json:"module_source,omitempty"` @@ -53,9 +58,6 @@ type HashicorpCloudWaypointAddOnDefinition struct { // The TF project TerraformCloudWorkspaceDetails *HashicorpCloudWaypointTerraformCloudWorkspaceDetails `json:"terraform_cloud_workspace_details,omitempty"` - // DEPRECATED: Do not use. - TerraformNocodeModule *HashicorpCloudWaypointTerraformNocodeModule `json:"terraform_nocode_module,omitempty"` - // tf_agent_pool_id is the ID of the agent pool to use for the Terraform // workspace if 'agent' is used for 'tf_execution_mode'. TfAgentPoolID string `json:"tf_agent_pool_id,omitempty"` @@ -87,10 +89,6 @@ func (m *HashicorpCloudWaypointAddOnDefinition) Validate(formats strfmt.Registry res = append(res, err) } - if err := m.validateTerraformNocodeModule(formats); err != nil { - res = append(res, err) - } - if err := m.validateVariableOptions(formats); err != nil { res = append(res, err) } @@ -146,25 +144,6 @@ func (m *HashicorpCloudWaypointAddOnDefinition) validateTerraformCloudWorkspaceD return nil } -func (m *HashicorpCloudWaypointAddOnDefinition) validateTerraformNocodeModule(formats strfmt.Registry) error { - if swag.IsZero(m.TerraformNocodeModule) { // not required - return nil - } - - if m.TerraformNocodeModule != nil { - if err := m.TerraformNocodeModule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_nocode_module") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_nocode_module") - } - return err - } - } - - return nil -} - func (m *HashicorpCloudWaypointAddOnDefinition) validateVariableOptions(formats strfmt.Registry) error { if swag.IsZero(m.VariableOptions) { // not required return nil @@ -195,15 +174,15 @@ func (m *HashicorpCloudWaypointAddOnDefinition) validateVariableOptions(formats func (m *HashicorpCloudWaypointAddOnDefinition) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateTags(ctx, formats); err != nil { + if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateTerraformCloudWorkspaceDetails(ctx, formats); err != nil { + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateTerraformNocodeModule(ctx, formats); err != nil { + if err := m.contextValidateTerraformCloudWorkspaceDetails(ctx, formats); err != nil { res = append(res, err) } @@ -221,6 +200,15 @@ func (m *HashicorpCloudWaypointAddOnDefinition) ContextValidate(ctx context.Cont return nil } +func (m *HashicorpCloudWaypointAddOnDefinition) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", string(m.ID)); err != nil { + return err + } + + return nil +} + func (m *HashicorpCloudWaypointAddOnDefinition) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -267,27 +255,6 @@ func (m *HashicorpCloudWaypointAddOnDefinition) contextValidateTerraformCloudWor return nil } -func (m *HashicorpCloudWaypointAddOnDefinition) contextValidateTerraformNocodeModule(ctx context.Context, formats strfmt.Registry) error { - - if m.TerraformNocodeModule != nil { - - if swag.IsZero(m.TerraformNocodeModule) { // not required - return nil - } - - if err := m.TerraformNocodeModule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_nocode_module") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_nocode_module") - } - return err - } - } - - return nil -} - func (m *HashicorpCloudWaypointAddOnDefinition) contextValidateVariableOptions(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.VariableOptions); i++ { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_application_template.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_application_template.go index 5223a9f9..69798681 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_application_template.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_application_template.go @@ -34,8 +34,8 @@ type HashicorpCloudWaypointApplicationTemplate struct { // A list of descriptive strings that can be applied to the ApplicationTemplate. Labels []string `json:"labels"` - // module_id is the ID of the template's Terraform module. - // Read Only: true + // module_id is the ID of the template's Terraform module. Clients are + // expected to set this field when creating a new application template. ModuleID string `json:"module_id,omitempty"` // module_source is where to find the source code for the desired child module. @@ -74,9 +74,6 @@ type HashicorpCloudWaypointApplicationTemplate struct { // created when this project was created from a template. TerraformCloudWorkspaceDetails *HashicorpCloudWaypointTerraformCloudWorkspaceDetails `json:"terraform_cloud_workspace_details,omitempty"` - // DEPRECATED: Do not use. - TerraformNocodeModule *HashicorpCloudWaypointTerraformNocodeModule `json:"terraform_nocode_module,omitempty"` - // tf_agent_pool_id is the ID of the agent pool to use for the Terraform // workspace if 'agent' is used for 'tf_execution_mode'. TfAgentPoolID string `json:"tf_agent_pool_id,omitempty"` @@ -112,10 +109,6 @@ func (m *HashicorpCloudWaypointApplicationTemplate) Validate(formats strfmt.Regi res = append(res, err) } - if err := m.validateTerraformNocodeModule(formats); err != nil { - res = append(res, err) - } - if err := m.validateVariableOptions(formats); err != nil { res = append(res, err) } @@ -197,25 +190,6 @@ func (m *HashicorpCloudWaypointApplicationTemplate) validateTerraformCloudWorksp return nil } -func (m *HashicorpCloudWaypointApplicationTemplate) validateTerraformNocodeModule(formats strfmt.Registry) error { - if swag.IsZero(m.TerraformNocodeModule) { // not required - return nil - } - - if m.TerraformNocodeModule != nil { - if err := m.TerraformNocodeModule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_nocode_module") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_nocode_module") - } - return err - } - } - - return nil -} - func (m *HashicorpCloudWaypointApplicationTemplate) validateVariableOptions(formats strfmt.Registry) error { if swag.IsZero(m.VariableOptions) { // not required return nil @@ -250,10 +224,6 @@ func (m *HashicorpCloudWaypointApplicationTemplate) ContextValidate(ctx context. res = append(res, err) } - if err := m.contextValidateModuleID(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -262,10 +232,6 @@ func (m *HashicorpCloudWaypointApplicationTemplate) ContextValidate(ctx context. res = append(res, err) } - if err := m.contextValidateTerraformNocodeModule(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateVariableOptions(ctx, formats); err != nil { res = append(res, err) } @@ -305,15 +271,6 @@ func (m *HashicorpCloudWaypointApplicationTemplate) contextValidateActionCfgRefs return nil } -func (m *HashicorpCloudWaypointApplicationTemplate) contextValidateModuleID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "module_id", "body", string(m.ModuleID)); err != nil { - return err - } - - return nil -} - func (m *HashicorpCloudWaypointApplicationTemplate) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -360,27 +317,6 @@ func (m *HashicorpCloudWaypointApplicationTemplate) contextValidateTerraformClou return nil } -func (m *HashicorpCloudWaypointApplicationTemplate) contextValidateTerraformNocodeModule(ctx context.Context, formats strfmt.Registry) error { - - if m.TerraformNocodeModule != nil { - - if swag.IsZero(m.TerraformNocodeModule) { // not required - return nil - } - - if err := m.TerraformNocodeModule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_nocode_module") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_nocode_module") - } - return err - } - } - - return nil -} - func (m *HashicorpCloudWaypointApplicationTemplate) contextValidateVariableOptions(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.VariableOptions); i++ { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_check_t_f_c_organization_response.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_check_t_f_c_organization_response.go index 75fdb157..31305626 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_check_t_f_c_organization_response.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_check_t_f_c_organization_response.go @@ -17,11 +17,17 @@ import ( // swagger:model hashicorp.cloud.waypoint.CheckTFCOrganizationResponse type HashicorpCloudWaypointCheckTFCOrganizationResponse struct { + // True if the TFC org has the WaypointActions entitlement + HasActions bool `json:"has_actions,omitempty"` + + // True if the TFC org has the WaypointTemplatesAndAddons entitlement + HasTemplatesAndAddons bool `json:"has_templates_and_addons,omitempty"` + // is_valid is true if the organization is valid. IsValid bool `json:"is_valid,omitempty"` - // permissions is a list of permissions the token has on the organization - // according to TFC. + // DEPRECATED: permissions is a list of permissions the token has on the + // organization according to TFC. Permissions []string `json:"permissions"` } diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_t_f_agent_pools_response.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_t_f_agent_pools_response.go new file mode 100644 index 00000000..a66285b1 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_t_f_agent_pools_response.go @@ -0,0 +1,123 @@ +// 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" +) + +// HashicorpCloudWaypointListTFAgentPoolsResponse ListTFAgentPoolsResponse is the response containing the id & name of the +// agent pools for a Terraform organization +// +// swagger:model hashicorp.cloud.waypoint.ListTFAgentPoolsResponse +type HashicorpCloudWaypointListTFAgentPoolsResponse struct { + + // agent_pools are the agent pools for a Terraform organization + // https://developer.hashicorp.com/terraform/cloud-docs/agents/agent-pools + AgentPools []*HashicorpCloudWaypointTFAgentPool `json:"agent_pools"` +} + +// Validate validates this hashicorp cloud waypoint list t f agent pools response +func (m *HashicorpCloudWaypointListTFAgentPoolsResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAgentPools(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *HashicorpCloudWaypointListTFAgentPoolsResponse) validateAgentPools(formats strfmt.Registry) error { + if swag.IsZero(m.AgentPools) { // not required + return nil + } + + for i := 0; i < len(m.AgentPools); i++ { + if swag.IsZero(m.AgentPools[i]) { // not required + continue + } + + if m.AgentPools[i] != nil { + if err := m.AgentPools[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("agent_pools" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("agent_pools" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this hashicorp cloud waypoint list t f agent pools response based on the context it is used +func (m *HashicorpCloudWaypointListTFAgentPoolsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAgentPools(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *HashicorpCloudWaypointListTFAgentPoolsResponse) contextValidateAgentPools(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.AgentPools); i++ { + + if m.AgentPools[i] != nil { + + if swag.IsZero(m.AgentPools[i]) { // not required + return nil + } + + if err := m.AgentPools[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("agent_pools" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("agent_pools" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *HashicorpCloudWaypointListTFAgentPoolsResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *HashicorpCloudWaypointListTFAgentPoolsResponse) UnmarshalBinary(b []byte) error { + var res HashicorpCloudWaypointListTFAgentPoolsResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_no_code_module_definition.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_no_code_module_definition.go index 405f4c8c..21cdbdb2 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_no_code_module_definition.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_no_code_module_definition.go @@ -19,21 +19,38 @@ import ( // swagger:model hashicorp.cloud.waypoint.NoCodeModuleDefinition type HashicorpCloudWaypointNoCodeModuleDefinition struct { + // created is the date the module was created + // // date created // Format: date-time Created strfmt.DateTime `json:"created,omitempty"` - // last updated + // last_updated is the date the module was last updated // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` - // name + // module_id is the ID of the no-code module. + ModuleID string `json:"module_id,omitempty"` + + // name is the name of the no-code module. Name string `json:"name,omitempty"` + // pinned_version is the version of the module that is pinned for use in no-code. + PinnedVersion string `json:"pinned_version,omitempty"` + + // provider is the Terraform provider for the no-code module. + // // ex: AWS Provider string `json:"provider,omitempty"` - // versions + // registry_name is the name of the Terraform registry where the module is + // hosted. This is one of "public" or "private". + RegistryName string `json:"registry_name,omitempty"` + + // tf_namespace is the name of the Terraform organization that owns the module + TfNamespace string `json:"tf_namespace,omitempty"` + + // DEPRECATED: Do not use. Versions []string `json:"versions"` } diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_t_f_agent_pool.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_t_f_agent_pool.go new file mode 100644 index 00000000..b2a5fa50 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_t_f_agent_pool.go @@ -0,0 +1,89 @@ +// 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" +) + +// HashicorpCloudWaypointTFAgentPool TFAgentPool represents an HCP Terraform agent pool +// https://developer.hashicorp.com/terraform/cloud-docs/agents/agent-pools +// +// swagger:model hashicorp.cloud.waypoint.TFAgentPool +type HashicorpCloudWaypointTFAgentPool struct { + + // id is the id of the agent pool + // Read Only: true + ID string `json:"id,omitempty"` + + // name is the name of the agent pool + // Read Only: true + Name string `json:"name,omitempty"` +} + +// Validate validates this hashicorp cloud waypoint t f agent pool +func (m *HashicorpCloudWaypointTFAgentPool) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validate this hashicorp cloud waypoint t f agent pool based on the context it is used +func (m *HashicorpCloudWaypointTFAgentPool) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *HashicorpCloudWaypointTFAgentPool) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", string(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *HashicorpCloudWaypointTFAgentPool) contextValidateName(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "name", "body", string(m.Name)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *HashicorpCloudWaypointTFAgentPool) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *HashicorpCloudWaypointTFAgentPool) UnmarshalBinary(b []byte) error { + var res HashicorpCloudWaypointTFAgentPool + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_t_f_module_variable.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_t_f_module_variable.go index 884ab745..d83c75d2 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_t_f_module_variable.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_t_f_module_variable.go @@ -8,8 +8,10 @@ package models import ( "context" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // HashicorpCloudWaypointTFModuleVariable TFModuleVariable represents a Terraform module variable. @@ -34,6 +36,8 @@ type HashicorpCloudWaypointTFModuleVariable struct { // variable_type is the type of Terraform variable. See the documentation for more info: // https://developer.hashicorp.com/terraform/language/expressions/types + // The API client should not set this field. + // Read Only: true VariableType string `json:"variable_type,omitempty"` } @@ -42,8 +46,26 @@ func (m *HashicorpCloudWaypointTFModuleVariable) Validate(formats strfmt.Registr return nil } -// ContextValidate validates this hashicorp cloud waypoint t f module variable based on context it is used +// ContextValidate validate this hashicorp cloud waypoint t f module variable based on the context it is used func (m *HashicorpCloudWaypointTFModuleVariable) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateVariableType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *HashicorpCloudWaypointTFModuleVariable) contextValidateVariableType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "variable_type", "body", string(m.VariableType)); err != nil { + return err + } + return nil } diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_terraform_nocode_module.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_terraform_nocode_module.go deleted file mode 100644 index 843221a9..00000000 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_terraform_nocode_module.go +++ /dev/null @@ -1,56 +0,0 @@ -// 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" -) - -// HashicorpCloudWaypointTerraformNocodeModule DEPRECATED -// -// swagger:model hashicorp.cloud.waypoint.TerraformNocodeModule -type HashicorpCloudWaypointTerraformNocodeModule struct { - - // DEPRECATED: Do not use. - ModuleID string `json:"module_id,omitempty"` - - // DEPRECATED: Use module_source instead. - Source string `json:"source,omitempty"` - - // DEPRECATED: Do not use. - Version string `json:"version,omitempty"` -} - -// Validate validates this hashicorp cloud waypoint terraform nocode module -func (m *HashicorpCloudWaypointTerraformNocodeModule) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hashicorp cloud waypoint terraform nocode module based on context it is used -func (m *HashicorpCloudWaypointTerraformNocodeModule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HashicorpCloudWaypointTerraformNocodeModule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HashicorpCloudWaypointTerraformNocodeModule) UnmarshalBinary(b []byte) error { - var res HashicorpCloudWaypointTerraformNocodeModule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_ui_load_product_banner_response.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_ui_load_product_banner_response.go index 9c986d4b..7d3f2694 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_ui_load_product_banner_response.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_ui_load_product_banner_response.go @@ -17,6 +17,12 @@ import ( // swagger:model hashicorp.cloud.waypoint.UI.LoadProductBannerResponse type HashicorpCloudWaypointUILoadProductBannerResponse struct { + // has actions + HasActions bool `json:"has_actions,omitempty"` + + // has templates and addons + HasTemplatesAndAddons bool `json:"has_templates_and_addons,omitempty"` + // product has activated ProductHasActivated bool `json:"product_has_activated,omitempty"` diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_waypoint_service_create_add_on_definition_body.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_waypoint_service_create_add_on_definition_body.go index d7a29f21..18f57640 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_waypoint_service_create_add_on_definition_body.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_waypoint_service_create_add_on_definition_body.go @@ -20,49 +20,45 @@ import ( // swagger:model hashicorp.cloud.waypoint.WaypointService.CreateAddOnDefinitionBody type HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody struct { - // Longer description of the Add-on + // Add-on definition to be created + AddOnDefinition *HashicorpCloudWaypointAddOnDefinition `json:"add_on_definition,omitempty"` + + // DEPRECATED: Use add_on_definition instead. Description string `json:"description,omitempty"` - // A list of descriptive labels for an Add-on + // DEPRECATED: Use add_on_definition instead. Labels []string `json:"labels"` - // module_source is where to find the source code for the desired child module. + // DEPRECATED: Use add_on_definition instead. ModuleSource string `json:"module_source,omitempty"` - // Name of the Add-on definition + // DEPRECATED: Use add_on_definition instead. Name string `json:"name,omitempty"` // Global references the entire server. This is used in some APIs // as a way to read/write values that are server-global. Namespace interface{} `json:"namespace,omitempty"` - // A templated README describing the Add-on + // DEPRECATED: Use add_on_definition instead. // Format: byte ReadmeMarkdownTemplate strfmt.Base64 `json:"readme_markdown_template,omitempty"` - // readme_template is markdown formatted instructions on how to operate the application. - // This may be populated from a application template. - // This field is favored over readme_markdown_template and support for both is transitional. + // DEPRECATED: Use add_on_definition instead. ReadmeTemplate string `json:"readme_template,omitempty"` - // Short description of the Add-on + // DEPRECATED: Use add_on_definition instead. Summary string `json:"summary,omitempty"` - // The TF project + // DEPRECATED: Use add_on_definition instead. TerraformCloudWorkspaceDetails *HashicorpCloudWaypointTerraformCloudWorkspaceDetails `json:"terraform_cloud_workspace_details,omitempty"` - // DEPRECATED: Do not use. - TerraformNocodeModule *HashicorpCloudWaypointTerraformNocodeModule `json:"terraform_nocode_module,omitempty"` - - // tf_agent_pool_id is the ID of the agent pool to use for the Terraform - // workspace if 'agent' is used for 'tf_execution_mode'. + // DEPRECATED: Use add_on_definition instead. TfAgentPoolID string `json:"tf_agent_pool_id,omitempty"` - // tf_execution_mode is the mode in which the Terraform backed workspace should - // operate in. Defaults to 'remote'. + // DEPRECATED: Use add_on_definition instead. TfExecutionMode string `json:"tf_execution_mode,omitempty"` - // variable_options is the collection of input variables which may be set for an add-on. + // DEPRECATED: Use add_on_definition instead. VariableOptions []*HashicorpCloudWaypointTFModuleVariable `json:"variable_options"` } @@ -70,11 +66,11 @@ type HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody struct { func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateTerraformCloudWorkspaceDetails(formats); err != nil { + if err := m.validateAddOnDefinition(formats); err != nil { res = append(res, err) } - if err := m.validateTerraformNocodeModule(formats); err != nil { + if err := m.validateTerraformCloudWorkspaceDetails(formats); err != nil { res = append(res, err) } @@ -88,17 +84,17 @@ func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) Validat return nil } -func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) validateTerraformCloudWorkspaceDetails(formats strfmt.Registry) error { - if swag.IsZero(m.TerraformCloudWorkspaceDetails) { // not required +func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) validateAddOnDefinition(formats strfmt.Registry) error { + if swag.IsZero(m.AddOnDefinition) { // not required return nil } - if m.TerraformCloudWorkspaceDetails != nil { - if err := m.TerraformCloudWorkspaceDetails.Validate(formats); err != nil { + if m.AddOnDefinition != nil { + if err := m.AddOnDefinition.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_cloud_workspace_details") + return ve.ValidateName("add_on_definition") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_cloud_workspace_details") + return ce.ValidateName("add_on_definition") } return err } @@ -107,17 +103,17 @@ func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) validat return nil } -func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) validateTerraformNocodeModule(formats strfmt.Registry) error { - if swag.IsZero(m.TerraformNocodeModule) { // not required +func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) validateTerraformCloudWorkspaceDetails(formats strfmt.Registry) error { + if swag.IsZero(m.TerraformCloudWorkspaceDetails) { // not required return nil } - if m.TerraformNocodeModule != nil { - if err := m.TerraformNocodeModule.Validate(formats); err != nil { + if m.TerraformCloudWorkspaceDetails != nil { + if err := m.TerraformCloudWorkspaceDetails.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_nocode_module") + return ve.ValidateName("terraform_cloud_workspace_details") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_nocode_module") + return ce.ValidateName("terraform_cloud_workspace_details") } return err } @@ -156,11 +152,11 @@ func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) validat func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateTerraformCloudWorkspaceDetails(ctx, formats); err != nil { + if err := m.contextValidateAddOnDefinition(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateTerraformNocodeModule(ctx, formats); err != nil { + if err := m.contextValidateTerraformCloudWorkspaceDetails(ctx, formats); err != nil { res = append(res, err) } @@ -174,19 +170,19 @@ func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) Context return nil } -func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) contextValidateTerraformCloudWorkspaceDetails(ctx context.Context, formats strfmt.Registry) error { +func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) contextValidateAddOnDefinition(ctx context.Context, formats strfmt.Registry) error { - if m.TerraformCloudWorkspaceDetails != nil { + if m.AddOnDefinition != nil { - if swag.IsZero(m.TerraformCloudWorkspaceDetails) { // not required + if swag.IsZero(m.AddOnDefinition) { // not required return nil } - if err := m.TerraformCloudWorkspaceDetails.ContextValidate(ctx, formats); err != nil { + if err := m.AddOnDefinition.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_cloud_workspace_details") + return ve.ValidateName("add_on_definition") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_cloud_workspace_details") + return ce.ValidateName("add_on_definition") } return err } @@ -195,19 +191,19 @@ func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) context return nil } -func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) contextValidateTerraformNocodeModule(ctx context.Context, formats strfmt.Registry) error { +func (m *HashicorpCloudWaypointWaypointServiceCreateAddOnDefinitionBody) contextValidateTerraformCloudWorkspaceDetails(ctx context.Context, formats strfmt.Registry) error { - if m.TerraformNocodeModule != nil { + if m.TerraformCloudWorkspaceDetails != nil { - if swag.IsZero(m.TerraformNocodeModule) { // not required + if swag.IsZero(m.TerraformCloudWorkspaceDetails) { // not required return nil } - if err := m.TerraformNocodeModule.ContextValidate(ctx, formats); err != nil { + if err := m.TerraformCloudWorkspaceDetails.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_nocode_module") + return ve.ValidateName("terraform_cloud_workspace_details") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_nocode_module") + return ce.ValidateName("terraform_cloud_workspace_details") } return err } diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_waypoint_service_update_add_on_definition_body.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_waypoint_service_update_add_on_definition_body.go index 2aabd339..958b9a17 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_waypoint_service_update_add_on_definition_body.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_waypoint_service_update_add_on_definition_body.go @@ -20,52 +20,48 @@ import ( // swagger:model hashicorp.cloud.waypoint.WaypointService.UpdateAddOnDefinitionBody type HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody struct { - // Longer description of the Add-on + // Add-on definition to be updated + AddOnDefinition *HashicorpCloudWaypointAddOnDefinition `json:"add_on_definition,omitempty"` + + // DEPRECATED: Use add_on_definition instead. Description string `json:"description,omitempty"` // existing add on definition ExistingAddOnDefinition *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBodyExistingAddOnDefinition `json:"existing_add_on_definition,omitempty"` - // A list of descriptive labels for an Add-on + // DEPRECATED: Use add_on_definition instead. Labels []string `json:"labels"` - // module_source is where to find the source code for the desired child module. + // DEPRECATED: Use add_on_definition instead. ModuleSource string `json:"module_source,omitempty"` - // Name of the Add-on definition + // DEPRECATED: Use add_on_definition instead. Name string `json:"name,omitempty"` // Global references the entire server. This is used in some APIs // as a way to read/write values that are server-global. Namespace interface{} `json:"namespace,omitempty"` - // A templated README describing the Add-on + // DEPRECATED: Use add_on_definition instead. // Format: byte ReadmeMarkdownTemplate strfmt.Base64 `json:"readme_markdown_template,omitempty"` - // readme_template is markdown formatted instructions on how to operate the application. - // This may be populated from a application template. - // This field is favored over readme_markdown_template and support for both is transitional. + // DEPRECATED: Use add_on_definition instead. ReadmeTemplate string `json:"readme_template,omitempty"` - // Short description of the Add-on + // DEPRECATED: Use add_on_definition instead. Summary string `json:"summary,omitempty"` - // The TF project + // DEPRECATED: Use add_on_definition instead. TerraformCloudWorkspaceDetails *HashicorpCloudWaypointTerraformCloudWorkspaceDetails `json:"terraform_cloud_workspace_details,omitempty"` - // DEPRECATED: Do not use. - TerraformNocodeModule *HashicorpCloudWaypointTerraformNocodeModule `json:"terraform_nocode_module,omitempty"` - - // tf_agent_pool_id is the ID of the agent pool to use for the Terraform - // workspace if 'agent' is used for 'tf_execution_mode'. + // DEPRECATED: Use add_on_definition instead. TfAgentPoolID string `json:"tf_agent_pool_id,omitempty"` - // tf_execution_mode is the mode in which the Terraform backed workspace should - // operate in. Defaults to 'remote'. + // DEPRECATED: Use add_on_definition instead. TfExecutionMode string `json:"tf_execution_mode,omitempty"` - // variable_options is the collection of input variables which may be set for a template. + // DEPRECATED: Use add_on_definition instead. VariableOptions []*HashicorpCloudWaypointTFModuleVariable `json:"variable_options"` } @@ -73,15 +69,15 @@ type HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody struct { func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateExistingAddOnDefinition(formats); err != nil { + if err := m.validateAddOnDefinition(formats); err != nil { res = append(res, err) } - if err := m.validateTerraformCloudWorkspaceDetails(formats); err != nil { + if err := m.validateExistingAddOnDefinition(formats); err != nil { res = append(res, err) } - if err := m.validateTerraformNocodeModule(formats); err != nil { + if err := m.validateTerraformCloudWorkspaceDetails(formats); err != nil { res = append(res, err) } @@ -95,17 +91,17 @@ func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) Validat return nil } -func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) validateExistingAddOnDefinition(formats strfmt.Registry) error { - if swag.IsZero(m.ExistingAddOnDefinition) { // not required +func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) validateAddOnDefinition(formats strfmt.Registry) error { + if swag.IsZero(m.AddOnDefinition) { // not required return nil } - if m.ExistingAddOnDefinition != nil { - if err := m.ExistingAddOnDefinition.Validate(formats); err != nil { + if m.AddOnDefinition != nil { + if err := m.AddOnDefinition.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("existing_add_on_definition") + return ve.ValidateName("add_on_definition") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("existing_add_on_definition") + return ce.ValidateName("add_on_definition") } return err } @@ -114,17 +110,17 @@ func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) validat return nil } -func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) validateTerraformCloudWorkspaceDetails(formats strfmt.Registry) error { - if swag.IsZero(m.TerraformCloudWorkspaceDetails) { // not required +func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) validateExistingAddOnDefinition(formats strfmt.Registry) error { + if swag.IsZero(m.ExistingAddOnDefinition) { // not required return nil } - if m.TerraformCloudWorkspaceDetails != nil { - if err := m.TerraformCloudWorkspaceDetails.Validate(formats); err != nil { + if m.ExistingAddOnDefinition != nil { + if err := m.ExistingAddOnDefinition.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_cloud_workspace_details") + return ve.ValidateName("existing_add_on_definition") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_cloud_workspace_details") + return ce.ValidateName("existing_add_on_definition") } return err } @@ -133,17 +129,17 @@ func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) validat return nil } -func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) validateTerraformNocodeModule(formats strfmt.Registry) error { - if swag.IsZero(m.TerraformNocodeModule) { // not required +func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) validateTerraformCloudWorkspaceDetails(formats strfmt.Registry) error { + if swag.IsZero(m.TerraformCloudWorkspaceDetails) { // not required return nil } - if m.TerraformNocodeModule != nil { - if err := m.TerraformNocodeModule.Validate(formats); err != nil { + if m.TerraformCloudWorkspaceDetails != nil { + if err := m.TerraformCloudWorkspaceDetails.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_nocode_module") + return ve.ValidateName("terraform_cloud_workspace_details") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_nocode_module") + return ce.ValidateName("terraform_cloud_workspace_details") } return err } @@ -182,15 +178,15 @@ func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) validat func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateExistingAddOnDefinition(ctx, formats); err != nil { + if err := m.contextValidateAddOnDefinition(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateTerraformCloudWorkspaceDetails(ctx, formats); err != nil { + if err := m.contextValidateExistingAddOnDefinition(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateTerraformNocodeModule(ctx, formats); err != nil { + if err := m.contextValidateTerraformCloudWorkspaceDetails(ctx, formats); err != nil { res = append(res, err) } @@ -204,19 +200,19 @@ func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) Context return nil } -func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) contextValidateExistingAddOnDefinition(ctx context.Context, formats strfmt.Registry) error { +func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) contextValidateAddOnDefinition(ctx context.Context, formats strfmt.Registry) error { - if m.ExistingAddOnDefinition != nil { + if m.AddOnDefinition != nil { - if swag.IsZero(m.ExistingAddOnDefinition) { // not required + if swag.IsZero(m.AddOnDefinition) { // not required return nil } - if err := m.ExistingAddOnDefinition.ContextValidate(ctx, formats); err != nil { + if err := m.AddOnDefinition.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("existing_add_on_definition") + return ve.ValidateName("add_on_definition") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("existing_add_on_definition") + return ce.ValidateName("add_on_definition") } return err } @@ -225,19 +221,19 @@ func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) context return nil } -func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) contextValidateTerraformCloudWorkspaceDetails(ctx context.Context, formats strfmt.Registry) error { +func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) contextValidateExistingAddOnDefinition(ctx context.Context, formats strfmt.Registry) error { - if m.TerraformCloudWorkspaceDetails != nil { + if m.ExistingAddOnDefinition != nil { - if swag.IsZero(m.TerraformCloudWorkspaceDetails) { // not required + if swag.IsZero(m.ExistingAddOnDefinition) { // not required return nil } - if err := m.TerraformCloudWorkspaceDetails.ContextValidate(ctx, formats); err != nil { + if err := m.ExistingAddOnDefinition.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_cloud_workspace_details") + return ve.ValidateName("existing_add_on_definition") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_cloud_workspace_details") + return ce.ValidateName("existing_add_on_definition") } return err } @@ -246,19 +242,19 @@ func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) context return nil } -func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) contextValidateTerraformNocodeModule(ctx context.Context, formats strfmt.Registry) error { +func (m *HashicorpCloudWaypointWaypointServiceUpdateAddOnDefinitionBody) contextValidateTerraformCloudWorkspaceDetails(ctx context.Context, formats strfmt.Registry) error { - if m.TerraformNocodeModule != nil { + if m.TerraformCloudWorkspaceDetails != nil { - if swag.IsZero(m.TerraformNocodeModule) { // not required + if swag.IsZero(m.TerraformCloudWorkspaceDetails) { // not required return nil } - if err := m.TerraformNocodeModule.ContextValidate(ctx, formats); err != nil { + if err := m.TerraformCloudWorkspaceDetails.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("terraform_nocode_module") + return ve.ValidateName("terraform_cloud_workspace_details") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("terraform_nocode_module") + return ce.ValidateName("terraform_cloud_workspace_details") } return err }