notification

package
v0.20231011.1091146 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notification Documentation

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

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/2022-08-01/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
}

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 ValidateServiceID

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

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

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders added in v0.20230801.1071415

func (CreateOrUpdateOperationOptions) ToOData added in v0.20230801.1071415

func (CreateOrUpdateOperationOptions) ToQuery added in v0.20230801.1071415

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 {
	Items []NotificationContract
}

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	Skip *int64
	Top  *int64
}

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

func (ListByServiceOperationOptions) ToHeaders added in v0.20230801.1071415

func (ListByServiceOperationOptions) ToOData added in v0.20230801.1071415

func (ListByServiceOperationOptions) ToQuery added in v0.20230801.1071415

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

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) 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 added in v0.20230801.1071415

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

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) 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

Jump to

Keyboard shortcuts

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