alertconfig

package
v1.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package alertconfig provides primitives to interact with the openapi HTTP API.

Code generated by github.com/do87/stackit-client-generator version v0.0.3 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "bearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func NewListRequest

func NewListRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)

NewListRequest generates requests for List

func NewReceiversCreateRequest

func NewReceiversCreateRequest(ctx context.Context, server string, projectID string, instanceID string, body ReceiversCreateJSONRequestBody) (*http.Request, error)

NewReceiversCreateRequest calls the generic ReceiversCreate builder with application/json body

func NewReceiversCreateRequestWithBody

func NewReceiversCreateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, contentType string, body io.Reader) (*http.Request, error)

NewReceiversCreateRequestWithBody generates requests for ReceiversCreate with any type of body

func NewReceiversDeleteRequest

func NewReceiversDeleteRequest(ctx context.Context, server string, projectID string, instanceID string, receiver string) (*http.Request, error)

NewReceiversDeleteRequest generates requests for ReceiversDelete

func NewReceiversListRequest

func NewReceiversListRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)

NewReceiversListRequest generates requests for ReceiversList

func NewReceiversReadRequest

func NewReceiversReadRequest(ctx context.Context, server string, projectID string, instanceID string, receiver string) (*http.Request, error)

NewReceiversReadRequest generates requests for ReceiversRead

func NewReceiversUpdateRequest

func NewReceiversUpdateRequest(ctx context.Context, server string, projectID string, instanceID string, receiver string, body ReceiversUpdateJSONRequestBody) (*http.Request, error)

NewReceiversUpdateRequest calls the generic ReceiversUpdate builder with application/json body

func NewReceiversUpdateRequestWithBody

func NewReceiversUpdateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, receiver string, contentType string, body io.Reader) (*http.Request, error)

NewReceiversUpdateRequestWithBody generates requests for ReceiversUpdate with any type of body

func NewRoutesCreateRequest

func NewRoutesCreateRequest(ctx context.Context, server string, projectID string, instanceID string, body RoutesCreateJSONRequestBody) (*http.Request, error)

NewRoutesCreateRequest calls the generic RoutesCreate builder with application/json body

func NewRoutesCreateRequestWithBody

func NewRoutesCreateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, contentType string, body io.Reader) (*http.Request, error)

NewRoutesCreateRequestWithBody generates requests for RoutesCreate with any type of body

func NewRoutesDeleteRequest

func NewRoutesDeleteRequest(ctx context.Context, server string, projectID string, instanceID string, receiver string) (*http.Request, error)

NewRoutesDeleteRequest generates requests for RoutesDelete

func NewRoutesListRequest

func NewRoutesListRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)

NewRoutesListRequest generates requests for RoutesList

func NewRoutesReadRequest

func NewRoutesReadRequest(ctx context.Context, server string, projectID string, instanceID string, receiver string) (*http.Request, error)

NewRoutesReadRequest generates requests for RoutesRead

func NewRoutesUpdateRequest

func NewRoutesUpdateRequest(ctx context.Context, server string, projectID string, instanceID string, receiver string, body RoutesUpdateJSONRequestBody) (*http.Request, error)

NewRoutesUpdateRequest calls the generic RoutesUpdate builder with application/json body

func NewRoutesUpdateRequestWithBody

func NewRoutesUpdateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, receiver string, contentType string, body io.Reader) (*http.Request, error)

NewRoutesUpdateRequestWithBody generates requests for RoutesUpdate with any type of body

func NewUpdateRequest

func NewUpdateRequest(ctx context.Context, server string, projectID string, instanceID string, body UpdateJSONRequestBody) (*http.Request, error)

NewUpdateRequest calls the generic Update builder with application/json body

func NewUpdateRequestWithBody

func NewUpdateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateRequestWithBody generates requests for Update with any type of body

Types

type Alert

type Alert struct {
	Global       *Global         `json:"global,omitempty"`
	InhibitRules *[]InhibitRules `json:"inhibitRules,omitempty"`
	Receivers    []Receivers     `json:"receivers"`
	Route        Route           `json:"route"`
}

Alert defines model for Alert.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client contracts.BaseClientInterface
}

Client which conforms to the OpenAPI3 specification for this service.

func NewRawClient

func NewRawClient(server string, httpClient contracts.BaseClientInterface) *Client

NewRawClient Creates a new Client, with reasonable defaults

func (*Client) ListRaw

