liveevents

package
v0.20221212.1131457 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents Documentation

The liveevents SDK allows for interaction with the Azure Resource Manager Service media (API Version 2020-05-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/media/2020-05-01/liveevents"

Client Initialization

client := liveevents.NewLiveEventsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: LiveEventsClient.Allocate

ctx := context.TODO()
id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "liveEventValue")

if err := client.AllocateThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: LiveEventsClient.Create

ctx := context.TODO()
id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "liveEventValue")

payload := liveevents.LiveEvent{
	// ...
}


if err := client.CreateThenPoll(ctx, id, payload, liveevents.DefaultCreateOperationOptions()); err != nil {
	// handle the error
}

Example Usage: LiveEventsClient.Delete

ctx := context.TODO()
id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "liveEventValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: LiveEventsClient.Get

ctx := context.TODO()
id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "liveEventValue")

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: LiveEventsClient.List

ctx := context.TODO()
id := liveevents.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue")

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

Example Usage: LiveEventsClient.Reset

ctx := context.TODO()
id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "liveEventValue")

if err := client.ResetThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: LiveEventsClient.Start

ctx := context.TODO()
id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "liveEventValue")

if err := client.StartThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: LiveEventsClient.Stop

ctx := context.TODO()
id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "liveEventValue")

payload := liveevents.LiveEventActionInput{
	// ...
}


if err := client.StopThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: LiveEventsClient.Update

ctx := context.TODO()
id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "liveEventValue")

payload := liveevents.LiveEvent{
	// ...
}


if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForLiveEventEncodingType

func PossibleValuesForLiveEventEncodingType() []string

func PossibleValuesForLiveEventInputProtocol

func PossibleValuesForLiveEventInputProtocol() []string

func PossibleValuesForLiveEventResourceState

func PossibleValuesForLiveEventResourceState() []string

func PossibleValuesForStreamOptionsFlag

func PossibleValuesForStreamOptionsFlag() []string

func PossibleValuesForStretchMode

func PossibleValuesForStretchMode() []string

func ValidateLiveEventID

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

ValidateLiveEventID checks that 'input' can be parsed as a Live Event ID

func ValidateMediaServiceID

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

ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID

Types

type AllocateOperationResponse

type AllocateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type CreateOperationOptions

type CreateOperationOptions struct {
	AutoStart *bool
}

func DefaultCreateOperationOptions

func DefaultCreateOperationOptions() CreateOperationOptions

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type CrossSiteAccessPolicies

type CrossSiteAccessPolicies struct {
	ClientAccessPolicy *string `json:"clientAccessPolicy,omitempty"`
	CrossDomainPolicy  *string `json:"crossDomainPolicy,omitempty"`
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *LiveEvent
}

type IPAccessControl

type IPAccessControl struct {
	Allow *[]IPRange `json:"allow,omitempty"`
}

type IPRange

type IPRange struct {
	Address            *string `json:"address,omitempty"`
	Name               *string `json:"name,omitempty"`
	SubnetPrefixLength *int64  `json:"subnetPrefixLength,omitempty"`
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []LiveEvent
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]LiveEvent
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type LiveEvent

type LiveEvent struct {
	Id         *string                `json:"id,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties *LiveEventProperties   `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type LiveEventActionInput

type LiveEventActionInput struct {
	RemoveOutputsOnStop *bool `json:"removeOutputsOnStop,omitempty"`
}

type LiveEventEncoding

type LiveEventEncoding struct {
	EncodingType     *LiveEventEncodingType `json:"encodingType,omitempty"`
	KeyFrameInterval *string                `json:"keyFrameInterval,omitempty"`
	PresetName       *string                `json:"presetName,omitempty"`
	StretchMode      *StretchMode           `json:"stretchMode,omitempty"`
}

type LiveEventEncodingType

type LiveEventEncodingType string
const (
	LiveEventEncodingTypeNone                     LiveEventEncodingType = "None"
	LiveEventEncodingTypePremiumOneZeroEightZerop LiveEventEncodingType = "Premium1080p"
	LiveEventEncodingTypeStandard                 LiveEventEncodingType = "Standard"
)

type LiveEventEndpoint

type LiveEventEndpoint struct {
	Protocol *string `json:"protocol,omitempty"`
	Url      *string `json:"url,omitempty"`
}

type LiveEventId

type LiveEventId struct {
	SubscriptionId    string
	ResourceGroupName string
	AccountName       string
	LiveEventName     string
}

LiveEventId is a struct representing the Resource ID for a Live Event

func NewLiveEventID

func NewLiveEventID(subscriptionId string, resourceGroupName string, accountName string, liveEventName string) LiveEventId

NewLiveEventID returns a new LiveEventId struct

func ParseLiveEventID

func ParseLiveEventID(input string) (*LiveEventId, error)

ParseLiveEventID parses 'input' into a LiveEventId

func ParseLiveEventIDInsensitively

func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error)

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

