diff --git a/Makefile b/Makefile index cdf82a3f..edd64ee7 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ generate: go generate update-sdk: - go get github.com/cockroachdb/cockroach-cloud-sdk-go/v4 + go get github.com/cockroachdb/cockroach-cloud-sdk-go/v5 go generate ./mock release: diff --git a/go.mod b/go.mod index c4fb63e0..bd330ddc 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.22.0 toolchain go1.22.8 require ( - github.com/cockroachdb/cockroach-cloud-sdk-go/v5 v5.0.0 + github.com/cockroachdb/cockroach-cloud-sdk-go/v5 v5.1.0 github.com/golang/mock v1.6.0 github.com/google/uuid v1.6.0 github.com/hashicorp/go-retryablehttp v0.7.4 diff --git a/go.sum b/go.sum index 45f80507..cfca4100 100644 --- a/go.sum +++ b/go.sum @@ -27,6 +27,8 @@ github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vc github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cockroachdb/cockroach-cloud-sdk-go/v5 v5.0.0 h1:8O3DyFBe7h95LoWdRHBahEtuk4jEOjAQsbm0Ah0TNWM= github.com/cockroachdb/cockroach-cloud-sdk-go/v5 v5.0.0/go.mod h1:a3jsLQtOmOKWMbXQg4Qb6Dpl/fAVETq1p8XAhZXbmsM= +github.com/cockroachdb/cockroach-cloud-sdk-go/v5 v5.1.0 h1:xW/yJFdCqdCLscX9uz4z3Eg9gJpr3xMrytromhz7Z1w= +github.com/cockroachdb/cockroach-cloud-sdk-go/v5 v5.1.0/go.mod h1:a3jsLQtOmOKWMbXQg4Qb6Dpl/fAVETq1p8XAhZXbmsM= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/mock/service.go b/mock/service.go index 82591ad7..54f05a19 100644 --- a/mock/service.go +++ b/mock/service.go @@ -164,22 +164,6 @@ func (mr *MockServiceMockRecorder) CreateApiKey(arg0, arg1 interface{}) *gomock. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateApiKey", reflect.TypeOf((*MockService)(nil).CreateApiKey), arg0, arg1) } -// CreateApiOidcConfig mocks base method. -func (m *MockService) CreateApiOidcConfig(arg0 context.Context, arg1 *client.CreateApiOidcConfigRequest) (*client.ApiOidcConfig, *http.Response, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateApiOidcConfig", arg0, arg1) - ret0, _ := ret[0].(*client.ApiOidcConfig) - ret1, _ := ret[1].(*http.Response) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 -} - -// CreateApiOidcConfig indicates an expected call of CreateApiOidcConfig. -func (mr *MockServiceMockRecorder) CreateApiOidcConfig(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateApiOidcConfig", reflect.TypeOf((*MockService)(nil).CreateApiOidcConfig), arg0, arg1) -} - // CreateCluster mocks base method. func (m *MockService) CreateCluster(arg0 context.Context, arg1 *client.CreateClusterRequest) (*client.Cluster, *http.Response, error) { m.ctrl.T.Helper() @@ -260,6 +244,22 @@ func (mr *MockServiceMockRecorder) CreatePrivateEndpointServices(arg0, arg1 inte return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePrivateEndpointServices", reflect.TypeOf((*MockService)(nil).CreatePrivateEndpointServices), arg0, arg1) } +// CreateReplicationStream mocks base method. +func (m *MockService) CreateReplicationStream(arg0 context.Context, arg1 *client.CreateReplicationStreamRequest) (*client.ReplicationStream, *http.Response, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateReplicationStream", arg0, arg1) + ret0, _ := ret[0].(*client.ReplicationStream) + ret1, _ := ret[1].(*http.Response) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// CreateReplicationStream indicates an expected call of CreateReplicationStream. +func (mr *MockServiceMockRecorder) CreateReplicationStream(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateReplicationStream", reflect.TypeOf((*MockService)(nil).CreateReplicationStream), arg0, arg1) +} + // CreateSQLUser mocks base method. func (m *MockService) CreateSQLUser(arg0 context.Context, arg1 string, arg2 *client.CreateSQLUserRequest) (*client.SQLUser, *http.Response, error) { m.ctrl.T.Helper() @@ -340,22 +340,6 @@ func (mr *MockServiceMockRecorder) DeleteApiKey(arg0, arg1 interface{}) *gomock. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteApiKey", reflect.TypeOf((*MockService)(nil).DeleteApiKey), arg0, arg1) } -// DeleteApiOidcConfig mocks base method. -func (m *MockService) DeleteApiOidcConfig(arg0 context.Context, arg1 string) (*client.ApiOidcConfig, *http.Response, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteApiOidcConfig", arg0, arg1) - ret0, _ := ret[0].(*client.ApiOidcConfig) - ret1, _ := ret[1].(*http.Response) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 -} - -// DeleteApiOidcConfig indicates an expected call of DeleteApiOidcConfig. -func (mr *MockServiceMockRecorder) DeleteApiOidcConfig(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteApiOidcConfig", reflect.TypeOf((*MockService)(nil).DeleteApiOidcConfig), arg0, arg1) -} - // DeleteClientCACert mocks base method. func (m *MockService) DeleteClientCACert(arg0 context.Context, arg1 string) (*client.ClientCACertInfo, *http.Response, error) { m.ctrl.T.Helper() @@ -768,22 +752,6 @@ func (mr *MockServiceMockRecorder) GetApiKey(arg0, arg1 interface{}) *gomock.Cal return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetApiKey", reflect.TypeOf((*MockService)(nil).GetApiKey), arg0, arg1) } -// GetApiOidcConfig mocks base method. -func (m *MockService) GetApiOidcConfig(arg0 context.Context, arg1 string) (*client.ApiOidcConfig, *http.Response, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetApiOidcConfig", arg0, arg1) - ret0, _ := ret[0].(*client.ApiOidcConfig) - ret1, _ := ret[1].(*http.Response) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 -} - -// GetApiOidcConfig indicates an expected call of GetApiOidcConfig. -func (mr *MockServiceMockRecorder) GetApiOidcConfig(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetApiOidcConfig", reflect.TypeOf((*MockService)(nil).GetApiOidcConfig), arg0, arg1) -} - // GetBackupConfiguration mocks base method. func (m *MockService) GetBackupConfiguration(arg0 context.Context, arg1 string) (*client.BackupConfiguration, *http.Response, error) { m.ctrl.T.Helper() @@ -1136,6 +1104,22 @@ func (mr *MockServiceMockRecorder) GetPrometheusMetricExportInfo(arg0, arg1 inte return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrometheusMetricExportInfo", reflect.TypeOf((*MockService)(nil).GetPrometheusMetricExportInfo), arg0, arg1) } +// GetReplicationStream mocks base method. +func (m *MockService) GetReplicationStream(arg0 context.Context, arg1 string) (*client.ReplicationStream, *http.Response, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetReplicationStream", arg0, arg1) + ret0, _ := ret[0].(*client.ReplicationStream) + ret1, _ := ret[1].(*http.Response) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// GetReplicationStream indicates an expected call of GetReplicationStream. +func (mr *MockServiceMockRecorder) GetReplicationStream(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReplicationStream", reflect.TypeOf((*MockService)(nil).GetReplicationStream), arg0, arg1) +} + // GetResourceType mocks base method. func (m *MockService) GetResourceType(arg0 context.Context, arg1 string, arg2 *client.GetResourceTypeOptions) (*client.ScimResourceType, *http.Response, error) { m.ctrl.T.Helper() @@ -1328,22 +1312,6 @@ func (mr *MockServiceMockRecorder) ListApiKeys(arg0, arg1 interface{}) *gomock.C return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListApiKeys", reflect.TypeOf((*MockService)(nil).ListApiKeys), arg0, arg1) } -// ListApiOidcConfig mocks base method. -func (m *MockService) ListApiOidcConfig(arg0 context.Context, arg1 *client.ListApiOidcConfigOptions) (*client.ListApiOidcConfigResponse, *http.Response, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListApiOidcConfig", arg0, arg1) - ret0, _ := ret[0].(*client.ListApiOidcConfigResponse) - ret1, _ := ret[1].(*http.Response) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 -} - -// ListApiOidcConfig indicates an expected call of ListApiOidcConfig. -func (mr *MockServiceMockRecorder) ListApiOidcConfig(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListApiOidcConfig", reflect.TypeOf((*MockService)(nil).ListApiOidcConfig), arg0, arg1) -} - // ListAuditLogs mocks base method. func (m *MockService) ListAuditLogs(arg0 context.Context, arg1 *client.ListAuditLogsOptions) (*client.ListAuditLogsResponse, *http.Response, error) { m.ctrl.T.Helper() @@ -1855,22 +1823,6 @@ func (mr *MockServiceMockRecorder) UpdateApiKey(arg0, arg1, arg2 interface{}) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApiKey", reflect.TypeOf((*MockService)(nil).UpdateApiKey), arg0, arg1, arg2) } -// UpdateApiOidcConfig mocks base method. -func (m *MockService) UpdateApiOidcConfig(arg0 context.Context, arg1 string, arg2 *client.ApiOidcConfig1) (*client.ApiOidcConfig, *http.Response, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateApiOidcConfig", arg0, arg1, arg2) - ret0, _ := ret[0].(*client.ApiOidcConfig) - ret1, _ := ret[1].(*http.Response) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 -} - -// UpdateApiOidcConfig indicates an expected call of UpdateApiOidcConfig. -func (mr *MockServiceMockRecorder) UpdateApiOidcConfig(arg0, arg1, arg2 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateApiOidcConfig", reflect.TypeOf((*MockService)(nil).UpdateApiOidcConfig), arg0, arg1, arg2) -} - // UpdateBackupConfiguration mocks base method. func (m *MockService) UpdateBackupConfiguration(arg0 context.Context, arg1 string, arg2 *client.UpdateBackupConfigurationSpec) (*client.BackupConfiguration, *http.Response, error) { m.ctrl.T.Helper() @@ -1999,6 +1951,22 @@ func (mr *MockServiceMockRecorder) UpdateJWTIssuer(arg0, arg1, arg2 interface{}) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateJWTIssuer", reflect.TypeOf((*MockService)(nil).UpdateJWTIssuer), arg0, arg1, arg2) } +// UpdateReplicationStream mocks base method. +func (m *MockService) UpdateReplicationStream(arg0 context.Context, arg1 string, arg2 *client.UpdateReplicationStreamSpec) (*client.ReplicationStream, *http.Response, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateReplicationStream", arg0, arg1, arg2) + ret0, _ := ret[0].(*client.ReplicationStream) + ret1, _ := ret[1].(*http.Response) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// UpdateReplicationStream indicates an expected call of UpdateReplicationStream. +func (mr *MockServiceMockRecorder) UpdateReplicationStream(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateReplicationStream", reflect.TypeOf((*MockService)(nil).UpdateReplicationStream), arg0, arg1, arg2) +} + // UpdateSQLUserPassword mocks base method. func (m *MockService) UpdateSQLUserPassword(arg0 context.Context, arg1, arg2 string, arg3 *client.UpdateSQLUserPasswordRequest) (*client.SQLUser, *http.Response, error) { m.ctrl.T.Helper() diff --git a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/configuration.go b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/configuration.go index 186eb630..b4ae7f4f 100644 --- a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/configuration.go +++ b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/configuration.go @@ -64,7 +64,7 @@ func WithUsername(username string) ConfigurationOption { func NewConfiguration(apiToken string, opts ...ConfigurationOption) *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), - UserAgent: "ccloud-sdk-go/5.0.0", + UserAgent: "ccloud-sdk-go/5.1.0", Debug: false, ServerURL: DefaultServerURL, apiToken: apiToken, diff --git a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_api_oidc_config.go b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_api_oidc_config.go deleted file mode 100644 index 83e992f8..00000000 --- a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_api_oidc_config.go +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2023 The Cockroach Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -// CockroachDB Cloud API -// API version: 2024-09-16 - -package client - -// ApiOidcConfig api_oidc_config contains information about an OIDC provider that can generate JWT tokens that can be used for authentication with the Cockroach Cloud API.. -type ApiOidcConfig struct { - Audience string `json:"audience"` - Claim *string `json:"claim,omitempty"` - Id string `json:"id"` - IdentityMap *[]ApiOidcIdentityMapEntry `json:"identity_map,omitempty"` - Issuer string `json:"issuer"` - Jwks string `json:"jwks"` -} - -// NewApiOidcConfig instantiates a new ApiOidcConfig object. -// 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 NewApiOidcConfig(audience string, id string, issuer string, jwks string) *ApiOidcConfig { - p := ApiOidcConfig{} - p.Audience = audience - p.Id = id - p.Issuer = issuer - p.Jwks = jwks - return &p -} - -// NewApiOidcConfigWithDefaults instantiates a new ApiOidcConfig object. -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewApiOidcConfigWithDefaults() *ApiOidcConfig { - p := ApiOidcConfig{} - return &p -} - -// GetAudience returns the Audience field value. -func (o *ApiOidcConfig) GetAudience() string { - if o == nil { - var ret string - return ret - } - - return o.Audience -} - -// SetAudience sets field value. -func (o *ApiOidcConfig) SetAudience(v string) { - o.Audience = v -} - -// GetClaim returns the Claim field value if set, zero value otherwise. -func (o *ApiOidcConfig) GetClaim() string { - if o == nil || o.Claim == nil { - var ret string - return ret - } - return *o.Claim -} - -// SetClaim gets a reference to the given string and assigns it to the Claim field. -func (o *ApiOidcConfig) SetClaim(v string) { - o.Claim = &v -} - -// GetId returns the Id field value. -func (o *ApiOidcConfig) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// SetId sets field value. -func (o *ApiOidcConfig) SetId(v string) { - o.Id = v -} - -// GetIdentityMap returns the IdentityMap field value if set, zero value otherwise. -func (o *ApiOidcConfig) GetIdentityMap() []ApiOidcIdentityMapEntry { - if o == nil || o.IdentityMap == nil { - var ret []ApiOidcIdentityMapEntry - return ret - } - return *o.IdentityMap -} - -// SetIdentityMap gets a reference to the given []ApiOidcIdentityMapEntry and assigns it to the IdentityMap field. -func (o *ApiOidcConfig) SetIdentityMap(v []ApiOidcIdentityMapEntry) { - o.IdentityMap = &v -} - -// GetIssuer returns the Issuer field value. -func (o *ApiOidcConfig) GetIssuer() string { - if o == nil { - var ret string - return ret - } - - return o.Issuer -} - -// SetIssuer sets field value. -func (o *ApiOidcConfig) SetIssuer(v string) { - o.Issuer = v -} - -// GetJwks returns the Jwks field value. -func (o *ApiOidcConfig) GetJwks() string { - if o == nil { - var ret string - return ret - } - - return o.Jwks -} - -// SetJwks sets field value. -func (o *ApiOidcConfig) SetJwks(v string) { - o.Jwks = v -} diff --git a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_api_oidc_config_1.go b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_api_oidc_config_1.go deleted file mode 100644 index 21fea85d..00000000 --- a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_api_oidc_config_1.go +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright 2023 The Cockroach Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -// CockroachDB Cloud API -// API version: 2024-09-16 - -package client - -// ApiOidcConfig1 api_oidc_config contains information about an OIDC provider that can generate JWT tokens that can be used for authentication with the Cockroach Cloud API.. -type ApiOidcConfig1 struct { - Audience string `json:"audience"` - Claim *string `json:"claim,omitempty"` - IdentityMap *[]ApiOidcIdentityMapEntry `json:"identity_map,omitempty"` - Issuer string `json:"issuer"` - Jwks string `json:"jwks"` -} - -// NewApiOidcConfig1 instantiates a new ApiOidcConfig1 object. -// 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 NewApiOidcConfig1(audience string, issuer string, jwks string) *ApiOidcConfig1 { - p := ApiOidcConfig1{} - p.Audience = audience - p.Issuer = issuer - p.Jwks = jwks - return &p -} - -// NewApiOidcConfig1WithDefaults instantiates a new ApiOidcConfig1 object. -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewApiOidcConfig1WithDefaults() *ApiOidcConfig1 { - p := ApiOidcConfig1{} - return &p -} - -// GetAudience returns the Audience field value. -func (o *ApiOidcConfig1) GetAudience() string { - if o == nil { - var ret string - return ret - } - - return o.Audience -} - -// SetAudience sets field value. -func (o *ApiOidcConfig1) SetAudience(v string) { - o.Audience = v -} - -// GetClaim returns the Claim field value if set, zero value otherwise. -func (o *ApiOidcConfig1) GetClaim() string { - if o == nil || o.Claim == nil { - var ret string - return ret - } - return *o.Claim -} - -// SetClaim gets a reference to the given string and assigns it to the Claim field. -func (o *ApiOidcConfig1) SetClaim(v string) { - o.Claim = &v -} - -// GetIdentityMap returns the IdentityMap field value if set, zero value otherwise. -func (o *ApiOidcConfig1) GetIdentityMap() []ApiOidcIdentityMapEntry { - if o == nil || o.IdentityMap == nil { - var ret []ApiOidcIdentityMapEntry - return ret - } - return *o.IdentityMap -} - -// SetIdentityMap gets a reference to the given []ApiOidcIdentityMapEntry and assigns it to the IdentityMap field. -func (o *ApiOidcConfig1) SetIdentityMap(v []ApiOidcIdentityMapEntry) { - o.IdentityMap = &v -} - -// GetIssuer returns the Issuer field value. -func (o *ApiOidcConfig1) GetIssuer() string { - if o == nil { - var ret string - return ret - } - - return o.Issuer -} - -// SetIssuer sets field value. -func (o *ApiOidcConfig1) SetIssuer(v string) { - o.Issuer = v -} - -// GetJwks returns the Jwks field value. -func (o *ApiOidcConfig1) GetJwks() string { - if o == nil { - var ret string - return ret - } - - return o.Jwks -} - -// SetJwks sets field value. -func (o *ApiOidcConfig1) SetJwks(v string) { - o.Jwks = v -} diff --git a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_api_oidc_identity_map_entry.go b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_api_oidc_identity_map_entry.go deleted file mode 100644 index 01cd9d82..00000000 --- a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_api_oidc_identity_map_entry.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2023 The Cockroach Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -// CockroachDB Cloud API -// API version: 2024-09-16 - -package client - -// ApiOidcIdentityMapEntry struct for ApiOidcIdentityMapEntry. -type ApiOidcIdentityMapEntry struct { - CcIdentity *string `json:"cc_identity,omitempty"` - IsRegex *bool `json:"is_regex,omitempty"` - TokenIdentity *string `json:"token_identity,omitempty"` -} - -// NewApiOidcIdentityMapEntry instantiates a new ApiOidcIdentityMapEntry object. -// 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 NewApiOidcIdentityMapEntry() *ApiOidcIdentityMapEntry { - p := ApiOidcIdentityMapEntry{} - return &p -} - -// GetCcIdentity returns the CcIdentity field value if set, zero value otherwise. -func (o *ApiOidcIdentityMapEntry) GetCcIdentity() string { - if o == nil || o.CcIdentity == nil { - var ret string - return ret - } - return *o.CcIdentity -} - -// SetCcIdentity gets a reference to the given string and assigns it to the CcIdentity field. -func (o *ApiOidcIdentityMapEntry) SetCcIdentity(v string) { - o.CcIdentity = &v -} - -// GetIsRegex returns the IsRegex field value if set, zero value otherwise. -func (o *ApiOidcIdentityMapEntry) GetIsRegex() bool { - if o == nil || o.IsRegex == nil { - var ret bool - return ret - } - return *o.IsRegex -} - -// SetIsRegex gets a reference to the given bool and assigns it to the IsRegex field. -func (o *ApiOidcIdentityMapEntry) SetIsRegex(v bool) { - o.IsRegex = &v -} - -// GetTokenIdentity returns the TokenIdentity field value if set, zero value otherwise. -func (o *ApiOidcIdentityMapEntry) GetTokenIdentity() string { - if o == nil || o.TokenIdentity == nil { - var ret string - return ret - } - return *o.TokenIdentity -} - -// SetTokenIdentity gets a reference to the given string and assigns it to the TokenIdentity field. -func (o *ApiOidcIdentityMapEntry) SetTokenIdentity(v string) { - o.TokenIdentity = &v -} diff --git a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_create_api_oidc_config_request.go b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_create_api_oidc_config_request.go deleted file mode 100644 index 00d33907..00000000 --- a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_create_api_oidc_config_request.go +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright 2023 The Cockroach Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -// CockroachDB Cloud API -// API version: 2024-09-16 - -package client - -// CreateApiOidcConfigRequest struct for CreateApiOidcConfigRequest. -type CreateApiOidcConfigRequest struct { - Audience string `json:"audience"` - Claim *string `json:"claim,omitempty"` - IdentityMap *[]ApiOidcIdentityMapEntry `json:"identity_map,omitempty"` - Issuer string `json:"issuer"` - Jwks string `json:"jwks"` -} - -// NewCreateApiOidcConfigRequest instantiates a new CreateApiOidcConfigRequest object. -// 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 NewCreateApiOidcConfigRequest(audience string, issuer string, jwks string) *CreateApiOidcConfigRequest { - p := CreateApiOidcConfigRequest{} - p.Audience = audience - p.Issuer = issuer - p.Jwks = jwks - return &p -} - -// NewCreateApiOidcConfigRequestWithDefaults instantiates a new CreateApiOidcConfigRequest object. -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateApiOidcConfigRequestWithDefaults() *CreateApiOidcConfigRequest { - p := CreateApiOidcConfigRequest{} - return &p -} - -// GetAudience returns the Audience field value. -func (o *CreateApiOidcConfigRequest) GetAudience() string { - if o == nil { - var ret string - return ret - } - - return o.Audience -} - -// SetAudience sets field value. -func (o *CreateApiOidcConfigRequest) SetAudience(v string) { - o.Audience = v -} - -// GetClaim returns the Claim field value if set, zero value otherwise. -func (o *CreateApiOidcConfigRequest) GetClaim() string { - if o == nil || o.Claim == nil { - var ret string - return ret - } - return *o.Claim -} - -// SetClaim gets a reference to the given string and assigns it to the Claim field. -func (o *CreateApiOidcConfigRequest) SetClaim(v string) { - o.Claim = &v -} - -// GetIdentityMap returns the IdentityMap field value if set, zero value otherwise. -func (o *CreateApiOidcConfigRequest) GetIdentityMap() []ApiOidcIdentityMapEntry { - if o == nil || o.IdentityMap == nil { - var ret []ApiOidcIdentityMapEntry - return ret - } - return *o.IdentityMap -} - -// SetIdentityMap gets a reference to the given []ApiOidcIdentityMapEntry and assigns it to the IdentityMap field. -func (o *CreateApiOidcConfigRequest) SetIdentityMap(v []ApiOidcIdentityMapEntry) { - o.IdentityMap = &v -} - -// GetIssuer returns the Issuer field value. -func (o *CreateApiOidcConfigRequest) GetIssuer() string { - if o == nil { - var ret string - return ret - } - - return o.Issuer -} - -// SetIssuer sets field value. -func (o *CreateApiOidcConfigRequest) SetIssuer(v string) { - o.Issuer = v -} - -// GetJwks returns the Jwks field value. -func (o *CreateApiOidcConfigRequest) GetJwks() string { - if o == nil { - var ret string - return ret - } - - return o.Jwks -} - -// SetJwks sets field value. -func (o *CreateApiOidcConfigRequest) SetJwks(v string) { - o.Jwks = v -} diff --git a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_create_replication_stream_request.go b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_create_replication_stream_request.go new file mode 100644 index 00000000..0c19821b --- /dev/null +++ b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_create_replication_stream_request.go @@ -0,0 +1,76 @@ +// Copyright 2023 The Cockroach Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// CockroachDB Cloud API +// API version: 2024-09-16 + +package client + +// CreateReplicationStreamRequest struct for CreateReplicationStreamRequest. +type CreateReplicationStreamRequest struct { + // source_cluster_id is the ID of the cluster that is being replicated. + SourceClusterId string `json:"source_cluster_id"` + // target_cluster_id is the ID of the cluster that data is being replicated to. + TargetClusterId string `json:"target_cluster_id"` +} + +// NewCreateReplicationStreamRequest instantiates a new CreateReplicationStreamRequest object. +// 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 NewCreateReplicationStreamRequest(sourceClusterId string, targetClusterId string) *CreateReplicationStreamRequest { + p := CreateReplicationStreamRequest{} + p.SourceClusterId = sourceClusterId + p.TargetClusterId = targetClusterId + return &p +} + +// NewCreateReplicationStreamRequestWithDefaults instantiates a new CreateReplicationStreamRequest object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateReplicationStreamRequestWithDefaults() *CreateReplicationStreamRequest { + p := CreateReplicationStreamRequest{} + return &p +} + +// GetSourceClusterId returns the SourceClusterId field value. +func (o *CreateReplicationStreamRequest) GetSourceClusterId() string { + if o == nil { + var ret string + return ret + } + + return o.SourceClusterId +} + +// SetSourceClusterId sets field value. +func (o *CreateReplicationStreamRequest) SetSourceClusterId(v string) { + o.SourceClusterId = v +} + +// GetTargetClusterId returns the TargetClusterId field value. +func (o *CreateReplicationStreamRequest) GetTargetClusterId() string { + if o == nil { + var ret string + return ret + } + + return o.TargetClusterId +} + +// SetTargetClusterId sets field value. +func (o *CreateReplicationStreamRequest) SetTargetClusterId(v string) { + o.TargetClusterId = v +} diff --git a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_dedicated_cluster_create_specification.go b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_dedicated_cluster_create_specification.go index 2b2f3530..c00f5a74 100644 --- a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_dedicated_cluster_create_specification.go +++ b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_dedicated_cluster_create_specification.go @@ -30,6 +30,8 @@ type DedicatedClusterCreateSpecification struct { RegionNodes map[string]int32 `json:"region_nodes"` // Preview: restrict_egress_traffic if set, results in an egress traffic policy of default-deny at creation time. RestrictEgressTraffic *bool `json:"restrict_egress_traffic,omitempty"` + // Preview: support_physical_cluster_replication specifies whether a cluster should be started using an architecture that supports physical cluster replication. + SupportPhysicalClusterReplication *bool `json:"support_physical_cluster_replication,omitempty"` } // NewDedicatedClusterCreateSpecification instantiates a new DedicatedClusterCreateSpecification object. @@ -136,3 +138,17 @@ func (o *DedicatedClusterCreateSpecification) GetRestrictEgressTraffic() bool { func (o *DedicatedClusterCreateSpecification) SetRestrictEgressTraffic(v bool) { o.RestrictEgressTraffic = &v } + +// GetSupportPhysicalClusterReplication returns the SupportPhysicalClusterReplication field value if set, zero value otherwise. +func (o *DedicatedClusterCreateSpecification) GetSupportPhysicalClusterReplication() bool { + if o == nil || o.SupportPhysicalClusterReplication == nil { + var ret bool + return ret + } + return *o.SupportPhysicalClusterReplication +} + +// SetSupportPhysicalClusterReplication gets a reference to the given bool and assigns it to the SupportPhysicalClusterReplication field. +func (o *DedicatedClusterCreateSpecification) SetSupportPhysicalClusterReplication(v bool) { + o.SupportPhysicalClusterReplication = &v +} diff --git a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_list_api_oidc_config_response.go b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_list_api_oidc_config_response.go deleted file mode 100644 index d95b47e1..00000000 --- a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_list_api_oidc_config_response.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2023 The Cockroach Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -// CockroachDB Cloud API -// API version: 2024-09-16 - -package client - -// ListApiOidcConfigResponse struct for ListApiOidcConfigResponse. -type ListApiOidcConfigResponse struct { - ApiOidcConfigs *[]ApiOidcConfig `json:"api_oidc_configs,omitempty"` - Pagination *KeysetPaginationResponse `json:"pagination,omitempty"` -} - -// NewListApiOidcConfigResponse instantiates a new ListApiOidcConfigResponse object. -// 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 NewListApiOidcConfigResponse() *ListApiOidcConfigResponse { - p := ListApiOidcConfigResponse{} - return &p -} - -// GetApiOidcConfigs returns the ApiOidcConfigs field value if set, zero value otherwise. -func (o *ListApiOidcConfigResponse) GetApiOidcConfigs() []ApiOidcConfig { - if o == nil || o.ApiOidcConfigs == nil { - var ret []ApiOidcConfig - return ret - } - return *o.ApiOidcConfigs -} - -// SetApiOidcConfigs gets a reference to the given []ApiOidcConfig and assigns it to the ApiOidcConfigs field. -func (o *ListApiOidcConfigResponse) SetApiOidcConfigs(v []ApiOidcConfig) { - o.ApiOidcConfigs = &v -} - -// GetPagination returns the Pagination field value if set, zero value otherwise. -func (o *ListApiOidcConfigResponse) GetPagination() KeysetPaginationResponse { - if o == nil || o.Pagination == nil { - var ret KeysetPaginationResponse - return ret - } - return *o.Pagination -} - -// SetPagination gets a reference to the given KeysetPaginationResponse and assigns it to the Pagination field. -func (o *ListApiOidcConfigResponse) SetPagination(v KeysetPaginationResponse) { - o.Pagination = &v -} diff --git a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_maintenance_window.go b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_maintenance_window.go index 49760eac..10b4c888 100644 --- a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_maintenance_window.go +++ b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_maintenance_window.go @@ -18,7 +18,7 @@ package client -// MaintenanceWindow MaintenanceWindowSpec specifies a weekly recurring maintenance window for a cluster.. +// MaintenanceWindow MaintenanceWindowSpec specifies a weekly recurring maintenance window for an ADVANCED cluster.. type MaintenanceWindow struct { // OffsetDuration is the duration from the start of a week (Monday 00:00 UTC) that this maintenance window will start after. Must be less than 1 week. OffsetDuration string `json:"offset_duration"` diff --git a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_replication_stream.go b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_replication_stream.go new file mode 100644 index 00000000..e1037312 --- /dev/null +++ b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_replication_stream.go @@ -0,0 +1,213 @@ +// Copyright 2023 The Cockroach Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// CockroachDB Cloud API +// API version: 2024-09-16 + +package client + +import ( + "time" +) + +// ReplicationStream struct for ReplicationStream. +type ReplicationStream struct { + // activation_at is the crdb system time at which failover is finalized. This may differ from the time for which failover was requested. This field will be present when a replication stream is in the COMPLETED state. + ActivationAt *time.Time `json:"activation_at,omitempty"` + // created_at is the timestamp at which the replication stream was created. + CreatedAt time.Time `json:"created_at"` + // failover_at is the time for which failover is requested. If the user sets the status to 'FAILING_OVER' but omits failover_at, the failover time will default to the latest consistent replicated time. Otherwise, the user can pick a time up to one hour in the future to schedule a failover, or a time in the past to restore the cluster to a recent state. This field will be present if the user has requested failover at a future time. + FailoverAt *time.Time `json:"failover_at,omitempty"` + // id is the UUID of the replication stream. + Id string `json:"id"` + // replicated_time is the timestamp indicating the point up to which data has been replicated. The window between replicated_time and the actual time is known as replication lag. This field will be present when a replication stream is in the REPLICATING state. + ReplicatedTime *time.Time `json:"replicated_time,omitempty"` + // replication_lag_seconds is the replication lag (current time minus replicated time) in seconds. This field will be present when a replication stream is in the REPLICATING state. + ReplicationLagSeconds *int32 `json:"replication_lag_seconds,omitempty"` + // retained_time is the timestamp indicating the lower bound that the replication stream can failover to. This field will be present when a replication stream is in the REPLICATING state. + RetainedTime *time.Time `json:"retained_time,omitempty"` + // source_cluster_id is the ID of the cluster that is being replicated. + SourceClusterId string `json:"source_cluster_id"` + Status ReplicationStreamStatusType `json:"status"` + // target_cluster_id is the ID of the cluster that data is being replicated to. + TargetClusterId string `json:"target_cluster_id"` +} + +// NewReplicationStream instantiates a new ReplicationStream object. +// 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 NewReplicationStream(createdAt time.Time, id string, sourceClusterId string, status ReplicationStreamStatusType, targetClusterId string) *ReplicationStream { + p := ReplicationStream{} + p.CreatedAt = createdAt + p.Id = id + p.SourceClusterId = sourceClusterId + p.Status = status + p.TargetClusterId = targetClusterId + return &p +} + +// NewReplicationStreamWithDefaults instantiates a new ReplicationStream object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReplicationStreamWithDefaults() *ReplicationStream { + p := ReplicationStream{} + return &p +} + +// GetActivationAt returns the ActivationAt field value if set, zero value otherwise. +func (o *ReplicationStream) GetActivationAt() time.Time { + if o == nil || o.ActivationAt == nil { + var ret time.Time + return ret + } + return *o.ActivationAt +} + +// SetActivationAt gets a reference to the given time.Time and assigns it to the ActivationAt field. +func (o *ReplicationStream) SetActivationAt(v time.Time) { + o.ActivationAt = &v +} + +// GetCreatedAt returns the CreatedAt field value. +func (o *ReplicationStream) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// SetCreatedAt sets field value. +func (o *ReplicationStream) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetFailoverAt returns the FailoverAt field value if set, zero value otherwise. +func (o *ReplicationStream) GetFailoverAt() time.Time { + if o == nil || o.FailoverAt == nil { + var ret time.Time + return ret + } + return *o.FailoverAt +} + +// SetFailoverAt gets a reference to the given time.Time and assigns it to the FailoverAt field. +func (o *ReplicationStream) SetFailoverAt(v time.Time) { + o.FailoverAt = &v +} + +// GetId returns the Id field value. +func (o *ReplicationStream) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// SetId sets field value. +func (o *ReplicationStream) SetId(v string) { + o.Id = v +} + +// GetReplicatedTime returns the ReplicatedTime field value if set, zero value otherwise. +func (o *ReplicationStream) GetReplicatedTime() time.Time { + if o == nil || o.ReplicatedTime == nil { + var ret time.Time + return ret + } + return *o.ReplicatedTime +} + +// SetReplicatedTime gets a reference to the given time.Time and assigns it to the ReplicatedTime field. +func (o *ReplicationStream) SetReplicatedTime(v time.Time) { + o.ReplicatedTime = &v +} + +// GetReplicationLagSeconds returns the ReplicationLagSeconds field value if set, zero value otherwise. +func (o *ReplicationStream) GetReplicationLagSeconds() int32 { + if o == nil || o.ReplicationLagSeconds == nil { + var ret int32 + return ret + } + return *o.ReplicationLagSeconds +} + +// SetReplicationLagSeconds gets a reference to the given int32 and assigns it to the ReplicationLagSeconds field. +func (o *ReplicationStream) SetReplicationLagSeconds(v int32) { + o.ReplicationLagSeconds = &v +} + +// GetRetainedTime returns the RetainedTime field value if set, zero value otherwise. +func (o *ReplicationStream) GetRetainedTime() time.Time { + if o == nil || o.RetainedTime == nil { + var ret time.Time + return ret + } + return *o.RetainedTime +} + +// SetRetainedTime gets a reference to the given time.Time and assigns it to the RetainedTime field. +func (o *ReplicationStream) SetRetainedTime(v time.Time) { + o.RetainedTime = &v +} + +// GetSourceClusterId returns the SourceClusterId field value. +func (o *ReplicationStream) GetSourceClusterId() string { + if o == nil { + var ret string + return ret + } + + return o.SourceClusterId +} + +// SetSourceClusterId sets field value. +func (o *ReplicationStream) SetSourceClusterId(v string) { + o.SourceClusterId = v +} + +// GetStatus returns the Status field value. +func (o *ReplicationStream) GetStatus() ReplicationStreamStatusType { + if o == nil { + var ret ReplicationStreamStatusType + return ret + } + + return o.Status +} + +// SetStatus sets field value. +func (o *ReplicationStream) SetStatus(v ReplicationStreamStatusType) { + o.Status = v +} + +// GetTargetClusterId returns the TargetClusterId field value. +func (o *ReplicationStream) GetTargetClusterId() string { + if o == nil { + var ret string + return ret + } + + return o.TargetClusterId +} + +// SetTargetClusterId sets field value. +func (o *ReplicationStream) SetTargetClusterId(v string) { + o.TargetClusterId = v +} diff --git a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_replication_stream_status_type.go b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_replication_stream_status_type.go new file mode 100644 index 00000000..96fe886f --- /dev/null +++ b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_replication_stream_status_type.go @@ -0,0 +1,68 @@ +// Copyright 2023 The Cockroach Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// CockroachDB Cloud API +// API version: 2024-09-16 + +package client + +import ( + "fmt" +) + +// ReplicationStreamStatusType the model 'ReplicationStreamStatusType'. +type ReplicationStreamStatusType string + +// List of ReplicationStreamStatus.Type. +const ( + REPLICATIONSTREAMSTATUSTYPE_STARTING ReplicationStreamStatusType = "STARTING" + REPLICATIONSTREAMSTATUSTYPE_REPLICATING ReplicationStreamStatusType = "REPLICATING" + REPLICATIONSTREAMSTATUSTYPE_FAILING_OVER ReplicationStreamStatusType = "FAILING_OVER" + REPLICATIONSTREAMSTATUSTYPE_COMPLETED ReplicationStreamStatusType = "COMPLETED" +) + +// All allowed values of ReplicationStreamStatusType enum. +var AllowedReplicationStreamStatusTypeEnumValues = []ReplicationStreamStatusType{ + "STARTING", + "REPLICATING", + "FAILING_OVER", + "COMPLETED", +} + +// NewReplicationStreamStatusTypeFromValue returns a pointer to a valid ReplicationStreamStatusType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewReplicationStreamStatusTypeFromValue(v string) (*ReplicationStreamStatusType, error) { + ev := ReplicationStreamStatusType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ReplicationStreamStatusType: valid values are %v", v, AllowedReplicationStreamStatusTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v ReplicationStreamStatusType) IsValid() bool { + for _, existing := range AllowedReplicationStreamStatusTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ReplicationStreamStatus.Type value. +func (v ReplicationStreamStatusType) Ptr() *ReplicationStreamStatusType { + return &v +} diff --git a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_update_replication_stream_spec.go b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_update_replication_stream_spec.go new file mode 100644 index 00000000..1460f11e --- /dev/null +++ b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/model_update_replication_stream_spec.go @@ -0,0 +1,67 @@ +// Copyright 2023 The Cockroach Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// CockroachDB Cloud API +// API version: 2024-09-16 + +package client + +import ( + "time" +) + +// UpdateReplicationStreamSpec struct for UpdateReplicationStreamSpec. +type UpdateReplicationStreamSpec struct { + // failover_at is the crdb system time at which failover occurs. If the user sets the status to 'FAILING_OVER' but omits failover_at, the failover time will default to the latest consistent replicated time. Otherwise, the user can pick a time up to one hour in the future to schedule a failover, or a time in the past to restore the cluster to a recent state. If the time is in the past, the API will make a best-effort attempt to validate that the time is not earlier than the retained time. In this case, if the retained time is updated in between validation and failover execution and the failover time becomes invalid, the stream will failover to the retained time. + FailoverAt *time.Time `json:"failover_at,omitempty"` + Status *ReplicationStreamStatusType `json:"status,omitempty"` +} + +// NewUpdateReplicationStreamSpec instantiates a new UpdateReplicationStreamSpec object. +// 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 NewUpdateReplicationStreamSpec() *UpdateReplicationStreamSpec { + p := UpdateReplicationStreamSpec{} + return &p +} + +// GetFailoverAt returns the FailoverAt field value if set, zero value otherwise. +func (o *UpdateReplicationStreamSpec) GetFailoverAt() time.Time { + if o == nil || o.FailoverAt == nil { + var ret time.Time + return ret + } + return *o.FailoverAt +} + +// SetFailoverAt gets a reference to the given time.Time and assigns it to the FailoverAt field. +func (o *UpdateReplicationStreamSpec) SetFailoverAt(v time.Time) { + o.FailoverAt = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *UpdateReplicationStreamSpec) GetStatus() ReplicationStreamStatusType { + if o == nil || o.Status == nil { + var ret ReplicationStreamStatusType + return ret + } + return *o.Status +} + +// SetStatus gets a reference to the given ReplicationStreamStatusType and assigns it to the Status field. +func (o *UpdateReplicationStreamSpec) SetStatus(v ReplicationStreamStatusType) { + o.Status = &v +} diff --git a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/service.go b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/service.go index cee971ce..50acdc98 100644 --- a/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/service.go +++ b/vendor/github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client/service.go @@ -244,26 +244,22 @@ type Service interface { GetPrometheusMetricExportInfo(ctx _context.Context, clusterId string) (*PrometheusMetricExportInfo, *_nethttp.Response, error) // - // OpenIDConnectConfiguration + // Organizations // - // Deprecated: Create an API OIDC configuration (Deprecated) - CreateApiOidcConfig(ctx _context.Context, createApiOidcConfigRequest *CreateApiOidcConfigRequest) (*ApiOidcConfig, *_nethttp.Response, error) - // Deprecated: Delete an API OIDC configuration (Deprecated) - DeleteApiOidcConfig(ctx _context.Context, id string) (*ApiOidcConfig, *_nethttp.Response, error) - // Deprecated: Get an API OIDC configuration (Deprecated) - GetApiOidcConfig(ctx _context.Context, id string) (*ApiOidcConfig, *_nethttp.Response, error) - // Deprecated: List all API OIDC configurations (Deprecated) - ListApiOidcConfig(ctx _context.Context, options *ListApiOidcConfigOptions) (*ListApiOidcConfigResponse, *_nethttp.Response, error) - // Deprecated: Update an API OIDC configuration (Deprecated) - UpdateApiOidcConfig(ctx _context.Context, id string, apiOidcConfig1 *ApiOidcConfig1) (*ApiOidcConfig, *_nethttp.Response, error) + // Get information about the caller's organization + GetOrganizationInfo(ctx _context.Context) (*Organization, *_nethttp.Response, error) // - // Organizations + // PhysicalClusterReplication // - // Get information about the caller's organization - GetOrganizationInfo(ctx _context.Context) (*Organization, *_nethttp.Response, error) + // Create a replication stream + CreateReplicationStream(ctx _context.Context, createReplicationStreamRequest *CreateReplicationStreamRequest) (*ReplicationStream, *_nethttp.Response, error) + // Get a replication stream + GetReplicationStream(ctx _context.Context, id string) (*ReplicationStream, *_nethttp.Response, error) + // Update a replication stream + UpdateReplicationStream(ctx _context.Context, id string, updateReplicationStreamSpec *UpdateReplicationStreamSpec) (*ReplicationStream, *_nethttp.Response, error) // // PrivateEndpointServices @@ -10048,13 +10044,12 @@ func (a *ServiceImpl) GetPrometheusMetricExportInfo( return &localVarReturnValue, localVarHTTPResponse, nil } -// CreateApiOidcConfig executes the request. -// Deprecated. -func (a *ServiceImpl) CreateApiOidcConfig( - ctx _context.Context, createApiOidcConfigRequest *CreateApiOidcConfigRequest, -) (*ApiOidcConfig, *_nethttp.Response, error) { +// GetOrganizationInfo executes the request. +func (a *ServiceImpl) GetOrganizationInfo( + ctx _context.Context, +) (*Organization, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -10063,17 +10058,14 @@ func (a *ServiceImpl) CreateApiOidcConfig( localBasePath := a.client.cfg.ServerURL - localVarPath := localBasePath + "/api/v1/api_oidc" + localVarPath := localBasePath + "/api/v1/organization" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if createApiOidcConfigRequest == nil { - return nil, nil, reportError("createApiOidcConfigRequest is required and must be specified") - } // Determine the Content-Type header. - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // Set Content-Type header. localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -10089,8 +10081,6 @@ func (a *ServiceImpl) CreateApiOidcConfig( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // Body params. - localVarPostBody = createApiOidcConfigRequest req, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, nil, err @@ -10173,7 +10163,7 @@ func (a *ServiceImpl) CreateApiOidcConfig( return nil, localVarHTTPResponse, newErr } - var localVarReturnValue ApiOidcConfig + var localVarReturnValue Organization err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := Error{ @@ -10186,13 +10176,12 @@ func (a *ServiceImpl) CreateApiOidcConfig( return &localVarReturnValue, localVarHTTPResponse, nil } -// DeleteApiOidcConfig executes the request. -// Deprecated. -func (a *ServiceImpl) DeleteApiOidcConfig( - ctx _context.Context, id string, -) (*ApiOidcConfig, *_nethttp.Response, error) { +// CreateReplicationStream executes the request. +func (a *ServiceImpl) CreateReplicationStream( + ctx _context.Context, createReplicationStreamRequest *CreateReplicationStreamRequest, +) (*ReplicationStream, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -10201,15 +10190,17 @@ func (a *ServiceImpl) DeleteApiOidcConfig( localBasePath := a.client.cfg.ServerURL - localVarPath := localBasePath + "/api/v1/api_oidc/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.PathEscape(parameterToString(id, "")), -1) + localVarPath := localBasePath + "/api/v1/replication-streams" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if createReplicationStreamRequest == nil { + return nil, nil, reportError("createReplicationStreamRequest is required and must be specified") + } // Determine the Content-Type header. - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // Set Content-Type header. localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -10225,6 +10216,8 @@ func (a *ServiceImpl) DeleteApiOidcConfig( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // Body params. + localVarPostBody = createReplicationStreamRequest req, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, nil, err @@ -10307,7 +10300,7 @@ func (a *ServiceImpl) DeleteApiOidcConfig( return nil, localVarHTTPResponse, newErr } - var localVarReturnValue ApiOidcConfig + var localVarReturnValue ReplicationStream err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := Error{ @@ -10320,11 +10313,10 @@ func (a *ServiceImpl) DeleteApiOidcConfig( return &localVarReturnValue, localVarHTTPResponse, nil } -// GetApiOidcConfig executes the request. -// Deprecated. -func (a *ServiceImpl) GetApiOidcConfig( +// GetReplicationStream executes the request. +func (a *ServiceImpl) GetReplicationStream( ctx _context.Context, id string, -) (*ApiOidcConfig, *_nethttp.Response, error) { +) (*ReplicationStream, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -10335,7 +10327,7 @@ func (a *ServiceImpl) GetApiOidcConfig( localBasePath := a.client.cfg.ServerURL - localVarPath := localBasePath + "/api/v1/api_oidc/{id}" + localVarPath := localBasePath + "/api/v1/replication-streams/{id}" localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.PathEscape(parameterToString(id, "")), -1) localVarHeaderParams := make(map[string]string) @@ -10441,7 +10433,7 @@ func (a *ServiceImpl) GetApiOidcConfig( return nil, localVarHTTPResponse, newErr } - var localVarReturnValue ApiOidcConfig + var localVarReturnValue ReplicationStream err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := Error{ @@ -10454,170 +10446,12 @@ func (a *ServiceImpl) GetApiOidcConfig( return &localVarReturnValue, localVarHTTPResponse, nil } -// ListApiOidcConfigOptions contains optional parameters for ListApiOidcConfig. -type ListApiOidcConfigOptions struct { - PaginationPage *string - - PaginationLimit *int32 - - PaginationAsOfTime *time.Time - - // - ASC: Sort in ascending order. This is the default unless otherwise specified. - DESC: Sort in descending order. - PaginationSortOrder *string -} - -// ListApiOidcConfig executes the request. -// Deprecated. -func (a *ServiceImpl) ListApiOidcConfig( - ctx _context.Context, options *ListApiOidcConfigOptions, -) (*ListApiOidcConfigResponse, *_nethttp.Response, error) { +// UpdateReplicationStream executes the request. +func (a *ServiceImpl) UpdateReplicationStream( + ctx _context.Context, id string, updateReplicationStreamSpec *UpdateReplicationStreamSpec, +) (*ReplicationStream, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath := a.client.cfg.ServerURL - - localVarPath := localBasePath + "/api/v1/api_oidc" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - - if options.PaginationPage != nil { - localVarQueryParams.Add("pagination.page", parameterToString(*options.PaginationPage, "")) - } - if options.PaginationLimit != nil { - localVarQueryParams.Add("pagination.limit", parameterToString(*options.PaginationLimit, "")) - } - if options.PaginationAsOfTime != nil { - localVarQueryParams.Add("pagination.as_of_time", parameterToString(*options.PaginationAsOfTime, "")) - } - if options.PaginationSortOrder != nil { - localVarQueryParams.Add("pagination.sort_order", parameterToString(*options.PaginationSortOrder, "")) - } - // Determine the Content-Type header. - localVarHTTPContentTypes := []string{} - - // Set Content-Type header. - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // Determine the Accept header. - localVarHTTPHeaderAccepts := []string{"application/json"} - - // Set Accept header. - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return nil, localVarHTTPResponse, err - } - - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return nil, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := Error{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v interface{} - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return nil, localVarHTTPResponse, newErr - } - newErr.model = v - return nil, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v interface{} - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return nil, localVarHTTPResponse, newErr - } - newErr.model = v - return nil, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v interface{} - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return nil, localVarHTTPResponse, newErr - } - newErr.model = v - return nil, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v interface{} - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return nil, localVarHTTPResponse, newErr - } - newErr.model = v - return nil, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v interface{} - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return nil, localVarHTTPResponse, newErr - } - newErr.model = v - return nil, localVarHTTPResponse, newErr - } - var v Status - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return nil, localVarHTTPResponse, newErr - } - newErr.model = v - return nil, localVarHTTPResponse, newErr - } - - var localVarReturnValue ListApiOidcConfigResponse - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := Error{ - body: localVarBody, - error: err.Error(), - } - return &localVarReturnValue, localVarHTTPResponse, newErr - } - - return &localVarReturnValue, localVarHTTPResponse, nil -} - -// UpdateApiOidcConfig executes the request. -// Deprecated. -func (a *ServiceImpl) UpdateApiOidcConfig( - ctx _context.Context, id string, apiOidcConfig1 *ApiOidcConfig1, -) (*ApiOidcConfig, *_nethttp.Response, error) { - var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -10626,14 +10460,14 @@ func (a *ServiceImpl) UpdateApiOidcConfig( localBasePath := a.client.cfg.ServerURL - localVarPath := localBasePath + "/api/v1/api_oidc/{id}" + localVarPath := localBasePath + "/api/v1/replication-streams/{id}" localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.PathEscape(parameterToString(id, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if apiOidcConfig1 == nil { - return nil, nil, reportError("apiOidcConfig1 is required and must be specified") + if updateReplicationStreamSpec == nil { + return nil, nil, reportError("updateReplicationStreamSpec is required and must be specified") } // Determine the Content-Type header. @@ -10654,139 +10488,7 @@ func (a *ServiceImpl) UpdateApiOidcConfig( localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // Body params. - localVarPostBody = apiOidcConfig1 - req, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return nil, localVarHTTPResponse, err - } - - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return nil, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := Error{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v interface{} - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return nil, localVarHTTPResponse, newErr - } - newErr.model = v - return nil, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v interface{} - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return nil, localVarHTTPResponse, newErr - } - newErr.model = v - return nil, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v interface{} - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return nil, localVarHTTPResponse, newErr - } - newErr.model = v - return nil, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v interface{} - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return nil, localVarHTTPResponse, newErr - } - newErr.model = v - return nil, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v interface{} - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return nil, localVarHTTPResponse, newErr - } - newErr.model = v - return nil, localVarHTTPResponse, newErr - } - var v Status - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return nil, localVarHTTPResponse, newErr - } - newErr.model = v - return nil, localVarHTTPResponse, newErr - } - - var localVarReturnValue ApiOidcConfig - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := Error{ - body: localVarBody, - error: err.Error(), - } - return &localVarReturnValue, localVarHTTPResponse, newErr - } - - return &localVarReturnValue, localVarHTTPResponse, nil -} - -// GetOrganizationInfo executes the request. -func (a *ServiceImpl) GetOrganizationInfo( - ctx _context.Context, -) (*Organization, *_nethttp.Response, error) { - var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath := a.client.cfg.ServerURL - - localVarPath := localBasePath + "/api/v1/organization" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - - // Determine the Content-Type header. - localVarHTTPContentTypes := []string{} - - // Set Content-Type header. - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // Determine the Accept header. - localVarHTTPHeaderAccepts := []string{"application/json"} - - // Set Accept header. - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } + localVarPostBody = updateReplicationStreamSpec req, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, nil, err @@ -10869,7 +10571,7 @@ func (a *ServiceImpl) GetOrganizationInfo( return nil, localVarHTTPResponse, newErr } - var localVarReturnValue Organization + var localVarReturnValue ReplicationStream err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := Error{ diff --git a/vendor/modules.txt b/vendor/modules.txt index 368cbad3..37dc0274 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -60,7 +60,7 @@ github.com/cloudflare/circl/math/mlsbset github.com/cloudflare/circl/sign github.com/cloudflare/circl/sign/ed25519 github.com/cloudflare/circl/sign/ed448 -# github.com/cockroachdb/cockroach-cloud-sdk-go/v5 v5.0.0 +# github.com/cockroachdb/cockroach-cloud-sdk-go/v5 v5.1.0 ## explicit; go 1.17 github.com/cockroachdb/cockroach-cloud-sdk-go/v5/pkg/client # github.com/davecgh/go-spew v1.1.1