diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_client.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_client.go index 873c5a36..4fbda6b7 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_client.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_client.go @@ -58,7 +58,7 @@ func (a *Client) ActionCreateActionConfig(params *ActionCreateActionConfigParams op := &runtime.ClientOperation{ ID: "Action_CreateActionConfig", Method: "POST", - PathPattern: "/waypoint/2022-02-03/namespace/{namespace_id}/actionconfig", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace_id}/actionconfig", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -96,7 +96,7 @@ func (a *Client) ActionDeleteActionConfig(params *ActionDeleteActionConfigParams op := &runtime.ClientOperation{ ID: "Action_DeleteActionConfig", Method: "DELETE", - PathPattern: "/waypoint/2022-02-03/namespace/{namespace_id}/actionconfig", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace_id}/actionconfig", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -134,7 +134,7 @@ func (a *Client) ActionGetActionConfig(params *ActionGetActionConfigParams, auth op := &runtime.ClientOperation{ ID: "Action_GetActionConfig", Method: "GET", - PathPattern: "/waypoint/2022-02-03/namespace/{namespace_id}/actionconfig", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace_id}/actionconfig", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -172,7 +172,7 @@ func (a *Client) ActionListActionConfigs(params *ActionListActionConfigsParams, op := &runtime.ClientOperation{ ID: "Action_ListActionConfigs", Method: "GET", - PathPattern: "/waypoint/2022-02-03/namespace/{namespace_id}/actionconfigs", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace_id}/actionconfigs", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -210,7 +210,7 @@ func (a *Client) ActionListActionRuns(params *ActionListActionRunsParams, authIn op := &runtime.ClientOperation{ ID: "Action_ListActionRuns", Method: "GET", - PathPattern: "/waypoint/2022-02-03/namespace/{namespace_id}/actionruns", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace_id}/actionruns", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -248,7 +248,7 @@ func (a *Client) ActionRunAction(params *ActionRunActionParams, authInfo runtime op := &runtime.ClientOperation{ ID: "Action_RunAction", Method: "PUT", - PathPattern: "/waypoint/2022-02-03/namespace/{namespace_id}/action", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace_id}/action", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -286,7 +286,7 @@ func (a *Client) ActionSendStatusLog(params *ActionSendStatusLogParams, authInfo op := &runtime.ClientOperation{ ID: "Action_SendStatusLog", Method: "POST", - PathPattern: "/waypoint/2022-02-03/namespace/{namespace_id}/action/{action_config.id}/action-runs/{action_run_seq}/status-log", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace_id}/action/{action_config.id}/action-runs/{action_run_seq}/status-log", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -324,7 +324,7 @@ func (a *Client) ActionUpdateActionConfig(params *ActionUpdateActionConfigParams op := &runtime.ClientOperation{ ID: "Action_UpdateActionConfig", Method: "PATCH", - PathPattern: "/waypoint/2022-02-03/namespace/{namespace_id}/actionconfig", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace_id}/actionconfig", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_create_action_config_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_create_action_config_responses.go index d23a05d2..77dac28e 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_create_action_config_responses.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_create_action_config_responses.go @@ -87,11 +87,11 @@ func (o *ActionCreateActionConfigOK) Code() int { } func (o *ActionCreateActionConfigOK) Error() string { - return fmt.Sprintf("[POST /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] actionCreateActionConfigOK %+v", 200, o.Payload) + return fmt.Sprintf("[POST /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] actionCreateActionConfigOK %+v", 200, o.Payload) } func (o *ActionCreateActionConfigOK) String() string { - return fmt.Sprintf("[POST /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] actionCreateActionConfigOK %+v", 200, o.Payload) + return fmt.Sprintf("[POST /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] actionCreateActionConfigOK %+v", 200, o.Payload) } func (o *ActionCreateActionConfigOK) GetPayload() *models.HashicorpCloudWaypointActionsdriverCreateActionConfigResponse { @@ -159,11 +159,11 @@ func (o *ActionCreateActionConfigDefault) Code() int { } func (o *ActionCreateActionConfigDefault) Error() string { - return fmt.Sprintf("[POST /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] Action_CreateActionConfig default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] Action_CreateActionConfig default %+v", o._statusCode, o.Payload) } func (o *ActionCreateActionConfigDefault) String() string { - return fmt.Sprintf("[POST /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] Action_CreateActionConfig default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] Action_CreateActionConfig default %+v", o._statusCode, o.Payload) } func (o *ActionCreateActionConfigDefault) GetPayload() *cloud.GrpcGatewayRuntimeError { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_delete_action_config_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_delete_action_config_responses.go index af14069f..b6660363 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_delete_action_config_responses.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_delete_action_config_responses.go @@ -86,11 +86,11 @@ func (o *ActionDeleteActionConfigOK) Code() int { } func (o *ActionDeleteActionConfigOK) Error() string { - return fmt.Sprintf("[DELETE /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] actionDeleteActionConfigOK %+v", 200, o.Payload) + return fmt.Sprintf("[DELETE /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] actionDeleteActionConfigOK %+v", 200, o.Payload) } func (o *ActionDeleteActionConfigOK) String() string { - return fmt.Sprintf("[DELETE /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] actionDeleteActionConfigOK %+v", 200, o.Payload) + return fmt.Sprintf("[DELETE /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] actionDeleteActionConfigOK %+v", 200, o.Payload) } func (o *ActionDeleteActionConfigOK) GetPayload() interface{} { @@ -156,11 +156,11 @@ func (o *ActionDeleteActionConfigDefault) Code() int { } func (o *ActionDeleteActionConfigDefault) Error() string { - return fmt.Sprintf("[DELETE /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] Action_DeleteActionConfig default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[DELETE /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] Action_DeleteActionConfig default %+v", o._statusCode, o.Payload) } func (o *ActionDeleteActionConfigDefault) String() string { - return fmt.Sprintf("[DELETE /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] Action_DeleteActionConfig default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[DELETE /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] Action_DeleteActionConfig default %+v", o._statusCode, o.Payload) } func (o *ActionDeleteActionConfigDefault) GetPayload() *cloud.GrpcGatewayRuntimeError { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_get_action_config_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_get_action_config_responses.go index 4810fa68..58613c20 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_get_action_config_responses.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_get_action_config_responses.go @@ -87,11 +87,11 @@ func (o *ActionGetActionConfigOK) Code() int { } func (o *ActionGetActionConfigOK) Error() string { - return fmt.Sprintf("[GET /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] actionGetActionConfigOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] actionGetActionConfigOK %+v", 200, o.Payload) } func (o *ActionGetActionConfigOK) String() string { - return fmt.Sprintf("[GET /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] actionGetActionConfigOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] actionGetActionConfigOK %+v", 200, o.Payload) } func (o *ActionGetActionConfigOK) GetPayload() *models.HashicorpCloudWaypointActionsdriverGetActionConfigResponse { @@ -159,11 +159,11 @@ func (o *ActionGetActionConfigDefault) Code() int { } func (o *ActionGetActionConfigDefault) Error() string { - return fmt.Sprintf("[GET /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] Action_GetActionConfig default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] Action_GetActionConfig default %+v", o._statusCode, o.Payload) } func (o *ActionGetActionConfigDefault) String() string { - return fmt.Sprintf("[GET /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] Action_GetActionConfig default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] Action_GetActionConfig default %+v", o._statusCode, o.Payload) } func (o *ActionGetActionConfigDefault) GetPayload() *cloud.GrpcGatewayRuntimeError { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_list_action_configs_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_list_action_configs_responses.go index 2e14e89a..e3f87ad1 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_list_action_configs_responses.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_list_action_configs_responses.go @@ -87,11 +87,11 @@ func (o *ActionListActionConfigsOK) Code() int { } func (o *ActionListActionConfigsOK) Error() string { - return fmt.Sprintf("[GET /waypoint/2022-02-03/namespace/{namespace_id}/actionconfigs][%d] actionListActionConfigsOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace_id}/actionconfigs][%d] actionListActionConfigsOK %+v", 200, o.Payload) } func (o *ActionListActionConfigsOK) String() string { - return fmt.Sprintf("[GET /waypoint/2022-02-03/namespace/{namespace_id}/actionconfigs][%d] actionListActionConfigsOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace_id}/actionconfigs][%d] actionListActionConfigsOK %+v", 200, o.Payload) } func (o *ActionListActionConfigsOK) GetPayload() *models.HashicorpCloudWaypointActionsdriverListActionConfigResponse { @@ -159,11 +159,11 @@ func (o *ActionListActionConfigsDefault) Code() int { } func (o *ActionListActionConfigsDefault) Error() string { - return fmt.Sprintf("[GET /waypoint/2022-02-03/namespace/{namespace_id}/actionconfigs][%d] Action_ListActionConfigs default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace_id}/actionconfigs][%d] Action_ListActionConfigs default %+v", o._statusCode, o.Payload) } func (o *ActionListActionConfigsDefault) String() string { - return fmt.Sprintf("[GET /waypoint/2022-02-03/namespace/{namespace_id}/actionconfigs][%d] Action_ListActionConfigs default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace_id}/actionconfigs][%d] Action_ListActionConfigs default %+v", o._statusCode, o.Payload) } func (o *ActionListActionConfigsDefault) GetPayload() *cloud.GrpcGatewayRuntimeError { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_list_action_runs_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_list_action_runs_responses.go index d0b047ae..78ce61ac 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_list_action_runs_responses.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_list_action_runs_responses.go @@ -87,11 +87,11 @@ func (o *ActionListActionRunsOK) Code() int { } func (o *ActionListActionRunsOK) Error() string { - return fmt.Sprintf("[GET /waypoint/2022-02-03/namespace/{namespace_id}/actionruns][%d] actionListActionRunsOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace_id}/actionruns][%d] actionListActionRunsOK %+v", 200, o.Payload) } func (o *ActionListActionRunsOK) String() string { - return fmt.Sprintf("[GET /waypoint/2022-02-03/namespace/{namespace_id}/actionruns][%d] actionListActionRunsOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace_id}/actionruns][%d] actionListActionRunsOK %+v", 200, o.Payload) } func (o *ActionListActionRunsOK) GetPayload() *models.HashicorpCloudWaypointActionsdriverListActionRunsResponse { @@ -159,11 +159,11 @@ func (o *ActionListActionRunsDefault) Code() int { } func (o *ActionListActionRunsDefault) Error() string { - return fmt.Sprintf("[GET /waypoint/2022-02-03/namespace/{namespace_id}/actionruns][%d] Action_ListActionRuns default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace_id}/actionruns][%d] Action_ListActionRuns default %+v", o._statusCode, o.Payload) } func (o *ActionListActionRunsDefault) String() string { - return fmt.Sprintf("[GET /waypoint/2022-02-03/namespace/{namespace_id}/actionruns][%d] Action_ListActionRuns default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace_id}/actionruns][%d] Action_ListActionRuns default %+v", o._statusCode, o.Payload) } func (o *ActionListActionRunsDefault) GetPayload() *cloud.GrpcGatewayRuntimeError { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_run_action_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_run_action_responses.go index 38699a9b..ce4b1d94 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_run_action_responses.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_run_action_responses.go @@ -87,11 +87,11 @@ func (o *ActionRunActionOK) Code() int { } func (o *ActionRunActionOK) Error() string { - return fmt.Sprintf("[PUT /waypoint/2022-02-03/namespace/{namespace_id}/action][%d] actionRunActionOK %+v", 200, o.Payload) + return fmt.Sprintf("[PUT /waypoint/2023-08-18/namespace/{namespace_id}/action][%d] actionRunActionOK %+v", 200, o.Payload) } func (o *ActionRunActionOK) String() string { - return fmt.Sprintf("[PUT /waypoint/2022-02-03/namespace/{namespace_id}/action][%d] actionRunActionOK %+v", 200, o.Payload) + return fmt.Sprintf("[PUT /waypoint/2023-08-18/namespace/{namespace_id}/action][%d] actionRunActionOK %+v", 200, o.Payload) } func (o *ActionRunActionOK) GetPayload() *models.HashicorpCloudWaypointActionsdriverRunActionResponse { @@ -159,11 +159,11 @@ func (o *ActionRunActionDefault) Code() int { } func (o *ActionRunActionDefault) Error() string { - return fmt.Sprintf("[PUT /waypoint/2022-02-03/namespace/{namespace_id}/action][%d] Action_RunAction default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[PUT /waypoint/2023-08-18/namespace/{namespace_id}/action][%d] Action_RunAction default %+v", o._statusCode, o.Payload) } func (o *ActionRunActionDefault) String() string { - return fmt.Sprintf("[PUT /waypoint/2022-02-03/namespace/{namespace_id}/action][%d] Action_RunAction default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[PUT /waypoint/2023-08-18/namespace/{namespace_id}/action][%d] Action_RunAction default %+v", o._statusCode, o.Payload) } func (o *ActionRunActionDefault) GetPayload() *cloud.GrpcGatewayRuntimeError { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_send_status_log_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_send_status_log_responses.go index f0141360..d4ae6cfd 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_send_status_log_responses.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_send_status_log_responses.go @@ -87,11 +87,11 @@ func (o *ActionSendStatusLogOK) Code() int { } func (o *ActionSendStatusLogOK) Error() string { - return fmt.Sprintf("[POST /waypoint/2022-02-03/namespace/{namespace_id}/action/{action_config.id}/action-runs/{action_run_seq}/status-log][%d] actionSendStatusLogOK %+v", 200, o.Payload) + return fmt.Sprintf("[POST /waypoint/2023-08-18/namespace/{namespace_id}/action/{action_config.id}/action-runs/{action_run_seq}/status-log][%d] actionSendStatusLogOK %+v", 200, o.Payload) } func (o *ActionSendStatusLogOK) String() string { - return fmt.Sprintf("[POST /waypoint/2022-02-03/namespace/{namespace_id}/action/{action_config.id}/action-runs/{action_run_seq}/status-log][%d] actionSendStatusLogOK %+v", 200, o.Payload) + return fmt.Sprintf("[POST /waypoint/2023-08-18/namespace/{namespace_id}/action/{action_config.id}/action-runs/{action_run_seq}/status-log][%d] actionSendStatusLogOK %+v", 200, o.Payload) } func (o *ActionSendStatusLogOK) GetPayload() models.HashicorpCloudWaypointActionsdriverSendStatusLogResponse { @@ -157,11 +157,11 @@ func (o *ActionSendStatusLogDefault) Code() int { } func (o *ActionSendStatusLogDefault) Error() string { - return fmt.Sprintf("[POST /waypoint/2022-02-03/namespace/{namespace_id}/action/{action_config.id}/action-runs/{action_run_seq}/status-log][%d] Action_SendStatusLog default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /waypoint/2023-08-18/namespace/{namespace_id}/action/{action_config.id}/action-runs/{action_run_seq}/status-log][%d] Action_SendStatusLog default %+v", o._statusCode, o.Payload) } func (o *ActionSendStatusLogDefault) String() string { - return fmt.Sprintf("[POST /waypoint/2022-02-03/namespace/{namespace_id}/action/{action_config.id}/action-runs/{action_run_seq}/status-log][%d] Action_SendStatusLog default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /waypoint/2023-08-18/namespace/{namespace_id}/action/{action_config.id}/action-runs/{action_run_seq}/status-log][%d] Action_SendStatusLog default %+v", o._statusCode, o.Payload) } func (o *ActionSendStatusLogDefault) GetPayload() *cloud.GrpcGatewayRuntimeError { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_update_action_config_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_update_action_config_responses.go index 08a6deca..e48120a4 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_update_action_config_responses.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/action/action_update_action_config_responses.go @@ -87,11 +87,11 @@ func (o *ActionUpdateActionConfigOK) Code() int { } func (o *ActionUpdateActionConfigOK) Error() string { - return fmt.Sprintf("[PATCH /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] actionUpdateActionConfigOK %+v", 200, o.Payload) + return fmt.Sprintf("[PATCH /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] actionUpdateActionConfigOK %+v", 200, o.Payload) } func (o *ActionUpdateActionConfigOK) String() string { - return fmt.Sprintf("[PATCH /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] actionUpdateActionConfigOK %+v", 200, o.Payload) + return fmt.Sprintf("[PATCH /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] actionUpdateActionConfigOK %+v", 200, o.Payload) } func (o *ActionUpdateActionConfigOK) GetPayload() *models.HashicorpCloudWaypointActionsdriverUpdateActionConfigResponse { @@ -159,11 +159,11 @@ func (o *ActionUpdateActionConfigDefault) Code() int { } func (o *ActionUpdateActionConfigDefault) Error() string { - return fmt.Sprintf("[PATCH /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] Action_UpdateActionConfig default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[PATCH /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] Action_UpdateActionConfig default %+v", o._statusCode, o.Payload) } func (o *ActionUpdateActionConfigDefault) String() string { - return fmt.Sprintf("[PATCH /waypoint/2022-02-03/namespace/{namespace_id}/actionconfig][%d] Action_UpdateActionConfig default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[PATCH /waypoint/2023-08-18/namespace/{namespace_id}/actionconfig][%d] Action_UpdateActionConfig default %+v", o._statusCode, o.Payload) } func (o *ActionUpdateActionConfigDefault) GetPayload() *cloud.GrpcGatewayRuntimeError { 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 e5984718..300264fc 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 @@ -72,6 +72,8 @@ type ClientService interface { WaypointServiceGetTFCConfig(params *WaypointServiceGetTFCConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceGetTFCConfigOK, error) + WaypointServiceGetTFModuleDetails(params *WaypointServiceGetTFModuleDetailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceGetTFModuleDetailsOK, error) + WaypointServiceGetTFRunStatus(params *WaypointServiceGetTFRunStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceGetTFRunStatusOK, error) WaypointServiceListAddOnDefinitions(params *WaypointServiceListAddOnDefinitionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListAddOnDefinitionsOK, error) @@ -84,6 +86,10 @@ type ClientService interface { WaypointServiceListNoCodeModules(params *WaypointServiceListNoCodeModulesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListNoCodeModulesOK, error) + WaypointServiceListTFCOrganizations(params *WaypointServiceListTFCOrganizationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListTFCOrganizationsOK, error) + + WaypointServiceListTFCProjects(params *WaypointServiceListTFCProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListTFCProjectsOK, error) + WaypointServiceUIListAddOnDefinitions(params *WaypointServiceUIListAddOnDefinitionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceUIListAddOnDefinitionsOK, error) WaypointServiceUpdateAddOn(params *WaypointServiceUpdateAddOnParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceUpdateAddOnOK, error) @@ -604,7 +610,7 @@ func (a *Client) WaypointServiceGetAddOn2(params *WaypointServiceGetAddOn2Params op := &runtime.ClientOperation{ ID: "WaypointService_GetAddOn2", Method: "GET", - PathPattern: "/waypoint/2023-08-18/namespace/{namespace.id}/add-on/{add_on.name}", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace.id}/add-on/by-name/{add_on.name}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -935,6 +941,44 @@ func (a *Client) WaypointServiceGetTFCConfig(params *WaypointServiceGetTFCConfig return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +WaypointServiceGetTFModuleDetails waypoint service get t f module details API +*/ +func (a *Client) WaypointServiceGetTFModuleDetails(params *WaypointServiceGetTFModuleDetailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceGetTFModuleDetailsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWaypointServiceGetTFModuleDetailsParams() + } + op := &runtime.ClientOperation{ + ID: "WaypointService_GetTFModuleDetails", + Method: "GET", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace.id}/tf-module-details/{source}/{version}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &WaypointServiceGetTFModuleDetailsReader{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.(*WaypointServiceGetTFModuleDetailsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*WaypointServiceGetTFModuleDetailsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* WaypointServiceGetTFRunStatus gets t f run status returns the status of the latest run of a terraform workspace */ @@ -1050,7 +1094,7 @@ func (a *Client) WaypointServiceListAddOns(params *WaypointServiceListAddOnsPara } /* -WaypointServiceListApplicationTemplates lists application templates returns a list of all applicationtemplates known pagination is currently ignored on this request +WaypointServiceListApplicationTemplates lists application templates returns a list of all applicationtemplates known */ func (a *Client) WaypointServiceListApplicationTemplates(params *WaypointServiceListApplicationTemplatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListApplicationTemplatesOK, error) { // TODO: Validate the params before sending @@ -1163,6 +1207,82 @@ func (a *Client) WaypointServiceListNoCodeModules(params *WaypointServiceListNoC return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +WaypointServiceListTFCOrganizations waypoint service list t f c organizations API +*/ +func (a *Client) WaypointServiceListTFCOrganizations(params *WaypointServiceListTFCOrganizationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListTFCOrganizationsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWaypointServiceListTFCOrganizationsParams() + } + op := &runtime.ClientOperation{ + ID: "WaypointService_ListTFCOrganizations", + Method: "GET", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace.id}/tfc-organizations", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &WaypointServiceListTFCOrganizationsReader{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.(*WaypointServiceListTFCOrganizationsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*WaypointServiceListTFCOrganizationsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +WaypointServiceListTFCProjects lists t f c projects returns a list of available t f c projects for the configured t f c organization +*/ +func (a *Client) WaypointServiceListTFCProjects(params *WaypointServiceListTFCProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WaypointServiceListTFCProjectsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWaypointServiceListTFCProjectsParams() + } + op := &runtime.ClientOperation{ + ID: "WaypointService_ListTFCProjects", + Method: "GET", + PathPattern: "/waypoint/2023-08-18/namespace/{namespace.id}/tfc-projects", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &WaypointServiceListTFCProjectsReader{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.(*WaypointServiceListTFCProjectsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*WaypointServiceListTFCProjectsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* WaypointServiceUIListAddOnDefinitions lists add on definitions within the context of a project */ diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_get_add_on2_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_get_add_on2_responses.go index e0cdfd84..008935f8 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_get_add_on2_responses.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_get_add_on2_responses.go @@ -87,11 +87,11 @@ func (o *WaypointServiceGetAddOn2OK) Code() int { } func (o *WaypointServiceGetAddOn2OK) Error() string { - return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/add-on/{add_on.name}][%d] waypointServiceGetAddOn2OK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/add-on/by-name/{add_on.name}][%d] waypointServiceGetAddOn2OK %+v", 200, o.Payload) } func (o *WaypointServiceGetAddOn2OK) String() string { - return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/add-on/{add_on.name}][%d] waypointServiceGetAddOn2OK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/add-on/by-name/{add_on.name}][%d] waypointServiceGetAddOn2OK %+v", 200, o.Payload) } func (o *WaypointServiceGetAddOn2OK) GetPayload() *models.HashicorpCloudWaypointGetAddOnResponse { @@ -159,11 +159,11 @@ func (o *WaypointServiceGetAddOn2Default) Code() int { } func (o *WaypointServiceGetAddOn2Default) Error() string { - return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/add-on/{add_on.name}][%d] WaypointService_GetAddOn2 default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/add-on/by-name/{add_on.name}][%d] WaypointService_GetAddOn2 default %+v", o._statusCode, o.Payload) } func (o *WaypointServiceGetAddOn2Default) String() string { - return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/add-on/{add_on.name}][%d] WaypointService_GetAddOn2 default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/add-on/by-name/{add_on.name}][%d] WaypointService_GetAddOn2 default %+v", o._statusCode, o.Payload) } func (o *WaypointServiceGetAddOn2Default) GetPayload() *cloud.GrpcGatewayRuntimeError { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_get_t_f_module_details_parameters.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_get_t_f_module_details_parameters.go new file mode 100644 index 00000000..09fc2427 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_get_t_f_module_details_parameters.go @@ -0,0 +1,186 @@ +// 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" +) + +// NewWaypointServiceGetTFModuleDetailsParams creates a new WaypointServiceGetTFModuleDetailsParams 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 NewWaypointServiceGetTFModuleDetailsParams() *WaypointServiceGetTFModuleDetailsParams { + return &WaypointServiceGetTFModuleDetailsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWaypointServiceGetTFModuleDetailsParamsWithTimeout creates a new WaypointServiceGetTFModuleDetailsParams object +// with the ability to set a timeout on a request. +func NewWaypointServiceGetTFModuleDetailsParamsWithTimeout(timeout time.Duration) *WaypointServiceGetTFModuleDetailsParams { + return &WaypointServiceGetTFModuleDetailsParams{ + timeout: timeout, + } +} + +// NewWaypointServiceGetTFModuleDetailsParamsWithContext creates a new WaypointServiceGetTFModuleDetailsParams object +// with the ability to set a context for a request. +func NewWaypointServiceGetTFModuleDetailsParamsWithContext(ctx context.Context) *WaypointServiceGetTFModuleDetailsParams { + return &WaypointServiceGetTFModuleDetailsParams{ + Context: ctx, + } +} + +// NewWaypointServiceGetTFModuleDetailsParamsWithHTTPClient creates a new WaypointServiceGetTFModuleDetailsParams object +// with the ability to set a custom HTTPClient for a request. +func NewWaypointServiceGetTFModuleDetailsParamsWithHTTPClient(client *http.Client) *WaypointServiceGetTFModuleDetailsParams { + return &WaypointServiceGetTFModuleDetailsParams{ + HTTPClient: client, + } +} + +/* +WaypointServiceGetTFModuleDetailsParams contains all the parameters to send to the API endpoint + + for the waypoint service get t f module details operation. + + Typically these are written to a http.Request. +*/ +type WaypointServiceGetTFModuleDetailsParams struct { + + // NamespaceID. + NamespaceID string + + // Source. + Source string + + // Version. + Version string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the waypoint service get t f module details params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WaypointServiceGetTFModuleDetailsParams) WithDefaults() *WaypointServiceGetTFModuleDetailsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the waypoint service get t f module details params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WaypointServiceGetTFModuleDetailsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the waypoint service get t f module details params +func (o *WaypointServiceGetTFModuleDetailsParams) WithTimeout(timeout time.Duration) *WaypointServiceGetTFModuleDetailsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the waypoint service get t f module details params +func (o *WaypointServiceGetTFModuleDetailsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the waypoint service get t f module details params +func (o *WaypointServiceGetTFModuleDetailsParams) WithContext(ctx context.Context) *WaypointServiceGetTFModuleDetailsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the waypoint service get t f module details params +func (o *WaypointServiceGetTFModuleDetailsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the waypoint service get t f module details params +func (o *WaypointServiceGetTFModuleDetailsParams) WithHTTPClient(client *http.Client) *WaypointServiceGetTFModuleDetailsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the waypoint service get t f module details params +func (o *WaypointServiceGetTFModuleDetailsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespaceID adds the namespaceID to the waypoint service get t f module details params +func (o *WaypointServiceGetTFModuleDetailsParams) WithNamespaceID(namespaceID string) *WaypointServiceGetTFModuleDetailsParams { + o.SetNamespaceID(namespaceID) + return o +} + +// SetNamespaceID adds the namespaceId to the waypoint service get t f module details params +func (o *WaypointServiceGetTFModuleDetailsParams) SetNamespaceID(namespaceID string) { + o.NamespaceID = namespaceID +} + +// WithSource adds the source to the waypoint service get t f module details params +func (o *WaypointServiceGetTFModuleDetailsParams) WithSource(source string) *WaypointServiceGetTFModuleDetailsParams { + o.SetSource(source) + return o +} + +// SetSource adds the source to the waypoint service get t f module details params +func (o *WaypointServiceGetTFModuleDetailsParams) SetSource(source string) { + o.Source = source +} + +// WithVersion adds the version to the waypoint service get t f module details params +func (o *WaypointServiceGetTFModuleDetailsParams) WithVersion(version string) *WaypointServiceGetTFModuleDetailsParams { + o.SetVersion(version) + return o +} + +// SetVersion adds the version to the waypoint service get t f module details params +func (o *WaypointServiceGetTFModuleDetailsParams) SetVersion(version string) { + o.Version = version +} + +// WriteToRequest writes these params to a swagger request +func (o *WaypointServiceGetTFModuleDetailsParams) 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 + } + + // path param source + if err := r.SetPathParam("source", o.Source); err != nil { + return err + } + + // path param version + if err := r.SetPathParam("version", o.Version); 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_get_t_f_module_details_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_get_t_f_module_details_responses.go new file mode 100644 index 00000000..596fe401 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_get_t_f_module_details_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" +) + +// WaypointServiceGetTFModuleDetailsReader is a Reader for the WaypointServiceGetTFModuleDetails structure. +type WaypointServiceGetTFModuleDetailsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WaypointServiceGetTFModuleDetailsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWaypointServiceGetTFModuleDetailsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewWaypointServiceGetTFModuleDetailsDefault(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 + } +} + +// NewWaypointServiceGetTFModuleDetailsOK creates a WaypointServiceGetTFModuleDetailsOK with default headers values +func NewWaypointServiceGetTFModuleDetailsOK() *WaypointServiceGetTFModuleDetailsOK { + return &WaypointServiceGetTFModuleDetailsOK{} +} + +/* +WaypointServiceGetTFModuleDetailsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type WaypointServiceGetTFModuleDetailsOK struct { + Payload *models.HashicorpCloudWaypointGetTFModuleDetailsResponse +} + +// IsSuccess returns true when this waypoint service get t f module details o k response has a 2xx status code +func (o *WaypointServiceGetTFModuleDetailsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this waypoint service get t f module details o k response has a 3xx status code +func (o *WaypointServiceGetTFModuleDetailsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this waypoint service get t f module details o k response has a 4xx status code +func (o *WaypointServiceGetTFModuleDetailsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this waypoint service get t f module details o k response has a 5xx status code +func (o *WaypointServiceGetTFModuleDetailsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this waypoint service get t f module details o k response a status code equal to that given +func (o *WaypointServiceGetTFModuleDetailsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the waypoint service get t f module details o k response +func (o *WaypointServiceGetTFModuleDetailsOK) Code() int { + return 200 +} + +func (o *WaypointServiceGetTFModuleDetailsOK) Error() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tf-module-details/{source}/{version}][%d] waypointServiceGetTFModuleDetailsOK %+v", 200, o.Payload) +} + +func (o *WaypointServiceGetTFModuleDetailsOK) String() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tf-module-details/{source}/{version}][%d] waypointServiceGetTFModuleDetailsOK %+v", 200, o.Payload) +} + +func (o *WaypointServiceGetTFModuleDetailsOK) GetPayload() *models.HashicorpCloudWaypointGetTFModuleDetailsResponse { + return o.Payload +} + +func (o *WaypointServiceGetTFModuleDetailsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.HashicorpCloudWaypointGetTFModuleDetailsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWaypointServiceGetTFModuleDetailsDefault creates a WaypointServiceGetTFModuleDetailsDefault with default headers values +func NewWaypointServiceGetTFModuleDetailsDefault(code int) *WaypointServiceGetTFModuleDetailsDefault { + return &WaypointServiceGetTFModuleDetailsDefault{ + _statusCode: code, + } +} + +/* +WaypointServiceGetTFModuleDetailsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type WaypointServiceGetTFModuleDetailsDefault struct { + _statusCode int + + Payload *cloud.GrpcGatewayRuntimeError +} + +// IsSuccess returns true when this waypoint service get t f module details default response has a 2xx status code +func (o *WaypointServiceGetTFModuleDetailsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this waypoint service get t f module details default response has a 3xx status code +func (o *WaypointServiceGetTFModuleDetailsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this waypoint service get t f module details default response has a 4xx status code +func (o *WaypointServiceGetTFModuleDetailsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this waypoint service get t f module details default response has a 5xx status code +func (o *WaypointServiceGetTFModuleDetailsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this waypoint service get t f module details default response a status code equal to that given +func (o *WaypointServiceGetTFModuleDetailsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the waypoint service get t f module details default response +func (o *WaypointServiceGetTFModuleDetailsDefault) Code() int { + return o._statusCode +} + +func (o *WaypointServiceGetTFModuleDetailsDefault) Error() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tf-module-details/{source}/{version}][%d] WaypointService_GetTFModuleDetails default %+v", o._statusCode, o.Payload) +} + +func (o *WaypointServiceGetTFModuleDetailsDefault) String() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tf-module-details/{source}/{version}][%d] WaypointService_GetTFModuleDetails default %+v", o._statusCode, o.Payload) +} + +func (o *WaypointServiceGetTFModuleDetailsDefault) GetPayload() *cloud.GrpcGatewayRuntimeError { + return o.Payload +} + +func (o *WaypointServiceGetTFModuleDetailsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(cloud.GrpcGatewayRuntimeError) + + // 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_add_on_definitions_parameters.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_add_on_definitions_parameters.go index 6a9cb97e..0eda4dde 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_add_on_definitions_parameters.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_add_on_definitions_parameters.go @@ -92,6 +92,12 @@ type WaypointServiceListAddOnDefinitionsParams struct { */ PaginationPreviousPageToken *string + /* WithTotalCount. + + If set to false or not provided, response will not include a total_count value. + */ + WithTotalCount *bool + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -189,6 +195,17 @@ func (o *WaypointServiceListAddOnDefinitionsParams) SetPaginationPreviousPageTok o.PaginationPreviousPageToken = paginationPreviousPageToken } +// WithWithTotalCount adds the withTotalCount to the waypoint service list add on definitions params +func (o *WaypointServiceListAddOnDefinitionsParams) WithWithTotalCount(withTotalCount *bool) *WaypointServiceListAddOnDefinitionsParams { + o.SetWithTotalCount(withTotalCount) + return o +} + +// SetWithTotalCount adds the withTotalCount to the waypoint service list add on definitions params +func (o *WaypointServiceListAddOnDefinitionsParams) SetWithTotalCount(withTotalCount *bool) { + o.WithTotalCount = withTotalCount +} + // WriteToRequest writes these params to a swagger request func (o *WaypointServiceListAddOnDefinitionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -253,6 +270,23 @@ func (o *WaypointServiceListAddOnDefinitionsParams) WriteToRequest(r runtime.Cli } } + if o.WithTotalCount != nil { + + // query param with_total_count + var qrWithTotalCount bool + + if o.WithTotalCount != nil { + qrWithTotalCount = *o.WithTotalCount + } + qWithTotalCount := swag.FormatBool(qrWithTotalCount) + if qWithTotalCount != "" { + + if err := r.SetQueryParam("with_total_count", qWithTotalCount); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_add_ons_parameters.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_add_ons_parameters.go index 3c7b2529..4d825bde 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_add_ons_parameters.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_add_ons_parameters.go @@ -98,6 +98,12 @@ type WaypointServiceListAddOnsParams struct { */ PaginationPreviousPageToken *string + /* WithTotalCount. + + If set to false or not provided, response will not include a total_count value. + */ + WithTotalCount *bool + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -217,6 +223,17 @@ func (o *WaypointServiceListAddOnsParams) SetPaginationPreviousPageToken(paginat o.PaginationPreviousPageToken = paginationPreviousPageToken } +// WithWithTotalCount adds the withTotalCount to the waypoint service list add ons params +func (o *WaypointServiceListAddOnsParams) WithWithTotalCount(withTotalCount *bool) *WaypointServiceListAddOnsParams { + o.SetWithTotalCount(withTotalCount) + return o +} + +// SetWithTotalCount adds the withTotalCount to the waypoint service list add ons params +func (o *WaypointServiceListAddOnsParams) SetWithTotalCount(withTotalCount *bool) { + o.WithTotalCount = withTotalCount +} + // WriteToRequest writes these params to a swagger request func (o *WaypointServiceListAddOnsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -315,6 +332,23 @@ func (o *WaypointServiceListAddOnsParams) WriteToRequest(r runtime.ClientRequest } } + if o.WithTotalCount != nil { + + // query param with_total_count + var qrWithTotalCount bool + + if o.WithTotalCount != nil { + qrWithTotalCount = *o.WithTotalCount + } + qWithTotalCount := swag.FormatBool(qrWithTotalCount) + if qWithTotalCount != "" { + + if err := r.SetQueryParam("with_total_count", qWithTotalCount); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_application_templates_parameters.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_application_templates_parameters.go index 1e100ea9..f155ac7b 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_application_templates_parameters.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_application_templates_parameters.go @@ -92,6 +92,12 @@ type WaypointServiceListApplicationTemplatesParams struct { */ PaginationPreviousPageToken *string + /* WithTotalCount. + + If set to false or not provided, response will not include a total_count value. + */ + WithTotalCount *bool + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -189,6 +195,17 @@ func (o *WaypointServiceListApplicationTemplatesParams) SetPaginationPreviousPag o.PaginationPreviousPageToken = paginationPreviousPageToken } +// WithWithTotalCount adds the withTotalCount to the waypoint service list application templates params +func (o *WaypointServiceListApplicationTemplatesParams) WithWithTotalCount(withTotalCount *bool) *WaypointServiceListApplicationTemplatesParams { + o.SetWithTotalCount(withTotalCount) + return o +} + +// SetWithTotalCount adds the withTotalCount to the waypoint service list application templates params +func (o *WaypointServiceListApplicationTemplatesParams) SetWithTotalCount(withTotalCount *bool) { + o.WithTotalCount = withTotalCount +} + // WriteToRequest writes these params to a swagger request func (o *WaypointServiceListApplicationTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -253,6 +270,23 @@ func (o *WaypointServiceListApplicationTemplatesParams) WriteToRequest(r runtime } } + if o.WithTotalCount != nil { + + // query param with_total_count + var qrWithTotalCount bool + + if o.WithTotalCount != nil { + qrWithTotalCount = *o.WithTotalCount + } + qWithTotalCount := swag.FormatBool(qrWithTotalCount) + if qWithTotalCount != "" { + + if err := r.SetQueryParam("with_total_count", qWithTotalCount); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_applications_parameters.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_applications_parameters.go index b5325a1a..802f3509 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_applications_parameters.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_applications_parameters.go @@ -92,6 +92,9 @@ type WaypointServiceListApplicationsParams struct { */ PaginationPreviousPageToken *string + // WithTotalCount. + WithTotalCount *bool + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -189,6 +192,17 @@ func (o *WaypointServiceListApplicationsParams) SetPaginationPreviousPageToken(p o.PaginationPreviousPageToken = paginationPreviousPageToken } +// WithWithTotalCount adds the withTotalCount to the waypoint service list applications params +func (o *WaypointServiceListApplicationsParams) WithWithTotalCount(withTotalCount *bool) *WaypointServiceListApplicationsParams { + o.SetWithTotalCount(withTotalCount) + return o +} + +// SetWithTotalCount adds the withTotalCount to the waypoint service list applications params +func (o *WaypointServiceListApplicationsParams) SetWithTotalCount(withTotalCount *bool) { + o.WithTotalCount = withTotalCount +} + // WriteToRequest writes these params to a swagger request func (o *WaypointServiceListApplicationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -253,6 +267,23 @@ func (o *WaypointServiceListApplicationsParams) WriteToRequest(r runtime.ClientR } } + if o.WithTotalCount != nil { + + // query param with_total_count + var qrWithTotalCount bool + + if o.WithTotalCount != nil { + qrWithTotalCount = *o.WithTotalCount + } + qWithTotalCount := swag.FormatBool(qrWithTotalCount) + if qWithTotalCount != "" { + + if err := r.SetQueryParam("with_total_count", qWithTotalCount); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_c_organizations_parameters.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_c_organizations_parameters.go new file mode 100644 index 00000000..4c05c4b5 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_c_organizations_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" +) + +// NewWaypointServiceListTFCOrganizationsParams creates a new WaypointServiceListTFCOrganizationsParams 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 NewWaypointServiceListTFCOrganizationsParams() *WaypointServiceListTFCOrganizationsParams { + return &WaypointServiceListTFCOrganizationsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWaypointServiceListTFCOrganizationsParamsWithTimeout creates a new WaypointServiceListTFCOrganizationsParams object +// with the ability to set a timeout on a request. +func NewWaypointServiceListTFCOrganizationsParamsWithTimeout(timeout time.Duration) *WaypointServiceListTFCOrganizationsParams { + return &WaypointServiceListTFCOrganizationsParams{ + timeout: timeout, + } +} + +// NewWaypointServiceListTFCOrganizationsParamsWithContext creates a new WaypointServiceListTFCOrganizationsParams object +// with the ability to set a context for a request. +func NewWaypointServiceListTFCOrganizationsParamsWithContext(ctx context.Context) *WaypointServiceListTFCOrganizationsParams { + return &WaypointServiceListTFCOrganizationsParams{ + Context: ctx, + } +} + +// NewWaypointServiceListTFCOrganizationsParamsWithHTTPClient creates a new WaypointServiceListTFCOrganizationsParams object +// with the ability to set a custom HTTPClient for a request. +func NewWaypointServiceListTFCOrganizationsParamsWithHTTPClient(client *http.Client) *WaypointServiceListTFCOrganizationsParams { + return &WaypointServiceListTFCOrganizationsParams{ + HTTPClient: client, + } +} + +/* +WaypointServiceListTFCOrganizationsParams contains all the parameters to send to the API endpoint + + for the waypoint service list t f c organizations operation. + + Typically these are written to a http.Request. +*/ +type WaypointServiceListTFCOrganizationsParams struct { + + // NamespaceID. + NamespaceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the waypoint service list t f c organizations params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WaypointServiceListTFCOrganizationsParams) WithDefaults() *WaypointServiceListTFCOrganizationsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the waypoint service list t f c organizations params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WaypointServiceListTFCOrganizationsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the waypoint service list t f c organizations params +func (o *WaypointServiceListTFCOrganizationsParams) WithTimeout(timeout time.Duration) *WaypointServiceListTFCOrganizationsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the waypoint service list t f c organizations params +func (o *WaypointServiceListTFCOrganizationsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the waypoint service list t f c organizations params +func (o *WaypointServiceListTFCOrganizationsParams) WithContext(ctx context.Context) *WaypointServiceListTFCOrganizationsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the waypoint service list t f c organizations params +func (o *WaypointServiceListTFCOrganizationsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the waypoint service list t f c organizations params +func (o *WaypointServiceListTFCOrganizationsParams) WithHTTPClient(client *http.Client) *WaypointServiceListTFCOrganizationsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the waypoint service list t f c organizations params +func (o *WaypointServiceListTFCOrganizationsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespaceID adds the namespaceID to the waypoint service list t f c organizations params +func (o *WaypointServiceListTFCOrganizationsParams) WithNamespaceID(namespaceID string) *WaypointServiceListTFCOrganizationsParams { + o.SetNamespaceID(namespaceID) + return o +} + +// SetNamespaceID adds the namespaceId to the waypoint service list t f c organizations params +func (o *WaypointServiceListTFCOrganizationsParams) SetNamespaceID(namespaceID string) { + o.NamespaceID = namespaceID +} + +// WriteToRequest writes these params to a swagger request +func (o *WaypointServiceListTFCOrganizationsParams) 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_c_organizations_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_c_organizations_responses.go new file mode 100644 index 00000000..66ba9566 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_c_organizations_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" +) + +// WaypointServiceListTFCOrganizationsReader is a Reader for the WaypointServiceListTFCOrganizations structure. +type WaypointServiceListTFCOrganizationsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WaypointServiceListTFCOrganizationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWaypointServiceListTFCOrganizationsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewWaypointServiceListTFCOrganizationsDefault(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 + } +} + +// NewWaypointServiceListTFCOrganizationsOK creates a WaypointServiceListTFCOrganizationsOK with default headers values +func NewWaypointServiceListTFCOrganizationsOK() *WaypointServiceListTFCOrganizationsOK { + return &WaypointServiceListTFCOrganizationsOK{} +} + +/* +WaypointServiceListTFCOrganizationsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type WaypointServiceListTFCOrganizationsOK struct { + Payload *models.HashicorpCloudWaypointListTFCOrganizationsResponse +} + +// IsSuccess returns true when this waypoint service list t f c organizations o k response has a 2xx status code +func (o *WaypointServiceListTFCOrganizationsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this waypoint service list t f c organizations o k response has a 3xx status code +func (o *WaypointServiceListTFCOrganizationsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this waypoint service list t f c organizations o k response has a 4xx status code +func (o *WaypointServiceListTFCOrganizationsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this waypoint service list t f c organizations o k response has a 5xx status code +func (o *WaypointServiceListTFCOrganizationsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this waypoint service list t f c organizations o k response a status code equal to that given +func (o *WaypointServiceListTFCOrganizationsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the waypoint service list t f c organizations o k response +func (o *WaypointServiceListTFCOrganizationsOK) Code() int { + return 200 +} + +func (o *WaypointServiceListTFCOrganizationsOK) Error() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tfc-organizations][%d] waypointServiceListTFCOrganizationsOK %+v", 200, o.Payload) +} + +func (o *WaypointServiceListTFCOrganizationsOK) String() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tfc-organizations][%d] waypointServiceListTFCOrganizationsOK %+v", 200, o.Payload) +} + +func (o *WaypointServiceListTFCOrganizationsOK) GetPayload() *models.HashicorpCloudWaypointListTFCOrganizationsResponse { + return o.Payload +} + +func (o *WaypointServiceListTFCOrganizationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.HashicorpCloudWaypointListTFCOrganizationsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWaypointServiceListTFCOrganizationsDefault creates a WaypointServiceListTFCOrganizationsDefault with default headers values +func NewWaypointServiceListTFCOrganizationsDefault(code int) *WaypointServiceListTFCOrganizationsDefault { + return &WaypointServiceListTFCOrganizationsDefault{ + _statusCode: code, + } +} + +/* +WaypointServiceListTFCOrganizationsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type WaypointServiceListTFCOrganizationsDefault struct { + _statusCode int + + Payload *cloud.GrpcGatewayRuntimeError +} + +// IsSuccess returns true when this waypoint service list t f c organizations default response has a 2xx status code +func (o *WaypointServiceListTFCOrganizationsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this waypoint service list t f c organizations default response has a 3xx status code +func (o *WaypointServiceListTFCOrganizationsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this waypoint service list t f c organizations default response has a 4xx status code +func (o *WaypointServiceListTFCOrganizationsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this waypoint service list t f c organizations default response has a 5xx status code +func (o *WaypointServiceListTFCOrganizationsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this waypoint service list t f c organizations default response a status code equal to that given +func (o *WaypointServiceListTFCOrganizationsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the waypoint service list t f c organizations default response +func (o *WaypointServiceListTFCOrganizationsDefault) Code() int { + return o._statusCode +} + +func (o *WaypointServiceListTFCOrganizationsDefault) Error() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tfc-organizations][%d] WaypointService_ListTFCOrganizations default %+v", o._statusCode, o.Payload) +} + +func (o *WaypointServiceListTFCOrganizationsDefault) String() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tfc-organizations][%d] WaypointService_ListTFCOrganizations default %+v", o._statusCode, o.Payload) +} + +func (o *WaypointServiceListTFCOrganizationsDefault) GetPayload() *cloud.GrpcGatewayRuntimeError { + return o.Payload +} + +func (o *WaypointServiceListTFCOrganizationsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(cloud.GrpcGatewayRuntimeError) + + // 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_c_projects_parameters.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_c_projects_parameters.go new file mode 100644 index 00000000..a5ce7166 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_c_projects_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" +) + +// NewWaypointServiceListTFCProjectsParams creates a new WaypointServiceListTFCProjectsParams 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 NewWaypointServiceListTFCProjectsParams() *WaypointServiceListTFCProjectsParams { + return &WaypointServiceListTFCProjectsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWaypointServiceListTFCProjectsParamsWithTimeout creates a new WaypointServiceListTFCProjectsParams object +// with the ability to set a timeout on a request. +func NewWaypointServiceListTFCProjectsParamsWithTimeout(timeout time.Duration) *WaypointServiceListTFCProjectsParams { + return &WaypointServiceListTFCProjectsParams{ + timeout: timeout, + } +} + +// NewWaypointServiceListTFCProjectsParamsWithContext creates a new WaypointServiceListTFCProjectsParams object +// with the ability to set a context for a request. +func NewWaypointServiceListTFCProjectsParamsWithContext(ctx context.Context) *WaypointServiceListTFCProjectsParams { + return &WaypointServiceListTFCProjectsParams{ + Context: ctx, + } +} + +// NewWaypointServiceListTFCProjectsParamsWithHTTPClient creates a new WaypointServiceListTFCProjectsParams object +// with the ability to set a custom HTTPClient for a request. +func NewWaypointServiceListTFCProjectsParamsWithHTTPClient(client *http.Client) *WaypointServiceListTFCProjectsParams { + return &WaypointServiceListTFCProjectsParams{ + HTTPClient: client, + } +} + +/* +WaypointServiceListTFCProjectsParams contains all the parameters to send to the API endpoint + + for the waypoint service list t f c projects operation. + + Typically these are written to a http.Request. +*/ +type WaypointServiceListTFCProjectsParams struct { + + // NamespaceID. + NamespaceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the waypoint service list t f c projects params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WaypointServiceListTFCProjectsParams) WithDefaults() *WaypointServiceListTFCProjectsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the waypoint service list t f c projects params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WaypointServiceListTFCProjectsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the waypoint service list t f c projects params +func (o *WaypointServiceListTFCProjectsParams) WithTimeout(timeout time.Duration) *WaypointServiceListTFCProjectsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the waypoint service list t f c projects params +func (o *WaypointServiceListTFCProjectsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the waypoint service list t f c projects params +func (o *WaypointServiceListTFCProjectsParams) WithContext(ctx context.Context) *WaypointServiceListTFCProjectsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the waypoint service list t f c projects params +func (o *WaypointServiceListTFCProjectsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the waypoint service list t f c projects params +func (o *WaypointServiceListTFCProjectsParams) WithHTTPClient(client *http.Client) *WaypointServiceListTFCProjectsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the waypoint service list t f c projects params +func (o *WaypointServiceListTFCProjectsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespaceID adds the namespaceID to the waypoint service list t f c projects params +func (o *WaypointServiceListTFCProjectsParams) WithNamespaceID(namespaceID string) *WaypointServiceListTFCProjectsParams { + o.SetNamespaceID(namespaceID) + return o +} + +// SetNamespaceID adds the namespaceId to the waypoint service list t f c projects params +func (o *WaypointServiceListTFCProjectsParams) SetNamespaceID(namespaceID string) { + o.NamespaceID = namespaceID +} + +// WriteToRequest writes these params to a swagger request +func (o *WaypointServiceListTFCProjectsParams) 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_c_projects_responses.go b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_c_projects_responses.go new file mode 100644 index 00000000..c1ddb497 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/client/waypoint_service/waypoint_service_list_t_f_c_projects_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" +) + +// WaypointServiceListTFCProjectsReader is a Reader for the WaypointServiceListTFCProjects structure. +type WaypointServiceListTFCProjectsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WaypointServiceListTFCProjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWaypointServiceListTFCProjectsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewWaypointServiceListTFCProjectsDefault(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 + } +} + +// NewWaypointServiceListTFCProjectsOK creates a WaypointServiceListTFCProjectsOK with default headers values +func NewWaypointServiceListTFCProjectsOK() *WaypointServiceListTFCProjectsOK { + return &WaypointServiceListTFCProjectsOK{} +} + +/* +WaypointServiceListTFCProjectsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type WaypointServiceListTFCProjectsOK struct { + Payload *models.HashicorpCloudWaypointListTerraformCloudProjectsResponse +} + +// IsSuccess returns true when this waypoint service list t f c projects o k response has a 2xx status code +func (o *WaypointServiceListTFCProjectsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this waypoint service list t f c projects o k response has a 3xx status code +func (o *WaypointServiceListTFCProjectsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this waypoint service list t f c projects o k response has a 4xx status code +func (o *WaypointServiceListTFCProjectsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this waypoint service list t f c projects o k response has a 5xx status code +func (o *WaypointServiceListTFCProjectsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this waypoint service list t f c projects o k response a status code equal to that given +func (o *WaypointServiceListTFCProjectsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the waypoint service list t f c projects o k response +func (o *WaypointServiceListTFCProjectsOK) Code() int { + return 200 +} + +func (o *WaypointServiceListTFCProjectsOK) Error() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tfc-projects][%d] waypointServiceListTFCProjectsOK %+v", 200, o.Payload) +} + +func (o *WaypointServiceListTFCProjectsOK) String() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tfc-projects][%d] waypointServiceListTFCProjectsOK %+v", 200, o.Payload) +} + +func (o *WaypointServiceListTFCProjectsOK) GetPayload() *models.HashicorpCloudWaypointListTerraformCloudProjectsResponse { + return o.Payload +} + +func (o *WaypointServiceListTFCProjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.HashicorpCloudWaypointListTerraformCloudProjectsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewWaypointServiceListTFCProjectsDefault creates a WaypointServiceListTFCProjectsDefault with default headers values +func NewWaypointServiceListTFCProjectsDefault(code int) *WaypointServiceListTFCProjectsDefault { + return &WaypointServiceListTFCProjectsDefault{ + _statusCode: code, + } +} + +/* +WaypointServiceListTFCProjectsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type WaypointServiceListTFCProjectsDefault struct { + _statusCode int + + Payload *cloud.GrpcGatewayRuntimeError +} + +// IsSuccess returns true when this waypoint service list t f c projects default response has a 2xx status code +func (o *WaypointServiceListTFCProjectsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this waypoint service list t f c projects default response has a 3xx status code +func (o *WaypointServiceListTFCProjectsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this waypoint service list t f c projects default response has a 4xx status code +func (o *WaypointServiceListTFCProjectsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this waypoint service list t f c projects default response has a 5xx status code +func (o *WaypointServiceListTFCProjectsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this waypoint service list t f c projects default response a status code equal to that given +func (o *WaypointServiceListTFCProjectsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the waypoint service list t f c projects default response +func (o *WaypointServiceListTFCProjectsDefault) Code() int { + return o._statusCode +} + +func (o *WaypointServiceListTFCProjectsDefault) Error() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tfc-projects][%d] WaypointService_ListTFCProjects default %+v", o._statusCode, o.Payload) +} + +func (o *WaypointServiceListTFCProjectsDefault) String() string { + return fmt.Sprintf("[GET /waypoint/2023-08-18/namespace/{namespace.id}/tfc-projects][%d] WaypointService_ListTFCProjects default %+v", o._statusCode, o.Payload) +} + +func (o *WaypointServiceListTFCProjectsDefault) GetPayload() *cloud.GrpcGatewayRuntimeError { + return o.Payload +} + +func (o *WaypointServiceListTFCProjectsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(cloud.GrpcGatewayRuntimeError) + + // 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 49ef654c..a14edf0c 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 @@ -7,6 +7,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -42,6 +43,9 @@ type HashicorpCloudWaypointAddOn struct { // Unique identifier of the Add-on ID string `json:"id,omitempty"` + // A list of descriptive labels for an Add-on + Labels []string `json:"labels"` + // Name of the Add-on Name string `json:"name,omitempty"` @@ -56,8 +60,8 @@ type HashicorpCloudWaypointAddOn struct { // Short description of the Add-on Summary string `json:"summary,omitempty"` - // A list of descriptive tags for an Add-on - Tags []string `json:"tags"` + // kv tags + Tags []*HashicorpCloudWaypointTag `json:"tags"` // Terraform No Code module used for provisioning the Add-on TerraformNocodeModule *HashicorpCloudWaypointTerraformNocodeModule `json:"terraform_nocode_module,omitempty"` @@ -83,6 +87,10 @@ func (m *HashicorpCloudWaypointAddOn) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateTerraformNocodeModule(formats); err != nil { res = append(res, err) } @@ -162,6 +170,32 @@ func (m *HashicorpCloudWaypointAddOn) validateStatus(formats strfmt.Registry) er return nil } +func (m *HashicorpCloudWaypointAddOn) 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 *HashicorpCloudWaypointAddOn) validateTerraformNocodeModule(formats strfmt.Registry) error { if swag.IsZero(m.TerraformNocodeModule) { // not required return nil @@ -197,6 +231,10 @@ func (m *HashicorpCloudWaypointAddOn) ContextValidate(ctx context.Context, forma res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTerraformNocodeModule(ctx, formats); err != nil { res = append(res, err) } @@ -270,6 +308,31 @@ func (m *HashicorpCloudWaypointAddOn) contextValidateStatus(ctx context.Context, return nil } +func (m *HashicorpCloudWaypointAddOn) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + + if swag.IsZero(m.Tags[i]) { // not required + return nil + } + + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + 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 *HashicorpCloudWaypointAddOn) contextValidateTerraformNocodeModule(ctx context.Context, formats strfmt.Registry) error { if m.TerraformNocodeModule != 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 b81bc423..e4b96480 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 @@ -7,6 +7,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -24,6 +25,9 @@ type HashicorpCloudWaypointAddOnDefinition struct { // Unique identifier of the Add-on definition ID string `json:"id,omitempty"` + // A list of descriptive labels for an Add-on + Labels []string `json:"labels"` + // Name of the Add-on definition Name string `json:"name,omitempty"` @@ -34,8 +38,8 @@ type HashicorpCloudWaypointAddOnDefinition struct { // Short description of the Add-on Summary string `json:"summary,omitempty"` - // A list of descriptive tags for an Add-on - Tags []string `json:"tags"` + // kv tags + Tags []*HashicorpCloudWaypointTag `json:"tags"` // Terraform No Code module used for provisioning the Add-on TerraformNocodeModule *HashicorpCloudWaypointTerraformNocodeModule `json:"terraform_nocode_module,omitempty"` @@ -48,6 +52,10 @@ type HashicorpCloudWaypointAddOnDefinition struct { func (m *HashicorpCloudWaypointAddOnDefinition) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateTerraformNocodeModule(formats); err != nil { res = append(res, err) } @@ -58,6 +66,32 @@ func (m *HashicorpCloudWaypointAddOnDefinition) Validate(formats strfmt.Registry return nil } +func (m *HashicorpCloudWaypointAddOnDefinition) 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 *HashicorpCloudWaypointAddOnDefinition) validateTerraformNocodeModule(formats strfmt.Registry) error { if swag.IsZero(m.TerraformNocodeModule) { // not required return nil @@ -81,6 +115,10 @@ func (m *HashicorpCloudWaypointAddOnDefinition) validateTerraformNocodeModule(fo func (m *HashicorpCloudWaypointAddOnDefinition) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTerraformNocodeModule(ctx, formats); err != nil { res = append(res, err) } @@ -91,6 +129,31 @@ func (m *HashicorpCloudWaypointAddOnDefinition) ContextValidate(ctx context.Cont return nil } +func (m *HashicorpCloudWaypointAddOnDefinition) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + + if swag.IsZero(m.Tags[i]) { // not required + return nil + } + + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + 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 *HashicorpCloudWaypointAddOnDefinition) contextValidateTerraformNocodeModule(ctx context.Context, formats strfmt.Registry) error { if m.TerraformNocodeModule != nil { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_application.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_application.go index d8521aea..aa40079e 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_application.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_application.go @@ -7,6 +7,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -18,7 +19,10 @@ import ( // swagger:model hashicorp.cloud.waypoint.Application type HashicorpCloudWaypointApplication struct { - // application template + // An application can have 0-Many action configs + ActionCfgRef []*HashicorpCloudWaypointActionsdriverActionCfgRef `json:"action_cfg_ref"` + + // The reference of the template this application was generated from ApplicationTemplate *HashicorpCloudWaypointRefApplicationTemplate `json:"application_template,omitempty"` // id @@ -32,7 +36,10 @@ type HashicorpCloudWaypointApplication struct { // Format: byte ReadmeMarkdown strfmt.Base64 `json:"readme_markdown,omitempty"` - // template name + // tags + Tags []*HashicorpCloudWaypointTag `json:"tags"` + + // The name of the template this application was generated from TemplateName string `json:"template_name,omitempty"` } @@ -40,16 +47,50 @@ type HashicorpCloudWaypointApplication struct { func (m *HashicorpCloudWaypointApplication) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateActionCfgRef(formats); err != nil { + res = append(res, err) + } + if err := m.validateApplicationTemplate(formats); err != nil { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +func (m *HashicorpCloudWaypointApplication) validateActionCfgRef(formats strfmt.Registry) error { + if swag.IsZero(m.ActionCfgRef) { // not required + return nil + } + + for i := 0; i < len(m.ActionCfgRef); i++ { + if swag.IsZero(m.ActionCfgRef[i]) { // not required + continue + } + + if m.ActionCfgRef[i] != nil { + if err := m.ActionCfgRef[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("action_cfg_ref" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("action_cfg_ref" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *HashicorpCloudWaypointApplication) validateApplicationTemplate(formats strfmt.Registry) error { if swag.IsZero(m.ApplicationTemplate) { // not required return nil @@ -69,20 +110,79 @@ func (m *HashicorpCloudWaypointApplication) validateApplicationTemplate(formats return nil } +func (m *HashicorpCloudWaypointApplication) 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 +} + // ContextValidate validate this hashicorp cloud waypoint application based on the context it is used func (m *HashicorpCloudWaypointApplication) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateActionCfgRef(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateApplicationTemplate(ctx, formats); err != nil { res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +func (m *HashicorpCloudWaypointApplication) contextValidateActionCfgRef(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ActionCfgRef); i++ { + + if m.ActionCfgRef[i] != nil { + + if swag.IsZero(m.ActionCfgRef[i]) { // not required + return nil + } + + if err := m.ActionCfgRef[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("action_cfg_ref" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("action_cfg_ref" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *HashicorpCloudWaypointApplication) contextValidateApplicationTemplate(ctx context.Context, formats strfmt.Registry) error { if m.ApplicationTemplate != nil { @@ -104,6 +204,31 @@ func (m *HashicorpCloudWaypointApplication) contextValidateApplicationTemplate(c return nil } +func (m *HashicorpCloudWaypointApplication) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + + if swag.IsZero(m.Tags[i]) { // not required + return nil + } + + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + 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 +} + // MarshalBinary interface implementation func (m *HashicorpCloudWaypointApplication) MarshalBinary() ([]byte, error) { if m == nil { 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 b43cab1e..34d93d96 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 @@ -7,6 +7,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -25,6 +26,9 @@ type HashicorpCloudWaypointApplicationTemplate struct { // Unique ID of the ApplicationTemplate ID string `json:"id,omitempty"` + // A list of descriptive strings that can be applied to the ApplicationTemplate. + Labels []string `json:"labels"` + // Unique name of the ApplicationTemplate Name string `json:"name,omitempty"` @@ -41,8 +45,13 @@ type HashicorpCloudWaypointApplicationTemplate struct { // multiple templates Summary string `json:"summary,omitempty"` - // A list of descriptive strings that can be applied to the ApplicationTemplate. - Tags []string `json:"tags"` + // kv tags + // see infrastructure.proto + Tags []*HashicorpCloudWaypointTag `json:"tags"` + + // The information on meta data on the Terraform Cloud workspace that was + // created when this project was created from a template. + TerraformCloudWorkspaceDetails *HashicorpCloudWaypointTerraformCloudWorkspaceDetails `json:"terraform_cloud_workspace_details,omitempty"` // The Terraform No-Code Module which should be used to provision // infrastructure that is used by the application created from a ApplicationTemplate. @@ -53,6 +62,14 @@ type HashicorpCloudWaypointApplicationTemplate struct { func (m *HashicorpCloudWaypointApplicationTemplate) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTerraformCloudWorkspaceDetails(formats); err != nil { + res = append(res, err) + } + if err := m.validateTerraformNocodeModule(formats); err != nil { res = append(res, err) } @@ -63,6 +80,51 @@ func (m *HashicorpCloudWaypointApplicationTemplate) Validate(formats strfmt.Regi return nil } +func (m *HashicorpCloudWaypointApplicationTemplate) 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 *HashicorpCloudWaypointApplicationTemplate) validateTerraformCloudWorkspaceDetails(formats strfmt.Registry) error { + if swag.IsZero(m.TerraformCloudWorkspaceDetails) { // not required + return nil + } + + if m.TerraformCloudWorkspaceDetails != nil { + if err := m.TerraformCloudWorkspaceDetails.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("terraform_cloud_workspace_details") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("terraform_cloud_workspace_details") + } + return err + } + } + + return nil +} + func (m *HashicorpCloudWaypointApplicationTemplate) validateTerraformNocodeModule(formats strfmt.Registry) error { if swag.IsZero(m.TerraformNocodeModule) { // not required return nil @@ -86,6 +148,14 @@ func (m *HashicorpCloudWaypointApplicationTemplate) validateTerraformNocodeModul func (m *HashicorpCloudWaypointApplicationTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTerraformCloudWorkspaceDetails(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTerraformNocodeModule(ctx, formats); err != nil { res = append(res, err) } @@ -96,6 +166,52 @@ func (m *HashicorpCloudWaypointApplicationTemplate) ContextValidate(ctx context. return nil } +func (m *HashicorpCloudWaypointApplicationTemplate) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + + if swag.IsZero(m.Tags[i]) { // not required + return nil + } + + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + 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 *HashicorpCloudWaypointApplicationTemplate) contextValidateTerraformCloudWorkspaceDetails(ctx context.Context, formats strfmt.Registry) error { + + if m.TerraformCloudWorkspaceDetails != nil { + + if swag.IsZero(m.TerraformCloudWorkspaceDetails) { // not required + return nil + } + + if err := m.TerraformCloudWorkspaceDetails.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("terraform_cloud_workspace_details") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("terraform_cloud_workspace_details") + } + return err + } + } + + return nil +} + func (m *HashicorpCloudWaypointApplicationTemplate) contextValidateTerraformNocodeModule(ctx context.Context, formats strfmt.Registry) error { if m.TerraformNocodeModule != nil { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_create_add_on_definition_request.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_create_add_on_definition_request.go index 1e16434d..e0370d84 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_create_add_on_definition_request.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_create_add_on_definition_request.go @@ -22,6 +22,9 @@ type HashicorpCloudWaypointCreateAddOnDefinitionRequest struct { // Longer description of the Add-on Description string `json:"description,omitempty"` + // A list of descriptive labels for an Add-on + Labels []string `json:"labels"` + // Name of the Add-on definition Name string `json:"name,omitempty"` @@ -35,9 +38,6 @@ type HashicorpCloudWaypointCreateAddOnDefinitionRequest struct { // Short description of the Add-on Summary string `json:"summary,omitempty"` - // A list of descriptive tags for an Add-on - Tags []string `json:"tags"` - // Terraform No Code module used for provisioning the Add-on TerraformNocodeModule *HashicorpCloudWaypointTerraformNocodeModule `json:"terraform_nocode_module,omitempty"` diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_create_namespace_response.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_create_namespace_response.go index bdbf225c..1b9a5edb 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_create_namespace_response.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_create_namespace_response.go @@ -11,7 +11,6 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - cloud "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models" ) // HashicorpCloudWaypointCreateNamespaceResponse hashicorp cloud waypoint create namespace response @@ -21,9 +20,6 @@ type HashicorpCloudWaypointCreateNamespaceResponse struct { // namespace Namespace *HashicorpCloudWaypointNamespace `json:"namespace,omitempty"` - - // operation - Operation *cloud.HashicorpCloudOperationOperation `json:"operation,omitempty"` } // Validate validates this hashicorp cloud waypoint create namespace response @@ -34,10 +30,6 @@ func (m *HashicorpCloudWaypointCreateNamespaceResponse) Validate(formats strfmt. res = append(res, err) } - if err := m.validateOperation(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -63,25 +55,6 @@ func (m *HashicorpCloudWaypointCreateNamespaceResponse) validateNamespace(format return nil } -func (m *HashicorpCloudWaypointCreateNamespaceResponse) validateOperation(formats strfmt.Registry) error { - if swag.IsZero(m.Operation) { // not required - return nil - } - - if m.Operation != nil { - if err := m.Operation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operation") - } - return err - } - } - - return nil -} - // ContextValidate validate this hashicorp cloud waypoint create namespace response based on the context it is used func (m *HashicorpCloudWaypointCreateNamespaceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -90,10 +63,6 @@ func (m *HashicorpCloudWaypointCreateNamespaceResponse) ContextValidate(ctx cont res = append(res, err) } - if err := m.contextValidateOperation(ctx, formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -121,27 +90,6 @@ func (m *HashicorpCloudWaypointCreateNamespaceResponse) contextValidateNamespace return nil } -func (m *HashicorpCloudWaypointCreateNamespaceResponse) contextValidateOperation(ctx context.Context, formats strfmt.Registry) error { - - if m.Operation != nil { - - if swag.IsZero(m.Operation) { // not required - return nil - } - - if err := m.Operation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operation") - } - return err - } - } - - return nil -} - // MarshalBinary interface implementation func (m *HashicorpCloudWaypointCreateNamespaceResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_get_t_f_module_details_response.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_get_t_f_module_details_response.go new file mode 100644 index 00000000..2e98ce6f --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_get_t_f_module_details_response.go @@ -0,0 +1,109 @@ +// 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" +) + +// HashicorpCloudWaypointGetTFModuleDetailsResponse hashicorp cloud waypoint get t f module details response +// +// swagger:model hashicorp.cloud.waypoint.GetTFModuleDetailsResponse +type HashicorpCloudWaypointGetTFModuleDetailsResponse struct { + + // module details + ModuleDetails *HashicorpCloudWaypointTFModuleDetails `json:"module_details,omitempty"` +} + +// Validate validates this hashicorp cloud waypoint get t f module details response +func (m *HashicorpCloudWaypointGetTFModuleDetailsResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateModuleDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *HashicorpCloudWaypointGetTFModuleDetailsResponse) validateModuleDetails(formats strfmt.Registry) error { + if swag.IsZero(m.ModuleDetails) { // not required + return nil + } + + if m.ModuleDetails != nil { + if err := m.ModuleDetails.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module_details") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module_details") + } + return err + } + } + + return nil +} + +// ContextValidate validate this hashicorp cloud waypoint get t f module details response based on the context it is used +func (m *HashicorpCloudWaypointGetTFModuleDetailsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateModuleDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *HashicorpCloudWaypointGetTFModuleDetailsResponse) contextValidateModuleDetails(ctx context.Context, formats strfmt.Registry) error { + + if m.ModuleDetails != nil { + + if swag.IsZero(m.ModuleDetails) { // not required + return nil + } + + if err := m.ModuleDetails.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module_details") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module_details") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *HashicorpCloudWaypointGetTFModuleDetailsResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *HashicorpCloudWaypointGetTFModuleDetailsResponse) UnmarshalBinary(b []byte) error { + var res HashicorpCloudWaypointGetTFModuleDetailsResponse + 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_list_add_ons_response.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_add_ons_response.go index b5b0515c..64de84d7 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_add_ons_response.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_add_ons_response.go @@ -25,6 +25,9 @@ type HashicorpCloudWaypointListAddOnsResponse struct { // pagination Pagination *cloud.HashicorpCloudCommonPaginationResponse `json:"pagination,omitempty"` + + // Will return -1 if request has a with_total_count = false or is with_total_count parameter is omitted. + TotalCount string `json:"total_count,omitempty"` } // Validate validates this hashicorp cloud waypoint list add ons response diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_application_templates_response.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_application_templates_response.go index 8f2fed33..0539f8dd 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_application_templates_response.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_application_templates_response.go @@ -26,7 +26,7 @@ type HashicorpCloudWaypointListApplicationTemplatesResponse struct { // pagination Pagination *cloud.HashicorpCloudCommonPaginationResponse `json:"pagination,omitempty"` - // total count + // Will return -1 if request has a with_total_count = false or is with_total_count parameter is omitted. TotalCount string `json:"total_count,omitempty"` } diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_applications_response.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_applications_response.go index e8bdc10d..240b8057 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_applications_response.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_applications_response.go @@ -12,6 +12,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + cloud "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models" ) // HashicorpCloudWaypointListApplicationsResponse hashicorp cloud waypoint list applications response @@ -23,7 +24,10 @@ type HashicorpCloudWaypointListApplicationsResponse struct { Applications []*HashicorpCloudWaypointApplication `json:"applications"` // pagination - Pagination *HashicorpCloudWaypointPaginationResponse `json:"pagination,omitempty"` + Pagination *cloud.HashicorpCloudCommonPaginationResponse `json:"pagination,omitempty"` + + // Will return -1 if request has a with_total_count = false or is with_total_count parameter is omitted. + TotalCount string `json:"total_count,omitempty"` } // Validate validates this hashicorp cloud waypoint list applications response diff --git a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_t_f_c_organizations_response.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_t_f_c_organizations_response.go new file mode 100644 index 00000000..5be41578 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_t_f_c_organizations_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" +) + +// HashicorpCloudWaypointListTFCOrganizationsResponse hashicorp cloud waypoint list t f c organizations response +// +// swagger:model hashicorp.cloud.waypoint.ListTFCOrganizationsResponse +type HashicorpCloudWaypointListTFCOrganizationsResponse struct { + + // tfc organizations + TfcOrganizations []*HashicorpCloudWaypointTFCOrganization `json:"tfc_organizations"` +} + +// Validate validates this hashicorp cloud waypoint list t f c organizations response +func (m *HashicorpCloudWaypointListTFCOrganizationsResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTfcOrganizations(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *HashicorpCloudWaypointListTFCOrganizationsResponse) validateTfcOrganizations(formats strfmt.Registry) error { + if swag.IsZero(m.TfcOrganizations) { // not required + return nil + } + + for i := 0; i < len(m.TfcOrganizations); i++ { + if swag.IsZero(m.TfcOrganizations[i]) { // not required + continue + } + + if m.TfcOrganizations[i] != nil { + if err := m.TfcOrganizations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tfc_organizations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tfc_organizations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this hashicorp cloud waypoint list t f c organizations response based on the context it is used +func (m *HashicorpCloudWaypointListTFCOrganizationsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTfcOrganizations(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *HashicorpCloudWaypointListTFCOrganizationsResponse) contextValidateTfcOrganizations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.TfcOrganizations); i++ { + + if m.TfcOrganizations[i] != nil { + + if swag.IsZero(m.TfcOrganizations[i]) { // not required + return nil + } + + if err := m.TfcOrganizations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tfc_organizations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tfc_organizations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *HashicorpCloudWaypointListTFCOrganizationsResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *HashicorpCloudWaypointListTFCOrganizationsResponse) UnmarshalBinary(b []byte) error { + var res HashicorpCloudWaypointListTFCOrganizationsResponse + 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_list_terraform_cloud_projects_response.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_terraform_cloud_projects_response.go new file mode 100644 index 00000000..17463bd3 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_list_terraform_cloud_projects_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" +) + +// HashicorpCloudWaypointListTerraformCloudProjectsResponse hashicorp cloud waypoint list terraform cloud projects response +// +// swagger:model hashicorp.cloud.waypoint.ListTerraformCloudProjectsResponse +type HashicorpCloudWaypointListTerraformCloudProjectsResponse struct { + + // tfc projects + TfcProjects []*HashicorpCloudWaypointTerraformCloudProject `json:"tfc_projects"` +} + +// Validate validates this hashicorp cloud waypoint list terraform cloud projects response +func (m *HashicorpCloudWaypointListTerraformCloudProjectsResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTfcProjects(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *HashicorpCloudWaypointListTerraformCloudProjectsResponse) validateTfcProjects(formats strfmt.Registry) error { + if swag.IsZero(m.TfcProjects) { // not required + return nil + } + + for i := 0; i < len(m.TfcProjects); i++ { + if swag.IsZero(m.TfcProjects[i]) { // not required + continue + } + + if m.TfcProjects[i] != nil { + if err := m.TfcProjects[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tfc_projects" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tfc_projects" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this hashicorp cloud waypoint list terraform cloud projects response based on the context it is used +func (m *HashicorpCloudWaypointListTerraformCloudProjectsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTfcProjects(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *HashicorpCloudWaypointListTerraformCloudProjectsResponse) contextValidateTfcProjects(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.TfcProjects); i++ { + + if m.TfcProjects[i] != nil { + + if swag.IsZero(m.TfcProjects[i]) { // not required + return nil + } + + if err := m.TfcProjects[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tfc_projects" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tfc_projects" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *HashicorpCloudWaypointListTerraformCloudProjectsResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *HashicorpCloudWaypointListTerraformCloudProjectsResponse) UnmarshalBinary(b []byte) error { + var res HashicorpCloudWaypointListTerraformCloudProjectsResponse + 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_pagination_request.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_pagination_request.go deleted file mode 100644 index f01b01c8..00000000 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_pagination_request.go +++ /dev/null @@ -1,64 +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" -) - -// HashicorpCloudWaypointPaginationRequest https://github.com/hashicorp/cloud-api/blob/master/hashicorp/cloud/common/pagination.proto -// PaginationRequest are the parameters for a paginated list request. -// -// swagger:model hashicorp.cloud.waypoint.PaginationRequest -type HashicorpCloudWaypointPaginationRequest struct { - - // Specifies a page token to use to retrieve the next page. Set this to the - // `next_page_token` returned by previous list requests to get the next page of - // results. If set, `previous_page_token` must not be set. - NextPageToken string `json:"next_page_token,omitempty"` - - // The max number of results per page that should be returned. If the number - // of available results is larger than `page_size`, a `next_page_token` is - // returned which can be used to get the next page of results in subsequent - // requests. A value of zero will cause `page_size` to be defaulted. - PageSize int64 `json:"page_size,omitempty"` - - // Specifies a page token to use to retrieve the previous page. Set this to - // the `previous_page_token` returned by previous list requests to get the - // previous page of results. If set, `next_page_token` must not be set. - PreviousPageToken string `json:"previous_page_token,omitempty"` -} - -// Validate validates this hashicorp cloud waypoint pagination request -func (m *HashicorpCloudWaypointPaginationRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hashicorp cloud waypoint pagination request based on context it is used -func (m *HashicorpCloudWaypointPaginationRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HashicorpCloudWaypointPaginationRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HashicorpCloudWaypointPaginationRequest) UnmarshalBinary(b []byte) error { - var res HashicorpCloudWaypointPaginationRequest - 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_pagination_response.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_pagination_response.go deleted file mode 100644 index 2ae87484..00000000 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_pagination_response.go +++ /dev/null @@ -1,61 +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" -) - -// HashicorpCloudWaypointPaginationResponse PaginationResponse is the response holding the page tokens for a paginated -// list response. -// -// swagger:model hashicorp.cloud.waypoint.PaginationResponse -type HashicorpCloudWaypointPaginationResponse struct { - - // This token allows you to get the next page of results for list requests. - // If the number of results is larger than `page_size`, use the - // `next_page_token` as a value for the query parameter `next_page_token` in - // the next request. The value will become empty when there are no more pages. - NextPageToken string `json:"next_page_token,omitempty"` - - // This token allows you to get the previous page of results for list - // requests. If the number of results is larger than `page_size`, use the - // `previous_page_token` as a value for the query parameter - // `previous_page_token` in the next request. The value will become empty when - // there are no more pages. - PreviousPageToken string `json:"previous_page_token,omitempty"` -} - -// Validate validates this hashicorp cloud waypoint pagination response -func (m *HashicorpCloudWaypointPaginationResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hashicorp cloud waypoint pagination response based on context it is used -func (m *HashicorpCloudWaypointPaginationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HashicorpCloudWaypointPaginationResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HashicorpCloudWaypointPaginationResponse) UnmarshalBinary(b []byte) error { - var res HashicorpCloudWaypointPaginationResponse - 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_c_organization.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_t_f_c_organization.go new file mode 100644 index 00000000..803b089e --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_t_f_c_organization.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" +) + +// HashicorpCloudWaypointTFCOrganization hashicorp cloud waypoint t f c organization +// +// swagger:model hashicorp.cloud.waypoint.TFCOrganization +type HashicorpCloudWaypointTFCOrganization struct { + + // id + ID string `json:"id,omitempty"` +} + +// Validate validates this hashicorp cloud waypoint t f c organization +func (m *HashicorpCloudWaypointTFCOrganization) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this hashicorp cloud waypoint t f c organization based on context it is used +func (m *HashicorpCloudWaypointTFCOrganization) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *HashicorpCloudWaypointTFCOrganization) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *HashicorpCloudWaypointTFCOrganization) UnmarshalBinary(b []byte) error { + var res HashicorpCloudWaypointTFCOrganization + 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_details.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_t_f_module_details.go new file mode 100644 index 00000000..0facdbcd --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_t_f_module_details.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" +) + +// HashicorpCloudWaypointTFModuleDetails hashicorp cloud waypoint t f module details +// +// swagger:model hashicorp.cloud.waypoint.TFModuleDetails +type HashicorpCloudWaypointTFModuleDetails struct { + + // readme + Readme string `json:"readme,omitempty"` +} + +// Validate validates this hashicorp cloud waypoint t f module details +func (m *HashicorpCloudWaypointTFModuleDetails) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this hashicorp cloud waypoint t f module details based on context it is used +func (m *HashicorpCloudWaypointTFModuleDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *HashicorpCloudWaypointTFModuleDetails) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *HashicorpCloudWaypointTFModuleDetails) UnmarshalBinary(b []byte) error { + var res HashicorpCloudWaypointTFModuleDetails + 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_tag.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_tag.go new file mode 100644 index 00000000..84d28583 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_tag.go @@ -0,0 +1,53 @@ +// 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" +) + +// HashicorpCloudWaypointTag hashicorp cloud waypoint tag +// +// swagger:model hashicorp.cloud.waypoint.Tag +type HashicorpCloudWaypointTag struct { + + // the key identifier for this tag. + Key string `json:"key,omitempty"` + + // value for the tag. Key/value pairs must be unique for a given resource + Value string `json:"value,omitempty"` +} + +// Validate validates this hashicorp cloud waypoint tag +func (m *HashicorpCloudWaypointTag) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this hashicorp cloud waypoint tag based on context it is used +func (m *HashicorpCloudWaypointTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *HashicorpCloudWaypointTag) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *HashicorpCloudWaypointTag) UnmarshalBinary(b []byte) error { + var res HashicorpCloudWaypointTag + 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_terraform_cloud_project.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_terraform_cloud_project.go new file mode 100644 index 00000000..d248afa4 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_terraform_cloud_project.go @@ -0,0 +1,53 @@ +// 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" +) + +// HashicorpCloudWaypointTerraformCloudProject hashicorp cloud waypoint terraform cloud project +// +// swagger:model hashicorp.cloud.waypoint.TerraformCloudProject +type HashicorpCloudWaypointTerraformCloudProject struct { + + // The project name for the Terraform cloud project. + Name string `json:"name,omitempty"` + + // The id of the Terraform cloud project. + ProjectID string `json:"project_id,omitempty"` +} + +// Validate validates this hashicorp cloud waypoint terraform cloud project +func (m *HashicorpCloudWaypointTerraformCloudProject) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this hashicorp cloud waypoint terraform cloud project based on context it is used +func (m *HashicorpCloudWaypointTerraformCloudProject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *HashicorpCloudWaypointTerraformCloudProject) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *HashicorpCloudWaypointTerraformCloudProject) UnmarshalBinary(b []byte) error { + var res HashicorpCloudWaypointTerraformCloudProject + 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_terraform_cloud_workspace_details.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_terraform_cloud_workspace_details.go new file mode 100644 index 00000000..7a7ce176 --- /dev/null +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_terraform_cloud_workspace_details.go @@ -0,0 +1,53 @@ +// 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" +) + +// HashicorpCloudWaypointTerraformCloudWorkspaceDetails hashicorp cloud waypoint terraform cloud workspace details +// +// swagger:model hashicorp.cloud.waypoint.TerraformCloudWorkspaceDetails +type HashicorpCloudWaypointTerraformCloudWorkspaceDetails struct { + + // The project name for the Terraform Cloud project. + Name string `json:"name,omitempty"` + + // The id of the Terraform Cloud project. + ProjectID string `json:"project_id,omitempty"` +} + +// Validate validates this hashicorp cloud waypoint terraform cloud workspace details +func (m *HashicorpCloudWaypointTerraformCloudWorkspaceDetails) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this hashicorp cloud waypoint terraform cloud workspace details based on context it is used +func (m *HashicorpCloudWaypointTerraformCloudWorkspaceDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *HashicorpCloudWaypointTerraformCloudWorkspaceDetails) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *HashicorpCloudWaypointTerraformCloudWorkspaceDetails) UnmarshalBinary(b []byte) error { + var res HashicorpCloudWaypointTerraformCloudWorkspaceDetails + 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_update_add_on_definition_request.go b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_update_add_on_definition_request.go index 64995a13..eced4ac0 100644 --- a/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_update_add_on_definition_request.go +++ b/clients/cloud-waypoint-service/preview/2023-08-18/models/hashicorp_cloud_waypoint_update_add_on_definition_request.go @@ -25,6 +25,9 @@ type HashicorpCloudWaypointUpdateAddOnDefinitionRequest struct { // Reference to an existing Add-on ExistingAddOnDefinition *HashicorpCloudWaypointRefAddOnDefinition `json:"existing_add_on_definition,omitempty"` + // A list of descriptive labels for an Add-on + Labels []string `json:"labels"` + // Name of the Add-on definition Name string `json:"name,omitempty"` @@ -38,9 +41,6 @@ type HashicorpCloudWaypointUpdateAddOnDefinitionRequest struct { // Short description of the Add-on Summary string `json:"summary,omitempty"` - // A list of descriptive tags for an Add-on - Tags []string `json:"tags"` - // Terraform No Code module used for provisioning the Add-on TerraformNocodeModule *HashicorpCloudWaypointTerraformNocodeModule `json:"terraform_nocode_module,omitempty"`