alerts

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package alerts contains auto-generated files. DO NOT MODIFY

Package alerts contains auto-generated files. DO NOT MODIFY

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertsPage

type AlertsPage struct {
	CurrentPage *AlertsPageResponse
	Error       error
	// contains filtered or unexported fields
}

AlertsPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageAlertResponse or error that is returned from the api call(s)

type AlertsPageOptions

type AlertsPageOptions struct {
	PageSize  *int
	Page      *int
	PageToken *string
	LogLevel  *string
	StartDate *time.Time
	EndDate   *time.Time
}

AlertsPageOptions defines the query options for the api operation

type AlertsPageResponse

type AlertsPageResponse struct {
	Alerts []PageAlertResponse `json:"alerts"`
	Meta   PageMetaResponse    `json:"meta"`
}

AlertsPageResponse defines the response fields for the alerts page

type AlertsPaginator

type AlertsPaginator struct {
	Page   *AlertsPage
	Alerts []PageAlertResponse
	// contains filtered or unexported fields
}

AlertsPaginator defines the fields for makings paginated api calls Alerts is an array of alerts that have been returned from all of the page calls

func (*AlertsPaginator) CurrentPage

func (p *AlertsPaginator) CurrentPage() *AlertsPageResponse

CurrentPage retrieves the results for the current page

func (*AlertsPaginator) Error

func (p *AlertsPaginator) Error() error

Error retrieves the error returned from the page

func (*AlertsPaginator) Next

func (p *AlertsPaginator) Next() bool

Next retrieves the next page of results. Next will return false when either an error occurs or there are no more pages to iterate Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (*AlertsPaginator) NextWithContext

func (p *AlertsPaginator) NextWithContext(context context.Context) bool

NextWithContext retrieves the next page of results. NextWithContext will return false when either an error occurs or there are no more pages to iterate

type Client

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

Client for managing alert resources See https://www.twilio.com/docs/usage/monitor-alert for more details

func New

func New(client *client.Client) *Client

New creates a new instance of the alerts client

func (*Client) NewAlertsPaginator

func (c *Client) NewAlertsPaginator() *AlertsPaginator

NewAlertsPaginator creates a new instance of the paginator for Page.

func (*Client) NewAlertsPaginatorWithOptions

func (c *Client) NewAlertsPaginatorWithOptions(options *AlertsPageOptions) *AlertsPaginator

NewAlertsPaginatorWithOptions creates a new instance of the paginator for Page with options.

func (Client) Page

func (c Client) Page(options *AlertsPageOptions) (*AlertsPageResponse, error)

Page retrieves a page of alerts See https://www.twilio.com/docs/usage/monitor-alert#read-multiple-alert-resources for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) PageWithContext

func (c Client) PageWithContext(context context.Context, options *AlertsPageOptions) (*AlertsPageResponse, error)

PageWithContext retrieves a page of alerts See https://www.twilio.com/docs/usage/monitor-alert#read-multiple-alert-resources for more details

type PageAlertResponse

type PageAlertResponse struct {
	APIVersion       *string    `json:"api_version,omitempty"`
	AccountSid       string     `json:"account_sid"`
	AlertText        *string    `json:"alert_text,omitempty"`
	DateCreated      time.Time  `json:"date_created"`
	DateGenerated    time.Time  `json:"date_generated"`
	DateUpdated      *time.Time `json:"date_updated,omitempty"`
	ErrorCode        string     `json:"error_code"`
	LogLevel         string     `json:"log_level"`
	MoreInfo         string     `json:"more_info"`
	RequestHeaders   *string    `json:"request_headers,omitempty"`
	RequestMethod    *string    `json:"request_method,omitempty"`
	RequestURL       *string    `json:"request_url,omitempty"`
	RequestVariables *string    `json:"request_variables,omitempty"`
	ResourceSid      string     `json:"resource_sid"`
	ResponseBody     *string    `json:"response_body,omitempty"`
	ResponseHeaders  *string    `json:"response_headers,omitempty"`
	ServiceSid       string     `json:"service_sid"`
	Sid              string     `json:"sid"`
	URL              string     `json:"url"`
}

type PageMetaResponse

type PageMetaResponse struct {
	FirstPageURL    string  `json:"first_page_url"`
	Key             string  `json:"key"`
	NextPageURL     *string `json:"next_page_url,omitempty"`
	Page            int     `json:"page"`
	PageSize        int     `json:"page_size"`
	PreviousPageURL *string `json:"previous_page_url,omitempty"`
	URL             string  `json:"url"`
}

Jump to

Keyboard shortcuts

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