func (c *Client) ListRaw(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversCreateRaw

func (c *Client) ReceiversCreateRaw(ctx context.Context, projectID string, instanceID string, body ReceiversCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversCreateRawWithBody

func (c *Client) ReceiversCreateRawWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversDeleteRaw

func (c *Client) ReceiversDeleteRaw(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversListRaw

func (c *Client) ReceiversListRaw(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversReadRaw

func (c *Client) ReceiversReadRaw(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversUpdateRaw

func (c *Client) ReceiversUpdateRaw(ctx context.Context, projectID string, instanceID string, receiver string, body ReceiversUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversUpdateRawWithBody

func (c *Client) ReceiversUpdateRawWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesCreateRaw

func (c *Client) RoutesCreateRaw(ctx context.Context, projectID string, instanceID string, body RoutesCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesCreateRawWithBody

func (c *Client) RoutesCreateRawWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesDeleteRaw

func (c *Client) RoutesDeleteRaw(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesListRaw

func (c *Client) RoutesListRaw(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesReadRaw

func (c *Client) RoutesReadRaw(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesUpdateRaw

func (c *Client) RoutesUpdateRaw(ctx context.Context, projectID string, instanceID string, receiver string, body RoutesUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesUpdateRawWithBody

func (c *Client) RoutesUpdateRawWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateRaw

func (c *Client) UpdateRaw(ctx context.Context, projectID string, instanceID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateRawWithBody

func (c *Client) UpdateRawWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientWithResponses

type ClientWithResponses struct {
	// contains filtered or unexported fields
}

ClientWithResponses builds on rawClientInterface to offer response payloads

func NewClient

func NewClient(server string, httpClient contracts.BaseClientInterface) *ClientWithResponses

NewClient creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) List

func (c *ClientWithResponses) List(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ListResponse, error)

List request returning *ListResponse

func (*ClientWithResponses) ParseListResponse

func (c *ClientWithResponses) ParseListResponse(rsp *http.Response) (*ListResponse, error)

ParseListResponse parses an HTTP response from a List call

func (*ClientWithResponses) ParseReceiversCreateResponse

func (c *ClientWithResponses) ParseReceiversCreateResponse(rsp *http.Response) (*ReceiversCreateResponse, error)

ParseReceiversCreateResponse parses an HTTP response from a ReceiversCreate call

func (*ClientWithResponses) ParseReceiversDeleteResponse

func (c *ClientWithResponses) ParseReceiversDeleteResponse(rsp *http.Response) (*ReceiversDeleteResponse, error)

ParseReceiversDeleteResponse parses an HTTP response from a ReceiversDelete call

func (*ClientWithResponses) ParseReceiversListResponse

func (c *ClientWithResponses) ParseReceiversListResponse(rsp *http.Response) (*ReceiversListResponse, error)

ParseReceiversListResponse parses an HTTP response from a ReceiversList call

func (*ClientWithResponses) ParseReceiversReadResponse

func (c *ClientWithResponses) ParseReceiversReadResponse(rsp *http.Response) (*ReceiversReadResponse, error)

ParseReceiversReadResponse parses an HTTP response from a ReceiversRead call

func (*ClientWithResponses) ParseReceiversUpdateResponse

func (c *ClientWithResponses) ParseReceiversUpdateResponse(rsp *http.Response) (*ReceiversUpdateResponse, error)

ParseReceiversUpdateResponse parses an HTTP response from a ReceiversUpdate call

func (*ClientWithResponses) ParseRoutesCreateResponse

func (c *ClientWithResponses) ParseRoutesCreateResponse(rsp *http.Response) (*RoutesCreateResponse, error)

ParseRoutesCreateResponse parses an HTTP response from a RoutesCreate call

func (*ClientWithResponses) ParseRoutesDeleteResponse

func (c *ClientWithResponses) ParseRoutesDeleteResponse(rsp *http.Response) (*RoutesDeleteResponse, error)

ParseRoutesDeleteResponse parses an HTTP response from a RoutesDelete call

func (*ClientWithResponses) ParseRoutesListResponse

func (c *ClientWithResponses) ParseRoutesListResponse(rsp *http.Response) (*RoutesListResponse, error)

ParseRoutesListResponse parses an HTTP response from a RoutesList call

func (*ClientWithResponses) ParseRoutesReadResponse

func (c *ClientWithResponses) ParseRoutesReadResponse(rsp *http.Response) (*RoutesReadResponse, error)

ParseRoutesReadResponse parses an HTTP response from a RoutesRead call

func (*ClientWithResponses) ParseRoutesUpdateResponse

func (c *ClientWithResponses) ParseRoutesUpdateResponse(rsp *http.Response) (*RoutesUpdateResponse, error)

ParseRoutesUpdateResponse parses an HTTP response from a RoutesUpdate call

func (*ClientWithResponses) ParseUpdateResponse

func (c *ClientWithResponses) ParseUpdateResponse(rsp *http.Response) (*UpdateResponse, error)

ParseUpdateResponse parses an HTTP response from a Update call

func (*ClientWithResponses) ReceiversCreate

func (c *ClientWithResponses) ReceiversCreate(ctx context.Context, projectID string, instanceID string, body ReceiversCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiversCreateResponse, error)

func (*ClientWithResponses) ReceiversCreateWithBody

func (c *ClientWithResponses) ReceiversCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiversCreateResponse, error)

ReceiversCreateWithBody request with arbitrary body returning *ReceiversCreateResponse

func (*ClientWithResponses) ReceiversDelete

func (c *ClientWithResponses) ReceiversDelete(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*ReceiversDeleteResponse, error)

ReceiversDelete request returning *ReceiversDeleteResponse

func (*ClientWithResponses) ReceiversList

func (c *ClientWithResponses) ReceiversList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ReceiversListResponse, error)

ReceiversList request returning *ReceiversListResponse

func (*ClientWithResponses) ReceiversRead

func (c *ClientWithResponses) ReceiversRead(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*ReceiversReadResponse, error)

ReceiversRead request returning *ReceiversReadResponse

func (*ClientWithResponses) ReceiversUpdate

func (c *ClientWithResponses) ReceiversUpdate(ctx context.Context, projectID string, instanceID string, receiver string, body ReceiversUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiversUpdateResponse, error)

func (*ClientWithResponses) ReceiversUpdateWithBody

func (c *ClientWithResponses) ReceiversUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiversUpdateResponse, error)

ReceiversUpdateWithBody request with arbitrary body returning *ReceiversUpdateResponse

func (*ClientWithResponses) RoutesCreate

func (c *ClientWithResponses) RoutesCreate(ctx context.Context, projectID string, instanceID string, body RoutesCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*RoutesCreateResponse, error)

func (*ClientWithResponses) RoutesCreateWithBody

func (c *ClientWithResponses) RoutesCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RoutesCreateResponse, error)

RoutesCreateWithBody request with arbitrary body returning *RoutesCreateResponse

func (*ClientWithResponses) RoutesDelete

func (c *ClientWithResponses) RoutesDelete(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*RoutesDeleteResponse, error)

RoutesDelete request returning *RoutesDeleteResponse

func (*ClientWithResponses) RoutesList

func (c *ClientWithResponses) RoutesList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*RoutesListResponse, error)

RoutesList request returning *RoutesListResponse

func (*ClientWithResponses) RoutesRead

func (c *ClientWithResponses) RoutesRead(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*RoutesReadResponse, error)

RoutesRead request returning *RoutesReadResponse

func (*ClientWithResponses) RoutesUpdate

func (c *ClientWithResponses) RoutesUpdate(ctx context.Context, projectID string, instanceID string, receiver string, body RoutesUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*RoutesUpdateResponse, error)

func (*ClientWithResponses) RoutesUpdateWithBody

func (c *ClientWithResponses) RoutesUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RoutesUpdateResponse, error)

RoutesUpdateWithBody request with arbitrary body returning *RoutesUpdateResponse

func (*ClientWithResponses) Update

func (c *ClientWithResponses) Update(ctx context.Context, projectID string, instanceID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateResponse, error)

func (*ClientWithResponses) UpdateWithBody

func (c *ClientWithResponses) UpdateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateResponse, error)

UpdateWithBody request with arbitrary body returning *UpdateResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// List request
	List(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ListResponse, error)

	// Update request with any body
	UpdateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateResponse, error)

	Update(ctx context.Context, projectID string, instanceID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateResponse, error)

	// ReceiversList request
	ReceiversList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ReceiversListResponse, error)

	// ReceiversCreate request with any body
	ReceiversCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiversCreateResponse, error)

	ReceiversCreate(ctx context.Context, projectID string, instanceID string, body ReceiversCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiversCreateResponse, error)

	// ReceiversDelete request
	ReceiversDelete(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*ReceiversDeleteResponse, error)

	// ReceiversRead request
	ReceiversRead(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*ReceiversReadResponse, error)

	// ReceiversUpdate request with any body
	ReceiversUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiversUpdateResponse, error)

	ReceiversUpdate(ctx context.Context, projectID string, instanceID string, receiver string, body ReceiversUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiversUpdateResponse, error)

	// RoutesList request
	RoutesList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*RoutesListResponse, error)

	// RoutesCreate request with any body
	RoutesCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RoutesCreateResponse, error)

	RoutesCreate(ctx context.Context, projectID string, instanceID string, body RoutesCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*RoutesCreateResponse, error)

	// RoutesDelete request
	RoutesDelete(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*RoutesDeleteResponse, error)

	// RoutesRead request
	RoutesRead(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*RoutesReadResponse, error)

	// RoutesUpdate request with any body
	RoutesUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RoutesUpdateResponse, error)

	RoutesUpdate(ctx context.Context, projectID string, instanceID string, receiver string, body RoutesUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*RoutesUpdateResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type EmailConfig

type EmailConfig struct {
	AuthIdentity *openapiTypes.Email `json:"authIdentity,omitempty"`
	AuthPassword *string             `json:"authPassword,omitempty"`
	AuthUsername *string             `json:"authUsername,omitempty"`
	From         *openapiTypes.Email `json:"from,omitempty"`
	SendResolved *bool               `json:"sendResolved,omitempty"`
	Smarthost    *string             `json:"smarthost,omitempty"`
	To           openapiTypes.Email  `json:"to"`
}

EmailConfig defines model for EmailConfig.

type Error

type Error struct {
	Errors  *[]map[string]string `json:"errors,omitempty"`
	Message string               `json:"message"`
}

Error defines model for Error.

type GetAlert

type GetAlert struct {
	Data    Alert  `json:"data"`
	Message string `json:"message"`
}

GetAlert defines model for GetAlert.

type Global

type Global struct {
	OpsgenieAPIKey   *string             `json:"opsgenieApiKey,omitempty"`
	OpsgenieAPIURL   *string             `json:"opsgenieApiUrl,omitempty"`
	ResolveTimeout   *string             `json:"resolveTimeout,omitempty"`
	SmtpAuthIdentity *openapiTypes.Email `json:"smtpAuthIdentity,omitempty"`
	SmtpAuthPassword *string             `json:"smtpAuthPassword,omitempty"`
	SmtpAuthUsername *string             `json:"smtpAuthUsername,omitempty"`
	SmtpFrom         *openapiTypes.Email `json:"smtpFrom,omitempty"`
	SmtpSmarthost    *string             `json:"smtpSmarthost,omitempty"`
}

Global defines model for Global.

type InhibitRules

type InhibitRules struct {
	Equal          *[]string          `json:"equal,omitempty"`
	SourceMatch    *map[string]string `json:"sourceMatch,omitempty"`
	SourceMatchRe  *map[string]string `json:"sourceMatchRe,omitempty"`
	SourceMatchers *[]string          `json:"sourceMatchers,omitempty"`
	TargetMatch    *map[string]string `json:"targetMatch,omitempty"`
	TargetMatchRe  *map[string]string `json:"targetMatchRe,omitempty"`
	TargetMatchers *[]string          `json:"targetMatchers,omitempty"`
}

InhibitRules defines model for InhibitRules.

type ListResponse

type ListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetAlert
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (ListResponse) Status

func (r ListResponse) Status() string

Status returns HTTPResponse.Status

func (ListResponse) StatusCode

func (r ListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Message

type Message struct {
	Message string `json:"message"`
}

Message defines model for Message.

type OpsgenieConfig

type OpsgenieConfig struct {
	APIKey       *string `json:"apiKey,omitempty"`
	APIURL       *string `json:"apiUrl,omitempty"`
	Priority     *string `json:"priority,omitempty"`
	SendResolved *bool   `json:"sendResolved,omitempty"`
	Tags         *string `json:"tags,omitempty"`
}

OpsgenieConfig defines model for OpsgenieConfig.

type PermissionDenied

type PermissionDenied struct {
	Detail string `json:"detail"`
}

PermissionDenied defines model for PermissionDenied.

type PutAlert

type PutAlert struct {
	Data    Alert  `json:"data"`
	Message string `json:"message"`
}

PutAlert defines model for PutAlert.

type Receivers

type Receivers struct {
	EmailConfigs    *[]EmailConfig    `json:"emailConfigs,omitempty"`
	Name            string            `json:"name"`
	OpsgenieConfigs *[]OpsgenieConfig `json:"opsgenieConfigs,omitempty"`
	WebHookConfigs  *[]WebHook        `json:"webHookConfigs,omitempty"`
}

Receivers defines model for Receivers.

type ReceiversCreateJSONBody

type ReceiversCreateJSONBody struct {
	// EmailConfigs Email configurations
	EmailConfigs *[]struct {
		// AuthIdentity SMTP authentication information.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		AuthIdentity *string `json:"authIdentity,omitempty"`

		// AuthPassword SMTP authentication information.
		AuthPassword *string `json:"authPassword,omitempty"`

		// AuthUsername SMTP authentication information.
		AuthUsername *string `json:"authUsername,omitempty"`

		// From The sender address.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		From *string `json:"from,omitempty"`

		// Smarthost The SMTP host through which emails are sent.
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9_./@&?:-
		Smarthost *string `json:"smarthost,omitempty"`

		// To The email address to send notifications to.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		To *string `json:"to,omitempty"`
	} `json:"emailConfigs,omitempty"`

	// Name `Additional Validators:`
	// * must be unique
	// * should only include the characters: a-zA-Z0-9-
	Name string `json:"name"`

	// OpsgenieConfigs Configuration for ops genie.
	OpsgenieConfigs *[]struct {
		// ApiKey The API key to use when talking to the OpsGenie API.
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9-
		APIKey *string `json:"apiKey,omitempty"`

		// ApiUrl The host to send OpsGenie API requests to.
		// `Additional Validators:`
		// * must be a syntactically valid url address
		APIURL *string `json:"apiUrl,omitempty"`

		// Tags Comma separated list of tags attached to the notifications.
		Tags *string `json:"tags,omitempty"`
	} `json:"opsgenieConfigs,omitempty"`
	WebHookConfigs *[]struct {
		// MsTeams Microsoft Teams webhooks require special handling. If you set this property to true, it is treated as such
		MsTeams *bool `json:"msTeams,omitempty"`

		// Url The endpoint to send HTTP POST requests to.
		// `Additional Validators:`
		// * must be a syntactically valid url address
		URL *string `json:"url,omitempty"`
	} `json:"webHookConfigs,omitempty"`
}

ReceiversCreateJSONBody defines parameters for ReceiversCreate.

type ReceiversCreateJSONRequestBody

type ReceiversCreateJSONRequestBody ReceiversCreateJSONBody

ReceiversCreateJSONRequestBody defines body for ReceiversCreate for application/json ContentType.

type ReceiversCreateResponse

type ReceiversCreateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *ReceiversResponse
	JSON400      *Error
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (ReceiversCreateResponse) Status

func (r ReceiversCreateResponse) Status() string

Status returns HTTPResponse.Status

func (ReceiversCreateResponse) StatusCode

func (r ReceiversCreateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ReceiversDeleteResponse

type ReceiversDeleteResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *ReceiversResponse
	JSON403      *PermissionDenied
	JSON404      *Message
	Error        error // Aggregated error
}

func (ReceiversDeleteResponse) Status

func (r ReceiversDeleteResponse) Status() string

Status returns HTTPResponse.Status

func (ReceiversDeleteResponse) StatusCode

func (r ReceiversDeleteResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ReceiversListResponse

type ReceiversListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ReceiversResponse
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (ReceiversListResponse) Status

func (r ReceiversListResponse) Status() string

Status returns HTTPResponse.Status

func (ReceiversListResponse) StatusCode

func (r ReceiversListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ReceiversReadResponse

type ReceiversReadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ReceiversResponseSerializerSingle
	JSON403      *PermissionDenied
	JSON404      *Message
	Error        error // Aggregated error
}

func (ReceiversReadResponse) Status

func (r ReceiversReadResponse) Status() string

Status returns HTTPResponse.Status

func (ReceiversReadResponse) StatusCode

func (r ReceiversReadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ReceiversResponse

type ReceiversResponse struct {
	Data    []Receivers `json:"data"`
	Message string      `json:"message"`
}

ReceiversResponse defines model for ReceiversResponse.

type ReceiversResponseSerializerSingle

type ReceiversResponseSerializerSingle struct {
	Data    Receivers `json:"data"`
	Message string    `json:"message"`
}

ReceiversResponseSerializerSingle defines model for ReceiversResponseSerializerSingle.

type ReceiversUpdateJSONBody

type ReceiversUpdateJSONBody struct {
	// EmailConfigs Email configurations
	EmailConfigs *[]struct {
		// AuthIdentity SMTP authentication information.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		AuthIdentity *string `json:"authIdentity,omitempty"`

		// AuthPassword SMTP authentication information.
		AuthPassword *string `json:"authPassword,omitempty"`

		// AuthUsername SMTP authentication information.
		AuthUsername *string `json:"authUsername,omitempty"`

		// From The sender address.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		From *string `json:"from,omitempty"`

		// Smarthost The SMTP host through which emails are sent.
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9_./@&?:-
		Smarthost *string `json:"smarthost,omitempty"`

		// To The email address to send notifications to.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		To *string `json:"to,omitempty"`
	} `json:"emailConfigs,omitempty"`

	// Name `Additional Validators:`
	// * must be unique
	// * should only include the characters: a-zA-Z0-9-
	Name string `json:"name"`

	// OpsgenieConfigs Configuration for ops genie.
	OpsgenieConfigs *[]struct {
		// ApiKey The API key to use when talking to the OpsGenie API.
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9-
		APIKey *string `json:"apiKey,omitempty"`

		// ApiUrl The host to send OpsGenie API requests to.
		// `Additional Validators:`
		// * must be a syntactically valid url address
		APIURL *string `json:"apiUrl,omitempty"`

		// Tags Comma separated list of tags attached to the notifications.
		Tags *string `json:"tags,omitempty"`
	} `json:"opsgenieConfigs,omitempty"`
	WebHookConfigs *[]struct {
		// MsTeams Microsoft Teams webhooks require special handling. If you set this property to true, it is treated as such
		MsTeams *bool `json:"msTeams,omitempty"`

		// Url The endpoint to send HTTP POST requests to.
		// `Additional Validators:`
		// * must be a syntactically valid url address
		URL *string `json:"url,omitempty"`
	} `json:"webHookConfigs,omitempty"`
}

ReceiversUpdateJSONBody defines parameters for ReceiversUpdate.

type ReceiversUpdateJSONRequestBody

type ReceiversUpdateJSONRequestBody ReceiversUpdateJSONBody

ReceiversUpdateJSONRequestBody defines body for ReceiversUpdate for application/json ContentType.

type ReceiversUpdateResponse

type ReceiversUpdateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *ReceiversResponse
	JSON400      *Error
	JSON403      *PermissionDenied
	JSON404      *Message
	Error        error // Aggregated error
}

func (ReceiversUpdateResponse) Status

func (r ReceiversUpdateResponse) Status() string

Status returns HTTPResponse.Status

func (ReceiversUpdateResponse) StatusCode

func (r ReceiversUpdateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type Route

type Route struct {
	Continue       *bool               `json:"continue,omitempty"`
	GroupBy        *[]string           `json:"groupBy,omitempty"`
	GroupInterval  *string             `json:"groupInterval,omitempty"`
	GroupWait      *string             `json:"groupWait,omitempty"`
	Match          *map[string]string  `json:"match,omitempty"`
	MatchRe        *map[string]string  `json:"matchRe,omitempty"`
	Receiver       string              `json:"receiver"`
	RepeatInterval *string             `json:"repeatInterval,omitempty"`
	Routes         *[]RouteSerializer2 `json:"routes,omitempty"`
}

Route defines model for Route.

type RouteResponse

type RouteResponse struct {
	Data    Route  `json:"data"`
	Message string `json:"message"`
}

RouteResponse defines model for RouteResponse.

type RouteSerializer2

type RouteSerializer2 struct {
	Continue       *bool                `json:"continue,omitempty"`
	GroupBy        *[]string            `json:"groupBy,omitempty"`
	GroupInterval  *string              `json:"groupInterval,omitempty"`
	GroupWait      *string              `json:"groupWait,omitempty"`
	Match          *map[string]string   `json:"match,omitempty"`
	MatchRe        *map[string]string   `json:"matchRe,omitempty"`
	Matchers       *[]string            `json:"matchers,omitempty"`
	Receiver       string               `json:"receiver"`
	RepeatInterval *string              `json:"repeatInterval,omitempty"`
	Routes         *[]map[string]string `json:"routes,omitempty"`
}

RouteSerializer2 defines model for RouteSerializer2.

type RoutesCreateJSONBody

type RoutesCreateJSONBody struct {
	// GroupBy The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.
	GroupBy *[]string `json:"groupBy,omitempty"`

	// GroupInterval How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)
	// `Additional Validators:`
	// * must be a valid time format
	GroupInterval *string `json:"groupInterval,omitempty"`

	// GroupWait How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)
	// `Additional Validators:`
	// * must be a valid time format
	GroupWait *string `json:"groupWait,omitempty"`

	// Match map of key:value. A set of equality matchers an alert has to fulfill to match the node.
	// `Additional Validators:`
	// * should not contain more than 5 keys
	// * each key and value should not be longer than 200 characters
	// * key and values should only include the characters: a-zA-Z0-9_./@&?:-
	Match *map[string]interface{} `json:"match,omitempty"`

	// MatchRe map of key:value. A set of regex-matchers an alert has to fulfill to match the node.
	// `Additional Validators:`
	// * should not contain more than 5 keys
	// * each key and value should not be longer than 200 characters
	MatchRe *map[string]interface{} `json:"matchRe,omitempty"`

	// Matchers A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics. The syntax of a matcher consists of three tokens:
	// * A valid Prometheus label name.
	// * One of =, !=, =~, or !~. = means equals, != means that the strings are not equal, =~ is used for equality of regex expressions and !~ is used for un-equality of regex expressions. They have the same meaning as known from PromQL selectors.
	// * A UTF-8 string, which may be enclosed in double quotes. Before or after each token, there may be any amount of whitespace.
	// `Additional Validators:`
	// * should not contain more than 5 keys
	// * each key and value should not be longer than 200 characters
	Matchers *[]string `json:"matchers,omitempty"`

	// Receiver Receiver that should be one item of receivers
	// `Additional Validators:`
	// * must be a in name of receivers
	Receiver string `json:"receiver"`

	// RepeatInterval How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more).
	// `Additional Validators:`
	// * must be a valid time format
	RepeatInterval *string `json:"repeatInterval,omitempty"`

	// Routes Zero or more child routes.
	Routes *[]struct {
		GroupBy *[]string `json:"groupBy,omitempty"`

		// GroupInterval As in one level above
		GroupInterval *string `json:"groupInterval,omitempty"`

		// GroupWait As in one level above
		GroupWait *string `json:"groupWait,omitempty"`

		// Match As in one level above
		Match *map[string]interface{} `json:"match,omitempty"`

		// MatchRe As in one level above
		MatchRe *map[string]interface{} `json:"matchRe,omitempty"`

		// Receiver As in one level above
		Receiver *string `json:"receiver,omitempty"`

		// RepeatInterval As in one level above
		RepeatInterval *string `json:"repeatInterval,omitempty"`

		// Routes Another child routes
		Routes *[]map[string]interface{} `json:"routes,omitempty"`
	} `json:"routes,omitempty"`
}

RoutesCreateJSONBody defines parameters for RoutesCreate.

type RoutesCreateJSONRequestBody

type RoutesCreateJSONRequestBody RoutesCreateJSONBody

RoutesCreateJSONRequestBody defines body for RoutesCreate for application/json ContentType.

type RoutesCreateResponse

type RoutesCreateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *RouteResponse
	JSON400      *Error
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (RoutesCreateResponse) Status

func (r RoutesCreateResponse) Status() string

Status returns HTTPResponse.Status

func (RoutesCreateResponse) StatusCode

func (r RoutesCreateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RoutesDeleteResponse

type RoutesDeleteResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *RouteResponse
	JSON403      *PermissionDenied
	JSON404      *Message
	Error        error // Aggregated error
}

func (RoutesDeleteResponse) Status

func (r RoutesDeleteResponse) Status() string

Status returns HTTPResponse.Status

func (RoutesDeleteResponse) StatusCode

func (r RoutesDeleteResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RoutesListResponse

type RoutesListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *RouteResponse
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (RoutesListResponse) Status

func (r RoutesListResponse) Status() string

Status returns HTTPResponse.Status

func (RoutesListResponse) StatusCode

func (r RoutesListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RoutesReadResponse

type RoutesReadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *RouteResponse
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (RoutesReadResponse) Status

func (r RoutesReadResponse) Status() string

Status returns HTTPResponse.Status

func (RoutesReadResponse) StatusCode

func (r RoutesReadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RoutesUpdateJSONBody

type RoutesUpdateJSONBody struct {
	// GroupBy The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.
	GroupBy *[]string `json:"groupBy,omitempty"`

	// GroupInterval How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)
	// `Additional Validators:`
	// * must be a valid time format
	GroupInterval *string `json:"groupInterval,omitempty"`

	// GroupWait How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)
	// `Additional Validators:`
	// * must be a valid time format
	GroupWait *string `json:"groupWait,omitempty"`

	// Match map of key:value. A set of equality matchers an alert has to fulfill to match the node.
	// `Additional Validators:`
	// * should not contain more than 5 keys
	// * each key and value should not be longer than 200 characters
	// * key and values should only include the characters: a-zA-Z0-9_./@&?:-
	Match *map[string]interface{} `json:"match,omitempty"`

	// MatchRe map of key:value. A set of regex-matchers an alert has to fulfill to match the node.
	// `Additional Validators:`
	// * should not contain more than 5 keys
	// * each key and value should not be longer than 200 characters
	MatchRe *map[string]interface{} `json:"matchRe,omitempty"`

	// Matchers A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics. The syntax of a matcher consists of three tokens:
	// * A valid Prometheus label name.
	// * One of =, !=, =~, or !~. = means equals, != means that the strings are not equal, =~ is used for equality of regex expressions and !~ is used for un-equality of regex expressions. They have the same meaning as known from PromQL selectors.
	// * A UTF-8 string, which may be enclosed in double quotes. Before or after each token, there may be any amount of whitespace.
	// `Additional Validators:`
	// * should not contain more than 5 keys
	// * each key and value should not be longer than 200 characters
	Matchers *[]string `json:"matchers,omitempty"`

	// Receiver Receiver that should be one item of receivers
	// `Additional Validators:`
	// * must be a in name of receivers
	Receiver string `json:"receiver"`

	// RepeatInterval How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more).
	// `Additional Validators:`
	// * must be a valid time format
	RepeatInterval *string `json:"repeatInterval,omitempty"`

	// Routes Zero or more child routes.
	Routes *[]struct {
		GroupBy *[]string `json:"groupBy,omitempty"`

		// GroupInterval As in one level above
		GroupInterval *string `json:"groupInterval,omitempty"`

		// GroupWait As in one level above
		GroupWait *string `json:"groupWait,omitempty"`

		// Match As in one level above
		Match *map[string]interface{} `json:"match,omitempty"`

		// MatchRe As in one level above
		MatchRe *map[string]interface{} `json:"matchRe,omitempty"`

		// Receiver As in one level above
		Receiver *string `json:"receiver,omitempty"`

		// RepeatInterval As in one level above
		RepeatInterval *string `json:"repeatInterval,omitempty"`

		// Routes Another child routes
		Routes *[]map[string]interface{} `json:"routes,omitempty"`
	} `json:"routes,omitempty"`
}

RoutesUpdateJSONBody defines parameters for RoutesUpdate.

type RoutesUpdateJSONRequestBody

type RoutesUpdateJSONRequestBody RoutesUpdateJSONBody

RoutesUpdateJSONRequestBody defines body for RoutesUpdate for application/json ContentType.

type RoutesUpdateResponse

type RoutesUpdateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *RouteResponse
	JSON400      *Error
	JSON403      *PermissionDenied
	JSON404      *Message
	Error        error // Aggregated error
}

func (RoutesUpdateResponse) Status

func (r RoutesUpdateResponse) Status() string

Status returns HTTPResponse.Status

func (RoutesUpdateResponse) StatusCode

func (r RoutesUpdateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateJSONBody

type UpdateJSONBody struct {
	// Global Global config. If nothing passed the default argus config will be used.
	Global *struct {
		// OpsgenieApiKey Opsgenie api key
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9-
		OpsgenieAPIKey *string `json:"opsgenieApiKey,omitempty"`

		// OpsgenieApiUrl Opsgenie api url
		// `Additional Validators:`
		// * must be a syntactically valid url address
		OpsgenieAPIURL *string `json:"opsgenieApiUrl,omitempty"`

		// ResolveTimeout ResolveTimeout is the default value used by alertmanager if the alert does not include EndsAt, after this time passes it can declare the alert as resolved if it has not been updated. This has no impact on alerts from Prometheus, as they always include EndsAt.
		// `Additional Validators:`
		// * must be a valid time format
		ResolveTimeout *string `json:"resolveTimeout,omitempty"`

		// SmtpAuthIdentity Auth identity.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		SmtpAuthIdentity *string `json:"smtpAuthIdentity,omitempty"`

		// SmtpAuthPassword SMTP Auth using LOGIN and PLAIN.
		SmtpAuthPassword *string `json:"smtpAuthPassword,omitempty"`

		// SmtpAuthUsername SMTP Auth using CRAM-MD5, LOGIN and PLAIN. If empty, Alertmanager doesn't authenticate to the SMTP server.
		SmtpAuthUsername *string `json:"smtpAuthUsername,omitempty"`

		// SmtpFrom The default SMTP From header field.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		SmtpFrom *string `json:"smtpFrom,omitempty"`

		// SmtpSmarthost The default SMTP smarthost used for sending emails, including port number. Port number usually is 25, or 587 for SMTP over TLS (sometimes referred to as STARTTLS). Example: smtp.example.org:587
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9_./@&?:-
		SmtpSmarthost *string `json:"smtpSmarthost,omitempty"`
	} `json:"global,omitempty"`

	// InhibitRules A list of inhibition rules.
	InhibitRules *struct {
		// Equal Labels that must have an equal value in the source and target alert for the inhibition to take effect.
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9_./@&?:-
		Equal *[]string `json:"equal,omitempty"`

		// SourceMatch map of key:value. Matchers for which one or more alerts have to exist for the inhibition to take effect.
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not have more than 200 characters
		// * each key and value should only include the characters: a-zA-Z0-9_./@&?:-
		SourceMatch *map[string]interface{} `json:"sourceMatch,omitempty"`

		// SourceMatchRe map of key:value. Regex match
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not have more than 200 characters
		SourceMatchRe *map[string]interface{} `json:"sourceMatchRe,omitempty"`

		// TargetMatch map of key:value. Matchers that have to be fulfilled in the alerts to be muted.
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not have more than 200 characters
		// * each key and value should only include the characters: a-zA-Z0-9_./@&?:-
		TargetMatch *map[string]interface{} `json:"targetMatch,omitempty"`

		// TargetMatchRe map of key:value. Matchers that have to be fulfilled in the alerts to be muted. Regex.
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not have more than 200 characters
		TargetMatchRe *map[string]interface{} `json:"targetMatchRe,omitempty"`
	} `json:"inhibitRules,omitempty"`

	// Receivers A list of notification receivers.
	Receivers []struct {
		// EmailConfigs Email configurations
		EmailConfigs *[]struct {
			// AuthIdentity SMTP authentication information.
			// `Additional Validators:`
			// * must be a syntactically valid email address
			AuthIdentity *string `json:"authIdentity,omitempty"`

			// AuthPassword SMTP authentication information.
			AuthPassword *string `json:"authPassword,omitempty"`

			// AuthUsername SMTP authentication information.
			AuthUsername *string `json:"authUsername,omitempty"`

			// From The sender address.
			// `Additional Validators:`
			// * must be a syntactically valid email address
			From *string `json:"from,omitempty"`

			// Smarthost The SMTP host through which emails are sent.
			// `Additional Validators:`
			// * should only include the characters: a-zA-Z0-9_./@&?:-
			Smarthost *string `json:"smarthost,omitempty"`

			// To The email address to send notifications to.
			// `Additional Validators:`
			// * must be a syntactically valid email address
			To *string `json:"to,omitempty"`
		} `json:"emailConfigs,omitempty"`

		// Name `Additional Validators:`
		// * must be unique
		// * should only include the characters: a-zA-Z0-9-
		Name string `json:"name"`

		// OpsgenieConfigs Configuration for ops genie.
		OpsgenieConfigs *[]struct {
			// ApiKey The API key to use when talking to the OpsGenie API.
			// `Additional Validators:`
			// * should only include the characters: a-zA-Z0-9-
			APIKey *string `json:"apiKey,omitempty"`

			// ApiUrl The host to send OpsGenie API requests to.
			// `Additional Validators:`
			// * must be a syntactically valid url address
			APIURL *string `json:"apiUrl,omitempty"`

			// Tags Comma separated list of tags attached to the notifications.
			Tags *string `json:"tags,omitempty"`
		} `json:"opsgenieConfigs,omitempty"`
		WebHookConfigs *[]struct {
			// MsTeams Microsoft Teams webhooks require special handling. If you set this property to true, it is treated as such
			MsTeams *bool `json:"msTeams,omitempty"`

			// Url The endpoint to send HTTP POST requests to.
			// `Additional Validators:`
			// * must be a syntactically valid url address
			URL *string `json:"url,omitempty"`
		} `json:"webHookConfigs,omitempty"`
	} `json:"receivers"`

	// Route The root node of the routing tree.
	Route struct {
		// GroupBy The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.
		GroupBy *[]string `json:"groupBy,omitempty"`

		// GroupInterval How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)
		// `Additional Validators:`
		// * must be a valid time format
		GroupInterval *string `json:"groupInterval,omitempty"`

		// GroupWait How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)
		// `Additional Validators:`
		// * must be a valid time format
		GroupWait *string `json:"groupWait,omitempty"`

		// Match map of key:value. A set of equality matchers an alert has to fulfill to match the node.
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not be longer than 200 characters
		// * key and values should only include the characters: a-zA-Z0-9_./@&?:-
		Match *map[string]interface{} `json:"match,omitempty"`

		// MatchRe map of key:value. A set of regex-matchers an alert has to fulfill to match the node.
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not be longer than 200 characters
		MatchRe *map[string]interface{} `json:"matchRe,omitempty"`

		// Matchers A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics. The syntax of a matcher consists of three tokens:
		// * A valid Prometheus label name.
		// * One of =, !=, =~, or !~. = means equals, != means that the strings are not equal, =~ is used for equality of regex expressions and !~ is used for un-equality of regex expressions. They have the same meaning as known from PromQL selectors.
		// * A UTF-8 string, which may be enclosed in double quotes. Before or after each token, there may be any amount of whitespace.
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not be longer than 200 characters
		Matchers *[]string `json:"matchers,omitempty"`

		// Receiver Receiver that should be one item of receivers
		// `Additional Validators:`
		// * must be a in name of receivers
		Receiver string `json:"receiver"`

		// RepeatInterval How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more).
		// `Additional Validators:`
		// * must be a valid time format
		RepeatInterval *string `json:"repeatInterval,omitempty"`

		// Routes Zero or more child routes.
		Routes *[]struct {
			GroupBy *[]string `json:"groupBy,omitempty"`

			// GroupInterval As in one level above
			GroupInterval *string `json:"groupInterval,omitempty"`

			// GroupWait As in one level above
			GroupWait *string `json:"groupWait,omitempty"`

			// Match As in one level above
			Match *map[string]interface{} `json:"match,omitempty"`

			// MatchRe As in one level above
			MatchRe *map[string]interface{} `json:"matchRe,omitempty"`

			// Receiver As in one level above
			Receiver *string `json:"receiver,omitempty"`

			// RepeatInterval As in one level above
			RepeatInterval *string `json:"repeatInterval,omitempty"`

			// Routes Another child routes
			Routes *[]map[string]interface{} `json:"routes,omitempty"`
		} `json:"routes,omitempty"`
	} `json:"route"`
}

UpdateJSONBody defines parameters for Update.

type UpdateJSONRequestBody

type UpdateJSONRequestBody UpdateJSONBody

UpdateJSONRequestBody defines body for Update for application/json ContentType.

type UpdateResponse

type UpdateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *PutAlert
	JSON400      *Error
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (UpdateResponse) Status

func (r UpdateResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateResponse) StatusCode

func (r UpdateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type WebHook

type WebHook struct {
	MsTeams      *bool  `json:"msTeams,omitempty"`
	SendResolved *bool  `json:"sendResolved,omitempty"`
	URL          string `json:"url"`
}

WebHook defines model for WebHook.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL