From 946301c4be0dee02b0547a5d0d63e322811387d4 Mon Sep 17 00:00:00 2001 From: simisoft-exo Date: Thu, 19 Sep 2024 14:21:06 +0100 Subject: [PATCH] create endpoints using egoscale 3.1.6 structs --- cmd/dbaas_external_endpoint_create_datadog.go | 4 +- ..._external_endpoint_create_elasticsearch.go | 4 +- ...aas_external_endpoint_create_opensearch.go | 4 +- ...aas_external_endpoint_create_prometheus.go | 4 +- cmd/dbaas_external_endpoint_create_rsyslog.go | 4 +- cmd/dbaas_external_endpoint_show_datadog.go | 1 - ...as_external_endpoint_show_elasticsearch.go | 1 - ...dbaas_external_endpoint_show_opensearch.go | 1 - ...dbaas_external_endpoint_show_prometheus.go | 1 - cmd/dbaas_external_endpoint_show_rsyslog.go | 4 - go.mod | 2 +- go.sum | 4 +- .../github.com/exoscale/egoscale/v3/client.go | 125 ++- .../exoscale/egoscale/v3/operations.go | 910 +++++++++++------- .../exoscale/egoscale/v3/schemas.go | 124 ++- .../exoscale/egoscale/v3/version.go | 2 +- vendor/modules.txt | 2 +- 17 files changed, 792 insertions(+), 405 deletions(-) diff --git a/cmd/dbaas_external_endpoint_create_datadog.go b/cmd/dbaas_external_endpoint_create_datadog.go index ff95a72d..79b775d6 100644 --- a/cmd/dbaas_external_endpoint_create_datadog.go +++ b/cmd/dbaas_external_endpoint_create_datadog.go @@ -26,8 +26,8 @@ func (c *dbaasExternalEndpointCreateCmd) createDatadog(_ *cobra.Command, _ []str } } - datadogRequestPayload := v3.CreateDBAASExternalEndpointDatadogRequest{ - Settings: &v3.DBAASEndpointDatadog{}, + datadogRequestPayload := v3.DBAASEndpointDatadogPayload{ + Settings: &v3.DBAASEndpointDatadogPayloadSettings{}, } if c.DatadogAPIKey != "" { diff --git a/cmd/dbaas_external_endpoint_create_elasticsearch.go b/cmd/dbaas_external_endpoint_create_elasticsearch.go index abae84f2..a1f23be9 100644 --- a/cmd/dbaas_external_endpoint_create_elasticsearch.go +++ b/cmd/dbaas_external_endpoint_create_elasticsearch.go @@ -15,8 +15,8 @@ func (c *dbaasExternalEndpointCreateCmd) createElasticsearch(_ *cobra.Command, _ return err } - elasticsearchRequestPayload := v3.CreateDBAASExternalEndpointElasticsearchRequest{ - Settings: &v3.DBAASEndpointElasticsearch{}, + elasticsearchRequestPayload := v3.DBAASEndpointElasticsearchPayload{ + Settings: &v3.DBAASEndpointElasticsearchPayloadSettings{}, } if c.ElasticsearchURL != "" { diff --git a/cmd/dbaas_external_endpoint_create_opensearch.go b/cmd/dbaas_external_endpoint_create_opensearch.go index ea3febfa..52742a42 100644 --- a/cmd/dbaas_external_endpoint_create_opensearch.go +++ b/cmd/dbaas_external_endpoint_create_opensearch.go @@ -15,8 +15,8 @@ func (c *dbaasExternalEndpointCreateCmd) createOpensearch(_ *cobra.Command, _ [] return err } - opensearchRequestPayload := v3.CreateDBAASExternalEndpointOpensearchRequest{ - Settings: &v3.DBAASEndpointOpensearch{}, + opensearchRequestPayload := v3.DBAASEndpointOpensearchPayload{ + Settings: &v3.DBAASEndpointOpensearchPayloadSettings{}, } if c.OpensearchURL != "" { diff --git a/cmd/dbaas_external_endpoint_create_prometheus.go b/cmd/dbaas_external_endpoint_create_prometheus.go index c3098eb2..fd1f0e54 100644 --- a/cmd/dbaas_external_endpoint_create_prometheus.go +++ b/cmd/dbaas_external_endpoint_create_prometheus.go @@ -15,8 +15,8 @@ func (c *dbaasExternalEndpointCreateCmd) createPrometheus(_ *cobra.Command, _ [] return err } - prometheusRequestPayload := v3.CreateDBAASExternalEndpointPrometheusRequest{ - Settings: &v3.DBAASEndpointPrometheus{}, + prometheusRequestPayload := v3.DBAASEndpointPrometheusPayload{ + Settings: &v3.DBAASEndpointPrometheusPayloadSettings{}, } if c.PrometheusBasicAuthPassword != "" { diff --git a/cmd/dbaas_external_endpoint_create_rsyslog.go b/cmd/dbaas_external_endpoint_create_rsyslog.go index 39df2ee2..657931bd 100644 --- a/cmd/dbaas_external_endpoint_create_rsyslog.go +++ b/cmd/dbaas_external_endpoint_create_rsyslog.go @@ -15,8 +15,8 @@ func (c *dbaasExternalEndpointCreateCmd) createRsyslog(_ *cobra.Command, _ []str return err } - rsyslogRequestPayload := v3.CreateDBAASExternalEndpointRsyslogRequest{ - Settings: &v3.DBAASEndpointRsyslog{}, + rsyslogRequestPayload := v3.DBAASEndpointRsyslogPayload{ + Settings: &v3.DBAASEndpointRsyslogPayloadSettings{}, } if c.RsyslogCA != "" { diff --git a/cmd/dbaas_external_endpoint_show_datadog.go b/cmd/dbaas_external_endpoint_show_datadog.go index 307eaac1..2abd29d2 100644 --- a/cmd/dbaas_external_endpoint_show_datadog.go +++ b/cmd/dbaas_external_endpoint_show_datadog.go @@ -33,7 +33,6 @@ func (o *datadogOutput) ToTable() { t.Append([]string{"Endpoint Type", o.Type}) settings := o.Settings - t.Append([]string{"Datadog API Key", settings.DatadogAPIKey}) t.Append([]string{"Site", string(settings.Site)}) disableConsumerStats := "false" diff --git a/cmd/dbaas_external_endpoint_show_elasticsearch.go b/cmd/dbaas_external_endpoint_show_elasticsearch.go index bead36f1..48111bca 100644 --- a/cmd/dbaas_external_endpoint_show_elasticsearch.go +++ b/cmd/dbaas_external_endpoint_show_elasticsearch.go @@ -33,7 +33,6 @@ func (o *elasticsearchOutput) ToTable() { settings := o.Settings t.Append([]string{"Elasticsearch URL", settings.URL}) t.Append([]string{"Index Prefix", settings.IndexPrefix}) - t.Append([]string{"CA Certificate", truncateString(settings.CA, 50)}) t.Append([]string{"Index Days Max", strconv.FormatInt(settings.IndexDaysMax, 10)}) t.Append([]string{"Timeout", strconv.FormatInt(settings.Timeout, 10)}) } diff --git a/cmd/dbaas_external_endpoint_show_opensearch.go b/cmd/dbaas_external_endpoint_show_opensearch.go index 1163970a..d5548e62 100644 --- a/cmd/dbaas_external_endpoint_show_opensearch.go +++ b/cmd/dbaas_external_endpoint_show_opensearch.go @@ -33,7 +33,6 @@ func (o *opensearchOutput) ToTable() { settings := o.Settings t.Append([]string{"OpenSearch URL", settings.URL}) t.Append([]string{"Index Prefix", settings.IndexPrefix}) - t.Append([]string{"CA Certificate", truncateString(settings.CA, 50)}) t.Append([]string{"Index Days Max", strconv.FormatInt(settings.IndexDaysMax, 10)}) t.Append([]string{"Timeout", strconv.FormatInt(settings.Timeout, 10)}) } diff --git a/cmd/dbaas_external_endpoint_show_prometheus.go b/cmd/dbaas_external_endpoint_show_prometheus.go index 5daac204..5621cc7e 100644 --- a/cmd/dbaas_external_endpoint_show_prometheus.go +++ b/cmd/dbaas_external_endpoint_show_prometheus.go @@ -31,7 +31,6 @@ func (o *prometheusOutput) ToTable() { settings := o.Settings t.Append([]string{"Basic Auth Username", settings.BasicAuthUsername}) - t.Append([]string{"Basic Auth Password", settings.BasicAuthPassword}) } func (c *dbaasExternalEndpointShowCmd) showPrometheus() (output.Outputter, error) { diff --git a/cmd/dbaas_external_endpoint_show_rsyslog.go b/cmd/dbaas_external_endpoint_show_rsyslog.go index e5f5439b..88c81bd2 100644 --- a/cmd/dbaas_external_endpoint_show_rsyslog.go +++ b/cmd/dbaas_external_endpoint_show_rsyslog.go @@ -40,13 +40,9 @@ if settings.Tls != nil && *settings.Tls { t.Append([]string{"Server", settings.Server}) t.Append([]string{"Port", strconv.FormatInt(settings.Port,10)}) t.Append([]string{"Tls", tls}) - t.Append([]string{"CA Certificate", truncateString(settings.CA, 50)}) - t.Append([]string{"Client Certificate", truncateString(settings.Cert, 50)}) - t.Append([]string{"Client Key", truncateString(settings.Key, 50)}) t.Append([]string{"Max Message Size", strconv.FormatInt(settings.MaxMessageSize, 10)}) t.Append([]string{"Structured data block", settings.SD}) t.Append([]string{"Custom logline format", settings.Logline}) - t.Append([]string{"Custom logline format", settings.Logline}) } func (c *dbaasExternalEndpointShowCmd) showRsyslog() (output.Outputter, error) { diff --git a/go.mod b/go.mod index e1553ea0..410bf5ef 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/aws/smithy-go v1.1.0 github.com/dustin/go-humanize v1.0.1 github.com/exoscale/egoscale v0.102.4 - github.com/exoscale/egoscale/v3 v3.1.4 + github.com/exoscale/egoscale/v3 v3.1.6 github.com/exoscale/openapi-cli-generator v1.1.0 github.com/fatih/camelcase v1.0.0 github.com/google/uuid v1.4.0 diff --git a/go.sum b/go.sum index 8acb30c3..1324a709 100644 --- a/go.sum +++ b/go.sum @@ -197,8 +197,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/exoscale/egoscale v0.102.4 h1:GBKsZMIOzwBfSu+4ZmWka3Ejf2JLiaBDHp4CQUgvp2E= github.com/exoscale/egoscale v0.102.4/go.mod h1:ROSmPtle0wvf91iLZb09++N/9BH2Jo9XxIpAEumvocA= -github.com/exoscale/egoscale/v3 v3.1.4 h1:xpKEGX58GIC3CHTsJdRB5+ij74DmgWPts/n8OrItJ6s= -github.com/exoscale/egoscale/v3 v3.1.4/go.mod h1:GHKucK/J26v8PGWztGdhxWNMjrjG9PbelxKCJ4YI11Q= +github.com/exoscale/egoscale/v3 v3.1.6 h1:bTxsGG2B+9iHjziTfiySJ+FiZHyAiKiIoTs/Qfq6Orw= +github.com/exoscale/egoscale/v3 v3.1.6/go.mod h1:GHKucK/J26v8PGWztGdhxWNMjrjG9PbelxKCJ4YI11Q= github.com/exoscale/openapi-cli-generator v1.1.0 h1:fYjmPqHR5vxlOBrbvde7eo7bISNQIFxsGn4A5/acwKA= github.com/exoscale/openapi-cli-generator v1.1.0/go.mod h1:TZBnbT7f3hJ5ImyUphJwRM+X5xF/zCQZ6o8a42gQeTs= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= diff --git a/vendor/github.com/exoscale/egoscale/v3/client.go b/vendor/github.com/exoscale/egoscale/v3/client.go index a333d69a..6792c192 100644 --- a/vendor/github.com/exoscale/egoscale/v3/client.go +++ b/vendor/github.com/exoscale/egoscale/v3/client.go @@ -59,6 +59,7 @@ func (c Client) GetZoneAPIEndpoint(ctx context.Context, zoneName ZoneName) (Endp type Client struct { apiKey string apiSecret string + userAgent string serverEndpoint string httpClient *http.Client pollingInterval time.Duration @@ -73,12 +74,8 @@ type Client struct { // RequestInterceptorFn is the function signature for the RequestInterceptor callback function type RequestInterceptorFn func(ctx context.Context, req *http.Request) error -// UserAgent is the "User-Agent" HTTP request header added to outgoing HTTP requests. -var UserAgent = fmt.Sprintf("egoscale/%s (%s; %s/%s)", - Version, - runtime.Version(), - runtime.GOOS, - runtime.GOARCH) +// Deprecated: use ClientOptWithUserAgent instead. +var UserAgent = getDefaultUserAgent() const pollingInterval = 3 * time.Second @@ -93,6 +90,14 @@ func ClientOptWithTrace() ClientOpt { } } +// ClientOptWithUserAgent returns a ClientOpt setting the user agent header. +func ClientOptWithUserAgent(ua string) ClientOpt { + return func(c *Client) error { + c.userAgent = ua + " " + getDefaultUserAgent() + return nil + } +} + // ClientOptWithValidator returns a ClientOpt with a given validator. func ClientOptWithValidator(validate *validator.Validate) ClientOpt { return func(c *Client) error { @@ -131,6 +136,15 @@ func ClientOptWithHTTPClient(v *http.Client) ClientOpt { } } +// getDefaultUserAgent returns the "User-Agent" HTTP request header added to outgoing HTTP requests. +func getDefaultUserAgent() string { + return fmt.Sprintf("egoscale/%s (%s; %s/%s)", + Version, + runtime.Version(), + runtime.GOOS, + runtime.GOARCH) +} + // NewClient returns a new Exoscale API client. func NewClient(credentials *credentials.Credentials, opts ...ClientOpt) (*Client, error) { values, err := credentials.Get() @@ -145,6 +159,7 @@ func NewClient(credentials *credentials.Credentials, opts ...ClientOpt) (*Client httpClient: http.DefaultClient, pollingInterval: pollingInterval, validate: validator.New(), + userAgent: getDefaultUserAgent(), } for _, opt := range opts { @@ -156,60 +171,64 @@ func NewClient(credentials *credentials.Credentials, opts ...ClientOpt) (*Client return client, nil } +// getUserAgent only for compatibility with UserAgent. +func (c *Client) getUserAgent() string { + defaultUA := getDefaultUserAgent() + + if c.userAgent != defaultUA { + return c.userAgent + } + + if UserAgent != defaultUA { + return UserAgent + } + + return c.userAgent +} + // WithEndpoint returns a copy of Client with new zone Endpoint. func (c *Client) WithEndpoint(endpoint Endpoint) *Client { - return &Client{ - apiKey: c.apiKey, - apiSecret: c.apiSecret, - serverEndpoint: string(endpoint), - httpClient: c.httpClient, - requestInterceptors: c.requestInterceptors, - pollingInterval: c.pollingInterval, - trace: c.trace, - validate: c.validate, - } + clone := cloneClient(c) + + clone.serverEndpoint = string(endpoint) + + return clone +} + +// WithUserAgent returns a copy of Client with new User-Agent. +func (c *Client) WithUserAgent(ua string) *Client { + clone := cloneClient(c) + + clone.userAgent = ua + " " + getDefaultUserAgent() + + return clone } // WithTrace returns a copy of Client with tracing enabled. func (c *Client) WithTrace() *Client { - return &Client{ - apiKey: c.apiKey, - apiSecret: c.apiSecret, - serverEndpoint: c.serverEndpoint, - httpClient: c.httpClient, - requestInterceptors: c.requestInterceptors, - pollingInterval: c.pollingInterval, - trace: true, - validate: c.validate, - } + clone := cloneClient(c) + + clone.trace = true + + return clone } // WithHttpClient returns a copy of Client with new http.Client. func (c *Client) WithHttpClient(client *http.Client) *Client { - return &Client{ - apiKey: c.apiKey, - apiSecret: c.apiSecret, - serverEndpoint: c.serverEndpoint, - httpClient: client, - requestInterceptors: c.requestInterceptors, - pollingInterval: c.pollingInterval, - trace: c.trace, - validate: c.validate, - } + clone := cloneClient(c) + + clone.httpClient = client + + return clone } // WithRequestInterceptor returns a copy of Client with new RequestInterceptors. func (c *Client) WithRequestInterceptor(f ...RequestInterceptorFn) *Client { - return &Client{ - apiKey: c.apiKey, - apiSecret: c.apiSecret, - serverEndpoint: c.serverEndpoint, - httpClient: c.httpClient, - requestInterceptors: append(c.requestInterceptors, f...), - pollingInterval: c.pollingInterval, - trace: c.trace, - validate: c.validate, - } + clone := cloneClient(c) + + clone.requestInterceptors = append(clone.requestInterceptors, f...) + + return clone } func (c *Client) executeRequestInterceptors(ctx context.Context, req *http.Request) error { @@ -221,3 +240,17 @@ func (c *Client) executeRequestInterceptors(ctx context.Context, req *http.Reque return nil } + +func cloneClient(c *Client) *Client { + return &Client{ + apiKey: c.apiKey, + apiSecret: c.apiSecret, + userAgent: c.userAgent, + serverEndpoint: c.serverEndpoint, + httpClient: c.httpClient, + requestInterceptors: c.requestInterceptors, + pollingInterval: c.pollingInterval, + trace: c.trace, + validate: c.validate, + } +} diff --git a/vendor/github.com/exoscale/egoscale/v3/operations.go b/vendor/github.com/exoscale/egoscale/v3/operations.go index c5cbfbd3..7d3fb440 100644 --- a/vendor/github.com/exoscale/egoscale/v3/operations.go +++ b/vendor/github.com/exoscale/egoscale/v3/operations.go @@ -35,7 +35,8 @@ func (c Client) ListAntiAffinityGroups(ctx context.Context) (*ListAntiAffinityGr if err != nil { return nil, fmt.Errorf("ListAntiAffinityGroups: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListAntiAffinityGroups: execute request editors: %w", err) @@ -90,7 +91,8 @@ func (c Client) CreateAntiAffinityGroup(ctx context.Context, req CreateAntiAffin if err != nil { return nil, fmt.Errorf("CreateAntiAffinityGroup: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -135,7 +137,8 @@ func (c Client) DeleteAntiAffinityGroup(ctx context.Context, id UUID) (*Operatio if err != nil { return nil, fmt.Errorf("DeleteAntiAffinityGroup: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteAntiAffinityGroup: execute request editors: %w", err) @@ -178,7 +181,8 @@ func (c Client) GetAntiAffinityGroup(ctx context.Context, id UUID) (*AntiAffinit if err != nil { return nil, fmt.Errorf("GetAntiAffinityGroup: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetAntiAffinityGroup: execute request editors: %w", err) @@ -236,7 +240,8 @@ func (c Client) ListAPIKeys(ctx context.Context) (*ListAPIKeysResponse, error) { if err != nil { return nil, fmt.Errorf("ListAPIKeys: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListAPIKeys: execute request editors: %w", err) @@ -291,7 +296,8 @@ func (c Client) CreateAPIKey(ctx context.Context, req CreateAPIKeyRequest) (*IAM if err != nil { return nil, fmt.Errorf("CreateAPIKey: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -336,7 +342,8 @@ func (c Client) DeleteAPIKey(ctx context.Context, id string) (*Operation, error) if err != nil { return nil, fmt.Errorf("DeleteAPIKey: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteAPIKey: execute request editors: %w", err) @@ -379,7 +386,8 @@ func (c Client) GetAPIKey(ctx context.Context, id string) (*IAMAPIKey, error) { if err != nil { return nil, fmt.Errorf("GetAPIKey: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetAPIKey: execute request editors: %w", err) @@ -445,7 +453,8 @@ func (c Client) ListBlockStorageVolumes(ctx context.Context, opts ...ListBlockSt if err != nil { return nil, fmt.Errorf("ListBlockStorageVolumes: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if len(opts) > 0 { q := request.URL.Query() @@ -512,7 +521,8 @@ func (c Client) CreateBlockStorageVolume(ctx context.Context, req CreateBlockSto if err != nil { return nil, fmt.Errorf("CreateBlockStorageVolume: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -572,7 +582,8 @@ func (c Client) ListBlockStorageSnapshots(ctx context.Context) (*ListBlockStorag if err != nil { return nil, fmt.Errorf("ListBlockStorageSnapshots: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListBlockStorageSnapshots: execute request editors: %w", err) @@ -615,7 +626,8 @@ func (c Client) DeleteBlockStorageSnapshot(ctx context.Context, id UUID) (*Opera if err != nil { return nil, fmt.Errorf("DeleteBlockStorageSnapshot: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteBlockStorageSnapshot: execute request editors: %w", err) @@ -658,7 +670,8 @@ func (c Client) GetBlockStorageSnapshot(ctx context.Context, id UUID) (*BlockSto if err != nil { return nil, fmt.Errorf("GetBlockStorageSnapshot: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetBlockStorageSnapshot: execute request editors: %w", err) @@ -712,7 +725,8 @@ func (c Client) UpdateBlockStorageSnapshot(ctx context.Context, id UUID, req Upd if err != nil { return nil, fmt.Errorf("UpdateBlockStorageSnapshot: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -757,7 +771,8 @@ func (c Client) DeleteBlockStorageVolume(ctx context.Context, id UUID) (*Operati if err != nil { return nil, fmt.Errorf("DeleteBlockStorageVolume: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteBlockStorageVolume: execute request editors: %w", err) @@ -800,7 +815,8 @@ func (c Client) GetBlockStorageVolume(ctx context.Context, id UUID) (*BlockStora if err != nil { return nil, fmt.Errorf("GetBlockStorageVolume: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetBlockStorageVolume: execute request editors: %w", err) @@ -854,7 +870,8 @@ func (c Client) UpdateBlockStorageVolume(ctx context.Context, id UUID, req Updat if err != nil { return nil, fmt.Errorf("UpdateBlockStorageVolume: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -909,7 +926,8 @@ func (c Client) AttachBlockStorageVolumeToInstance(ctx context.Context, id UUID, if err != nil { return nil, fmt.Errorf("AttachBlockStorageVolumeToInstance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -965,7 +983,8 @@ func (c Client) CreateBlockStorageSnapshot(ctx context.Context, id UUID, req Cre if err != nil { return nil, fmt.Errorf("CreateBlockStorageSnapshot: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -1010,7 +1029,8 @@ func (c Client) DetachBlockStorageVolume(ctx context.Context, id UUID) (*Operati if err != nil { return nil, fmt.Errorf("DetachBlockStorageVolume: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DetachBlockStorageVolume: execute request editors: %w", err) @@ -1063,7 +1083,8 @@ func (c Client) ResizeBlockStorageVolume(ctx context.Context, id UUID, req Resiz if err != nil { return nil, fmt.Errorf("ResizeBlockStorageVolume: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -1114,7 +1135,8 @@ func (c Client) GetConsoleProxyURL(ctx context.Context, id UUID) (*GetConsolePro if err != nil { return nil, fmt.Errorf("GetConsoleProxyURL: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetConsoleProxyURL: execute request editors: %w", err) @@ -1161,7 +1183,8 @@ func (c Client) GetDBAASCACertificate(ctx context.Context) (*GetDBAASCACertifica if err != nil { return nil, fmt.Errorf("GetDBAASCACertificate: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASCACertificate: execute request editors: %w", err) @@ -1204,7 +1227,8 @@ func (c Client) DeleteDBAASExternalEndpointDatadog(ctx context.Context, id UUID) if err != nil { return nil, fmt.Errorf("DeleteDBAASExternalEndpointDatadog: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASExternalEndpointDatadog: execute request editors: %w", err) @@ -1247,7 +1271,8 @@ func (c Client) GetDBAASExternalEndpointDatadog(ctx context.Context, id UUID) (* if err != nil { return nil, fmt.Errorf("GetDBAASExternalEndpointDatadog: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASExternalEndpointDatadog: execute request editors: %w", err) @@ -1282,12 +1307,8 @@ func (c Client) GetDBAASExternalEndpointDatadog(ctx context.Context, id UUID) (* return bodyresp, nil } -type UpdateDBAASExternalEndpointDatadogRequest struct { - Settings *DBAASEndpointDatadog `json:"settings,omitempty"` -} - // [BETA] Update DataDog external integration endpoint -func (c Client) UpdateDBAASExternalEndpointDatadog(ctx context.Context, id UUID, req UpdateDBAASExternalEndpointDatadogRequest) (*Operation, error) { +func (c Client) UpdateDBAASExternalEndpointDatadog(ctx context.Context, id UUID, req DBAASEndpointDatadogPayload) (*Operation, error) { path := fmt.Sprintf("/dbaas-external-endpoint-datadog/%v", id) body, err := prepareJSONBody(req) @@ -1299,7 +1320,8 @@ func (c Client) UpdateDBAASExternalEndpointDatadog(ctx context.Context, id UUID, if err != nil { return nil, fmt.Errorf("UpdateDBAASExternalEndpointDatadog: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -1336,12 +1358,8 @@ func (c Client) UpdateDBAASExternalEndpointDatadog(ctx context.Context, id UUID, return bodyresp, nil } -type CreateDBAASExternalEndpointDatadogRequest struct { - Settings *DBAASEndpointDatadog `json:"settings,omitempty"` -} - // [BETA] Create DataDog external integration endpoint -func (c Client) CreateDBAASExternalEndpointDatadog(ctx context.Context, name string, req CreateDBAASExternalEndpointDatadogRequest) (*Operation, error) { +func (c Client) CreateDBAASExternalEndpointDatadog(ctx context.Context, name string, req DBAASEndpointDatadogPayload) (*Operation, error) { path := fmt.Sprintf("/dbaas-external-endpoint-datadog/%v", name) body, err := prepareJSONBody(req) @@ -1353,7 +1371,8 @@ func (c Client) CreateDBAASExternalEndpointDatadog(ctx context.Context, name str if err != nil { return nil, fmt.Errorf("CreateDBAASExternalEndpointDatadog: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -1398,7 +1417,8 @@ func (c Client) DeleteDBAASExternalEndpointElasticsearch(ctx context.Context, id if err != nil { return nil, fmt.Errorf("DeleteDBAASExternalEndpointElasticsearch: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASExternalEndpointElasticsearch: execute request editors: %w", err) @@ -1441,7 +1461,8 @@ func (c Client) GetDBAASExternalEndpointElasticsearch(ctx context.Context, id UU if err != nil { return nil, fmt.Errorf("GetDBAASExternalEndpointElasticsearch: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASExternalEndpointElasticsearch: execute request editors: %w", err) @@ -1476,12 +1497,8 @@ func (c Client) GetDBAASExternalEndpointElasticsearch(ctx context.Context, id UU return bodyresp, nil } -type UpdateDBAASExternalEndpointElasticsearchRequest struct { - Settings *DBAASEndpointElasticsearch `json:"settings,omitempty"` -} - // [BETA] Update ElasticSearch Logs external integration endpoint -func (c Client) UpdateDBAASExternalEndpointElasticsearch(ctx context.Context, id UUID, req UpdateDBAASExternalEndpointElasticsearchRequest) (*Operation, error) { +func (c Client) UpdateDBAASExternalEndpointElasticsearch(ctx context.Context, id UUID, req DBAASEndpointElasticsearchPayload) (*Operation, error) { path := fmt.Sprintf("/dbaas-external-endpoint-elasticsearch/%v", id) body, err := prepareJSONBody(req) @@ -1493,7 +1510,8 @@ func (c Client) UpdateDBAASExternalEndpointElasticsearch(ctx context.Context, id if err != nil { return nil, fmt.Errorf("UpdateDBAASExternalEndpointElasticsearch: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -1530,12 +1548,8 @@ func (c Client) UpdateDBAASExternalEndpointElasticsearch(ctx context.Context, id return bodyresp, nil } -type CreateDBAASExternalEndpointElasticsearchRequest struct { - Settings *DBAASEndpointElasticsearch `json:"settings,omitempty"` -} - // [BETA] Create ElasticSearch Logs external integration endpoint -func (c Client) CreateDBAASExternalEndpointElasticsearch(ctx context.Context, name string, req CreateDBAASExternalEndpointElasticsearchRequest) (*Operation, error) { +func (c Client) CreateDBAASExternalEndpointElasticsearch(ctx context.Context, name string, req DBAASEndpointElasticsearchPayload) (*Operation, error) { path := fmt.Sprintf("/dbaas-external-endpoint-elasticsearch/%v", name) body, err := prepareJSONBody(req) @@ -1547,7 +1561,8 @@ func (c Client) CreateDBAASExternalEndpointElasticsearch(ctx context.Context, na if err != nil { return nil, fmt.Errorf("CreateDBAASExternalEndpointElasticsearch: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -1592,7 +1607,8 @@ func (c Client) DeleteDBAASExternalEndpointOpensearch(ctx context.Context, id UU if err != nil { return nil, fmt.Errorf("DeleteDBAASExternalEndpointOpensearch: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASExternalEndpointOpensearch: execute request editors: %w", err) @@ -1635,7 +1651,8 @@ func (c Client) GetDBAASExternalEndpointOpensearch(ctx context.Context, id UUID) if err != nil { return nil, fmt.Errorf("GetDBAASExternalEndpointOpensearch: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASExternalEndpointOpensearch: execute request editors: %w", err) @@ -1670,12 +1687,8 @@ func (c Client) GetDBAASExternalEndpointOpensearch(ctx context.Context, id UUID) return bodyresp, nil } -type UpdateDBAASExternalEndpointOpensearchRequest struct { - Settings *DBAASEndpointOpensearch `json:"settings,omitempty"` -} - // [BETA] Update OpenSearch Logs external integration endpoint -func (c Client) UpdateDBAASExternalEndpointOpensearch(ctx context.Context, id UUID, req UpdateDBAASExternalEndpointOpensearchRequest) (*Operation, error) { +func (c Client) UpdateDBAASExternalEndpointOpensearch(ctx context.Context, id UUID, req DBAASEndpointOpensearchPayload) (*Operation, error) { path := fmt.Sprintf("/dbaas-external-endpoint-opensearch/%v", id) body, err := prepareJSONBody(req) @@ -1687,7 +1700,8 @@ func (c Client) UpdateDBAASExternalEndpointOpensearch(ctx context.Context, id UU if err != nil { return nil, fmt.Errorf("UpdateDBAASExternalEndpointOpensearch: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -1724,12 +1738,8 @@ func (c Client) UpdateDBAASExternalEndpointOpensearch(ctx context.Context, id UU return bodyresp, nil } -type CreateDBAASExternalEndpointOpensearchRequest struct { - Settings *DBAASEndpointOpensearch `json:"settings,omitempty"` -} - // [BETA] Create OpenSearch Logs external integration endpoint -func (c Client) CreateDBAASExternalEndpointOpensearch(ctx context.Context, name string, req CreateDBAASExternalEndpointOpensearchRequest) (*Operation, error) { +func (c Client) CreateDBAASExternalEndpointOpensearch(ctx context.Context, name string, req DBAASEndpointOpensearchPayload) (*Operation, error) { path := fmt.Sprintf("/dbaas-external-endpoint-opensearch/%v", name) body, err := prepareJSONBody(req) @@ -1741,7 +1751,8 @@ func (c Client) CreateDBAASExternalEndpointOpensearch(ctx context.Context, name if err != nil { return nil, fmt.Errorf("CreateDBAASExternalEndpointOpensearch: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -1786,7 +1797,8 @@ func (c Client) DeleteDBAASExternalEndpointPrometheus(ctx context.Context, id UU if err != nil { return nil, fmt.Errorf("DeleteDBAASExternalEndpointPrometheus: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASExternalEndpointPrometheus: execute request editors: %w", err) @@ -1829,7 +1841,8 @@ func (c Client) GetDBAASExternalEndpointPrometheus(ctx context.Context, id UUID) if err != nil { return nil, fmt.Errorf("GetDBAASExternalEndpointPrometheus: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASExternalEndpointPrometheus: execute request editors: %w", err) @@ -1864,12 +1877,8 @@ func (c Client) GetDBAASExternalEndpointPrometheus(ctx context.Context, id UUID) return bodyresp, nil } -type UpdateDBAASExternalEndpointPrometheusRequest struct { - Settings *DBAASEndpointPrometheus `json:"settings,omitempty"` -} - // [BETA] Update Prometheus external integration endpoint -func (c Client) UpdateDBAASExternalEndpointPrometheus(ctx context.Context, id UUID, req UpdateDBAASExternalEndpointPrometheusRequest) (*Operation, error) { +func (c Client) UpdateDBAASExternalEndpointPrometheus(ctx context.Context, id UUID, req DBAASEndpointPrometheusPayload) (*Operation, error) { path := fmt.Sprintf("/dbaas-external-endpoint-prometheus/%v", id) body, err := prepareJSONBody(req) @@ -1881,7 +1890,8 @@ func (c Client) UpdateDBAASExternalEndpointPrometheus(ctx context.Context, id UU if err != nil { return nil, fmt.Errorf("UpdateDBAASExternalEndpointPrometheus: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -1918,12 +1928,8 @@ func (c Client) UpdateDBAASExternalEndpointPrometheus(ctx context.Context, id UU return bodyresp, nil } -type CreateDBAASExternalEndpointPrometheusRequest struct { - Settings *DBAASEndpointPrometheus `json:"settings,omitempty"` -} - // [BETA] Create Prometheus external integration endpoint -func (c Client) CreateDBAASExternalEndpointPrometheus(ctx context.Context, name string, req CreateDBAASExternalEndpointPrometheusRequest) (*Operation, error) { +func (c Client) CreateDBAASExternalEndpointPrometheus(ctx context.Context, name string, req DBAASEndpointPrometheusPayload) (*Operation, error) { path := fmt.Sprintf("/dbaas-external-endpoint-prometheus/%v", name) body, err := prepareJSONBody(req) @@ -1935,7 +1941,8 @@ func (c Client) CreateDBAASExternalEndpointPrometheus(ctx context.Context, name if err != nil { return nil, fmt.Errorf("CreateDBAASExternalEndpointPrometheus: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -1980,7 +1987,8 @@ func (c Client) DeleteDBAASExternalEndpointRsyslog(ctx context.Context, id UUID) if err != nil { return nil, fmt.Errorf("DeleteDBAASExternalEndpointRsyslog: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASExternalEndpointRsyslog: execute request editors: %w", err) @@ -2023,7 +2031,8 @@ func (c Client) GetDBAASExternalEndpointRsyslog(ctx context.Context, id UUID) (* if err != nil { return nil, fmt.Errorf("GetDBAASExternalEndpointRsyslog: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASExternalEndpointRsyslog: execute request editors: %w", err) @@ -2058,12 +2067,8 @@ func (c Client) GetDBAASExternalEndpointRsyslog(ctx context.Context, id UUID) (* return bodyresp, nil } -type UpdateDBAASExternalEndpointRsyslogRequest struct { - Settings *DBAASEndpointRsyslog `json:"settings,omitempty"` -} - // [BETA] Update RSyslog external integration endpoint -func (c Client) UpdateDBAASExternalEndpointRsyslog(ctx context.Context, id UUID, req UpdateDBAASExternalEndpointRsyslogRequest) (*Operation, error) { +func (c Client) UpdateDBAASExternalEndpointRsyslog(ctx context.Context, id UUID, req DBAASEndpointRsyslogPayload) (*Operation, error) { path := fmt.Sprintf("/dbaas-external-endpoint-rsyslog/%v", id) body, err := prepareJSONBody(req) @@ -2075,7 +2080,8 @@ func (c Client) UpdateDBAASExternalEndpointRsyslog(ctx context.Context, id UUID, if err != nil { return nil, fmt.Errorf("UpdateDBAASExternalEndpointRsyslog: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -2112,12 +2118,8 @@ func (c Client) UpdateDBAASExternalEndpointRsyslog(ctx context.Context, id UUID, return bodyresp, nil } -type CreateDBAASExternalEndpointRsyslogRequest struct { - Settings *DBAASEndpointRsyslog `json:"settings,omitempty"` -} - // [BETA] Create RSyslog external integration endpoint -func (c Client) CreateDBAASExternalEndpointRsyslog(ctx context.Context, name string, req CreateDBAASExternalEndpointRsyslogRequest) (*Operation, error) { +func (c Client) CreateDBAASExternalEndpointRsyslog(ctx context.Context, name string, req DBAASEndpointRsyslogPayload) (*Operation, error) { path := fmt.Sprintf("/dbaas-external-endpoint-rsyslog/%v", name) body, err := prepareJSONBody(req) @@ -2129,7 +2131,8 @@ func (c Client) CreateDBAASExternalEndpointRsyslog(ctx context.Context, name str if err != nil { return nil, fmt.Errorf("CreateDBAASExternalEndpointRsyslog: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -2184,7 +2187,8 @@ func (c Client) ListDBAASExternalEndpointTypes(ctx context.Context) (*ListDBAASE if err != nil { return nil, fmt.Errorf("ListDBAASExternalEndpointTypes: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListDBAASExternalEndpointTypes: execute request editors: %w", err) @@ -2238,7 +2242,8 @@ func (c Client) AttachDBAASServiceToEndpoint(ctx context.Context, sourceServiceN if err != nil { return nil, fmt.Errorf("AttachDBAASServiceToEndpoint: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -2293,7 +2298,8 @@ func (c Client) DetachDBAASServiceFromEndpoint(ctx context.Context, sourceServic if err != nil { return nil, fmt.Errorf("DetachDBAASServiceFromEndpoint: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -2353,7 +2359,8 @@ func (c Client) ListDBAASExternalEndpoints(ctx context.Context) (*ListDBAASExter if err != nil { return nil, fmt.Errorf("ListDBAASExternalEndpoints: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListDBAASExternalEndpoints: execute request editors: %w", err) @@ -2400,7 +2407,8 @@ func (c Client) GetDBAASExternalIntegrationSettingsDatadog(ctx context.Context, if err != nil { return nil, fmt.Errorf("GetDBAASExternalIntegrationSettingsDatadog: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASExternalIntegrationSettingsDatadog: execute request editors: %w", err) @@ -2452,7 +2460,8 @@ func (c Client) UpdateDBAASExternalIntegrationSettingsDatadog(ctx context.Contex if err != nil { return nil, fmt.Errorf("UpdateDBAASExternalIntegrationSettingsDatadog: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -2497,7 +2506,8 @@ func (c Client) GetDBAASExternalIntegration(ctx context.Context, id UUID) (*DBAA if err != nil { return nil, fmt.Errorf("GetDBAASExternalIntegration: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASExternalIntegration: execute request editors: %w", err) @@ -2555,7 +2565,8 @@ func (c Client) ListDBAASExternalIntegrations(ctx context.Context, serviceName s if err != nil { return nil, fmt.Errorf("ListDBAASExternalIntegrations: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListDBAASExternalIntegrations: execute request editors: %w", err) @@ -2598,7 +2609,8 @@ func (c Client) DeleteDBAASServiceGrafana(ctx context.Context, name string) (*Op if err != nil { return nil, fmt.Errorf("DeleteDBAASServiceGrafana: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASServiceGrafana: execute request editors: %w", err) @@ -2641,7 +2653,8 @@ func (c Client) GetDBAASServiceGrafana(ctx context.Context, name string) (*DBAAS if err != nil { return nil, fmt.Errorf("GetDBAASServiceGrafana: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASServiceGrafana: execute request editors: %w", err) @@ -2724,7 +2737,8 @@ func (c Client) CreateDBAASServiceGrafana(ctx context.Context, name string, req if err != nil { return nil, fmt.Errorf("CreateDBAASServiceGrafana: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -2808,7 +2822,8 @@ func (c Client) UpdateDBAASServiceGrafana(ctx context.Context, name string, req if err != nil { return nil, fmt.Errorf("UpdateDBAASServiceGrafana: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -2853,7 +2868,8 @@ func (c Client) StartDBAASGrafanaMaintenance(ctx context.Context, name string) ( if err != nil { return nil, fmt.Errorf("StartDBAASGrafanaMaintenance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("StartDBAASGrafanaMaintenance: execute request editors: %w", err) @@ -2905,7 +2921,8 @@ func (c Client) ResetDBAASGrafanaUserPassword(ctx context.Context, serviceName s if err != nil { return nil, fmt.Errorf("ResetDBAASGrafanaUserPassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -2950,7 +2967,8 @@ func (c Client) RevealDBAASGrafanaUserPassword(ctx context.Context, serviceName if err != nil { return nil, fmt.Errorf("RevealDBAASGrafanaUserPassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("RevealDBAASGrafanaUserPassword: execute request editors: %w", err) @@ -3006,7 +3024,8 @@ func (c Client) CreateDBAASIntegration(ctx context.Context, req CreateDBAASInteg if err != nil { return nil, fmt.Errorf("CreateDBAASIntegration: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -3064,7 +3083,8 @@ func (c Client) ListDBAASIntegrationSettings(ctx context.Context, integrationTyp if err != nil { return nil, fmt.Errorf("ListDBAASIntegrationSettings: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListDBAASIntegrationSettings: execute request editors: %w", err) @@ -3111,7 +3131,8 @@ func (c Client) ListDBAASIntegrationTypes(ctx context.Context) (*ListDBAASIntegr if err != nil { return nil, fmt.Errorf("ListDBAASIntegrationTypes: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListDBAASIntegrationTypes: execute request editors: %w", err) @@ -3154,7 +3175,8 @@ func (c Client) DeleteDBAASIntegration(ctx context.Context, id UUID) (*Operation if err != nil { return nil, fmt.Errorf("DeleteDBAASIntegration: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASIntegration: execute request editors: %w", err) @@ -3197,7 +3219,8 @@ func (c Client) GetDBAASIntegration(ctx context.Context, id UUID) (*DBAASIntegra if err != nil { return nil, fmt.Errorf("GetDBAASIntegration: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASIntegration: execute request editors: %w", err) @@ -3250,7 +3273,8 @@ func (c Client) UpdateDBAASIntegration(ctx context.Context, id UUID, req UpdateD if err != nil { return nil, fmt.Errorf("UpdateDBAASIntegration: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -3295,7 +3319,8 @@ func (c Client) DeleteDBAASServiceKafka(ctx context.Context, name string) (*Oper if err != nil { return nil, fmt.Errorf("DeleteDBAASServiceKafka: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASServiceKafka: execute request editors: %w", err) @@ -3338,7 +3363,8 @@ func (c Client) GetDBAASServiceKafka(ctx context.Context, name string) (*DBAASSe if err != nil { return nil, fmt.Errorf("GetDBAASServiceKafka: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASServiceKafka: execute request editors: %w", err) @@ -3444,7 +3470,8 @@ func (c Client) CreateDBAASServiceKafka(ctx context.Context, name string, req Cr if err != nil { return nil, fmt.Errorf("CreateDBAASServiceKafka: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -3552,7 +3579,8 @@ func (c Client) UpdateDBAASServiceKafka(ctx context.Context, name string, req Up if err != nil { return nil, fmt.Errorf("UpdateDBAASServiceKafka: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -3597,7 +3625,8 @@ func (c Client) GetDBAASKafkaAclConfig(ctx context.Context, name string) (*DBAAS if err != nil { return nil, fmt.Errorf("GetDBAASKafkaAclConfig: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASKafkaAclConfig: execute request editors: %w", err) @@ -3640,7 +3669,8 @@ func (c Client) StartDBAASKafkaMaintenance(ctx context.Context, name string) (*O if err != nil { return nil, fmt.Errorf("StartDBAASKafkaMaintenance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("StartDBAASKafkaMaintenance: execute request editors: %w", err) @@ -3688,7 +3718,8 @@ func (c Client) CreateDBAASKafkaSchemaRegistryAclConfig(ctx context.Context, nam if err != nil { return nil, fmt.Errorf("CreateDBAASKafkaSchemaRegistryAclConfig: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -3733,7 +3764,8 @@ func (c Client) DeleteDBAASKafkaSchemaRegistryAclConfig(ctx context.Context, nam if err != nil { return nil, fmt.Errorf("DeleteDBAASKafkaSchemaRegistryAclConfig: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASKafkaSchemaRegistryAclConfig: execute request editors: %w", err) @@ -3781,7 +3813,8 @@ func (c Client) CreateDBAASKafkaTopicAclConfig(ctx context.Context, name string, if err != nil { return nil, fmt.Errorf("CreateDBAASKafkaTopicAclConfig: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -3826,7 +3859,8 @@ func (c Client) DeleteDBAASKafkaTopicAclConfig(ctx context.Context, name string, if err != nil { return nil, fmt.Errorf("DeleteDBAASKafkaTopicAclConfig: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASKafkaTopicAclConfig: execute request editors: %w", err) @@ -3869,7 +3903,8 @@ func (c Client) RevealDBAASKafkaConnectPassword(ctx context.Context, serviceName if err != nil { return nil, fmt.Errorf("RevealDBAASKafkaConnectPassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("RevealDBAASKafkaConnectPassword: execute request editors: %w", err) @@ -3921,7 +3956,8 @@ func (c Client) CreateDBAASKafkaUser(ctx context.Context, serviceName string, re if err != nil { return nil, fmt.Errorf("CreateDBAASKafkaUser: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -3966,7 +4002,8 @@ func (c Client) DeleteDBAASKafkaUser(ctx context.Context, serviceName string, us if err != nil { return nil, fmt.Errorf("DeleteDBAASKafkaUser: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASKafkaUser: execute request editors: %w", err) @@ -4018,7 +4055,8 @@ func (c Client) ResetDBAASKafkaUserPassword(ctx context.Context, serviceName str if err != nil { return nil, fmt.Errorf("ResetDBAASKafkaUserPassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -4063,7 +4101,8 @@ func (c Client) RevealDBAASKafkaUserPassword(ctx context.Context, serviceName st if err != nil { return nil, fmt.Errorf("RevealDBAASKafkaUserPassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("RevealDBAASKafkaUserPassword: execute request editors: %w", err) @@ -4106,7 +4145,8 @@ func (c Client) GetDBAASMigrationStatus(ctx context.Context, name string) (*DBAA if err != nil { return nil, fmt.Errorf("GetDBAASMigrationStatus: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASMigrationStatus: execute request editors: %w", err) @@ -4149,7 +4189,8 @@ func (c Client) DeleteDBAASServiceMysql(ctx context.Context, name string) (*Oper if err != nil { return nil, fmt.Errorf("DeleteDBAASServiceMysql: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASServiceMysql: execute request editors: %w", err) @@ -4192,7 +4233,8 @@ func (c Client) GetDBAASServiceMysql(ctx context.Context, name string) (*DBAASSe if err != nil { return nil, fmt.Errorf("GetDBAASServiceMysql: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASServiceMysql: execute request editors: %w", err) @@ -4331,7 +4373,8 @@ func (c Client) CreateDBAASServiceMysql(ctx context.Context, name string, req Cr if err != nil { return nil, fmt.Errorf("CreateDBAASServiceMysql: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -4446,7 +4489,8 @@ func (c Client) UpdateDBAASServiceMysql(ctx context.Context, name string, req Up if err != nil { return nil, fmt.Errorf("UpdateDBAASServiceMysql: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -4491,7 +4535,8 @@ func (c Client) EnableDBAASMysqlWrites(ctx context.Context, name string) (*Opera if err != nil { return nil, fmt.Errorf("EnableDBAASMysqlWrites: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("EnableDBAASMysqlWrites: execute request editors: %w", err) @@ -4534,7 +4579,8 @@ func (c Client) StartDBAASMysqlMaintenance(ctx context.Context, name string) (*O if err != nil { return nil, fmt.Errorf("StartDBAASMysqlMaintenance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("StartDBAASMysqlMaintenance: execute request editors: %w", err) @@ -4577,7 +4623,8 @@ func (c Client) StopDBAASMysqlMigration(ctx context.Context, name string) (*Oper if err != nil { return nil, fmt.Errorf("StopDBAASMysqlMigration: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("StopDBAASMysqlMigration: execute request editors: %w", err) @@ -4629,7 +4676,8 @@ func (c Client) CreateDBAASMysqlDatabase(ctx context.Context, serviceName string if err != nil { return nil, fmt.Errorf("CreateDBAASMysqlDatabase: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -4674,7 +4722,8 @@ func (c Client) DeleteDBAASMysqlDatabase(ctx context.Context, serviceName string if err != nil { return nil, fmt.Errorf("DeleteDBAASMysqlDatabase: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASMysqlDatabase: execute request editors: %w", err) @@ -4727,7 +4776,8 @@ func (c Client) CreateDBAASMysqlUser(ctx context.Context, serviceName string, re if err != nil { return nil, fmt.Errorf("CreateDBAASMysqlUser: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -4772,7 +4822,8 @@ func (c Client) DeleteDBAASMysqlUser(ctx context.Context, serviceName string, us if err != nil { return nil, fmt.Errorf("DeleteDBAASMysqlUser: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASMysqlUser: execute request editors: %w", err) @@ -4825,7 +4876,8 @@ func (c Client) ResetDBAASMysqlUserPassword(ctx context.Context, serviceName str if err != nil { return nil, fmt.Errorf("ResetDBAASMysqlUserPassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -4870,7 +4922,8 @@ func (c Client) RevealDBAASMysqlUserPassword(ctx context.Context, serviceName st if err != nil { return nil, fmt.Errorf("RevealDBAASMysqlUserPassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("RevealDBAASMysqlUserPassword: execute request editors: %w", err) @@ -4913,7 +4966,8 @@ func (c Client) DeleteDBAASServiceOpensearch(ctx context.Context, name string) ( if err != nil { return nil, fmt.Errorf("DeleteDBAASServiceOpensearch: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASServiceOpensearch: execute request editors: %w", err) @@ -4956,7 +5010,8 @@ func (c Client) GetDBAASServiceOpensearch(ctx context.Context, name string) (*DB if err != nil { return nil, fmt.Errorf("GetDBAASServiceOpensearch: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASServiceOpensearch: execute request editors: %w", err) @@ -5089,7 +5144,8 @@ func (c Client) CreateDBAASServiceOpensearch(ctx context.Context, name string, r if err != nil { return nil, fmt.Errorf("CreateDBAASServiceOpensearch: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -5221,7 +5277,8 @@ func (c Client) UpdateDBAASServiceOpensearch(ctx context.Context, name string, r if err != nil { return nil, fmt.Errorf("UpdateDBAASServiceOpensearch: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -5266,7 +5323,8 @@ func (c Client) GetDBAASOpensearchAclConfig(ctx context.Context, name string) (* if err != nil { return nil, fmt.Errorf("GetDBAASOpensearchAclConfig: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASOpensearchAclConfig: execute request editors: %w", err) @@ -5314,7 +5372,8 @@ func (c Client) UpdateDBAASOpensearchAclConfig(ctx context.Context, name string, if err != nil { return nil, fmt.Errorf("UpdateDBAASOpensearchAclConfig: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -5359,7 +5418,8 @@ func (c Client) StartDBAASOpensearchMaintenance(ctx context.Context, name string if err != nil { return nil, fmt.Errorf("StartDBAASOpensearchMaintenance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("StartDBAASOpensearchMaintenance: execute request editors: %w", err) @@ -5411,7 +5471,8 @@ func (c Client) CreateDBAASOpensearchUser(ctx context.Context, serviceName strin if err != nil { return nil, fmt.Errorf("CreateDBAASOpensearchUser: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -5456,7 +5517,8 @@ func (c Client) DeleteDBAASOpensearchUser(ctx context.Context, serviceName strin if err != nil { return nil, fmt.Errorf("DeleteDBAASOpensearchUser: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASOpensearchUser: execute request editors: %w", err) @@ -5508,7 +5570,8 @@ func (c Client) ResetDBAASOpensearchUserPassword(ctx context.Context, serviceNam if err != nil { return nil, fmt.Errorf("ResetDBAASOpensearchUserPassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -5553,7 +5616,8 @@ func (c Client) RevealDBAASOpensearchUserPassword(ctx context.Context, serviceNa if err != nil { return nil, fmt.Errorf("RevealDBAASOpensearchUserPassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("RevealDBAASOpensearchUserPassword: execute request editors: %w", err) @@ -5596,7 +5660,8 @@ func (c Client) DeleteDBAASServicePG(ctx context.Context, name string) (*Operati if err != nil { return nil, fmt.Errorf("DeleteDBAASServicePG: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASServicePG: execute request editors: %w", err) @@ -5639,7 +5704,8 @@ func (c Client) GetDBAASServicePG(ctx context.Context, name string) (*DBAASServi if err != nil { return nil, fmt.Errorf("GetDBAASServicePG: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASServicePG: execute request editors: %w", err) @@ -5787,7 +5853,8 @@ func (c Client) CreateDBAASServicePG(ctx context.Context, name string, req Creat if err != nil { return nil, fmt.Errorf("CreateDBAASServicePG: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -5914,7 +5981,8 @@ func (c Client) UpdateDBAASServicePG(ctx context.Context, name string, req Updat if err != nil { return nil, fmt.Errorf("UpdateDBAASServicePG: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -5959,7 +6027,8 @@ func (c Client) StartDBAASPGMaintenance(ctx context.Context, name string) (*Oper if err != nil { return nil, fmt.Errorf("StartDBAASPGMaintenance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("StartDBAASPGMaintenance: execute request editors: %w", err) @@ -6002,7 +6071,8 @@ func (c Client) StopDBAASPGMigration(ctx context.Context, name string) (*Operati if err != nil { return nil, fmt.Errorf("StopDBAASPGMigration: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("StopDBAASPGMigration: execute request editors: %w", err) @@ -6058,7 +6128,8 @@ func (c Client) CreateDBAASPGConnectionPool(ctx context.Context, serviceName str if err != nil { return nil, fmt.Errorf("CreateDBAASPGConnectionPool: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -6103,7 +6174,8 @@ func (c Client) DeleteDBAASPGConnectionPool(ctx context.Context, serviceName str if err != nil { return nil, fmt.Errorf("DeleteDBAASPGConnectionPool: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASPGConnectionPool: execute request editors: %w", err) @@ -6158,7 +6230,8 @@ func (c Client) UpdateDBAASPGConnectionPool(ctx context.Context, serviceName str if err != nil { return nil, fmt.Errorf("UpdateDBAASPGConnectionPool: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -6216,7 +6289,8 @@ func (c Client) CreateDBAASPGDatabase(ctx context.Context, serviceName string, r if err != nil { return nil, fmt.Errorf("CreateDBAASPGDatabase: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -6261,7 +6335,8 @@ func (c Client) DeleteDBAASPGDatabase(ctx context.Context, serviceName string, d if err != nil { return nil, fmt.Errorf("DeleteDBAASPGDatabase: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASPGDatabase: execute request editors: %w", err) @@ -6314,7 +6389,8 @@ func (c Client) CreateDBAASPostgresUser(ctx context.Context, serviceName string, if err != nil { return nil, fmt.Errorf("CreateDBAASPostgresUser: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -6359,7 +6435,8 @@ func (c Client) DeleteDBAASPostgresUser(ctx context.Context, serviceName string, if err != nil { return nil, fmt.Errorf("DeleteDBAASPostgresUser: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASPostgresUser: execute request editors: %w", err) @@ -6411,7 +6488,8 @@ func (c Client) UpdateDBAASPostgresAllowReplication(ctx context.Context, service if err != nil { return nil, fmt.Errorf("UpdateDBAASPostgresAllowReplication: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -6465,7 +6543,8 @@ func (c Client) ResetDBAASPostgresUserPassword(ctx context.Context, serviceName if err != nil { return nil, fmt.Errorf("ResetDBAASPostgresUserPassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -6510,7 +6589,8 @@ func (c Client) RevealDBAASPostgresUserPassword(ctx context.Context, serviceName if err != nil { return nil, fmt.Errorf("RevealDBAASPostgresUserPassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("RevealDBAASPostgresUserPassword: execute request editors: %w", err) @@ -6562,7 +6642,8 @@ func (c Client) CreateDBAASPGUpgradeCheck(ctx context.Context, service string, r if err != nil { return nil, fmt.Errorf("CreateDBAASPGUpgradeCheck: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -6607,7 +6688,8 @@ func (c Client) DeleteDBAASServiceRedis(ctx context.Context, name string) (*Oper if err != nil { return nil, fmt.Errorf("DeleteDBAASServiceRedis: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASServiceRedis: execute request editors: %w", err) @@ -6650,7 +6732,8 @@ func (c Client) GetDBAASServiceRedis(ctx context.Context, name string) (*DBAASSe if err != nil { return nil, fmt.Errorf("GetDBAASServiceRedis: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASServiceRedis: execute request editors: %w", err) @@ -6756,7 +6839,8 @@ func (c Client) CreateDBAASServiceRedis(ctx context.Context, name string, req Cr if err != nil { return nil, fmt.Errorf("CreateDBAASServiceRedis: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -6861,7 +6945,8 @@ func (c Client) UpdateDBAASServiceRedis(ctx context.Context, name string, req Up if err != nil { return nil, fmt.Errorf("UpdateDBAASServiceRedis: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -6906,7 +6991,8 @@ func (c Client) StartDBAASRedisMaintenance(ctx context.Context, name string) (*O if err != nil { return nil, fmt.Errorf("StartDBAASRedisMaintenance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("StartDBAASRedisMaintenance: execute request editors: %w", err) @@ -6949,7 +7035,8 @@ func (c Client) StopDBAASRedisMigration(ctx context.Context, name string) (*Oper if err != nil { return nil, fmt.Errorf("StopDBAASRedisMigration: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("StopDBAASRedisMigration: execute request editors: %w", err) @@ -7001,7 +7088,8 @@ func (c Client) CreateDBAASRedisUser(ctx context.Context, serviceName string, re if err != nil { return nil, fmt.Errorf("CreateDBAASRedisUser: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -7046,7 +7134,8 @@ func (c Client) DeleteDBAASRedisUser(ctx context.Context, serviceName string, us if err != nil { return nil, fmt.Errorf("DeleteDBAASRedisUser: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASRedisUser: execute request editors: %w", err) @@ -7098,7 +7187,8 @@ func (c Client) ResetDBAASRedisUserPassword(ctx context.Context, serviceName str if err != nil { return nil, fmt.Errorf("ResetDBAASRedisUserPassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -7143,7 +7233,8 @@ func (c Client) RevealDBAASRedisUserPassword(ctx context.Context, serviceName st if err != nil { return nil, fmt.Errorf("RevealDBAASRedisUserPassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("RevealDBAASRedisUserPassword: execute request editors: %w", err) @@ -7201,7 +7292,8 @@ func (c Client) ListDBAASServices(ctx context.Context) (*ListDBAASServicesRespon if err != nil { return nil, fmt.Errorf("ListDBAASServices: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListDBAASServices: execute request editors: %w", err) @@ -7257,7 +7349,8 @@ func (c Client) GetDBAASServiceLogs(ctx context.Context, serviceName string, req if err != nil { return nil, fmt.Errorf("GetDBAASServiceLogs: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -7326,7 +7419,8 @@ func (c Client) GetDBAASServiceMetrics(ctx context.Context, serviceName string, if err != nil { return nil, fmt.Errorf("GetDBAASServiceMetrics: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -7386,7 +7480,8 @@ func (c Client) ListDBAASServiceTypes(ctx context.Context) (*ListDBAASServiceTyp if err != nil { return nil, fmt.Errorf("ListDBAASServiceTypes: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListDBAASServiceTypes: execute request editors: %w", err) @@ -7429,7 +7524,8 @@ func (c Client) GetDBAASServiceType(ctx context.Context, serviceTypeName string) if err != nil { return nil, fmt.Errorf("GetDBAASServiceType: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASServiceType: execute request editors: %w", err) @@ -7472,7 +7568,8 @@ func (c Client) DeleteDBAASService(ctx context.Context, name string) (*Operation if err != nil { return nil, fmt.Errorf("DeleteDBAASService: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDBAASService: execute request editors: %w", err) @@ -7532,7 +7629,8 @@ func (c Client) GetDBAASSettingsGrafana(ctx context.Context) (*GetDBAASSettingsG if err != nil { return nil, fmt.Errorf("GetDBAASSettingsGrafana: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASSettingsGrafana: execute request editors: %w", err) @@ -7622,7 +7720,8 @@ func (c Client) GetDBAASSettingsKafka(ctx context.Context) (*GetDBAASSettingsKaf if err != nil { return nil, fmt.Errorf("GetDBAASSettingsKafka: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASSettingsKafka: execute request editors: %w", err) @@ -7682,7 +7781,8 @@ func (c Client) GetDBAASSettingsMysql(ctx context.Context) (*GetDBAASSettingsMys if err != nil { return nil, fmt.Errorf("GetDBAASSettingsMysql: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASSettingsMysql: execute request editors: %w", err) @@ -7742,7 +7842,8 @@ func (c Client) GetDBAASSettingsOpensearch(ctx context.Context) (*GetDBAASSettin if err != nil { return nil, fmt.Errorf("GetDBAASSettingsOpensearch: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASSettingsOpensearch: execute request editors: %w", err) @@ -7832,7 +7933,8 @@ func (c Client) GetDBAASSettingsPG(ctx context.Context) (*GetDBAASSettingsPGResp if err != nil { return nil, fmt.Errorf("GetDBAASSettingsPG: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASSettingsPG: execute request editors: %w", err) @@ -7892,7 +7994,8 @@ func (c Client) GetDBAASSettingsRedis(ctx context.Context) (*GetDBAASSettingsRed if err != nil { return nil, fmt.Errorf("GetDBAASSettingsRedis: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASSettingsRedis: execute request editors: %w", err) @@ -7948,7 +8051,8 @@ func (c Client) CreateDBAASTaskMigrationCheck(ctx context.Context, service strin if err != nil { return nil, fmt.Errorf("CreateDBAASTaskMigrationCheck: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -7993,7 +8097,8 @@ func (c Client) GetDBAASTask(ctx context.Context, service string, id UUID) (*DBA if err != nil { return nil, fmt.Errorf("GetDBAASTask: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDBAASTask: execute request editors: %w", err) @@ -8051,7 +8156,8 @@ func (c Client) ListDeployTargets(ctx context.Context) (*ListDeployTargetsRespon if err != nil { return nil, fmt.Errorf("ListDeployTargets: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListDeployTargets: execute request editors: %w", err) @@ -8094,7 +8200,8 @@ func (c Client) GetDeployTarget(ctx context.Context, id UUID) (*DeployTarget, er if err != nil { return nil, fmt.Errorf("GetDeployTarget: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDeployTarget: execute request editors: %w", err) @@ -8152,7 +8259,8 @@ func (c Client) ListDNSDomains(ctx context.Context) (*ListDNSDomainsResponse, er if err != nil { return nil, fmt.Errorf("ListDNSDomains: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListDNSDomains: execute request editors: %w", err) @@ -8206,7 +8314,8 @@ func (c Client) CreateDNSDomain(ctx context.Context, req CreateDNSDomainRequest) if err != nil { return nil, fmt.Errorf("CreateDNSDomain: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -8266,7 +8375,8 @@ func (c Client) ListDNSDomainRecords(ctx context.Context, domainID UUID) (*ListD if err != nil { return nil, fmt.Errorf("ListDNSDomainRecords: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListDNSDomainRecords: execute request editors: %w", err) @@ -8347,7 +8457,8 @@ func (c Client) CreateDNSDomainRecord(ctx context.Context, domainID UUID, req Cr if err != nil { return nil, fmt.Errorf("CreateDNSDomainRecord: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -8392,7 +8503,8 @@ func (c Client) DeleteDNSDomainRecord(ctx context.Context, domainID UUID, record if err != nil { return nil, fmt.Errorf("DeleteDNSDomainRecord: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDNSDomainRecord: execute request editors: %w", err) @@ -8435,7 +8547,8 @@ func (c Client) GetDNSDomainRecord(ctx context.Context, domainID UUID, recordID if err != nil { return nil, fmt.Errorf("GetDNSDomainRecord: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDNSDomainRecord: execute request editors: %w", err) @@ -8494,7 +8607,8 @@ func (c Client) UpdateDNSDomainRecord(ctx context.Context, domainID UUID, record if err != nil { return nil, fmt.Errorf("UpdateDNSDomainRecord: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -8539,7 +8653,8 @@ func (c Client) DeleteDNSDomain(ctx context.Context, id UUID) (*Operation, error if err != nil { return nil, fmt.Errorf("DeleteDNSDomain: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteDNSDomain: execute request editors: %w", err) @@ -8582,7 +8697,8 @@ func (c Client) GetDNSDomain(ctx context.Context, id UUID) (*DNSDomain, error) { if err != nil { return nil, fmt.Errorf("GetDNSDomain: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDNSDomain: execute request editors: %w", err) @@ -8629,7 +8745,8 @@ func (c Client) GetDNSDomainZoneFile(ctx context.Context, id UUID) (*GetDNSDomai if err != nil { return nil, fmt.Errorf("GetDNSDomainZoneFile: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetDNSDomainZoneFile: execute request editors: %w", err) @@ -8687,7 +8804,8 @@ func (c Client) ListElasticIPS(ctx context.Context) (*ListElasticIPSResponse, er if err != nil { return nil, fmt.Errorf("ListElasticIPS: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListElasticIPS: execute request editors: %w", err) @@ -8752,7 +8870,8 @@ func (c Client) CreateElasticIP(ctx context.Context, req CreateElasticIPRequest) if err != nil { return nil, fmt.Errorf("CreateElasticIP: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -8797,7 +8916,8 @@ func (c Client) DeleteElasticIP(ctx context.Context, id UUID) (*Operation, error if err != nil { return nil, fmt.Errorf("DeleteElasticIP: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteElasticIP: execute request editors: %w", err) @@ -8840,7 +8960,8 @@ func (c Client) GetElasticIP(ctx context.Context, id UUID) (*ElasticIP, error) { if err != nil { return nil, fmt.Errorf("GetElasticIP: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetElasticIP: execute request editors: %w", err) @@ -8896,7 +9017,8 @@ func (c Client) UpdateElasticIP(ctx context.Context, id UUID, req UpdateElasticI if err != nil { return nil, fmt.Errorf("UpdateElasticIP: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -8947,7 +9069,8 @@ func (c Client) ResetElasticIPField(ctx context.Context, id UUID, field ResetEla if err != nil { return nil, fmt.Errorf("ResetElasticIPField: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ResetElasticIPField: execute request editors: %w", err) @@ -9000,7 +9123,8 @@ func (c Client) AttachInstanceToElasticIP(ctx context.Context, id UUID, req Atta if err != nil { return nil, fmt.Errorf("AttachInstanceToElasticIP: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -9055,7 +9179,8 @@ func (c Client) DetachInstanceFromElasticIP(ctx context.Context, id UUID, req De if err != nil { return nil, fmt.Errorf("DetachInstanceFromElasticIP: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -9116,7 +9241,8 @@ func (c Client) ListEvents(ctx context.Context, opts ...ListEventsOpt) ([]Event, if err != nil { return nil, fmt.Errorf("ListEvents: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if len(opts) > 0 { q := request.URL.Query() @@ -9167,7 +9293,8 @@ func (c Client) GetIAMOrganizationPolicy(ctx context.Context) (*IAMPolicy, error if err != nil { return nil, fmt.Errorf("GetIAMOrganizationPolicy: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetIAMOrganizationPolicy: execute request editors: %w", err) @@ -9215,7 +9342,8 @@ func (c Client) UpdateIAMOrganizationPolicy(ctx context.Context, req IAMPolicy) if err != nil { return nil, fmt.Errorf("UpdateIAMOrganizationPolicy: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -9275,7 +9403,8 @@ func (c Client) ListIAMRoles(ctx context.Context) (*ListIAMRolesResponse, error) if err != nil { return nil, fmt.Errorf("ListIAMRoles: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListIAMRoles: execute request editors: %w", err) @@ -9337,7 +9466,8 @@ func (c Client) CreateIAMRole(ctx context.Context, req CreateIAMRoleRequest) (*O if err != nil { return nil, fmt.Errorf("CreateIAMRole: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -9382,7 +9512,8 @@ func (c Client) DeleteIAMRole(ctx context.Context, id UUID) (*Operation, error) if err != nil { return nil, fmt.Errorf("DeleteIAMRole: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteIAMRole: execute request editors: %w", err) @@ -9425,7 +9556,8 @@ func (c Client) GetIAMRole(ctx context.Context, id UUID) (*IAMRole, error) { if err != nil { return nil, fmt.Errorf("GetIAMRole: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetIAMRole: execute request editors: %w", err) @@ -9481,7 +9613,8 @@ func (c Client) UpdateIAMRole(ctx context.Context, id UUID, req UpdateIAMRoleReq if err != nil { return nil, fmt.Errorf("UpdateIAMRole: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -9531,7 +9664,8 @@ func (c Client) UpdateIAMRolePolicy(ctx context.Context, id UUID, req IAMPolicy) if err != nil { return nil, fmt.Errorf("UpdateIAMRolePolicy: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -9658,7 +9792,8 @@ func (c Client) ListInstances(ctx context.Context, opts ...ListInstancesOpt) (*L if err != nil { return nil, fmt.Errorf("ListInstances: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if len(opts) > 0 { q := request.URL.Query() @@ -9743,7 +9878,8 @@ func (c Client) CreateInstance(ctx context.Context, req CreateInstanceRequest) ( if err != nil { return nil, fmt.Errorf("CreateInstance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -9803,7 +9939,8 @@ func (c Client) ListInstancePools(ctx context.Context) (*ListInstancePoolsRespon if err != nil { return nil, fmt.Errorf("ListInstancePools: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListInstancePools: execute request editors: %w", err) @@ -9899,7 +10036,8 @@ func (c Client) CreateInstancePool(ctx context.Context, req CreateInstancePoolRe if err != nil { return nil, fmt.Errorf("CreateInstancePool: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -9944,7 +10082,8 @@ func (c Client) DeleteInstancePool(ctx context.Context, id UUID) (*Operation, er if err != nil { return nil, fmt.Errorf("DeleteInstancePool: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteInstancePool: execute request editors: %w", err) @@ -9987,7 +10126,8 @@ func (c Client) GetInstancePool(ctx context.Context, id UUID) (*InstancePool, er if err != nil { return nil, fmt.Errorf("GetInstancePool: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetInstancePool: execute request editors: %w", err) @@ -10080,7 +10220,8 @@ func (c Client) UpdateInstancePool(ctx context.Context, id UUID, req UpdateInsta if err != nil { return nil, fmt.Errorf("UpdateInstancePool: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -10140,7 +10281,8 @@ func (c Client) ResetInstancePoolField(ctx context.Context, id UUID, field Reset if err != nil { return nil, fmt.Errorf("ResetInstancePoolField: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ResetInstancePoolField: execute request editors: %w", err) @@ -10192,7 +10334,8 @@ func (c Client) EvictInstancePoolMembers(ctx context.Context, id UUID, req Evict if err != nil { return nil, fmt.Errorf("EvictInstancePoolMembers: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -10247,7 +10390,8 @@ func (c Client) ScaleInstancePool(ctx context.Context, id UUID, req ScaleInstanc if err != nil { return nil, fmt.Errorf("ScaleInstancePool: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -10307,7 +10451,8 @@ func (c Client) ListInstanceTypes(ctx context.Context) (*ListInstanceTypesRespon if err != nil { return nil, fmt.Errorf("ListInstanceTypes: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListInstanceTypes: execute request editors: %w", err) @@ -10350,7 +10495,8 @@ func (c Client) GetInstanceType(ctx context.Context, id UUID) (*InstanceType, er if err != nil { return nil, fmt.Errorf("GetInstanceType: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetInstanceType: execute request editors: %w", err) @@ -10393,7 +10539,8 @@ func (c Client) DeleteInstance(ctx context.Context, id UUID) (*Operation, error) if err != nil { return nil, fmt.Errorf("DeleteInstance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteInstance: execute request editors: %w", err) @@ -10436,7 +10583,8 @@ func (c Client) GetInstance(ctx context.Context, id UUID) (*Instance, error) { if err != nil { return nil, fmt.Errorf("GetInstance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetInstance: execute request editors: %w", err) @@ -10493,7 +10641,8 @@ func (c Client) UpdateInstance(ctx context.Context, id UUID, req UpdateInstanceR if err != nil { return nil, fmt.Errorf("UpdateInstance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -10544,7 +10693,8 @@ func (c Client) ResetInstanceField(ctx context.Context, id UUID, field ResetInst if err != nil { return nil, fmt.Errorf("ResetInstanceField: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ResetInstanceField: execute request editors: %w", err) @@ -10587,7 +10737,8 @@ func (c Client) AddInstanceProtection(ctx context.Context, id UUID) (*Operation, if err != nil { return nil, fmt.Errorf("AddInstanceProtection: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("AddInstanceProtection: execute request editors: %w", err) @@ -10630,7 +10781,8 @@ func (c Client) CreateSnapshot(ctx context.Context, id UUID) (*Operation, error) if err != nil { return nil, fmt.Errorf("CreateSnapshot: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("CreateSnapshot: execute request editors: %w", err) @@ -10677,7 +10829,8 @@ func (c Client) RevealInstancePassword(ctx context.Context, id UUID) (*InstanceP if err != nil { return nil, fmt.Errorf("RevealInstancePassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("RevealInstancePassword: execute request editors: %w", err) @@ -10720,7 +10873,8 @@ func (c Client) RebootInstance(ctx context.Context, id UUID) (*Operation, error) if err != nil { return nil, fmt.Errorf("RebootInstance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("RebootInstance: execute request editors: %w", err) @@ -10763,7 +10917,8 @@ func (c Client) RemoveInstanceProtection(ctx context.Context, id UUID) (*Operati if err != nil { return nil, fmt.Errorf("RemoveInstanceProtection: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("RemoveInstanceProtection: execute request editors: %w", err) @@ -10818,7 +10973,8 @@ func (c Client) ResetInstance(ctx context.Context, id UUID, req ResetInstanceReq if err != nil { return nil, fmt.Errorf("ResetInstance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -10863,7 +11019,8 @@ func (c Client) ResetInstancePassword(ctx context.Context, id UUID) (*Operation, if err != nil { return nil, fmt.Errorf("ResetInstancePassword: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ResetInstancePassword: execute request editors: %w", err) @@ -10916,7 +11073,8 @@ func (c Client) ResizeInstanceDisk(ctx context.Context, id UUID, req ResizeInsta if err != nil { return nil, fmt.Errorf("ResizeInstanceDisk: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -10971,7 +11129,8 @@ func (c Client) ScaleInstance(ctx context.Context, id UUID, req ScaleInstanceReq if err != nil { return nil, fmt.Errorf("ScaleInstance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -11033,7 +11192,8 @@ func (c Client) StartInstance(ctx context.Context, id UUID, req StartInstanceReq if err != nil { return nil, fmt.Errorf("StartInstance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -11078,7 +11238,8 @@ func (c Client) StopInstance(ctx context.Context, id UUID) (*Operation, error) { if err != nil { return nil, fmt.Errorf("StopInstance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("StopInstance: execute request editors: %w", err) @@ -11132,7 +11293,8 @@ func (c Client) RevertInstanceToSnapshot(ctx context.Context, instanceID UUID, r if err != nil { return nil, fmt.Errorf("RevertInstanceToSnapshot: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -11192,7 +11354,8 @@ func (c Client) ListLoadBalancers(ctx context.Context) (*ListLoadBalancersRespon if err != nil { return nil, fmt.Errorf("ListLoadBalancers: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListLoadBalancers: execute request editors: %w", err) @@ -11248,7 +11411,8 @@ func (c Client) CreateLoadBalancer(ctx context.Context, req CreateLoadBalancerRe if err != nil { return nil, fmt.Errorf("CreateLoadBalancer: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -11293,7 +11457,8 @@ func (c Client) DeleteLoadBalancer(ctx context.Context, id UUID) (*Operation, er if err != nil { return nil, fmt.Errorf("DeleteLoadBalancer: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteLoadBalancer: execute request editors: %w", err) @@ -11336,7 +11501,8 @@ func (c Client) GetLoadBalancer(ctx context.Context, id UUID) (*LoadBalancer, er if err != nil { return nil, fmt.Errorf("GetLoadBalancer: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetLoadBalancer: execute request editors: %w", err) @@ -11392,7 +11558,8 @@ func (c Client) UpdateLoadBalancer(ctx context.Context, id UUID, req UpdateLoadB if err != nil { return nil, fmt.Errorf("UpdateLoadBalancer: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -11476,7 +11643,8 @@ func (c Client) AddServiceToLoadBalancer(ctx context.Context, id UUID, req AddSe if err != nil { return nil, fmt.Errorf("AddServiceToLoadBalancer: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -11521,7 +11689,8 @@ func (c Client) DeleteLoadBalancerService(ctx context.Context, id UUID, serviceI if err != nil { return nil, fmt.Errorf("DeleteLoadBalancerService: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteLoadBalancerService: execute request editors: %w", err) @@ -11564,7 +11733,8 @@ func (c Client) GetLoadBalancerService(ctx context.Context, id UUID, serviceID U if err != nil { return nil, fmt.Errorf("GetLoadBalancerService: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetLoadBalancerService: execute request editors: %w", err) @@ -11644,7 +11814,8 @@ func (c Client) UpdateLoadBalancerService(ctx context.Context, id UUID, serviceI if err != nil { return nil, fmt.Errorf("UpdateLoadBalancerService: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -11695,7 +11866,8 @@ func (c Client) ResetLoadBalancerServiceField(ctx context.Context, id UUID, serv if err != nil { return nil, fmt.Errorf("ResetLoadBalancerServiceField: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ResetLoadBalancerServiceField: execute request editors: %w", err) @@ -11745,7 +11917,8 @@ func (c Client) ResetLoadBalancerField(ctx context.Context, id UUID, field Reset if err != nil { return nil, fmt.Errorf("ResetLoadBalancerField: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ResetLoadBalancerField: execute request editors: %w", err) @@ -11788,7 +11961,8 @@ func (c Client) GetOperation(ctx context.Context, id UUID) (*Operation, error) { if err != nil { return nil, fmt.Errorf("GetOperation: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetOperation: execute request editors: %w", err) @@ -11831,7 +12005,8 @@ func (c Client) GetOrganization(ctx context.Context) (*Organization, error) { if err != nil { return nil, fmt.Errorf("GetOrganization: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetOrganization: execute request editors: %w", err) @@ -11889,7 +12064,8 @@ func (c Client) ListPrivateNetworks(ctx context.Context) (*ListPrivateNetworksRe if err != nil { return nil, fmt.Errorf("ListPrivateNetworks: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListPrivateNetworks: execute request editors: %w", err) @@ -11934,6 +12110,8 @@ type CreatePrivateNetworkRequest struct { Name string `json:"name" validate:"required,gte=1,lte=255"` // Private Network netmask Netmask net.IP `json:"netmask,omitempty"` + // Private Network DHCP Options + Options *PrivateNetworkOptions `json:"options,omitempty"` // Private Network start IP address StartIP net.IP `json:"start-ip,omitempty"` } @@ -11951,7 +12129,8 @@ func (c Client) CreatePrivateNetwork(ctx context.Context, req CreatePrivateNetwo if err != nil { return nil, fmt.Errorf("CreatePrivateNetwork: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -11996,7 +12175,8 @@ func (c Client) DeletePrivateNetwork(ctx context.Context, id UUID) (*Operation, if err != nil { return nil, fmt.Errorf("DeletePrivateNetwork: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeletePrivateNetwork: execute request editors: %w", err) @@ -12039,7 +12219,8 @@ func (c Client) GetPrivateNetwork(ctx context.Context, id UUID) (*PrivateNetwork if err != nil { return nil, fmt.Errorf("GetPrivateNetwork: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetPrivateNetwork: execute request editors: %w", err) @@ -12084,6 +12265,8 @@ type UpdatePrivateNetworkRequest struct { Name string `json:"name,omitempty" validate:"omitempty,gte=1,lte=255"` // Private Network netmask Netmask net.IP `json:"netmask,omitempty"` + // Private Network DHCP Options + Options *PrivateNetworkOptions `json:"options,omitempty"` // Private Network start IP address StartIP net.IP `json:"start-ip,omitempty"` } @@ -12101,7 +12284,8 @@ func (c Client) UpdatePrivateNetwork(ctx context.Context, id UUID, req UpdatePri if err != nil { return nil, fmt.Errorf("UpdatePrivateNetwork: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -12152,7 +12336,8 @@ func (c Client) ResetPrivateNetworkField(ctx context.Context, id UUID, field Res if err != nil { return nil, fmt.Errorf("ResetPrivateNetworkField: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ResetPrivateNetworkField: execute request editors: %w", err) @@ -12213,7 +12398,8 @@ func (c Client) AttachInstanceToPrivateNetwork(ctx context.Context, id UUID, req if err != nil { return nil, fmt.Errorf("AttachInstanceToPrivateNetwork: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -12268,7 +12454,8 @@ func (c Client) DetachInstanceFromPrivateNetwork(ctx context.Context, id UUID, r if err != nil { return nil, fmt.Errorf("DetachInstanceFromPrivateNetwork: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -12329,7 +12516,8 @@ func (c Client) UpdatePrivateNetworkInstanceIP(ctx context.Context, id UUID, req if err != nil { return nil, fmt.Errorf("UpdatePrivateNetworkInstanceIP: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -12378,7 +12566,8 @@ func (c Client) ListQuotas(ctx context.Context) (*ListQuotasResponse, error) { if err != nil { return nil, fmt.Errorf("ListQuotas: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListQuotas: execute request editors: %w", err) @@ -12421,7 +12610,8 @@ func (c Client) GetQuota(ctx context.Context, entity string) (*Quota, error) { if err != nil { return nil, fmt.Errorf("GetQuota: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetQuota: execute request editors: %w", err) @@ -12464,7 +12654,8 @@ func (c Client) DeleteReverseDNSElasticIP(ctx context.Context, id UUID) (*Operat if err != nil { return nil, fmt.Errorf("DeleteReverseDNSElasticIP: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteReverseDNSElasticIP: execute request editors: %w", err) @@ -12507,7 +12698,8 @@ func (c Client) GetReverseDNSElasticIP(ctx context.Context, id UUID) (*ReverseDN if err != nil { return nil, fmt.Errorf("GetReverseDNSElasticIP: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetReverseDNSElasticIP: execute request editors: %w", err) @@ -12559,7 +12751,8 @@ func (c Client) UpdateReverseDNSElasticIP(ctx context.Context, id UUID, req Upda if err != nil { return nil, fmt.Errorf("UpdateReverseDNSElasticIP: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -12604,7 +12797,8 @@ func (c Client) DeleteReverseDNSInstance(ctx context.Context, id UUID) (*Operati if err != nil { return nil, fmt.Errorf("DeleteReverseDNSInstance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteReverseDNSInstance: execute request editors: %w", err) @@ -12647,7 +12841,8 @@ func (c Client) GetReverseDNSInstance(ctx context.Context, id UUID) (*ReverseDNS if err != nil { return nil, fmt.Errorf("GetReverseDNSInstance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetReverseDNSInstance: execute request editors: %w", err) @@ -12699,7 +12894,8 @@ func (c Client) UpdateReverseDNSInstance(ctx context.Context, id UUID, req Updat if err != nil { return nil, fmt.Errorf("UpdateReverseDNSInstance: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -12777,7 +12973,8 @@ func (c Client) ListSecurityGroups(ctx context.Context, opts ...ListSecurityGrou if err != nil { return nil, fmt.Errorf("ListSecurityGroups: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if len(opts) > 0 { q := request.URL.Query() @@ -12840,7 +13037,8 @@ func (c Client) CreateSecurityGroup(ctx context.Context, req CreateSecurityGroup if err != nil { return nil, fmt.Errorf("CreateSecurityGroup: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -12885,7 +13083,8 @@ func (c Client) DeleteSecurityGroup(ctx context.Context, id UUID) (*Operation, e if err != nil { return nil, fmt.Errorf("DeleteSecurityGroup: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteSecurityGroup: execute request editors: %w", err) @@ -12928,7 +13127,8 @@ func (c Client) GetSecurityGroup(ctx context.Context, id UUID) (*SecurityGroup, if err != nil { return nil, fmt.Errorf("GetSecurityGroup: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetSecurityGroup: execute request editors: %w", err) @@ -13021,7 +13221,8 @@ func (c Client) AddRuleToSecurityGroup(ctx context.Context, id UUID, req AddRule if err != nil { return nil, fmt.Errorf("AddRuleToSecurityGroup: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -13066,7 +13267,8 @@ func (c Client) DeleteRuleFromSecurityGroup(ctx context.Context, id UUID, ruleID if err != nil { return nil, fmt.Errorf("DeleteRuleFromSecurityGroup: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteRuleFromSecurityGroup: execute request editors: %w", err) @@ -13119,7 +13321,8 @@ func (c Client) AddExternalSourceToSecurityGroup(ctx context.Context, id UUID, r if err != nil { return nil, fmt.Errorf("AddExternalSourceToSecurityGroup: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -13174,7 +13377,8 @@ func (c Client) AttachInstanceToSecurityGroup(ctx context.Context, id UUID, req if err != nil { return nil, fmt.Errorf("AttachInstanceToSecurityGroup: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -13229,7 +13433,8 @@ func (c Client) DetachInstanceFromSecurityGroup(ctx context.Context, id UUID, re if err != nil { return nil, fmt.Errorf("DetachInstanceFromSecurityGroup: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -13284,7 +13489,8 @@ func (c Client) RemoveExternalSourceFromSecurityGroup(ctx context.Context, id UU if err != nil { return nil, fmt.Errorf("RemoveExternalSourceFromSecurityGroup: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -13344,7 +13550,8 @@ func (c Client) ListSKSClusters(ctx context.Context) (*ListSKSClustersResponse, if err != nil { return nil, fmt.Errorf("ListSKSClusters: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListSKSClusters: execute request editors: %w", err) @@ -13426,7 +13633,8 @@ func (c Client) CreateSKSCluster(ctx context.Context, req CreateSKSClusterReques if err != nil { return nil, fmt.Errorf("CreateSKSCluster: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -13471,7 +13679,8 @@ func (c Client) ListSKSClusterDeprecatedResources(ctx context.Context, id UUID) if err != nil { return nil, fmt.Errorf("ListSKSClusterDeprecatedResources: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListSKSClusterDeprecatedResources: execute request editors: %w", err) @@ -13523,7 +13732,8 @@ func (c Client) GenerateSKSClusterKubeconfig(ctx context.Context, id UUID, req S if err != nil { return nil, fmt.Errorf("GenerateSKSClusterKubeconfig: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -13580,7 +13790,8 @@ func (c Client) ListSKSClusterVersions(ctx context.Context, opts ...ListSKSClust if err != nil { return nil, fmt.Errorf("ListSKSClusterVersions: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if len(opts) > 0 { q := request.URL.Query() @@ -13631,7 +13842,8 @@ func (c Client) DeleteSKSCluster(ctx context.Context, id UUID) (*Operation, erro if err != nil { return nil, fmt.Errorf("DeleteSKSCluster: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteSKSCluster: execute request editors: %w", err) @@ -13674,7 +13886,8 @@ func (c Client) GetSKSCluster(ctx context.Context, id UUID) (*SKSCluster, error) if err != nil { return nil, fmt.Errorf("GetSKSCluster: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetSKSCluster: execute request editors: %w", err) @@ -13736,7 +13949,8 @@ func (c Client) UpdateSKSCluster(ctx context.Context, id UUID, req UpdateSKSClus if err != nil { return nil, fmt.Errorf("UpdateSKSCluster: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -13793,7 +14007,8 @@ func (c Client) GetSKSClusterAuthorityCert(ctx context.Context, id UUID, authori if err != nil { return nil, fmt.Errorf("GetSKSClusterAuthorityCert: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetSKSClusterAuthorityCert: execute request editors: %w", err) @@ -13838,7 +14053,8 @@ func (c Client) GetSKSClusterInspection(ctx context.Context, id UUID) (*GetSKSCl if err != nil { return nil, fmt.Errorf("GetSKSClusterInspection: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetSKSClusterInspection: execute request editors: %w", err) @@ -13926,7 +14142,8 @@ func (c Client) CreateSKSNodepool(ctx context.Context, id UUID, req CreateSKSNod if err != nil { return nil, fmt.Errorf("CreateSKSNodepool: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -13971,7 +14188,8 @@ func (c Client) DeleteSKSNodepool(ctx context.Context, id UUID, sksNodepoolID UU if err != nil { return nil, fmt.Errorf("DeleteSKSNodepool: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteSKSNodepool: execute request editors: %w", err) @@ -14014,7 +14232,8 @@ func (c Client) GetSKSNodepool(ctx context.Context, id UUID, sksNodepoolID UUID) if err != nil { return nil, fmt.Errorf("GetSKSNodepool: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetSKSNodepool: execute request editors: %w", err) @@ -14096,7 +14315,8 @@ func (c Client) UpdateSKSNodepool(ctx context.Context, id UUID, sksNodepoolID UU if err != nil { return nil, fmt.Errorf("UpdateSKSNodepool: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -14152,7 +14372,8 @@ func (c Client) ResetSKSNodepoolField(ctx context.Context, id UUID, sksNodepoolI if err != nil { return nil, fmt.Errorf("ResetSKSNodepoolField: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ResetSKSNodepoolField: execute request editors: %w", err) @@ -14204,7 +14425,8 @@ func (c Client) EvictSKSNodepoolMembers(ctx context.Context, id UUID, sksNodepoo if err != nil { return nil, fmt.Errorf("EvictSKSNodepoolMembers: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -14259,7 +14481,8 @@ func (c Client) ScaleSKSNodepool(ctx context.Context, id UUID, sksNodepoolID UUI if err != nil { return nil, fmt.Errorf("ScaleSKSNodepool: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -14304,7 +14527,8 @@ func (c Client) RotateSKSCcmCredentials(ctx context.Context, id UUID) (*Operatio if err != nil { return nil, fmt.Errorf("RotateSKSCcmCredentials: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("RotateSKSCcmCredentials: execute request editors: %w", err) @@ -14347,7 +14571,8 @@ func (c Client) RotateSKSOperatorsCA(ctx context.Context, id UUID) (*Operation, if err != nil { return nil, fmt.Errorf("RotateSKSOperatorsCA: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("RotateSKSOperatorsCA: execute request editors: %w", err) @@ -14400,7 +14625,8 @@ func (c Client) UpgradeSKSCluster(ctx context.Context, id UUID, req UpgradeSKSCl if err != nil { return nil, fmt.Errorf("UpgradeSKSCluster: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -14445,7 +14671,8 @@ func (c Client) UpgradeSKSClusterServiceLevel(ctx context.Context, id UUID) (*Op if err != nil { return nil, fmt.Errorf("UpgradeSKSClusterServiceLevel: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("UpgradeSKSClusterServiceLevel: execute request editors: %w", err) @@ -14495,7 +14722,8 @@ func (c Client) ResetSKSClusterField(ctx context.Context, id UUID, field ResetSK if err != nil { return nil, fmt.Errorf("ResetSKSClusterField: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ResetSKSClusterField: execute request editors: %w", err) @@ -14553,7 +14781,8 @@ func (c Client) ListSnapshots(ctx context.Context) (*ListSnapshotsResponse, erro if err != nil { return nil, fmt.Errorf("ListSnapshots: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListSnapshots: execute request editors: %w", err) @@ -14596,7 +14825,8 @@ func (c Client) DeleteSnapshot(ctx context.Context, id UUID) (*Operation, error) if err != nil { return nil, fmt.Errorf("DeleteSnapshot: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteSnapshot: execute request editors: %w", err) @@ -14639,7 +14869,8 @@ func (c Client) GetSnapshot(ctx context.Context, id UUID) (*Snapshot, error) { if err != nil { return nil, fmt.Errorf("GetSnapshot: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetSnapshot: execute request editors: %w", err) @@ -14682,7 +14913,8 @@ func (c Client) ExportSnapshot(ctx context.Context, id UUID) (*Operation, error) if err != nil { return nil, fmt.Errorf("ExportSnapshot: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ExportSnapshot: execute request editors: %w", err) @@ -14743,7 +14975,8 @@ func (c Client) PromoteSnapshotToTemplate(ctx context.Context, id UUID, req Prom if err != nil { return nil, fmt.Errorf("PromoteSnapshotToTemplate: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -14803,7 +15036,8 @@ func (c Client) ListSOSBucketsUsage(ctx context.Context) (*ListSOSBucketsUsageRe if err != nil { return nil, fmt.Errorf("ListSOSBucketsUsage: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListSOSBucketsUsage: execute request editors: %w", err) @@ -14858,7 +15092,8 @@ func (c Client) GetSOSPresignedURL(ctx context.Context, bucket string, opts ...G if err != nil { return nil, fmt.Errorf("GetSOSPresignedURL: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if len(opts) > 0 { q := request.URL.Query() @@ -14924,7 +15159,8 @@ func (c Client) ListSSHKeys(ctx context.Context) (*ListSSHKeysResponse, error) { if err != nil { return nil, fmt.Errorf("ListSSHKeys: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListSSHKeys: execute request editors: %w", err) @@ -14979,7 +15215,8 @@ func (c Client) RegisterSSHKey(ctx context.Context, req RegisterSSHKeyRequest) ( if err != nil { return nil, fmt.Errorf("RegisterSSHKey: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -15024,7 +15261,8 @@ func (c Client) DeleteSSHKey(ctx context.Context, name string) (*Operation, erro if err != nil { return nil, fmt.Errorf("DeleteSSHKey: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteSSHKey: execute request editors: %w", err) @@ -15067,7 +15305,8 @@ func (c Client) GetSSHKey(ctx context.Context, name string) (*SSHKey, error) { if err != nil { return nil, fmt.Errorf("GetSSHKey: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetSSHKey: execute request editors: %w", err) @@ -15146,7 +15385,8 @@ func (c Client) ListTemplates(ctx context.Context, opts ...ListTemplatesOpt) (*L if err != nil { return nil, fmt.Errorf("ListTemplates: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if len(opts) > 0 { q := request.URL.Query() @@ -15236,7 +15476,8 @@ func (c Client) RegisterTemplate(ctx context.Context, req RegisterTemplateReques if err != nil { return nil, fmt.Errorf("RegisterTemplate: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -15281,7 +15522,8 @@ func (c Client) DeleteTemplate(ctx context.Context, id UUID) (*Operation, error) if err != nil { return nil, fmt.Errorf("DeleteTemplate: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("DeleteTemplate: execute request editors: %w", err) @@ -15324,7 +15566,8 @@ func (c Client) GetTemplate(ctx context.Context, id UUID) (*Template, error) { if err != nil { return nil, fmt.Errorf("GetTemplate: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("GetTemplate: execute request editors: %w", err) @@ -15377,7 +15620,8 @@ func (c Client) CopyTemplate(ctx context.Context, id UUID, req CopyTemplateReque if err != nil { return nil, fmt.Errorf("CopyTemplate: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -15434,7 +15678,8 @@ func (c Client) UpdateTemplate(ctx context.Context, id UUID, req UpdateTemplateR if err != nil { return nil, fmt.Errorf("UpdateTemplate: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) request.Header.Add("Content-Type", "application/json") @@ -15494,7 +15739,8 @@ func (c Client) ListZones(ctx context.Context) (*ListZonesResponse, error) { if err != nil { return nil, fmt.Errorf("ListZones: new request: %w", err) } - request.Header.Add("User-Agent", UserAgent) + + request.Header.Add("User-Agent", c.getUserAgent()) if err := c.executeRequestInterceptors(ctx, request); err != nil { return nil, fmt.Errorf("ListZones: execute request editors: %w", err) diff --git a/vendor/github.com/exoscale/egoscale/v3/schemas.go b/vendor/github.com/exoscale/egoscale/v3/schemas.go index 95ddaea9..11bf5dc0 100644 --- a/vendor/github.com/exoscale/egoscale/v3/schemas.go +++ b/vendor/github.com/exoscale/egoscale/v3/schemas.go @@ -199,6 +199,20 @@ type DBAASDatadogTag struct { } type DBAASEndpointDatadog struct { + // Custom tags provided by user + DatadogTags []DBAASDatadogTag `json:"datadog-tags,omitempty"` + // Disable consumer group metrics + DisableConsumerStats *bool `json:"disable-consumer-stats,omitempty"` + // Number of separate instances to fetch kafka consumer statistics with + KafkaConsumerCheckInstances int64 `json:"kafka-consumer-check-instances,omitempty" validate:"omitempty,gte=1,lte=100"` + // Number of seconds that datadog will wait to get consumer statistics from brokers + KafkaConsumerStatsTimeout int64 `json:"kafka-consumer-stats-timeout,omitempty" validate:"omitempty,gte=2,lte=300"` + // Maximum number of partition contexts to send + MaxPartitionContexts int64 `json:"max-partition-contexts,omitempty" validate:"omitempty,gte=200,lte=200000"` + Site EnumDatadogSite `json:"site" validate:"required"` +} + +type DBAASEndpointDatadogPayloadSettings struct { // Datadog API key DatadogAPIKey string `json:"datadog-api-key" validate:"required,gte=1,lte=256"` // Custom tags provided by user @@ -214,9 +228,16 @@ type DBAASEndpointDatadog struct { Site EnumDatadogSite `json:"site" validate:"required"` } +type DBAASEndpointDatadogPayload struct { + Settings *DBAASEndpointDatadogPayloadSettings `json:"settings,omitempty"` +} + +type DBAASEndpointDatadogSecrets struct { + // Datadog API key + DatadogAPIKey string `json:"datadog-api-key" validate:"required,gte=1,lte=256"` +} + type DBAASEndpointElasticsearch struct { - // PEM encoded CA certificate - CA string `json:"ca,omitempty" validate:"omitempty,lte=16384"` // Maximum number of days of logs to keep IndexDaysMax int64 `json:"index-days-max,omitempty" validate:"omitempty,gte=1,lte=10000"` // Elasticsearch index prefix @@ -236,6 +257,28 @@ type DBAASEndpointElasticsearchOutput struct { Type EnumExternalEndpointTypes `json:"type,omitempty"` } +type DBAASEndpointElasticsearchPayloadSettings struct { + // PEM encoded CA certificate + CA string `json:"ca,omitempty" validate:"omitempty,lte=16384"` + // Maximum number of days of logs to keep + IndexDaysMax int64 `json:"index-days-max,omitempty" validate:"omitempty,gte=1,lte=10000"` + // Elasticsearch index prefix + IndexPrefix string `json:"index-prefix" validate:"required,gte=1,lte=1000"` + // Elasticsearch request timeout limit + Timeout int64 `json:"timeout,omitempty" validate:"omitempty,gte=10,lte=120"` + // Elasticsearch connection URL + URL string `json:"url" validate:"required,gte=12,lte=2048"` +} + +type DBAASEndpointElasticsearchPayload struct { + Settings *DBAASEndpointElasticsearchPayloadSettings `json:"settings,omitempty"` +} + +type DBAASEndpointElasticsearchSecrets struct { + // PEM encoded CA certificate + CA string `json:"ca,omitempty" validate:"omitempty,lte=16384"` +} + type DBAASEndpointExternalPrometheusOutput struct { // External integration endpoint id ID UUID `json:"id,omitempty"` @@ -246,8 +289,6 @@ type DBAASEndpointExternalPrometheusOutput struct { } type DBAASEndpointOpensearch struct { - // PEM encoded CA certificate - CA string `json:"ca,omitempty" validate:"omitempty,lte=16384"` // Maximum number of days of logs to keep IndexDaysMax int64 `json:"index-days-max,omitempty" validate:"omitempty,gte=1,lte=10000"` // OpenSearch index prefix @@ -267,14 +308,66 @@ type DBAASEndpointOpensearchOutput struct { Type EnumExternalEndpointTypes `json:"type,omitempty"` } +type DBAASEndpointOpensearchPayloadSettings struct { + // PEM encoded CA certificate + CA string `json:"ca,omitempty" validate:"omitempty,lte=16384"` + // Maximum number of days of logs to keep + IndexDaysMax int64 `json:"index-days-max,omitempty" validate:"omitempty,gte=1,lte=10000"` + // OpenSearch index prefix + IndexPrefix string `json:"index-prefix" validate:"required,gte=1,lte=1000"` + // OpenSearch request timeout limit + Timeout int64 `json:"timeout,omitempty" validate:"omitempty,gte=10,lte=120"` + // OpenSearch connection URL + URL string `json:"url" validate:"required,gte=12,lte=2048"` +} + +type DBAASEndpointOpensearchPayload struct { + Settings *DBAASEndpointOpensearchPayloadSettings `json:"settings,omitempty"` +} + +type DBAASEndpointOpensearchSecrets struct { + // PEM encoded CA certificate + CA string `json:"ca,omitempty" validate:"omitempty,lte=16384"` +} + type DBAASEndpointPrometheus struct { + // Prometheus basic authentication username + BasicAuthUsername string `json:"basic-auth-username,omitempty" validate:"omitempty,gte=5,lte=32"` +} + +type DBAASEndpointPrometheusPayloadSettings struct { // Prometheus basic authentication password BasicAuthPassword string `json:"basic-auth-password,omitempty" validate:"omitempty,gte=8,lte=64"` // Prometheus basic authentication username BasicAuthUsername string `json:"basic-auth-username,omitempty" validate:"omitempty,gte=5,lte=32"` } +type DBAASEndpointPrometheusPayload struct { + Settings *DBAASEndpointPrometheusPayloadSettings `json:"settings,omitempty"` +} + +type DBAASEndpointPrometheusSecrets struct { + // Prometheus basic authentication password + BasicAuthPassword string `json:"basic-auth-password,omitempty" validate:"omitempty,gte=8,lte=64"` +} + type DBAASEndpointRsyslog struct { + Format EnumRsyslogFormat `json:"format" validate:"required"` + // Custom syslog message format + Logline string `json:"logline,omitempty" validate:"omitempty,gte=1,lte=512"` + // Rsyslog max message size + MaxMessageSize int64 `json:"max-message-size,omitempty" validate:"omitempty,gte=2048,lte=2.147483647e+09"` + // Rsyslog server port + Port int64 `json:"port" validate:"required,gte=1,lte=65535"` + // Structured data block for log message + SD string `json:"sd,omitempty" validate:"omitempty,lte=1024"` + // Rsyslog server IP address or hostname + Server string `json:"server" validate:"required,gte=4,lte=255"` + // Require TLS + Tls *bool `json:"tls" validate:"required"` +} + +type DBAASEndpointRsyslogPayloadSettings struct { // PEM encoded CA certificate CA string `json:"ca,omitempty" validate:"omitempty,lte=16384"` // PEM encoded client certificate @@ -296,6 +389,19 @@ type DBAASEndpointRsyslog struct { Tls *bool `json:"tls" validate:"required"` } +type DBAASEndpointRsyslogPayload struct { + Settings *DBAASEndpointRsyslogPayloadSettings `json:"settings,omitempty"` +} + +type DBAASEndpointRsyslogSecrets struct { + // PEM encoded CA certificate + CA string `json:"ca,omitempty" validate:"omitempty,lte=16384"` + // PEM encoded client certificate + Cert string `json:"cert,omitempty" validate:"omitempty,lte=16384"` + // PEM encoded client key + Key string `json:"key,omitempty" validate:"omitempty,lte=16384"` +} + type DBAASExternalEndpoint struct { // External integration endpoint id ID UUID `json:"id,omitempty"` @@ -2426,6 +2532,8 @@ type PrivateNetwork struct { Name string `json:"name,omitempty" validate:"omitempty,gte=1,lte=255"` // Private Network netmask Netmask net.IP `json:"netmask,omitempty"` + // Private Network DHCP Options + Options *PrivateNetworkOptions `json:"options,omitempty"` // Private Network start IP address StartIP net.IP `json:"start-ip,omitempty"` // Private Network VXLAN ID @@ -2440,6 +2548,14 @@ type PrivateNetworkLease struct { IP net.IP `json:"ip,omitempty"` } +// Private Network DHCP Options +type PrivateNetworkOptions struct { + // DNS Servers + DNSServers []net.IP `json:"dns-servers,omitempty"` + // Routers + Routers []net.IP `json:"routers,omitempty"` +} + type PublicIPAssignment string const ( diff --git a/vendor/github.com/exoscale/egoscale/v3/version.go b/vendor/github.com/exoscale/egoscale/v3/version.go index 02227f72..8039fa30 100644 --- a/vendor/github.com/exoscale/egoscale/v3/version.go +++ b/vendor/github.com/exoscale/egoscale/v3/version.go @@ -1,4 +1,4 @@ package v3 // Version represents the current egoscale v3 version. -const Version = "v3.1.4" +const Version = "v3.1.6" diff --git a/vendor/modules.txt b/vendor/modules.txt index 08788f4d..c522706a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -220,7 +220,7 @@ github.com/exoscale/egoscale/v2 github.com/exoscale/egoscale/v2/api github.com/exoscale/egoscale/v2/oapi github.com/exoscale/egoscale/version -# github.com/exoscale/egoscale/v3 v3.1.4 +# github.com/exoscale/egoscale/v3 v3.1.6 ## explicit; go 1.22.0 github.com/exoscale/egoscale/v3 github.com/exoscale/egoscale/v3/credentials