func (LiveEventId) ID

func (id LiveEventId) ID() string

ID returns the formatted Live Event ID

func (LiveEventId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Live Event ID

func (LiveEventId) String

func (id LiveEventId) String() string

String returns a human-readable description of this Live Event ID

type LiveEventInput

type LiveEventInput struct {
	AccessControl            *LiveEventInputAccessControl `json:"accessControl,omitempty"`
	AccessToken              *string                      `json:"accessToken,omitempty"`
	Endpoints                *[]LiveEventEndpoint         `json:"endpoints,omitempty"`
	KeyFrameIntervalDuration *string                      `json:"keyFrameIntervalDuration,omitempty"`
	StreamingProtocol        LiveEventInputProtocol       `json:"streamingProtocol"`
}

type LiveEventInputAccessControl

type LiveEventInputAccessControl struct {
	IP *IPAccessControl `json:"ip,omitempty"`
}

type LiveEventInputProtocol

type LiveEventInputProtocol string
const (
	LiveEventInputProtocolFragmentedMPFour LiveEventInputProtocol = "FragmentedMP4"
	LiveEventInputProtocolRTMP             LiveEventInputProtocol = "RTMP"
)

type LiveEventInputTrackSelection

type LiveEventInputTrackSelection struct {
	Operation *string `json:"operation,omitempty"`
	Property  *string `json:"property,omitempty"`
	Value     *string `json:"value,omitempty"`
}

type LiveEventOperationPredicate

type LiveEventOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (LiveEventOperationPredicate) Matches

func (p LiveEventOperationPredicate) Matches(input LiveEvent) bool

type LiveEventOutputTranscriptionTrack

type LiveEventOutputTranscriptionTrack struct {
	TrackName string `json:"trackName"`
}

type LiveEventPreview

type LiveEventPreview struct {
	AccessControl       *LiveEventPreviewAccessControl `json:"accessControl,omitempty"`
	AlternativeMediaId  *string                        `json:"alternativeMediaId,omitempty"`
	Endpoints           *[]LiveEventEndpoint           `json:"endpoints,omitempty"`
	PreviewLocator      *string                        `json:"previewLocator,omitempty"`
	StreamingPolicyName *string                        `json:"streamingPolicyName,omitempty"`
}

type LiveEventPreviewAccessControl

type LiveEventPreviewAccessControl struct {
	IP *IPAccessControl `json:"ip,omitempty"`
}

type LiveEventProperties

type LiveEventProperties struct {
	Created                 *string                   `json:"created,omitempty"`
	CrossSiteAccessPolicies *CrossSiteAccessPolicies  `json:"crossSiteAccessPolicies,omitempty"`
	Description             *string                   `json:"description,omitempty"`
	Encoding                *LiveEventEncoding        `json:"encoding,omitempty"`
	HostnamePrefix          *string                   `json:"hostnamePrefix,omitempty"`
	Input                   LiveEventInput            `json:"input"`
	LastModified            *string                   `json:"lastModified,omitempty"`
	Preview                 *LiveEventPreview         `json:"preview,omitempty"`
	ProvisioningState       *string                   `json:"provisioningState,omitempty"`
	ResourceState           *LiveEventResourceState   `json:"resourceState,omitempty"`
	StreamOptions           *[]StreamOptionsFlag      `json:"streamOptions,omitempty"`
	Transcriptions          *[]LiveEventTranscription `json:"transcriptions,omitempty"`
	UseStaticHostname       *bool                     `json:"useStaticHostname,omitempty"`
}

func (*LiveEventProperties) GetCreatedAsTime

func (o *LiveEventProperties) GetCreatedAsTime() (*time.Time, error)

func (*LiveEventProperties) GetLastModifiedAsTime

func (o *LiveEventProperties) GetLastModifiedAsTime() (*time.Time, error)

func (*LiveEventProperties) SetCreatedAsTime

func (o *LiveEventProperties) SetCreatedAsTime(input time.Time)

func (*LiveEventProperties) SetLastModifiedAsTime

func (o *LiveEventProperties) SetLastModifiedAsTime(input time.Time)

type LiveEventResourceState

type LiveEventResourceState string
const (
	LiveEventResourceStateAllocating LiveEventResourceState = "Allocating"
	LiveEventResourceStateDeleting   LiveEventResourceState = "Deleting"
	LiveEventResourceStateRunning    LiveEventResourceState = "Running"
	LiveEventResourceStateStandBy    LiveEventResourceState = "StandBy"
	LiveEventResourceStateStarting   LiveEventResourceState = "Starting"
	LiveEventResourceStateStopped    LiveEventResourceState = "Stopped"
	LiveEventResourceStateStopping   LiveEventResourceState = "Stopping"
)

type LiveEventTranscription

type LiveEventTranscription struct {
	InputTrackSelection      *[]LiveEventInputTrackSelection    `json:"inputTrackSelection,omitempty"`
	Language                 *string                            `json:"language,omitempty"`
	OutputTranscriptionTrack *LiveEventOutputTranscriptionTrack `json:"outputTranscriptionTrack,omitempty"`
}

type LiveEventsClient

type LiveEventsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewLiveEventsClientWithBaseURI

func NewLiveEventsClientWithBaseURI(endpoint string) LiveEventsClient

func (LiveEventsClient) Allocate

func (c LiveEventsClient) Allocate(ctx context.Context, id LiveEventId) (result AllocateOperationResponse, err error)

Allocate ...

func (LiveEventsClient) AllocateThenPoll

func (c LiveEventsClient) AllocateThenPoll(ctx context.Context, id LiveEventId) error

AllocateThenPoll performs Allocate then polls until it's completed

func (LiveEventsClient) Create

Create ...

func (LiveEventsClient) CreateThenPoll

func (c LiveEventsClient) CreateThenPoll(ctx context.Context, id LiveEventId, input LiveEvent, options CreateOperationOptions) error

CreateThenPoll performs Create then polls until it's completed

func (LiveEventsClient) Delete

func (c LiveEventsClient) Delete(ctx context.Context, id LiveEventId) (result DeleteOperationResponse, err error)

Delete ...

func (LiveEventsClient) DeleteThenPoll

func (c LiveEventsClient) DeleteThenPoll(ctx context.Context, id LiveEventId) error

DeleteThenPoll performs Delete then polls until it's completed

func (LiveEventsClient) Get

Get ...

func (LiveEventsClient) List

List ...

func (LiveEventsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (LiveEventsClient) ListCompleteMatchingPredicate

func (c LiveEventsClient) ListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, predicate LiveEventOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (LiveEventsClient) Reset

Reset ...

func (LiveEventsClient) ResetThenPoll

func (c LiveEventsClient) ResetThenPoll(ctx context.Context, id LiveEventId) error

ResetThenPoll performs Reset then polls until it's completed

func (LiveEventsClient) Start

Start ...

func (LiveEventsClient) StartThenPoll

func (c LiveEventsClient) StartThenPoll(ctx context.Context, id LiveEventId) error

StartThenPoll performs Start then polls until it's completed

func (LiveEventsClient) Stop

Stop ...

func (LiveEventsClient) StopThenPoll

func (c LiveEventsClient) StopThenPoll(ctx context.Context, id LiveEventId, input LiveEventActionInput) error

StopThenPoll performs Stop then polls until it's completed

func (LiveEventsClient) Update

func (c LiveEventsClient) Update(ctx context.Context, id LiveEventId, input LiveEvent) (result UpdateOperationResponse, err error)

Update ...

func (LiveEventsClient) UpdateThenPoll

func (c LiveEventsClient) UpdateThenPoll(ctx context.Context, id LiveEventId, input LiveEvent) error

UpdateThenPoll performs Update then polls until it's completed

type MediaServiceId

type MediaServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	AccountName       string
}

MediaServiceId is a struct representing the Resource ID for a Media Service

func NewMediaServiceID

func NewMediaServiceID(subscriptionId string, resourceGroupName string, accountName string) MediaServiceId

NewMediaServiceID returns a new MediaServiceId struct

func ParseMediaServiceID

func ParseMediaServiceID(input string) (*MediaServiceId, error)

ParseMediaServiceID parses 'input' into a MediaServiceId

func ParseMediaServiceIDInsensitively

func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error)

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

func (MediaServiceId) ID

func (id MediaServiceId) ID() string

ID returns the formatted Media Service ID

func (MediaServiceId) Segments

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

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

func (MediaServiceId) String

func (id MediaServiceId) String() string

String returns a human-readable description of this Media Service ID

type ResetOperationResponse

type ResetOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type StartOperationResponse

type StartOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type StopOperationResponse

type StopOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type StreamOptionsFlag

type StreamOptionsFlag string
const (
	StreamOptionsFlagDefault    StreamOptionsFlag = "Default"
	StreamOptionsFlagLowLatency StreamOptionsFlag = "LowLatency"
)

type StretchMode

type StretchMode string
const (
	StretchModeAutoFit  StretchMode = "AutoFit"
	StretchModeAutoSize StretchMode = "AutoSize"
	StretchModeNone     StretchMode = "None"
)

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

Jump to

Keyboard shortcuts

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