# Go API client for client

TiDB Cloud Dedicated Open API.

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.  By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: v1beta1
- Package version: 1.0.0
- Generator version: 7.7.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen

## Installation

Install the following dependencies:

```sh
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
```

Put the package under your project folder and add the following in import:

```go
import client "github.com/GIT_USER_ID/GIT_REPO_ID"
```

To use a proxy, set the environment variable `HTTP_PROXY`:

```go
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
```

## Configuration of Server URL

Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.

### Select Server Configuration

For using other server than the one defined on index 0 set context value `client.ContextServerIndex` of type `int`.

```go
ctx := context.WithValue(context.Background(), client.ContextServerIndex, 1)
```

### Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value `client.ContextServerVariables` of type `map[string]string`.

```go
ctx := context.WithValue(context.Background(), client.ContextServerVariables, map[string]string{
	"basePath": "v2",
})
```

Note, enum values are always validated and all unused variables are silently ignored.

### URLs Configuration per Operation

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `client.ContextOperationServerIndices` and `client.ContextOperationServerVariables` context maps.

```go
ctx := context.WithValue(context.Background(), client.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), client.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})
```

## Documentation for API Endpoints

All URIs are relative to *https://dedicated.tidbapi.com/api/v2023//dedicated/v1beta1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ClusterServiceAPI* | [**ClusterServiceCreateCluster**](docs/ClusterServiceAPI.md#clusterservicecreatecluster) | **Post** /api/v2023/dedicated/v1beta1/clusters | Create a cluster
*ClusterServiceAPI* | [**ClusterServiceDeleteCluster**](docs/ClusterServiceAPI.md#clusterservicedeletecluster) | **Delete** /api/v2023/dedicated/v1beta1/clusters/{clusterId} | Delete a cluster
*ClusterServiceAPI* | [**ClusterServiceGetCluster**](docs/ClusterServiceAPI.md#clusterservicegetcluster) | **Get** /api/v2023/dedicated/v1beta1/clusters/{clusterId} | Get a cluster
*ClusterServiceAPI* | [**ClusterServiceGetNodeInstance**](docs/ClusterServiceAPI.md#clusterservicegetnodeinstance) | **Get** /api/v2023/dedicated/v1beta1/clusters/{clusterId}/nodeInstances/{instanceId} | Get a node instance
*ClusterServiceAPI* | [**ClusterServiceListClusters**](docs/ClusterServiceAPI.md#clusterservicelistclusters) | **Get** /api/v2023/dedicated/v1beta1/clusters | List clusters
*ClusterServiceAPI* | [**ClusterServiceListNodeInstances**](docs/ClusterServiceAPI.md#clusterservicelistnodeinstances) | **Get** /api/v2023/dedicated/v1beta1/clusters/{clusterId}/nodeInstances | List node instances
*ClusterServiceAPI* | [**ClusterServicePauseCluster**](docs/ClusterServiceAPI.md#clusterservicepausecluster) | **Post** /api/v2023/dedicated/v1beta1/clusters/{clusterId}:pauseCluster | Pause a cluster
*ClusterServiceAPI* | [**ClusterServiceResetRootPassword**](docs/ClusterServiceAPI.md#clusterserviceresetrootpassword) | **Post** /api/v2023/dedicated/v1beta1/clusters/{clusterId}:resetRootPassword | Reset the root password of a cluster
*ClusterServiceAPI* | [**ClusterServiceResumeCluster**](docs/ClusterServiceAPI.md#clusterserviceresumecluster) | **Post** /api/v2023/dedicated/v1beta1/clusters/{clusterId}:resumeCluster | Resume a cluster
*ClusterServiceAPI* | [**ClusterServiceShowNodeQuota**](docs/ClusterServiceAPI.md#clusterserviceshownodequota) | **Get** /api/v2023/dedicated/v1beta1/clusters:showNodeQuota | Show node quota across the caller&#39;s organization
*ClusterServiceAPI* | [**ClusterServiceUpdateCluster**](docs/ClusterServiceAPI.md#clusterserviceupdatecluster) | **Patch** /api/v2023/dedicated/v1beta1/clusters/{clusterId} | Update a cluster
*MaintenanceServiceAPI* | [**MaintenanceServiceDeferMaintenanceTask**](docs/MaintenanceServiceAPI.md#maintenanceservicedefermaintenancetask) | **Post** /api/v2023/dedicated/v1beta1/maintenanceTasks/{maintenanceTaskId}:deferMaintenanceTask | Defer a maintenance task
*MaintenanceServiceAPI* | [**MaintenanceServiceGetMaintenanceTask**](docs/MaintenanceServiceAPI.md#maintenanceservicegetmaintenancetask) | **Get** /api/v2023/dedicated/v1beta1/maintenanceTasks/{maintenanceTaskId} | Get a maintenance task
*MaintenanceServiceAPI* | [**MaintenanceServiceGetMaintenanceWindow**](docs/MaintenanceServiceAPI.md#maintenanceservicegetmaintenancewindow) | **Get** /api/v2023/dedicated/v1beta1/maintenanceWindows/{maintenanceWindowId} | Get a maintenance window
*MaintenanceServiceAPI* | [**MaintenanceServiceListMaintenanceTasks**](docs/MaintenanceServiceAPI.md#maintenanceservicelistmaintenancetasks) | **Get** /api/v2023/dedicated/v1beta1/maintenanceTasks | List maintenance tasks
*MaintenanceServiceAPI* | [**MaintenanceServiceListMaintenanceWindows**](docs/MaintenanceServiceAPI.md#maintenanceservicelistmaintenancewindows) | **Get** /api/v2023/dedicated/v1beta1/maintenanceWindows | List maintenance windows
*MaintenanceServiceAPI* | [**MaintenanceServiceUpdateMaintenanceWindow**](docs/MaintenanceServiceAPI.md#maintenanceserviceupdatemaintenancewindow) | **Patch** /api/v2023/dedicated/v1beta1/maintenanceWindows/{maintenanceWindow.maintenanceWindowId} | Update a maintenance window
*NetworkContainerServiceAPI* | [**NetworkContainerServiceCreateNetworkContainer**](docs/NetworkContainerServiceAPI.md#networkcontainerservicecreatenetworkcontainer) | **Post** /api/v2023/dedicated/v1beta1/networkContainers | Create a network container
*NetworkContainerServiceAPI* | [**NetworkContainerServiceCreateVpcPeering**](docs/NetworkContainerServiceAPI.md#networkcontainerservicecreatevpcpeering) | **Post** /api/v2023/dedicated/v1beta1/vpcPeerings | Create a VPC peering
*NetworkContainerServiceAPI* | [**NetworkContainerServiceDeleteNetworkContainer**](docs/NetworkContainerServiceAPI.md#networkcontainerservicedeletenetworkcontainer) | **Delete** /api/v2023/dedicated/v1beta1/networkContainers/{networkContainerId} | Delete a network container
*NetworkContainerServiceAPI* | [**NetworkContainerServiceDeleteVpcPeering**](docs/NetworkContainerServiceAPI.md#networkcontainerservicedeletevpcpeering) | **Delete** /api/v2023/dedicated/v1beta1/vpcPeerings/{vpcPeeringId} | Delete a VPC peering
*NetworkContainerServiceAPI* | [**NetworkContainerServiceGetNetworkContainer**](docs/NetworkContainerServiceAPI.md#networkcontainerservicegetnetworkcontainer) | **Get** /api/v2023/dedicated/v1beta1/networkContainers/{networkContainerId} | Get a network container
*NetworkContainerServiceAPI* | [**NetworkContainerServiceGetVpcPeering**](docs/NetworkContainerServiceAPI.md#networkcontainerservicegetvpcpeering) | **Get** /api/v2023/dedicated/v1beta1/vpcPeerings/{vpcPeeringId} | Get a VPC peering
*NetworkContainerServiceAPI* | [**NetworkContainerServiceListNetworkContainers**](docs/NetworkContainerServiceAPI.md#networkcontainerservicelistnetworkcontainers) | **Get** /api/v2023/dedicated/v1beta1/networkContainers | List network containers
*NetworkContainerServiceAPI* | [**NetworkContainerServiceListVpcPeerings**](docs/NetworkContainerServiceAPI.md#networkcontainerservicelistvpcpeerings) | **Get** /api/v2023/dedicated/v1beta1/vpcPeerings | List VPC peerings
*PrivateEndpointConnectionServiceAPI* | [**PrivateEndpointConnectionServiceCreatePrivateEndpointConnection**](docs/PrivateEndpointConnectionServiceAPI.md#privateendpointconnectionservicecreateprivateendpointconnection) | **Post** /api/v2023/dedicated/v1beta1/clusters/{clusterId}/tidbNodeGroups/{privateEndpointConnection.tidbNodeGroupId}/privateEndpointConnections | Create a private endpoint connection
*PrivateEndpointConnectionServiceAPI* | [**PrivateEndpointConnectionServiceDeletePrivateEndpointConnection**](docs/PrivateEndpointConnectionServiceAPI.md#privateendpointconnectionservicedeleteprivateendpointconnection) | **Delete** /api/v2023/dedicated/v1beta1/clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId}/privateEndpointConnections/{privateEndpointConnectionId} | Delete a private endpoint connection
*PrivateEndpointConnectionServiceAPI* | [**PrivateEndpointConnectionServiceGetPrivateEndpointConnection**](docs/PrivateEndpointConnectionServiceAPI.md#privateendpointconnectionservicegetprivateendpointconnection) | **Get** /api/v2023/dedicated/v1beta1/clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId}/privateEndpointConnections/{privateEndpointConnectionId} | Get a private endpoint connection
*PrivateEndpointConnectionServiceAPI* | [**PrivateEndpointConnectionServiceGetPrivateLinkService**](docs/PrivateEndpointConnectionServiceAPI.md#privateendpointconnectionservicegetprivatelinkservice) | **Get** /api/v2023/dedicated/v1beta1/clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId}/privateLinkService | Get the private link service of a TiDB Node Group
*PrivateEndpointConnectionServiceAPI* | [**PrivateEndpointConnectionServiceListPrivateEndpointConnections**](docs/PrivateEndpointConnectionServiceAPI.md#privateendpointconnectionservicelistprivateendpointconnections) | **Get** /api/v2023/dedicated/v1beta1/clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId}/privateEndpointConnections | List private endpoint connections
*RegionServiceAPI* | [**RegionServiceGetNodeSpec**](docs/RegionServiceAPI.md#regionservicegetnodespec) | **Get** /api/v2023/dedicated/v1beta1/regions/{regionId}/componentTypes/{componentType}/nodeSpecs/{nodeSpecKey} | Get a node spec
*RegionServiceAPI* | [**RegionServiceGetRegion**](docs/RegionServiceAPI.md#regionservicegetregion) | **Get** /api/v2023/dedicated/v1beta1/regions/{regionId} | Get a region
*RegionServiceAPI* | [**RegionServiceListNodeSpecs**](docs/RegionServiceAPI.md#regionservicelistnodespecs) | **Get** /api/v2023/dedicated/v1beta1/regions/{regionId}/nodeSpecs | List node specs for creating or scaling a cluster
*RegionServiceAPI* | [**RegionServiceListRegions**](docs/RegionServiceAPI.md#regionservicelistregions) | **Get** /api/v2023/dedicated/v1beta1/regions | List regions for creating a cluster
*RegionServiceAPI* | [**RegionServiceShowCloudProviders**](docs/RegionServiceAPI.md#regionserviceshowcloudproviders) | **Get** /api/v2023/dedicated/v1beta1/regions:showCloudProviders | Show cloud providers for creating a cluster
*TidbNodeGroupServiceAPI* | [**TidbNodeGroupServiceCreateTidbNodeGroup**](docs/TidbNodeGroupServiceAPI.md#tidbnodegroupservicecreatetidbnodegroup) | **Post** /api/v2023/dedicated/v1beta1/clusters/{tidbNodeGroup.clusterId}/tidbNodeGroups | Create a TiDB Node Group
*TidbNodeGroupServiceAPI* | [**TidbNodeGroupServiceDeleteTidbNodeGroup**](docs/TidbNodeGroupServiceAPI.md#tidbnodegroupservicedeletetidbnodegroup) | **Delete** /api/v2023/dedicated/v1beta1/clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId} | Delete a TiDB Node Group
*TidbNodeGroupServiceAPI* | [**TidbNodeGroupServiceGetPublicEndpointSetting**](docs/TidbNodeGroupServiceAPI.md#tidbnodegroupservicegetpublicendpointsetting) | **Get** /api/v2023/dedicated/v1beta1/clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId}/publicEndpointSetting | Get the public endpoint setting of a TiDB Node Group
*TidbNodeGroupServiceAPI* | [**TidbNodeGroupServiceGetTidbNodeGroup**](docs/TidbNodeGroupServiceAPI.md#tidbnodegroupservicegettidbnodegroup) | **Get** /api/v2023/dedicated/v1beta1/clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId} | Get a TiDB Node Group
*TidbNodeGroupServiceAPI* | [**TidbNodeGroupServiceListTidbNodeGroups**](docs/TidbNodeGroupServiceAPI.md#tidbnodegroupservicelisttidbnodegroups) | **Get** /api/v2023/dedicated/v1beta1/clusters/{clusterId}/tidbNodeGroups | List TiDB Node Groups
*TidbNodeGroupServiceAPI* | [**TidbNodeGroupServiceUpdatePublicEndpointSetting**](docs/TidbNodeGroupServiceAPI.md#tidbnodegroupserviceupdatepublicendpointsetting) | **Patch** /api/v2023/dedicated/v1beta1/clusters/{clusterId}/tidbNodeGroups/{publicEndpointSetting.tidbNodeGroupId}/publicEndpointSetting | Update the public endpoint setting of a TiDB Node Group
*TidbNodeGroupServiceAPI* | [**TidbNodeGroupServiceUpdateTidbNodeGroup**](docs/TidbNodeGroupServiceAPI.md#tidbnodegroupserviceupdatetidbnodegroup) | **Patch** /api/v2023/dedicated/v1beta1/clusters/{tidbNodeGroup.clusterId}/tidbNodeGroups/{tidbNodeGroup.tidbNodeGroupId} | Update a TiDB Node Group


## Documentation For Models

 - [ClusterNodeChangingProgress](docs/ClusterNodeChangingProgress.md)
 - [ClusterServiceResetRootPasswordBody](docs/ClusterServiceResetRootPasswordBody.md)
 - [ClusterServiceUpdateClusterRequest](docs/ClusterServiceUpdateClusterRequest.md)
 - [ClusterStorageNodeSettingStorageType](docs/ClusterStorageNodeSettingStorageType.md)
 - [Commonv1beta1ClusterState](docs/Commonv1beta1ClusterState.md)
 - [Commonv1beta1Region](docs/Commonv1beta1Region.md)
 - [Dedicatedv1beta1ClusterPausePlan](docs/Dedicatedv1beta1ClusterPausePlan.md)
 - [Dedicatedv1beta1ClusterPausePlanType](docs/Dedicatedv1beta1ClusterPausePlanType.md)
 - [Dedicatedv1beta1ComponentType](docs/Dedicatedv1beta1ComponentType.md)
 - [Dedicatedv1beta1ListVpcPeeringsResponse](docs/Dedicatedv1beta1ListVpcPeeringsResponse.md)
 - [Dedicatedv1beta1MaintenanceWindow](docs/Dedicatedv1beta1MaintenanceWindow.md)
 - [Dedicatedv1beta1NodeSpec](docs/Dedicatedv1beta1NodeSpec.md)
 - [Dedicatedv1beta1PrivateLinkService](docs/Dedicatedv1beta1PrivateLinkService.md)
 - [Dedicatedv1beta1PublicEndpointSetting](docs/Dedicatedv1beta1PublicEndpointSetting.md)
 - [Dedicatedv1beta1PublicEndpointSettingIpAccessList](docs/Dedicatedv1beta1PublicEndpointSettingIpAccessList.md)
 - [Dedicatedv1beta1TidbNodeGroup](docs/Dedicatedv1beta1TidbNodeGroup.md)
 - [Dedicatedv1beta1VpcPeering](docs/Dedicatedv1beta1VpcPeering.md)
 - [Dedicatedv1beta1VpcPeeringState](docs/Dedicatedv1beta1VpcPeeringState.md)
 - [EndpointConnectionType](docs/EndpointConnectionType.md)
 - [GooglerpcStatus](docs/GooglerpcStatus.md)
 - [MaintenanceServiceUpdateMaintenanceWindowRequest](docs/MaintenanceServiceUpdateMaintenanceWindowRequest.md)
 - [PrivateEndpointConnectionEndpointState](docs/PrivateEndpointConnectionEndpointState.md)
 - [PrivateEndpointConnectionServiceCreatePrivateEndpointConnectionRequest](docs/PrivateEndpointConnectionServiceCreatePrivateEndpointConnectionRequest.md)
 - [ProtobufAny](docs/ProtobufAny.md)
 - [ShowNodeQuotaResponseComponentQuota](docs/ShowNodeQuotaResponseComponentQuota.md)
 - [TidbCloudOpenApidedicatedv1beta1Cluster](docs/TidbCloudOpenApidedicatedv1beta1Cluster.md)
 - [TidbCloudOpenApidedicatedv1beta1ListClustersResponse](docs/TidbCloudOpenApidedicatedv1beta1ListClustersResponse.md)
 - [TidbCloudOpenApidedicatedv1beta1ListRegionsResponse](docs/TidbCloudOpenApidedicatedv1beta1ListRegionsResponse.md)
 - [TidbNodeGroupEndpoint](docs/TidbNodeGroupEndpoint.md)
 - [TidbNodeGroupServiceCreateTidbNodeGroupRequest](docs/TidbNodeGroupServiceCreateTidbNodeGroupRequest.md)
 - [TidbNodeGroupServiceUpdatePublicEndpointSettingRequest](docs/TidbNodeGroupServiceUpdatePublicEndpointSettingRequest.md)
 - [TidbNodeGroupServiceUpdateTidbNodeGroupRequest](docs/TidbNodeGroupServiceUpdateTidbNodeGroupRequest.md)
 - [UpdateClusterRequestTidbNodeSettingTidbNodeGroup](docs/UpdateClusterRequestTidbNodeSettingTidbNodeGroup.md)
 - [V1beta1ClusterStorageNodeSetting](docs/V1beta1ClusterStorageNodeSetting.md)
 - [V1beta1ClusterTidbNodeSetting](docs/V1beta1ClusterTidbNodeSetting.md)
 - [V1beta1ListMaintenanceTasksResponse](docs/V1beta1ListMaintenanceTasksResponse.md)
 - [V1beta1ListMaintenanceWindowsResponse](docs/V1beta1ListMaintenanceWindowsResponse.md)
 - [V1beta1ListNetworkContainersResponse](docs/V1beta1ListNetworkContainersResponse.md)
 - [V1beta1ListNodeInstancesResponse](docs/V1beta1ListNodeInstancesResponse.md)
 - [V1beta1ListNodeSpecsResponse](docs/V1beta1ListNodeSpecsResponse.md)
 - [V1beta1ListPrivateEndpointConnectionsResponse](docs/V1beta1ListPrivateEndpointConnectionsResponse.md)
 - [V1beta1ListTidbNodeGroupsResponse](docs/V1beta1ListTidbNodeGroupsResponse.md)
 - [V1beta1MaintenanceTask](docs/V1beta1MaintenanceTask.md)
 - [V1beta1MaintenanceTaskState](docs/V1beta1MaintenanceTaskState.md)
 - [V1beta1NetworkContainer](docs/V1beta1NetworkContainer.md)
 - [V1beta1NetworkContainerState](docs/V1beta1NetworkContainerState.md)
 - [V1beta1NodeInstance](docs/V1beta1NodeInstance.md)
 - [V1beta1NodeInstanceState](docs/V1beta1NodeInstanceState.md)
 - [V1beta1PrivateEndpointConnection](docs/V1beta1PrivateEndpointConnection.md)
 - [V1beta1PrivateLinkServiceState](docs/V1beta1PrivateLinkServiceState.md)
 - [V1beta1RegionCloudProvider](docs/V1beta1RegionCloudProvider.md)
 - [V1beta1ShowCloudProvidersResponse](docs/V1beta1ShowCloudProvidersResponse.md)
 - [V1beta1ShowNodeQuotaResponse](docs/V1beta1ShowNodeQuotaResponse.md)
 - [V1beta1TidbNodeGroupState](docs/V1beta1TidbNodeGroupState.md)
 - [V1beta1UpdateClusterRequestCluster](docs/V1beta1UpdateClusterRequestCluster.md)
 - [V1beta1UpdateClusterRequestStorageNodeSetting](docs/V1beta1UpdateClusterRequestStorageNodeSetting.md)
 - [V1beta1UpdateClusterRequestTidbNodeSetting](docs/V1beta1UpdateClusterRequestTidbNodeSetting.md)
 - [V1beta1UpdateMaintenanceWindowRequestMaintenanceWindow](docs/V1beta1UpdateMaintenanceWindowRequestMaintenanceWindow.md)
 - [V1beta1UpdateTidbNodeGroupRequestTidbNodeGroup](docs/V1beta1UpdateTidbNodeGroupRequestTidbNodeGroup.md)


## Documentation For Authorization

Endpoints do not require authorization.


## Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains
a number of utility functions to easily obtain pointers to values of basic types.
Each of these functions takes a value of the given basic type and returns a pointer to it:

* `PtrBool`
* `PtrInt`
* `PtrInt32`
* `PtrInt64`
* `PtrFloat`
* `PtrFloat32`
* `PtrFloat64`
* `PtrString`
* `PtrTime`

## Author



