notification

package
v0.20240119.1094410 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/notification Documentation

The notification SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2023-03-01-preview).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/notification"

Client Initialization

client := notification.NewNotificationClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: NotificationClient.CreateOrUpdate

ctx := context.TODO()
id := notification.NewNotificationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "AccountClosedPublisher")

read, err := client.CreateOrUpdate(ctx, id, notification.DefaultCreateOrUpdateOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: NotificationClient.Get

ctx := context.TODO()
id := notification.NewNotificationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "AccountClosedPublisher")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: NotificationClient.ListByService

ctx := context.TODO()
id := notification.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue")

// alternatively `client.ListByService(ctx, id, notification.DefaultListByServiceOperationOptions())` can be used to do batched pagination
items, err := client.ListByServiceComplete(ctx, id, notification.DefaultListByServiceOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: NotificationClient.WorkspaceNotificationCreateOrUpdate

ctx := context.TODO()
id := notification.NewNotificationNotificationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceIdValue", "AccountClosedPublisher")

read, err := client.WorkspaceNotificationCreateOrUpdate(ctx, id, notification.DefaultWorkspaceNotificationCreateOrUpdateOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: NotificationClient.WorkspaceNotificationGet

ctx := context.TODO()
id := notification.NewNotificationNotificationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceIdValue", "AccountClosedPublisher")

read, err := client.WorkspaceNotificationGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: NotificationClient.WorkspaceNotificationListByService

ctx := context.TODO()
id := notification.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceIdValue")

// alternatively `client.WorkspaceNotificationListByService(ctx, id, notification.DefaultWorkspaceNotificationListByServiceOperationOptions())` can be used to do batched pagination
items, err := client.WorkspaceNotificationListByServiceComplete(ctx, id, notification.DefaultWorkspaceNotificationListByServiceOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForNotificationName

func PossibleValuesForNotificationName() []string

func ValidateNotificationID

func ValidateNotificationID(input interface{}, key string) (warnings []string, errors []error)

ValidateNotificationID checks that 'input' can be parsed as a Notification ID

func ValidateNotificationNotificationID

func ValidateNotificationNotificationID(input interface{}, key string) (warnings []string, errors []error)

ValidateNotificationNotificationID checks that 'input' can be parsed as a Notification Notification ID

func ValidateServiceID

func ValidateServiceID(input interface{}, key string) (warnings []string, errors []error)

ValidateServiceID checks that 'input' can be parsed as a Service ID

func ValidateWorkspaceID

func ValidateWorkspaceID(input interface{}, key string) (warnings []string, errors []error)

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *NotificationContract
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *NotificationContract
}

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []NotificationContract
}

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	Skip *int64
	Top  *int64
}

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

func (ListByServiceOperationOptions) ToHeaders

func (ListByServiceOperationOptions) ToOData

func (ListByServiceOperationOptions) ToQuery

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]NotificationContract
}

type NotificationClient

type NotificationClient struct {
	Client *resourcemanager.Client
}

func NewNotificationClientWithBaseURI

func NewNotificationClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationClient, error)

func (NotificationClient) CreateOrUpdate

CreateOrUpdate ...

func (NotificationClient) Get

Get ...

func (NotificationClient) ListByService

ListByService ...

func (NotificationClient) ListByServiceComplete

ListByServiceComplete retrieves all the results into a single object

func (NotificationClient) ListByServiceCompleteMatchingPredicate

func (c NotificationClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListByServiceOperationOptions, predicate NotificationContractOperationPredicate) (result ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (NotificationClient) WorkspaceNotificationCreateOrUpdate

WorkspaceNotificationCreateOrUpdate ...

func (NotificationClient) WorkspaceNotificationGet

WorkspaceNotificationGet ...

func (NotificationClient) WorkspaceNotificationListByService

WorkspaceNotificationListByService ...

func (NotificationClient) WorkspaceNotificationListByServiceComplete

WorkspaceNotificationListByServiceComplete retrieves all the results into a single object

func (NotificationClient) WorkspaceNotificationListByServiceCompleteMatchingPredicate

WorkspaceNotificationListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

type NotificationContract

type NotificationContract struct {
	Id         *string                         `json:"id,omitempty"`
	Name       *string                         `json:"name,omitempty"`
	Properties *NotificationContractProperties `json:"properties,omitempty"`
	Type       *string                         `json:"type,omitempty"`
}

type NotificationContractOperationPredicate

type NotificationContractOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (NotificationContractOperationPredicate) Matches

type NotificationContractProperties

type NotificationContractProperties struct {
	Description *string                       `json:"description,omitempty"`
	Recipients  *RecipientsContractProperties `json:"recipients,omitempty"`
	Title       string                        `json:"title"`
}

type NotificationId

type NotificationId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	NotificationName  NotificationName
}

NotificationId is a struct representing the Resource ID for a Notification

func NewNotificationID

func NewNotificationID(subscriptionId string, resourceGroupName string, serviceName string, notificationName NotificationName) NotificationId

NewNotificationID returns a new NotificationId struct

func ParseNotificationID

func ParseNotificationID(input string) (*NotificationId, error)

ParseNotificationID parses 'input' into a NotificationId

func ParseNotificationIDInsensitively

func ParseNotificationIDInsensitively(input string) (*NotificationId, error)

ParseNotificationIDInsensitively parses 'input' case-insensitively into a NotificationId note: this method should only be used for API response data and not user input

