diff --git a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/consul_telemetry_service_client.go b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/consul_telemetry_service_client.go index 8c665417..dabdc26e 100644 --- a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/consul_telemetry_service_client.go +++ b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/consul_telemetry_service_client.go @@ -32,8 +32,6 @@ type ClientService interface { GetLabelValues(params *GetLabelValuesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLabelValuesOK, error) - QueryRange(params *QueryRangeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*QueryRangeOK, error) - QueryRangeBatch(params *QueryRangeBatchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*QueryRangeBatchOK, error) SetTransport(transport runtime.ClientTransport) @@ -115,44 +113,6 @@ func (a *Client) GetLabelValues(params *GetLabelValuesParams, authInfo runtime.C return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -QueryRange queries range implementing https prometheus io docs prometheus latest querying api range queries -*/ -func (a *Client) QueryRange(params *QueryRangeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*QueryRangeOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewQueryRangeParams() - } - op := &runtime.ClientOperation{ - ID: "QueryRange", - Method: "POST", - PathPattern: "/ctgw/2023-04-14/organizations/{location.organization_id}/projects/{location.project_id}/clusters/{cluster_id}/query_range", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &QueryRangeReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*QueryRangeOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*QueryRangeDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* QueryRangeBatch customs endpoints for observability that batches query range requests */ diff --git a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/query_range_batch_responses.go b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/query_range_batch_responses.go index cc70c6bb..72047d29 100644 --- a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/query_range_batch_responses.go +++ b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/query_range_batch_responses.go @@ -198,7 +198,7 @@ type QueryRangeBatchBody struct { // location Location *QueryRangeBatchParamsBodyLocation `json:"location,omitempty"` - // query + // query is the set of QueryRangeTypes (QRT) to query for. Between 1 and 10 queries can be issued in one batch. Query []*models.HashicorpCloudConsulTelemetry20230414QRT `json:"query"` // start diff --git a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/query_range_parameters.go b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/query_range_parameters.go deleted file mode 100644 index 8a7251d8..00000000 --- a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/query_range_parameters.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package consul_telemetry_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewQueryRangeParams creates a new QueryRangeParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewQueryRangeParams() *QueryRangeParams { - return &QueryRangeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewQueryRangeParamsWithTimeout creates a new QueryRangeParams object -// with the ability to set a timeout on a request. -func NewQueryRangeParamsWithTimeout(timeout time.Duration) *QueryRangeParams { - return &QueryRangeParams{ - timeout: timeout, - } -} - -// NewQueryRangeParamsWithContext creates a new QueryRangeParams object -// with the ability to set a context for a request. -func NewQueryRangeParamsWithContext(ctx context.Context) *QueryRangeParams { - return &QueryRangeParams{ - Context: ctx, - } -} - -// NewQueryRangeParamsWithHTTPClient creates a new QueryRangeParams object -// with the ability to set a custom HTTPClient for a request. -func NewQueryRangeParamsWithHTTPClient(client *http.Client) *QueryRangeParams { - return &QueryRangeParams{ - HTTPClient: client, - } -} - -/* -QueryRangeParams contains all the parameters to send to the API endpoint - - for the query range operation. - - Typically these are written to a http.Request. -*/ -type QueryRangeParams struct { - - // Body. - Body QueryRangeBody - - // ClusterID. - ClusterID string - - /* LocationOrganizationID. - - organization_id is the id of the organization. - */ - LocationOrganizationID string - - /* LocationProjectID. - - project_id is the projects id. - */ - LocationProjectID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the query range params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *QueryRangeParams) WithDefaults() *QueryRangeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the query range params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *QueryRangeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the query range params -func (o *QueryRangeParams) WithTimeout(timeout time.Duration) *QueryRangeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the query range params -func (o *QueryRangeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the query range params -func (o *QueryRangeParams) WithContext(ctx context.Context) *QueryRangeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the query range params -func (o *QueryRangeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the query range params -func (o *QueryRangeParams) WithHTTPClient(client *http.Client) *QueryRangeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the query range params -func (o *QueryRangeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the query range params -func (o *QueryRangeParams) WithBody(body QueryRangeBody) *QueryRangeParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the query range params -func (o *QueryRangeParams) SetBody(body QueryRangeBody) { - o.Body = body -} - -// WithClusterID adds the clusterID to the query range params -func (o *QueryRangeParams) WithClusterID(clusterID string) *QueryRangeParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the query range params -func (o *QueryRangeParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithLocationOrganizationID adds the locationOrganizationID to the query range params -func (o *QueryRangeParams) WithLocationOrganizationID(locationOrganizationID string) *QueryRangeParams { - o.SetLocationOrganizationID(locationOrganizationID) - return o -} - -// SetLocationOrganizationID adds the locationOrganizationId to the query range params -func (o *QueryRangeParams) SetLocationOrganizationID(locationOrganizationID string) { - o.LocationOrganizationID = locationOrganizationID -} - -// WithLocationProjectID adds the locationProjectID to the query range params -func (o *QueryRangeParams) WithLocationProjectID(locationProjectID string) *QueryRangeParams { - o.SetLocationProjectID(locationProjectID) - return o -} - -// SetLocationProjectID adds the locationProjectId to the query range params -func (o *QueryRangeParams) SetLocationProjectID(locationProjectID string) { - o.LocationProjectID = locationProjectID -} - -// WriteToRequest writes these params to a swagger request -func (o *QueryRangeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - // path param location.organization_id - if err := r.SetPathParam("location.organization_id", o.LocationOrganizationID); err != nil { - return err - } - - // path param location.project_id - if err := r.SetPathParam("location.project_id", o.LocationProjectID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/query_range_responses.go b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/query_range_responses.go deleted file mode 100644 index e1f45290..00000000 --- a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/client/consul_telemetry_service/query_range_responses.go +++ /dev/null @@ -1,460 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package consul_telemetry_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" - - "github.com/hashicorp/hcp-sdk-go/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models" - cloud "github.com/hashicorp/hcp-sdk-go/clients/cloud-shared/v1/models" -) - -// QueryRangeReader is a Reader for the QueryRange structure. -type QueryRangeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *QueryRangeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewQueryRangeOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewQueryRangeDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewQueryRangeOK creates a QueryRangeOK with default headers values -func NewQueryRangeOK() *QueryRangeOK { - return &QueryRangeOK{} -} - -/* -QueryRangeOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type QueryRangeOK struct { - Payload *models.HashicorpCloudConsulTelemetry20230414QueryRangeResponse -} - -// IsSuccess returns true when this query range o k response has a 2xx status code -func (o *QueryRangeOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this query range o k response has a 3xx status code -func (o *QueryRangeOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this query range o k response has a 4xx status code -func (o *QueryRangeOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this query range o k response has a 5xx status code -func (o *QueryRangeOK) IsServerError() bool { - return false -} - -// IsCode returns true when this query range o k response a status code equal to that given -func (o *QueryRangeOK) IsCode(code int) bool { - return code == 200 -} - -func (o *QueryRangeOK) Error() string { - return fmt.Sprintf("[POST /ctgw/2023-04-14/organizations/{location.organization_id}/projects/{location.project_id}/clusters/{cluster_id}/query_range][%d] queryRangeOK %+v", 200, o.Payload) -} - -func (o *QueryRangeOK) String() string { - return fmt.Sprintf("[POST /ctgw/2023-04-14/organizations/{location.organization_id}/projects/{location.project_id}/clusters/{cluster_id}/query_range][%d] queryRangeOK %+v", 200, o.Payload) -} - -func (o *QueryRangeOK) GetPayload() *models.HashicorpCloudConsulTelemetry20230414QueryRangeResponse { - return o.Payload -} - -func (o *QueryRangeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.HashicorpCloudConsulTelemetry20230414QueryRangeResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewQueryRangeDefault creates a QueryRangeDefault with default headers values -func NewQueryRangeDefault(code int) *QueryRangeDefault { - return &QueryRangeDefault{ - _statusCode: code, - } -} - -/* -QueryRangeDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type QueryRangeDefault struct { - _statusCode int - - Payload *cloud.GoogleRPCStatus -} - -// Code gets the status code for the query range default response -func (o *QueryRangeDefault) Code() int { - return o._statusCode -} - -// IsSuccess returns true when this query range default response has a 2xx status code -func (o *QueryRangeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this query range default response has a 3xx status code -func (o *QueryRangeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this query range default response has a 4xx status code -func (o *QueryRangeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this query range default response has a 5xx status code -func (o *QueryRangeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this query range default response a status code equal to that given -func (o *QueryRangeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -func (o *QueryRangeDefault) Error() string { - return fmt.Sprintf("[POST /ctgw/2023-04-14/organizations/{location.organization_id}/projects/{location.project_id}/clusters/{cluster_id}/query_range][%d] QueryRange default %+v", o._statusCode, o.Payload) -} - -func (o *QueryRangeDefault) String() string { - return fmt.Sprintf("[POST /ctgw/2023-04-14/organizations/{location.organization_id}/projects/{location.project_id}/clusters/{cluster_id}/query_range][%d] QueryRange default %+v", o._statusCode, o.Payload) -} - -func (o *QueryRangeDefault) GetPayload() *cloud.GoogleRPCStatus { - return o.Payload -} - -func (o *QueryRangeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(cloud.GoogleRPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -QueryRangeBody QueryRangeRequest -// -// QueryRangeRequest is based off https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries but doesn't allow arbrirtary -// queries. -// -// Instead we have a QueryRangeType that is passed as a lookup on the backend. Note that the result of any new type -// must always return a MetricMatrix as shown in the response below -swagger:model QueryRangeBody -*/ -type QueryRangeBody struct { - - // end - // Format: date-time - End strfmt.DateTime `json:"end,omitempty"` - - // location - Location *QueryRangeParamsBodyLocation `json:"location,omitempty"` - - // query - Query *models.HashicorpCloudConsulTelemetry20230414QRT `json:"query,omitempty"` - - // start - // Format: date-time - Start strfmt.DateTime `json:"start,omitempty"` - - // step - Step string `json:"step,omitempty"` -} - -// Validate validates this query range body -func (o *QueryRangeBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateEnd(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLocation(formats); err != nil { - res = append(res, err) - } - - if err := o.validateQuery(formats); err != nil { - res = append(res, err) - } - - if err := o.validateStart(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *QueryRangeBody) validateEnd(formats strfmt.Registry) error { - if swag.IsZero(o.End) { // not required - return nil - } - - if err := validate.FormatOf("body"+"."+"end", "body", "date-time", o.End.String(), formats); err != nil { - return err - } - - return nil -} - -func (o *QueryRangeBody) validateLocation(formats strfmt.Registry) error { - if swag.IsZero(o.Location) { // not required - return nil - } - - if o.Location != nil { - if err := o.Location.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "location") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "location") - } - return err - } - } - - return nil -} - -func (o *QueryRangeBody) validateQuery(formats strfmt.Registry) error { - if swag.IsZero(o.Query) { // not required - return nil - } - - if o.Query != nil { - if err := o.Query.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "query") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "query") - } - return err - } - } - - return nil -} - -func (o *QueryRangeBody) validateStart(formats strfmt.Registry) error { - if swag.IsZero(o.Start) { // not required - return nil - } - - if err := validate.FormatOf("body"+"."+"start", "body", "date-time", o.Start.String(), formats); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this query range body based on the context it is used -func (o *QueryRangeBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateLocation(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateQuery(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *QueryRangeBody) contextValidateLocation(ctx context.Context, formats strfmt.Registry) error { - - if o.Location != nil { - if err := o.Location.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "location") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "location") - } - return err - } - } - - return nil -} - -func (o *QueryRangeBody) contextValidateQuery(ctx context.Context, formats strfmt.Registry) error { - - if o.Query != nil { - if err := o.Query.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "query") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "query") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *QueryRangeBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *QueryRangeBody) UnmarshalBinary(b []byte) error { - var res QueryRangeBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -QueryRangeParamsBodyLocation Location represents a target for an operation in HCP. -swagger:model QueryRangeParamsBodyLocation -*/ -type QueryRangeParamsBodyLocation struct { - - // region is the region that the resource is located in. It is - // optional if the object being referenced is a global object. - Region *cloud.HashicorpCloudLocationRegion `json:"region,omitempty"` -} - -// Validate validates this query range params body location -func (o *QueryRangeParamsBodyLocation) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateRegion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *QueryRangeParamsBodyLocation) validateRegion(formats strfmt.Registry) error { - if swag.IsZero(o.Region) { // not required - return nil - } - - if o.Region != nil { - if err := o.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "location" + "." + "region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "location" + "." + "region") - } - return err - } - } - - return nil -} - -// ContextValidate validate this query range params body location based on the context it is used -func (o *QueryRangeParamsBodyLocation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *QueryRangeParamsBodyLocation) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if o.Region != nil { - if err := o.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "location" + "." + "region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "location" + "." + "region") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *QueryRangeParamsBodyLocation) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *QueryRangeParamsBodyLocation) UnmarshalBinary(b []byte) error { - var res QueryRangeParamsBodyLocation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_agent_telemetry_config_response.go b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_agent_telemetry_config_response.go index 1804ed78..dd75d5dc 100644 --- a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_agent_telemetry_config_response.go +++ b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_agent_telemetry_config_response.go @@ -18,6 +18,9 @@ import ( // swagger:model hashicorp.cloud.consul_telemetry_20230414.AgentTelemetryConfigResponse type HashicorpCloudConsulTelemetry20230414AgentTelemetryConfigResponse struct { + // refresh config + RefreshConfig *HashicorpCloudConsulTelemetry20230414RefreshConfig `json:"refresh_config,omitempty"` + // telemetry config TelemetryConfig *HashicorpCloudConsulTelemetry20230414TelemetryConfig `json:"telemetry_config,omitempty"` } @@ -26,6 +29,10 @@ type HashicorpCloudConsulTelemetry20230414AgentTelemetryConfigResponse struct { func (m *HashicorpCloudConsulTelemetry20230414AgentTelemetryConfigResponse) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateRefreshConfig(formats); err != nil { + res = append(res, err) + } + if err := m.validateTelemetryConfig(formats); err != nil { res = append(res, err) } @@ -36,6 +43,25 @@ func (m *HashicorpCloudConsulTelemetry20230414AgentTelemetryConfigResponse) Vali return nil } +func (m *HashicorpCloudConsulTelemetry20230414AgentTelemetryConfigResponse) validateRefreshConfig(formats strfmt.Registry) error { + if swag.IsZero(m.RefreshConfig) { // not required + return nil + } + + if m.RefreshConfig != nil { + if err := m.RefreshConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("refresh_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("refresh_config") + } + return err + } + } + + return nil +} + func (m *HashicorpCloudConsulTelemetry20230414AgentTelemetryConfigResponse) validateTelemetryConfig(formats strfmt.Registry) error { if swag.IsZero(m.TelemetryConfig) { // not required return nil @@ -59,6 +85,10 @@ func (m *HashicorpCloudConsulTelemetry20230414AgentTelemetryConfigResponse) vali func (m *HashicorpCloudConsulTelemetry20230414AgentTelemetryConfigResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateRefreshConfig(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTelemetryConfig(ctx, formats); err != nil { res = append(res, err) } @@ -69,6 +99,22 @@ func (m *HashicorpCloudConsulTelemetry20230414AgentTelemetryConfigResponse) Cont return nil } +func (m *HashicorpCloudConsulTelemetry20230414AgentTelemetryConfigResponse) contextValidateRefreshConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.RefreshConfig != nil { + if err := m.RefreshConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("refresh_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("refresh_config") + } + return err + } + } + + return nil +} + func (m *HashicorpCloudConsulTelemetry20230414AgentTelemetryConfigResponse) contextValidateTelemetryConfig(ctx context.Context, formats strfmt.Registry) error { if m.TelemetryConfig != nil { diff --git a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_l_v_t.go b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_l_v_t.go index 183c8e80..e5d06e10 100644 --- a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_l_v_t.go +++ b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_l_v_t.go @@ -35,6 +35,9 @@ const ( // HashicorpCloudConsulTelemetry20230414LVTLVTSERVERIDS captures enum value "LVT_SERVER_IDS" HashicorpCloudConsulTelemetry20230414LVTLVTSERVERIDS HashicorpCloudConsulTelemetry20230414LVT = "LVT_SERVER_IDS" + + // HashicorpCloudConsulTelemetry20230414LVTLVTSERVERNODENAMES captures enum value "LVT_SERVER_NODE_NAMES" + HashicorpCloudConsulTelemetry20230414LVTLVTSERVERNODENAMES HashicorpCloudConsulTelemetry20230414LVT = "LVT_SERVER_NODE_NAMES" ) // for schema @@ -42,7 +45,7 @@ var hashicorpCloudConsulTelemetry20230414LVTEnum []interface{} func init() { var res []HashicorpCloudConsulTelemetry20230414LVT - if err := json.Unmarshal([]byte(`["LVT_UNSPECIFIED","LVT_SERVER_IDS"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["LVT_UNSPECIFIED","LVT_SERVER_IDS","LVT_SERVER_NODE_NAMES"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_q_r_t.go b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_q_r_t.go index c9429be2..f7f9d5c5 100644 --- a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_q_r_t.go +++ b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_q_r_t.go @@ -14,7 +14,83 @@ import ( "github.com/go-openapi/validate" ) -// HashicorpCloudConsulTelemetry20230414QRT hashicorp cloud consul telemetry 20230414 q r t +// HashicorpCloudConsulTelemetry20230414QRT - QRT_SERVERS_HEARTBEAT: The P90 heartbeat from the leader to followers within each time interval. +// - QRT_SERVERS_LEADER_ELECTIONS: The count of leadership elections in the prior day. +// - QRT_SERVERS_HAS_LEADER: Whether the cluster has a leader. +// - QRT_SERVERS_MAX_HEARTBEAT: The p90 heartbeat latency in the last day -- the max latency of a leader contacting a follower. +// - QRT_SERVERS_LEADER_WRITE_LOAD_HIGH: The max raft transaction rate over the last day. +// - QRT_SERVERS_LEADER_WRITE_LOAD_MEDIAN: The p50 raft transaction rate over the last day. +// - QRT_SERVERS_LEADER_WRITE_LOAD_LOW: The minimum raft transaction rate over the last day. +// - QRT_SERVERS_LEADER_WRITE_LATENCY_HIGH: The p95 leader commit latency over the prior day. +// - QRT_SERVERS_LEADER_WRITE_LATENCY_MEDIAN: The p90 leader commit latency over the prior day. +// - QRT_SERVERS_LEADER_WRITE_LATENCY_LOW: The p50 leader commit latency over the prior day. +// - QRT_SERVERS_MEMORY_UTILIZATION_HIGH: The maximum server memory utilization over the prior day. +// - QRT_SERVERS_MEMORY_UTILIZATION_MEDIAN: The median average server memory utilization over the prior day. +// - QRT_SERVERS_MEMORY_UTILIZATION_LOW: The minimum server memory utilization over the prior day. +// - QRT_SERVERS_CPU_UTILIZATION_HIGH: The maximum server cpu utilization of any individual cpu over the prior day. +// - QRT_SERVERS_CPU_UTILIZATION_MEDIAN: The p50 average cpu utilization of any individual cpu over the prior day. +// - QRT_SERVERS_CPU_UTILIZATION_LOW: The minimum server cpu utilization of any individual cpu over the prior day. +// - QRT_SERVERS_IO_WAIT_TIME_HIGH: The maximum cpu io wait time of any individual cpu over the prior day. +// - QRT_SERVERS_IO_WAIT_TIME_MEDIAN: The p50 average cpu io wait time of any individual cpu over the prior day. +// - QRT_SERVERS_IO_WAIT_TIME_LOW: The minimum cpu io wait time of any individual cpu over the prior day. +// - QRT_SERVERS_TRANSACTIONS: Raft applies per second per server. +// - QRT_SERVERS_LATENCY: The average p50 Raft apply latency over the past day. +// - QRT_SERVERS_FOLLOWER_REPLICATIONS: The total rate of Raft replications from leader to followers. This is summed over peers. +// - QRT_SERVERS_MEMORY_UTILIZATION: The median percentage memory usage for each server each interval. +// - QRT_SERVERS_CPU_UTILIZATION: The median percentage cpu usage for each server each interval. +// - QRT_SERVERS_IO_WAIT_TIME: The median percentage io wait time for each server each interval. +// - QRT_ENVOY_SERVER_PHYSICAL_MEMORY_TOTAL_CAPACITY: Total memory capacity of Envoy servers. +// - QRT_ENVOY_SERVER_STATES_LIVE: The count of live Envoy servers. +// - QRT_ENVOY_SERVER_STATES_PREINITIALIZING: The count of currently pre-initializing Envoy servers. +// - QRT_ENVOY_SERVER_STATES_INITIALIZING: The count of currently initializing Envoy servers. +// - QRT_ENVOY_SERVER_STATES_DRAINING: The count of currently draining Envoy servers. +// - QRT_ENVOY_PROXY_COUNT_CONNECTED: The count of Envoy servers connected to Consul. +// - QRT_ENVOY_PROXY_COUNT_DISCONNECTED: The count of Envoy servers not connected to Consul. +// - QRT_ENVOY_REQUEST_RATE_1XX: The ratio of requests in the mesh that return 1XX. +// - QRT_ENVOY_REQUEST_RATE_2XX: The ratio of requests in the mesh that return 2XX. +// - QRT_ENVOY_REQUEST_RATE_3XX: The ratio of requests in the mesh that return 3XX. +// - QRT_ENVOY_REQUEST_RATE_4XX: The ratio of requests in the mesh that return 4XX. +// - QRT_ENVOY_REQUEST_RATE_5XX: The ratio of requests in the mesh that return 5XX. +// - QRT_ENVOY_REQUEST_SUCCESS_RATE: The success rate of Envoy requests: 2XX / (2XX + 5XX). +// - QRT_ENVOY_CONNECTION_RATE: New Envoy connections per second. +// - QRT_ENVOY_TOTAL_ACTIVE_CONNECTIONS: The total count of active Envoy connections. +// - QRT_SERVERS_LATEST_HEARTBEAT: The latency of a leader contacting a follower. +// +// This is same as QRT_QRT_SERVERS_HEARTBEAT except it queries the +// consul_raft_leader_lastContact metric directly so will (likely) retrieve newer samples +// than are generated via QRT_QRT_SERVERS_HEARTBEAT's recording rule. +// - QRT_COLLECTOR_IS_DEPLOYED: Whether the cluster has a deployed Consul Telemetry Collector. It queries a metric that +// +// the collector emits about its own Prometheus receiver: https://opentelemetry.io/docs/collector/management/. +// We receive these metrics whether or not intentions are configured which is useful for the UI. The UI will show +// a "here's how to configure your intentions" snippet if we get collector resource metrics but no service metrics. +// This will return no data if no collector is deployed -- or the collector is deployed but unable to push metrics +// (eg its SP is bad/stale). +// - QRT_SERVERS_FOLLOWER_REPLICATION_MS: The P50 latency of Raft append log operations from the leader to followers. +// - QRT_SERVERS_REQUEST_RATE: The per second rate of requests to each server. +// - QRT_SERVERS_REQUEST_P50_MS: The P50 latencies of HTTP requests to the Consul servers. +// - QRT_SERVERS_REQUEST_P90_MS: The P90 latencies of HTTP requests to the Consul servers. +// - QRT_SERVERS_REQUEST_P95_MS: The P95 latencies of HTTP requests to the Consul servers. +// - QRT_SERVERS_REQUEST_SUCCESS_RATE: The rate of successful requests to all Consul servers in the cluster. +// - QRT_SERVERS_BLOCKING_QUERIES_TOTAL: The sum of blocking queries across all servers in the cluster. +// - QRT_SERVERS_RPC_CONNECTION_RATE: The rate of RPC connections to all the servers in the cluster. +// - QRT_SERVERS_GRPC_CONNECTION_RATE: The rate of gRPC connections to all the servers in the cluster. +// - QRT_SERVERS_XDS_STREAMS_TOTAL: The count of xDS streams active at a given time. +// - QRT_SERVERS_PEERINGS_TOTAL: The count of Consul cluster peerings active at a given time. +// - QRT_ENVOY_SERVICE_REQUEST_RATE: The per second rate of requests to a service. +// - QRT_ENVOY_SERVICE_REQUEST_TIMEOUT_RATE: The per second rate of requests to a service that time out. +// - QRT_ENVOY_SERVICE_HTTP_RESPONSE_1XX_RATE: The percentage rate of 1XX status response codes from the service. +// - QRT_ENVOY_SERVICE_HTTP_RESPONSE_2XX_RATE: The percentage rate of 2XX status response codes from the service. +// - QRT_ENVOY_SERVICE_HTTP_RESPONSE_3XX_RATE: The percentage rate of 3XX status response codes from the service. +// - QRT_ENVOY_SERVICE_HTTP_RESPONSE_4XX_RATE: The percentage rate of 4XX status response codes from the service. +// - QRT_ENVOY_SERVICE_HTTP_RESPONSE_5XX_RATE: The percentage rate of 5XX status response codes from the service. +// - QRT_ENVOY_SERVICE_REQUEST_P50_MS: The P50 request latency to a service. +// - QRT_ENVOY_SERVICE_REQUEST_RX_BYTES_RATE: The per second rate of bytes received by service. +// - QRT_ENVOY_SERVICE_REQUEST_TX_BYTES_RATE: The per second rate of bytes transmitted from service. +// - QRT_ENVOY_SERVICE_CONNECTIONS_TOTAL_RATE: The per second rate of connections to a service. +// - QRT_ENVOY_SERVICE_CONNECTIONS_SUCCESSFUL_RATE: The per second rate of successful connections to a service. +// - QRT_ENVOY_SERVICE_CONNECTIONS_FAILED_RATE: The per second rate of failed connections to a service. +// - QRT_ENVOY_SERVICE_CONNECTIONS_SUCCESS_PERCENTAGE_RATE: The percentage rate of successful connection requests to a service. // // swagger:model hashicorp.cloud.consul_telemetry_20230414.QRT type HashicorpCloudConsulTelemetry20230414QRT string @@ -155,6 +231,84 @@ const ( // HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSLATESTHEARTBEAT captures enum value "QRT_SERVERS_LATEST_HEARTBEAT" HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSLATESTHEARTBEAT HashicorpCloudConsulTelemetry20230414QRT = "QRT_SERVERS_LATEST_HEARTBEAT" + + // HashicorpCloudConsulTelemetry20230414QRTQRTCOLLECTORISDEPLOYED captures enum value "QRT_COLLECTOR_IS_DEPLOYED" + HashicorpCloudConsulTelemetry20230414QRTQRTCOLLECTORISDEPLOYED HashicorpCloudConsulTelemetry20230414QRT = "QRT_COLLECTOR_IS_DEPLOYED" + + // HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSFOLLOWERREPLICATIONMS captures enum value "QRT_SERVERS_FOLLOWER_REPLICATION_MS" + HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSFOLLOWERREPLICATIONMS HashicorpCloudConsulTelemetry20230414QRT = "QRT_SERVERS_FOLLOWER_REPLICATION_MS" + + // HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSREQUESTRATE captures enum value "QRT_SERVERS_REQUEST_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSREQUESTRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_SERVERS_REQUEST_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSREQUESTP50MS captures enum value "QRT_SERVERS_REQUEST_P50_MS" + HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSREQUESTP50MS HashicorpCloudConsulTelemetry20230414QRT = "QRT_SERVERS_REQUEST_P50_MS" + + // HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSREQUESTP90MS captures enum value "QRT_SERVERS_REQUEST_P90_MS" + HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSREQUESTP90MS HashicorpCloudConsulTelemetry20230414QRT = "QRT_SERVERS_REQUEST_P90_MS" + + // HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSREQUESTP95MS captures enum value "QRT_SERVERS_REQUEST_P95_MS" + HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSREQUESTP95MS HashicorpCloudConsulTelemetry20230414QRT = "QRT_SERVERS_REQUEST_P95_MS" + + // HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSREQUESTSUCCESSRATE captures enum value "QRT_SERVERS_REQUEST_SUCCESS_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSREQUESTSUCCESSRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_SERVERS_REQUEST_SUCCESS_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSBLOCKINGQUERIESTOTAL captures enum value "QRT_SERVERS_BLOCKING_QUERIES_TOTAL" + HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSBLOCKINGQUERIESTOTAL HashicorpCloudConsulTelemetry20230414QRT = "QRT_SERVERS_BLOCKING_QUERIES_TOTAL" + + // HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSRPCCONNECTIONRATE captures enum value "QRT_SERVERS_RPC_CONNECTION_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSRPCCONNECTIONRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_SERVERS_RPC_CONNECTION_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSGRPCCONNECTIONRATE captures enum value "QRT_SERVERS_GRPC_CONNECTION_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSGRPCCONNECTIONRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_SERVERS_GRPC_CONNECTION_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSXDSSTREAMSTOTAL captures enum value "QRT_SERVERS_XDS_STREAMS_TOTAL" + HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSXDSSTREAMSTOTAL HashicorpCloudConsulTelemetry20230414QRT = "QRT_SERVERS_XDS_STREAMS_TOTAL" + + // HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSPEERINGSTOTAL captures enum value "QRT_SERVERS_PEERINGS_TOTAL" + HashicorpCloudConsulTelemetry20230414QRTQRTSERVERSPEERINGSTOTAL HashicorpCloudConsulTelemetry20230414QRT = "QRT_SERVERS_PEERINGS_TOTAL" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEREQUESTRATE captures enum value "QRT_ENVOY_SERVICE_REQUEST_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEREQUESTRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_REQUEST_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEREQUESTTIMEOUTRATE captures enum value "QRT_ENVOY_SERVICE_REQUEST_TIMEOUT_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEREQUESTTIMEOUTRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_REQUEST_TIMEOUT_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEHTTPRESPONSE1XXRATE captures enum value "QRT_ENVOY_SERVICE_HTTP_RESPONSE_1XX_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEHTTPRESPONSE1XXRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_HTTP_RESPONSE_1XX_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEHTTPRESPONSE2XXRATE captures enum value "QRT_ENVOY_SERVICE_HTTP_RESPONSE_2XX_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEHTTPRESPONSE2XXRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_HTTP_RESPONSE_2XX_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEHTTPRESPONSE3XXRATE captures enum value "QRT_ENVOY_SERVICE_HTTP_RESPONSE_3XX_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEHTTPRESPONSE3XXRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_HTTP_RESPONSE_3XX_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEHTTPRESPONSE4XXRATE captures enum value "QRT_ENVOY_SERVICE_HTTP_RESPONSE_4XX_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEHTTPRESPONSE4XXRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_HTTP_RESPONSE_4XX_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEHTTPRESPONSE5XXRATE captures enum value "QRT_ENVOY_SERVICE_HTTP_RESPONSE_5XX_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEHTTPRESPONSE5XXRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_HTTP_RESPONSE_5XX_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEREQUESTP50MS captures enum value "QRT_ENVOY_SERVICE_REQUEST_P50_MS" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEREQUESTP50MS HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_REQUEST_P50_MS" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEREQUESTRXBYTESRATE captures enum value "QRT_ENVOY_SERVICE_REQUEST_RX_BYTES_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEREQUESTRXBYTESRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_REQUEST_RX_BYTES_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEREQUESTTXBYTESRATE captures enum value "QRT_ENVOY_SERVICE_REQUEST_TX_BYTES_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICEREQUESTTXBYTESRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_REQUEST_TX_BYTES_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICECONNECTIONSTOTALRATE captures enum value "QRT_ENVOY_SERVICE_CONNECTIONS_TOTAL_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICECONNECTIONSTOTALRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_CONNECTIONS_TOTAL_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICECONNECTIONSSUCCESSFULRATE captures enum value "QRT_ENVOY_SERVICE_CONNECTIONS_SUCCESSFUL_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICECONNECTIONSSUCCESSFULRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_CONNECTIONS_SUCCESSFUL_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICECONNECTIONSFAILEDRATE captures enum value "QRT_ENVOY_SERVICE_CONNECTIONS_FAILED_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICECONNECTIONSFAILEDRATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_CONNECTIONS_FAILED_RATE" + + // HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICECONNECTIONSSUCCESSPERCENTAGERATE captures enum value "QRT_ENVOY_SERVICE_CONNECTIONS_SUCCESS_PERCENTAGE_RATE" + HashicorpCloudConsulTelemetry20230414QRTQRTENVOYSERVICECONNECTIONSSUCCESSPERCENTAGERATE HashicorpCloudConsulTelemetry20230414QRT = "QRT_ENVOY_SERVICE_CONNECTIONS_SUCCESS_PERCENTAGE_RATE" ) // for schema @@ -162,7 +316,7 @@ var hashicorpCloudConsulTelemetry20230414QRTEnum []interface{} func init() { var res []HashicorpCloudConsulTelemetry20230414QRT - if err := json.Unmarshal([]byte(`["QRT_UNSPECIFIED","QRT_SERVERS_HEARTBEAT","QRT_SERVERS_LEADER_ELECTIONS","QRT_SERVERS_HAS_LEADER","QRT_SERVERS_MAX_HEARTBEAT","QRT_SERVERS_LEADER_WRITE_LOAD_HIGH","QRT_SERVERS_LEADER_WRITE_LOAD_MEDIAN","QRT_SERVERS_LEADER_WRITE_LOAD_LOW","QRT_SERVERS_LEADER_WRITE_LATENCY_HIGH","QRT_SERVERS_LEADER_WRITE_LATENCY_MEDIAN","QRT_SERVERS_LEADER_WRITE_LATENCY_LOW","QRT_SERVERS_MEMORY_UTILIZATION_HIGH","QRT_SERVERS_MEMORY_UTILIZATION_MEDIAN","QRT_SERVERS_MEMORY_UTILIZATION_LOW","QRT_SERVERS_CPU_UTILIZATION_HIGH","QRT_SERVERS_CPU_UTILIZATION_MEDIAN","QRT_SERVERS_CPU_UTILIZATION_LOW","QRT_SERVERS_IO_WAIT_TIME_HIGH","QRT_SERVERS_IO_WAIT_TIME_MEDIAN","QRT_SERVERS_IO_WAIT_TIME_LOW","QRT_SERVERS_TRANSACTIONS","QRT_SERVERS_LATENCY","QRT_SERVERS_FOLLOWER_REPLICATIONS","QRT_SERVERS_MEMORY_UTILIZATION","QRT_SERVERS_CPU_UTILIZATION","QRT_SERVERS_IO_WAIT_TIME","QRT_ENVOY_SERVER_PHYSICAL_MEMORY_TOTAL_CAPACITY","QRT_ENVOY_SERVER_STATES_LIVE","QRT_ENVOY_SERVER_STATES_PREINITIALIZING","QRT_ENVOY_SERVER_STATES_INITIALIZING","QRT_ENVOY_SERVER_STATES_DRAINING","QRT_ENVOY_PROXY_COUNT_CONNECTED","QRT_ENVOY_PROXY_COUNT_DISCONNECTED","QRT_ENVOY_REQUEST_RATE_1XX","QRT_ENVOY_REQUEST_RATE_2XX","QRT_ENVOY_REQUEST_RATE_3XX","QRT_ENVOY_REQUEST_RATE_4XX","QRT_ENVOY_REQUEST_RATE_5XX","QRT_ENVOY_REQUEST_SUCCESS_RATE","QRT_ENVOY_CONNECTION_RATE","QRT_ENVOY_TOTAL_ACTIVE_CONNECTIONS","QRT_SERVERS_LATEST_HEARTBEAT"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["QRT_UNSPECIFIED","QRT_SERVERS_HEARTBEAT","QRT_SERVERS_LEADER_ELECTIONS","QRT_SERVERS_HAS_LEADER","QRT_SERVERS_MAX_HEARTBEAT","QRT_SERVERS_LEADER_WRITE_LOAD_HIGH","QRT_SERVERS_LEADER_WRITE_LOAD_MEDIAN","QRT_SERVERS_LEADER_WRITE_LOAD_LOW","QRT_SERVERS_LEADER_WRITE_LATENCY_HIGH","QRT_SERVERS_LEADER_WRITE_LATENCY_MEDIAN","QRT_SERVERS_LEADER_WRITE_LATENCY_LOW","QRT_SERVERS_MEMORY_UTILIZATION_HIGH","QRT_SERVERS_MEMORY_UTILIZATION_MEDIAN","QRT_SERVERS_MEMORY_UTILIZATION_LOW","QRT_SERVERS_CPU_UTILIZATION_HIGH","QRT_SERVERS_CPU_UTILIZATION_MEDIAN","QRT_SERVERS_CPU_UTILIZATION_LOW","QRT_SERVERS_IO_WAIT_TIME_HIGH","QRT_SERVERS_IO_WAIT_TIME_MEDIAN","QRT_SERVERS_IO_WAIT_TIME_LOW","QRT_SERVERS_TRANSACTIONS","QRT_SERVERS_LATENCY","QRT_SERVERS_FOLLOWER_REPLICATIONS","QRT_SERVERS_MEMORY_UTILIZATION","QRT_SERVERS_CPU_UTILIZATION","QRT_SERVERS_IO_WAIT_TIME","QRT_ENVOY_SERVER_PHYSICAL_MEMORY_TOTAL_CAPACITY","QRT_ENVOY_SERVER_STATES_LIVE","QRT_ENVOY_SERVER_STATES_PREINITIALIZING","QRT_ENVOY_SERVER_STATES_INITIALIZING","QRT_ENVOY_SERVER_STATES_DRAINING","QRT_ENVOY_PROXY_COUNT_CONNECTED","QRT_ENVOY_PROXY_COUNT_DISCONNECTED","QRT_ENVOY_REQUEST_RATE_1XX","QRT_ENVOY_REQUEST_RATE_2XX","QRT_ENVOY_REQUEST_RATE_3XX","QRT_ENVOY_REQUEST_RATE_4XX","QRT_ENVOY_REQUEST_RATE_5XX","QRT_ENVOY_REQUEST_SUCCESS_RATE","QRT_ENVOY_CONNECTION_RATE","QRT_ENVOY_TOTAL_ACTIVE_CONNECTIONS","QRT_SERVERS_LATEST_HEARTBEAT","QRT_COLLECTOR_IS_DEPLOYED","QRT_SERVERS_FOLLOWER_REPLICATION_MS","QRT_SERVERS_REQUEST_RATE","QRT_SERVERS_REQUEST_P50_MS","QRT_SERVERS_REQUEST_P90_MS","QRT_SERVERS_REQUEST_P95_MS","QRT_SERVERS_REQUEST_SUCCESS_RATE","QRT_SERVERS_BLOCKING_QUERIES_TOTAL","QRT_SERVERS_RPC_CONNECTION_RATE","QRT_SERVERS_GRPC_CONNECTION_RATE","QRT_SERVERS_XDS_STREAMS_TOTAL","QRT_SERVERS_PEERINGS_TOTAL","QRT_ENVOY_SERVICE_REQUEST_RATE","QRT_ENVOY_SERVICE_REQUEST_TIMEOUT_RATE","QRT_ENVOY_SERVICE_HTTP_RESPONSE_1XX_RATE","QRT_ENVOY_SERVICE_HTTP_RESPONSE_2XX_RATE","QRT_ENVOY_SERVICE_HTTP_RESPONSE_3XX_RATE","QRT_ENVOY_SERVICE_HTTP_RESPONSE_4XX_RATE","QRT_ENVOY_SERVICE_HTTP_RESPONSE_5XX_RATE","QRT_ENVOY_SERVICE_REQUEST_P50_MS","QRT_ENVOY_SERVICE_REQUEST_RX_BYTES_RATE","QRT_ENVOY_SERVICE_REQUEST_TX_BYTES_RATE","QRT_ENVOY_SERVICE_CONNECTIONS_TOTAL_RATE","QRT_ENVOY_SERVICE_CONNECTIONS_SUCCESSFUL_RATE","QRT_ENVOY_SERVICE_CONNECTIONS_FAILED_RATE","QRT_ENVOY_SERVICE_CONNECTIONS_SUCCESS_PERCENTAGE_RATE"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_query_range_response.go b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_query_range_response.go deleted file mode 100644 index cf5ea467..00000000 --- a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_query_range_response.go +++ /dev/null @@ -1,116 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HashicorpCloudConsulTelemetry20230414QueryRangeResponse QueryRangeResponse -// -// swagger:model hashicorp.cloud.consul_telemetry_20230414.QueryRangeResponse -type HashicorpCloudConsulTelemetry20230414QueryRangeResponse struct { - - // result - Result []*HashicorpCloudConsulTelemetry20230414MetricMatrix `json:"result"` -} - -// Validate validates this hashicorp cloud consul telemetry 20230414 query range response -func (m *HashicorpCloudConsulTelemetry20230414QueryRangeResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResult(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HashicorpCloudConsulTelemetry20230414QueryRangeResponse) validateResult(formats strfmt.Registry) error { - if swag.IsZero(m.Result) { // not required - return nil - } - - for i := 0; i < len(m.Result); i++ { - if swag.IsZero(m.Result[i]) { // not required - continue - } - - if m.Result[i] != nil { - if err := m.Result[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("result" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("result" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this hashicorp cloud consul telemetry 20230414 query range response based on the context it is used -func (m *HashicorpCloudConsulTelemetry20230414QueryRangeResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateResult(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HashicorpCloudConsulTelemetry20230414QueryRangeResponse) contextValidateResult(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Result); i++ { - - if m.Result[i] != nil { - if err := m.Result[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("result" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("result" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HashicorpCloudConsulTelemetry20230414QueryRangeResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HashicorpCloudConsulTelemetry20230414QueryRangeResponse) UnmarshalBinary(b []byte) error { - var res HashicorpCloudConsulTelemetry20230414QueryRangeResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_refresh_config.go b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_refresh_config.go new file mode 100644 index 00000000..4bc6babe --- /dev/null +++ b/clients/cloud-consul-telemetry-gateway/preview/2023-04-14/models/hashicorp_cloud_consul_telemetry20230414_refresh_config.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// HashicorpCloudConsulTelemetry20230414RefreshConfig hashicorp cloud consul telemetry 20230414 refresh config +// +// swagger:model hashicorp.cloud.consul_telemetry_20230414.RefreshConfig +type HashicorpCloudConsulTelemetry20230414RefreshConfig struct { + + // refresh interval + RefreshInterval string `json:"refresh_interval,omitempty"` +} + +// Validate validates this hashicorp cloud consul telemetry 20230414 refresh config +func (m *HashicorpCloudConsulTelemetry20230414RefreshConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this hashicorp cloud consul telemetry 20230414 refresh config based on context it is used +func (m *HashicorpCloudConsulTelemetry20230414RefreshConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *HashicorpCloudConsulTelemetry20230414RefreshConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *HashicorpCloudConsulTelemetry20230414RefreshConfig) UnmarshalBinary(b []byte) error { + var res HashicorpCloudConsulTelemetry20230414RefreshConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +}