From 569cffef77841ef479030ad6fb968a847b2cd3aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20R=2E=20Miguel?= Date: Mon, 1 Apr 2024 16:29:59 -0300 Subject: [PATCH] Regen `temboclient` with latest OpenAPI spec --- .../temboclient/.openapi-generator/FILES | 4 - .../temboclient/.openapi-generator/VERSION | 2 +- internal/provider/temboclient/README.md | 1 + .../provider/temboclient/api/openapi.yaml | 9 +- internal/provider/temboclient/api_instance.go | 11 + .../temboclient/docs/ConnectionInfo.md | 23 +- .../provider/temboclient/docs/InstanceAPI.md | 663 ++++++++++++++++++ .../provider/temboclient/docs/StackAPI.md | 141 ++++ .../provider/temboclient/model_app_config.go | 2 +- .../provider/temboclient/model_app_service.go | 10 +- .../temboclient/model_connection_info.go | 30 +- .../temboclient/model_create_instance.go | 12 +- .../provider/temboclient/model_instance.go | 14 +- .../temboclient/model_patch_instance.go | 12 +- .../provider/temboclient/model_pg_bouncer.go | 2 +- ...oler_template_spec_containers_resources.go | 6 +- .../temboclient/model_restore_instance.go | 4 +- .../provider/temboclient/model_routing.go | 4 +- .../temboclient/model_storage_config.go | 2 +- .../temboclient/model_trunk_install_status.go | 2 +- .../temboclient/model_update_instance.go | 12 +- 21 files changed, 866 insertions(+), 100 deletions(-) create mode 100644 internal/provider/temboclient/docs/InstanceAPI.md create mode 100644 internal/provider/temboclient/docs/StackAPI.md diff --git a/internal/provider/temboclient/.openapi-generator/FILES b/internal/provider/temboclient/.openapi-generator/FILES index 0577cd9..be41f86 100644 --- a/internal/provider/temboclient/.openapi-generator/FILES +++ b/internal/provider/temboclient/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml @@ -133,7 +132,4 @@ model_trunk_install_status.go model_update_instance.go model_volume_mount.go response.go -test/api_app_test.go -test/api_instance_test.go -test/api_stack_test.go utils.go diff --git a/internal/provider/temboclient/.openapi-generator/VERSION b/internal/provider/temboclient/.openapi-generator/VERSION index 8b23b8d..ba7f754 100644 --- a/internal/provider/temboclient/.openapi-generator/VERSION +++ b/internal/provider/temboclient/.openapi-generator/VERSION @@ -1 +1 @@ -7.3.0 \ No newline at end of file +7.4.0 diff --git a/internal/provider/temboclient/README.md b/internal/provider/temboclient/README.md index cb158e6..d1550ba 100644 --- a/internal/provider/temboclient/README.md +++ b/internal/provider/temboclient/README.md @@ -14,6 +14,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: v1.0.0 - Package version: 1.0.0 +- Generator version: 7.4.0 - Build package: org.openapitools.codegen.languages.GoClientCodegen ## Installation diff --git a/internal/provider/temboclient/api/openapi.yaml b/internal/provider/temboclient/api/openapi.yaml index 9590a12..bea4efa 100644 --- a/internal/provider/temboclient/api/openapi.yaml +++ b/internal/provider/temboclient/api/openapi.yaml @@ -294,6 +294,12 @@ paths: schema: $ref: '#/components/schemas/ErrorResponseSchema' description: Forbidden + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseSchema' + description: Instance not found summary: Get an existing Tembo instance tags: - instance @@ -739,8 +745,6 @@ components: properties: host: type: string - password: - type: string pooler_host: nullable: true type: string @@ -751,7 +755,6 @@ components: type: string required: - host - - password - port - user type: object diff --git a/internal/provider/temboclient/api_instance.go b/internal/provider/temboclient/api_instance.go index 48e3553..3d5ec3d 100644 --- a/internal/provider/temboclient/api_instance.go +++ b/internal/provider/temboclient/api_instance.go @@ -592,6 +592,17 @@ func (a *InstanceAPIService) GetInstanceExecute(r ApiGetInstanceRequest) (*Insta } newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseSchema + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/internal/provider/temboclient/docs/ConnectionInfo.md b/internal/provider/temboclient/docs/ConnectionInfo.md index 5c25e8d..fd8c86d 100644 --- a/internal/provider/temboclient/docs/ConnectionInfo.md +++ b/internal/provider/temboclient/docs/ConnectionInfo.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Host** | **string** | | -**Password** | **string** | | **PoolerHost** | Pointer to **NullableString** | | [optional] **Port** | **int32** | | **User** | **string** | | @@ -14,7 +13,7 @@ Name | Type | Description | Notes ### NewConnectionInfo -`func NewConnectionInfo(host string, password string, port int32, user string, ) *ConnectionInfo` +`func NewConnectionInfo(host string, port int32, user string, ) *ConnectionInfo` NewConnectionInfo instantiates a new ConnectionInfo object This constructor will assign default values to properties that have it defined, @@ -49,26 +48,6 @@ and a boolean to check if the value has been set. SetHost sets Host field to given value. -### GetPassword - -`func (o *ConnectionInfo) GetPassword() string` - -GetPassword returns the Password field if non-nil, zero value otherwise. - -### GetPasswordOk - -`func (o *ConnectionInfo) GetPasswordOk() (*string, bool)` - -GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPassword - -`func (o *ConnectionInfo) SetPassword(v string)` - -SetPassword sets Password field to given value. - - ### GetPoolerHost `func (o *ConnectionInfo) GetPoolerHost() string` diff --git a/internal/provider/temboclient/docs/InstanceAPI.md b/internal/provider/temboclient/docs/InstanceAPI.md new file mode 100644 index 0000000..783e5c0 --- /dev/null +++ b/internal/provider/temboclient/docs/InstanceAPI.md @@ -0,0 +1,663 @@ +# \InstanceAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateInstance**](InstanceAPI.md#CreateInstance) | **Post** /api/v1/orgs/{org_id}/instances | Create a new Tembo instance +[**DeleteInstance**](InstanceAPI.md#DeleteInstance) | **Delete** /api/v1/orgs/{org_id}/instances/{instance_id} | Delete an existing Tembo instance +[**GetAll**](InstanceAPI.md#GetAll) | **Get** /api/v1/orgs/{org_id}/instances | Get all Tembo instances in an organization +[**GetInstance**](InstanceAPI.md#GetInstance) | **Get** /api/v1/orgs/{org_id}/instances/{instance_id} | Get an existing Tembo instance +[**GetSchema**](InstanceAPI.md#GetSchema) | **Get** /api/v1/orgs/instances/schema | Get the json-schema for an instance +[**InstanceEvent**](InstanceAPI.md#InstanceEvent) | **Post** /api/v1/orgs/{org_id}/instances/{instance_id} | Lifecycle events for a Tembo instance +[**PatchInstance**](InstanceAPI.md#PatchInstance) | **Patch** /api/v1/orgs/{org_id}/instances/{instance_id} | Update attributes on an existing Tembo instance +[**PutInstance**](InstanceAPI.md#PutInstance) | **Put** /api/v1/orgs/{org_id}/instances/{instance_id} | Replace all attributes of an existing Tembo instance +[**RestoreInstance**](InstanceAPI.md#RestoreInstance) | **Post** /api/v1/orgs/{org_id}/restore | Restore a Tembo instance + + + +## CreateInstance + +> Instance CreateInstance(ctx, orgId).CreateInstance(createInstance).Execute() + +Create a new Tembo instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/tembo-io/terraform-provider-tembo/temboclient" +) + +func main() { + orgId := "orgId_example" // string | Organization ID that owns the Tembo instance + createInstance := *openapiclient.NewCreateInstance(openapiclient.Cpu("0.25"), openapiclient.Environment("dev"), "InstanceName_example", openapiclient.Memory("1Gi"), openapiclient.StackType("Standard"), openapiclient.Storage("10Gi")) // CreateInstance | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.InstanceAPI.CreateInstance(context.Background(), orgId).CreateInstance(createInstance).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `InstanceAPI.CreateInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateInstance`: Instance + fmt.Fprintf(os.Stdout, "Response from `InstanceAPI.CreateInstance`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | Organization ID that owns the Tembo instance | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **createInstance** | [**CreateInstance**](CreateInstance.md) | | + +### Return type + +[**Instance**](Instance.md) + +### Authorization + +[jwt_token](../README.md#jwt_token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteInstance + +> Instance DeleteInstance(ctx, orgId, instanceId).Execute() + +Delete an existing Tembo instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/tembo-io/terraform-provider-tembo/temboclient" +) + +func main() { + orgId := "orgId_example" // string | Organization id of the instance to delete + instanceId := "instanceId_example" // string | Delete this instance id + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.InstanceAPI.DeleteInstance(context.Background(), orgId, instanceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `InstanceAPI.DeleteInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteInstance`: Instance + fmt.Fprintf(os.Stdout, "Response from `InstanceAPI.DeleteInstance`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | Organization id of the instance to delete | +**instanceId** | **string** | Delete this instance id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**Instance**](Instance.md) + +### Authorization + +[jwt_token](../README.md#jwt_token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAll + +> []Instance GetAll(ctx, orgId).Execute() + +Get all Tembo instances in an organization + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/tembo-io/terraform-provider-tembo/temboclient" +) + +func main() { + orgId := "orgId_example" // string | organization id for the request + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.InstanceAPI.GetAll(context.Background(), orgId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `InstanceAPI.GetAll``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAll`: []Instance + fmt.Fprintf(os.Stdout, "Response from `InstanceAPI.GetAll`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | organization id for the request | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAllRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]Instance**](Instance.md) + +### Authorization + +[jwt_token](../README.md#jwt_token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetInstance + +> Instance GetInstance(ctx, orgId, instanceId).Execute() + +Get an existing Tembo instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/tembo-io/terraform-provider-tembo/temboclient" +) + +func main() { + orgId := "orgId_example" // string | Organization ID that owns the instance + instanceId := "instanceId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.InstanceAPI.GetInstance(context.Background(), orgId, instanceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `InstanceAPI.GetInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetInstance`: Instance + fmt.Fprintf(os.Stdout, "Response from `InstanceAPI.GetInstance`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | Organization ID that owns the instance | +**instanceId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**Instance**](Instance.md) + +### Authorization + +[jwt_token](../README.md#jwt_token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetSchema + +> ErrorResponseSchema GetSchema(ctx).Execute() + +Get the json-schema for an instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/tembo-io/terraform-provider-tembo/temboclient" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.InstanceAPI.GetSchema(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `InstanceAPI.GetSchema``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetSchema`: ErrorResponseSchema + fmt.Fprintf(os.Stdout, "Response from `InstanceAPI.GetSchema`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetSchemaRequest struct via the builder pattern + + +### Return type + +[**ErrorResponseSchema**](ErrorResponseSchema.md) + +### Authorization + +[jwt_token](../README.md#jwt_token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## InstanceEvent + +> Instance InstanceEvent(ctx, orgId, instanceId).EventType(eventType).Execute() + +Lifecycle events for a Tembo instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/tembo-io/terraform-provider-tembo/temboclient" +) + +func main() { + orgId := "orgId_example" // string | Organization ID that owns the Tembo instance + eventType := openapiclient.InstanceEvent("restart") // InstanceEvent | + instanceId := "instanceId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.InstanceAPI.InstanceEvent(context.Background(), orgId, instanceId).EventType(eventType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `InstanceAPI.InstanceEvent``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `InstanceEvent`: Instance + fmt.Fprintf(os.Stdout, "Response from `InstanceAPI.InstanceEvent`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | Organization ID that owns the Tembo instance | +**instanceId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiInstanceEventRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **eventType** | [**InstanceEvent**](InstanceEvent.md) | | + + +### Return type + +[**Instance**](Instance.md) + +### Authorization + +[jwt_token](../README.md#jwt_token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PatchInstance + +> Instance PatchInstance(ctx, orgId, instanceId).PatchInstance(patchInstance).Execute() + +Update attributes on an existing Tembo instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/tembo-io/terraform-provider-tembo/temboclient" +) + +func main() { + orgId := "orgId_example" // string | Organization ID that owns the instance + instanceId := "instanceId_example" // string | + patchInstance := *openapiclient.NewPatchInstance() // PatchInstance | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.InstanceAPI.PatchInstance(context.Background(), orgId, instanceId).PatchInstance(patchInstance).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `InstanceAPI.PatchInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PatchInstance`: Instance + fmt.Fprintf(os.Stdout, "Response from `InstanceAPI.PatchInstance`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | Organization ID that owns the instance | +**instanceId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPatchInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **patchInstance** | [**PatchInstance**](PatchInstance.md) | | + +### Return type + +[**Instance**](Instance.md) + +### Authorization + +[jwt_token](../README.md#jwt_token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PutInstance + +> Instance PutInstance(ctx, orgId, instanceId).UpdateInstance(updateInstance).Execute() + +Replace all attributes of an existing Tembo instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/tembo-io/terraform-provider-tembo/temboclient" +) + +func main() { + orgId := "orgId_example" // string | Organization ID that owns the Tembo instance + instanceId := "instanceId_example" // string | + updateInstance := *openapiclient.NewUpdateInstance(openapiclient.Cpu("0.25"), openapiclient.Environment("dev"), openapiclient.Memory("1Gi"), int32(123), openapiclient.Storage("10Gi")) // UpdateInstance | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.InstanceAPI.PutInstance(context.Background(), orgId, instanceId).UpdateInstance(updateInstance).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `InstanceAPI.PutInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PutInstance`: Instance + fmt.Fprintf(os.Stdout, "Response from `InstanceAPI.PutInstance`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | Organization ID that owns the Tembo instance | +**instanceId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPutInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **updateInstance** | [**UpdateInstance**](UpdateInstance.md) | | + +### Return type + +[**Instance**](Instance.md) + +### Authorization + +[jwt_token](../README.md#jwt_token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RestoreInstance + +> Instance RestoreInstance(ctx, orgId).RestoreInstance(restoreInstance).Execute() + +Restore a Tembo instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/tembo-io/terraform-provider-tembo/temboclient" +) + +func main() { + orgId := "orgId_example" // string | Organization ID that owns the Tembo instance + restoreInstance := *openapiclient.NewRestoreInstance("InstanceName_example", *openapiclient.NewRestore("InstanceId_example")) // RestoreInstance | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.InstanceAPI.RestoreInstance(context.Background(), orgId).RestoreInstance(restoreInstance).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `InstanceAPI.RestoreInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RestoreInstance`: Instance + fmt.Fprintf(os.Stdout, "Response from `InstanceAPI.RestoreInstance`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | Organization ID that owns the Tembo instance | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRestoreInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **restoreInstance** | [**RestoreInstance**](RestoreInstance.md) | | + +### Return type + +[**Instance**](Instance.md) + +### Authorization + +[jwt_token](../README.md#jwt_token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/internal/provider/temboclient/docs/StackAPI.md b/internal/provider/temboclient/docs/StackAPI.md new file mode 100644 index 0000000..bf5940c --- /dev/null +++ b/internal/provider/temboclient/docs/StackAPI.md @@ -0,0 +1,141 @@ +# \StackAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAllEntities**](StackAPI.md#GetAllEntities) | **Get** /api/v1/stacks | Attributes for all stacks +[**GetEntity**](StackAPI.md#GetEntity) | **Get** /api/v1/stacks/{type} | Get the attributes of a single stack + + + +## GetAllEntities + +> []interface{} GetAllEntities(ctx).Execute() + +Attributes for all stacks + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/tembo-io/terraform-provider-tembo/temboclient" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StackAPI.GetAllEntities(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StackAPI.GetAllEntities``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAllEntities`: []interface{} + fmt.Fprintf(os.Stdout, "Response from `StackAPI.GetAllEntities`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAllEntitiesRequest struct via the builder pattern + + +### Return type + +**[]interface{}** + +### Authorization + +[jwt_token](../README.md#jwt_token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetEntity + +> interface{} GetEntity(ctx, type_).Execute() + +Get the attributes of a single stack + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/tembo-io/terraform-provider-tembo/temboclient" +) + +func main() { + type_ := openapiclient.StackType("Standard") // StackType | the type of entity + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StackAPI.GetEntity(context.Background(), type_).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StackAPI.GetEntity``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetEntity`: interface{} + fmt.Fprintf(os.Stdout, "Response from `StackAPI.GetEntity`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**type_** | [**StackType**](.md) | the type of entity | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetEntityRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +**interface{}** + +### Authorization + +[jwt_token](../README.md#jwt_token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/internal/provider/temboclient/model_app_config.go b/internal/provider/temboclient/model_app_config.go index 89e8180..bb111e2 100644 --- a/internal/provider/temboclient/model_app_config.go +++ b/internal/provider/temboclient/model_app_config.go @@ -61,7 +61,7 @@ func (o *AppConfig) GetEnvOk() ([]EnvVar, bool) { // HasEnv returns a boolean if a field has been set. func (o *AppConfig) HasEnv() bool { - if o != nil && IsNil(o.Env) { + if o != nil && !IsNil(o.Env) { return true } diff --git a/internal/provider/temboclient/model_app_service.go b/internal/provider/temboclient/model_app_service.go index 19c9fab..891bc52 100644 --- a/internal/provider/temboclient/model_app_service.go +++ b/internal/provider/temboclient/model_app_service.go @@ -82,7 +82,7 @@ func (o *AppService) GetArgsOk() ([]string, bool) { // HasArgs returns a boolean if a field has been set. func (o *AppService) HasArgs() bool { - if o != nil && IsNil(o.Args) { + if o != nil && !IsNil(o.Args) { return true } @@ -115,7 +115,7 @@ func (o *AppService) GetCommandOk() ([]string, bool) { // HasCommand returns a boolean if a field has been set. func (o *AppService) HasCommand() bool { - if o != nil && IsNil(o.Command) { + if o != nil && !IsNil(o.Command) { return true } @@ -148,7 +148,7 @@ func (o *AppService) GetEnvOk() ([]EnvVar, bool) { // HasEnv returns a boolean if a field has been set. func (o *AppService) HasEnv() bool { - if o != nil && IsNil(o.Env) { + if o != nil && !IsNil(o.Env) { return true } @@ -205,7 +205,7 @@ func (o *AppService) GetMiddlewaresOk() ([]Middleware, bool) { // HasMiddlewares returns a boolean if a field has been set. func (o *AppService) HasMiddlewares() bool { - if o != nil && IsNil(o.Middlewares) { + if o != nil && !IsNil(o.Middlewares) { return true } @@ -336,7 +336,7 @@ func (o *AppService) GetRoutingOk() ([]Routing, bool) { // HasRouting returns a boolean if a field has been set. func (o *AppService) HasRouting() bool { - if o != nil && IsNil(o.Routing) { + if o != nil && !IsNil(o.Routing) { return true } diff --git a/internal/provider/temboclient/model_connection_info.go b/internal/provider/temboclient/model_connection_info.go index 2d30103..88c34d0 100644 --- a/internal/provider/temboclient/model_connection_info.go +++ b/internal/provider/temboclient/model_connection_info.go @@ -22,7 +22,6 @@ var _ MappedNullable = &ConnectionInfo{} // ConnectionInfo struct for ConnectionInfo type ConnectionInfo struct { Host string `json:"host"` - Password string `json:"password"` PoolerHost NullableString `json:"pooler_host,omitempty"` Port int32 `json:"port"` User string `json:"user"` @@ -34,10 +33,9 @@ type _ConnectionInfo ConnectionInfo // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewConnectionInfo(host string, password string, port int32, user string) *ConnectionInfo { +func NewConnectionInfo(host string, port int32, user string) *ConnectionInfo { this := ConnectionInfo{} this.Host = host - this.Password = password this.Port = port this.User = user return &this @@ -75,30 +73,6 @@ func (o *ConnectionInfo) SetHost(v string) { o.Host = v } -// GetPassword returns the Password field value -func (o *ConnectionInfo) GetPassword() string { - if o == nil { - var ret string - return ret - } - - return o.Password -} - -// GetPasswordOk returns a tuple with the Password field value -// and a boolean to check if the value has been set. -func (o *ConnectionInfo) GetPasswordOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Password, true -} - -// SetPassword sets field value -func (o *ConnectionInfo) SetPassword(v string) { - o.Password = v -} - // GetPoolerHost returns the PoolerHost field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ConnectionInfo) GetPoolerHost() string { if o == nil || IsNil(o.PoolerHost.Get()) { @@ -200,7 +174,6 @@ func (o ConnectionInfo) MarshalJSON() ([]byte, error) { func (o ConnectionInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["host"] = o.Host - toSerialize["password"] = o.Password if o.PoolerHost.IsSet() { toSerialize["pooler_host"] = o.PoolerHost.Get() } @@ -215,7 +188,6 @@ func (o *ConnectionInfo) UnmarshalJSON(data []byte) (err error) { // that every required field exists as a key in the generic map. requiredProperties := []string{ "host", - "password", "port", "user", } diff --git a/internal/provider/temboclient/model_create_instance.go b/internal/provider/temboclient/model_create_instance.go index a472454..6c98d9e 100644 --- a/internal/provider/temboclient/model_create_instance.go +++ b/internal/provider/temboclient/model_create_instance.go @@ -84,7 +84,7 @@ func (o *CreateInstance) GetAppServicesOk() ([]AppType, bool) { // HasAppServices returns a boolean if a field has been set. func (o *CreateInstance) HasAppServices() bool { - if o != nil && IsNil(o.AppServices) { + if o != nil && !IsNil(o.AppServices) { return true } @@ -207,7 +207,7 @@ func (o *CreateInstance) GetExtensionsOk() ([]Extension, bool) { // HasExtensions returns a boolean if a field has been set. func (o *CreateInstance) HasExtensions() bool { - if o != nil && IsNil(o.Extensions) { + if o != nil && !IsNil(o.Extensions) { return true } @@ -240,7 +240,7 @@ func (o *CreateInstance) GetExtraDomainsRwOk() ([]string, bool) { // HasExtraDomainsRw returns a boolean if a field has been set. func (o *CreateInstance) HasExtraDomainsRw() bool { - if o != nil && IsNil(o.ExtraDomainsRw) { + if o != nil && !IsNil(o.ExtraDomainsRw) { return true } @@ -297,7 +297,7 @@ func (o *CreateInstance) GetIpAllowListOk() ([]string, bool) { // HasIpAllowList returns a boolean if a field has been set. func (o *CreateInstance) HasIpAllowList() bool { - if o != nil && IsNil(o.IpAllowList) { + if o != nil && !IsNil(o.IpAllowList) { return true } @@ -386,7 +386,7 @@ func (o *CreateInstance) GetPostgresConfigsOk() ([]PgConfig, bool) { // HasPostgresConfigs returns a boolean if a field has been set. func (o *CreateInstance) HasPostgresConfigs() bool { - if o != nil && IsNil(o.PostgresConfigs) { + if o != nil && !IsNil(o.PostgresConfigs) { return true } @@ -499,7 +499,7 @@ func (o *CreateInstance) GetTrunkInstallsOk() ([]TrunkInstall, bool) { // HasTrunkInstalls returns a boolean if a field has been set. func (o *CreateInstance) HasTrunkInstalls() bool { - if o != nil && IsNil(o.TrunkInstalls) { + if o != nil && !IsNil(o.TrunkInstalls) { return true } diff --git a/internal/provider/temboclient/model_instance.go b/internal/provider/temboclient/model_instance.go index 62c20cb..1417c40 100644 --- a/internal/provider/temboclient/model_instance.go +++ b/internal/provider/temboclient/model_instance.go @@ -101,7 +101,7 @@ func (o *Instance) GetAppServicesOk() ([]AppType, bool) { // HasAppServices returns a boolean if a field has been set. func (o *Instance) HasAppServices() bool { - if o != nil && IsNil(o.AppServices) { + if o != nil && !IsNil(o.AppServices) { return true } @@ -298,7 +298,7 @@ func (o *Instance) GetExtensionsOk() ([]ExtensionStatus, bool) { // HasExtensions returns a boolean if a field has been set. func (o *Instance) HasExtensions() bool { - if o != nil && IsNil(o.Extensions) { + if o != nil && !IsNil(o.Extensions) { return true } @@ -331,7 +331,7 @@ func (o *Instance) GetExtraDomainsRwOk() ([]string, bool) { // HasExtraDomainsRw returns a boolean if a field has been set. func (o *Instance) HasExtraDomainsRw() bool { - if o != nil && IsNil(o.ExtraDomainsRw) { + if o != nil && !IsNil(o.ExtraDomainsRw) { return true } @@ -454,7 +454,7 @@ func (o *Instance) GetIpAllowListOk() ([]string, bool) { // HasIpAllowList returns a boolean if a field has been set. func (o *Instance) HasIpAllowList() bool { - if o != nil && IsNil(o.IpAllowList) { + if o != nil && !IsNil(o.IpAllowList) { return true } @@ -591,7 +591,7 @@ func (o *Instance) GetPostgresConfigsOk() ([]PgConfig, bool) { // HasPostgresConfigs returns a boolean if a field has been set. func (o *Instance) HasPostgresConfigs() bool { - if o != nil && IsNil(o.PostgresConfigs) { + if o != nil && !IsNil(o.PostgresConfigs) { return true } @@ -672,7 +672,7 @@ func (o *Instance) GetRuntimeConfigOk() ([]PgConfig, bool) { // HasRuntimeConfig returns a boolean if a field has been set. func (o *Instance) HasRuntimeConfig() bool { - if o != nil && IsNil(o.RuntimeConfig) { + if o != nil && !IsNil(o.RuntimeConfig) { return true } @@ -777,7 +777,7 @@ func (o *Instance) GetTrunkInstallsOk() ([]TrunkInstallStatus, bool) { // HasTrunkInstalls returns a boolean if a field has been set. func (o *Instance) HasTrunkInstalls() bool { - if o != nil && IsNil(o.TrunkInstalls) { + if o != nil && !IsNil(o.TrunkInstalls) { return true } diff --git a/internal/provider/temboclient/model_patch_instance.go b/internal/provider/temboclient/model_patch_instance.go index 5553119..843c744 100644 --- a/internal/provider/temboclient/model_patch_instance.go +++ b/internal/provider/temboclient/model_patch_instance.go @@ -71,7 +71,7 @@ func (o *PatchInstance) GetAppServicesOk() ([]AppType, bool) { // HasAppServices returns a boolean if a field has been set. func (o *PatchInstance) HasAppServices() bool { - if o != nil && IsNil(o.AppServices) { + if o != nil && !IsNil(o.AppServices) { return true } @@ -230,7 +230,7 @@ func (o *PatchInstance) GetExtensionsOk() ([]Extension, bool) { // HasExtensions returns a boolean if a field has been set. func (o *PatchInstance) HasExtensions() bool { - if o != nil && IsNil(o.Extensions) { + if o != nil && !IsNil(o.Extensions) { return true } @@ -263,7 +263,7 @@ func (o *PatchInstance) GetExtraDomainsRwOk() ([]string, bool) { // HasExtraDomainsRw returns a boolean if a field has been set. func (o *PatchInstance) HasExtraDomainsRw() bool { - if o != nil && IsNil(o.ExtraDomainsRw) { + if o != nil && !IsNil(o.ExtraDomainsRw) { return true } @@ -296,7 +296,7 @@ func (o *PatchInstance) GetIpAllowListOk() ([]string, bool) { // HasIpAllowList returns a boolean if a field has been set. func (o *PatchInstance) HasIpAllowList() bool { - if o != nil && IsNil(o.IpAllowList) { + if o != nil && !IsNil(o.IpAllowList) { return true } @@ -371,7 +371,7 @@ func (o *PatchInstance) GetPostgresConfigsOk() ([]PgConfig, bool) { // HasPostgresConfigs returns a boolean if a field has been set. func (o *PatchInstance) HasPostgresConfigs() bool { - if o != nil && IsNil(o.PostgresConfigs) { + if o != nil && !IsNil(o.PostgresConfigs) { return true } @@ -488,7 +488,7 @@ func (o *PatchInstance) GetTrunkInstallsOk() ([]TrunkInstall, bool) { // HasTrunkInstalls returns a boolean if a field has been set. func (o *PatchInstance) HasTrunkInstalls() bool { - if o != nil && IsNil(o.TrunkInstalls) { + if o != nil && !IsNil(o.TrunkInstalls) { return true } diff --git a/internal/provider/temboclient/model_pg_bouncer.go b/internal/provider/temboclient/model_pg_bouncer.go index af439ab..94d4de3 100644 --- a/internal/provider/temboclient/model_pg_bouncer.go +++ b/internal/provider/temboclient/model_pg_bouncer.go @@ -63,7 +63,7 @@ func (o *PgBouncer) GetParametersOk() (*map[string]string, bool) { // HasParameters returns a boolean if a field has been set. func (o *PgBouncer) HasParameters() bool { - if o != nil && IsNil(o.Parameters) { + if o != nil && !IsNil(o.Parameters) { return true } diff --git a/internal/provider/temboclient/model_pooler_template_spec_containers_resources.go b/internal/provider/temboclient/model_pooler_template_spec_containers_resources.go index a630c14..928ae3d 100644 --- a/internal/provider/temboclient/model_pooler_template_spec_containers_resources.go +++ b/internal/provider/temboclient/model_pooler_template_spec_containers_resources.go @@ -65,7 +65,7 @@ func (o *PoolerTemplateSpecContainersResources) GetClaimsOk() ([]PoolerTemplateS // HasClaims returns a boolean if a field has been set. func (o *PoolerTemplateSpecContainersResources) HasClaims() bool { - if o != nil && IsNil(o.Claims) { + if o != nil && !IsNil(o.Claims) { return true } @@ -98,7 +98,7 @@ func (o *PoolerTemplateSpecContainersResources) GetLimitsOk() (*map[string]IntOr // HasLimits returns a boolean if a field has been set. func (o *PoolerTemplateSpecContainersResources) HasLimits() bool { - if o != nil && IsNil(o.Limits) { + if o != nil && !IsNil(o.Limits) { return true } @@ -131,7 +131,7 @@ func (o *PoolerTemplateSpecContainersResources) GetRequestsOk() (*map[string]Int // HasRequests returns a boolean if a field has been set. func (o *PoolerTemplateSpecContainersResources) HasRequests() bool { - if o != nil && IsNil(o.Requests) { + if o != nil && !IsNil(o.Requests) { return true } diff --git a/internal/provider/temboclient/model_restore_instance.go b/internal/provider/temboclient/model_restore_instance.go index 86529d3..5518570 100644 --- a/internal/provider/temboclient/model_restore_instance.go +++ b/internal/provider/temboclient/model_restore_instance.go @@ -74,7 +74,7 @@ func (o *RestoreInstance) GetAppServicesOk() ([]AppType, bool) { // HasAppServices returns a boolean if a field has been set. func (o *RestoreInstance) HasAppServices() bool { - if o != nil && IsNil(o.AppServices) { + if o != nil && !IsNil(o.AppServices) { return true } @@ -233,7 +233,7 @@ func (o *RestoreInstance) GetExtraDomainsRwOk() ([]string, bool) { // HasExtraDomainsRw returns a boolean if a field has been set. func (o *RestoreInstance) HasExtraDomainsRw() bool { - if o != nil && IsNil(o.ExtraDomainsRw) { + if o != nil && !IsNil(o.ExtraDomainsRw) { return true } diff --git a/internal/provider/temboclient/model_routing.go b/internal/provider/temboclient/model_routing.go index 08c7947..09e0a5e 100644 --- a/internal/provider/temboclient/model_routing.go +++ b/internal/provider/temboclient/model_routing.go @@ -70,7 +70,7 @@ func (o *Routing) GetEntryPointsOk() ([]string, bool) { // HasEntryPoints returns a boolean if a field has been set. func (o *Routing) HasEntryPoints() bool { - if o != nil && IsNil(o.EntryPoints) { + if o != nil && !IsNil(o.EntryPoints) { return true } @@ -187,7 +187,7 @@ func (o *Routing) GetMiddlewaresOk() ([]string, bool) { // HasMiddlewares returns a boolean if a field has been set. func (o *Routing) HasMiddlewares() bool { - if o != nil && IsNil(o.Middlewares) { + if o != nil && !IsNil(o.Middlewares) { return true } diff --git a/internal/provider/temboclient/model_storage_config.go b/internal/provider/temboclient/model_storage_config.go index e006cc2..1af4861 100644 --- a/internal/provider/temboclient/model_storage_config.go +++ b/internal/provider/temboclient/model_storage_config.go @@ -60,7 +60,7 @@ func (o *StorageConfig) GetVolumeMountsOk() ([]VolumeMount, bool) { // HasVolumeMounts returns a boolean if a field has been set. func (o *StorageConfig) HasVolumeMounts() bool { - if o != nil && IsNil(o.VolumeMounts) { + if o != nil && !IsNil(o.VolumeMounts) { return true } diff --git a/internal/provider/temboclient/model_trunk_install_status.go b/internal/provider/temboclient/model_trunk_install_status.go index 5f33df1..0362b23 100644 --- a/internal/provider/temboclient/model_trunk_install_status.go +++ b/internal/provider/temboclient/model_trunk_install_status.go @@ -137,7 +137,7 @@ func (o *TrunkInstallStatus) GetInstalledToPodsOk() ([]string, bool) { // HasInstalledToPods returns a boolean if a field has been set. func (o *TrunkInstallStatus) HasInstalledToPods() bool { - if o != nil && IsNil(o.InstalledToPods) { + if o != nil && !IsNil(o.InstalledToPods) { return true } diff --git a/internal/provider/temboclient/model_update_instance.go b/internal/provider/temboclient/model_update_instance.go index 54dbb82..2a661a6 100644 --- a/internal/provider/temboclient/model_update_instance.go +++ b/internal/provider/temboclient/model_update_instance.go @@ -80,7 +80,7 @@ func (o *UpdateInstance) GetAppServicesOk() ([]AppType, bool) { // HasAppServices returns a boolean if a field has been set. func (o *UpdateInstance) HasAppServices() bool { - if o != nil && IsNil(o.AppServices) { + if o != nil && !IsNil(o.AppServices) { return true } @@ -203,7 +203,7 @@ func (o *UpdateInstance) GetExtensionsOk() ([]Extension, bool) { // HasExtensions returns a boolean if a field has been set. func (o *UpdateInstance) HasExtensions() bool { - if o != nil && IsNil(o.Extensions) { + if o != nil && !IsNil(o.Extensions) { return true } @@ -236,7 +236,7 @@ func (o *UpdateInstance) GetExtraDomainsRwOk() ([]string, bool) { // HasExtraDomainsRw returns a boolean if a field has been set. func (o *UpdateInstance) HasExtraDomainsRw() bool { - if o != nil && IsNil(o.ExtraDomainsRw) { + if o != nil && !IsNil(o.ExtraDomainsRw) { return true } @@ -269,7 +269,7 @@ func (o *UpdateInstance) GetIpAllowListOk() ([]string, bool) { // HasIpAllowList returns a boolean if a field has been set. func (o *UpdateInstance) HasIpAllowList() bool { - if o != nil && IsNil(o.IpAllowList) { + if o != nil && !IsNil(o.IpAllowList) { return true } @@ -326,7 +326,7 @@ func (o *UpdateInstance) GetPostgresConfigsOk() ([]PgConfig, bool) { // HasPostgresConfigs returns a boolean if a field has been set. func (o *UpdateInstance) HasPostgresConfigs() bool { - if o != nil && IsNil(o.PostgresConfigs) { + if o != nil && !IsNil(o.PostgresConfigs) { return true } @@ -407,7 +407,7 @@ func (o *UpdateInstance) GetTrunkInstallsOk() ([]TrunkInstall, bool) { // HasTrunkInstalls returns a boolean if a field has been set. func (o *UpdateInstance) HasTrunkInstalls() bool { - if o != nil && IsNil(o.TrunkInstalls) { + if o != nil && !IsNil(o.TrunkInstalls) { return true }