liveevents

package
v0.0.0-...-a81a29a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents Documentation

The liveevents SDK allows for interaction with the Azure Resource Manager Service media (API Version 2021-11-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/2021-11-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", "mediaServiceValue", "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", "mediaServiceValue", "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", "mediaServiceValue", "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", "mediaServiceValue", "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", "mediaServiceValue")

// 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", "mediaServiceValue", "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", "mediaServiceValue", "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", "mediaServiceValue", "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", "mediaServiceValue", "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       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type CreateOperationOptions

type CreateOperationOptions struct {
	AutoStart *bool
}

func DefaultCreateOperationOptions

func DefaultCreateOperationOptions() CreateOperationOptions

func (CreateOperationOptions) ToHeaders

func (o CreateOperationOptions) ToHeaders() *client.Headers

func (CreateOperationOptions) ToOData

func (o CreateOperationOptions) ToOData() *odata.Query

func (CreateOperationOptions) ToQuery

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type CrossSiteAccessPolicies

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

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	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
	OData        *odata.OData
	Model        *[]LiveEvent
}

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"
	LiveEventEncodingTypePassthroughBasic         LiveEventEncodingType = "PassthroughBasic"
	LiveEventEncodingTypePassthroughStandard      LiveEventEncodingType = "PassthroughStandard"
	LiveEventEncodingTypePremiumOneZeroEightZerop LiveEventEncodingType = "Premium1080p"
	LiveEventEncodingTypeStandard                 LiveEventEncodingType = "Standard"
)

func (*LiveEventEncodingType) UnmarshalJSON

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

type LiveEventEndpoint

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

type LiveEventId

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

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

func NewLiveEventID

func NewLiveEventID(subscriptionId string, resourceGroupName string, mediaServiceName 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"
)

func (*LiveEventInputProtocol) UnmarshalJSON

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

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

func (*LiveEventResourceState) UnmarshalJSON

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

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 *resourcemanager.Client
}

func NewLiveEventsClientWithBaseURI

func NewLiveEventsClientWithBaseURI(api environments.Api) (*LiveEventsClient, error)

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 the results into a single object

func (LiveEventsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies 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
	MediaServiceName  string
}

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

func NewMediaServiceID

func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName 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       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type StartOperationResponse

type StartOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type StopOperationResponse

type StopOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type StreamOptionsFlag

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

func (*StreamOptionsFlag) UnmarshalJSON

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

type StretchMode

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

func (*StretchMode) UnmarshalJSON

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

Jump to

Keyboard shortcuts

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