func (*NotificationId) FromParseResult added in v0.20231127.1171502

func (id *NotificationId) FromParseResult(input resourceids.ParseResult) error

func (NotificationId) ID

func (id NotificationId) ID() string

ID returns the formatted Notification ID

func (NotificationId) Segments

func (id NotificationId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Notification ID

func (NotificationId) String

func (id NotificationId) String() string

String returns a human-readable description of this Notification ID

type NotificationName

type NotificationName string
const (
	NotificationNameAccountClosedPublisher                            NotificationName = "AccountClosedPublisher"
	NotificationNameBCC                                               NotificationName = "BCC"
	NotificationNameNewApplicationNotificationMessage                 NotificationName = "NewApplicationNotificationMessage"
	NotificationNameNewIssuePublisherNotificationMessage              NotificationName = "NewIssuePublisherNotificationMessage"
	NotificationNamePurchasePublisherNotificationMessage              NotificationName = "PurchasePublisherNotificationMessage"
	NotificationNameQuotaLimitApproachingPublisherNotificationMessage NotificationName = "QuotaLimitApproachingPublisherNotificationMessage"
	NotificationNameRequestPublisherNotificationMessage               NotificationName = "RequestPublisherNotificationMessage"
)

func (*NotificationName) UnmarshalJSON

func (s *NotificationName) UnmarshalJSON(bytes []byte) error

type NotificationNotificationId

type NotificationNotificationId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	WorkspaceId       string
	NotificationName  NotificationName
}

NotificationNotificationId is a struct representing the Resource ID for a Notification Notification

func NewNotificationNotificationID

func NewNotificationNotificationID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string, notificationName NotificationName) NotificationNotificationId

NewNotificationNotificationID returns a new NotificationNotificationId struct

func ParseNotificationNotificationID

func ParseNotificationNotificationID(input string) (*NotificationNotificationId, error)

ParseNotificationNotificationID parses 'input' into a NotificationNotificationId

func ParseNotificationNotificationIDInsensitively

func ParseNotificationNotificationIDInsensitively(input string) (*NotificationNotificationId, error)

ParseNotificationNotificationIDInsensitively parses 'input' case-insensitively into a NotificationNotificationId note: this method should only be used for API response data and not user input

func (*NotificationNotificationId) FromParseResult added in v0.20231127.1171502

func (id *NotificationNotificationId) FromParseResult(input resourceids.ParseResult) error

func (NotificationNotificationId) ID

ID returns the formatted Notification Notification ID

func (NotificationNotificationId) Segments

Segments returns a slice of Resource ID Segments which comprise this Notification Notification ID

func (NotificationNotificationId) String

func (id NotificationNotificationId) String() string

String returns a human-readable description of this Notification Notification ID

type RecipientsContractProperties

type RecipientsContractProperties struct {
	Emails *[]string `json:"emails,omitempty"`
	Users  *[]string `json:"users,omitempty"`
}

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

ParseServiceIDInsensitively parses 'input' case-insensitively into a ServiceId note: this method should only be used for API response data and not user input

func (*ServiceId) FromParseResult added in v0.20231127.1171502

func (id *ServiceId) FromParseResult(input resourceids.ParseResult) error

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

func (id ServiceId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Service ID

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

type WorkspaceId

type WorkspaceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	WorkspaceId       string
}

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

ParseWorkspaceIDInsensitively parses 'input' case-insensitively into a WorkspaceId note: this method should only be used for API response data and not user input

func (*WorkspaceId) FromParseResult added in v0.20231127.1171502

func (id *WorkspaceId) FromParseResult(input resourceids.ParseResult) error

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

func (id WorkspaceId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Workspace ID

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

type WorkspaceNotificationCreateOrUpdateOperationOptions

type WorkspaceNotificationCreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceNotificationCreateOrUpdateOperationOptions

func DefaultWorkspaceNotificationCreateOrUpdateOperationOptions() WorkspaceNotificationCreateOrUpdateOperationOptions

func (WorkspaceNotificationCreateOrUpdateOperationOptions) ToHeaders

func (WorkspaceNotificationCreateOrUpdateOperationOptions) ToOData

func (WorkspaceNotificationCreateOrUpdateOperationOptions) ToQuery

type WorkspaceNotificationCreateOrUpdateOperationResponse

type WorkspaceNotificationCreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *NotificationContract
}

type WorkspaceNotificationGetOperationResponse

type WorkspaceNotificationGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *NotificationContract
}

type WorkspaceNotificationListByServiceCompleteResult

type WorkspaceNotificationListByServiceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []NotificationContract
}

type WorkspaceNotificationListByServiceOperationOptions

type WorkspaceNotificationListByServiceOperationOptions struct {
	Skip *int64
	Top  *int64
}

func DefaultWorkspaceNotificationListByServiceOperationOptions

func DefaultWorkspaceNotificationListByServiceOperationOptions() WorkspaceNotificationListByServiceOperationOptions

func (WorkspaceNotificationListByServiceOperationOptions) ToHeaders

func (WorkspaceNotificationListByServiceOperationOptions) ToOData

func (WorkspaceNotificationListByServiceOperationOptions) ToQuery

type WorkspaceNotificationListByServiceOperationResponse

type WorkspaceNotificationListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]NotificationContract
}

Jump to

Keyboard shortcuts

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