armmediaservices

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: MIT Imports: 17 Imported by: 1

README

Azure Media Services Module for Go

PkgGoDev

The armmediaservices module provides operations for working with Azure Media Services.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Media Services module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Media Services. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Clients

Azure Media Services modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armmediaservices.NewClient(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
client, err := armmediaservices.NewClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Media Services label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AacAudio

type AacAudio struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The bitrate, in bits per second, of the output encoded audio.
	Bitrate *int32 `json:"bitrate,omitempty"`

	// The number of channels in the audio.
	Channels *int32 `json:"channels,omitempty"`

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string `json:"label,omitempty"`

	// The encoding profile to be used when encoding audio with AAC.
	Profile *AacAudioProfile `json:"profile,omitempty"`

	// The sampling rate to use for encoding in hertz.
	SamplingRate *int32 `json:"samplingRate,omitempty"`
}

AacAudio - Describes Advanced Audio Codec (AAC) audio encoding settings.

func (*AacAudio) GetAudio added in v0.3.0

func (a *AacAudio) GetAudio() *Audio

GetAudio implements the AudioClassification interface for type AacAudio.

func (*AacAudio) GetCodec added in v0.3.0

func (a *AacAudio) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type AacAudio.

func (AacAudio) MarshalJSON

func (a AacAudio) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AacAudio.

func (*AacAudio) UnmarshalJSON

func (a *AacAudio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AacAudio.

type AacAudioProfile

type AacAudioProfile string

AacAudioProfile - The encoding profile to be used when encoding audio with AAC.

const (
	// AacAudioProfileAacLc - Specifies that the output audio is to be encoded into AAC Low Complexity profile (AAC-LC).
	AacAudioProfileAacLc AacAudioProfile = "AacLc"
	// AacAudioProfileHeAacV1 - Specifies that the output audio is to be encoded into HE-AAC v1 profile.
	AacAudioProfileHeAacV1 AacAudioProfile = "HeAacV1"
	// AacAudioProfileHeAacV2 - Specifies that the output audio is to be encoded into HE-AAC v2 profile.
	AacAudioProfileHeAacV2 AacAudioProfile = "HeAacV2"
)

func PossibleAacAudioProfileValues

func PossibleAacAudioProfileValues() []AacAudioProfile

PossibleAacAudioProfileValues returns the possible values for the AacAudioProfile const type.

type AbsoluteClipTime

type AbsoluteClipTime struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// REQUIRED; The time position on the timeline of the input media. It is usually specified as an ISO8601 period. e.g PT30S
	// for 30 seconds.
	Time *string `json:"time,omitempty"`
}

AbsoluteClipTime - Specifies the clip time as an absolute time position in the media file. The absolute time can point to a different position depending on whether the media file starts from a timestamp of zero or not.

func (*AbsoluteClipTime) GetClipTime added in v0.3.0

func (a *AbsoluteClipTime) GetClipTime() *ClipTime

GetClipTime implements the ClipTimeClassification interface for type AbsoluteClipTime.

func (AbsoluteClipTime) MarshalJSON

func (a AbsoluteClipTime) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AbsoluteClipTime.

func (*AbsoluteClipTime) UnmarshalJSON

func (a *AbsoluteClipTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AbsoluteClipTime.

type AccessControl

type AccessControl struct {
	// The behavior for IP access control in Key Delivery.
	DefaultAction *DefaultAction `json:"defaultAction,omitempty"`

	// The IP allow list for access control in Key Delivery. If the default action is set to 'Allow', the IP allow list must be
	// empty.
	IPAllowList []*string `json:"ipAllowList,omitempty"`
}

func (AccessControl) MarshalJSON

func (a AccessControl) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccessControl.

type AccountEncryption

type AccountEncryption struct {
	// REQUIRED; The type of key used to encrypt the Account Key.
	Type *AccountEncryptionKeyType `json:"type,omitempty"`

	// The Key Vault identity.
	Identity *ResourceIdentity `json:"identity,omitempty"`

	// The properties of the key used to encrypt the account.
	KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"`

	// READ-ONLY; The current status of the Key Vault mapping.
	Status *string `json:"status,omitempty" azure:"ro"`
}

type AccountEncryptionKeyType

type AccountEncryptionKeyType string

AccountEncryptionKeyType - The type of key used to encrypt the Account Key.

const (
	// AccountEncryptionKeyTypeCustomerKey - The Account Key is encrypted with a Customer Key.
	AccountEncryptionKeyTypeCustomerKey AccountEncryptionKeyType = "CustomerKey"
	// AccountEncryptionKeyTypeSystemKey - The Account Key is encrypted with a System Key.
	AccountEncryptionKeyTypeSystemKey AccountEncryptionKeyType = "SystemKey"
)

func PossibleAccountEncryptionKeyTypeValues

func PossibleAccountEncryptionKeyTypeValues() []AccountEncryptionKeyType

PossibleAccountEncryptionKeyTypeValues returns the possible values for the AccountEncryptionKeyType const type.

type AccountFilter

type AccountFilter struct {
	// The Media Filter properties.
	Properties *MediaFilterProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

AccountFilter - An Account Filter.

func (AccountFilter) MarshalJSON

func (a AccountFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountFilter.

type AccountFilterCollection

type AccountFilterCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string `json:"@odata.nextLink,omitempty"`

	// A collection of AccountFilter items.
	Value []*AccountFilter `json:"value,omitempty"`
}

AccountFilterCollection - A collection of AccountFilter items.

type AccountFiltersClient

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

AccountFiltersClient contains the methods for the AccountFilters group. Don't use this type directly, use NewAccountFiltersClient() instead.

func NewAccountFiltersClient

func NewAccountFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountFiltersClient, error)

NewAccountFiltersClient creates a new instance of AccountFiltersClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AccountFiltersClient) CreateOrUpdate

func (client *AccountFiltersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, filterName string, parameters AccountFilter, options *AccountFiltersClientCreateOrUpdateOptions) (AccountFiltersClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates an Account Filter in the Media Services account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. filterName - The Account Filter name parameters - The request parameters options - AccountFiltersClientCreateOrUpdateOptions contains the optional parameters for the AccountFiltersClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accountFilters-create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAccountFiltersClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"contoso",
		"contosomedia",
		"newAccountFilter",
		armmediaservices.AccountFilter{
			Properties: &armmediaservices.MediaFilterProperties{
				FirstQuality: &armmediaservices.FirstQuality{
					Bitrate: to.Ptr[int32](128000),
				},
				PresentationTimeRange: &armmediaservices.PresentationTimeRange{
					EndTimestamp:               to.Ptr[int64](170000000),
					ForceEndTimestamp:          to.Ptr(false),
					LiveBackoffDuration:        to.Ptr[int64](0),
					PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
					StartTimestamp:             to.Ptr[int64](0),
					Timescale:                  to.Ptr[int64](10000000),
				},
				Tracks: []*armmediaservices.FilterTrackSelection{
					{
						TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
							{
								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
								Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
								Value:     to.Ptr("Audio"),
							},
							{
								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
								Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
								Value:     to.Ptr("en"),
							},
							{
								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
								Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
								Value:     to.Ptr("EC-3"),
							}},
					},
					{
						TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
							{
								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
								Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
								Value:     to.Ptr("Video"),
							},
							{
								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
								Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
								Value:     to.Ptr("3000000-5000000"),
							}},
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AccountFiltersClient) Delete

func (client *AccountFiltersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, filterName string, options *AccountFiltersClientDeleteOptions) (AccountFiltersClientDeleteResponse, error)

Delete - Deletes an Account Filter in the Media Services account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. filterName - The Account Filter name options - AccountFiltersClientDeleteOptions contains the optional parameters for the AccountFiltersClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accountFilters-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAccountFiltersClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"contoso",
		"contosomedia",
		"accountFilterWithTimeWindowAndTrack",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AccountFiltersClient) Get

func (client *AccountFiltersClient) Get(ctx context.Context, resourceGroupName string, accountName string, filterName string, options *AccountFiltersClientGetOptions) (AccountFiltersClientGetResponse, error)

Get - Get the details of an Account Filter in the Media Services account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. filterName - The Account Filter name options - AccountFiltersClientGetOptions contains the optional parameters for the AccountFiltersClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accountFilters-get-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAccountFiltersClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contoso",
		"contosomedia",
		"accountFilterWithTrack",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AccountFiltersClient) NewListPager added in v0.6.0

func (client *AccountFiltersClient) NewListPager(resourceGroupName string, accountName string, options *AccountFiltersClientListOptions) *runtime.Pager[AccountFiltersClientListResponse]

NewListPager - List Account Filters in the Media Services account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - AccountFiltersClientListOptions contains the optional parameters for the AccountFiltersClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accountFilters-list-all.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAccountFiltersClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("contoso",
		"contosomedia",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AccountFiltersClient) Update

func (client *AccountFiltersClient) Update(ctx context.Context, resourceGroupName string, accountName string, filterName string, parameters AccountFilter, options *AccountFiltersClientUpdateOptions) (AccountFiltersClientUpdateResponse, error)

Update - Updates an existing Account Filter in the Media Services account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. filterName - The Account Filter name parameters - The request parameters options - AccountFiltersClientUpdateOptions contains the optional parameters for the AccountFiltersClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accountFilters-update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAccountFiltersClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"contoso",
		"contosomedia",
		"accountFilterWithTimeWindowAndTrack",
		armmediaservices.AccountFilter{
			Properties: &armmediaservices.MediaFilterProperties{
				FirstQuality: &armmediaservices.FirstQuality{
					Bitrate: to.Ptr[int32](128000),
				},
				PresentationTimeRange: &armmediaservices.PresentationTimeRange{
					EndTimestamp:               to.Ptr[int64](170000000),
					ForceEndTimestamp:          to.Ptr(false),
					LiveBackoffDuration:        to.Ptr[int64](0),
					PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
					StartTimestamp:             to.Ptr[int64](10),
					Timescale:                  to.Ptr[int64](10000000),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type AccountFiltersClientCreateOrUpdateOptions added in v0.3.0

type AccountFiltersClientCreateOrUpdateOptions struct {
}

AccountFiltersClientCreateOrUpdateOptions contains the optional parameters for the AccountFiltersClient.CreateOrUpdate method.

type AccountFiltersClientCreateOrUpdateResponse added in v0.3.0

type AccountFiltersClientCreateOrUpdateResponse struct {
	AccountFilter
}

AccountFiltersClientCreateOrUpdateResponse contains the response from method AccountFiltersClient.CreateOrUpdate.

type AccountFiltersClientDeleteOptions added in v0.3.0

type AccountFiltersClientDeleteOptions struct {
}

AccountFiltersClientDeleteOptions contains the optional parameters for the AccountFiltersClient.Delete method.

type AccountFiltersClientDeleteResponse added in v0.3.0

type AccountFiltersClientDeleteResponse struct {
}

AccountFiltersClientDeleteResponse contains the response from method AccountFiltersClient.Delete.

type AccountFiltersClientGetOptions added in v0.3.0

type AccountFiltersClientGetOptions struct {
}

AccountFiltersClientGetOptions contains the optional parameters for the AccountFiltersClient.Get method.

type AccountFiltersClientGetResponse added in v0.3.0

type AccountFiltersClientGetResponse struct {
	AccountFilter
}

AccountFiltersClientGetResponse contains the response from method AccountFiltersClient.Get.

type AccountFiltersClientListOptions added in v0.3.0

type AccountFiltersClientListOptions struct {
}

AccountFiltersClientListOptions contains the optional parameters for the AccountFiltersClient.List method.

type AccountFiltersClientListResponse added in v0.3.0

type AccountFiltersClientListResponse struct {
	AccountFilterCollection
}

AccountFiltersClientListResponse contains the response from method AccountFiltersClient.List.

type AccountFiltersClientUpdateOptions added in v0.3.0

type AccountFiltersClientUpdateOptions struct {
}

AccountFiltersClientUpdateOptions contains the optional parameters for the AccountFiltersClient.Update method.

type AccountFiltersClientUpdateResponse added in v0.3.0

type AccountFiltersClientUpdateResponse struct {
	AccountFilter
}

AccountFiltersClientUpdateResponse contains the response from method AccountFiltersClient.Update.

type ActionType

type ActionType string

ActionType - Indicates the action type.

const (
	// ActionTypeInternal - An internal action.
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type AkamaiAccessControl

type AkamaiAccessControl struct {
	// authentication key list
	AkamaiSignatureHeaderAuthenticationKeyList []*AkamaiSignatureHeaderAuthenticationKey `json:"akamaiSignatureHeaderAuthenticationKeyList,omitempty"`
}

AkamaiAccessControl - Akamai access control

func (AkamaiAccessControl) MarshalJSON

func (a AkamaiAccessControl) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AkamaiAccessControl.

type AkamaiSignatureHeaderAuthenticationKey

type AkamaiSignatureHeaderAuthenticationKey struct {
	// authentication key
	Base64Key *string `json:"base64Key,omitempty"`

	// The expiration time of the authentication key.
	Expiration *time.Time `json:"expiration,omitempty"`

	// identifier of the key
	Identifier *string `json:"identifier,omitempty"`
}

AkamaiSignatureHeaderAuthenticationKey - Akamai Signature Header authentication key.

func (AkamaiSignatureHeaderAuthenticationKey) MarshalJSON

func (a AkamaiSignatureHeaderAuthenticationKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AkamaiSignatureHeaderAuthenticationKey.

func (*AkamaiSignatureHeaderAuthenticationKey) UnmarshalJSON

func (a *AkamaiSignatureHeaderAuthenticationKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AkamaiSignatureHeaderAuthenticationKey.

type AnalysisResolution

type AnalysisResolution string

AnalysisResolution - Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will keep the input video at its original resolution when analyzed. Using "StandardDefinition" will resize input videos to standard definition while preserving the appropriate aspect ratio. It will only resize if the video is of higher resolution. For example, a 1920x1080 input would be scaled to 640x360 before processing. Switching to "StandardDefinition" will reduce the time it takes to process high resolution video. It may also reduce the cost of using this component (see https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics for details). However, faces that end up being too small in the resized video may not be detected.

const (
	AnalysisResolutionSourceResolution   AnalysisResolution = "SourceResolution"
	AnalysisResolutionStandardDefinition AnalysisResolution = "StandardDefinition"
)

func PossibleAnalysisResolutionValues

func PossibleAnalysisResolutionValues() []AnalysisResolution

PossibleAnalysisResolutionValues returns the possible values for the AnalysisResolution const type.

type ArmStreamingEndpointCapacity added in v0.4.0

type ArmStreamingEndpointCapacity struct {
	// The streaming endpoint default capacity.
	Default *int32 `json:"default,omitempty"`

	// The streaming endpoint maximum capacity.
	Maximum *int32 `json:"maximum,omitempty"`

	// The streaming endpoint minimum capacity.
	Minimum *int32 `json:"minimum,omitempty"`

	// READ-ONLY
	ScaleType *string `json:"scaleType,omitempty" azure:"ro"`
}

ArmStreamingEndpointCapacity - The streaming endpoint sku capacity.

type ArmStreamingEndpointCurrentSKU added in v0.4.0

type ArmStreamingEndpointCurrentSKU struct {
	// The streaming endpoint sku capacity.
	Capacity *int32 `json:"capacity,omitempty"`

	// READ-ONLY; The streaming endpoint sku name.
	Name *string `json:"name,omitempty" azure:"ro"`
}

ArmStreamingEndpointCurrentSKU - The streaming endpoint current sku.

type ArmStreamingEndpointSKU added in v0.4.0

type ArmStreamingEndpointSKU struct {
	// READ-ONLY; The streaming endpoint sku name.
	Name *string `json:"name,omitempty" azure:"ro"`
}

ArmStreamingEndpointSKU - The streaming endpoint sku.

type ArmStreamingEndpointSKUInfo added in v0.4.0

type ArmStreamingEndpointSKUInfo struct {
	// The streaming endpoint sku capacity.
	Capacity     *ArmStreamingEndpointCapacity `json:"capacity,omitempty"`
	ResourceType *string                       `json:"resourceType,omitempty"`

	// The streaming endpoint sku.
	SKU *ArmStreamingEndpointSKU `json:"sku,omitempty"`
}

type Asset

type Asset struct {
	// The resource properties.
	Properties *AssetProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Asset - An Asset.

func (Asset) MarshalJSON

func (a Asset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Asset.

type AssetCollection

type AssetCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string `json:"@odata.nextLink,omitempty"`

	// A collection of Asset items.
	Value []*Asset `json:"value,omitempty"`
}

AssetCollection - A collection of Asset items.

type AssetContainerPermission

type AssetContainerPermission string

AssetContainerPermission - The permissions to set on the SAS URL.

const (
	// AssetContainerPermissionRead - The SAS URL will allow read access to the container.
	AssetContainerPermissionRead AssetContainerPermission = "Read"
	// AssetContainerPermissionReadWrite - The SAS URL will allow read and write access to the container.
	AssetContainerPermissionReadWrite AssetContainerPermission = "ReadWrite"
	// AssetContainerPermissionReadWriteDelete - The SAS URL will allow read, write and delete access to the container.
	AssetContainerPermissionReadWriteDelete AssetContainerPermission = "ReadWriteDelete"
)

func PossibleAssetContainerPermissionValues

func PossibleAssetContainerPermissionValues() []AssetContainerPermission

PossibleAssetContainerPermissionValues returns the possible values for the AssetContainerPermission const type.

type AssetContainerSas

type AssetContainerSas struct {
	// The list of Asset container SAS URLs.
	AssetContainerSasUrls []*string `json:"assetContainerSasUrls,omitempty"`
}

AssetContainerSas - The Asset Storage container SAS URLs.

type AssetFileEncryptionMetadata

type AssetFileEncryptionMetadata struct {
	// REQUIRED; The Asset File Id.
	AssetFileID *string `json:"assetFileId,omitempty"`

	// The Asset File name.
	AssetFileName *string `json:"assetFileName,omitempty"`

	// The Asset File initialization vector.
	InitializationVector *string `json:"initializationVector,omitempty"`
}

AssetFileEncryptionMetadata - The Asset File Storage encryption metadata.

type AssetFilter

type AssetFilter struct {
	// The Media Filter properties.
	Properties *MediaFilterProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

AssetFilter - An Asset Filter.

func (AssetFilter) MarshalJSON

func (a AssetFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetFilter.

type AssetFilterCollection

type AssetFilterCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string `json:"@odata.nextLink,omitempty"`

	// A collection of AssetFilter items.
	Value []*AssetFilter `json:"value,omitempty"`
}

AssetFilterCollection - A collection of AssetFilter items.

type AssetFiltersClient

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

AssetFiltersClient contains the methods for the AssetFilters group. Don't use this type directly, use NewAssetFiltersClient() instead.

func NewAssetFiltersClient

func NewAssetFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AssetFiltersClient, error)

NewAssetFiltersClient creates a new instance of AssetFiltersClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AssetFiltersClient) CreateOrUpdate

func (client *AssetFiltersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string, parameters AssetFilter, options *AssetFiltersClientCreateOrUpdateOptions) (AssetFiltersClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates an Asset Filter associated with the specified Asset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. filterName - The Asset Filter name parameters - The request parameters options - AssetFiltersClientCreateOrUpdateOptions contains the optional parameters for the AssetFiltersClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/assetFilters-create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAssetFiltersClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountRainer",
		"newAssetFilter",
		armmediaservices.AssetFilter{
			Properties: &armmediaservices.MediaFilterProperties{
				FirstQuality: &armmediaservices.FirstQuality{
					Bitrate: to.Ptr[int32](128000),
				},
				PresentationTimeRange: &armmediaservices.PresentationTimeRange{
					EndTimestamp:               to.Ptr[int64](170000000),
					ForceEndTimestamp:          to.Ptr(false),
					LiveBackoffDuration:        to.Ptr[int64](0),
					PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
					StartTimestamp:             to.Ptr[int64](0),
					Timescale:                  to.Ptr[int64](10000000),
				},
				Tracks: []*armmediaservices.FilterTrackSelection{
					{
						TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
							{
								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
								Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
								Value:     to.Ptr("Audio"),
							},
							{
								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
								Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeLanguage),
								Value:     to.Ptr("en"),
							},
							{
								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationNotEqual),
								Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeFourCC),
								Value:     to.Ptr("EC-3"),
							}},
					},
					{
						TrackSelections: []*armmediaservices.FilterTrackPropertyCondition{
							{
								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
								Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeType),
								Value:     to.Ptr("Video"),
							},
							{
								Operation: to.Ptr(armmediaservices.FilterTrackPropertyCompareOperationEqual),
								Property:  to.Ptr(armmediaservices.FilterTrackPropertyTypeBitrate),
								Value:     to.Ptr("3000000-5000000"),
							}},
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AssetFiltersClient) Delete

func (client *AssetFiltersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string, options *AssetFiltersClientDeleteOptions) (AssetFiltersClientDeleteResponse, error)

Delete - Deletes an Asset Filter associated with the specified Asset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. filterName - The Asset Filter name options - AssetFiltersClientDeleteOptions contains the optional parameters for the AssetFiltersClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/assetFilters-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAssetFiltersClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountRainer",
		"assetFilterWithTimeWindowAndTrack",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AssetFiltersClient) Get

func (client *AssetFiltersClient) Get(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string, options *AssetFiltersClientGetOptions) (AssetFiltersClientGetResponse, error)

Get - Get the details of an Asset Filter associated with the specified Asset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. filterName - The Asset Filter name options - AssetFiltersClientGetOptions contains the optional parameters for the AssetFiltersClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/assetFilters-get-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAssetFiltersClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountRainer",
		"assetFilterWithTimeWindowAndTrack",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AssetFiltersClient) NewListPager added in v0.6.0

func (client *AssetFiltersClient) NewListPager(resourceGroupName string, accountName string, assetName string, options *AssetFiltersClientListOptions) *runtime.Pager[AssetFiltersClientListResponse]

NewListPager - List Asset Filters associated with the specified Asset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. options - AssetFiltersClientListOptions contains the optional parameters for the AssetFiltersClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/assetFilters-list-all.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAssetFiltersClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("contoso",
		"contosomedia",
		"ClimbingMountRainer",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AssetFiltersClient) Update

func (client *AssetFiltersClient) Update(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string, parameters AssetFilter, options *AssetFiltersClientUpdateOptions) (AssetFiltersClientUpdateResponse, error)

Update - Updates an existing Asset Filter associated with the specified Asset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. filterName - The Asset Filter name parameters - The request parameters options - AssetFiltersClientUpdateOptions contains the optional parameters for the AssetFiltersClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/assetFilters-update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAssetFiltersClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountRainer",
		"assetFilterWithTimeWindowAndTrack",
		armmediaservices.AssetFilter{
			Properties: &armmediaservices.MediaFilterProperties{
				FirstQuality: &armmediaservices.FirstQuality{
					Bitrate: to.Ptr[int32](128000),
				},
				PresentationTimeRange: &armmediaservices.PresentationTimeRange{
					EndTimestamp:               to.Ptr[int64](170000000),
					ForceEndTimestamp:          to.Ptr(false),
					LiveBackoffDuration:        to.Ptr[int64](0),
					PresentationWindowDuration: to.Ptr[int64](9223372036854775000),
					StartTimestamp:             to.Ptr[int64](10),
					Timescale:                  to.Ptr[int64](10000000),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type AssetFiltersClientCreateOrUpdateOptions added in v0.3.0

type AssetFiltersClientCreateOrUpdateOptions struct {
}

AssetFiltersClientCreateOrUpdateOptions contains the optional parameters for the AssetFiltersClient.CreateOrUpdate method.

type AssetFiltersClientCreateOrUpdateResponse added in v0.3.0

type AssetFiltersClientCreateOrUpdateResponse struct {
	AssetFilter
}

AssetFiltersClientCreateOrUpdateResponse contains the response from method AssetFiltersClient.CreateOrUpdate.

type AssetFiltersClientDeleteOptions added in v0.3.0

type AssetFiltersClientDeleteOptions struct {
}

AssetFiltersClientDeleteOptions contains the optional parameters for the AssetFiltersClient.Delete method.

type AssetFiltersClientDeleteResponse added in v0.3.0

type AssetFiltersClientDeleteResponse struct {
}

AssetFiltersClientDeleteResponse contains the response from method AssetFiltersClient.Delete.

type AssetFiltersClientGetOptions added in v0.3.0

type AssetFiltersClientGetOptions struct {
}

AssetFiltersClientGetOptions contains the optional parameters for the AssetFiltersClient.Get method.

type AssetFiltersClientGetResponse added in v0.3.0

type AssetFiltersClientGetResponse struct {
	AssetFilter
}

AssetFiltersClientGetResponse contains the response from method AssetFiltersClient.Get.

type AssetFiltersClientListOptions added in v0.3.0

type AssetFiltersClientListOptions struct {
}

AssetFiltersClientListOptions contains the optional parameters for the AssetFiltersClient.List method.

type AssetFiltersClientListResponse added in v0.3.0

type AssetFiltersClientListResponse struct {
	AssetFilterCollection
}

AssetFiltersClientListResponse contains the response from method AssetFiltersClient.List.

type AssetFiltersClientUpdateOptions added in v0.3.0

type AssetFiltersClientUpdateOptions struct {
}

AssetFiltersClientUpdateOptions contains the optional parameters for the AssetFiltersClient.Update method.

type AssetFiltersClientUpdateResponse added in v0.3.0

type AssetFiltersClientUpdateResponse struct {
	AssetFilter
}

AssetFiltersClientUpdateResponse contains the response from method AssetFiltersClient.Update.

type AssetProperties

type AssetProperties struct {
	// The alternate ID of the Asset.
	AlternateID *string `json:"alternateId,omitempty"`

	// The name of the asset blob container.
	Container *string `json:"container,omitempty"`

	// The Asset description.
	Description *string `json:"description,omitempty"`

	// The name of the storage account.
	StorageAccountName *string `json:"storageAccountName,omitempty"`

	// READ-ONLY; The Asset ID.
	AssetID *string `json:"assetId,omitempty" azure:"ro"`

	// READ-ONLY; The creation date of the Asset.
	Created *time.Time `json:"created,omitempty" azure:"ro"`

	// READ-ONLY; The last modified date of the Asset.
	LastModified *time.Time `json:"lastModified,omitempty" azure:"ro"`

	// READ-ONLY; The Asset encryption format. One of None or MediaStorageEncryption.
	StorageEncryptionFormat *AssetStorageEncryptionFormat `json:"storageEncryptionFormat,omitempty" azure:"ro"`
}

AssetProperties - The Asset properties.

func (AssetProperties) MarshalJSON

func (a AssetProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetProperties.

func (*AssetProperties) UnmarshalJSON

func (a *AssetProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetProperties.

type AssetStorageEncryptionFormat

type AssetStorageEncryptionFormat string

AssetStorageEncryptionFormat - The Asset encryption format. One of None or MediaStorageEncryption.

const (
	// AssetStorageEncryptionFormatMediaStorageClientEncryption - The Asset is encrypted with Media Services client-side encryption.
	AssetStorageEncryptionFormatMediaStorageClientEncryption AssetStorageEncryptionFormat = "MediaStorageClientEncryption"
	// AssetStorageEncryptionFormatNone - The Asset does not use client-side storage encryption (this is the only allowed value
	// for new Assets).
	AssetStorageEncryptionFormatNone AssetStorageEncryptionFormat = "None"
)

func PossibleAssetStorageEncryptionFormatValues

func PossibleAssetStorageEncryptionFormatValues() []AssetStorageEncryptionFormat

PossibleAssetStorageEncryptionFormatValues returns the possible values for the AssetStorageEncryptionFormat const type.

type AssetStreamingLocator

type AssetStreamingLocator struct {
	// READ-ONLY; Asset Name.
	AssetName *string `json:"assetName,omitempty" azure:"ro"`

	// READ-ONLY; The creation time of the Streaming Locator.
	Created *time.Time `json:"created,omitempty" azure:"ro"`

	// READ-ONLY; Name of the default ContentKeyPolicy used by this Streaming Locator.
	DefaultContentKeyPolicyName *string `json:"defaultContentKeyPolicyName,omitempty" azure:"ro"`

	// READ-ONLY; The end time of the Streaming Locator.
	EndTime *time.Time `json:"endTime,omitempty" azure:"ro"`

	// READ-ONLY; Streaming Locator name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The start time of the Streaming Locator.
	StartTime *time.Time `json:"startTime,omitempty" azure:"ro"`

	// READ-ONLY; StreamingLocatorId of the Streaming Locator.
	StreamingLocatorID *string `json:"streamingLocatorId,omitempty" azure:"ro"`

	// READ-ONLY; Name of the Streaming Policy used by this Streaming Locator.
	StreamingPolicyName *string `json:"streamingPolicyName,omitempty" azure:"ro"`
}

AssetStreamingLocator - Properties of the Streaming Locator.

func (*AssetStreamingLocator) UnmarshalJSON

func (a *AssetStreamingLocator) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetStreamingLocator.

type AssetTrack added in v0.4.0

type AssetTrack struct {
	// The resource properties.
	Properties *AssetTrackProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

AssetTrack - An Asset Track resource.

func (AssetTrack) MarshalJSON added in v0.4.0

func (a AssetTrack) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetTrack.

type AssetTrackCollection added in v0.4.0

type AssetTrackCollection struct {
	// A collection of AssetTrack items.
	Value []*AssetTrack `json:"value,omitempty"`
}

AssetTrackCollection - A collection of AssetTrack items.

type AssetTrackOperationStatus added in v0.4.0

type AssetTrackOperationStatus struct {
	// REQUIRED; Operation identifier.
	Name *string `json:"name,omitempty"`

	// REQUIRED; Operation status.
	Status *string `json:"status,omitempty"`

	// Operation end time.
	EndTime *time.Time `json:"endTime,omitempty"`

	// The error detail.
	Error *ErrorDetail `json:"error,omitempty"`

	// Operation resource ID.
	ID *string `json:"id,omitempty"`

	// Operation start time.
	StartTime *time.Time `json:"startTime,omitempty"`
}

AssetTrackOperationStatus - Status of asset track operation.

func (*AssetTrackOperationStatus) UnmarshalJSON added in v0.4.0

func (a *AssetTrackOperationStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetTrackOperationStatus.

type AssetTrackProperties added in v0.4.0

type AssetTrackProperties struct {
	// Detailed information about a track in the asset.
	Track TrackBaseClassification `json:"track,omitempty"`

	// READ-ONLY; Provisioning state of the asset track.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

AssetTrackProperties - Properties of a video, audio or text track in the asset.

func (AssetTrackProperties) MarshalJSON added in v0.4.0

func (a AssetTrackProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssetTrackProperties.

func (*AssetTrackProperties) UnmarshalJSON added in v0.4.0

func (a *AssetTrackProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssetTrackProperties.

type AssetsClient

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

AssetsClient contains the methods for the Assets group. Don't use this type directly, use NewAssetsClient() instead.

func NewAssetsClient

func NewAssetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AssetsClient, error)

NewAssetsClient creates a new instance of AssetsClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AssetsClient) CreateOrUpdate

func (client *AssetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters Asset, options *AssetsClientCreateOrUpdateOptions) (AssetsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates an Asset in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. parameters - The request parameters options - AssetsClientCreateOrUpdateOptions contains the optional parameters for the AssetsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/assets-create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAssetsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountLogan",
		armmediaservices.Asset{
			Properties: &armmediaservices.AssetProperties{
				Description:        to.Ptr("A documentary showing the ascent of Mount Logan"),
				StorageAccountName: to.Ptr("storage0"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AssetsClient) Delete

func (client *AssetsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, assetName string, options *AssetsClientDeleteOptions) (AssetsClientDeleteResponse, error)

Delete - Deletes an Asset in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. options - AssetsClientDeleteOptions contains the optional parameters for the AssetsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/assets-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAssetsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountAdams",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AssetsClient) Get

func (client *AssetsClient) Get(ctx context.Context, resourceGroupName string, accountName string, assetName string, options *AssetsClientGetOptions) (AssetsClientGetResponse, error)

Get - Get the details of an Asset in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. options - AssetsClientGetOptions contains the optional parameters for the AssetsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/assets-get-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAssetsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountAdams",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AssetsClient) GetEncryptionKey

func (client *AssetsClient) GetEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, assetName string, options *AssetsClientGetEncryptionKeyOptions) (AssetsClientGetEncryptionKeyResponse, error)

GetEncryptionKey - Gets the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. options - AssetsClientGetEncryptionKeyOptions contains the optional parameters for the AssetsClient.GetEncryptionKey method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/assets-get-encryption-keys.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAssetsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetEncryptionKey(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountSaintHelens",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AssetsClient) ListContainerSas

func (client *AssetsClient) ListContainerSas(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters ListContainerSasInput, options *AssetsClientListContainerSasOptions) (AssetsClientListContainerSasResponse, error)

ListContainerSas - Lists storage container URLs with shared access signatures (SAS) for uploading and downloading Asset content. The signatures are derived from the storage account keys. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. parameters - The request parameters options - AssetsClientListContainerSasOptions contains the optional parameters for the AssetsClient.ListContainerSas method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/assets-list-sas-urls.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAssetsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListContainerSas(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountBaker",
		armmediaservices.ListContainerSasInput{
			ExpiryTime:  to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-01T10:00:00.007Z"); return t }()),
			Permissions: to.Ptr(armmediaservices.AssetContainerPermissionReadWrite),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AssetsClient) ListStreamingLocators

func (client *AssetsClient) ListStreamingLocators(ctx context.Context, resourceGroupName string, accountName string, assetName string, options *AssetsClientListStreamingLocatorsOptions) (AssetsClientListStreamingLocatorsResponse, error)

ListStreamingLocators - Lists Streaming Locators which are associated with this asset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. options - AssetsClientListStreamingLocatorsOptions contains the optional parameters for the AssetsClient.ListStreamingLocators method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/assets-list-streaming-locators.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAssetsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListStreamingLocators(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountSaintHelens",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AssetsClient) NewListPager added in v0.6.0

func (client *AssetsClient) NewListPager(resourceGroupName string, accountName string, options *AssetsClientListOptions) *runtime.Pager[AssetsClientListResponse]

NewListPager - List Assets in the Media Services account with optional filtering and ordering If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - AssetsClientListOptions contains the optional parameters for the AssetsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/assets-list-in-date-range.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAssetsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("contoso",
		"contosomedia",
		&armmediaservices.AssetsClientListOptions{Filter: to.Ptr("properties/created gt 2012-06-01 and properties/created lt 2013-07-01"),
			Top:     nil,
			Orderby: to.Ptr("properties/created"),
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AssetsClient) Update

func (client *AssetsClient) Update(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters Asset, options *AssetsClientUpdateOptions) (AssetsClientUpdateResponse, error)

Update - Updates an existing Asset in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. parameters - The request parameters options - AssetsClientUpdateOptions contains the optional parameters for the AssetsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/assets-update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewAssetsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountBaker",
		armmediaservices.Asset{
			Properties: &armmediaservices.AssetProperties{
				Description: to.Ptr("A documentary showing the ascent of Mount Baker in HD"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type AssetsClientCreateOrUpdateOptions added in v0.3.0

type AssetsClientCreateOrUpdateOptions struct {
}

AssetsClientCreateOrUpdateOptions contains the optional parameters for the AssetsClient.CreateOrUpdate method.

type AssetsClientCreateOrUpdateResponse added in v0.3.0

type AssetsClientCreateOrUpdateResponse struct {
	Asset
}

AssetsClientCreateOrUpdateResponse contains the response from method AssetsClient.CreateOrUpdate.

type AssetsClientDeleteOptions added in v0.3.0

type AssetsClientDeleteOptions struct {
}

AssetsClientDeleteOptions contains the optional parameters for the AssetsClient.Delete method.

type AssetsClientDeleteResponse added in v0.3.0

type AssetsClientDeleteResponse struct {
}

AssetsClientDeleteResponse contains the response from method AssetsClient.Delete.

type AssetsClientGetEncryptionKeyOptions added in v0.3.0

type AssetsClientGetEncryptionKeyOptions struct {
}

AssetsClientGetEncryptionKeyOptions contains the optional parameters for the AssetsClient.GetEncryptionKey method.

type AssetsClientGetEncryptionKeyResponse added in v0.3.0

type AssetsClientGetEncryptionKeyResponse struct {
	StorageEncryptedAssetDecryptionData
}

AssetsClientGetEncryptionKeyResponse contains the response from method AssetsClient.GetEncryptionKey.

type AssetsClientGetOptions added in v0.3.0

type AssetsClientGetOptions struct {
}

AssetsClientGetOptions contains the optional parameters for the AssetsClient.Get method.

type AssetsClientGetResponse added in v0.3.0

type AssetsClientGetResponse struct {
	Asset
}

AssetsClientGetResponse contains the response from method AssetsClient.Get.

type AssetsClientListContainerSasOptions added in v0.3.0

type AssetsClientListContainerSasOptions struct {
}

AssetsClientListContainerSasOptions contains the optional parameters for the AssetsClient.ListContainerSas method.

type AssetsClientListContainerSasResponse added in v0.3.0

type AssetsClientListContainerSasResponse struct {
	AssetContainerSas
}

AssetsClientListContainerSasResponse contains the response from method AssetsClient.ListContainerSas.

type AssetsClientListOptions added in v0.3.0

type AssetsClientListOptions struct {
	// Restricts the set of items returned.
	Filter *string
	// Specifies the key by which the result collection should be ordered.
	Orderby *string
	// Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the
	// number of available items up to but not greater than the specified value n.
	Top *int32
}

AssetsClientListOptions contains the optional parameters for the AssetsClient.List method.

type AssetsClientListResponse added in v0.3.0

type AssetsClientListResponse struct {
	AssetCollection
}

AssetsClientListResponse contains the response from method AssetsClient.List.

type AssetsClientListStreamingLocatorsOptions added in v0.3.0

type AssetsClientListStreamingLocatorsOptions struct {
}

AssetsClientListStreamingLocatorsOptions contains the optional parameters for the AssetsClient.ListStreamingLocators method.

type AssetsClientListStreamingLocatorsResponse added in v0.3.0

type AssetsClientListStreamingLocatorsResponse struct {
	ListStreamingLocatorsResponse
}

AssetsClientListStreamingLocatorsResponse contains the response from method AssetsClient.ListStreamingLocators.

type AssetsClientUpdateOptions added in v0.3.0

type AssetsClientUpdateOptions struct {
}

AssetsClientUpdateOptions contains the optional parameters for the AssetsClient.Update method.

type AssetsClientUpdateResponse added in v0.3.0

type AssetsClientUpdateResponse struct {
	Asset
}

AssetsClientUpdateResponse contains the response from method AssetsClient.Update.

type AttributeFilter

type AttributeFilter string

AttributeFilter - The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks.

const (
	// AttributeFilterAll - All tracks will be included.
	AttributeFilterAll AttributeFilter = "All"
	// AttributeFilterBottom - The first track will be included when the attribute is sorted in ascending order. Generally used
	// to select the smallest bitrate.
	AttributeFilterBottom AttributeFilter = "Bottom"
	// AttributeFilterTop - The first track will be included when the attribute is sorted in descending order. Generally used
	// to select the largest bitrate.
	AttributeFilterTop AttributeFilter = "Top"
	// AttributeFilterValueEquals - Any tracks that have an attribute equal to the value given will be included.
	AttributeFilterValueEquals AttributeFilter = "ValueEquals"
)

func PossibleAttributeFilterValues

func PossibleAttributeFilterValues() []AttributeFilter

PossibleAttributeFilterValues returns the possible values for the AttributeFilter const type.

type Audio

type Audio struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The bitrate, in bits per second, of the output encoded audio.
	Bitrate *int32 `json:"bitrate,omitempty"`

	// The number of channels in the audio.
	Channels *int32 `json:"channels,omitempty"`

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string `json:"label,omitempty"`

	// The sampling rate to use for encoding in hertz.
	SamplingRate *int32 `json:"samplingRate,omitempty"`
}

Audio - Defines the common properties for all audio codecs.

func (*Audio) GetAudio

func (a *Audio) GetAudio() *Audio

GetAudio implements the AudioClassification interface for type Audio.

func (*Audio) GetCodec added in v0.3.0

func (a *Audio) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type Audio.

func (Audio) MarshalJSON

func (a Audio) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Audio.

func (*Audio) UnmarshalJSON

func (a *Audio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Audio.

type AudioAnalysisMode

type AudioAnalysisMode string

AudioAnalysisMode - Determines the set of audio analysis operations to be performed. If unspecified, the Standard AudioAnalysisMode would be chosen.

const (
	// AudioAnalysisModeBasic - This mode performs speech-to-text transcription and generation of a VTT subtitle/caption file.
	// The output of this mode includes an Insights JSON file including only the keywords, transcription,and timing information.
	// Automatic language detection and speaker diarization are not included in this mode.
	AudioAnalysisModeBasic AudioAnalysisMode = "Basic"
	// AudioAnalysisModeStandard - Performs all operations included in the Basic mode, additionally performing language detection
	// and speaker diarization.
	AudioAnalysisModeStandard AudioAnalysisMode = "Standard"
)

func PossibleAudioAnalysisModeValues

func PossibleAudioAnalysisModeValues() []AudioAnalysisMode

PossibleAudioAnalysisModeValues returns the possible values for the AudioAnalysisMode const type.

type AudioAnalyzerPreset

type AudioAnalyzerPreset struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you
	// know the language of your content, it is recommended that you specify it. The
	// language must be specified explicitly for AudioAnalysisMode::Basic, since automatic language detection is not included
	// in basic mode. If the language isn't specified or set to null, automatic language
	// detection will choose the first language detected and process with the selected language for the duration of the file.
	// It does not currently support dynamically switching between languages after the
	// first language is detected. The automatic detection works best with audio recordings with clearly discernable speech. If
	// automatic detection fails to find the language, transcription would fallback to
	// 'en-US'." The list of supported languages is available here: https://go.microsoft.com/fwlink/?linkid=2109463
	AudioLanguage *string `json:"audioLanguage,omitempty"`

	// Dictionary containing key value pairs for parameters not exposed in the preset itself
	ExperimentalOptions map[string]*string `json:"experimentalOptions,omitempty"`

	// Determines the set of audio analysis operations to be performed. If unspecified, the Standard AudioAnalysisMode would be
	// chosen.
	Mode *AudioAnalysisMode `json:"mode,omitempty"`
}

AudioAnalyzerPreset - The Audio Analyzer preset applies a pre-defined set of AI-based analysis operations, including speech transcription. Currently, the preset supports processing of content with a single audio track.

func (*AudioAnalyzerPreset) GetAudioAnalyzerPreset

func (a *AudioAnalyzerPreset) GetAudioAnalyzerPreset() *AudioAnalyzerPreset

GetAudioAnalyzerPreset implements the AudioAnalyzerPresetClassification interface for type AudioAnalyzerPreset.

func (*AudioAnalyzerPreset) GetPreset added in v0.3.0

func (a *AudioAnalyzerPreset) GetPreset() *Preset

GetPreset implements the PresetClassification interface for type AudioAnalyzerPreset.

func (AudioAnalyzerPreset) MarshalJSON

func (a AudioAnalyzerPreset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AudioAnalyzerPreset.

func (*AudioAnalyzerPreset) UnmarshalJSON

func (a *AudioAnalyzerPreset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AudioAnalyzerPreset.

type AudioAnalyzerPresetClassification

type AudioAnalyzerPresetClassification interface {
	PresetClassification
	// GetAudioAnalyzerPreset returns the AudioAnalyzerPreset content of the underlying type.
	GetAudioAnalyzerPreset() *AudioAnalyzerPreset
}

AudioAnalyzerPresetClassification provides polymorphic access to related types. Call the interface's GetAudioAnalyzerPreset() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AudioAnalyzerPreset, *VideoAnalyzerPreset

type AudioClassification

type AudioClassification interface {
	CodecClassification
	// GetAudio returns the Audio content of the underlying type.
	GetAudio() *Audio
}

AudioClassification provides polymorphic access to related types. Call the interface's GetAudio() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AacAudio, *Audio

type AudioOverlay

type AudioOverlay struct {
	// REQUIRED; The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can
	// specify an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV,
	// MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video
	// file formats.
	InputLabel *string `json:"inputLabel,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0.
	AudioGainLevel *float64 `json:"audioGainLevel,omitempty"`

	// The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format.
	// For example, PT30S to end the overlay at 30 seconds into the input video. If not
	// specified or the value is greater than the input video duration, the overlay will be applied until the end of the input
	// video if the overlay media duration is greater than the input video duration,
	// else the overlay will last as long as the overlay media duration.
	End *string `json:"end,omitempty"`

	// The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If
	// not specified the default behavior is to have no fade in (same as PT0S).
	FadeInDuration *string `json:"fadeInDuration,omitempty"`

	// The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not
	// specified the default behavior is to have no fade out (same as PT0S).
	FadeOutDuration *string `json:"fadeOutDuration,omitempty"`

	// The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format.
	// For example, PT05S to start the overlay at 5 seconds into the input video.
	// If not specified the overlay starts from the beginning of the input video.
	Start *string `json:"start,omitempty"`
}

AudioOverlay - Describes the properties of an audio overlay.

func (*AudioOverlay) GetOverlay added in v0.3.0

func (a *AudioOverlay) GetOverlay() *Overlay

GetOverlay implements the OverlayClassification interface for type AudioOverlay.

func (AudioOverlay) MarshalJSON

func (a AudioOverlay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AudioOverlay.

func (*AudioOverlay) UnmarshalJSON added in v0.3.0

func (a *AudioOverlay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AudioOverlay.

type AudioTrack added in v0.4.0

type AudioTrack struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

AudioTrack - Represents an audio track in the asset.

func (*AudioTrack) GetTrackBase added in v0.4.0

func (a *AudioTrack) GetTrackBase() *TrackBase

GetTrackBase implements the TrackBaseClassification interface for type AudioTrack.

func (AudioTrack) MarshalJSON added in v0.4.0

func (a AudioTrack) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AudioTrack.

func (*AudioTrack) UnmarshalJSON added in v0.4.0

func (a *AudioTrack) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AudioTrack.

type AudioTrackDescriptor

type AudioTrackDescriptor struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio
	// tracks.
	ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"`
}

AudioTrackDescriptor - A TrackSelection to select audio tracks.

func (*AudioTrackDescriptor) GetAudioTrackDescriptor

func (a *AudioTrackDescriptor) GetAudioTrackDescriptor() *AudioTrackDescriptor

GetAudioTrackDescriptor implements the AudioTrackDescriptorClassification interface for type AudioTrackDescriptor.

func (*AudioTrackDescriptor) GetTrackDescriptor added in v0.3.0

func (a *AudioTrackDescriptor) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type AudioTrackDescriptor.

func (AudioTrackDescriptor) MarshalJSON

func (a AudioTrackDescriptor) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AudioTrackDescriptor.

func (*AudioTrackDescriptor) UnmarshalJSON

func (a *AudioTrackDescriptor) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AudioTrackDescriptor.

type AudioTrackDescriptorClassification

type AudioTrackDescriptorClassification interface {
	TrackDescriptorClassification
	// GetAudioTrackDescriptor returns the AudioTrackDescriptor content of the underlying type.
	GetAudioTrackDescriptor() *AudioTrackDescriptor
}

AudioTrackDescriptorClassification provides polymorphic access to related types. Call the interface's GetAudioTrackDescriptor() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AudioTrackDescriptor, *SelectAudioTrackByAttribute, *SelectAudioTrackByID

type BlurType

type BlurType string

BlurType - Blur type

const (
	// BlurTypeBlack - Black: Black out filter
	BlurTypeBlack BlurType = "Black"
	// BlurTypeBox - Box: debug filter, bounding box only
	BlurTypeBox BlurType = "Box"
	// BlurTypeHigh - High: Confuse blur filter
	BlurTypeHigh BlurType = "High"
	// BlurTypeLow - Low: box-car blur filter
	BlurTypeLow BlurType = "Low"
	// BlurTypeMed - Med: Gaussian blur filter
	BlurTypeMed BlurType = "Med"
)

func PossibleBlurTypeValues

func PossibleBlurTypeValues() []BlurType

PossibleBlurTypeValues returns the possible values for the BlurType const type.

type BuiltInStandardEncoderPreset

type BuiltInStandardEncoderPreset struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// REQUIRED; The built-in preset to be used for encoding videos.
	PresetName *EncoderNamedPreset `json:"presetName,omitempty"`

	// Optional configuration settings for encoder. Configurations is only supported for ContentAwareEncoding and H265ContentAwareEncoding
	// BuiltInStandardEncoderPreset.
	Configurations *PresetConfigurations `json:"configurations,omitempty"`
}

BuiltInStandardEncoderPreset - Describes a built-in preset for encoding the input video with the Standard Encoder.

func (*BuiltInStandardEncoderPreset) GetPreset added in v0.3.0

func (b *BuiltInStandardEncoderPreset) GetPreset() *Preset

GetPreset implements the PresetClassification interface for type BuiltInStandardEncoderPreset.

func (BuiltInStandardEncoderPreset) MarshalJSON

func (b BuiltInStandardEncoderPreset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuiltInStandardEncoderPreset.

func (*BuiltInStandardEncoderPreset) UnmarshalJSON

func (b *BuiltInStandardEncoderPreset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuiltInStandardEncoderPreset.

type CbcsDrmConfiguration

type CbcsDrmConfiguration struct {
	// FairPlay configurations
	FairPlay *StreamingPolicyFairPlayConfiguration `json:"fairPlay,omitempty"`

	// PlayReady configurations
	PlayReady *StreamingPolicyPlayReadyConfiguration `json:"playReady,omitempty"`

	// Widevine configurations
	Widevine *StreamingPolicyWidevineConfiguration `json:"widevine,omitempty"`
}

CbcsDrmConfiguration - Class to specify DRM configurations of CommonEncryptionCbcs scheme in Streaming Policy

type CencDrmConfiguration

type CencDrmConfiguration struct {
	// PlayReady configurations
	PlayReady *StreamingPolicyPlayReadyConfiguration `json:"playReady,omitempty"`

	// Widevine configurations
	Widevine *StreamingPolicyWidevineConfiguration `json:"widevine,omitempty"`
}

CencDrmConfiguration - Class to specify DRM configurations of CommonEncryptionCenc scheme in Streaming Policy

type ChannelMapping

type ChannelMapping string

ChannelMapping - Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio tracks.

const (
	// ChannelMappingBackLeft - The Back Left Channel. Sometimes referred to as the Left Surround Channel.
	ChannelMappingBackLeft ChannelMapping = "BackLeft"
	// ChannelMappingBackRight - The Back Right Channel. Sometimes referred to as the Right Surround Channel.
	ChannelMappingBackRight ChannelMapping = "BackRight"
	// ChannelMappingCenter - The Center Channel.
	ChannelMappingCenter ChannelMapping = "Center"
	// ChannelMappingFrontLeft - The Front Left Channel.
	ChannelMappingFrontLeft ChannelMapping = "FrontLeft"
	// ChannelMappingFrontRight - The Front Right Channel.
	ChannelMappingFrontRight ChannelMapping = "FrontRight"
	// ChannelMappingLowFrequencyEffects - Low Frequency Effects Channel. Sometimes referred to as the Subwoofer.
	ChannelMappingLowFrequencyEffects ChannelMapping = "LowFrequencyEffects"
	// ChannelMappingStereoLeft - The Left Stereo channel. Sometimes referred to as Down Mix Left.
	ChannelMappingStereoLeft ChannelMapping = "StereoLeft"
	// ChannelMappingStereoRight - The Right Stereo channel. Sometimes referred to as Down Mix Right.
	ChannelMappingStereoRight ChannelMapping = "StereoRight"
)

func PossibleChannelMappingValues

func PossibleChannelMappingValues() []ChannelMapping

PossibleChannelMappingValues returns the possible values for the ChannelMapping const type.

type CheckNameAvailabilityInput

type CheckNameAvailabilityInput struct {
	// The account name.
	Name *string `json:"name,omitempty"`

	// The account type. For a Media Services account, this should be 'MediaServices'.
	Type *string `json:"type,omitempty"`
}

CheckNameAvailabilityInput - The input to the check name availability request.

type Client added in v0.3.0

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

Client contains the methods for the Mediaservices group. Don't use this type directly, use NewClient() instead.

func NewClient added in v0.3.0

func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)

NewClient creates a new instance of Client with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*Client) CreateOrUpdate added in v0.3.0

func (client *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, parameters MediaService, options *ClientCreateOrUpdateOptions) (ClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. parameters - The request parameters options - ClientCreateOrUpdateOptions contains the optional parameters for the Client.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"contoso",
		"contososports",
		armmediaservices.MediaService{
			Location: to.Ptr("South Central US"),
			Tags: map[string]*string{
				"key1": to.Ptr("value1"),
				"key2": to.Ptr("value2"),
			},
			Identity: &armmediaservices.MediaServiceIdentity{
				Type: to.Ptr("UserAssigned"),
				UserAssignedIdentities: map[string]*armmediaservices.UserAssignedManagedIdentity{
					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {},
				},
			},
			Properties: &armmediaservices.MediaServiceProperties{
				Encryption: &armmediaservices.AccountEncryption{
					Type: to.Ptr(armmediaservices.AccountEncryptionKeyTypeCustomerKey),
					Identity: &armmediaservices.ResourceIdentity{
						UseSystemAssignedIdentity: to.Ptr(false),
						UserAssignedIdentity:      to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
					},
					KeyVaultProperties: &armmediaservices.KeyVaultProperties{
						KeyIdentifier: to.Ptr("https://keyvault.vault.azure.net/keys/key1"),
					},
				},
				StorageAccounts: []*armmediaservices.StorageAccount{
					{
						Type: to.Ptr(armmediaservices.StorageAccountTypePrimary),
						ID:   to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore"),
						Identity: &armmediaservices.ResourceIdentity{
							UseSystemAssignedIdentity: to.Ptr(false),
							UserAssignedIdentity:      to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
						},
					}},
				StorageAuthentication: to.Ptr(armmediaservices.StorageAuthenticationManagedIdentity),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*Client) Delete added in v0.3.0

func (client *Client) Delete(ctx context.Context, resourceGroupName string, accountName string, options *ClientDeleteOptions) (ClientDeleteResponse, error)

Delete - Deletes a Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - ClientDeleteOptions contains the optional parameters for the Client.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"contoso",
		"contososports",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*Client) Get added in v0.3.0

func (client *Client) Get(ctx context.Context, resourceGroupName string, accountName string, options *ClientGetOptions) (ClientGetResponse, error)

Get - Get the details of a Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - ClientGetOptions contains the optional parameters for the Client.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-get-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contoso",
		"contosotv",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*Client) ListEdgePolicies added in v0.3.0

func (client *Client) ListEdgePolicies(ctx context.Context, resourceGroupName string, accountName string, parameters ListEdgePoliciesInput, options *ClientListEdgePoliciesOptions) (ClientListEdgePoliciesResponse, error)

ListEdgePolicies - List the media edge policies associated with the Media Services account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. parameters - The request parameters options - ClientListEdgePoliciesOptions contains the optional parameters for the Client.ListEdgePolicies method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-list-media-edge-policies.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListEdgePolicies(ctx,
		"contoso",
		"contososports",
		armmediaservices.ListEdgePoliciesInput{
			DeviceID: to.Ptr("contosiothubhost_contosoiotdevice"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*Client) NewListBySubscriptionPager added in v0.6.0

func (client *Client) NewListBySubscriptionPager(options *ClientListBySubscriptionOptions) *runtime.Pager[ClientListBySubscriptionResponse]

NewListBySubscriptionPager - List Media Services accounts in the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 options - ClientListBySubscriptionOptions contains the optional parameters for the Client.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-subscription-list-all-accounts.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*Client) NewListPager added in v0.6.0

func (client *Client) NewListPager(resourceGroupName string, options *ClientListOptions) *runtime.Pager[ClientListResponse]

NewListPager - List Media Services accounts in the resource group If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceGroupName - The name of the resource group within the Azure subscription. options - ClientListOptions contains the optional parameters for the Client.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-list-all-accounts.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("contoso",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*Client) SyncStorageKeys added in v0.3.0

func (client *Client) SyncStorageKeys(ctx context.Context, resourceGroupName string, accountName string, parameters SyncStorageKeysInput, options *ClientSyncStorageKeysOptions) (ClientSyncStorageKeysResponse, error)

SyncStorageKeys - Synchronizes storage account keys for a storage account associated with the Media Service account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. parameters - The request parameters options - ClientSyncStorageKeysOptions contains the optional parameters for the Client.SyncStorageKeys method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-sync-storage-keys.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.SyncStorageKeys(ctx,
		"contoso",
		"contososports",
		armmediaservices.SyncStorageKeysInput{
			ID: to.Ptr("contososportsstore"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*Client) Update added in v0.3.0

func (client *Client) Update(ctx context.Context, resourceGroupName string, accountName string, parameters MediaServiceUpdate, options *ClientUpdateOptions) (ClientUpdateResponse, error)

Update - Updates an existing Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. parameters - The request parameters options - ClientUpdateOptions contains the optional parameters for the Client.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"contoso",
		"contososports",
		armmediaservices.MediaServiceUpdate{
			Tags: map[string]*string{
				"key1": to.Ptr("value3"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ClientCreateOrUpdateOptions added in v0.3.0

type ClientCreateOrUpdateOptions struct {
}

ClientCreateOrUpdateOptions contains the optional parameters for the Client.CreateOrUpdate method.

type ClientCreateOrUpdateResponse added in v0.3.0

type ClientCreateOrUpdateResponse struct {
	MediaService
}

ClientCreateOrUpdateResponse contains the response from method Client.CreateOrUpdate.

type ClientDeleteOptions added in v0.3.0

type ClientDeleteOptions struct {
}

ClientDeleteOptions contains the optional parameters for the Client.Delete method.

type ClientDeleteResponse added in v0.3.0

type ClientDeleteResponse struct {
}

ClientDeleteResponse contains the response from method Client.Delete.

type ClientGetOptions added in v0.3.0

type ClientGetOptions struct {
}

ClientGetOptions contains the optional parameters for the Client.Get method.

type ClientGetResponse added in v0.3.0

type ClientGetResponse struct {
	MediaService
}

ClientGetResponse contains the response from method Client.Get.

type ClientListBySubscriptionOptions added in v0.3.0

type ClientListBySubscriptionOptions struct {
}

ClientListBySubscriptionOptions contains the optional parameters for the Client.ListBySubscription method.

type ClientListBySubscriptionResponse added in v0.3.0

type ClientListBySubscriptionResponse struct {
	MediaServiceCollection
}

ClientListBySubscriptionResponse contains the response from method Client.ListBySubscription.

type ClientListEdgePoliciesOptions added in v0.3.0

type ClientListEdgePoliciesOptions struct {
}

ClientListEdgePoliciesOptions contains the optional parameters for the Client.ListEdgePolicies method.

type ClientListEdgePoliciesResponse added in v0.3.0

type ClientListEdgePoliciesResponse struct {
	EdgePolicies
}

ClientListEdgePoliciesResponse contains the response from method Client.ListEdgePolicies.

type ClientListOptions added in v0.3.0

type ClientListOptions struct {
}

ClientListOptions contains the optional parameters for the Client.List method.

type ClientListResponse added in v0.3.0

type ClientListResponse struct {
	MediaServiceCollection
}

ClientListResponse contains the response from method Client.List.

type ClientSyncStorageKeysOptions added in v0.3.0

type ClientSyncStorageKeysOptions struct {
}

ClientSyncStorageKeysOptions contains the optional parameters for the Client.SyncStorageKeys method.

type ClientSyncStorageKeysResponse added in v0.3.0

type ClientSyncStorageKeysResponse struct {
}

ClientSyncStorageKeysResponse contains the response from method Client.SyncStorageKeys.

type ClientUpdateOptions added in v0.3.0

type ClientUpdateOptions struct {
}

ClientUpdateOptions contains the optional parameters for the Client.Update method.

type ClientUpdateResponse added in v0.3.0

type ClientUpdateResponse struct {
	MediaService
}

ClientUpdateResponse contains the response from method Client.Update.

type ClipTime

type ClipTime struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ClipTime - Base class for specifying a clip time. Use sub classes of this class to specify the time position in the media.

func (*ClipTime) GetClipTime

func (c *ClipTime) GetClipTime() *ClipTime

GetClipTime implements the ClipTimeClassification interface for type ClipTime.

type ClipTimeClassification

type ClipTimeClassification interface {
	// GetClipTime returns the ClipTime content of the underlying type.
	GetClipTime() *ClipTime
}

ClipTimeClassification provides polymorphic access to related types. Call the interface's GetClipTime() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AbsoluteClipTime, *ClipTime, *UTCClipTime

type Codec

type Codec struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string `json:"label,omitempty"`
}

Codec - Describes the basic properties of all codecs.

func (*Codec) GetCodec

func (c *Codec) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type Codec.

type CodecClassification

type CodecClassification interface {
	// GetCodec returns the Codec content of the underlying type.
	GetCodec() *Codec
}

CodecClassification provides polymorphic access to related types. Call the interface's GetCodec() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AacAudio, *Audio, *Codec, *CopyAudio, *CopyVideo, *H264Video, *H265Video, *Image, *JpgImage, *PNGImage, *Video

type CommonEncryptionCbcs

type CommonEncryptionCbcs struct {
	// Representing which tracks should not be encrypted
	ClearTracks []*TrackSelection `json:"clearTracks,omitempty"`

	// Representing default content key for each encryption scheme and separate content keys for specific tracks
	ContentKeys *StreamingPolicyContentKeys `json:"contentKeys,omitempty"`

	// Configuration of DRMs for current encryption scheme
	Drm *CbcsDrmConfiguration `json:"drm,omitempty"`

	// Representing supported protocols
	EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"`
}

CommonEncryptionCbcs - Class for CommonEncryptionCbcs encryption scheme

func (CommonEncryptionCbcs) MarshalJSON

func (c CommonEncryptionCbcs) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CommonEncryptionCbcs.

type CommonEncryptionCenc

type CommonEncryptionCenc struct {
	// Representing which tracks should not be encrypted
	ClearTracks []*TrackSelection `json:"clearTracks,omitempty"`

	// Representing default content key for each encryption scheme and separate content keys for specific tracks
	ContentKeys *StreamingPolicyContentKeys `json:"contentKeys,omitempty"`

	// Configuration of DRMs for CommonEncryptionCenc encryption scheme
	Drm *CencDrmConfiguration `json:"drm,omitempty"`

	// Representing supported protocols
	EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"`
}

CommonEncryptionCenc - Class for envelope encryption scheme

func (CommonEncryptionCenc) MarshalJSON

func (c CommonEncryptionCenc) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CommonEncryptionCenc.

type Complexity

type Complexity string

Complexity - Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity as Speed for faster encoding but less compression efficiency.

const (
	// ComplexityBalanced - Configures the encoder to use settings that achieve a balance between speed and quality.
	ComplexityBalanced Complexity = "Balanced"
	// ComplexityQuality - Configures the encoder to use settings optimized to produce higher quality output at the expense of
	// slower overall encode time.
	ComplexityQuality Complexity = "Quality"
	// ComplexitySpeed - Configures the encoder to use settings optimized for faster encoding. Quality is sacrificed to decrease
	// encoding time.
	ComplexitySpeed Complexity = "Speed"
)

func PossibleComplexityValues

func PossibleComplexityValues() []Complexity

PossibleComplexityValues returns the possible values for the Complexity const type.

type ContentKeyPoliciesClient

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

ContentKeyPoliciesClient contains the methods for the ContentKeyPolicies group. Don't use this type directly, use NewContentKeyPoliciesClient() instead.

func NewContentKeyPoliciesClient

func NewContentKeyPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContentKeyPoliciesClient, error)

NewContentKeyPoliciesClient creates a new instance of ContentKeyPoliciesClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ContentKeyPoliciesClient) CreateOrUpdate

func (client *ContentKeyPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, parameters ContentKeyPolicy, options *ContentKeyPoliciesClientCreateOrUpdateOptions) (ContentKeyPoliciesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update a Content Key Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. contentKeyPolicyName - The Content Key Policy name. parameters - The request parameters options - ContentKeyPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ContentKeyPoliciesClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/content-key-policies-create-nodrm-token.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewContentKeyPoliciesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"contoso",
		"contosomedia",
		"PolicyWithClearKeyOptionAndSwtTokenRestriction",
		armmediaservices.ContentKeyPolicy{
			Properties: &armmediaservices.ContentKeyPolicyProperties{
				Description: to.Ptr("ArmPolicyDescription"),
				Options: []*armmediaservices.ContentKeyPolicyOption{
					{
						Name: to.Ptr("ClearKeyOption"),
						Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
						},
						Restriction: &armmediaservices.ContentKeyPolicyTokenRestriction{
							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyTokenRestriction"),
							Audience:  to.Ptr("urn:audience"),
							Issuer:    to.Ptr("urn:issuer"),
							PrimaryVerificationKey: &armmediaservices.ContentKeyPolicySymmetricTokenKey{
								ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"),
								KeyValue:  []byte("AAAAAAAAAAAAAAAAAAAAAA=="),
							},
							RestrictionTokenType: to.Ptr(armmediaservices.ContentKeyPolicyRestrictionTokenTypeSwt),
						},
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ContentKeyPoliciesClient) Delete

func (client *ContentKeyPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, options *ContentKeyPoliciesClientDeleteOptions) (ContentKeyPoliciesClientDeleteResponse, error)

Delete - Deletes a Content Key Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. contentKeyPolicyName - The Content Key Policy name. options - ContentKeyPoliciesClientDeleteOptions contains the optional parameters for the ContentKeyPoliciesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/content-key-policies-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewContentKeyPoliciesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"contoso",
		"contosomedia",
		"PolicyWithPlayReadyOptionAndOpenRestriction",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ContentKeyPoliciesClient) Get

func (client *ContentKeyPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, options *ContentKeyPoliciesClientGetOptions) (ContentKeyPoliciesClientGetResponse, error)

Get - Get the details of a Content Key Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. contentKeyPolicyName - The Content Key Policy name. options - ContentKeyPoliciesClientGetOptions contains the optional parameters for the ContentKeyPoliciesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/content-key-policies-get-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewContentKeyPoliciesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contoso",
		"contosomedia",
		"PolicyWithMultipleOptions",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ContentKeyPoliciesClient) GetPolicyPropertiesWithSecrets

func (client *ContentKeyPoliciesClient) GetPolicyPropertiesWithSecrets(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, options *ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsOptions) (ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsResponse, error)

GetPolicyPropertiesWithSecrets - Get a Content Key Policy including secret values If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. contentKeyPolicyName - The Content Key Policy name. options - ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsOptions contains the optional parameters for the ContentKeyPoliciesClient.GetPolicyPropertiesWithSecrets method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/content-key-policies-get-with-secrets.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewContentKeyPoliciesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetPolicyPropertiesWithSecrets(ctx,
		"contoso",
		"contosomedia",
		"PolicyWithMultipleOptions",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ContentKeyPoliciesClient) NewListPager added in v0.6.0

func (client *ContentKeyPoliciesClient) NewListPager(resourceGroupName string, accountName string, options *ContentKeyPoliciesClientListOptions) *runtime.Pager[ContentKeyPoliciesClientListResponse]

NewListPager - Lists the Content Key Policies in the account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - ContentKeyPoliciesClientListOptions contains the optional parameters for the ContentKeyPoliciesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/content-key-policies-list-by-lastModified.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewContentKeyPoliciesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("contoso",
		"contosomedia",
		&armmediaservices.ContentKeyPoliciesClientListOptions{Filter: nil,
			Top:     nil,
			Orderby: to.Ptr("properties/lastModified"),
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ContentKeyPoliciesClient) Update

func (client *ContentKeyPoliciesClient) Update(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, parameters ContentKeyPolicy, options *ContentKeyPoliciesClientUpdateOptions) (ContentKeyPoliciesClientUpdateResponse, error)

Update - Updates an existing Content Key Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. contentKeyPolicyName - The Content Key Policy name. parameters - The request parameters options - ContentKeyPoliciesClientUpdateOptions contains the optional parameters for the ContentKeyPoliciesClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/content-key-policies-update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewContentKeyPoliciesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"contoso",
		"contosomedia",
		"PolicyWithClearKeyOptionAndTokenRestriction",
		armmediaservices.ContentKeyPolicy{
			Properties: &armmediaservices.ContentKeyPolicyProperties{
				Description: to.Ptr("Updated Policy"),
				Options: []*armmediaservices.ContentKeyPolicyOption{
					{
						Name: to.Ptr("ClearKeyOption"),
						Configuration: &armmediaservices.ContentKeyPolicyClearKeyConfiguration{
							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"),
						},
						Restriction: &armmediaservices.ContentKeyPolicyOpenRestriction{
							ODataType: to.Ptr("#Microsoft.Media.ContentKeyPolicyOpenRestriction"),
						},
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ContentKeyPoliciesClientCreateOrUpdateOptions added in v0.3.0

type ContentKeyPoliciesClientCreateOrUpdateOptions struct {
}

ContentKeyPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ContentKeyPoliciesClient.CreateOrUpdate method.

type ContentKeyPoliciesClientCreateOrUpdateResponse added in v0.3.0

type ContentKeyPoliciesClientCreateOrUpdateResponse struct {
	ContentKeyPolicy
}

ContentKeyPoliciesClientCreateOrUpdateResponse contains the response from method ContentKeyPoliciesClient.CreateOrUpdate.

type ContentKeyPoliciesClientDeleteOptions added in v0.3.0

type ContentKeyPoliciesClientDeleteOptions struct {
}

ContentKeyPoliciesClientDeleteOptions contains the optional parameters for the ContentKeyPoliciesClient.Delete method.

type ContentKeyPoliciesClientDeleteResponse added in v0.3.0

type ContentKeyPoliciesClientDeleteResponse struct {
}

ContentKeyPoliciesClientDeleteResponse contains the response from method ContentKeyPoliciesClient.Delete.

type ContentKeyPoliciesClientGetOptions added in v0.3.0

type ContentKeyPoliciesClientGetOptions struct {
}

ContentKeyPoliciesClientGetOptions contains the optional parameters for the ContentKeyPoliciesClient.Get method.

type ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsOptions added in v0.3.0

type ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsOptions struct {
}

ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsOptions contains the optional parameters for the ContentKeyPoliciesClient.GetPolicyPropertiesWithSecrets method.

type ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsResponse added in v0.3.0

type ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsResponse struct {
	ContentKeyPolicyProperties
}

ContentKeyPoliciesClientGetPolicyPropertiesWithSecretsResponse contains the response from method ContentKeyPoliciesClient.GetPolicyPropertiesWithSecrets.

type ContentKeyPoliciesClientGetResponse added in v0.3.0

type ContentKeyPoliciesClientGetResponse struct {
	ContentKeyPolicy
}

ContentKeyPoliciesClientGetResponse contains the response from method ContentKeyPoliciesClient.Get.

type ContentKeyPoliciesClientListOptions added in v0.3.0

type ContentKeyPoliciesClientListOptions struct {
	// Restricts the set of items returned.
	Filter *string
	// Specifies the key by which the result collection should be ordered.
	Orderby *string
	// Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the
	// number of available items up to but not greater than the specified value n.
	Top *int32
}

ContentKeyPoliciesClientListOptions contains the optional parameters for the ContentKeyPoliciesClient.List method.

type ContentKeyPoliciesClientListResponse added in v0.3.0

type ContentKeyPoliciesClientListResponse struct {
	ContentKeyPolicyCollection
}

ContentKeyPoliciesClientListResponse contains the response from method ContentKeyPoliciesClient.List.

type ContentKeyPoliciesClientUpdateOptions added in v0.3.0

type ContentKeyPoliciesClientUpdateOptions struct {
}

ContentKeyPoliciesClientUpdateOptions contains the optional parameters for the ContentKeyPoliciesClient.Update method.

type ContentKeyPoliciesClientUpdateResponse added in v0.3.0

type ContentKeyPoliciesClientUpdateResponse struct {
	ContentKeyPolicy
}

ContentKeyPoliciesClientUpdateResponse contains the response from method ContentKeyPoliciesClient.Update.

type ContentKeyPolicy

type ContentKeyPolicy struct {
	// The properties of the Content Key Policy.
	Properties *ContentKeyPolicyProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ContentKeyPolicy - A Content Key Policy resource.

func (ContentKeyPolicy) MarshalJSON

func (c ContentKeyPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicy.

type ContentKeyPolicyClearKeyConfiguration

type ContentKeyPolicyClearKeyConfiguration struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ContentKeyPolicyClearKeyConfiguration - Represents a configuration for non-DRM keys.

func (*ContentKeyPolicyClearKeyConfiguration) GetContentKeyPolicyConfiguration added in v0.3.0

func (c *ContentKeyPolicyClearKeyConfiguration) GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration

GetContentKeyPolicyConfiguration implements the ContentKeyPolicyConfigurationClassification interface for type ContentKeyPolicyClearKeyConfiguration.

func (ContentKeyPolicyClearKeyConfiguration) MarshalJSON

func (c ContentKeyPolicyClearKeyConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyClearKeyConfiguration.

func (*ContentKeyPolicyClearKeyConfiguration) UnmarshalJSON added in v0.3.0

func (c *ContentKeyPolicyClearKeyConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyClearKeyConfiguration.

type ContentKeyPolicyCollection

type ContentKeyPolicyCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string `json:"@odata.nextLink,omitempty"`

	// A collection of ContentKeyPolicy items.
	Value []*ContentKeyPolicy `json:"value,omitempty"`
}

ContentKeyPolicyCollection - A collection of ContentKeyPolicy items.

type ContentKeyPolicyConfiguration

type ContentKeyPolicyConfiguration struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ContentKeyPolicyConfiguration - Base class for Content Key Policy configuration. A derived class must be used to create a configuration.

func (*ContentKeyPolicyConfiguration) GetContentKeyPolicyConfiguration

func (c *ContentKeyPolicyConfiguration) GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration

GetContentKeyPolicyConfiguration implements the ContentKeyPolicyConfigurationClassification interface for type ContentKeyPolicyConfiguration.

type ContentKeyPolicyConfigurationClassification

type ContentKeyPolicyConfigurationClassification interface {
	// GetContentKeyPolicyConfiguration returns the ContentKeyPolicyConfiguration content of the underlying type.
	GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration
}

ContentKeyPolicyConfigurationClassification provides polymorphic access to related types. Call the interface's GetContentKeyPolicyConfiguration() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ContentKeyPolicyClearKeyConfiguration, *ContentKeyPolicyConfiguration, *ContentKeyPolicyFairPlayConfiguration, *ContentKeyPolicyPlayReadyConfiguration, - *ContentKeyPolicyUnknownConfiguration, *ContentKeyPolicyWidevineConfiguration

type ContentKeyPolicyFairPlayConfiguration

type ContentKeyPolicyFairPlayConfiguration struct {
	// REQUIRED; The key that must be used as FairPlay Application Secret key.
	Ask []byte `json:"ask,omitempty"`

	// REQUIRED; The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).
	FairPlayPfx *string `json:"fairPlayPfx,omitempty"`

	// REQUIRED; The password encrypting FairPlay certificate in PKCS 12 (pfx) format.
	FairPlayPfxPassword *string `json:"fairPlayPfxPassword,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// REQUIRED; The rental and lease key type.
	RentalAndLeaseKeyType *ContentKeyPolicyFairPlayRentalAndLeaseKeyType `json:"rentalAndLeaseKeyType,omitempty"`

	// REQUIRED; The rental duration. Must be greater than or equal to 0.
	RentalDuration *int64 `json:"rentalDuration,omitempty"`

	// Offline rental policy
	OfflineRentalConfiguration *ContentKeyPolicyFairPlayOfflineRentalConfiguration `json:"offlineRentalConfiguration,omitempty"`
}

ContentKeyPolicyFairPlayConfiguration - Specifies a configuration for FairPlay licenses.

func (*ContentKeyPolicyFairPlayConfiguration) GetContentKeyPolicyConfiguration added in v0.3.0

func (c *ContentKeyPolicyFairPlayConfiguration) GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration

GetContentKeyPolicyConfiguration implements the ContentKeyPolicyConfigurationClassification interface for type ContentKeyPolicyFairPlayConfiguration.

func (ContentKeyPolicyFairPlayConfiguration) MarshalJSON

func (c ContentKeyPolicyFairPlayConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyFairPlayConfiguration.

func (*ContentKeyPolicyFairPlayConfiguration) UnmarshalJSON

func (c *ContentKeyPolicyFairPlayConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyFairPlayConfiguration.

type ContentKeyPolicyFairPlayOfflineRentalConfiguration

type ContentKeyPolicyFairPlayOfflineRentalConfiguration struct {
	// REQUIRED; Playback duration
	PlaybackDurationSeconds *int64 `json:"playbackDurationSeconds,omitempty"`

	// REQUIRED; Storage duration
	StorageDurationSeconds *int64 `json:"storageDurationSeconds,omitempty"`
}

type ContentKeyPolicyFairPlayRentalAndLeaseKeyType

type ContentKeyPolicyFairPlayRentalAndLeaseKeyType string

ContentKeyPolicyFairPlayRentalAndLeaseKeyType - The rental and lease key type.

const (
	// ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry - Dual expiry for offline rental.
	ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "DualExpiry"
	// ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited - Content key can be persisted and the valid duration is
	// limited by the Rental Duration value
	ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "PersistentLimited"
	// ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited - Content key can be persisted with an unlimited duration
	ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "PersistentUnlimited"
	// ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined - Key duration is not specified.
	ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "Undefined"
	// ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUnknown - Represents a ContentKeyPolicyFairPlayRentalAndLeaseKeyType that
	// is unavailable in current API version.
	ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUnknown ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "Unknown"
)

func PossibleContentKeyPolicyFairPlayRentalAndLeaseKeyTypeValues

func PossibleContentKeyPolicyFairPlayRentalAndLeaseKeyTypeValues() []ContentKeyPolicyFairPlayRentalAndLeaseKeyType

PossibleContentKeyPolicyFairPlayRentalAndLeaseKeyTypeValues returns the possible values for the ContentKeyPolicyFairPlayRentalAndLeaseKeyType const type.

type ContentKeyPolicyOpenRestriction

type ContentKeyPolicyOpenRestriction struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ContentKeyPolicyOpenRestriction - Represents an open restriction. License or key will be delivered on every request.

func (*ContentKeyPolicyOpenRestriction) GetContentKeyPolicyRestriction added in v0.3.0

func (c *ContentKeyPolicyOpenRestriction) GetContentKeyPolicyRestriction() *ContentKeyPolicyRestriction

GetContentKeyPolicyRestriction implements the ContentKeyPolicyRestrictionClassification interface for type ContentKeyPolicyOpenRestriction.

func (ContentKeyPolicyOpenRestriction) MarshalJSON

func (c ContentKeyPolicyOpenRestriction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyOpenRestriction.

func (*ContentKeyPolicyOpenRestriction) UnmarshalJSON added in v0.3.0

func (c *ContentKeyPolicyOpenRestriction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyOpenRestriction.

type ContentKeyPolicyOption

type ContentKeyPolicyOption struct {
	// REQUIRED; The key delivery configuration.
	Configuration ContentKeyPolicyConfigurationClassification `json:"configuration,omitempty"`

	// REQUIRED; The requirements that must be met to deliver keys with this configuration
	Restriction ContentKeyPolicyRestrictionClassification `json:"restriction,omitempty"`

	// The Policy Option description.
	Name *string `json:"name,omitempty"`

	// READ-ONLY; The legacy Policy Option ID.
	PolicyOptionID *string `json:"policyOptionId,omitempty" azure:"ro"`
}

ContentKeyPolicyOption - Represents a policy option.

func (ContentKeyPolicyOption) MarshalJSON

func (c ContentKeyPolicyOption) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyOption.

func (*ContentKeyPolicyOption) UnmarshalJSON

func (c *ContentKeyPolicyOption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyOption.

type ContentKeyPolicyPlayReadyConfiguration

type ContentKeyPolicyPlayReadyConfiguration struct {
	// REQUIRED; The PlayReady licenses.
	Licenses []*ContentKeyPolicyPlayReadyLicense `json:"licenses,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The custom response data.
	ResponseCustomData *string `json:"responseCustomData,omitempty"`
}

ContentKeyPolicyPlayReadyConfiguration - Specifies a configuration for PlayReady licenses.

func (*ContentKeyPolicyPlayReadyConfiguration) GetContentKeyPolicyConfiguration added in v0.3.0

func (c *ContentKeyPolicyPlayReadyConfiguration) GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration

GetContentKeyPolicyConfiguration implements the ContentKeyPolicyConfigurationClassification interface for type ContentKeyPolicyPlayReadyConfiguration.

func (ContentKeyPolicyPlayReadyConfiguration) MarshalJSON

func (c ContentKeyPolicyPlayReadyConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyPlayReadyConfiguration.

func (*ContentKeyPolicyPlayReadyConfiguration) UnmarshalJSON

func (c *ContentKeyPolicyPlayReadyConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyPlayReadyConfiguration.

type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader

type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader - Specifies that the content key ID is in the PlayReady header.

func (*ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader) GetContentKeyPolicyPlayReadyContentKeyLocation added in v0.3.0

GetContentKeyPolicyPlayReadyContentKeyLocation implements the ContentKeyPolicyPlayReadyContentKeyLocationClassification interface for type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.

func (ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.

func (*ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader) UnmarshalJSON added in v0.3.0

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader.

type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier

type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier struct {
	// REQUIRED; The content key ID.
	KeyID *string `json:"keyId,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier - Specifies that the content key ID is specified in the PlayReady configuration.

func (*ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier) GetContentKeyPolicyPlayReadyContentKeyLocation added in v0.3.0

GetContentKeyPolicyPlayReadyContentKeyLocation implements the ContentKeyPolicyPlayReadyContentKeyLocationClassification interface for type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.

func (ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.

func (*ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier.

type ContentKeyPolicyPlayReadyContentKeyLocation

type ContentKeyPolicyPlayReadyContentKeyLocation struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ContentKeyPolicyPlayReadyContentKeyLocation - Base class for content key ID location. A derived class must be used to represent the location.

func (*ContentKeyPolicyPlayReadyContentKeyLocation) GetContentKeyPolicyPlayReadyContentKeyLocation

func (c *ContentKeyPolicyPlayReadyContentKeyLocation) GetContentKeyPolicyPlayReadyContentKeyLocation() *ContentKeyPolicyPlayReadyContentKeyLocation

GetContentKeyPolicyPlayReadyContentKeyLocation implements the ContentKeyPolicyPlayReadyContentKeyLocationClassification interface for type ContentKeyPolicyPlayReadyContentKeyLocation.

type ContentKeyPolicyPlayReadyContentKeyLocationClassification

type ContentKeyPolicyPlayReadyContentKeyLocationClassification interface {
	// GetContentKeyPolicyPlayReadyContentKeyLocation returns the ContentKeyPolicyPlayReadyContentKeyLocation content of the underlying type.
	GetContentKeyPolicyPlayReadyContentKeyLocation() *ContentKeyPolicyPlayReadyContentKeyLocation
}

ContentKeyPolicyPlayReadyContentKeyLocationClassification provides polymorphic access to related types. Call the interface's GetContentKeyPolicyPlayReadyContentKeyLocation() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, *ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, - *ContentKeyPolicyPlayReadyContentKeyLocation

type ContentKeyPolicyPlayReadyContentType

type ContentKeyPolicyPlayReadyContentType string

ContentKeyPolicyPlayReadyContentType - The PlayReady content type.

const (
	// ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload - Ultraviolet download content type.
	ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload ContentKeyPolicyPlayReadyContentType = "UltraVioletDownload"
	// ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming - Ultraviolet streaming content type.
	ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming ContentKeyPolicyPlayReadyContentType = "UltraVioletStreaming"
	// ContentKeyPolicyPlayReadyContentTypeUnknown - Represents a ContentKeyPolicyPlayReadyContentType that is unavailable in
	// current API version.
	ContentKeyPolicyPlayReadyContentTypeUnknown ContentKeyPolicyPlayReadyContentType = "Unknown"
	// ContentKeyPolicyPlayReadyContentTypeUnspecified - Unspecified content type.
	ContentKeyPolicyPlayReadyContentTypeUnspecified ContentKeyPolicyPlayReadyContentType = "Unspecified"
)

func PossibleContentKeyPolicyPlayReadyContentTypeValues

func PossibleContentKeyPolicyPlayReadyContentTypeValues() []ContentKeyPolicyPlayReadyContentType

PossibleContentKeyPolicyPlayReadyContentTypeValues returns the possible values for the ContentKeyPolicyPlayReadyContentType const type.

type ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction

type ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction struct {
	// REQUIRED; Indicates whether this restriction is enforced on a Best Effort basis.
	BestEffort *bool `json:"bestEffort,omitempty"`

	// REQUIRED; Configures the restriction control bits. Must be between 0 and 3 inclusive.
	ConfigurationData *int32 `json:"configurationData,omitempty"`
}

ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction - Configures the Explicit Analog Television Output Restriction control bits. For further details see the PlayReady Compliance Rules.

type ContentKeyPolicyPlayReadyLicense

type ContentKeyPolicyPlayReadyLicense struct {
	// REQUIRED; A flag indicating whether test devices can use the license.
	AllowTestDevices *bool `json:"allowTestDevices,omitempty"`

	// REQUIRED; The content key location.
	ContentKeyLocation ContentKeyPolicyPlayReadyContentKeyLocationClassification `json:"contentKeyLocation,omitempty"`

	// REQUIRED; The PlayReady content type.
	ContentType *ContentKeyPolicyPlayReadyContentType `json:"contentType,omitempty"`

	// REQUIRED; The license type.
	LicenseType *ContentKeyPolicyPlayReadyLicenseType `json:"licenseType,omitempty"`

	// The begin date of license
	BeginDate *time.Time `json:"beginDate,omitempty"`

	// The expiration date of license.
	ExpirationDate *time.Time `json:"expirationDate,omitempty"`

	// The grace period of license.
	GracePeriod *string `json:"gracePeriod,omitempty"`

	// The license PlayRight
	PlayRight *ContentKeyPolicyPlayReadyPlayRight `json:"playRight,omitempty"`

	// The relative begin date of license.
	RelativeBeginDate *string `json:"relativeBeginDate,omitempty"`

	// The relative expiration date of license.
	RelativeExpirationDate *string `json:"relativeExpirationDate,omitempty"`
}

ContentKeyPolicyPlayReadyLicense - The PlayReady license

func (ContentKeyPolicyPlayReadyLicense) MarshalJSON

func (c ContentKeyPolicyPlayReadyLicense) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyPlayReadyLicense.

func (*ContentKeyPolicyPlayReadyLicense) UnmarshalJSON

func (c *ContentKeyPolicyPlayReadyLicense) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyPlayReadyLicense.

type ContentKeyPolicyPlayReadyLicenseType

type ContentKeyPolicyPlayReadyLicenseType string

ContentKeyPolicyPlayReadyLicenseType - The license type.

const (
	// ContentKeyPolicyPlayReadyLicenseTypeNonPersistent - Non persistent license.
	ContentKeyPolicyPlayReadyLicenseTypeNonPersistent ContentKeyPolicyPlayReadyLicenseType = "NonPersistent"
	// ContentKeyPolicyPlayReadyLicenseTypePersistent - Persistent license. Allows offline playback.
	ContentKeyPolicyPlayReadyLicenseTypePersistent ContentKeyPolicyPlayReadyLicenseType = "Persistent"
	// ContentKeyPolicyPlayReadyLicenseTypeUnknown - Represents a ContentKeyPolicyPlayReadyLicenseType that is unavailable in
	// current API version.
	ContentKeyPolicyPlayReadyLicenseTypeUnknown ContentKeyPolicyPlayReadyLicenseType = "Unknown"
)

func PossibleContentKeyPolicyPlayReadyLicenseTypeValues

func PossibleContentKeyPolicyPlayReadyLicenseTypeValues() []ContentKeyPolicyPlayReadyLicenseType

PossibleContentKeyPolicyPlayReadyLicenseTypeValues returns the possible values for the ContentKeyPolicyPlayReadyLicenseType const type.

type ContentKeyPolicyPlayReadyPlayRight

type ContentKeyPolicyPlayReadyPlayRight struct {
	// REQUIRED; Configures Unknown output handling settings of the license.
	AllowPassingVideoContentToUnknownOutput *ContentKeyPolicyPlayReadyUnknownOutputPassingOption `json:"allowPassingVideoContentToUnknownOutput,omitempty"`

	// REQUIRED; Enables the Image Constraint For Analog Component Video Restriction in the license.
	DigitalVideoOnlyContentRestriction *bool `json:"digitalVideoOnlyContentRestriction,omitempty"`

	// REQUIRED; Enables the Image Constraint For Analog Component Video Restriction in the license.
	ImageConstraintForAnalogComponentVideoRestriction *bool `json:"imageConstraintForAnalogComponentVideoRestriction,omitempty"`

	// REQUIRED; Enables the Image Constraint For Analog Component Video Restriction in the license.
	ImageConstraintForAnalogComputerMonitorRestriction *bool `json:"imageConstraintForAnalogComputerMonitorRestriction,omitempty"`

	// Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive.
	AgcAndColorStripeRestriction *int32 `json:"agcAndColorStripeRestriction,omitempty"`

	// Specifies the output protection level for compressed digital audio.
	AnalogVideoOpl *int32 `json:"analogVideoOpl,omitempty"`

	// Specifies the output protection level for compressed digital audio.
	CompressedDigitalAudioOpl *int32 `json:"compressedDigitalAudioOpl,omitempty"`

	// Specifies the output protection level for compressed digital video.
	CompressedDigitalVideoOpl *int32 `json:"compressedDigitalVideoOpl,omitempty"`

	// Configures the Explicit Analog Television Output Restriction in the license. Configuration data must be between 0 and 3
	// inclusive.
	ExplicitAnalogTelevisionOutputRestriction *ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction `json:"explicitAnalogTelevisionOutputRestriction,omitempty"`

	// The amount of time that the license is valid after the license is first used to play content.
	FirstPlayExpiration *string `json:"firstPlayExpiration,omitempty"`

	// Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive.
	ScmsRestriction *int32 `json:"scmsRestriction,omitempty"`

	// Specifies the output protection level for uncompressed digital audio.
	UncompressedDigitalAudioOpl *int32 `json:"uncompressedDigitalAudioOpl,omitempty"`

	// Specifies the output protection level for uncompressed digital video.
	UncompressedDigitalVideoOpl *int32 `json:"uncompressedDigitalVideoOpl,omitempty"`
}

ContentKeyPolicyPlayReadyPlayRight - Configures the Play Right in the PlayReady license.

type ContentKeyPolicyPlayReadyUnknownOutputPassingOption

type ContentKeyPolicyPlayReadyUnknownOutputPassingOption string

ContentKeyPolicyPlayReadyUnknownOutputPassingOption - Configures Unknown output handling settings of the license.

const (
	// ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed - Passing the video portion of protected content to an Unknown
	// Output is allowed.
	ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "Allowed"
	// ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction - Passing the video portion of protected
	// content to an Unknown Output is allowed but with constrained resolution.
	ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "AllowedWithVideoConstriction"
	// ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed - Passing the video portion of protected content to an Unknown
	// Output is not allowed.
	ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "NotAllowed"
	// ContentKeyPolicyPlayReadyUnknownOutputPassingOptionUnknown - Represents a ContentKeyPolicyPlayReadyUnknownOutputPassingOption
	// that is unavailable in current API version.
	ContentKeyPolicyPlayReadyUnknownOutputPassingOptionUnknown ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "Unknown"
)

func PossibleContentKeyPolicyPlayReadyUnknownOutputPassingOptionValues

func PossibleContentKeyPolicyPlayReadyUnknownOutputPassingOptionValues() []ContentKeyPolicyPlayReadyUnknownOutputPassingOption

PossibleContentKeyPolicyPlayReadyUnknownOutputPassingOptionValues returns the possible values for the ContentKeyPolicyPlayReadyUnknownOutputPassingOption const type.

type ContentKeyPolicyProperties

type ContentKeyPolicyProperties struct {
	// REQUIRED; The Key Policy options.
	Options []*ContentKeyPolicyOption `json:"options,omitempty"`

	// A description for the Policy.
	Description *string `json:"description,omitempty"`

	// READ-ONLY; The creation date of the Policy
	Created *time.Time `json:"created,omitempty" azure:"ro"`

	// READ-ONLY; The last modified date of the Policy
	LastModified *time.Time `json:"lastModified,omitempty" azure:"ro"`

	// READ-ONLY; The legacy Policy ID.
	PolicyID *string `json:"policyId,omitempty" azure:"ro"`
}

ContentKeyPolicyProperties - The properties of the Content Key Policy.

func (ContentKeyPolicyProperties) MarshalJSON

func (c ContentKeyPolicyProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyProperties.

func (*ContentKeyPolicyProperties) UnmarshalJSON

func (c *ContentKeyPolicyProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyProperties.

type ContentKeyPolicyRestriction

type ContentKeyPolicyRestriction struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ContentKeyPolicyRestriction - Base class for Content Key Policy restrictions. A derived class must be used to create a restriction.

func (*ContentKeyPolicyRestriction) GetContentKeyPolicyRestriction

func (c *ContentKeyPolicyRestriction) GetContentKeyPolicyRestriction() *ContentKeyPolicyRestriction

GetContentKeyPolicyRestriction implements the ContentKeyPolicyRestrictionClassification interface for type ContentKeyPolicyRestriction.

type ContentKeyPolicyRestrictionClassification

type ContentKeyPolicyRestrictionClassification interface {
	// GetContentKeyPolicyRestriction returns the ContentKeyPolicyRestriction content of the underlying type.
	GetContentKeyPolicyRestriction() *ContentKeyPolicyRestriction
}

ContentKeyPolicyRestrictionClassification provides polymorphic access to related types. Call the interface's GetContentKeyPolicyRestriction() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ContentKeyPolicyOpenRestriction, *ContentKeyPolicyRestriction, *ContentKeyPolicyTokenRestriction, *ContentKeyPolicyUnknownRestriction

type ContentKeyPolicyRestrictionTokenKey

type ContentKeyPolicyRestrictionTokenKey struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ContentKeyPolicyRestrictionTokenKey - Base class for Content Key Policy key for token validation. A derived class must be used to create a token key.

func (*ContentKeyPolicyRestrictionTokenKey) GetContentKeyPolicyRestrictionTokenKey

func (c *ContentKeyPolicyRestrictionTokenKey) GetContentKeyPolicyRestrictionTokenKey() *ContentKeyPolicyRestrictionTokenKey

GetContentKeyPolicyRestrictionTokenKey implements the ContentKeyPolicyRestrictionTokenKeyClassification interface for type ContentKeyPolicyRestrictionTokenKey.

type ContentKeyPolicyRestrictionTokenKeyClassification

type ContentKeyPolicyRestrictionTokenKeyClassification interface {
	// GetContentKeyPolicyRestrictionTokenKey returns the ContentKeyPolicyRestrictionTokenKey content of the underlying type.
	GetContentKeyPolicyRestrictionTokenKey() *ContentKeyPolicyRestrictionTokenKey
}

ContentKeyPolicyRestrictionTokenKeyClassification provides polymorphic access to related types. Call the interface's GetContentKeyPolicyRestrictionTokenKey() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ContentKeyPolicyRestrictionTokenKey, *ContentKeyPolicyRsaTokenKey, *ContentKeyPolicySymmetricTokenKey, *ContentKeyPolicyX509CertificateTokenKey

type ContentKeyPolicyRestrictionTokenType

type ContentKeyPolicyRestrictionTokenType string

ContentKeyPolicyRestrictionTokenType - The type of token.

const (
	// ContentKeyPolicyRestrictionTokenTypeJwt - JSON Web Token.
	ContentKeyPolicyRestrictionTokenTypeJwt ContentKeyPolicyRestrictionTokenType = "Jwt"
	// ContentKeyPolicyRestrictionTokenTypeSwt - Simple Web Token.
	ContentKeyPolicyRestrictionTokenTypeSwt ContentKeyPolicyRestrictionTokenType = "Swt"
	// ContentKeyPolicyRestrictionTokenTypeUnknown - Represents a ContentKeyPolicyRestrictionTokenType that is unavailable in
	// current API version.
	ContentKeyPolicyRestrictionTokenTypeUnknown ContentKeyPolicyRestrictionTokenType = "Unknown"
)

func PossibleContentKeyPolicyRestrictionTokenTypeValues

func PossibleContentKeyPolicyRestrictionTokenTypeValues() []ContentKeyPolicyRestrictionTokenType

PossibleContentKeyPolicyRestrictionTokenTypeValues returns the possible values for the ContentKeyPolicyRestrictionTokenType const type.

type ContentKeyPolicyRsaTokenKey

type ContentKeyPolicyRsaTokenKey struct {
	// REQUIRED; The RSA Parameter exponent
	Exponent []byte `json:"exponent,omitempty"`

	// REQUIRED; The RSA Parameter modulus
	Modulus []byte `json:"modulus,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ContentKeyPolicyRsaTokenKey - Specifies a RSA key for token validation

func (*ContentKeyPolicyRsaTokenKey) GetContentKeyPolicyRestrictionTokenKey added in v0.3.0

func (c *ContentKeyPolicyRsaTokenKey) GetContentKeyPolicyRestrictionTokenKey() *ContentKeyPolicyRestrictionTokenKey

GetContentKeyPolicyRestrictionTokenKey implements the ContentKeyPolicyRestrictionTokenKeyClassification interface for type ContentKeyPolicyRsaTokenKey.

func (ContentKeyPolicyRsaTokenKey) MarshalJSON

func (c ContentKeyPolicyRsaTokenKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyRsaTokenKey.

func (*ContentKeyPolicyRsaTokenKey) UnmarshalJSON

func (c *ContentKeyPolicyRsaTokenKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyRsaTokenKey.

type ContentKeyPolicySymmetricTokenKey

type ContentKeyPolicySymmetricTokenKey struct {
	// REQUIRED; The key value of the key
	KeyValue []byte `json:"keyValue,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ContentKeyPolicySymmetricTokenKey - Specifies a symmetric key for token validation.

func (*ContentKeyPolicySymmetricTokenKey) GetContentKeyPolicyRestrictionTokenKey added in v0.3.0

func (c *ContentKeyPolicySymmetricTokenKey) GetContentKeyPolicyRestrictionTokenKey() *ContentKeyPolicyRestrictionTokenKey

GetContentKeyPolicyRestrictionTokenKey implements the ContentKeyPolicyRestrictionTokenKeyClassification interface for type ContentKeyPolicySymmetricTokenKey.

func (ContentKeyPolicySymmetricTokenKey) MarshalJSON

func (c ContentKeyPolicySymmetricTokenKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicySymmetricTokenKey.

func (*ContentKeyPolicySymmetricTokenKey) UnmarshalJSON

func (c *ContentKeyPolicySymmetricTokenKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicySymmetricTokenKey.

type ContentKeyPolicyTokenClaim

type ContentKeyPolicyTokenClaim struct {
	// Token claim type.
	ClaimType *string `json:"claimType,omitempty"`

	// Token claim value.
	ClaimValue *string `json:"claimValue,omitempty"`
}

ContentKeyPolicyTokenClaim - Represents a token claim.

type ContentKeyPolicyTokenRestriction

type ContentKeyPolicyTokenRestriction struct {
	// REQUIRED; The audience for the token.
	Audience *string `json:"audience,omitempty"`

	// REQUIRED; The token issuer.
	Issuer *string `json:"issuer,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// REQUIRED; The primary verification key.
	PrimaryVerificationKey ContentKeyPolicyRestrictionTokenKeyClassification `json:"primaryVerificationKey,omitempty"`

	// REQUIRED; The type of token.
	RestrictionTokenType *ContentKeyPolicyRestrictionTokenType `json:"restrictionTokenType,omitempty"`

	// A list of alternative verification keys.
	AlternateVerificationKeys []ContentKeyPolicyRestrictionTokenKeyClassification `json:"alternateVerificationKeys,omitempty"`

	// The OpenID connect discovery document.
	OpenIDConnectDiscoveryDocument *string `json:"openIdConnectDiscoveryDocument,omitempty"`

	// A list of required token claims.
	RequiredClaims []*ContentKeyPolicyTokenClaim `json:"requiredClaims,omitempty"`
}

ContentKeyPolicyTokenRestriction - Represents a token restriction. Provided token must match these requirements for successful license or key delivery.

func (*ContentKeyPolicyTokenRestriction) GetContentKeyPolicyRestriction added in v0.3.0

func (c *ContentKeyPolicyTokenRestriction) GetContentKeyPolicyRestriction() *ContentKeyPolicyRestriction

GetContentKeyPolicyRestriction implements the ContentKeyPolicyRestrictionClassification interface for type ContentKeyPolicyTokenRestriction.

func (ContentKeyPolicyTokenRestriction) MarshalJSON

func (c ContentKeyPolicyTokenRestriction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyTokenRestriction.

func (*ContentKeyPolicyTokenRestriction) UnmarshalJSON

func (c *ContentKeyPolicyTokenRestriction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyTokenRestriction.

type ContentKeyPolicyUnknownConfiguration

type ContentKeyPolicyUnknownConfiguration struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ContentKeyPolicyUnknownConfiguration - Represents a ContentKeyPolicyConfiguration that is unavailable in the current API version.

func (*ContentKeyPolicyUnknownConfiguration) GetContentKeyPolicyConfiguration added in v0.3.0

func (c *ContentKeyPolicyUnknownConfiguration) GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration

GetContentKeyPolicyConfiguration implements the ContentKeyPolicyConfigurationClassification interface for type ContentKeyPolicyUnknownConfiguration.

func (ContentKeyPolicyUnknownConfiguration) MarshalJSON

func (c ContentKeyPolicyUnknownConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyUnknownConfiguration.

func (*ContentKeyPolicyUnknownConfiguration) UnmarshalJSON added in v0.3.0

func (c *ContentKeyPolicyUnknownConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyUnknownConfiguration.

type ContentKeyPolicyUnknownRestriction

type ContentKeyPolicyUnknownRestriction struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ContentKeyPolicyUnknownRestriction - Represents a ContentKeyPolicyRestriction that is unavailable in the current API version.

func (*ContentKeyPolicyUnknownRestriction) GetContentKeyPolicyRestriction added in v0.3.0

func (c *ContentKeyPolicyUnknownRestriction) GetContentKeyPolicyRestriction() *ContentKeyPolicyRestriction

GetContentKeyPolicyRestriction implements the ContentKeyPolicyRestrictionClassification interface for type ContentKeyPolicyUnknownRestriction.

func (ContentKeyPolicyUnknownRestriction) MarshalJSON

func (c ContentKeyPolicyUnknownRestriction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyUnknownRestriction.

func (*ContentKeyPolicyUnknownRestriction) UnmarshalJSON added in v0.3.0

func (c *ContentKeyPolicyUnknownRestriction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyUnknownRestriction.

type ContentKeyPolicyWidevineConfiguration

type ContentKeyPolicyWidevineConfiguration struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// REQUIRED; The Widevine template.
	WidevineTemplate *string `json:"widevineTemplate,omitempty"`
}

ContentKeyPolicyWidevineConfiguration - Specifies a configuration for Widevine licenses.

func (*ContentKeyPolicyWidevineConfiguration) GetContentKeyPolicyConfiguration added in v0.3.0

func (c *ContentKeyPolicyWidevineConfiguration) GetContentKeyPolicyConfiguration() *ContentKeyPolicyConfiguration

GetContentKeyPolicyConfiguration implements the ContentKeyPolicyConfigurationClassification interface for type ContentKeyPolicyWidevineConfiguration.

func (ContentKeyPolicyWidevineConfiguration) MarshalJSON

func (c ContentKeyPolicyWidevineConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyWidevineConfiguration.

func (*ContentKeyPolicyWidevineConfiguration) UnmarshalJSON

func (c *ContentKeyPolicyWidevineConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyWidevineConfiguration.

type ContentKeyPolicyX509CertificateTokenKey

type ContentKeyPolicyX509CertificateTokenKey struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// REQUIRED; The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET)
	RawBody []byte `json:"rawBody,omitempty"`
}

ContentKeyPolicyX509CertificateTokenKey - Specifies a certificate for token validation.

func (*ContentKeyPolicyX509CertificateTokenKey) GetContentKeyPolicyRestrictionTokenKey added in v0.3.0

func (c *ContentKeyPolicyX509CertificateTokenKey) GetContentKeyPolicyRestrictionTokenKey() *ContentKeyPolicyRestrictionTokenKey

GetContentKeyPolicyRestrictionTokenKey implements the ContentKeyPolicyRestrictionTokenKeyClassification interface for type ContentKeyPolicyX509CertificateTokenKey.

func (ContentKeyPolicyX509CertificateTokenKey) MarshalJSON

func (c ContentKeyPolicyX509CertificateTokenKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContentKeyPolicyX509CertificateTokenKey.

func (*ContentKeyPolicyX509CertificateTokenKey) UnmarshalJSON

func (c *ContentKeyPolicyX509CertificateTokenKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContentKeyPolicyX509CertificateTokenKey.

type CopyAudio

type CopyAudio struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string `json:"label,omitempty"`
}

CopyAudio - A codec flag, which tells the encoder to copy the input audio bitstream.

func (*CopyAudio) GetCodec added in v0.3.0

func (c *CopyAudio) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type CopyAudio.

func (CopyAudio) MarshalJSON

func (c CopyAudio) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CopyAudio.

func (*CopyAudio) UnmarshalJSON added in v0.3.0

func (c *CopyAudio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CopyAudio.

type CopyVideo

type CopyVideo struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string `json:"label,omitempty"`
}

CopyVideo - A codec flag, which tells the encoder to copy the input video bitstream without re-encoding.

func (*CopyVideo) GetCodec added in v0.3.0

func (c *CopyVideo) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type CopyVideo.

func (CopyVideo) MarshalJSON

func (c CopyVideo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CopyVideo.

func (*CopyVideo) UnmarshalJSON added in v0.3.0

func (c *CopyVideo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CopyVideo.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type CrossSiteAccessPolicies

type CrossSiteAccessPolicies struct {
	// The content of clientaccesspolicy.xml used by Silverlight.
	ClientAccessPolicy *string `json:"clientAccessPolicy,omitempty"`

	// The content of crossdomain.xml used by Silverlight.
	CrossDomainPolicy *string `json:"crossDomainPolicy,omitempty"`
}

CrossSiteAccessPolicies - The client access policy.

type DefaultAction

type DefaultAction string

DefaultAction - The behavior for IP access control in Key Delivery.

const (
	// DefaultActionAllow - All public IP addresses are allowed.
	DefaultActionAllow DefaultAction = "Allow"
	// DefaultActionDeny - Public IP addresses are blocked.
	DefaultActionDeny DefaultAction = "Deny"
)

func PossibleDefaultActionValues

func PossibleDefaultActionValues() []DefaultAction

PossibleDefaultActionValues returns the possible values for the DefaultAction const type.

type DefaultKey

type DefaultKey struct {
	// Label can be used to specify Content Key when creating a Streaming Locator
	Label *string `json:"label,omitempty"`

	// Policy used by Default Key
	PolicyName *string `json:"policyName,omitempty"`
}

DefaultKey - Class to specify properties of default content key for each encryption scheme

type Deinterlace

type Deinterlace struct {
	// The deinterlacing mode. Defaults to AutoPixelAdaptive.
	Mode *DeinterlaceMode `json:"mode,omitempty"`

	// The field parity for de-interlacing, defaults to Auto.
	Parity *DeinterlaceParity `json:"parity,omitempty"`
}

Deinterlace - Describes the de-interlacing settings.

type DeinterlaceMode

type DeinterlaceMode string

DeinterlaceMode - The deinterlacing mode. Defaults to AutoPixelAdaptive.

const (
	// DeinterlaceModeAutoPixelAdaptive - Apply automatic pixel adaptive de-interlacing on each frame in the input video.
	DeinterlaceModeAutoPixelAdaptive DeinterlaceMode = "AutoPixelAdaptive"
	// DeinterlaceModeOff - Disables de-interlacing of the source video.
	DeinterlaceModeOff DeinterlaceMode = "Off"
)

func PossibleDeinterlaceModeValues

func PossibleDeinterlaceModeValues() []DeinterlaceMode

PossibleDeinterlaceModeValues returns the possible values for the DeinterlaceMode const type.

type DeinterlaceParity

type DeinterlaceParity string

DeinterlaceParity - The field parity for de-interlacing, defaults to Auto.

const (
	// DeinterlaceParityAuto - Automatically detect the order of fields
	DeinterlaceParityAuto DeinterlaceParity = "Auto"
	// DeinterlaceParityBottomFieldFirst - Apply bottom field first processing of input video.
	DeinterlaceParityBottomFieldFirst DeinterlaceParity = "BottomFieldFirst"
	// DeinterlaceParityTopFieldFirst - Apply top field first processing of input video.
	DeinterlaceParityTopFieldFirst DeinterlaceParity = "TopFieldFirst"
)

func PossibleDeinterlaceParityValues

func PossibleDeinterlaceParityValues() []DeinterlaceParity

PossibleDeinterlaceParityValues returns the possible values for the DeinterlaceParity const type.

type EdgePolicies

type EdgePolicies struct {
	UsageDataCollectionPolicy *EdgeUsageDataCollectionPolicy `json:"usageDataCollectionPolicy,omitempty"`
}

type EdgeUsageDataCollectionPolicy

type EdgeUsageDataCollectionPolicy struct {
	// Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H.
	DataCollectionFrequency *string `json:"dataCollectionFrequency,omitempty"`

	// Usage data reporting frequency in ISO 8601 duration format e.g. PT10M , PT5H.
	DataReportingFrequency *string `json:"dataReportingFrequency,omitempty"`

	// Details of Event Hub where the usage will be reported.
	EventHubDetails *EdgeUsageDataEventHub `json:"eventHubDetails,omitempty"`

	// Maximum time for which the functionality of the device will not be hampered for not reporting the usage data.
	MaxAllowedUnreportedUsageDuration *string `json:"maxAllowedUnreportedUsageDuration,omitempty"`
}

type EdgeUsageDataEventHub

type EdgeUsageDataEventHub struct {
	// Name of the Event Hub where usage will be reported.
	Name *string `json:"name,omitempty"`

	// Namespace of the Event Hub where usage will be reported.
	Namespace *string `json:"namespace,omitempty"`

	// SAS token needed to interact with Event Hub.
	Token *string `json:"token,omitempty"`
}

type EnabledProtocols

type EnabledProtocols struct {
	// REQUIRED; Enable DASH protocol or not
	Dash *bool `json:"dash,omitempty"`

	// REQUIRED; Enable Download protocol or not
	Download *bool `json:"download,omitempty"`

	// REQUIRED; Enable HLS protocol or not
	Hls *bool `json:"hls,omitempty"`

	// REQUIRED; Enable SmoothStreaming protocol or not
	SmoothStreaming *bool `json:"smoothStreaming,omitempty"`
}

EnabledProtocols - Class to specify which protocols are enabled

type EncoderNamedPreset

type EncoderNamedPreset string

EncoderNamedPreset - The built-in preset to be used for encoding videos.

const (
	// EncoderNamedPresetAACGoodQualityAudio - Produces a single MP4 file containing only stereo audio encoded at 192 kbps.
	EncoderNamedPresetAACGoodQualityAudio EncoderNamedPreset = "AACGoodQualityAudio"
	// EncoderNamedPresetAdaptiveStreaming - Produces a set of GOP aligned MP4 files with H.264 video and stereo AAC audio. Auto-generates
	// a bitrate ladder based on the input resolution, bitrate and frame rate. The auto-generated preset will never exceed the
	// input resolution. For example, if the input is 720p, output will remain 720p at best.
	EncoderNamedPresetAdaptiveStreaming EncoderNamedPreset = "AdaptiveStreaming"
	// EncoderNamedPresetContentAwareEncoding - Produces a set of GOP-aligned MP4s by using content-aware encoding. Given any
	// input content, the service performs an initial lightweight analysis of the input content, and uses the results to determine
	// the optimal number of layers, appropriate bitrate and resolution settings for delivery by adaptive streaming. This preset
	// is particularly effective for low and medium complexity videos, where the output files will be at lower bitrates but at
	// a quality that still delivers a good experience to viewers. The output will contain MP4 files with video and audio interleaved.
	EncoderNamedPresetContentAwareEncoding EncoderNamedPreset = "ContentAwareEncoding"
	// EncoderNamedPresetContentAwareEncodingExperimental - Exposes an experimental preset for content-aware encoding. Given any
	// input content, the service attempts to automatically determine the optimal number of layers, appropriate bitrate and resolution
	// settings for delivery by adaptive streaming. The underlying algorithms will continue to evolve over time. The output will
	// contain MP4 files with video and audio interleaved.
	EncoderNamedPresetContentAwareEncodingExperimental EncoderNamedPreset = "ContentAwareEncodingExperimental"
	// EncoderNamedPresetCopyAllBitrateNonInterleaved - Copy all video and audio streams from the input asset as non-interleaved
	// video and audio output files. This preset can be used to clip an existing asset or convert a group of key frame (GOP) aligned
	// MP4 files as an asset that can be streamed.
	EncoderNamedPresetCopyAllBitrateNonInterleaved EncoderNamedPreset = "CopyAllBitrateNonInterleaved"
	// EncoderNamedPresetH264MultipleBitrate1080P - Produces a set of 8 GOP-aligned MP4 files, ranging from 6000 kbps to 400 kbps,
	// and stereo AAC audio. Resolution starts at 1080p and goes down to 180p.
	EncoderNamedPresetH264MultipleBitrate1080P EncoderNamedPreset = "H264MultipleBitrate1080p"
	// EncoderNamedPresetH264MultipleBitrate720P - Produces a set of 6 GOP-aligned MP4 files, ranging from 3400 kbps to 400 kbps,
	// and stereo AAC audio. Resolution starts at 720p and goes down to 180p.
	EncoderNamedPresetH264MultipleBitrate720P EncoderNamedPreset = "H264MultipleBitrate720p"
	// EncoderNamedPresetH264MultipleBitrateSD - Produces a set of 5 GOP-aligned MP4 files, ranging from 1900kbps to 400 kbps,
	// and stereo AAC audio. Resolution starts at 480p and goes down to 240p.
	EncoderNamedPresetH264MultipleBitrateSD EncoderNamedPreset = "H264MultipleBitrateSD"
	// EncoderNamedPresetH264SingleBitrate1080P - Produces an MP4 file where the video is encoded with H.264 codec at 6750 kbps
	// and a picture height of 1080 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.
	EncoderNamedPresetH264SingleBitrate1080P EncoderNamedPreset = "H264SingleBitrate1080p"
	// EncoderNamedPresetH264SingleBitrate720P - Produces an MP4 file where the video is encoded with H.264 codec at 4500 kbps
	// and a picture height of 720 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.
	EncoderNamedPresetH264SingleBitrate720P EncoderNamedPreset = "H264SingleBitrate720p"
	// EncoderNamedPresetH264SingleBitrateSD - Produces an MP4 file where the video is encoded with H.264 codec at 2200 kbps and
	// a picture height of 480 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.
	EncoderNamedPresetH264SingleBitrateSD EncoderNamedPreset = "H264SingleBitrateSD"
	// EncoderNamedPresetH265AdaptiveStreaming - Produces a set of GOP aligned MP4 files with H.265 video and stereo AAC audio.
	// Auto-generates a bitrate ladder based on the input resolution, bitrate and frame rate. The auto-generated preset will never
	// exceed the input resolution. For example, if the input is 720p, output will remain 720p at best.
	EncoderNamedPresetH265AdaptiveStreaming EncoderNamedPreset = "H265AdaptiveStreaming"
	// EncoderNamedPresetH265ContentAwareEncoding - Produces a set of GOP-aligned MP4s by using content-aware encoding. Given
	// any input content, the service performs an initial lightweight analysis of the input content, and uses the results to determine
	// the optimal number of layers, appropriate bitrate and resolution settings for delivery by adaptive streaming. This preset
	// is particularly effective for low and medium complexity videos, where the output files will be at lower bitrates but at
	// a quality that still delivers a good experience to viewers. The output will contain MP4 files with video and audio interleaved.
	EncoderNamedPresetH265ContentAwareEncoding EncoderNamedPreset = "H265ContentAwareEncoding"
	// EncoderNamedPresetH265SingleBitrate1080P - Produces an MP4 file where the video is encoded with H.265 codec at 3500 kbps
	// and a picture height of 1080 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.
	EncoderNamedPresetH265SingleBitrate1080P EncoderNamedPreset = "H265SingleBitrate1080p"
	// EncoderNamedPresetH265SingleBitrate4K - Produces an MP4 file where the video is encoded with H.265 codec at 9500 kbps and
	// a picture height of 2160 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.
	EncoderNamedPresetH265SingleBitrate4K EncoderNamedPreset = "H265SingleBitrate4K"
	// EncoderNamedPresetH265SingleBitrate720P - Produces an MP4 file where the video is encoded with H.265 codec at 1800 kbps
	// and a picture height of 720 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.
	EncoderNamedPresetH265SingleBitrate720P EncoderNamedPreset = "H265SingleBitrate720p"
)

func PossibleEncoderNamedPresetValues

func PossibleEncoderNamedPresetValues() []EncoderNamedPreset

PossibleEncoderNamedPresetValues returns the possible values for the EncoderNamedPreset const type.

type EncryptionScheme

type EncryptionScheme string

EncryptionScheme - Encryption scheme

const (
	// EncryptionSchemeCommonEncryptionCbcs - CommonEncryptionCbcs scheme
	EncryptionSchemeCommonEncryptionCbcs EncryptionScheme = "CommonEncryptionCbcs"
	// EncryptionSchemeCommonEncryptionCenc - CommonEncryptionCenc scheme
	EncryptionSchemeCommonEncryptionCenc EncryptionScheme = "CommonEncryptionCenc"
	// EncryptionSchemeEnvelopeEncryption - EnvelopeEncryption scheme
	EncryptionSchemeEnvelopeEncryption EncryptionScheme = "EnvelopeEncryption"
	// EncryptionSchemeNoEncryption - NoEncryption scheme
	EncryptionSchemeNoEncryption EncryptionScheme = "NoEncryption"
)

func PossibleEncryptionSchemeValues

func PossibleEncryptionSchemeValues() []EncryptionScheme

PossibleEncryptionSchemeValues returns the possible values for the EncryptionScheme const type.

type EntityNameAvailabilityCheckOutput

type EntityNameAvailabilityCheckOutput struct {
	// REQUIRED; Specifies if the name is available.
	NameAvailable *bool `json:"nameAvailable,omitempty"`

	// Specifies the detailed reason if the name is not available.
	Message *string `json:"message,omitempty"`

	// Specifies the reason if the name is not available.
	Reason *string `json:"reason,omitempty"`
}

EntityNameAvailabilityCheckOutput - The response from the check name availability request.

type EntropyMode

type EntropyMode string

EntropyMode - The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level.

const (
	// EntropyModeCabac - Context Adaptive Binary Arithmetic Coder (CABAC) entropy encoding.
	EntropyModeCabac EntropyMode = "Cabac"
	// EntropyModeCavlc - Context Adaptive Variable Length Coder (CAVLC) entropy encoding.
	EntropyModeCavlc EntropyMode = "Cavlc"
)

func PossibleEntropyModeValues

func PossibleEntropyModeValues() []EntropyMode

PossibleEntropyModeValues returns the possible values for the EntropyMode const type.

type EnvelopeEncryption

type EnvelopeEncryption struct {
	// Representing which tracks should not be encrypted
	ClearTracks []*TrackSelection `json:"clearTracks,omitempty"`

	// Representing default content key for each encryption scheme and separate content keys for specific tracks
	ContentKeys *StreamingPolicyContentKeys `json:"contentKeys,omitempty"`

	// Template for the URL of the custom service delivering keys to end user players. Not required when using Azure Media Services
	// for issuing keys. The template supports replaceable tokens that the service
	// will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId},
	// which is replaced with the value of StreamingLocatorId.AlternativeMediaId,
	// and {ContentKeyId}, which is replaced with the value of identifier of the key being requested.
	CustomKeyAcquisitionURLTemplate *string `json:"customKeyAcquisitionUrlTemplate,omitempty"`

	// Representing supported protocols
	EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"`
}

EnvelopeEncryption - Class for EnvelopeEncryption encryption scheme

func (EnvelopeEncryption) MarshalJSON

func (e EnvelopeEncryption) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EnvelopeEncryption.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info interface{} `json:"info,omitempty" azure:"ro"`

	// READ-ONLY; The additional info type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

ErrorAdditionalInfo - The resource management error additional info.

type ErrorDetail

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"`

	// READ-ONLY; The error code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; The error details.
	Details []*ErrorDetail `json:"details,omitempty" azure:"ro"`

	// READ-ONLY; The error message.
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; The error target.
	Target *string `json:"target,omitempty" azure:"ro"`
}

ErrorDetail - The error detail.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail `json:"error,omitempty"`
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

type FaceDetectorPreset

type FaceDetectorPreset struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// Blur type
	BlurType *BlurType `json:"blurType,omitempty"`

	// Dictionary containing key value pairs for parameters not exposed in the preset itself
	ExperimentalOptions map[string]*string `json:"experimentalOptions,omitempty"`

	// This mode provides the ability to choose between the following settings: 1) Analyze - For detection only.This mode generates
	// a metadata JSON file marking appearances of faces throughout the
	// video.Where possible, appearances of the same person are assigned the same ID. 2) Combined - Additionally redacts(blurs)
	// detected faces. 3) Redact - This enables a 2-pass process, allowing for
	// selective redaction of a subset of detected faces.It takes in the metadata file from a prior analyze pass, along with the
	// source video, and a user-selected subset of IDs that require redaction.
	Mode *FaceRedactorMode `json:"mode,omitempty"`

	// Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will
	// keep the input video at its original resolution when analyzed. Using
	// "StandardDefinition" will resize input videos to standard definition while preserving the appropriate aspect ratio. It
	// will only resize if the video is of higher resolution. For example, a 1920x1080
	// input would be scaled to 640x360 before processing. Switching to "StandardDefinition" will reduce the time it takes to
	// process high resolution video. It may also reduce the cost of using this
	// component (see https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics for details). However, faces
	// that end up being too small in the resized video may not be detected.
	Resolution *AnalysisResolution `json:"resolution,omitempty"`
}

FaceDetectorPreset - Describes all the settings to be used when analyzing a video in order to detect (and optionally redact) all the faces present.

func (*FaceDetectorPreset) GetPreset added in v0.3.0

func (f *FaceDetectorPreset) GetPreset() *Preset

GetPreset implements the PresetClassification interface for type FaceDetectorPreset.

func (FaceDetectorPreset) MarshalJSON

func (f FaceDetectorPreset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FaceDetectorPreset.

func (*FaceDetectorPreset) UnmarshalJSON

func (f *FaceDetectorPreset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FaceDetectorPreset.

type FaceRedactorMode

type FaceRedactorMode string

FaceRedactorMode - This mode provides the ability to choose between the following settings: 1) Analyze - For detection only.This mode generates a metadata JSON file marking appearances of faces throughout the video.Where possible, appearances of the same person are assigned the same ID. 2) Combined - Additionally redacts(blurs) detected faces. 3) Redact - This enables a 2-pass process, allowing for selective redaction of a subset of detected faces.It takes in the metadata file from a prior analyze pass, along with the source video, and a user-selected subset of IDs that require redaction.

const (
	// FaceRedactorModeAnalyze - Analyze mode detects faces and outputs a metadata file with the results. Allows editing of the
	// metadata file before faces are blurred with Redact mode.
	FaceRedactorModeAnalyze FaceRedactorMode = "Analyze"
	// FaceRedactorModeCombined - Combined mode does the Analyze and Redact steps in one pass when editing the analyzed faces
	// is not desired.
	FaceRedactorModeCombined FaceRedactorMode = "Combined"
	// FaceRedactorModeRedact - Redact mode consumes the metadata file from Analyze mode and redacts the faces found.
	FaceRedactorModeRedact FaceRedactorMode = "Redact"
)

func PossibleFaceRedactorModeValues

func PossibleFaceRedactorModeValues() []FaceRedactorMode

PossibleFaceRedactorModeValues returns the possible values for the FaceRedactorMode const type.

type FilterTrackPropertyCompareOperation

type FilterTrackPropertyCompareOperation string

FilterTrackPropertyCompareOperation - The track property condition operation.

const (
	// FilterTrackPropertyCompareOperationEqual - The equal operation.
	FilterTrackPropertyCompareOperationEqual FilterTrackPropertyCompareOperation = "Equal"
	// FilterTrackPropertyCompareOperationNotEqual - The not equal operation.
	FilterTrackPropertyCompareOperationNotEqual FilterTrackPropertyCompareOperation = "NotEqual"
)

func PossibleFilterTrackPropertyCompareOperationValues

func PossibleFilterTrackPropertyCompareOperationValues() []FilterTrackPropertyCompareOperation

PossibleFilterTrackPropertyCompareOperationValues returns the possible values for the FilterTrackPropertyCompareOperation const type.

type FilterTrackPropertyCondition

type FilterTrackPropertyCondition struct {
	// REQUIRED; The track property condition operation.
	Operation *FilterTrackPropertyCompareOperation `json:"operation,omitempty"`

	// REQUIRED; The track property type.
	Property *FilterTrackPropertyType `json:"property,omitempty"`

	// REQUIRED; The track property value.
	Value *string `json:"value,omitempty"`
}

FilterTrackPropertyCondition - The class to specify one track property condition.

type FilterTrackPropertyType

type FilterTrackPropertyType string

FilterTrackPropertyType - The track property type.

const (
	// FilterTrackPropertyTypeBitrate - The bitrate.
	FilterTrackPropertyTypeBitrate FilterTrackPropertyType = "Bitrate"
	// FilterTrackPropertyTypeFourCC - The fourCC.
	FilterTrackPropertyTypeFourCC FilterTrackPropertyType = "FourCC"
	// FilterTrackPropertyTypeLanguage - The language.
	FilterTrackPropertyTypeLanguage FilterTrackPropertyType = "Language"
	// FilterTrackPropertyTypeName - The name.
	FilterTrackPropertyTypeName FilterTrackPropertyType = "Name"
	// FilterTrackPropertyTypeType - The type.
	FilterTrackPropertyTypeType FilterTrackPropertyType = "Type"
	// FilterTrackPropertyTypeUnknown - The unknown track property type.
	FilterTrackPropertyTypeUnknown FilterTrackPropertyType = "Unknown"
)

func PossibleFilterTrackPropertyTypeValues

func PossibleFilterTrackPropertyTypeValues() []FilterTrackPropertyType

PossibleFilterTrackPropertyTypeValues returns the possible values for the FilterTrackPropertyType const type.

type FilterTrackSelection

type FilterTrackSelection struct {
	// REQUIRED; The track selections.
	TrackSelections []*FilterTrackPropertyCondition `json:"trackSelections,omitempty"`
}

FilterTrackSelection - Representing a list of FilterTrackPropertyConditions to select a track. The filters are combined using a logical AND operation.

func (FilterTrackSelection) MarshalJSON

func (f FilterTrackSelection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FilterTrackSelection.

type Filters

type Filters struct {
	// The parameters for the rectangular window with which to crop the input video.
	Crop *Rectangle `json:"crop,omitempty"`

	// The de-interlacing settings.
	Deinterlace *Deinterlace `json:"deinterlace,omitempty"`

	// The properties of overlays to be applied to the input video. These could be audio, image or video overlays.
	Overlays []OverlayClassification `json:"overlays,omitempty"`

	// The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto
	Rotation *Rotation `json:"rotation,omitempty"`
}

Filters - Describes all the filtering operations, such as de-interlacing, rotation etc. that are to be applied to the input media before encoding.

func (Filters) MarshalJSON

func (f Filters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Filters.

func (*Filters) UnmarshalJSON

func (f *Filters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Filters.

type FirstQuality

type FirstQuality struct {
	// REQUIRED; The first quality bitrate.
	Bitrate *int32 `json:"bitrate,omitempty"`
}

FirstQuality - Filter First Quality

type Format

type Format struct {
	// REQUIRED; The pattern of the file names for the generated output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec.
	// {Resolution} - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename.
	FilenamePattern *string `json:"filenamePattern,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

Format - Base class for output.

func (*Format) GetFormat

func (f *Format) GetFormat() *Format

GetFormat implements the FormatClassification interface for type Format.

type FormatClassification

type FormatClassification interface {
	// GetFormat returns the Format content of the underlying type.
	GetFormat() *Format
}

FormatClassification provides polymorphic access to related types. Call the interface's GetFormat() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *Format, *ImageFormat, *JpgFormat, *Mp4Format, *MultiBitrateFormat, *PNGFormat, *TransportStreamFormat

type FromAllInputFile

type FromAllInputFile struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The list of TrackDescriptors which define the metadata and selection of tracks in the input.
	IncludedTracks []TrackDescriptorClassification `json:"includedTracks,omitempty"`
}

FromAllInputFile - An InputDefinition that looks across all of the files provided to select tracks specified by the IncludedTracks property. Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to allow selection of a single track across a set of input files.

func (*FromAllInputFile) GetInputDefinition added in v0.3.0

func (f *FromAllInputFile) GetInputDefinition() *InputDefinition

GetInputDefinition implements the InputDefinitionClassification interface for type FromAllInputFile.

func (FromAllInputFile) MarshalJSON

func (f FromAllInputFile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FromAllInputFile.

func (*FromAllInputFile) UnmarshalJSON added in v0.3.0

func (f *FromAllInputFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FromAllInputFile.

type FromEachInputFile

type FromEachInputFile struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The list of TrackDescriptors which define the metadata and selection of tracks in the input.
	IncludedTracks []TrackDescriptorClassification `json:"includedTracks,omitempty"`
}

FromEachInputFile - An InputDefinition that looks at each input file provided to select tracks specified by the IncludedTracks property. Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to select tracks from each file given.

func (*FromEachInputFile) GetInputDefinition added in v0.3.0

func (f *FromEachInputFile) GetInputDefinition() *InputDefinition

GetInputDefinition implements the InputDefinitionClassification interface for type FromEachInputFile.

func (FromEachInputFile) MarshalJSON

func (f FromEachInputFile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FromEachInputFile.

func (*FromEachInputFile) UnmarshalJSON added in v0.3.0

func (f *FromEachInputFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FromEachInputFile.

type H264Complexity

type H264Complexity string

H264Complexity - Tells the encoder how to choose its encoding settings. The default value is Balanced.

const (
	// H264ComplexityBalanced - Tells the encoder to use settings that achieve a balance between speed and quality.
	H264ComplexityBalanced H264Complexity = "Balanced"
	// H264ComplexityQuality - Tells the encoder to use settings that are optimized to produce higher quality output at the expense
	// of slower overall encode time.
	H264ComplexityQuality H264Complexity = "Quality"
	// H264ComplexitySpeed - Tells the encoder to use settings that are optimized for faster encoding. Quality is sacrificed to
	// decrease encoding time.
	H264ComplexitySpeed H264Complexity = "Speed"
)

func PossibleH264ComplexityValues

func PossibleH264ComplexityValues() []H264Complexity

PossibleH264ComplexityValues returns the possible values for the H264Complexity const type.

type H264Layer

type H264Layer struct {
	// REQUIRED; The average bitrate in bits per second at which to encode the input video when generating this layer. This is
	// a required field.
	Bitrate *int32 `json:"bitrate,omitempty"`

	// Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on
	// whenever the video profile permits its use.
	AdaptiveBFrame *bool `json:"adaptiveBFrame,omitempty"`

	// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number
	// based on the video profile and level.
	BFrames *int32 `json:"bFrames,omitempty"`

	// The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds.
	// The default is 5 seconds (for example, PT5S).
	BufferWindow *string `json:"bufferWindow,omitempty"`

	// The value of CRF to be used when encoding this layer. This setting takes effect when RateControlMode of video codec is
	// set at CRF mode. The range of CRF value is between 0 and 51, where lower values
	// would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point
	// quality degradation will be noticed. Default value is 23.
	Crf *float32 `json:"crf,omitempty"`

	// The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the
	// profile and level.
	EntropyMode *EntropyMode `json:"entropyMode,omitempty"`

	// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N
	// are integers (For example, 30000/1001), or in the form of a number (For example,
	// 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified,
	// the encoder will use the same frame rate as the input video.
	FrameRate *string `json:"frameRate,omitempty"`

	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string `json:"height,omitempty"`

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string `json:"label,omitempty"`

	// We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 profile. If not specified,
	// the default is Auto, which lets the encoder choose the Level that is
	// appropriate for this layer.
	Level *string `json:"level,omitempty"`

	// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults
	// to the same value as bitrate.
	MaxBitrate *int32 `json:"maxBitrate,omitempty"`

	// We currently support Baseline, Main, High, High422, High444. Default is Auto.
	Profile *H264VideoProfile `json:"profile,omitempty"`

	// The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate
	// number based on the encoder complexity setting.
	ReferenceFrames *int32 `json:"referenceFrames,omitempty"`

	// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will
	// use a single slice for each frame.
	Slices *int32 `json:"slices,omitempty"`

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string `json:"width,omitempty"`
}

H264Layer - Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 video codec.

type H264RateControlMode added in v0.4.0

type H264RateControlMode string

H264RateControlMode - The video rate control mode

const (
	// H264RateControlModeABR - Average Bitrate (ABR) mode that hits the target bitrate: Default mode.
	H264RateControlModeABR H264RateControlMode = "ABR"
	// H264RateControlModeCBR - Constant Bitrate (CBR) mode that tightens bitrate variations around target bitrate.
	H264RateControlModeCBR H264RateControlMode = "CBR"
	// H264RateControlModeCRF - Constant Rate Factor (CRF) mode that targets at constant subjective quality.
	H264RateControlModeCRF H264RateControlMode = "CRF"
)

func PossibleH264RateControlModeValues added in v0.4.0

func PossibleH264RateControlModeValues() []H264RateControlMode

PossibleH264RateControlModeValues returns the possible values for the H264RateControlMode const type.

type H264Video

type H264Video struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// Tells the encoder how to choose its encoding settings. The default value is Balanced.
	Complexity *H264Complexity `json:"complexity,omitempty"`

	// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601
	// format. The default is 2 seconds(PT2S). Note that this setting is ignored if
	// VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.
	KeyFrameInterval *string `json:"keyFrameInterval,omitempty"`

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string `json:"label,omitempty"`

	// The collection of output H.264 layers to be produced by the encoder.
	Layers []*H264Layer `json:"layers,omitempty"`

	// The video rate control mode
	RateControlMode *H264RateControlMode `json:"rateControlMode,omitempty"`

	// Whether or not the encoder should insert key frames at scene changes. If not specified, the default is false. This flag
	// should be set to true only when the encoder is being configured to produce a
	// single output video.
	SceneChangeDetection *bool `json:"sceneChangeDetection,omitempty"`

	// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize
	StretchMode *StretchMode `json:"stretchMode,omitempty"`

	// The Video Sync Mode
	SyncMode *VideoSyncMode `json:"syncMode,omitempty"`
}

H264Video - Describes all the properties for encoding a video with the H.264 codec.

func (*H264Video) GetCodec added in v0.3.0

func (h *H264Video) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type H264Video.

func (*H264Video) GetVideo added in v0.3.0

func (h *H264Video) GetVideo() *Video

GetVideo implements the VideoClassification interface for type H264Video.

func (H264Video) MarshalJSON

func (h H264Video) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type H264Video.

func (*H264Video) UnmarshalJSON

func (h *H264Video) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type H264Video.

type H264VideoProfile

type H264VideoProfile string

H264VideoProfile - We currently support Baseline, Main, High, High422, High444. Default is Auto.

const (
	// H264VideoProfileAuto - Tells the encoder to automatically determine the appropriate H.264 profile.
	H264VideoProfileAuto H264VideoProfile = "Auto"
	// H264VideoProfileBaseline - Baseline profile
	H264VideoProfileBaseline H264VideoProfile = "Baseline"
	// H264VideoProfileHigh - High profile.
	H264VideoProfileHigh H264VideoProfile = "High"
	// H264VideoProfileHigh422 - High 4:2:2 profile.
	H264VideoProfileHigh422 H264VideoProfile = "High422"
	// H264VideoProfileHigh444 - High 4:4:4 predictive profile.
	H264VideoProfileHigh444 H264VideoProfile = "High444"
	// H264VideoProfileMain - Main profile
	H264VideoProfileMain H264VideoProfile = "Main"
)

func PossibleH264VideoProfileValues

func PossibleH264VideoProfileValues() []H264VideoProfile

PossibleH264VideoProfileValues returns the possible values for the H264VideoProfile const type.

type H265Complexity

type H265Complexity string

H265Complexity - Tells the encoder how to choose its encoding settings. Quality will provide for a higher compression ratio but at a higher cost and longer compute time. Speed will produce a relatively larger file but is faster and more economical. The default value is Balanced.

const (
	// H265ComplexityBalanced - Tells the encoder to use settings that achieve a balance between speed and quality.
	H265ComplexityBalanced H265Complexity = "Balanced"
	// H265ComplexityQuality - Tells the encoder to use settings that are optimized to produce higher quality output at the expense
	// of slower overall encode time.
	H265ComplexityQuality H265Complexity = "Quality"
	// H265ComplexitySpeed - Tells the encoder to use settings that are optimized for faster encoding. Quality is sacrificed to
	// decrease encoding time.
	H265ComplexitySpeed H265Complexity = "Speed"
)

func PossibleH265ComplexityValues

func PossibleH265ComplexityValues() []H265Complexity

PossibleH265ComplexityValues returns the possible values for the H265Complexity const type.

type H265Layer

type H265Layer struct {
	// REQUIRED; The average bitrate in bits per second at which to encode the input video when generating this layer. For example:
	// a target bitrate of 3000Kbps or 3Mbps means this value should be 3000000 This is a
	// required field.
	Bitrate *int32 `json:"bitrate,omitempty"`

	// Specifies whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will
	// turn it on whenever the video profile permits its use.
	AdaptiveBFrame *bool `json:"adaptiveBFrame,omitempty"`

	// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number
	// based on the video profile and level.
	BFrames *int32 `json:"bFrames,omitempty"`

	// The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds.
	// The default is 5 seconds (for example, PT5S).
	BufferWindow *string `json:"bufferWindow,omitempty"`

	// The value of CRF to be used when encoding this layer. This setting takes effect when RateControlMode of video codec is
	// set at CRF mode. The range of CRF value is between 0 and 51, where lower values
	// would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point
	// quality degradation will be noticed. Default value is 28.
	Crf *float32 `json:"crf,omitempty"`

	// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N
	// are integers (For example, 30000/1001), or in the form of a number (For example,
	// 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified,
	// the encoder will use the same frame rate as the input video.
	FrameRate *string `json:"frameRate,omitempty"`

	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string `json:"height,omitempty"`

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string `json:"label,omitempty"`

	// We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.265 profile. If not specified,
	// the default is Auto, which lets the encoder choose the Level that is
	// appropriate for this layer.
	Level *string `json:"level,omitempty"`

	// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults
	// to the same value as bitrate.
	MaxBitrate *int32 `json:"maxBitrate,omitempty"`

	// We currently support Main. Default is Auto.
	Profile *H265VideoProfile `json:"profile,omitempty"`

	// The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate
	// number based on the encoder complexity setting.
	ReferenceFrames *int32 `json:"referenceFrames,omitempty"`

	// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will
	// use a single slice for each frame.
	Slices *int32 `json:"slices,omitempty"`

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string `json:"width,omitempty"`
}

H265Layer - Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.265 video codec.

type H265Video

type H265Video struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// Tells the encoder how to choose its encoding settings. Quality will provide for a higher compression ratio but at a higher
	// cost and longer compute time. Speed will produce a relatively larger file but
	// is faster and more economical. The default value is Balanced.
	Complexity *H265Complexity `json:"complexity,omitempty"`

	// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601
	// format. The default is 2 seconds(PT2S). Note that this setting is ignored if
	// VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.
	KeyFrameInterval *string `json:"keyFrameInterval,omitempty"`

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string `json:"label,omitempty"`

	// The collection of output H.265 layers to be produced by the encoder.
	Layers []*H265Layer `json:"layers,omitempty"`

	// Specifies whether or not the encoder should insert key frames at scene changes. If not specified, the default is false.
	// This flag should be set to true only when the encoder is being configured to
	// produce a single output video.
	SceneChangeDetection *bool `json:"sceneChangeDetection,omitempty"`

	// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize
	StretchMode *StretchMode `json:"stretchMode,omitempty"`

	// The Video Sync Mode
	SyncMode *VideoSyncMode `json:"syncMode,omitempty"`
}

H265Video - Describes all the properties for encoding a video with the H.265 codec.

func (*H265Video) GetCodec added in v0.3.0

func (h *H265Video) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type H265Video.

func (*H265Video) GetVideo added in v0.3.0

func (h *H265Video) GetVideo() *Video

GetVideo implements the VideoClassification interface for type H265Video.

func (H265Video) MarshalJSON

func (h H265Video) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type H265Video.

func (*H265Video) UnmarshalJSON

func (h *H265Video) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type H265Video.

type H265VideoLayer

type H265VideoLayer struct {
	// REQUIRED; The average bitrate in bits per second at which to encode the input video when generating this layer. For example:
	// a target bitrate of 3000Kbps or 3Mbps means this value should be 3000000 This is a
	// required field.
	Bitrate *int32 `json:"bitrate,omitempty"`

	// Specifies whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will
	// turn it on whenever the video profile permits its use.
	AdaptiveBFrame *bool `json:"adaptiveBFrame,omitempty"`

	// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number
	// based on the video profile and level.
	BFrames *int32 `json:"bFrames,omitempty"`

	// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N
	// are integers (For example, 30000/1001), or in the form of a number (For example,
	// 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified,
	// the encoder will use the same frame rate as the input video.
	FrameRate *string `json:"frameRate,omitempty"`

	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string `json:"height,omitempty"`

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string `json:"label,omitempty"`

	// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults
	// to the same value as bitrate.
	MaxBitrate *int32 `json:"maxBitrate,omitempty"`

	// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will
	// use a single slice for each frame.
	Slices *int32 `json:"slices,omitempty"`

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string `json:"width,omitempty"`
}

H265VideoLayer - Describes the settings to be used when encoding the input video into a desired output bitrate layer.

type H265VideoProfile

type H265VideoProfile string

H265VideoProfile - We currently support Main. Default is Auto.

const (
	// H265VideoProfileAuto - Tells the encoder to automatically determine the appropriate H.265 profile.
	H265VideoProfileAuto H265VideoProfile = "Auto"
	// H265VideoProfileMain - Main profile (https://x265.readthedocs.io/en/default/cli.html?highlight=profile#profile-level-tier)
	H265VideoProfileMain H265VideoProfile = "Main"
	// H265VideoProfileMain10 - Main 10 profile (https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#Main_10)
	H265VideoProfileMain10 H265VideoProfile = "Main10"
)

func PossibleH265VideoProfileValues

func PossibleH265VideoProfileValues() []H265VideoProfile

PossibleH265VideoProfileValues returns the possible values for the H265VideoProfile const type.

type Hls

type Hls struct {
	// The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not
	// affect the packing ratio for HLS CMAF output.
	FragmentsPerTsSegment *int32 `json:"fragmentsPerTsSegment,omitempty"`
}

Hls - HTTP Live Streaming (HLS) packing setting for the live output.

type HlsSettings added in v0.4.0

type HlsSettings struct {
	// The characteristics for the HLS setting.
	Characteristics *string `json:"characteristics,omitempty"`

	// The default for the HLS setting.
	Default *bool `json:"default,omitempty"`

	// The forced for the HLS setting.
	Forced *bool `json:"forced,omitempty"`
}

HlsSettings - The HLS setting for a text track.

type IPAccessControl

type IPAccessControl struct {
	// The IP allow list.
	Allow []*IPRange `json:"allow,omitempty"`
}

IPAccessControl - The IP access control.

func (IPAccessControl) MarshalJSON

func (i IPAccessControl) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IPAccessControl.

type IPRange

type IPRange struct {
	// The IP address.
	Address *string `json:"address,omitempty"`

	// The friendly name for the IP address range.
	Name *string `json:"name,omitempty"`

	// The subnet mask prefix length (see CIDR notation).
	SubnetPrefixLength *int32 `json:"subnetPrefixLength,omitempty"`
}

IPRange - The IP address range in the CIDR scheme.

type Image

type Image struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// REQUIRED; The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format
	// (For example, PT05S to start at 5 seconds), or a frame count (For example, 10 to start at
	// the 10th frame), or a relative value to stream duration (For example, 10% to start at 10% of stream duration). Also supports
	// a macro {Best}, which tells the encoder to select the best thumbnail from
	// the first few seconds of the video and will only produce one thumbnail, no matter what other settings are for Step and
	// Range. The default value is macro {Best}.
	Start *string `json:"start,omitempty"`

	// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601
	// format. The default is 2 seconds(PT2S). Note that this setting is ignored if
	// VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.
	KeyFrameInterval *string `json:"keyFrameInterval,omitempty"`

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string `json:"label,omitempty"`

	// The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value
	// can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30
	// seconds from start time), or a frame count (For example, 300 to stop at the 300th frame from the frame at start time. If
	// this value is 1, it means only producing one thumbnail at start time), or a
	// relative value to the stream duration (For example, 50% to stop at half of stream duration from start time). The default
	// value is 100%, which means to stop at the end of the stream.
	Range *string `json:"range,omitempty"`

	// The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, PT05S for one image
	// every 5 seconds), or a frame count (For example, 30 for one image every 30
	// frames), or a relative value to stream duration (For example, 10% for one image every 10% of stream duration). Note: Step
	// value will affect the first generated thumbnail, which may not be exactly the
	// one specified at transform preset start time. This is due to the encoder, which tries to select the best thumbnail between
	// start time and Step position from start time as the first output. As the
	// default value is 10%, it means if stream has long duration, the first generated thumbnail might be far away from the one
	// specified at start time. Try to select reasonable value for Step if the first
	// thumbnail is expected close to start time, or set Range value at 1 if only one thumbnail is needed at start time.
	Step *string `json:"step,omitempty"`

	// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize
	StretchMode *StretchMode `json:"stretchMode,omitempty"`

	// The Video Sync Mode
	SyncMode *VideoSyncMode `json:"syncMode,omitempty"`
}

Image - Describes the basic properties for generating thumbnails from the input video

func (*Image) GetCodec added in v0.3.0

func (i *Image) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type Image.

func (*Image) GetImage

func (i *Image) GetImage() *Image

GetImage implements the ImageClassification interface for type Image.

func (*Image) GetVideo added in v0.3.0

func (i *Image) GetVideo() *Video

GetVideo implements the VideoClassification interface for type Image.

func (Image) MarshalJSON

func (i Image) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Image.

func (*Image) UnmarshalJSON

func (i *Image) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Image.

type ImageClassification

type ImageClassification interface {
	VideoClassification
	// GetImage returns the Image content of the underlying type.
	GetImage() *Image
}

ImageClassification provides polymorphic access to related types. Call the interface's GetImage() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *Image, *JpgImage, *PNGImage

type ImageFormat

type ImageFormat struct {
	// REQUIRED; The pattern of the file names for the generated output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec.
	// {Resolution} - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename.
	FilenamePattern *string `json:"filenamePattern,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

ImageFormat - Describes the properties for an output image file.

func (*ImageFormat) GetFormat added in v0.3.0

func (i *ImageFormat) GetFormat() *Format

GetFormat implements the FormatClassification interface for type ImageFormat.

func (*ImageFormat) GetImageFormat

func (i *ImageFormat) GetImageFormat() *ImageFormat

GetImageFormat implements the ImageFormatClassification interface for type ImageFormat.

func (ImageFormat) MarshalJSON

func (i ImageFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ImageFormat.

func (*ImageFormat) UnmarshalJSON added in v0.3.0

func (i *ImageFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImageFormat.

type ImageFormatClassification

type ImageFormatClassification interface {
	FormatClassification
	// GetImageFormat returns the ImageFormat content of the underlying type.
	GetImageFormat() *ImageFormat
}

ImageFormatClassification provides polymorphic access to related types. Call the interface's GetImageFormat() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ImageFormat, *JpgFormat, *PNGFormat

type InputDefinition

type InputDefinition struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The list of TrackDescriptors which define the metadata and selection of tracks in the input.
	IncludedTracks []TrackDescriptorClassification `json:"includedTracks,omitempty"`
}

InputDefinition - Base class for defining an input. Use sub classes of this class to specify tracks selections and related metadata.

func (*InputDefinition) GetInputDefinition

func (i *InputDefinition) GetInputDefinition() *InputDefinition

GetInputDefinition implements the InputDefinitionClassification interface for type InputDefinition.

func (InputDefinition) MarshalJSON added in v0.3.0

func (i InputDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InputDefinition.

func (*InputDefinition) UnmarshalJSON

func (i *InputDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InputDefinition.

type InputDefinitionClassification

type InputDefinitionClassification interface {
	// GetInputDefinition returns the InputDefinition content of the underlying type.
	GetInputDefinition() *InputDefinition
}

InputDefinitionClassification provides polymorphic access to related types. Call the interface's GetInputDefinition() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *FromAllInputFile, *FromEachInputFile, *InputDefinition, *InputFile

type InputFile

type InputFile struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// Name of the file that this input definition applies to.
	Filename *string `json:"filename,omitempty"`

	// The list of TrackDescriptors which define the metadata and selection of tracks in the input.
	IncludedTracks []TrackDescriptorClassification `json:"includedTracks,omitempty"`
}

InputFile - An InputDefinition for a single file. TrackSelections are scoped to the file specified.

func (*InputFile) GetInputDefinition added in v0.3.0

func (i *InputFile) GetInputDefinition() *InputDefinition

GetInputDefinition implements the InputDefinitionClassification interface for type InputFile.

func (InputFile) MarshalJSON

func (i InputFile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InputFile.

func (*InputFile) UnmarshalJSON

func (i *InputFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InputFile.

type InsightsType

type InsightsType string

InsightsType - Defines the type of insights that you want the service to generate. The allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly', and 'AllInsights'. The default is AllInsights. If you set this to AllInsights and the input is audio only, then only audio insights are generated. Similarly if the input is video only, then only video insights are generated. It is recommended that you not use AudioInsightsOnly if you expect some of your inputs to be video only; or use VideoInsightsOnly if you expect some of your inputs to be audio only. Your Jobs in such conditions would error out.

const (
	// InsightsTypeAllInsights - Generate both audio and video insights. Fails if either audio or video Insights fail.
	InsightsTypeAllInsights InsightsType = "AllInsights"
	// InsightsTypeAudioInsightsOnly - Generate audio only insights. Ignore video even if present. Fails if no audio is present.
	InsightsTypeAudioInsightsOnly InsightsType = "AudioInsightsOnly"
	// InsightsTypeVideoInsightsOnly - Generate video only insights. Ignore audio if present. Fails if no video is present.
	InsightsTypeVideoInsightsOnly InsightsType = "VideoInsightsOnly"
)

func PossibleInsightsTypeValues

func PossibleInsightsTypeValues() []InsightsType

PossibleInsightsTypeValues returns the possible values for the InsightsType const type.

type InterleaveOutput

type InterleaveOutput string

InterleaveOutput - Sets the interleave mode of the output to control how audio and video are stored in the container format. Example: set InterleavedOutput as NonInterleavedOutput to produce audio-only and video-only outputs in separate MP4 files.

const (
	// InterleaveOutputInterleavedOutput - The output includes both audio and video.
	InterleaveOutputInterleavedOutput InterleaveOutput = "InterleavedOutput"
	// InterleaveOutputNonInterleavedOutput - The output is video-only or audio-only.
	InterleaveOutputNonInterleavedOutput InterleaveOutput = "NonInterleavedOutput"
)

func PossibleInterleaveOutputValues

func PossibleInterleaveOutputValues() []InterleaveOutput

PossibleInterleaveOutputValues returns the possible values for the InterleaveOutput const type.

type Job

type Job struct {
	// The resource properties.
	Properties *JobProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Job - A Job resource type. The progress and state can be obtained by polling a Job or subscribing to events using EventGrid.

func (Job) MarshalJSON

func (j Job) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Job.

type JobCollection

type JobCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string `json:"@odata.nextLink,omitempty"`

	// A collection of Job items.
	Value []*Job `json:"value,omitempty"`
}

JobCollection - A collection of Job items.

type JobError

type JobError struct {
	// READ-ONLY; Helps with categorization of errors.
	Category *JobErrorCategory `json:"category,omitempty" azure:"ro"`

	// READ-ONLY; Error code describing the error.
	Code *JobErrorCode `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; An array of details about specific errors that led to this reported error.
	Details []*JobErrorDetail `json:"details,omitempty" azure:"ro"`

	// READ-ONLY; A human-readable language-dependent representation of the error.
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via
	// Azure Portal.
	Retry *JobRetry `json:"retry,omitempty" azure:"ro"`
}

JobError - Details of JobOutput errors.

func (JobError) MarshalJSON

func (j JobError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobError.

type JobErrorCategory

type JobErrorCategory string

JobErrorCategory - Helps with categorization of errors.

const (
	// JobErrorCategoryConfiguration - The error is configuration related.
	JobErrorCategoryConfiguration JobErrorCategory = "Configuration"
	// JobErrorCategoryContent - The error is related to data in the input files.
	JobErrorCategoryContent JobErrorCategory = "Content"
	// JobErrorCategoryDownload - The error is download related.
	JobErrorCategoryDownload JobErrorCategory = "Download"
	// JobErrorCategoryService - The error is service related.
	JobErrorCategoryService JobErrorCategory = "Service"
	// JobErrorCategoryUpload - The error is upload related.
	JobErrorCategoryUpload JobErrorCategory = "Upload"
)

func PossibleJobErrorCategoryValues

func PossibleJobErrorCategoryValues() []JobErrorCategory

PossibleJobErrorCategoryValues returns the possible values for the JobErrorCategory const type.

type JobErrorCode

type JobErrorCode string

JobErrorCode - Error code describing the error.

const (
	// JobErrorCodeConfigurationUnsupported - There was a problem with the combination of input files and the configuration settings
	// applied, fix the configuration settings and retry with the same input, or change input to match the configuration.
	JobErrorCodeConfigurationUnsupported JobErrorCode = "ConfigurationUnsupported"
	// JobErrorCodeContentMalformed - There was a problem with the input content (for example: zero byte files, or corrupt/non-decodable
	// files), check the input files.
	JobErrorCodeContentMalformed JobErrorCode = "ContentMalformed"
	// JobErrorCodeContentUnsupported - There was a problem with the format of the input (not valid media file, or an unsupported
	// file/codec), check the validity of the input files.
	JobErrorCodeContentUnsupported JobErrorCode = "ContentUnsupported"
	// JobErrorCodeDownloadNotAccessible - While trying to download the input files, the files were not accessible, please check
	// the availability of the source.
	JobErrorCodeDownloadNotAccessible JobErrorCode = "DownloadNotAccessible"
	// JobErrorCodeDownloadTransientError - While trying to download the input files, there was an issue during transfer (storage
	// service, network errors), see details and check your source.
	JobErrorCodeDownloadTransientError JobErrorCode = "DownloadTransientError"
	// JobErrorCodeServiceError - Fatal service error, please contact support.
	JobErrorCodeServiceError JobErrorCode = "ServiceError"
	// JobErrorCodeServiceTransientError - Transient error, please retry, if retry is unsuccessful, please contact support.
	JobErrorCodeServiceTransientError JobErrorCode = "ServiceTransientError"
	// JobErrorCodeUploadNotAccessible - While trying to upload the output files, the destination was not reachable, please check
	// the availability of the destination.
	JobErrorCodeUploadNotAccessible JobErrorCode = "UploadNotAccessible"
	// JobErrorCodeUploadTransientError - While trying to upload the output files, there was an issue during transfer (storage
	// service, network errors), see details and check your destination.
	JobErrorCodeUploadTransientError JobErrorCode = "UploadTransientError"
)

func PossibleJobErrorCodeValues

func PossibleJobErrorCodeValues() []JobErrorCode

PossibleJobErrorCodeValues returns the possible values for the JobErrorCode const type.

type JobErrorDetail

type JobErrorDetail struct {
	// READ-ONLY; Code describing the error detail.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; A human-readable representation of the error.
	Message *string `json:"message,omitempty" azure:"ro"`
}

JobErrorDetail - Details of JobOutput errors.

type JobInput

type JobInput struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

JobInput - Base class for inputs to a Job.

func (*JobInput) GetJobInput

func (j *JobInput) GetJobInput() *JobInput

GetJobInput implements the JobInputClassification interface for type JobInput.

type JobInputAsset

type JobInputAsset struct {
	// REQUIRED; The name of the input Asset.
	AssetName *string `json:"assetName,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media.
	End ClipTimeClassification `json:"end,omitempty"`

	// List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service
	// responses to prevent sensitive data exposure.
	Files []*string `json:"files,omitempty"`

	// Defines a list of InputDefinitions. For each InputDefinition, it defines a list of track selections and related metadata.
	InputDefinitions []InputDefinitionClassification `json:"inputDefinitions,omitempty"`

	// A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform
	// can be authored so as to take an image file with the label 'xyz' and
	// apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should
	// be the image file, and it should have the label 'xyz'.
	Label *string `json:"label,omitempty"`

	// Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input
	// media.
	Start ClipTimeClassification `json:"start,omitempty"`
}

JobInputAsset - Represents an Asset for input into a Job.

func (*JobInputAsset) GetJobInput added in v0.3.0

func (j *JobInputAsset) GetJobInput() *JobInput

GetJobInput implements the JobInputClassification interface for type JobInputAsset.

func (*JobInputAsset) GetJobInputClip added in v0.3.0

func (j *JobInputAsset) GetJobInputClip() *JobInputClip

GetJobInputClip implements the JobInputClipClassification interface for type JobInputAsset.

func (JobInputAsset) MarshalJSON

func (j JobInputAsset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobInputAsset.

func (*JobInputAsset) UnmarshalJSON

func (j *JobInputAsset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobInputAsset.

type JobInputClassification

type JobInputClassification interface {
	// GetJobInput returns the JobInput content of the underlying type.
	GetJobInput() *JobInput
}

JobInputClassification provides polymorphic access to related types. Call the interface's GetJobInput() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *JobInput, *JobInputAsset, *JobInputClip, *JobInputHTTP, *JobInputSequence, *JobInputs

type JobInputClip

type JobInputClip struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media.
	End ClipTimeClassification `json:"end,omitempty"`

	// List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service
	// responses to prevent sensitive data exposure.
	Files []*string `json:"files,omitempty"`

	// Defines a list of InputDefinitions. For each InputDefinition, it defines a list of track selections and related metadata.
	InputDefinitions []InputDefinitionClassification `json:"inputDefinitions,omitempty"`

	// A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform
	// can be authored so as to take an image file with the label 'xyz' and
	// apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should
	// be the image file, and it should have the label 'xyz'.
	Label *string `json:"label,omitempty"`

	// Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input
	// media.
	Start ClipTimeClassification `json:"start,omitempty"`
}

JobInputClip - Represents input files for a Job.

func (*JobInputClip) GetJobInput added in v0.3.0

func (j *JobInputClip) GetJobInput() *JobInput

GetJobInput implements the JobInputClassification interface for type JobInputClip.

func (*JobInputClip) GetJobInputClip

func (j *JobInputClip) GetJobInputClip() *JobInputClip

GetJobInputClip implements the JobInputClipClassification interface for type JobInputClip.

func (JobInputClip) MarshalJSON

func (j JobInputClip) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobInputClip.

func (*JobInputClip) UnmarshalJSON

func (j *JobInputClip) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobInputClip.

type JobInputClipClassification

type JobInputClipClassification interface {
	JobInputClassification
	// GetJobInputClip returns the JobInputClip content of the underlying type.
	GetJobInputClip() *JobInputClip
}

JobInputClipClassification provides polymorphic access to related types. Call the interface's GetJobInputClip() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *JobInputAsset, *JobInputClip, *JobInputHTTP

type JobInputHTTP

type JobInputHTTP struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// Base URI for HTTPS job input. It will be concatenated with provided file names. If no base uri is given, then the provided
	// file list is assumed to be fully qualified uris. Maximum length of 4000
	// characters. The query strings will not be returned in service responses to prevent sensitive data exposure.
	BaseURI *string `json:"baseUri,omitempty"`

	// Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media.
	End ClipTimeClassification `json:"end,omitempty"`

	// List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service
	// responses to prevent sensitive data exposure.
	Files []*string `json:"files,omitempty"`

	// Defines a list of InputDefinitions. For each InputDefinition, it defines a list of track selections and related metadata.
	InputDefinitions []InputDefinitionClassification `json:"inputDefinitions,omitempty"`

	// A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform
	// can be authored so as to take an image file with the label 'xyz' and
	// apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should
	// be the image file, and it should have the label 'xyz'.
	Label *string `json:"label,omitempty"`

	// Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input
	// media.
	Start ClipTimeClassification `json:"start,omitempty"`
}

JobInputHTTP - Represents HTTPS job input.

func (*JobInputHTTP) GetJobInput added in v0.3.0

func (j *JobInputHTTP) GetJobInput() *JobInput

GetJobInput implements the JobInputClassification interface for type JobInputHTTP.

func (*JobInputHTTP) GetJobInputClip added in v0.3.0

func (j *JobInputHTTP) GetJobInputClip() *JobInputClip

GetJobInputClip implements the JobInputClipClassification interface for type JobInputHTTP.

func (JobInputHTTP) MarshalJSON

func (j JobInputHTTP) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobInputHTTP.

func (*JobInputHTTP) UnmarshalJSON

func (j *JobInputHTTP) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobInputHTTP.

type JobInputSequence

type JobInputSequence struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// JobInputs that make up the timeline.
	Inputs []JobInputClipClassification `json:"inputs,omitempty"`
}

JobInputSequence - A Sequence contains an ordered list of Clips where each clip is a JobInput. The Sequence will be treated as a single input.

func (*JobInputSequence) GetJobInput added in v0.3.0

func (j *JobInputSequence) GetJobInput() *JobInput

GetJobInput implements the JobInputClassification interface for type JobInputSequence.

func (JobInputSequence) MarshalJSON

func (j JobInputSequence) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobInputSequence.

func (*JobInputSequence) UnmarshalJSON

func (j *JobInputSequence) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobInputSequence.

type JobInputs

type JobInputs struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// List of inputs to a Job.
	Inputs []JobInputClassification `json:"inputs,omitempty"`
}

JobInputs - Describes a list of inputs to a Job.

func (*JobInputs) GetJobInput added in v0.3.0

func (j *JobInputs) GetJobInput() *JobInput

GetJobInput implements the JobInputClassification interface for type JobInputs.

func (JobInputs) MarshalJSON

func (j JobInputs) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobInputs.

func (*JobInputs) UnmarshalJSON

func (j *JobInputs) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobInputs.

type JobOutput

type JobOutput struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// A label that is assigned to a JobOutput in order to help uniquely identify it. This is useful when your Transform has more
	// than one TransformOutput, whereby your Job has more than one JobOutput. In
	// such cases, when you submit the Job, you will add two or more JobOutputs, in the same order as TransformOutputs in the
	// Transform. Subsequently, when you retrieve the Job, either through events or on a
	// GET request, you can use the label to easily identify the JobOutput. If a label is not provided, a default value of '{presetName}_{outputIndex}'
	// will be used, where the preset name is the name of the
	// preset in the corresponding TransformOutput and the output index is the relative index of the this JobOutput within the
	// Job. Note that this index is the same as the relative index of the corresponding
	// TransformOutput within its Transform.
	Label *string `json:"label,omitempty"`

	// A preset used to override the preset in the corresponding transform output.
	PresetOverride PresetClassification `json:"presetOverride,omitempty"`

	// READ-ONLY; The UTC date and time at which this Job Output finished processing.
	EndTime *time.Time `json:"endTime,omitempty" azure:"ro"`

	// READ-ONLY; If the JobOutput is in the Error state, it contains the details of the error.
	Error *JobError `json:"error,omitempty" azure:"ro"`

	// READ-ONLY; If the JobOutput is in a Processing state, this contains the Job completion percentage. The value is an estimate
	// and not intended to be used to predict Job completion times. To determine if the
	// JobOutput is complete, use the State property.
	Progress *int32 `json:"progress,omitempty" azure:"ro"`

	// READ-ONLY; The UTC date and time at which this Job Output began processing.
	StartTime *time.Time `json:"startTime,omitempty" azure:"ro"`

	// READ-ONLY; Describes the state of the JobOutput.
	State *JobState `json:"state,omitempty" azure:"ro"`
}

JobOutput - Describes all the properties of a JobOutput.

func (*JobOutput) GetJobOutput

func (j *JobOutput) GetJobOutput() *JobOutput

GetJobOutput implements the JobOutputClassification interface for type JobOutput.

func (JobOutput) MarshalJSON added in v0.3.0

func (j JobOutput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobOutput.

func (*JobOutput) UnmarshalJSON

func (j *JobOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobOutput.

type JobOutputAsset

type JobOutputAsset struct {
	// REQUIRED; The name of the output Asset.
	AssetName *string `json:"assetName,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// A label that is assigned to a JobOutput in order to help uniquely identify it. This is useful when your Transform has more
	// than one TransformOutput, whereby your Job has more than one JobOutput. In
	// such cases, when you submit the Job, you will add two or more JobOutputs, in the same order as TransformOutputs in the
	// Transform. Subsequently, when you retrieve the Job, either through events or on a
	// GET request, you can use the label to easily identify the JobOutput. If a label is not provided, a default value of '{presetName}_{outputIndex}'
	// will be used, where the preset name is the name of the
	// preset in the corresponding TransformOutput and the output index is the relative index of the this JobOutput within the
	// Job. Note that this index is the same as the relative index of the corresponding
	// TransformOutput within its Transform.
	Label *string `json:"label,omitempty"`

	// A preset used to override the preset in the corresponding transform output.
	PresetOverride PresetClassification `json:"presetOverride,omitempty"`

	// READ-ONLY; The UTC date and time at which this Job Output finished processing.
	EndTime *time.Time `json:"endTime,omitempty" azure:"ro"`

	// READ-ONLY; If the JobOutput is in the Error state, it contains the details of the error.
	Error *JobError `json:"error,omitempty" azure:"ro"`

	// READ-ONLY; If the JobOutput is in a Processing state, this contains the Job completion percentage. The value is an estimate
	// and not intended to be used to predict Job completion times. To determine if the
	// JobOutput is complete, use the State property.
	Progress *int32 `json:"progress,omitempty" azure:"ro"`

	// READ-ONLY; The UTC date and time at which this Job Output began processing.
	StartTime *time.Time `json:"startTime,omitempty" azure:"ro"`

	// READ-ONLY; Describes the state of the JobOutput.
	State *JobState `json:"state,omitempty" azure:"ro"`
}

JobOutputAsset - Represents an Asset used as a JobOutput.

func (*JobOutputAsset) GetJobOutput added in v0.3.0

func (j *JobOutputAsset) GetJobOutput() *JobOutput

GetJobOutput implements the JobOutputClassification interface for type JobOutputAsset.

func (JobOutputAsset) MarshalJSON

func (j JobOutputAsset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobOutputAsset.

func (*JobOutputAsset) UnmarshalJSON

func (j *JobOutputAsset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobOutputAsset.

type JobOutputClassification

type JobOutputClassification interface {
	// GetJobOutput returns the JobOutput content of the underlying type.
	GetJobOutput() *JobOutput
}

JobOutputClassification provides polymorphic access to related types. Call the interface's GetJobOutput() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *JobOutput, *JobOutputAsset

type JobProperties

type JobProperties struct {
	// REQUIRED; The inputs for the Job.
	Input JobInputClassification `json:"input,omitempty"`

	// REQUIRED; The outputs for the Job.
	Outputs []JobOutputClassification `json:"outputs,omitempty"`

	// Customer provided key, value pairs that will be returned in Job and JobOutput state events.
	CorrelationData map[string]*string `json:"correlationData,omitempty"`

	// Optional customer supplied description of the Job.
	Description *string `json:"description,omitempty"`

	// Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not
	// set, the default is normal.
	Priority *Priority `json:"priority,omitempty"`

	// READ-ONLY; The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format.
	Created *time.Time `json:"created,omitempty" azure:"ro"`

	// READ-ONLY; The UTC date and time at which this Job finished processing.
	EndTime *time.Time `json:"endTime,omitempty" azure:"ro"`

	// READ-ONLY; The UTC date and time when the customer has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format.
	LastModified *time.Time `json:"lastModified,omitempty" azure:"ro"`

	// READ-ONLY; The UTC date and time at which this Job began processing.
	StartTime *time.Time `json:"startTime,omitempty" azure:"ro"`

	// READ-ONLY; The current state of the job.
	State *JobState `json:"state,omitempty" azure:"ro"`
}

JobProperties - Properties of the Job.

func (JobProperties) MarshalJSON

func (j JobProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobProperties.

func (*JobProperties) UnmarshalJSON

func (j *JobProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobProperties.

type JobRetry

type JobRetry string

JobRetry - Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal.

const (
	// JobRetryDoNotRetry - Issue needs to be investigated and then the job resubmitted with corrections or retried once the underlying
	// issue has been corrected.
	JobRetryDoNotRetry JobRetry = "DoNotRetry"
	// JobRetryMayRetry - Issue may be resolved after waiting for a period of time and resubmitting the same Job.
	JobRetryMayRetry JobRetry = "MayRetry"
)

func PossibleJobRetryValues

func PossibleJobRetryValues() []JobRetry

PossibleJobRetryValues returns the possible values for the JobRetry const type.

type JobState

type JobState string

JobState - Describes the state of the JobOutput.

const (
	// JobStateCanceled - The job was canceled. This is a final state for the job.
	JobStateCanceled JobState = "Canceled"
	// JobStateCanceling - The job is in the process of being canceled. This is a transient state for the job.
	JobStateCanceling JobState = "Canceling"
	// JobStateError - The job has encountered an error. This is a final state for the job.
	JobStateError JobState = "Error"
	// JobStateFinished - The job is finished. This is a final state for the job.
	JobStateFinished JobState = "Finished"
	// JobStateProcessing - The job is processing. This is a transient state for the job.
	JobStateProcessing JobState = "Processing"
	// JobStateQueued - The job is in a queued state, waiting for resources to become available. This is a transient state.
	JobStateQueued JobState = "Queued"
	// JobStateScheduled - The job is being scheduled to run on an available resource. This is a transient state, between queued
	// and processing states.
	JobStateScheduled JobState = "Scheduled"
)

func PossibleJobStateValues

func PossibleJobStateValues() []JobState

PossibleJobStateValues returns the possible values for the JobState const type.

type JobsClient

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

JobsClient contains the methods for the Jobs group. Don't use this type directly, use NewJobsClient() instead.

func NewJobsClient

func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobsClient, error)

NewJobsClient creates a new instance of JobsClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*JobsClient) CancelJob

func (client *JobsClient) CancelJob(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string, options *JobsClientCancelJobOptions) (JobsClientCancelJobResponse, error)

CancelJob - Cancel a Job. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. transformName - The Transform name. jobName - The Job name. options - JobsClientCancelJobOptions contains the optional parameters for the JobsClient.CancelJob method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/jobs-cancel.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewJobsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.CancelJob(ctx,
		"contosoresources",
		"contosomedia",
		"exampleTransform",
		"job1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*JobsClient) Create

func (client *JobsClient) Create(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string, parameters Job, options *JobsClientCreateOptions) (JobsClientCreateResponse, error)

Create - Creates a Job. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. transformName - The Transform name. jobName - The Job name. parameters - The request parameters options - JobsClientCreateOptions contains the optional parameters for the JobsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/jobs-create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewJobsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Create(ctx,
		"contosoresources",
		"contosomedia",
		"exampleTransform",
		"job1",
		armmediaservices.Job{
			Properties: &armmediaservices.JobProperties{
				CorrelationData: map[string]*string{
					"Key 2": to.Ptr("Value 2"),
					"key1":  to.Ptr("value1"),
				},
				Input: &armmediaservices.JobInputAsset{
					ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
					AssetName: to.Ptr("job1-InputAsset"),
				},
				Outputs: []armmediaservices.JobOutputClassification{
					&armmediaservices.JobOutputAsset{
						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
						AssetName: to.Ptr("job1-OutputAsset"),
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*JobsClient) Delete

func (client *JobsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string, options *JobsClientDeleteOptions) (JobsClientDeleteResponse, error)

Delete - Deletes a Job. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. transformName - The Transform name. jobName - The Job name. options - JobsClientDeleteOptions contains the optional parameters for the JobsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/jobs-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewJobsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"contosoresources",
		"contosomedia",
		"exampleTransform",
		"jobToDelete",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*JobsClient) Get

func (client *JobsClient) Get(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string, options *JobsClientGetOptions) (JobsClientGetResponse, error)

Get - Gets a Job. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. transformName - The Transform name. jobName - The Job name. options - JobsClientGetOptions contains the optional parameters for the JobsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/jobs-get-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewJobsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contosoresources",
		"contosomedia",
		"exampleTransform",
		"job1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*JobsClient) NewListPager added in v0.6.0

func (client *JobsClient) NewListPager(resourceGroupName string, accountName string, transformName string, options *JobsClientListOptions) *runtime.Pager[JobsClientListResponse]

NewListPager - Lists all of the Jobs for the Transform. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. transformName - The Transform name. options - JobsClientListOptions contains the optional parameters for the JobsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/jobs-list-all-filter-by-created.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewJobsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("contosoresources",
		"contosomedia",
		"exampleTransform",
		&armmediaservices.JobsClientListOptions{Filter: to.Ptr("properties/created ge 2021-11-01T00:00:10.0000000Z and properties/created le 2021-11-01T00:00:20.0000000Z"),
			Orderby: to.Ptr("properties/created"),
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*JobsClient) Update

func (client *JobsClient) Update(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string, parameters Job, options *JobsClientUpdateOptions) (JobsClientUpdateResponse, error)

Update - Update is only supported for description and priority. Updating Priority will take effect when the Job state is Queued or Scheduled and depending on the timing the priority update may be ignored. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. transformName - The Transform name. jobName - The Job name. parameters - The request parameters options - JobsClientUpdateOptions contains the optional parameters for the JobsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/jobs-update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewJobsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"contosoresources",
		"contosomedia",
		"exampleTransform",
		"job1",
		armmediaservices.Job{
			Properties: &armmediaservices.JobProperties{
				Description: to.Ptr("Example job to illustrate update."),
				Input: &armmediaservices.JobInputAsset{
					ODataType: to.Ptr("#Microsoft.Media.JobInputAsset"),
					AssetName: to.Ptr("job1-InputAsset"),
				},
				Outputs: []armmediaservices.JobOutputClassification{
					&armmediaservices.JobOutputAsset{
						ODataType: to.Ptr("#Microsoft.Media.JobOutputAsset"),
						AssetName: to.Ptr("job1-OutputAsset"),
					}},
				Priority: to.Ptr(armmediaservices.PriorityHigh),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type JobsClientCancelJobOptions added in v0.3.0

type JobsClientCancelJobOptions struct {
}

JobsClientCancelJobOptions contains the optional parameters for the JobsClient.CancelJob method.

type JobsClientCancelJobResponse added in v0.3.0

type JobsClientCancelJobResponse struct {
}

JobsClientCancelJobResponse contains the response from method JobsClient.CancelJob.

type JobsClientCreateOptions added in v0.3.0

type JobsClientCreateOptions struct {
}

JobsClientCreateOptions contains the optional parameters for the JobsClient.Create method.

type JobsClientCreateResponse added in v0.3.0

type JobsClientCreateResponse struct {
	Job
}

JobsClientCreateResponse contains the response from method JobsClient.Create.

type JobsClientDeleteOptions added in v0.3.0

type JobsClientDeleteOptions struct {
}

JobsClientDeleteOptions contains the optional parameters for the JobsClient.Delete method.

type JobsClientDeleteResponse added in v0.3.0

type JobsClientDeleteResponse struct {
}

JobsClientDeleteResponse contains the response from method JobsClient.Delete.

type JobsClientGetOptions added in v0.3.0

type JobsClientGetOptions struct {
}

JobsClientGetOptions contains the optional parameters for the JobsClient.Get method.

type JobsClientGetResponse added in v0.3.0

type JobsClientGetResponse struct {
	Job
}

JobsClientGetResponse contains the response from method JobsClient.Get.

type JobsClientListOptions added in v0.3.0

type JobsClientListOptions struct {
	// Restricts the set of items returned.
	Filter *string
	// Specifies the key by which the result collection should be ordered.
	Orderby *string
}

JobsClientListOptions contains the optional parameters for the JobsClient.List method.

type JobsClientListResponse added in v0.3.0

type JobsClientListResponse struct {
	JobCollection
}

JobsClientListResponse contains the response from method JobsClient.List.

type JobsClientUpdateOptions added in v0.3.0

type JobsClientUpdateOptions struct {
}

JobsClientUpdateOptions contains the optional parameters for the JobsClient.Update method.

type JobsClientUpdateResponse added in v0.3.0

type JobsClientUpdateResponse struct {
	Job
}

JobsClientUpdateResponse contains the response from method JobsClient.Update.

type JpgFormat

type JpgFormat struct {
	// REQUIRED; The pattern of the file names for the generated output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec.
	// {Resolution} - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename.
	FilenamePattern *string `json:"filenamePattern,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

JpgFormat - Describes the settings for producing JPEG thumbnails.

func (*JpgFormat) GetFormat added in v0.3.0

func (j *JpgFormat) GetFormat() *Format

GetFormat implements the FormatClassification interface for type JpgFormat.

func (*JpgFormat) GetImageFormat added in v0.3.0

func (j *JpgFormat) GetImageFormat() *ImageFormat

GetImageFormat implements the ImageFormatClassification interface for type JpgFormat.

func (JpgFormat) MarshalJSON

func (j JpgFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JpgFormat.

func (*JpgFormat) UnmarshalJSON added in v0.3.0

func (j *JpgFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JpgFormat.

type JpgImage

type JpgImage struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// REQUIRED; The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format
	// (For example, PT05S to start at 5 seconds), or a frame count (For example, 10 to start at
	// the 10th frame), or a relative value to stream duration (For example, 10% to start at 10% of stream duration). Also supports
	// a macro {Best}, which tells the encoder to select the best thumbnail from
	// the first few seconds of the video and will only produce one thumbnail, no matter what other settings are for Step and
	// Range. The default value is macro {Best}.
	Start *string `json:"start,omitempty"`

	// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601
	// format. The default is 2 seconds(PT2S). Note that this setting is ignored if
	// VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.
	KeyFrameInterval *string `json:"keyFrameInterval,omitempty"`

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string `json:"label,omitempty"`

	// A collection of output JPEG image layers to be produced by the encoder.
	Layers []*JpgLayer `json:"layers,omitempty"`

	// The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value
	// can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30
	// seconds from start time), or a frame count (For example, 300 to stop at the 300th frame from the frame at start time. If
	// this value is 1, it means only producing one thumbnail at start time), or a
	// relative value to the stream duration (For example, 50% to stop at half of stream duration from start time). The default
	// value is 100%, which means to stop at the end of the stream.
	Range *string `json:"range,omitempty"`

	// Sets the number of columns used in thumbnail sprite image. The number of rows are automatically calculated and a VTT file
	// is generated with the coordinate mappings for each thumbnail in the sprite.
	// Note: this value should be a positive integer and a proper value is recommended so that the output image resolution will
	// not go beyond JPEG maximum pixel resolution limit 65535x65535.
	SpriteColumn *int32 `json:"spriteColumn,omitempty"`

	// The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, PT05S for one image
	// every 5 seconds), or a frame count (For example, 30 for one image every 30
	// frames), or a relative value to stream duration (For example, 10% for one image every 10% of stream duration). Note: Step
	// value will affect the first generated thumbnail, which may not be exactly the
	// one specified at transform preset start time. This is due to the encoder, which tries to select the best thumbnail between
	// start time and Step position from start time as the first output. As the
	// default value is 10%, it means if stream has long duration, the first generated thumbnail might be far away from the one
	// specified at start time. Try to select reasonable value for Step if the first
	// thumbnail is expected close to start time, or set Range value at 1 if only one thumbnail is needed at start time.
	Step *string `json:"step,omitempty"`

	// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize
	StretchMode *StretchMode `json:"stretchMode,omitempty"`

	// The Video Sync Mode
	SyncMode *VideoSyncMode `json:"syncMode,omitempty"`
}

JpgImage - Describes the properties for producing a series of JPEG images from the input video.

func (*JpgImage) GetCodec added in v0.3.0

func (j *JpgImage) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type JpgImage.

func (*JpgImage) GetImage added in v0.3.0

func (j *JpgImage) GetImage() *Image

GetImage implements the ImageClassification interface for type JpgImage.

func (*JpgImage) GetVideo added in v0.3.0

func (j *JpgImage) GetVideo() *Video

GetVideo implements the VideoClassification interface for type JpgImage.

func (JpgImage) MarshalJSON

func (j JpgImage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JpgImage.

func (*JpgImage) UnmarshalJSON

func (j *JpgImage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JpgImage.

type JpgLayer

type JpgLayer struct {
	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string `json:"height,omitempty"`

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string `json:"label,omitempty"`

	// The compression quality of the JPEG output. Range is from 0-100 and the default is 70.
	Quality *int32 `json:"quality,omitempty"`

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string `json:"width,omitempty"`
}

JpgLayer - Describes the settings to produce a JPEG image from the input video.

type KeyDelivery

type KeyDelivery struct {
	// The access control properties for Key Delivery.
	AccessControl *AccessControl `json:"accessControl,omitempty"`
}

type KeyVaultProperties

type KeyVaultProperties struct {
	// The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1)
	// or reference a key without a version (for example
	// https://vault/keys/mykey).
	KeyIdentifier *string `json:"keyIdentifier,omitempty"`

	// READ-ONLY; The current key used to encrypt the Media Services account, including the key version.
	CurrentKeyIdentifier *string `json:"currentKeyIdentifier,omitempty" azure:"ro"`
}

type Layer

type Layer struct {
	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string `json:"height,omitempty"`

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string `json:"label,omitempty"`

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string `json:"width,omitempty"`
}

Layer - The encoder can be configured to produce video and/or images (thumbnails) at different resolutions, by specifying a layer for each desired resolution. A layer represents the properties for the video or image at a resolution.

type ListContainerSasInput

type ListContainerSasInput struct {
	// The SAS URL expiration time. This must be less than 24 hours from the current time.
	ExpiryTime *time.Time `json:"expiryTime,omitempty"`

	// The permissions to set on the SAS URL.
	Permissions *AssetContainerPermission `json:"permissions,omitempty"`
}

ListContainerSasInput - The parameters to the list SAS request.

func (ListContainerSasInput) MarshalJSON

func (l ListContainerSasInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListContainerSasInput.

func (*ListContainerSasInput) UnmarshalJSON

func (l *ListContainerSasInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListContainerSasInput.

type ListContentKeysResponse

type ListContentKeysResponse struct {
	// ContentKeys used by current Streaming Locator
	ContentKeys []*StreamingLocatorContentKey `json:"contentKeys,omitempty"`
}

ListContentKeysResponse - Class of response for listContentKeys action

type ListEdgePoliciesInput

type ListEdgePoliciesInput struct {
	// Unique identifier of the edge device.
	DeviceID *string `json:"deviceId,omitempty"`
}

type ListPathsResponse

type ListPathsResponse struct {
	// Download Paths supported by current Streaming Locator
	DownloadPaths []*string `json:"downloadPaths,omitempty"`

	// Streaming Paths supported by current Streaming Locator
	StreamingPaths []*StreamingPath `json:"streamingPaths,omitempty"`
}

ListPathsResponse - Class of response for listPaths action

type ListStreamingLocatorsResponse

type ListStreamingLocatorsResponse struct {
	// READ-ONLY; The list of Streaming Locators.
	StreamingLocators []*AssetStreamingLocator `json:"streamingLocators,omitempty" azure:"ro"`
}

ListStreamingLocatorsResponse - The Streaming Locators associated with this Asset.

type LiveEvent

type LiveEvent struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// The live event properties.
	Properties *LiveEventProperties `json:"properties,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

LiveEvent - The live event.

func (LiveEvent) MarshalJSON

func (l LiveEvent) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEvent.

type LiveEventActionInput

type LiveEventActionInput struct {
	// The flag indicates whether live outputs are automatically deleted when live event is being stopped. Deleting live outputs
	// do not delete the underlying assets.
	RemoveOutputsOnStop *bool `json:"removeOutputsOnStop,omitempty"`
}

LiveEventActionInput - The LiveEvent action input parameter definition.

type LiveEventEncoding

type LiveEventEncoding struct {
	// Live event type. When encodingType is set to PassthroughBasic or PassthroughStandard, the service simply passes through
	// the incoming video and audio layer(s) to the output. When encodingType is set to
	// Standard or Premium1080p, a live encoder transcodes the incoming stream into multiple bitrates or layers. See https://go.microsoft.com/fwlink/?linkid=2095101
	// for more information. This property cannot
	// be modified after the live event is created.
	EncodingType *LiveEventEncodingType `json:"encodingType,omitempty"`

	// Use an ISO 8601 time value between 0.5 to 20 seconds to specify the output fragment length for the video and audio tracks
	// of an encoding live event. For example, use PT2S to indicate 2 seconds. For
	// the video track it also defines the key frame interval, or the length of a GoP (group of pictures). If this value is not
	// set for an encoding live event, the fragment duration defaults to 2 seconds.
	// The value cannot be set for pass-through live events.
	KeyFrameInterval *string `json:"keyFrameInterval,omitempty"`

	// The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and cannot
	// be updated. If the encodingType is set to Standard, then the default preset
	// name is ‘Default720p’. Else if the encodingType is set to Premium1080p, the default preset is ‘Default1080p’.
	PresetName *string `json:"presetName,omitempty"`

	// Specifies how the input video will be resized to fit the desired output resolution(s). Default is None
	StretchMode *StretchMode `json:"stretchMode,omitempty"`
}

LiveEventEncoding - Specifies the live event type and optional encoding settings for encoding live events.

type LiveEventEncodingType

type LiveEventEncodingType string

LiveEventEncodingType - Live event type. When encodingType is set to PassthroughBasic or PassthroughStandard, the service simply passes through the incoming video and audio layer(s) to the output. When encodingType is set to Standard or Premium1080p, a live encoder transcodes the incoming stream into multiple bitrates or layers. See https://go.microsoft.com/fwlink/?linkid=2095101 for more information. This property cannot be modified after the live event is created.

const (
	// LiveEventEncodingTypeNone - This is the same as PassthroughStandard, please see description below. This enumeration value
	// is being deprecated.
	LiveEventEncodingTypeNone LiveEventEncodingType = "None"
	// LiveEventEncodingTypePassthroughBasic - The ingested stream passes through the live event from the contribution encoder
	// without any further processing. In the PassthroughBasic mode, ingestion is limited to up to 5Mbps and only 1 concurrent
	// live output is allowed. Live transcription is not available.
	LiveEventEncodingTypePassthroughBasic LiveEventEncodingType = "PassthroughBasic"
	// LiveEventEncodingTypePassthroughStandard - The ingested stream passes through the live event from the contribution encoder
	// without any further processing. Live transcription is available. Ingestion bitrate limits are much higher and up to 3 concurrent
	// live outputs are allowed.
	LiveEventEncodingTypePassthroughStandard LiveEventEncodingType = "PassthroughStandard"
	// LiveEventEncodingTypePremium1080P - A contribution live encoder sends a single bitrate stream to the live event and Media
	// Services creates multiple bitrate streams. The output cannot exceed 1080p in resolution.
	LiveEventEncodingTypePremium1080P LiveEventEncodingType = "Premium1080p"
	// LiveEventEncodingTypeStandard - A contribution live encoder sends a single bitrate stream to the live event and Media Services
	// creates multiple bitrate streams. The output cannot exceed 720p in resolution.
	LiveEventEncodingTypeStandard LiveEventEncodingType = "Standard"
)

func PossibleLiveEventEncodingTypeValues

func PossibleLiveEventEncodingTypeValues() []LiveEventEncodingType

PossibleLiveEventEncodingTypeValues returns the possible values for the LiveEventEncodingType const type.

type LiveEventEndpoint

type LiveEventEndpoint struct {
	// The endpoint protocol.
	Protocol *string `json:"protocol,omitempty"`

	// The endpoint URL.
	URL *string `json:"url,omitempty"`
}

LiveEventEndpoint - The live event endpoint.

type LiveEventInput

type LiveEventInput struct {
	// REQUIRED; The input protocol for the live event. This is specified at creation time and cannot be updated.
	StreamingProtocol *LiveEventInputProtocol `json:"streamingProtocol,omitempty"`

	// Access control for live event input.
	AccessControl *LiveEventInputAccessControl `json:"accessControl,omitempty"`

	// A UUID in string form to uniquely identify the stream. This can be specified at creation time but cannot be updated. If
	// omitted, the service will generate a unique value.
	AccessToken *string `json:"accessToken,omitempty"`

	// The input endpoints for the live event.
	Endpoints []*LiveEventEndpoint `json:"endpoints,omitempty"`

	// ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property
	// in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the
	// value empty for encoding live events.
	KeyFrameIntervalDuration *string `json:"keyFrameIntervalDuration,omitempty"`
}

LiveEventInput - The live event input.

func (LiveEventInput) MarshalJSON

func (l LiveEventInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventInput.

type LiveEventInputAccessControl

type LiveEventInputAccessControl struct {
	// The IP access control properties.
	IP *IPAccessControl `json:"ip,omitempty"`
}

LiveEventInputAccessControl - The IP access control for live event input.

type LiveEventInputProtocol

type LiveEventInputProtocol string

LiveEventInputProtocol - The input protocol for the live event. This is specified at creation time and cannot be updated.

const (
	// LiveEventInputProtocolFragmentedMP4 - Smooth Streaming input will be sent by the contribution encoder to the live event.
	LiveEventInputProtocolFragmentedMP4 LiveEventInputProtocol = "FragmentedMP4"
	// LiveEventInputProtocolRTMP - RTMP input will be sent by the contribution encoder to the live event.
	LiveEventInputProtocolRTMP LiveEventInputProtocol = "RTMP"
)

func PossibleLiveEventInputProtocolValues

func PossibleLiveEventInputProtocolValues() []LiveEventInputProtocol

PossibleLiveEventInputProtocolValues returns the possible values for the LiveEventInputProtocol const type.

type LiveEventInputTrackSelection

type LiveEventInputTrackSelection struct {
	// Comparing operation. This property is reserved for future use, any value set on this property will be ignored.
	Operation *string `json:"operation,omitempty"`

	// Property name to select. This property is reserved for future use, any value set on this property will be ignored.
	Property *string `json:"property,omitempty"`

	// Property value to select. This property is reserved for future use, any value set on this property will be ignored.
	Value *string `json:"value,omitempty"`
}

LiveEventInputTrackSelection - A track selection condition. This property is reserved for future use, any value set on this property will be ignored.

type LiveEventListResult

type LiveEventListResult struct {
	// The number of result.
	ODataCount *int32 `json:"@odata.count,omitempty"`

	// The link to the next set of results. Not empty if value contains incomplete list of live outputs.
	ODataNextLink *string `json:"@odata.nextLink,omitempty"`

	// The result of the List Live Event operation.
	Value []*LiveEvent `json:"value,omitempty"`
}

LiveEventListResult - The LiveEvent list result.

type LiveEventOutputTranscriptionTrack

type LiveEventOutputTranscriptionTrack struct {
	// REQUIRED; The output track name. This property is reserved for future use, any value set on this property will be ignored.
	TrackName *string `json:"trackName,omitempty"`
}

LiveEventOutputTranscriptionTrack - Describes a transcription track in the output of a live event, generated using speech-to-text transcription. This property is reserved for future use, any value set on this property will be ignored.

type LiveEventPreview

type LiveEventPreview struct {
	// The access control for live event preview.
	AccessControl *LiveEventPreviewAccessControl `json:"accessControl,omitempty"`

	// An alternative media identifier associated with the streaming locator created for the preview. This value is specified
	// at creation time and cannot be updated. The identifier can be used in the
	// CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the StreamingPolicyName
	// field.
	AlternativeMediaID *string `json:"alternativeMediaId,omitempty"`

	// The endpoints for preview. Do not share the preview URL with the live event audience.
	Endpoints []*LiveEventEndpoint `json:"endpoints,omitempty"`

	// The identifier of the preview locator in Guid format. Specifying this at creation time allows the caller to know the preview
	// locator url before the event is created. If omitted, the service will
	// generate a random identifier. This value cannot be updated once the live event is created.
	PreviewLocator *string `json:"previewLocator,omitempty"`

	// The name of streaming policy used for the live event preview. This value is specified at creation time and cannot be updated.
	StreamingPolicyName *string `json:"streamingPolicyName,omitempty"`
}

LiveEventPreview - Live event preview settings.

func (LiveEventPreview) MarshalJSON

func (l LiveEventPreview) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventPreview.

type LiveEventPreviewAccessControl

type LiveEventPreviewAccessControl struct {
	// The IP access control properties.
	IP *IPAccessControl `json:"ip,omitempty"`
}

LiveEventPreviewAccessControl - The IP access control for the live event preview endpoint.

type LiveEventProperties

type LiveEventProperties struct {
	// REQUIRED; Live event input settings. It defines how the live event receives input from a contribution encoder.
	Input *LiveEventInput `json:"input,omitempty"`

	// Live event cross site access policies.
	CrossSiteAccessPolicies *CrossSiteAccessPolicies `json:"crossSiteAccessPolicies,omitempty"`

	// A description for the live event.
	Description *string `json:"description,omitempty"`

	// Encoding settings for the live event. It configures whether a live encoder is used for the live event and settings for
	// the live encoder if it is used.
	Encoding *LiveEventEncoding `json:"encoding,omitempty"`

	// When useStaticHostname is set to true, the hostnamePrefix specifies the first part of the hostname assigned to the live
	// event preview and ingest endpoints. The final hostname would be a combination of
	// this prefix, the media service account name and a short code for the Azure Media Services data center.
	HostnamePrefix *string `json:"hostnamePrefix,omitempty"`

	// Live event preview settings. Preview allows live event producers to preview the live streaming content without creating
	// any live output.
	Preview *LiveEventPreview `json:"preview,omitempty"`

	// The options to use for the LiveEvent. This value is specified at creation time and cannot be updated. The valid values
	// for the array entry values are 'Default' and 'LowLatency'.
	StreamOptions []*StreamOptionsFlag `json:"streamOptions,omitempty"`

	// Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information
	// about the live transcription feature.
	Transcriptions []*LiveEventTranscription `json:"transcriptions,omitempty"`

	// Specifies whether a static hostname would be assigned to the live event preview and ingest endpoints. This value can only
	// be updated if the live event is in Standby state
	UseStaticHostname *bool `json:"useStaticHostname,omitempty"`

	// READ-ONLY; The creation time for the live event
	Created *time.Time `json:"created,omitempty" azure:"ro"`

	// READ-ONLY; The last modified time of the live event.
	LastModified *time.Time `json:"lastModified,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state of the live event.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information.
	ResourceState *LiveEventResourceState `json:"resourceState,omitempty" azure:"ro"`
}

LiveEventProperties - The live event properties.

func (LiveEventProperties) MarshalJSON

func (l LiveEventProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventProperties.

func (*LiveEventProperties) UnmarshalJSON

func (l *LiveEventProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveEventProperties.

type LiveEventResourceState

type LiveEventResourceState string

LiveEventResourceState - The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information.

const (
	// LiveEventResourceStateAllocating - Allocate action was called on the live event and resources are being provisioned for
	// this live event. Once allocation completes successfully, the live event will transition to StandBy state.
	LiveEventResourceStateAllocating LiveEventResourceState = "Allocating"
	// LiveEventResourceStateDeleting - The live event is being deleted. No billing occurs in this transient state. Updates or
	// streaming are not allowed during this state.
	LiveEventResourceStateDeleting LiveEventResourceState = "Deleting"
	// LiveEventResourceStateRunning - The live event resources have been allocated, ingest and preview URLs have been generated,
	// and it is capable of receiving live streams. At this point, billing is active. You must explicitly call Stop on the live
	// event resource to halt further billing.
	LiveEventResourceStateRunning LiveEventResourceState = "Running"
	// LiveEventResourceStateStandBy - Live event resources have been provisioned and is ready to start. Billing occurs in this
	// state. Most properties can still be updated, however ingest or streaming is not allowed during this state.
	LiveEventResourceStateStandBy LiveEventResourceState = "StandBy"
	// LiveEventResourceStateStarting - The live event is being started and resources are being allocated. No billing occurs in
	// this state. Updates or streaming are not allowed during this state. If an error occurs, the live event returns to the Stopped
	// state.
	LiveEventResourceStateStarting LiveEventResourceState = "Starting"
	// LiveEventResourceStateStopped - This is the initial state of the live event after creation (unless autostart was set to
	// true.) No billing occurs in this state. In this state, the live event properties can be updated but streaming is not allowed.
	LiveEventResourceStateStopped LiveEventResourceState = "Stopped"
	// LiveEventResourceStateStopping - The live event is being stopped and resources are being de-provisioned. No billing occurs
	// in this transient state. Updates or streaming are not allowed during this state.
	LiveEventResourceStateStopping LiveEventResourceState = "Stopping"
)

func PossibleLiveEventResourceStateValues

func PossibleLiveEventResourceStateValues() []LiveEventResourceState

PossibleLiveEventResourceStateValues returns the possible values for the LiveEventResourceState const type.

type LiveEventTranscription

type LiveEventTranscription struct {
	// Provides a mechanism to select the audio track in the input live feed, to which speech-to-text transcription is applied.
	// This property is reserved for future use, any value set on this property will
	// be ignored.
	InputTrackSelection []*LiveEventInputTrackSelection `json:"inputTrackSelection,omitempty"`

	// Specifies the language (locale) to be used for speech-to-text transcription – it should match the spoken language in the
	// audio track. The value should be in BCP-47 format (e.g: 'en-US'). See
	// https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature and the list
	// of supported languages.
	Language *string `json:"language,omitempty"`

	// Describes a transcription track in the output of a live event, generated using speech-to-text transcription. This property
	// is reserved for future use, any value set on this property will be ignored.
	OutputTranscriptionTrack *LiveEventOutputTranscriptionTrack `json:"outputTranscriptionTrack,omitempty"`
}

LiveEventTranscription - Describes the transcription tracks in the output of a live event, generated using speech-to-text transcription. This property is reserved for future use, any value set on this property will be ignored.

func (LiveEventTranscription) MarshalJSON

func (l LiveEventTranscription) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveEventTranscription.

type LiveEventsClient

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

LiveEventsClient contains the methods for the LiveEvents group. Don't use this type directly, use NewLiveEventsClient() instead.

func NewLiveEventsClient

func NewLiveEventsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LiveEventsClient, error)

NewLiveEventsClient creates a new instance of LiveEventsClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*LiveEventsClient) BeginAllocate

func (client *LiveEventsClient) BeginAllocate(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, options *LiveEventsClientBeginAllocateOptions) (*runtime.Poller[LiveEventsClientAllocateResponse], error)

BeginAllocate - A live event is in StandBy state after allocation completes, and is ready to start. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. liveEventName - The name of the live event, maximum length is 32. options - LiveEventsClientBeginAllocateOptions contains the optional parameters for the LiveEventsClient.BeginAllocate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/liveevent-allocate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLiveEventsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginAllocate(ctx,
		"mediaresources",
		"slitestmedia10",
		"myLiveEvent1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*LiveEventsClient) BeginCreate

func (client *LiveEventsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, parameters LiveEvent, options *LiveEventsClientBeginCreateOptions) (*runtime.Poller[LiveEventsClientCreateResponse], error)

BeginCreate - Creates a new live event. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. liveEventName - The name of the live event, maximum length is 32. parameters - Live event properties needed for creation. options - LiveEventsClientBeginCreateOptions contains the optional parameters for the LiveEventsClient.BeginCreate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/liveevent-create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLiveEventsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx,
		"mediaresources",
		"slitestmedia10",
		"myLiveEvent1",
		armmediaservices.LiveEvent{
			Location: to.Ptr("West US"),
			Tags: map[string]*string{
				"tag1": to.Ptr("value1"),
				"tag2": to.Ptr("value2"),
			},
			Properties: &armmediaservices.LiveEventProperties{
				Description: to.Ptr("test event 1"),
				Input: &armmediaservices.LiveEventInput{
					AccessControl: &armmediaservices.LiveEventInputAccessControl{
						IP: &armmediaservices.IPAccessControl{
							Allow: []*armmediaservices.IPRange{
								{
									Name:               to.Ptr("AllowAll"),
									Address:            to.Ptr("0.0.0.0"),
									SubnetPrefixLength: to.Ptr[int32](0),
								}},
						},
					},
					KeyFrameIntervalDuration: to.Ptr("PT6S"),
					StreamingProtocol:        to.Ptr(armmediaservices.LiveEventInputProtocolRTMP),
				},
				Preview: &armmediaservices.LiveEventPreview{
					AccessControl: &armmediaservices.LiveEventPreviewAccessControl{
						IP: &armmediaservices.IPAccessControl{
							Allow: []*armmediaservices.IPRange{
								{
									Name:               to.Ptr("AllowAll"),
									Address:            to.Ptr("0.0.0.0"),
									SubnetPrefixLength: to.Ptr[int32](0),
								}},
						},
					},
				},
			},
		},
		&armmediaservices.LiveEventsClientBeginCreateOptions{AutoStart: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*LiveEventsClient) BeginDelete

func (client *LiveEventsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, options *LiveEventsClientBeginDeleteOptions) (*runtime.Poller[LiveEventsClientDeleteResponse], error)

BeginDelete - Deletes a live event. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. liveEventName - The name of the live event, maximum length is 32. options - LiveEventsClientBeginDeleteOptions contains the optional parameters for the LiveEventsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/liveevent-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLiveEventsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"mediaresources",
		"slitestmedia10",
		"myLiveEvent1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*LiveEventsClient) BeginReset

func (client *LiveEventsClient) BeginReset(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, options *LiveEventsClientBeginResetOptions) (*runtime.Poller[LiveEventsClientResetResponse], error)

BeginReset - Resets an existing live event. All live outputs for the live event are deleted and the live event is stopped and will be started again. All assets used by the live outputs and streaming locators created on these assets are unaffected. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. liveEventName - The name of the live event, maximum length is 32. options - LiveEventsClientBeginResetOptions contains the optional parameters for the LiveEventsClient.BeginReset method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/liveevent-reset.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLiveEventsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginReset(ctx,
		"mediaresources",
		"slitestmedia10",
		"myLiveEvent1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*LiveEventsClient) BeginStart

func (client *LiveEventsClient) BeginStart(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, options *LiveEventsClientBeginStartOptions) (*runtime.Poller[LiveEventsClientStartResponse], error)

BeginStart - A live event in Stopped or StandBy state will be in Running state after the start operation completes. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. liveEventName - The name of the live event, maximum length is 32. options - LiveEventsClientBeginStartOptions contains the optional parameters for the LiveEventsClient.BeginStart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/liveevent-start.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLiveEventsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStart(ctx,
		"mediaresources",
		"slitestmedia10",
		"myLiveEvent1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*LiveEventsClient) BeginStop

func (client *LiveEventsClient) BeginStop(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, parameters LiveEventActionInput, options *LiveEventsClientBeginStopOptions) (*runtime.Poller[LiveEventsClientStopResponse], error)

BeginStop - Stops a running live event. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. liveEventName - The name of the live event, maximum length is 32. parameters - LiveEvent stop parameters options - LiveEventsClientBeginStopOptions contains the optional parameters for the LiveEventsClient.BeginStop method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/liveevent-stop.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLiveEventsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStop(ctx,
		"mediaresources",
		"slitestmedia10",
		"myLiveEvent1",
		armmediaservices.LiveEventActionInput{
			RemoveOutputsOnStop: to.Ptr(false),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*LiveEventsClient) BeginUpdate

func (client *LiveEventsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, parameters LiveEvent, options *LiveEventsClientBeginUpdateOptions) (*runtime.Poller[LiveEventsClientUpdateResponse], error)

BeginUpdate - Updates settings on an existing live event. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. liveEventName - The name of the live event, maximum length is 32. parameters - Live event properties needed for patch. options - LiveEventsClientBeginUpdateOptions contains the optional parameters for the LiveEventsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/liveevent-update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLiveEventsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"mediaresources",
		"slitestmedia10",
		"myLiveEvent1",
		armmediaservices.LiveEvent{
			Location: to.Ptr("West US"),
			Tags: map[string]*string{
				"tag1": to.Ptr("value1"),
				"tag2": to.Ptr("value2"),
				"tag3": to.Ptr("value3"),
			},
			Properties: &armmediaservices.LiveEventProperties{
				Description: to.Ptr("test event updated"),
				Input: &armmediaservices.LiveEventInput{
					AccessControl: &armmediaservices.LiveEventInputAccessControl{
						IP: &armmediaservices.IPAccessControl{
							Allow: []*armmediaservices.IPRange{
								{
									Name:    to.Ptr("AllowOne"),
									Address: to.Ptr("192.1.1.0"),
								}},
						},
					},
					KeyFrameIntervalDuration: to.Ptr("PT6S"),
					StreamingProtocol:        to.Ptr(armmediaservices.LiveEventInputProtocolFragmentedMP4),
				},
				Preview: &armmediaservices.LiveEventPreview{
					AccessControl: &armmediaservices.LiveEventPreviewAccessControl{
						IP: &armmediaservices.IPAccessControl{
							Allow: []*armmediaservices.IPRange{
								{
									Name:    to.Ptr("AllowOne"),
									Address: to.Ptr("192.1.1.0"),
								}},
						},
					},
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*LiveEventsClient) Get

func (client *LiveEventsClient) Get(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, options *LiveEventsClientGetOptions) (LiveEventsClientGetResponse, error)

Get - Gets properties of a live event. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. liveEventName - The name of the live event, maximum length is 32. options - LiveEventsClientGetOptions contains the optional parameters for the LiveEventsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/liveevent-list-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLiveEventsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"mediaresources",
		"slitestmedia10",
		"myLiveEvent1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*LiveEventsClient) NewListPager added in v0.6.0

func (client *LiveEventsClient) NewListPager(resourceGroupName string, accountName string, options *LiveEventsClientListOptions) *runtime.Pager[LiveEventsClientListResponse]

NewListPager - Lists all the live events in the account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - LiveEventsClientListOptions contains the optional parameters for the LiveEventsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/liveevent-list-all.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLiveEventsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("mediaresources",
		"slitestmedia10",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type LiveEventsClientAllocateResponse added in v0.3.0

type LiveEventsClientAllocateResponse struct {
}

LiveEventsClientAllocateResponse contains the response from method LiveEventsClient.Allocate.

type LiveEventsClientBeginAllocateOptions added in v0.3.0

type LiveEventsClientBeginAllocateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginAllocateOptions contains the optional parameters for the LiveEventsClient.BeginAllocate method.

type LiveEventsClientBeginCreateOptions added in v0.3.0

type LiveEventsClientBeginCreateOptions struct {
	// The flag indicates if the resource should be automatically started on creation.
	AutoStart *bool
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginCreateOptions contains the optional parameters for the LiveEventsClient.BeginCreate method.

type LiveEventsClientBeginDeleteOptions added in v0.3.0

type LiveEventsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginDeleteOptions contains the optional parameters for the LiveEventsClient.BeginDelete method.

type LiveEventsClientBeginResetOptions added in v0.3.0

type LiveEventsClientBeginResetOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginResetOptions contains the optional parameters for the LiveEventsClient.BeginReset method.

type LiveEventsClientBeginStartOptions added in v0.3.0

type LiveEventsClientBeginStartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginStartOptions contains the optional parameters for the LiveEventsClient.BeginStart method.

type LiveEventsClientBeginStopOptions added in v0.3.0

type LiveEventsClientBeginStopOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginStopOptions contains the optional parameters for the LiveEventsClient.BeginStop method.

type LiveEventsClientBeginUpdateOptions added in v0.3.0

type LiveEventsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveEventsClientBeginUpdateOptions contains the optional parameters for the LiveEventsClient.BeginUpdate method.

type LiveEventsClientCreateResponse added in v0.3.0

type LiveEventsClientCreateResponse struct {
	LiveEvent
}

LiveEventsClientCreateResponse contains the response from method LiveEventsClient.Create.

type LiveEventsClientDeleteResponse added in v0.3.0

type LiveEventsClientDeleteResponse struct {
}

LiveEventsClientDeleteResponse contains the response from method LiveEventsClient.Delete.

type LiveEventsClientGetOptions added in v0.3.0

type LiveEventsClientGetOptions struct {
}

LiveEventsClientGetOptions contains the optional parameters for the LiveEventsClient.Get method.

type LiveEventsClientGetResponse added in v0.3.0

type LiveEventsClientGetResponse struct {
	LiveEvent
}

LiveEventsClientGetResponse contains the response from method LiveEventsClient.Get.

type LiveEventsClientListOptions added in v0.3.0

type LiveEventsClientListOptions struct {
}

LiveEventsClientListOptions contains the optional parameters for the LiveEventsClient.List method.

type LiveEventsClientListResponse added in v0.3.0

type LiveEventsClientListResponse struct {
	LiveEventListResult
}

LiveEventsClientListResponse contains the response from method LiveEventsClient.List.

type LiveEventsClientResetResponse added in v0.3.0

type LiveEventsClientResetResponse struct {
}

LiveEventsClientResetResponse contains the response from method LiveEventsClient.Reset.

type LiveEventsClientStartResponse added in v0.3.0

type LiveEventsClientStartResponse struct {
}

LiveEventsClientStartResponse contains the response from method LiveEventsClient.Start.

type LiveEventsClientStopResponse added in v0.3.0

type LiveEventsClientStopResponse struct {
}

LiveEventsClientStopResponse contains the response from method LiveEventsClient.Stop.

type LiveEventsClientUpdateResponse added in v0.3.0

type LiveEventsClientUpdateResponse struct {
	LiveEvent
}

LiveEventsClientUpdateResponse contains the response from method LiveEventsClient.Update.

type LiveOutput

type LiveOutput struct {
	// Live output properties.
	Properties *LiveOutputProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

LiveOutput - The Live Output.

type LiveOutputListResult

type LiveOutputListResult struct {
	// The number of result.
	ODataCount *int32 `json:"@odata.count,omitempty"`

	// The link to the next set of results. Not empty if value contains incomplete list of live outputs.
	ODataNextLink *string `json:"@odata.nextLink,omitempty"`

	// The result of the List LiveOutput operation.
	Value []*LiveOutput `json:"value,omitempty"`
}

LiveOutputListResult - The LiveOutput list result.

type LiveOutputProperties

type LiveOutputProperties struct {
	// REQUIRED; ISO 8601 time between 1 minute to 25 hours to indicate the maximum content length that can be archived in the
	// asset for this live output. This also sets the maximum content length for the rewind
	// window. For example, use PT1H30M to indicate 1 hour and 30 minutes of archive window.
	ArchiveWindowLength *string `json:"archiveWindowLength,omitempty"`

	// REQUIRED; The asset that the live output will write to.
	AssetName *string `json:"assetName,omitempty"`

	// The description of the live output.
	Description *string `json:"description,omitempty"`

	// HTTP Live Streaming (HLS) packing setting for the live output.
	Hls *Hls `json:"hls,omitempty"`

	// The manifest file name. If not provided, the service will generate one automatically.
	ManifestName *string `json:"manifestName,omitempty"`

	// The initial timestamp that the live output will start at, any content before this value will not be archived.
	OutputSnapTime *int64 `json:"outputSnapTime,omitempty"`

	// READ-ONLY; The creation time the live output.
	Created *time.Time `json:"created,omitempty" azure:"ro"`

	// READ-ONLY; The time the live output was last modified.
	LastModified *time.Time `json:"lastModified,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state of the live output.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The resource state of the live output.
	ResourceState *LiveOutputResourceState `json:"resourceState,omitempty" azure:"ro"`
}

LiveOutputProperties - The JSON object that contains the properties required to create a live output.

func (LiveOutputProperties) MarshalJSON

func (l LiveOutputProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LiveOutputProperties.

func (*LiveOutputProperties) UnmarshalJSON

func (l *LiveOutputProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LiveOutputProperties.

type LiveOutputResourceState

type LiveOutputResourceState string

LiveOutputResourceState - The resource state of the live output.

const (
	// LiveOutputResourceStateCreating - Live output is being created. No content is archived in the asset until the live output
	// is in running state.
	LiveOutputResourceStateCreating LiveOutputResourceState = "Creating"
	// LiveOutputResourceStateDeleting - Live output is being deleted. The live asset is being converted from live to on-demand
	// asset. Any streaming URLs created on the live output asset continue to work.
	LiveOutputResourceStateDeleting LiveOutputResourceState = "Deleting"
	// LiveOutputResourceStateRunning - Live output is running and archiving live streaming content to the asset if there is valid
	// input from a contribution encoder.
	LiveOutputResourceStateRunning LiveOutputResourceState = "Running"
)

func PossibleLiveOutputResourceStateValues

func PossibleLiveOutputResourceStateValues() []LiveOutputResourceState

PossibleLiveOutputResourceStateValues returns the possible values for the LiveOutputResourceState const type.

type LiveOutputsClient

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

LiveOutputsClient contains the methods for the LiveOutputs group. Don't use this type directly, use NewLiveOutputsClient() instead.

func NewLiveOutputsClient

func NewLiveOutputsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LiveOutputsClient, error)

NewLiveOutputsClient creates a new instance of LiveOutputsClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*LiveOutputsClient) BeginCreate

func (client *LiveOutputsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string, parameters LiveOutput, options *LiveOutputsClientBeginCreateOptions) (*runtime.Poller[LiveOutputsClientCreateResponse], error)

BeginCreate - Creates a new live output. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. liveEventName - The name of the live event, maximum length is 32. liveOutputName - The name of the live output. parameters - Live Output properties needed for creation. options - LiveOutputsClientBeginCreateOptions contains the optional parameters for the LiveOutputsClient.BeginCreate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/liveoutput-create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLiveOutputsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx,
		"mediaresources",
		"slitestmedia10",
		"myLiveEvent1",
		"myLiveOutput1",
		armmediaservices.LiveOutput{
			Properties: &armmediaservices.LiveOutputProperties{
				Description:         to.Ptr("test live output 1"),
				ArchiveWindowLength: to.Ptr("PT5M"),
				AssetName:           to.Ptr("6f3264f5-a189-48b4-a29a-a40f22575212"),
				Hls: &armmediaservices.Hls{
					FragmentsPerTsSegment: to.Ptr[int32](5),
				},
				ManifestName: to.Ptr("testmanifest"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*LiveOutputsClient) BeginDelete

func (client *LiveOutputsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string, options *LiveOutputsClientBeginDeleteOptions) (*runtime.Poller[LiveOutputsClientDeleteResponse], error)

BeginDelete - Deletes a live output. Deleting a live output does not delete the asset the live output is writing to. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. liveEventName - The name of the live event, maximum length is 32. liveOutputName - The name of the live output. options - LiveOutputsClientBeginDeleteOptions contains the optional parameters for the LiveOutputsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/liveoutput-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLiveOutputsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"mediaresources",
		"slitestmedia10",
		"myLiveEvent1",
		"myLiveOutput1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*LiveOutputsClient) Get

func (client *LiveOutputsClient) Get(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string, options *LiveOutputsClientGetOptions) (LiveOutputsClientGetResponse, error)

Get - Gets a live output. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. liveEventName - The name of the live event, maximum length is 32. liveOutputName - The name of the live output. options - LiveOutputsClientGetOptions contains the optional parameters for the LiveOutputsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/liveoutput-list-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLiveOutputsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"mediaresources",
		"slitestmedia10",
		"myLiveEvent1",
		"myLiveOutput1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*LiveOutputsClient) NewListPager added in v0.6.0

func (client *LiveOutputsClient) NewListPager(resourceGroupName string, accountName string, liveEventName string, options *LiveOutputsClientListOptions) *runtime.Pager[LiveOutputsClientListResponse]

NewListPager - Lists the live outputs of a live event. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. liveEventName - The name of the live event, maximum length is 32. options - LiveOutputsClientListOptions contains the optional parameters for the LiveOutputsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/liveoutput-list-all.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLiveOutputsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("mediaresources",
		"slitestmedia10",
		"myLiveEvent1",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type LiveOutputsClientBeginCreateOptions added in v0.3.0

type LiveOutputsClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveOutputsClientBeginCreateOptions contains the optional parameters for the LiveOutputsClient.BeginCreate method.

type LiveOutputsClientBeginDeleteOptions added in v0.3.0

type LiveOutputsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

LiveOutputsClientBeginDeleteOptions contains the optional parameters for the LiveOutputsClient.BeginDelete method.

type LiveOutputsClientCreateResponse added in v0.3.0

type LiveOutputsClientCreateResponse struct {
	LiveOutput
}

LiveOutputsClientCreateResponse contains the response from method LiveOutputsClient.Create.

type LiveOutputsClientDeleteResponse added in v0.3.0

type LiveOutputsClientDeleteResponse struct {
}

LiveOutputsClientDeleteResponse contains the response from method LiveOutputsClient.Delete.

type LiveOutputsClientGetOptions added in v0.3.0

type LiveOutputsClientGetOptions struct {
}

LiveOutputsClientGetOptions contains the optional parameters for the LiveOutputsClient.Get method.

type LiveOutputsClientGetResponse added in v0.3.0

type LiveOutputsClientGetResponse struct {
	LiveOutput
}

LiveOutputsClientGetResponse contains the response from method LiveOutputsClient.Get.

type LiveOutputsClientListOptions added in v0.3.0

type LiveOutputsClientListOptions struct {
}

LiveOutputsClientListOptions contains the optional parameters for the LiveOutputsClient.List method.

type LiveOutputsClientListResponse added in v0.3.0

type LiveOutputsClientListResponse struct {
	LiveOutputListResult
}

LiveOutputsClientListResponse contains the response from method LiveOutputsClient.List.

type LocationsClient

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

LocationsClient contains the methods for the Locations group. Don't use this type directly, use NewLocationsClient() instead.

func NewLocationsClient

func NewLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationsClient, error)

NewLocationsClient creates a new instance of LocationsClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*LocationsClient) CheckNameAvailability

CheckNameAvailability - Checks whether the Media Service resource name is available. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 locationName - The name of the location parameters - The request parameters options - LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-check-name-availability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewLocationsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CheckNameAvailability(ctx,
		"japanwest",
		armmediaservices.CheckNameAvailabilityInput{
			Name: to.Ptr("contosotv"),
			Type: to.Ptr("videoAnalyzers"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type LocationsClientCheckNameAvailabilityOptions added in v0.3.0

type LocationsClientCheckNameAvailabilityOptions struct {
}

LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability method.

type LocationsClientCheckNameAvailabilityResponse added in v0.3.0

type LocationsClientCheckNameAvailabilityResponse struct {
	EntityNameAvailabilityCheckOutput
}

LocationsClientCheckNameAvailabilityResponse contains the response from method LocationsClient.CheckNameAvailability.

type LogSpecification

type LogSpecification struct {
	// READ-ONLY; The time range for requests in each blob.
	BlobDuration *string `json:"blobDuration,omitempty" azure:"ro"`

	// READ-ONLY; The diagnostic log category display name.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The diagnostic log category name.
	Name *string `json:"name,omitempty" azure:"ro"`
}

LogSpecification - A diagnostic log emitted by service.

type MediaFilterProperties

type MediaFilterProperties struct {
	// The first quality.
	FirstQuality *FirstQuality `json:"firstQuality,omitempty"`

	// The presentation time range.
	PresentationTimeRange *PresentationTimeRange `json:"presentationTimeRange,omitempty"`

	// The tracks selection conditions.
	Tracks []*FilterTrackSelection `json:"tracks,omitempty"`
}

MediaFilterProperties - The Media Filter properties.

func (MediaFilterProperties) MarshalJSON

func (m MediaFilterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MediaFilterProperties.

type MediaService

type MediaService struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// The Managed Identity for the Media Services account.
	Identity *MediaServiceIdentity `json:"identity,omitempty"`

	// The resource properties.
	Properties *MediaServiceProperties `json:"properties,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

MediaService - A Media Services account.

func (MediaService) MarshalJSON

func (m MediaService) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MediaService.

type MediaServiceCollection

type MediaServiceCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string `json:"@odata.nextLink,omitempty"`

	// A collection of MediaService items.
	Value []*MediaService `json:"value,omitempty"`
}

MediaServiceCollection - A collection of MediaService items.

type MediaServiceIdentity

type MediaServiceIdentity struct {
	// REQUIRED; The identity type.
	Type *string `json:"type,omitempty"`

	// The user assigned managed identities.
	UserAssignedIdentities map[string]*UserAssignedManagedIdentity `json:"userAssignedIdentities,omitempty"`

	// READ-ONLY; The Principal ID of the identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The Tenant ID of the identity.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

func (MediaServiceIdentity) MarshalJSON

func (m MediaServiceIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MediaServiceIdentity.

type MediaServiceProperties

type MediaServiceProperties struct {
	// The account encryption properties.
	Encryption *AccountEncryption `json:"encryption,omitempty"`

	// The Key Delivery properties for Media Services account.
	KeyDelivery *KeyDelivery `json:"keyDelivery,omitempty"`

	// Whether or not public network access is allowed for resources under the Media Services account.
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// The storage accounts for this resource.
	StorageAccounts       []*StorageAccount      `json:"storageAccounts,omitempty"`
	StorageAuthentication *StorageAuthentication `json:"storageAuthentication,omitempty"`

	// READ-ONLY; The Media Services account ID.
	MediaServiceID *string `json:"mediaServiceId,omitempty" azure:"ro"`
}

MediaServiceProperties - Properties of the Media Services account.

func (MediaServiceProperties) MarshalJSON

func (m MediaServiceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MediaServiceProperties.

type MediaServiceUpdate

type MediaServiceUpdate struct {
	// The Managed Identity for the Media Services account.
	Identity *MediaServiceIdentity `json:"identity,omitempty"`

	// The resource properties.
	Properties *MediaServiceProperties `json:"properties,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`
}

MediaServiceUpdate - A Media Services account update.

func (MediaServiceUpdate) MarshalJSON

func (m MediaServiceUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MediaServiceUpdate.

type MetricAggregationType

type MetricAggregationType string

MetricAggregationType - The metric aggregation type

const (
	// MetricAggregationTypeAverage - The average.
	MetricAggregationTypeAverage MetricAggregationType = "Average"
	// MetricAggregationTypeCount - The count of a number of items, usually requests.
	MetricAggregationTypeCount MetricAggregationType = "Count"
	// MetricAggregationTypeTotal - The sum.
	MetricAggregationTypeTotal MetricAggregationType = "Total"
)

func PossibleMetricAggregationTypeValues

func PossibleMetricAggregationTypeValues() []MetricAggregationType

PossibleMetricAggregationTypeValues returns the possible values for the MetricAggregationType const type.

type MetricDimension

type MetricDimension struct {
	// READ-ONLY; The display name for the dimension.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The metric dimension name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Whether to export metric to shoebox.
	ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty" azure:"ro"`
}

MetricDimension - A metric dimension.

type MetricSpecification

type MetricSpecification struct {
	// Supported aggregation types.
	SupportedAggregationTypes []*string `json:"supportedAggregationTypes,omitempty"`

	// READ-ONLY; The metric aggregation type
	AggregationType *MetricAggregationType `json:"aggregationType,omitempty" azure:"ro"`

	// READ-ONLY; The metric dimensions.
	Dimensions []*MetricDimension `json:"dimensions,omitempty" azure:"ro"`

	// READ-ONLY; The metric display description.
	DisplayDescription *string `json:"displayDescription,omitempty" azure:"ro"`

	// READ-ONLY; The metric display name.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; Indicates whether regional MDM account is enabled.
	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty" azure:"ro"`

	// READ-ONLY; The metric lock aggregation type
	LockAggregationType *MetricAggregationType `json:"lockAggregationType,omitempty" azure:"ro"`

	// READ-ONLY; The metric name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The source MDM account.
	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty" azure:"ro"`

	// READ-ONLY; The source MDM namespace.
	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty" azure:"ro"`

	// READ-ONLY; The supported time grain types.
	SupportedTimeGrainTypes []*string `json:"supportedTimeGrainTypes,omitempty" azure:"ro"`

	// READ-ONLY; The metric unit
	Unit *MetricUnit `json:"unit,omitempty" azure:"ro"`
}

MetricSpecification - A metric emitted by service.

type MetricUnit

type MetricUnit string

MetricUnit - The metric unit

const (
	// MetricUnitBytes - The number of bytes.
	MetricUnitBytes MetricUnit = "Bytes"
	// MetricUnitCount - The count.
	MetricUnitCount MetricUnit = "Count"
	// MetricUnitMilliseconds - The number of milliseconds.
	MetricUnitMilliseconds MetricUnit = "Milliseconds"
)

func PossibleMetricUnitValues

func PossibleMetricUnitValues() []MetricUnit

PossibleMetricUnitValues returns the possible values for the MetricUnit const type.

type Mp4Format

type Mp4Format struct {
	// REQUIRED; The pattern of the file names for the generated output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec.
	// {Resolution} - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename.
	FilenamePattern *string `json:"filenamePattern,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together
	// .
	OutputFiles []*OutputFile `json:"outputFiles,omitempty"`
}

Mp4Format - Describes the properties for an output ISO MP4 file.

func (*Mp4Format) GetFormat added in v0.3.0

func (m *Mp4Format) GetFormat() *Format

GetFormat implements the FormatClassification interface for type Mp4Format.

func (*Mp4Format) GetMultiBitrateFormat added in v0.3.0

func (m *Mp4Format) GetMultiBitrateFormat() *MultiBitrateFormat

GetMultiBitrateFormat implements the MultiBitrateFormatClassification interface for type Mp4Format.

func (Mp4Format) MarshalJSON

func (m Mp4Format) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Mp4Format.

func (*Mp4Format) UnmarshalJSON added in v0.3.0

func (m *Mp4Format) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Mp4Format.

type MultiBitrateFormat

type MultiBitrateFormat struct {
	// REQUIRED; The pattern of the file names for the generated output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec.
	// {Resolution} - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename.
	FilenamePattern *string `json:"filenamePattern,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together
	// .
	OutputFiles []*OutputFile `json:"outputFiles,omitempty"`
}

MultiBitrateFormat - Describes the properties for producing a collection of GOP aligned multi-bitrate files. The default behavior is to produce one output file for each video layer which is muxed together with all the audios. The exact output files produced can be controlled by specifying the outputFiles collection.

func (*MultiBitrateFormat) GetFormat added in v0.3.0

func (m *MultiBitrateFormat) GetFormat() *Format

GetFormat implements the FormatClassification interface for type MultiBitrateFormat.

func (*MultiBitrateFormat) GetMultiBitrateFormat

func (m *MultiBitrateFormat) GetMultiBitrateFormat() *MultiBitrateFormat

GetMultiBitrateFormat implements the MultiBitrateFormatClassification interface for type MultiBitrateFormat.

func (MultiBitrateFormat) MarshalJSON

func (m MultiBitrateFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MultiBitrateFormat.

func (*MultiBitrateFormat) UnmarshalJSON

func (m *MultiBitrateFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MultiBitrateFormat.

type MultiBitrateFormatClassification

type MultiBitrateFormatClassification interface {
	FormatClassification
	// GetMultiBitrateFormat returns the MultiBitrateFormat content of the underlying type.
	GetMultiBitrateFormat() *MultiBitrateFormat
}

MultiBitrateFormatClassification provides polymorphic access to related types. Call the interface's GetMultiBitrateFormat() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *Mp4Format, *MultiBitrateFormat, *TransportStreamFormat

type NoEncryption

type NoEncryption struct {
	// Representing supported protocols
	EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"`
}

NoEncryption - Class for NoEncryption scheme

type OnErrorType

type OnErrorType string

OnErrorType - A Transform can define more than one outputs. This property defines what the service should do when one output fails - either continue to produce other outputs, or, stop the other outputs. The overall Job state will not reflect failures of outputs that are specified with 'ContinueJob'. The default is 'StopProcessingJob'.

const (
	// OnErrorTypeContinueJob - Tells the service that if this TransformOutput fails, then allow any other TransformOutput to
	// continue.
	OnErrorTypeContinueJob OnErrorType = "ContinueJob"
	// OnErrorTypeStopProcessingJob - Tells the service that if this TransformOutput fails, then any other incomplete TransformOutputs
	// can be stopped.
	OnErrorTypeStopProcessingJob OnErrorType = "StopProcessingJob"
)

func PossibleOnErrorTypeValues

func PossibleOnErrorTypeValues() []OnErrorType

PossibleOnErrorTypeValues returns the possible values for the OnErrorType const type.

type Operation

type Operation struct {
	// REQUIRED; The operation name.
	Name *string `json:"name,omitempty"`

	// Indicates the action type.
	ActionType *ActionType `json:"actionType,omitempty"`

	// The operation display name.
	Display *OperationDisplay `json:"display,omitempty"`

	// Whether the operation applies to data-plane.
	IsDataAction *bool `json:"isDataAction,omitempty"`

	// Origin of the operation.
	Origin *string `json:"origin,omitempty"`

	// Operation properties format.
	Properties *Properties `json:"properties,omitempty"`
}

Operation - An operation.

type OperationCollection

type OperationCollection struct {
	// A collection of Operation items.
	Value []*Operation `json:"value,omitempty"`
}

OperationCollection - A collection of Operation items.

type OperationDisplay

type OperationDisplay struct {
	// The operation description.
	Description *string `json:"description,omitempty"`

	// The operation type.
	Operation *string `json:"operation,omitempty"`

	// The service provider.
	Provider *string `json:"provider,omitempty"`

	// Resource on which the operation is performed.
	Resource *string `json:"resource,omitempty"`
}

OperationDisplay - Operation details.

type OperationResultsClient added in v0.4.0

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

OperationResultsClient contains the methods for the OperationResults group. Don't use this type directly, use NewOperationResultsClient() instead.

func NewOperationResultsClient added in v0.4.0

func NewOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationResultsClient, error)

NewOperationResultsClient creates a new instance of OperationResultsClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationResultsClient) Get added in v0.4.0

func (client *OperationResultsClient) Get(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, operationID string, options *OperationResultsClientGetOptions) (OperationResultsClientGetResponse, error)

Get - Get asset track operation result. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. trackName - The Asset Track name. operationID - Operation Id. options - OperationResultsClientGetOptions contains the optional parameters for the OperationResultsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-operation-result-by-id.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewOperationResultsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountRainer",
		"text1",
		"e78f8d40-7aaa-4f2f-8ae6-73987e7c5a08",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type OperationResultsClientGetOptions added in v0.4.0

type OperationResultsClientGetOptions struct {
}

OperationResultsClientGetOptions contains the optional parameters for the OperationResultsClient.Get method.

type OperationResultsClientGetResponse added in v0.4.0

type OperationResultsClientGetResponse struct {
	AssetTrack
	// AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response.
	AzureAsyncOperation *string

	// Location contains the information returned from the Location header response.
	Location *string

	// RetryAfter contains the information returned from the Retry-After header response.
	RetryAfter *int32
}

OperationResultsClientGetResponse contains the response from method OperationResultsClient.Get.

type OperationStatusesClient added in v0.4.0

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

OperationStatusesClient contains the methods for the OperationStatuses group. Don't use this type directly, use NewOperationStatusesClient() instead.

func NewOperationStatusesClient added in v0.4.0

func NewOperationStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusesClient, error)

NewOperationStatusesClient creates a new instance of OperationStatusesClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationStatusesClient) Get added in v0.4.0

func (client *OperationStatusesClient) Get(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, operationID string, options *OperationStatusesClientGetOptions) (OperationStatusesClientGetResponse, error)

Get - Get asset track operation status. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. trackName - The Asset Track name. operationID - Operation Id. options - OperationStatusesClientGetOptions contains the optional parameters for the OperationStatusesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-operation-status-by-id-terminal-state-failed.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewOperationStatusesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountRainer",
		"text1",
		"86835197-3b47-402e-b313-70b82eaba296",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type OperationStatusesClientGetOptions added in v0.4.0

type OperationStatusesClientGetOptions struct {
}

OperationStatusesClientGetOptions contains the optional parameters for the OperationStatusesClient.Get method.

type OperationStatusesClientGetResponse added in v0.4.0

type OperationStatusesClientGetResponse struct {
	AssetTrackOperationStatus
}

OperationStatusesClientGetResponse contains the response from method OperationStatusesClient.Get.

type OperationsClient

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

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationsClient) List

List - Lists all the Media Services operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/operations-list-all.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewOperationsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	OperationCollection
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type OutputFile

type OutputFile struct {
	// REQUIRED; The list of labels that describe how the encoder should multiplex video and audio into an output file. For example,
	// if the encoder is producing two video layers with labels v1 and v2, and one audio
	// layer with label a1, then an array like '[v1, a1]' tells the encoder to produce an output file with the video track represented
	// by v1 and the audio track represented by a1.
	Labels []*string `json:"labels,omitempty"`
}

OutputFile - Represents an output file produced.

func (OutputFile) MarshalJSON

func (o OutputFile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OutputFile.

type Overlay

type Overlay struct {
	// REQUIRED; The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can
	// specify an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV,
	// MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video
	// file formats.
	InputLabel *string `json:"inputLabel,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0.
	AudioGainLevel *float64 `json:"audioGainLevel,omitempty"`

	// The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format.
	// For example, PT30S to end the overlay at 30 seconds into the input video. If not
	// specified or the value is greater than the input video duration, the overlay will be applied until the end of the input
	// video if the overlay media duration is greater than the input video duration,
	// else the overlay will last as long as the overlay media duration.
	End *string `json:"end,omitempty"`

	// The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If
	// not specified the default behavior is to have no fade in (same as PT0S).
	FadeInDuration *string `json:"fadeInDuration,omitempty"`

	// The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not
	// specified the default behavior is to have no fade out (same as PT0S).
	FadeOutDuration *string `json:"fadeOutDuration,omitempty"`

	// The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format.
	// For example, PT05S to start the overlay at 5 seconds into the input video.
	// If not specified the overlay starts from the beginning of the input video.
	Start *string `json:"start,omitempty"`
}

Overlay - Base type for all overlays - image, audio or video.

func (*Overlay) GetOverlay

func (o *Overlay) GetOverlay() *Overlay

GetOverlay implements the OverlayClassification interface for type Overlay.

type OverlayClassification

type OverlayClassification interface {
	// GetOverlay returns the Overlay content of the underlying type.
	GetOverlay() *Overlay
}

OverlayClassification provides polymorphic access to related types. Call the interface's GetOverlay() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AudioOverlay, *Overlay, *VideoOverlay

type PNGFormat

type PNGFormat struct {
	// REQUIRED; The pattern of the file names for the generated output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec.
	// {Resolution} - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename.
	FilenamePattern *string `json:"filenamePattern,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

PNGFormat - Describes the settings for producing PNG thumbnails.

func (*PNGFormat) GetFormat added in v0.3.0

func (p *PNGFormat) GetFormat() *Format

GetFormat implements the FormatClassification interface for type PNGFormat.

func (*PNGFormat) GetImageFormat added in v0.3.0

func (p *PNGFormat) GetImageFormat() *ImageFormat

GetImageFormat implements the ImageFormatClassification interface for type PNGFormat.

func (PNGFormat) MarshalJSON

func (p PNGFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PNGFormat.

func (*PNGFormat) UnmarshalJSON added in v0.3.0

func (p *PNGFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PNGFormat.

type PNGImage

type PNGImage struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// REQUIRED; The position in the input video from where to start generating thumbnails. The value can be in ISO 8601 format
	// (For example, PT05S to start at 5 seconds), or a frame count (For example, 10 to start at
	// the 10th frame), or a relative value to stream duration (For example, 10% to start at 10% of stream duration). Also supports
	// a macro {Best}, which tells the encoder to select the best thumbnail from
	// the first few seconds of the video and will only produce one thumbnail, no matter what other settings are for Step and
	// Range. The default value is macro {Best}.
	Start *string `json:"start,omitempty"`

	// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601
	// format. The default is 2 seconds(PT2S). Note that this setting is ignored if
	// VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.
	KeyFrameInterval *string `json:"keyFrameInterval,omitempty"`

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string `json:"label,omitempty"`

	// A collection of output PNG image layers to be produced by the encoder.
	Layers []*PNGLayer `json:"layers,omitempty"`

	// The position relative to transform preset start time in the input video at which to stop generating thumbnails. The value
	// can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30
	// seconds from start time), or a frame count (For example, 300 to stop at the 300th frame from the frame at start time. If
	// this value is 1, it means only producing one thumbnail at start time), or a
	// relative value to the stream duration (For example, 50% to stop at half of stream duration from start time). The default
	// value is 100%, which means to stop at the end of the stream.
	Range *string `json:"range,omitempty"`

	// The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For example, PT05S for one image
	// every 5 seconds), or a frame count (For example, 30 for one image every 30
	// frames), or a relative value to stream duration (For example, 10% for one image every 10% of stream duration). Note: Step
	// value will affect the first generated thumbnail, which may not be exactly the
	// one specified at transform preset start time. This is due to the encoder, which tries to select the best thumbnail between
	// start time and Step position from start time as the first output. As the
	// default value is 10%, it means if stream has long duration, the first generated thumbnail might be far away from the one
	// specified at start time. Try to select reasonable value for Step if the first
	// thumbnail is expected close to start time, or set Range value at 1 if only one thumbnail is needed at start time.
	Step *string `json:"step,omitempty"`

	// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize
	StretchMode *StretchMode `json:"stretchMode,omitempty"`

	// The Video Sync Mode
	SyncMode *VideoSyncMode `json:"syncMode,omitempty"`
}

PNGImage - Describes the properties for producing a series of PNG images from the input video.

func (*PNGImage) GetCodec added in v0.3.0

func (p *PNGImage) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type PNGImage.

func (*PNGImage) GetImage added in v0.3.0

func (p *PNGImage) GetImage() *Image

GetImage implements the ImageClassification interface for type PNGImage.

func (*PNGImage) GetVideo added in v0.3.0

func (p *PNGImage) GetVideo() *Video

GetVideo implements the VideoClassification interface for type PNGImage.

func (PNGImage) MarshalJSON

func (p PNGImage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PNGImage.

func (*PNGImage) UnmarshalJSON

func (p *PNGImage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PNGImage.

type PNGLayer

type PNGLayer struct {
	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string `json:"height,omitempty"`

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string `json:"label,omitempty"`

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string `json:"width,omitempty"`
}

PNGLayer - Describes the settings to produce a PNG image from the input video.

type PresentationTimeRange

type PresentationTimeRange struct {
	// The absolute end time boundary.
	EndTimestamp *int64 `json:"endTimestamp,omitempty"`

	// The indicator of forcing existing of end time stamp.
	ForceEndTimestamp *bool `json:"forceEndTimestamp,omitempty"`

	// The relative to end right edge.
	LiveBackoffDuration *int64 `json:"liveBackoffDuration,omitempty"`

	// The relative to end sliding window.
	PresentationWindowDuration *int64 `json:"presentationWindowDuration,omitempty"`

	// The absolute start time boundary.
	StartTimestamp *int64 `json:"startTimestamp,omitempty"`

	// The time scale of time stamps.
	Timescale *int64 `json:"timescale,omitempty"`
}

PresentationTimeRange - The presentation time range, this is asset related and not recommended for Account Filter.

type Preset

type Preset struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

Preset - Base type for all Presets, which define the recipe or instructions on how the input media files should be processed.

func (*Preset) GetPreset

func (p *Preset) GetPreset() *Preset

GetPreset implements the PresetClassification interface for type Preset.

type PresetClassification

type PresetClassification interface {
	// GetPreset returns the Preset content of the underlying type.
	GetPreset() *Preset
}

PresetClassification provides polymorphic access to related types. Call the interface's GetPreset() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AudioAnalyzerPreset, *BuiltInStandardEncoderPreset, *FaceDetectorPreset, *Preset, *StandardEncoderPreset, *VideoAnalyzerPreset

type PresetConfigurations

type PresetConfigurations struct {
	// Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity
	// as Speed for faster encoding but less compression efficiency.
	Complexity *Complexity `json:"complexity,omitempty"`

	// Sets the interleave mode of the output to control how audio and video are stored in the container format. Example: set
	// InterleavedOutput as NonInterleavedOutput to produce audio-only and video-only
	// outputs in separate MP4 files.
	InterleaveOutput *InterleaveOutput `json:"interleaveOutput,omitempty"`

	// The key frame interval in seconds. Example: set KeyFrameIntervalInSeconds as 2 to reduce the playback buffering for some
	// players.
	KeyFrameIntervalInSeconds *float32 `json:"keyFrameIntervalInSeconds,omitempty"`

	// The maximum bitrate in bits per second (threshold for the top video layer). Example: set MaxBitrateBps as 6000000 to avoid
	// producing very high bitrate outputs for contents with high complexity.
	MaxBitrateBps *int32 `json:"maxBitrateBps,omitempty"`

	// The maximum height of output video layers. Example: set MaxHeight as 720 to produce output layers up to 720P even if the
	// input is 4K.
	MaxHeight *int32 `json:"maxHeight,omitempty"`

	// The maximum number of output video layers. Example: set MaxLayers as 4 to make sure at most 4 output layers are produced
	// to control the overall cost of the encoding job.
	MaxLayers *int32 `json:"maxLayers,omitempty"`

	// The minimum bitrate in bits per second (threshold for the bottom video layer). Example: set MinBitrateBps as 200000 to
	// have a bottom layer that covers users with low network bandwidth.
	MinBitrateBps *int32 `json:"minBitrateBps,omitempty"`

	// The minimum height of output video layers. Example: set MinHeight as 360 to avoid output layers of smaller resolutions
	// like 180P.
	MinHeight *int32 `json:"minHeight,omitempty"`
}

PresetConfigurations - An object of optional configuration settings for encoder.

type Priority

type Priority string

Priority - Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for processing TransformOutputs. The default priority is Normal.

const (
	// PriorityHigh - Used for TransformOutputs that should take precedence over others.
	PriorityHigh Priority = "High"
	// PriorityLow - Used for TransformOutputs that can be generated after Normal and High priority TransformOutputs.
	PriorityLow Priority = "Low"
	// PriorityNormal - Used for TransformOutputs that can be generated at Normal priority.
	PriorityNormal Priority = "Normal"
)

func PossiblePriorityValues

func PossiblePriorityValues() []Priority

PossiblePriorityValues returns the possible values for the Priority const type.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; The ARM identifier for Private Endpoint
	ID *string `json:"id,omitempty" azure:"ro"`
}

PrivateEndpoint - The Private Endpoint resource.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Resource properties.
	Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

PrivateEndpointConnection - The Private Endpoint Connection resource.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// Array of private endpoint connections
	Value []*PrivateEndpointConnection `json:"value,omitempty"`
}

PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified storage account

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// REQUIRED; A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`

	// The resource of private end point.
	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`

	// READ-ONLY; The provisioning state of the private endpoint connection resource.
	ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.

type PrivateEndpointConnectionProvisioningState

type PrivateEndpointConnectionProvisioningState string

PrivateEndpointConnectionProvisioningState - The current provisioning state.

const (
	PrivateEndpointConnectionProvisioningStateCreating  PrivateEndpointConnectionProvisioningState = "Creating"
	PrivateEndpointConnectionProvisioningStateDeleting  PrivateEndpointConnectionProvisioningState = "Deleting"
	PrivateEndpointConnectionProvisioningStateFailed    PrivateEndpointConnectionProvisioningState = "Failed"
	PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
)

func PossiblePrivateEndpointConnectionProvisioningStateValues

func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState

PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.

type PrivateEndpointConnectionsClient

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

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*PrivateEndpointConnectionsClient) CreateOrUpdate

CreateOrUpdate - Update private endpoint connection. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. parameters - The request parameters options - PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-put.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewPrivateEndpointConnectionsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"contoso",
		"contososports",
		"connectionName1",
		armmediaservices.PrivateEndpointConnection{
			Properties: &armmediaservices.PrivateEndpointConnectionProperties{
				PrivateLinkServiceConnectionState: &armmediaservices.PrivateLinkServiceConnectionState{
					Description: to.Ptr("Test description."),
					Status:      to.Ptr(armmediaservices.PrivateEndpointServiceConnectionStatusApproved),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*PrivateEndpointConnectionsClient) Delete

Delete - Delete private endpoint connection. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewPrivateEndpointConnectionsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"contoso",
		"contososports",
		"connectionName1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*PrivateEndpointConnectionsClient) Get

Get - Get private endpoint connection. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-get-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewPrivateEndpointConnectionsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contoso",
		"contososports",
		"connectionName1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*PrivateEndpointConnectionsClient) List

List - Get all private endpoint connections. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-list.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewPrivateEndpointConnectionsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		"contoso",
		"contososports",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type PrivateEndpointConnectionsClientCreateOrUpdateOptions added in v0.3.0

type PrivateEndpointConnectionsClientCreateOrUpdateOptions struct {
}

PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate method.

type PrivateEndpointConnectionsClientCreateOrUpdateResponse added in v0.3.0

type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.CreateOrUpdate.

type PrivateEndpointConnectionsClientDeleteOptions added in v0.3.0

type PrivateEndpointConnectionsClientDeleteOptions struct {
}

PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete method.

type PrivateEndpointConnectionsClientDeleteResponse added in v0.3.0

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete.

type PrivateEndpointConnectionsClientGetOptions added in v0.3.0

type PrivateEndpointConnectionsClientGetOptions struct {
}

PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

type PrivateEndpointConnectionsClientGetResponse added in v0.3.0

type PrivateEndpointConnectionsClientGetResponse struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListOptions added in v0.3.0

type PrivateEndpointConnectionsClientListOptions struct {
}

PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List method.

type PrivateEndpointConnectionsClientListResponse added in v0.3.0

type PrivateEndpointConnectionsClientListResponse struct {
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.List.

type PrivateEndpointServiceConnectionStatus

type PrivateEndpointServiceConnectionStatus string

PrivateEndpointServiceConnectionStatus - The private endpoint connection status.

const (
	PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusPending  PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)

func PossiblePrivateEndpointServiceConnectionStatusValues

func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus

PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

PrivateLinkResource - A private link resource

type PrivateLinkResourceListResult

type PrivateLinkResourceListResult struct {
	// Array of private link resources
	Value []*PrivateLinkResource `json:"value,omitempty"`
}

PrivateLinkResourceListResult - A list of private link resources

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// The private link resource Private link DNS zone name.
	RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"`

	// READ-ONLY; The private link resource group id.
	GroupID *string `json:"groupId,omitempty" azure:"ro"`

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"`
}

PrivateLinkResourceProperties - Properties of a private link resource.

func (PrivateLinkResourceProperties) MarshalJSON

func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient

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

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) Get

Get - Get group ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-link-resources-get-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewPrivateLinkResourcesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contoso",
		"contososports",
		"keydelivery",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*PrivateLinkResourcesClient) List

List - Get list of group IDs. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-06-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-link-resources-list.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewPrivateLinkResourcesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		"contoso",
		"contososports",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type PrivateLinkResourcesClientGetOptions added in v0.3.0

type PrivateLinkResourcesClientGetOptions struct {
}

PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.

type PrivateLinkResourcesClientGetResponse added in v0.3.0

type PrivateLinkResourcesClientGetResponse struct {
	PrivateLinkResource
}

PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.

type PrivateLinkResourcesClientListOptions added in v0.3.0

type PrivateLinkResourcesClientListOptions struct {
}

PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method.

type PrivateLinkResourcesClientListResponse added in v0.3.0

type PrivateLinkResourcesClientListResponse struct {
	PrivateLinkResourceListResult
}

PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.List.

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	// A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string `json:"actionsRequired,omitempty"`

	// The reason for approval/rejection of the connection.
	Description *string `json:"description,omitempty"`

	// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
	Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
}

PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.

type Properties

type Properties struct {
	// READ-ONLY; The service specifications.
	ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty" azure:"ro"`
}

Properties - The service specification property.

type ProvisioningState added in v0.4.0

type ProvisioningState string

ProvisioningState - Provisioning state of the asset track.

const (
	// ProvisioningStateFailed - Provisioning state failed.
	ProvisioningStateFailed ProvisioningState = "Failed"
	// ProvisioningStateInProgress - Provisioning state in progress.
	ProvisioningStateInProgress ProvisioningState = "InProgress"
	// ProvisioningStateSucceeded - Provisioning state succeeded.
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues added in v0.4.0

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

type PublicNetworkAccess

type PublicNetworkAccess string

PublicNetworkAccess - Whether or not public network access is allowed for resources under the Media Services account.

const (
	// PublicNetworkAccessDisabled - Public network access is disabled.
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	// PublicNetworkAccessEnabled - Public network access is enabled.
	PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled"
)

func PossiblePublicNetworkAccessValues

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

type Rectangle

type Rectangle struct {
	// The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of
	// the video (For example, 50%).
	Height *string `json:"height,omitempty"`

	// The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video
	// (For example, 50%).
	Left *string `json:"left,omitempty"`

	// The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video
	// (For example, 50%).
	Top *string `json:"top,omitempty"`

	// The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the
	// video (For example, 50%).
	Width *string `json:"width,omitempty"`
}

Rectangle - Describes the properties of a rectangular window applied to the input media before processing it.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

type ResourceIdentity

type ResourceIdentity struct {
	// REQUIRED; Indicates whether to use System Assigned Managed Identity. Mutual exclusive with User Assigned Managed Identity.
	UseSystemAssignedIdentity *bool `json:"useSystemAssignedIdentity,omitempty"`

	// The user assigned managed identity's ARM ID to use when accessing a resource.
	UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"`
}

type Rotation

type Rotation string

Rotation - The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto

const (
	// RotationAuto - Automatically detect and rotate as needed.
	RotationAuto Rotation = "Auto"
	// RotationNone - Do not rotate the video. If the output format supports it, any metadata about rotation is kept intact.
	RotationNone Rotation = "None"
	// RotationRotate0 - Do not rotate the video but remove any metadata about the rotation.
	RotationRotate0 Rotation = "Rotate0"
	// RotationRotate180 - Rotate 180 degrees clockwise.
	RotationRotate180 Rotation = "Rotate180"
	// RotationRotate270 - Rotate 270 degrees clockwise.
	RotationRotate270 Rotation = "Rotate270"
	// RotationRotate90 - Rotate 90 degrees clockwise.
	RotationRotate90 Rotation = "Rotate90"
)

func PossibleRotationValues

func PossibleRotationValues() []Rotation

PossibleRotationValues returns the possible values for the Rotation const type.

type SelectAudioTrackByAttribute

type SelectAudioTrackByAttribute struct {
	// REQUIRED; The TrackAttribute to filter the tracks by.
	Attribute *TrackAttribute `json:"attribute,omitempty"`

	// REQUIRED; The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks.
	Filter *AttributeFilter `json:"filter,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio
	// tracks.
	ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"`

	// The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property.
	FilterValue *string `json:"filterValue,omitempty"`
}

SelectAudioTrackByAttribute - Select audio tracks from the input by specifying an attribute and an attribute filter.

func (*SelectAudioTrackByAttribute) GetAudioTrackDescriptor added in v0.3.0

func (s *SelectAudioTrackByAttribute) GetAudioTrackDescriptor() *AudioTrackDescriptor

GetAudioTrackDescriptor implements the AudioTrackDescriptorClassification interface for type SelectAudioTrackByAttribute.

func (*SelectAudioTrackByAttribute) GetTrackDescriptor added in v0.3.0

func (s *SelectAudioTrackByAttribute) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type SelectAudioTrackByAttribute.

func (SelectAudioTrackByAttribute) MarshalJSON

func (s SelectAudioTrackByAttribute) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SelectAudioTrackByAttribute.

func (*SelectAudioTrackByAttribute) UnmarshalJSON

func (s *SelectAudioTrackByAttribute) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SelectAudioTrackByAttribute.

type SelectAudioTrackByID

type SelectAudioTrackByID struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// REQUIRED; Track identifier to select
	TrackID *int64 `json:"trackId,omitempty"`

	// Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio
	// tracks.
	ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"`
}

SelectAudioTrackByID - Select audio tracks from the input by specifying a track identifier.

func (*SelectAudioTrackByID) GetAudioTrackDescriptor added in v0.3.0

func (s *SelectAudioTrackByID) GetAudioTrackDescriptor() *AudioTrackDescriptor

GetAudioTrackDescriptor implements the AudioTrackDescriptorClassification interface for type SelectAudioTrackByID.

func (*SelectAudioTrackByID) GetTrackDescriptor added in v0.3.0

func (s *SelectAudioTrackByID) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type SelectAudioTrackByID.

func (SelectAudioTrackByID) MarshalJSON

func (s SelectAudioTrackByID) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SelectAudioTrackByID.

func (*SelectAudioTrackByID) UnmarshalJSON

func (s *SelectAudioTrackByID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SelectAudioTrackByID.

type SelectVideoTrackByAttribute

type SelectVideoTrackByAttribute struct {
	// REQUIRED; The TrackAttribute to filter the tracks by.
	Attribute *TrackAttribute `json:"attribute,omitempty"`

	// REQUIRED; The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks.
	Filter *AttributeFilter `json:"filter,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is specified for the Filter property. For
	// TrackAttribute.Bitrate, this should be an integer value in bits per second (e.g:
	// '1500000'). The TrackAttribute.Language is not supported for video tracks.
	FilterValue *string `json:"filterValue,omitempty"`
}

SelectVideoTrackByAttribute - Select video tracks from the input by specifying an attribute and an attribute filter.

func (*SelectVideoTrackByAttribute) GetTrackDescriptor added in v0.3.0

func (s *SelectVideoTrackByAttribute) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type SelectVideoTrackByAttribute.

func (*SelectVideoTrackByAttribute) GetVideoTrackDescriptor added in v0.3.0

func (s *SelectVideoTrackByAttribute) GetVideoTrackDescriptor() *VideoTrackDescriptor

GetVideoTrackDescriptor implements the VideoTrackDescriptorClassification interface for type SelectVideoTrackByAttribute.

func (SelectVideoTrackByAttribute) MarshalJSON

func (s SelectVideoTrackByAttribute) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SelectVideoTrackByAttribute.

func (*SelectVideoTrackByAttribute) UnmarshalJSON

func (s *SelectVideoTrackByAttribute) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SelectVideoTrackByAttribute.

type SelectVideoTrackByID

type SelectVideoTrackByID struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// REQUIRED; Track identifier to select
	TrackID *int64 `json:"trackId,omitempty"`
}

SelectVideoTrackByID - Select video tracks from the input by specifying a track identifier.

func (*SelectVideoTrackByID) GetTrackDescriptor added in v0.3.0

func (s *SelectVideoTrackByID) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type SelectVideoTrackByID.

func (*SelectVideoTrackByID) GetVideoTrackDescriptor added in v0.3.0

func (s *SelectVideoTrackByID) GetVideoTrackDescriptor() *VideoTrackDescriptor

GetVideoTrackDescriptor implements the VideoTrackDescriptorClassification interface for type SelectVideoTrackByID.

func (SelectVideoTrackByID) MarshalJSON

func (s SelectVideoTrackByID) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SelectVideoTrackByID.

func (*SelectVideoTrackByID) UnmarshalJSON

func (s *SelectVideoTrackByID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SelectVideoTrackByID.

type ServiceSpecification

type ServiceSpecification struct {
	// READ-ONLY; List of log specifications.
	LogSpecifications []*LogSpecification `json:"logSpecifications,omitempty" azure:"ro"`

	// READ-ONLY; List of metric specifications.
	MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty" azure:"ro"`
}

ServiceSpecification - The service metric specifications.

type StandardEncoderPreset

type StandardEncoderPreset struct {
	// REQUIRED; The list of codecs to be used when encoding the input video.
	Codecs []CodecClassification `json:"codecs,omitempty"`

	// REQUIRED; The list of outputs to be produced by the encoder.
	Formats []FormatClassification `json:"formats,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// One or more filtering operations that are applied to the input media before encoding.
	Filters *Filters `json:"filters,omitempty"`
}

StandardEncoderPreset - Describes all the settings to be used when encoding the input video with the Standard Encoder.

func (*StandardEncoderPreset) GetPreset added in v0.3.0

func (s *StandardEncoderPreset) GetPreset() *Preset

GetPreset implements the PresetClassification interface for type StandardEncoderPreset.

func (StandardEncoderPreset) MarshalJSON

func (s StandardEncoderPreset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StandardEncoderPreset.

func (*StandardEncoderPreset) UnmarshalJSON

func (s *StandardEncoderPreset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StandardEncoderPreset.

type StorageAccount

type StorageAccount struct {
	// REQUIRED; The type of the storage account.
	Type *StorageAccountType `json:"type,omitempty"`

	// The ID of the storage account resource. Media Services relies on tables and queues as well as blobs, so the primary storage
	// account must be a Standard Storage account (either Microsoft.ClassicStorage
	// or Microsoft.Storage). Blob only storage accounts can be added as secondary storage accounts.
	ID *string `json:"id,omitempty"`

	// The storage account identity.
	Identity *ResourceIdentity `json:"identity,omitempty"`

	// READ-ONLY; The current status of the storage account mapping.
	Status *string `json:"status,omitempty" azure:"ro"`
}

StorageAccount - The storage account details.

type StorageAccountType

type StorageAccountType string

StorageAccountType - The type of the storage account.

const (
	// StorageAccountTypePrimary - The primary storage account for the Media Services account.
	StorageAccountTypePrimary StorageAccountType = "Primary"
	// StorageAccountTypeSecondary - A secondary storage account for the Media Services account.
	StorageAccountTypeSecondary StorageAccountType = "Secondary"
)

func PossibleStorageAccountTypeValues

func PossibleStorageAccountTypeValues() []StorageAccountType

PossibleStorageAccountTypeValues returns the possible values for the StorageAccountType const type.

type StorageAuthentication

type StorageAuthentication string
const (
	// StorageAuthenticationManagedIdentity - Managed Identity authentication.
	StorageAuthenticationManagedIdentity StorageAuthentication = "ManagedIdentity"
	// StorageAuthenticationSystem - System authentication.
	StorageAuthenticationSystem StorageAuthentication = "System"
)

func PossibleStorageAuthenticationValues

func PossibleStorageAuthenticationValues() []StorageAuthentication

PossibleStorageAuthenticationValues returns the possible values for the StorageAuthentication const type.

type StorageEncryptedAssetDecryptionData

type StorageEncryptedAssetDecryptionData struct {
	// Asset File encryption metadata.
	AssetFileEncryptionMetadata []*AssetFileEncryptionMetadata `json:"assetFileEncryptionMetadata,omitempty"`

	// The Asset File storage encryption key.
	Key []byte `json:"key,omitempty"`
}

StorageEncryptedAssetDecryptionData - Data needed to decrypt asset files encrypted with legacy storage encryption.

func (*StorageEncryptedAssetDecryptionData) UnmarshalJSON

func (s *StorageEncryptedAssetDecryptionData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StorageEncryptedAssetDecryptionData.

type StreamOptionsFlag

type StreamOptionsFlag string
const (
	// StreamOptionsFlagDefault - Live streaming with no special latency optimizations.
	StreamOptionsFlagDefault StreamOptionsFlag = "Default"
	// StreamOptionsFlagLowLatency - The live event provides lower end to end latency by reducing its internal buffers.
	StreamOptionsFlagLowLatency StreamOptionsFlag = "LowLatency"
	// StreamOptionsFlagLowLatencyV2 - The live event is optimized for end to end latency. This option is only available for encoding
	// live events with RTMP input. The outputs can be streamed using HLS or DASH formats. The outputs' archive or DVR rewind
	// length is limited to 6 hours. Use "LowLatency" stream option for all other scenarios.
	StreamOptionsFlagLowLatencyV2 StreamOptionsFlag = "LowLatencyV2"
)

func PossibleStreamOptionsFlagValues

func PossibleStreamOptionsFlagValues() []StreamOptionsFlag

PossibleStreamOptionsFlagValues returns the possible values for the StreamOptionsFlag const type.

type StreamingEndpoint

type StreamingEndpoint struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// The streaming endpoint properties.
	Properties *StreamingEndpointProperties `json:"properties,omitempty"`

	// The streaming endpoint sku.
	SKU *ArmStreamingEndpointCurrentSKU `json:"sku,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

StreamingEndpoint - The streaming endpoint.

func (StreamingEndpoint) MarshalJSON

func (s StreamingEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingEndpoint.

type StreamingEndpointAccessControl

type StreamingEndpointAccessControl struct {
	// The access control of Akamai
	Akamai *AkamaiAccessControl `json:"akamai,omitempty"`

	// The IP access control of the streaming endpoint.
	IP *IPAccessControl `json:"ip,omitempty"`
}

StreamingEndpointAccessControl - Streaming endpoint access control definition.

type StreamingEndpointListResult

type StreamingEndpointListResult struct {
	// The number of result.
	ODataCount *int32 `json:"@odata.count,omitempty"`

	// The link to the next set of results. Not empty if value contains incomplete list of streaming endpoints.
	ODataNextLink *string `json:"@odata.nextLink,omitempty"`

	// The result of the List StreamingEndpoint operation.
	Value []*StreamingEndpoint `json:"value,omitempty"`
}

StreamingEndpointListResult - The streaming endpoint list result.

type StreamingEndpointProperties

type StreamingEndpointProperties struct {
	// REQUIRED; The number of scale units. Use the Scale operation to adjust this value.
	ScaleUnits *int32 `json:"scaleUnits,omitempty"`

	// The access control definition of the streaming endpoint.
	AccessControl *StreamingEndpointAccessControl `json:"accessControl,omitempty"`

	// This feature is deprecated, do not set a value for this property.
	AvailabilitySetName *string `json:"availabilitySetName,omitempty"`

	// The CDN enabled flag.
	CdnEnabled *bool `json:"cdnEnabled,omitempty"`

	// The CDN profile name.
	CdnProfile *string `json:"cdnProfile,omitempty"`

	// The CDN provider name.
	CdnProvider *string `json:"cdnProvider,omitempty"`

	// The streaming endpoint access policies.
	CrossSiteAccessPolicies *CrossSiteAccessPolicies `json:"crossSiteAccessPolicies,omitempty"`

	// The custom host names of the streaming endpoint
	CustomHostNames []*string `json:"customHostNames,omitempty"`

	// The streaming endpoint description.
	Description *string `json:"description,omitempty"`

	// Max cache age
	MaxCacheAge *int64 `json:"maxCacheAge,omitempty"`

	// READ-ONLY; The exact time the streaming endpoint was created.
	Created *time.Time `json:"created,omitempty" azure:"ro"`

	// READ-ONLY; The free trial expiration time.
	FreeTrialEndTime *time.Time `json:"freeTrialEndTime,omitempty" azure:"ro"`

	// READ-ONLY; The streaming endpoint host name.
	HostName *string `json:"hostName,omitempty" azure:"ro"`

	// READ-ONLY; The exact time the streaming endpoint was last modified.
	LastModified *time.Time `json:"lastModified,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state of the streaming endpoint.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The resource state of the streaming endpoint.
	ResourceState *StreamingEndpointResourceState `json:"resourceState,omitempty" azure:"ro"`
}

StreamingEndpointProperties - The streaming endpoint properties.

func (StreamingEndpointProperties) MarshalJSON

func (s StreamingEndpointProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingEndpointProperties.

func (*StreamingEndpointProperties) UnmarshalJSON

func (s *StreamingEndpointProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingEndpointProperties.

type StreamingEndpointResourceState

type StreamingEndpointResourceState string

StreamingEndpointResourceState - The resource state of the streaming endpoint.

const (
	// StreamingEndpointResourceStateDeleting - The streaming endpoint is being deleted.
	StreamingEndpointResourceStateDeleting StreamingEndpointResourceState = "Deleting"
	// StreamingEndpointResourceStateRunning - The streaming endpoint is running. It is able to stream content to clients
	StreamingEndpointResourceStateRunning StreamingEndpointResourceState = "Running"
	// StreamingEndpointResourceStateScaling - The streaming endpoint is increasing or decreasing scale units.
	StreamingEndpointResourceStateScaling StreamingEndpointResourceState = "Scaling"
	// StreamingEndpointResourceStateStarting - The streaming endpoint is transitioning to the running state.
	StreamingEndpointResourceStateStarting StreamingEndpointResourceState = "Starting"
	// StreamingEndpointResourceStateStopped - The initial state of a streaming endpoint after creation. Content is not ready
	// to be streamed from this endpoint.
	StreamingEndpointResourceStateStopped StreamingEndpointResourceState = "Stopped"
	// StreamingEndpointResourceStateStopping - The streaming endpoint is transitioning to the stopped state.
	StreamingEndpointResourceStateStopping StreamingEndpointResourceState = "Stopping"
)

func PossibleStreamingEndpointResourceStateValues

func PossibleStreamingEndpointResourceStateValues() []StreamingEndpointResourceState

PossibleStreamingEndpointResourceStateValues returns the possible values for the StreamingEndpointResourceState const type.

type StreamingEndpointSKUInfoListResult added in v0.4.0

type StreamingEndpointSKUInfoListResult struct {
	// The result of the List StreamingEndpoint skus.
	Value []*ArmStreamingEndpointSKUInfo `json:"value,omitempty"`
}

type StreamingEndpointsClient

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

StreamingEndpointsClient contains the methods for the StreamingEndpoints group. Don't use this type directly, use NewStreamingEndpointsClient() instead.

func NewStreamingEndpointsClient

func NewStreamingEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StreamingEndpointsClient, error)

NewStreamingEndpointsClient creates a new instance of StreamingEndpointsClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*StreamingEndpointsClient) BeginCreate

func (client *StreamingEndpointsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, parameters StreamingEndpoint, options *StreamingEndpointsClientBeginCreateOptions) (*runtime.Poller[StreamingEndpointsClientCreateResponse], error)

BeginCreate - Creates a streaming endpoint. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingEndpointName - The name of the streaming endpoint, maximum length is 24. parameters - Streaming endpoint properties needed for creation. options - StreamingEndpointsClientBeginCreateOptions contains the optional parameters for the StreamingEndpointsClient.BeginCreate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streamingendpoint-create.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingEndpointsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx,
		"mediaresources",
		"slitestmedia10",
		"myStreamingEndpoint1",
		armmediaservices.StreamingEndpoint{
			Location: to.Ptr("West US"),
			Tags: map[string]*string{
				"tag1": to.Ptr("value1"),
				"tag2": to.Ptr("value2"),
			},
			Properties: &armmediaservices.StreamingEndpointProperties{
				Description: to.Ptr("test event 1"),
				AccessControl: &armmediaservices.StreamingEndpointAccessControl{
					Akamai: &armmediaservices.AkamaiAccessControl{
						AkamaiSignatureHeaderAuthenticationKeyList: []*armmediaservices.AkamaiSignatureHeaderAuthenticationKey{
							{
								Base64Key:  to.Ptr("dGVzdGlkMQ=="),
								Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2029-12-31T16:00:00-08:00"); return t }()),
								Identifier: to.Ptr("id1"),
							},
							{
								Base64Key:  to.Ptr("dGVzdGlkMQ=="),
								Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2030-12-31T16:00:00-08:00"); return t }()),
								Identifier: to.Ptr("id2"),
							}},
					},
					IP: &armmediaservices.IPAccessControl{
						Allow: []*armmediaservices.IPRange{
							{
								Name:    to.Ptr("AllowedIp"),
								Address: to.Ptr("192.168.1.1"),
							}},
					},
				},
				AvailabilitySetName: to.Ptr("availableset"),
				CdnEnabled:          to.Ptr(false),
				ScaleUnits:          to.Ptr[int32](1),
			},
		},
		&armmediaservices.StreamingEndpointsClientBeginCreateOptions{AutoStart: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*StreamingEndpointsClient) BeginDelete

func (client *StreamingEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, options *StreamingEndpointsClientBeginDeleteOptions) (*runtime.Poller[StreamingEndpointsClientDeleteResponse], error)

BeginDelete - Deletes a streaming endpoint. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingEndpointName - The name of the streaming endpoint, maximum length is 24. options - StreamingEndpointsClientBeginDeleteOptions contains the optional parameters for the StreamingEndpointsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streamingendpoint-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingEndpointsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"mediaresources",
		"slitestmedia10",
		"myStreamingEndpoint1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*StreamingEndpointsClient) BeginScale

func (client *StreamingEndpointsClient) BeginScale(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, parameters StreamingEntityScaleUnit, options *StreamingEndpointsClientBeginScaleOptions) (*runtime.Poller[StreamingEndpointsClientScaleResponse], error)

BeginScale - Scales an existing streaming endpoint. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingEndpointName - The name of the streaming endpoint, maximum length is 24. parameters - Streaming endpoint scale parameters options - StreamingEndpointsClientBeginScaleOptions contains the optional parameters for the StreamingEndpointsClient.BeginScale method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streamingendpoint-scale.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingEndpointsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginScale(ctx,
		"mediaresources",
		"slitestmedia10",
		"myStreamingEndpoint1",
		armmediaservices.StreamingEntityScaleUnit{
			ScaleUnit: to.Ptr[int32](5),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*StreamingEndpointsClient) BeginStart

func (client *StreamingEndpointsClient) BeginStart(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, options *StreamingEndpointsClientBeginStartOptions) (*runtime.Poller[StreamingEndpointsClientStartResponse], error)

BeginStart - Starts an existing streaming endpoint. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingEndpointName - The name of the streaming endpoint, maximum length is 24. options - StreamingEndpointsClientBeginStartOptions contains the optional parameters for the StreamingEndpointsClient.BeginStart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streamingendpoint-start.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingEndpointsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStart(ctx,
		"mediaresources",
		"slitestmedia10",
		"myStreamingEndpoint1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*StreamingEndpointsClient) BeginStop

func (client *StreamingEndpointsClient) BeginStop(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, options *StreamingEndpointsClientBeginStopOptions) (*runtime.Poller[StreamingEndpointsClientStopResponse], error)

BeginStop - Stops an existing streaming endpoint. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingEndpointName - The name of the streaming endpoint, maximum length is 24. options - StreamingEndpointsClientBeginStopOptions contains the optional parameters for the StreamingEndpointsClient.BeginStop method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streamingendpoint-stop.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingEndpointsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStop(ctx,
		"mediaresources",
		"slitestmedia10",
		"myStreamingEndpoint1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*StreamingEndpointsClient) BeginUpdate

func (client *StreamingEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, parameters StreamingEndpoint, options *StreamingEndpointsClientBeginUpdateOptions) (*runtime.Poller[StreamingEndpointsClientUpdateResponse], error)

BeginUpdate - Updates a existing streaming endpoint. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingEndpointName - The name of the streaming endpoint, maximum length is 24. parameters - Streaming endpoint properties needed for creation. options - StreamingEndpointsClientBeginUpdateOptions contains the optional parameters for the StreamingEndpointsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streamingendpoint-update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingEndpointsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"mediaresources",
		"slitestmedia10",
		"myStreamingEndpoint1",
		armmediaservices.StreamingEndpoint{
			Location: to.Ptr("West US"),
			Tags: map[string]*string{
				"tag3": to.Ptr("value3"),
				"tag5": to.Ptr("value5"),
			},
			Properties: &armmediaservices.StreamingEndpointProperties{
				Description:         to.Ptr("test event 2"),
				AvailabilitySetName: to.Ptr("availableset"),
				ScaleUnits:          to.Ptr[int32](5),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*StreamingEndpointsClient) Get

func (client *StreamingEndpointsClient) Get(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, options *StreamingEndpointsClientGetOptions) (StreamingEndpointsClientGetResponse, error)

Get - Gets a streaming endpoint. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingEndpointName - The name of the streaming endpoint, maximum length is 24. options - StreamingEndpointsClientGetOptions contains the optional parameters for the StreamingEndpointsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streamingendpoint-list-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingEndpointsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"mediaresources",
		"slitestmedia10",
		"myStreamingEndpoint1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*StreamingEndpointsClient) NewListPager added in v0.6.0

func (client *StreamingEndpointsClient) NewListPager(resourceGroupName string, accountName string, options *StreamingEndpointsClientListOptions) *runtime.Pager[StreamingEndpointsClientListResponse]

NewListPager - Lists the streaming endpoints in the account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - StreamingEndpointsClientListOptions contains the optional parameters for the StreamingEndpointsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streamingendpoint-list-all.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingEndpointsClient("0a6ec948-5a62-437d-b9df-934dc7c1b722", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("mediaresources",
		"slitestmedia10",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*StreamingEndpointsClient) SKUs added in v0.4.0

func (client *StreamingEndpointsClient) SKUs(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, options *StreamingEndpointsClientSKUsOptions) (StreamingEndpointsClientSKUsResponse, error)

SKUs - List streaming endpoint supported skus. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingEndpointName - The name of the streaming endpoint, maximum length is 24. options - StreamingEndpointsClientSKUsOptions contains the optional parameters for the StreamingEndpointsClient.SKUs method.

type StreamingEndpointsClientBeginCreateOptions added in v0.3.0

type StreamingEndpointsClientBeginCreateOptions struct {
	// The flag indicates if the resource should be automatically started on creation.
	AutoStart *bool
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StreamingEndpointsClientBeginCreateOptions contains the optional parameters for the StreamingEndpointsClient.BeginCreate method.

type StreamingEndpointsClientBeginDeleteOptions added in v0.3.0

type StreamingEndpointsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StreamingEndpointsClientBeginDeleteOptions contains the optional parameters for the StreamingEndpointsClient.BeginDelete method.

type StreamingEndpointsClientBeginScaleOptions added in v0.3.0

type StreamingEndpointsClientBeginScaleOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StreamingEndpointsClientBeginScaleOptions contains the optional parameters for the StreamingEndpointsClient.BeginScale method.

type StreamingEndpointsClientBeginStartOptions added in v0.3.0

type StreamingEndpointsClientBeginStartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StreamingEndpointsClientBeginStartOptions contains the optional parameters for the StreamingEndpointsClient.BeginStart method.

type StreamingEndpointsClientBeginStopOptions added in v0.3.0

type StreamingEndpointsClientBeginStopOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StreamingEndpointsClientBeginStopOptions contains the optional parameters for the StreamingEndpointsClient.BeginStop method.

type StreamingEndpointsClientBeginUpdateOptions added in v0.3.0

type StreamingEndpointsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StreamingEndpointsClientBeginUpdateOptions contains the optional parameters for the StreamingEndpointsClient.BeginUpdate method.

type StreamingEndpointsClientCreateResponse added in v0.3.0

type StreamingEndpointsClientCreateResponse struct {
	StreamingEndpoint
}

StreamingEndpointsClientCreateResponse contains the response from method StreamingEndpointsClient.Create.

type StreamingEndpointsClientDeleteResponse added in v0.3.0

type StreamingEndpointsClientDeleteResponse struct {
}

StreamingEndpointsClientDeleteResponse contains the response from method StreamingEndpointsClient.Delete.

type StreamingEndpointsClientGetOptions added in v0.3.0

type StreamingEndpointsClientGetOptions struct {
}

StreamingEndpointsClientGetOptions contains the optional parameters for the StreamingEndpointsClient.Get method.

type StreamingEndpointsClientGetResponse added in v0.3.0

type StreamingEndpointsClientGetResponse struct {
	StreamingEndpoint
}

StreamingEndpointsClientGetResponse contains the response from method StreamingEndpointsClient.Get.

type StreamingEndpointsClientListOptions added in v0.3.0

type StreamingEndpointsClientListOptions struct {
}

StreamingEndpointsClientListOptions contains the optional parameters for the StreamingEndpointsClient.List method.

type StreamingEndpointsClientListResponse added in v0.3.0

type StreamingEndpointsClientListResponse struct {
	StreamingEndpointListResult
}

StreamingEndpointsClientListResponse contains the response from method StreamingEndpointsClient.List.

type StreamingEndpointsClientSKUsOptions added in v0.4.0

type StreamingEndpointsClientSKUsOptions struct {
}

StreamingEndpointsClientSKUsOptions contains the optional parameters for the StreamingEndpointsClient.SKUs method.

type StreamingEndpointsClientSKUsResponse added in v0.4.0

type StreamingEndpointsClientSKUsResponse struct {
	StreamingEndpointSKUInfoListResult
}

StreamingEndpointsClientSKUsResponse contains the response from method StreamingEndpointsClient.SKUs.

type StreamingEndpointsClientScaleResponse added in v0.3.0

type StreamingEndpointsClientScaleResponse struct {
}

StreamingEndpointsClientScaleResponse contains the response from method StreamingEndpointsClient.Scale.

type StreamingEndpointsClientStartResponse added in v0.3.0

type StreamingEndpointsClientStartResponse struct {
}

StreamingEndpointsClientStartResponse contains the response from method StreamingEndpointsClient.Start.

type StreamingEndpointsClientStopResponse added in v0.3.0

type StreamingEndpointsClientStopResponse struct {
}

StreamingEndpointsClientStopResponse contains the response from method StreamingEndpointsClient.Stop.

type StreamingEndpointsClientUpdateResponse added in v0.3.0

type StreamingEndpointsClientUpdateResponse struct {
	StreamingEndpoint
}

StreamingEndpointsClientUpdateResponse contains the response from method StreamingEndpointsClient.Update.

type StreamingEntityScaleUnit

type StreamingEntityScaleUnit struct {
	// The scale unit number of the streaming endpoint.
	ScaleUnit *int32 `json:"scaleUnit,omitempty"`
}

StreamingEntityScaleUnit - scale units definition

type StreamingLocator

type StreamingLocator struct {
	// Properties of the Streaming Locator.
	Properties *StreamingLocatorProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

StreamingLocator - A Streaming Locator resource

type StreamingLocatorCollection

type StreamingLocatorCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string `json:"@odata.nextLink,omitempty"`

	// A collection of StreamingLocator items.
	Value []*StreamingLocator `json:"value,omitempty"`
}

StreamingLocatorCollection - A collection of StreamingLocator items.

type StreamingLocatorContentKey

type StreamingLocatorContentKey struct {
	// REQUIRED; ID of Content Key
	ID *string `json:"id,omitempty"`

	// Label of Content Key as specified in the Streaming Policy
	LabelReferenceInStreamingPolicy *string `json:"labelReferenceInStreamingPolicy,omitempty"`

	// Value of Content Key
	Value *string `json:"value,omitempty"`

	// READ-ONLY; ContentKeyPolicy used by Content Key
	PolicyName *string `json:"policyName,omitempty" azure:"ro"`

	// READ-ONLY; Tracks which use this Content Key
	Tracks []*TrackSelection `json:"tracks,omitempty" azure:"ro"`

	// READ-ONLY; Encryption type of Content Key
	Type *StreamingLocatorContentKeyType `json:"type,omitempty" azure:"ro"`
}

StreamingLocatorContentKey - Class for content key in Streaming Locator

func (StreamingLocatorContentKey) MarshalJSON

func (s StreamingLocatorContentKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingLocatorContentKey.

type StreamingLocatorContentKeyType

type StreamingLocatorContentKeyType string

StreamingLocatorContentKeyType - Encryption type of Content Key

const (
	// StreamingLocatorContentKeyTypeCommonEncryptionCbcs - Common Encryption using CBCS
	StreamingLocatorContentKeyTypeCommonEncryptionCbcs StreamingLocatorContentKeyType = "CommonEncryptionCbcs"
	// StreamingLocatorContentKeyTypeCommonEncryptionCenc - Common Encryption using CENC
	StreamingLocatorContentKeyTypeCommonEncryptionCenc StreamingLocatorContentKeyType = "CommonEncryptionCenc"
	// StreamingLocatorContentKeyTypeEnvelopeEncryption - Envelope Encryption
	StreamingLocatorContentKeyTypeEnvelopeEncryption StreamingLocatorContentKeyType = "EnvelopeEncryption"
)

func PossibleStreamingLocatorContentKeyTypeValues

func PossibleStreamingLocatorContentKeyTypeValues() []StreamingLocatorContentKeyType

PossibleStreamingLocatorContentKeyTypeValues returns the possible values for the StreamingLocatorContentKeyType const type.

type StreamingLocatorProperties

type StreamingLocatorProperties struct {
	// REQUIRED; Asset Name
	AssetName *string `json:"assetName,omitempty"`

	// REQUIRED; Name of the Streaming Policy used by this Streaming Locator. Either specify the name of Streaming Policy you
	// created or use one of the predefined Streaming Policies. The predefined Streaming Policies
	// available are: 'PredefinedDownloadOnly', 'PredefinedClearStreamingOnly', 'PredefinedDownloadAndClearStreaming', 'PredefinedClearKey',
	// 'PredefinedMultiDrmCencStreaming' and 'Predefined
	// MultiDrmStreaming'
	StreamingPolicyName *string `json:"streamingPolicyName,omitempty"`

	// Alternative Media ID of this Streaming Locator
	AlternativeMediaID *string `json:"alternativeMediaId,omitempty"`

	// The ContentKeys used by this Streaming Locator.
	ContentKeys []*StreamingLocatorContentKey `json:"contentKeys,omitempty"`

	// Name of the default ContentKeyPolicy used by this Streaming Locator.
	DefaultContentKeyPolicyName *string `json:"defaultContentKeyPolicyName,omitempty"`

	// The end time of the Streaming Locator.
	EndTime *time.Time `json:"endTime,omitempty"`

	// A list of asset or account filters which apply to this streaming locator
	Filters []*string `json:"filters,omitempty"`

	// The start time of the Streaming Locator.
	StartTime *time.Time `json:"startTime,omitempty"`

	// The StreamingLocatorId of the Streaming Locator.
	StreamingLocatorID *string `json:"streamingLocatorId,omitempty"`

	// READ-ONLY; The creation time of the Streaming Locator.
	Created *time.Time `json:"created,omitempty" azure:"ro"`
}

StreamingLocatorProperties - Properties of the Streaming Locator.

func (StreamingLocatorProperties) MarshalJSON

func (s StreamingLocatorProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingLocatorProperties.

func (*StreamingLocatorProperties) UnmarshalJSON

func (s *StreamingLocatorProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingLocatorProperties.

type StreamingLocatorsClient

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

StreamingLocatorsClient contains the methods for the StreamingLocators group. Don't use this type directly, use NewStreamingLocatorsClient() instead.

func NewStreamingLocatorsClient

func NewStreamingLocatorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StreamingLocatorsClient, error)

NewStreamingLocatorsClient creates a new instance of StreamingLocatorsClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*StreamingLocatorsClient) Create

func (client *StreamingLocatorsClient) Create(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string, parameters StreamingLocator, options *StreamingLocatorsClientCreateOptions) (StreamingLocatorsClientCreateResponse, error)

Create - Create a Streaming Locator in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingLocatorName - The Streaming Locator name. parameters - The request parameters options - StreamingLocatorsClientCreateOptions contains the optional parameters for the StreamingLocatorsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streaming-locators-create-clear.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingLocatorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Create(ctx,
		"contoso",
		"contosomedia",
		"UserCreatedClearStreamingLocator",
		armmediaservices.StreamingLocator{
			Properties: &armmediaservices.StreamingLocatorProperties{
				AssetName:           to.Ptr("ClimbingMountRainier"),
				StreamingPolicyName: to.Ptr("clearStreamingPolicy"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*StreamingLocatorsClient) Delete

func (client *StreamingLocatorsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string, options *StreamingLocatorsClientDeleteOptions) (StreamingLocatorsClientDeleteResponse, error)

Delete - Deletes a Streaming Locator in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingLocatorName - The Streaming Locator name. options - StreamingLocatorsClientDeleteOptions contains the optional parameters for the StreamingLocatorsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streaming-locators-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingLocatorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"contoso",
		"contosomedia",
		"clearStreamingLocator",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*StreamingLocatorsClient) Get

func (client *StreamingLocatorsClient) Get(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string, options *StreamingLocatorsClientGetOptions) (StreamingLocatorsClientGetResponse, error)

Get - Get the details of a Streaming Locator in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingLocatorName - The Streaming Locator name. options - StreamingLocatorsClientGetOptions contains the optional parameters for the StreamingLocatorsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streaming-locators-get-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingLocatorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contoso",
		"contosomedia",
		"clearStreamingLocator",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*StreamingLocatorsClient) ListContentKeys

func (client *StreamingLocatorsClient) ListContentKeys(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string, options *StreamingLocatorsClientListContentKeysOptions) (StreamingLocatorsClientListContentKeysResponse, error)

ListContentKeys - List Content Keys used by this Streaming Locator If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingLocatorName - The Streaming Locator name. options - StreamingLocatorsClientListContentKeysOptions contains the optional parameters for the StreamingLocatorsClient.ListContentKeys method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streaming-locators-list-content-keys.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingLocatorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListContentKeys(ctx,
		"contoso",
		"contosomedia",
		"secureStreamingLocator",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*StreamingLocatorsClient) ListPaths

func (client *StreamingLocatorsClient) ListPaths(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string, options *StreamingLocatorsClientListPathsOptions) (StreamingLocatorsClientListPathsResponse, error)

ListPaths - List Paths supported by this Streaming Locator If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingLocatorName - The Streaming Locator name. options - StreamingLocatorsClientListPathsOptions contains the optional parameters for the StreamingLocatorsClient.ListPaths method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streaming-locators-list-paths-streaming-and-download.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingLocatorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListPaths(ctx,
		"contoso",
		"contosomedia",
		"clearStreamingLocator",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*StreamingLocatorsClient) NewListPager added in v0.6.0

func (client *StreamingLocatorsClient) NewListPager(resourceGroupName string, accountName string, options *StreamingLocatorsClientListOptions) *runtime.Pager[StreamingLocatorsClientListResponse]

NewListPager - Lists the Streaming Locators in the account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - StreamingLocatorsClientListOptions contains the optional parameters for the StreamingLocatorsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streaming-locators-list.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingLocatorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("contoso",
		"contosomedia",
		&armmediaservices.StreamingLocatorsClientListOptions{Filter: nil,
			Top:     nil,
			Orderby: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type StreamingLocatorsClientCreateOptions added in v0.3.0

type StreamingLocatorsClientCreateOptions struct {
}

StreamingLocatorsClientCreateOptions contains the optional parameters for the StreamingLocatorsClient.Create method.

type StreamingLocatorsClientCreateResponse added in v0.3.0

type StreamingLocatorsClientCreateResponse struct {
	StreamingLocator
}

StreamingLocatorsClientCreateResponse contains the response from method StreamingLocatorsClient.Create.

type StreamingLocatorsClientDeleteOptions added in v0.3.0

type StreamingLocatorsClientDeleteOptions struct {
}

StreamingLocatorsClientDeleteOptions contains the optional parameters for the StreamingLocatorsClient.Delete method.

type StreamingLocatorsClientDeleteResponse added in v0.3.0

type StreamingLocatorsClientDeleteResponse struct {
}

StreamingLocatorsClientDeleteResponse contains the response from method StreamingLocatorsClient.Delete.

type StreamingLocatorsClientGetOptions added in v0.3.0

type StreamingLocatorsClientGetOptions struct {
}

StreamingLocatorsClientGetOptions contains the optional parameters for the StreamingLocatorsClient.Get method.

type StreamingLocatorsClientGetResponse added in v0.3.0

type StreamingLocatorsClientGetResponse struct {
	StreamingLocator
}

StreamingLocatorsClientGetResponse contains the response from method StreamingLocatorsClient.Get.

type StreamingLocatorsClientListContentKeysOptions added in v0.3.0

type StreamingLocatorsClientListContentKeysOptions struct {
}

StreamingLocatorsClientListContentKeysOptions contains the optional parameters for the StreamingLocatorsClient.ListContentKeys method.

type StreamingLocatorsClientListContentKeysResponse added in v0.3.0

type StreamingLocatorsClientListContentKeysResponse struct {
	ListContentKeysResponse
}

StreamingLocatorsClientListContentKeysResponse contains the response from method StreamingLocatorsClient.ListContentKeys.

type StreamingLocatorsClientListOptions added in v0.3.0

type StreamingLocatorsClientListOptions struct {
	// Restricts the set of items returned.
	Filter *string
	// Specifies the key by which the result collection should be ordered.
	Orderby *string
	// Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the
	// number of available items up to but not greater than the specified value n.
	Top *int32
}

StreamingLocatorsClientListOptions contains the optional parameters for the StreamingLocatorsClient.List method.

type StreamingLocatorsClientListPathsOptions added in v0.3.0

type StreamingLocatorsClientListPathsOptions struct {
}

StreamingLocatorsClientListPathsOptions contains the optional parameters for the StreamingLocatorsClient.ListPaths method.

type StreamingLocatorsClientListPathsResponse added in v0.3.0

type StreamingLocatorsClientListPathsResponse struct {
	ListPathsResponse
}

StreamingLocatorsClientListPathsResponse contains the response from method StreamingLocatorsClient.ListPaths.

type StreamingLocatorsClientListResponse added in v0.3.0

type StreamingLocatorsClientListResponse struct {
	StreamingLocatorCollection
}

StreamingLocatorsClientListResponse contains the response from method StreamingLocatorsClient.List.

type StreamingPath

type StreamingPath struct {
	// REQUIRED; Encryption scheme
	EncryptionScheme *EncryptionScheme `json:"encryptionScheme,omitempty"`

	// REQUIRED; Streaming protocol
	StreamingProtocol *StreamingPolicyStreamingProtocol `json:"streamingProtocol,omitempty"`

	// Streaming paths for each protocol and encryptionScheme pair
	Paths []*string `json:"paths,omitempty"`
}

StreamingPath - Class of paths for streaming

type StreamingPoliciesClient

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

StreamingPoliciesClient contains the methods for the StreamingPolicies group. Don't use this type directly, use NewStreamingPoliciesClient() instead.

func NewStreamingPoliciesClient

func NewStreamingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StreamingPoliciesClient, error)

NewStreamingPoliciesClient creates a new instance of StreamingPoliciesClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*StreamingPoliciesClient) Create

func (client *StreamingPoliciesClient) Create(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string, parameters StreamingPolicy, options *StreamingPoliciesClientCreateOptions) (StreamingPoliciesClientCreateResponse, error)

Create - Create a Streaming Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingPolicyName - The Streaming Policy name. parameters - The request parameters options - StreamingPoliciesClientCreateOptions contains the optional parameters for the StreamingPoliciesClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streaming-policies-create-clear.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingPoliciesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Create(ctx,
		"contoso",
		"contosomedia",
		"UserCreatedClearStreamingPolicy",
		armmediaservices.StreamingPolicy{
			Properties: &armmediaservices.StreamingPolicyProperties{
				NoEncryption: &armmediaservices.NoEncryption{
					EnabledProtocols: &armmediaservices.EnabledProtocols{
						Dash:            to.Ptr(true),
						Download:        to.Ptr(true),
						Hls:             to.Ptr(true),
						SmoothStreaming: to.Ptr(true),
					},
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*StreamingPoliciesClient) Delete

func (client *StreamingPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string, options *StreamingPoliciesClientDeleteOptions) (StreamingPoliciesClientDeleteResponse, error)

Delete - Deletes a Streaming Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingPolicyName - The Streaming Policy name. options - StreamingPoliciesClientDeleteOptions contains the optional parameters for the StreamingPoliciesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streaming-policies-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingPoliciesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"contoso",
		"contosomedia",
		"secureStreamingPolicyWithCommonEncryptionCbcsOnly",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*StreamingPoliciesClient) Get

func (client *StreamingPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string, options *StreamingPoliciesClientGetOptions) (StreamingPoliciesClientGetResponse, error)

Get - Get the details of a Streaming Policy in the Media Services account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. streamingPolicyName - The Streaming Policy name. options - StreamingPoliciesClientGetOptions contains the optional parameters for the StreamingPoliciesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streaming-policy-get-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingPoliciesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contoso",
		"contosomedia",
		"clearStreamingPolicy",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*StreamingPoliciesClient) NewListPager added in v0.6.0

func (client *StreamingPoliciesClient) NewListPager(resourceGroupName string, accountName string, options *StreamingPoliciesClientListOptions) *runtime.Pager[StreamingPoliciesClientListResponse]

NewListPager - Lists the Streaming Policies in the account If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - StreamingPoliciesClientListOptions contains the optional parameters for the StreamingPoliciesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/streaming-policies-list.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewStreamingPoliciesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("contoso",
		"contosomedia",
		&armmediaservices.StreamingPoliciesClientListOptions{Filter: nil,
			Top:     nil,
			Orderby: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type StreamingPoliciesClientCreateOptions added in v0.3.0

type StreamingPoliciesClientCreateOptions struct {
}

StreamingPoliciesClientCreateOptions contains the optional parameters for the StreamingPoliciesClient.Create method.

type StreamingPoliciesClientCreateResponse added in v0.3.0

type StreamingPoliciesClientCreateResponse struct {
	StreamingPolicy
}

StreamingPoliciesClientCreateResponse contains the response from method StreamingPoliciesClient.Create.

type StreamingPoliciesClientDeleteOptions added in v0.3.0

type StreamingPoliciesClientDeleteOptions struct {
}

StreamingPoliciesClientDeleteOptions contains the optional parameters for the StreamingPoliciesClient.Delete method.

type StreamingPoliciesClientDeleteResponse added in v0.3.0

type StreamingPoliciesClientDeleteResponse struct {
}

StreamingPoliciesClientDeleteResponse contains the response from method StreamingPoliciesClient.Delete.

type StreamingPoliciesClientGetOptions added in v0.3.0

type StreamingPoliciesClientGetOptions struct {
}

StreamingPoliciesClientGetOptions contains the optional parameters for the StreamingPoliciesClient.Get method.

type StreamingPoliciesClientGetResponse added in v0.3.0

type StreamingPoliciesClientGetResponse struct {
	StreamingPolicy
}

StreamingPoliciesClientGetResponse contains the response from method StreamingPoliciesClient.Get.

type StreamingPoliciesClientListOptions added in v0.3.0

type StreamingPoliciesClientListOptions struct {
	// Restricts the set of items returned.
	Filter *string
	// Specifies the key by which the result collection should be ordered.
	Orderby *string
	// Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the
	// number of available items up to but not greater than the specified value n.
	Top *int32
}

StreamingPoliciesClientListOptions contains the optional parameters for the StreamingPoliciesClient.List method.

type StreamingPoliciesClientListResponse added in v0.3.0

type StreamingPoliciesClientListResponse struct {
	StreamingPolicyCollection
}

StreamingPoliciesClientListResponse contains the response from method StreamingPoliciesClient.List.

type StreamingPolicy

type StreamingPolicy struct {
	// Class to specify properties of Streaming Policy
	Properties *StreamingPolicyProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

StreamingPolicy - A Streaming Policy resource

type StreamingPolicyCollection

type StreamingPolicyCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string `json:"@odata.nextLink,omitempty"`

	// A collection of StreamingPolicy items.
	Value []*StreamingPolicy `json:"value,omitempty"`
}

StreamingPolicyCollection - A collection of StreamingPolicy items.

type StreamingPolicyContentKey

type StreamingPolicyContentKey struct {
	// Label can be used to specify Content Key when creating a Streaming Locator
	Label *string `json:"label,omitempty"`

	// Policy used by Content Key
	PolicyName *string `json:"policyName,omitempty"`

	// Tracks which use this content key
	Tracks []*TrackSelection `json:"tracks,omitempty"`
}

StreamingPolicyContentKey - Class to specify properties of content key

func (StreamingPolicyContentKey) MarshalJSON

func (s StreamingPolicyContentKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingPolicyContentKey.

type StreamingPolicyContentKeys

type StreamingPolicyContentKeys struct {
	// Default content key for an encryption scheme
	DefaultKey *DefaultKey `json:"defaultKey,omitempty"`

	// Representing tracks needs separate content key
	KeyToTrackMappings []*StreamingPolicyContentKey `json:"keyToTrackMappings,omitempty"`
}

StreamingPolicyContentKeys - Class to specify properties of all content keys in Streaming Policy

func (StreamingPolicyContentKeys) MarshalJSON

func (s StreamingPolicyContentKeys) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingPolicyContentKeys.

type StreamingPolicyFairPlayConfiguration

type StreamingPolicyFairPlayConfiguration struct {
	// REQUIRED; All license to be persistent or not
	AllowPersistentLicense *bool `json:"allowPersistentLicense,omitempty"`

	// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media
	// Services for issuing licenses. The template supports replaceable tokens that the
	// service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId},
	// which is replaced with the value of
	// StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being
	// requested.
	CustomLicenseAcquisitionURLTemplate *string `json:"customLicenseAcquisitionUrlTemplate,omitempty"`
}

StreamingPolicyFairPlayConfiguration - Class to specify configurations of FairPlay in Streaming Policy

type StreamingPolicyPlayReadyConfiguration

type StreamingPolicyPlayReadyConfiguration struct {
	// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media
	// Services for issuing licenses. The template supports replaceable tokens that the
	// service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId},
	// which is replaced with the value of
	// StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being
	// requested.
	CustomLicenseAcquisitionURLTemplate *string `json:"customLicenseAcquisitionUrlTemplate,omitempty"`

	// Custom attributes for PlayReady
	PlayReadyCustomAttributes *string `json:"playReadyCustomAttributes,omitempty"`
}

StreamingPolicyPlayReadyConfiguration - Class to specify configurations of PlayReady in Streaming Policy

type StreamingPolicyProperties

type StreamingPolicyProperties struct {
	// Configuration of CommonEncryptionCbcs
	CommonEncryptionCbcs *CommonEncryptionCbcs `json:"commonEncryptionCbcs,omitempty"`

	// Configuration of CommonEncryptionCenc
	CommonEncryptionCenc *CommonEncryptionCenc `json:"commonEncryptionCenc,omitempty"`

	// Default ContentKey used by current Streaming Policy
	DefaultContentKeyPolicyName *string `json:"defaultContentKeyPolicyName,omitempty"`

	// Configuration of EnvelopeEncryption
	EnvelopeEncryption *EnvelopeEncryption `json:"envelopeEncryption,omitempty"`

	// Configurations of NoEncryption
	NoEncryption *NoEncryption `json:"noEncryption,omitempty"`

	// READ-ONLY; Creation time of Streaming Policy
	Created *time.Time `json:"created,omitempty" azure:"ro"`
}

StreamingPolicyProperties - Class to specify properties of Streaming Policy

func (StreamingPolicyProperties) MarshalJSON

func (s StreamingPolicyProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StreamingPolicyProperties.

func (*StreamingPolicyProperties) UnmarshalJSON

func (s *StreamingPolicyProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StreamingPolicyProperties.

type StreamingPolicyStreamingProtocol

type StreamingPolicyStreamingProtocol string

StreamingPolicyStreamingProtocol - Streaming protocol

const (
	// StreamingPolicyStreamingProtocolDash - DASH protocol
	StreamingPolicyStreamingProtocolDash StreamingPolicyStreamingProtocol = "Dash"
	// StreamingPolicyStreamingProtocolDownload - Download protocol
	StreamingPolicyStreamingProtocolDownload StreamingPolicyStreamingProtocol = "Download"
	// StreamingPolicyStreamingProtocolHls - HLS protocol
	StreamingPolicyStreamingProtocolHls StreamingPolicyStreamingProtocol = "Hls"
	// StreamingPolicyStreamingProtocolSmoothStreaming - SmoothStreaming protocol
	StreamingPolicyStreamingProtocolSmoothStreaming StreamingPolicyStreamingProtocol = "SmoothStreaming"
)

func PossibleStreamingPolicyStreamingProtocolValues

func PossibleStreamingPolicyStreamingProtocolValues() []StreamingPolicyStreamingProtocol

PossibleStreamingPolicyStreamingProtocolValues returns the possible values for the StreamingPolicyStreamingProtocol const type.

type StreamingPolicyWidevineConfiguration

type StreamingPolicyWidevineConfiguration struct {
	// Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media
	// Services for issuing licenses. The template supports replaceable tokens that the
	// service will update at runtime with the value specific to the request. The currently supported token values are {AlternativeMediaId},
	// which is replaced with the value of
	// StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is replaced with the value of identifier of the key being
	// requested.
	CustomLicenseAcquisitionURLTemplate *string `json:"customLicenseAcquisitionUrlTemplate,omitempty"`
}

StreamingPolicyWidevineConfiguration - Class to specify configurations of Widevine in Streaming Policy

type StretchMode

type StretchMode string

StretchMode - The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize

const (
	// StretchModeAutoFit - Pad the output (with either letterbox or pillar box) to honor the output resolution, while ensuring
	// that the active video region in the output has the same aspect ratio as the input. For example, if the input is 1920x1080
	// and the encoding preset asks for 1280x1280, then the output will be at 1280x1280, which contains an inner rectangle of
	// 1280x720 at aspect ratio of 16:9, and pillar box regions 280 pixels wide at the left and right.
	StretchModeAutoFit StretchMode = "AutoFit"
	// StretchModeAutoSize - Override the output resolution, and change it to match the display aspect ratio of the input, without
	// padding. For example, if the input is 1920x1080 and the encoding preset asks for 1280x1280, then the value in the preset
	// is overridden, and the output will be at 1280x720, which maintains the input aspect ratio of 16:9.
	StretchModeAutoSize StretchMode = "AutoSize"
	// StretchModeNone - Strictly respect the output resolution without considering the pixel aspect ratio or display aspect ratio
	// of the input video.
	StretchModeNone StretchMode = "None"
)

func PossibleStretchModeValues

func PossibleStretchModeValues() []StretchMode

PossibleStretchModeValues returns the possible values for the StretchMode const type.

type SyncStorageKeysInput

type SyncStorageKeysInput struct {
	// The ID of the storage account resource.
	ID *string `json:"id,omitempty"`
}

SyncStorageKeysInput - The input to the sync storage keys request.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TextTrack added in v0.4.0

type TextTrack struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The display name of the text track on a video player. In HLS, this maps to the NAME attribute of EXT-X-MEDIA.
	DisplayName *string `json:"displayName,omitempty"`

	// The file name to the source file. This file is located in the storage container of the asset.
	FileName *string `json:"fileName,omitempty"`

	// The HLS specific setting for the text track.
	HlsSettings *HlsSettings `json:"hlsSettings,omitempty"`

	// When PlayerVisibility is set to "Visible", the text track will be present in the DASH manifest or HLS playlist when requested
	// by a client. When the PlayerVisibility is set to "Hidden", the text will
	// not be available to the client. The default value is "Visible".
	PlayerVisibility *Visibility `json:"playerVisibility,omitempty"`

	// READ-ONLY; The RFC5646 language code for the text track.
	LanguageCode *string `json:"languageCode,omitempty" azure:"ro"`
}

TextTrack - Represents a text track in an asset. A text track is usually used for sparse data related to the audio or video tracks.

func (*TextTrack) GetTrackBase added in v0.4.0

func (t *TextTrack) GetTrackBase() *TrackBase

GetTrackBase implements the TrackBaseClassification interface for type TextTrack.

func (TextTrack) MarshalJSON added in v0.4.0

func (t TextTrack) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TextTrack.

func (*TextTrack) UnmarshalJSON added in v0.4.0

func (t *TextTrack) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TextTrack.

type TrackAttribute

type TrackAttribute string

TrackAttribute - The TrackAttribute to filter the tracks by.

const (
	// TrackAttributeBitrate - The bitrate of the track.
	TrackAttributeBitrate TrackAttribute = "Bitrate"
	// TrackAttributeLanguage - The language of the track.
	TrackAttributeLanguage TrackAttribute = "Language"
)

func PossibleTrackAttributeValues

func PossibleTrackAttributeValues() []TrackAttribute

PossibleTrackAttributeValues returns the possible values for the TrackAttribute const type.

type TrackBase added in v0.4.0

type TrackBase struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

TrackBase - Base type for concrete track types. A derived type must be used to represent the Track.

func (*TrackBase) GetTrackBase added in v0.4.0

func (t *TrackBase) GetTrackBase() *TrackBase

GetTrackBase implements the TrackBaseClassification interface for type TrackBase.

type TrackBaseClassification added in v0.4.0

type TrackBaseClassification interface {
	// GetTrackBase returns the TrackBase content of the underlying type.
	GetTrackBase() *TrackBase
}

TrackBaseClassification provides polymorphic access to related types. Call the interface's GetTrackBase() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AudioTrack, *TextTrack, *TrackBase, *VideoTrack

type TrackDescriptor

type TrackDescriptor struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

TrackDescriptor - Base type for all TrackDescriptor types, which define the metadata and selection for tracks that should be processed by a Job

func (*TrackDescriptor) GetTrackDescriptor

func (t *TrackDescriptor) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type TrackDescriptor.

type TrackDescriptorClassification

type TrackDescriptorClassification interface {
	// GetTrackDescriptor returns the TrackDescriptor content of the underlying type.
	GetTrackDescriptor() *TrackDescriptor
}

TrackDescriptorClassification provides polymorphic access to related types. Call the interface's GetTrackDescriptor() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AudioTrackDescriptor, *SelectAudioTrackByAttribute, *SelectAudioTrackByID, *SelectVideoTrackByAttribute, *SelectVideoTrackByID, - *TrackDescriptor, *VideoTrackDescriptor

type TrackPropertyCompareOperation

type TrackPropertyCompareOperation string

TrackPropertyCompareOperation - Track property condition operation

const (
	// TrackPropertyCompareOperationEqual - Equal operation
	TrackPropertyCompareOperationEqual TrackPropertyCompareOperation = "Equal"
	// TrackPropertyCompareOperationUnknown - Unknown track property compare operation
	TrackPropertyCompareOperationUnknown TrackPropertyCompareOperation = "Unknown"
)

func PossibleTrackPropertyCompareOperationValues

func PossibleTrackPropertyCompareOperationValues() []TrackPropertyCompareOperation

PossibleTrackPropertyCompareOperationValues returns the possible values for the TrackPropertyCompareOperation const type.

type TrackPropertyCondition

type TrackPropertyCondition struct {
	// REQUIRED; Track property condition operation
	Operation *TrackPropertyCompareOperation `json:"operation,omitempty"`

	// REQUIRED; Track property type
	Property *TrackPropertyType `json:"property,omitempty"`

	// Track property value
	Value *string `json:"value,omitempty"`
}

TrackPropertyCondition - Class to specify one track property condition

type TrackPropertyType

type TrackPropertyType string

TrackPropertyType - Track property type

const (
	// TrackPropertyTypeFourCC - Track FourCC
	TrackPropertyTypeFourCC TrackPropertyType = "FourCC"
	// TrackPropertyTypeUnknown - Unknown track property
	TrackPropertyTypeUnknown TrackPropertyType = "Unknown"
)

func PossibleTrackPropertyTypeValues

func PossibleTrackPropertyTypeValues() []TrackPropertyType

PossibleTrackPropertyTypeValues returns the possible values for the TrackPropertyType const type.

type TrackSelection

type TrackSelection struct {
	// TrackSelections is a track property condition list which can specify track(s)
	TrackSelections []*TrackPropertyCondition `json:"trackSelections,omitempty"`
}

TrackSelection - Class to select a track

func (TrackSelection) MarshalJSON

func (t TrackSelection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackSelection.

type TrackedResource

type TrackedResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

type TracksClient added in v0.4.0

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

TracksClient contains the methods for the Tracks group. Don't use this type directly, use NewTracksClient() instead.

func NewTracksClient added in v0.4.0

func NewTracksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TracksClient, error)

NewTracksClient creates a new instance of TracksClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*TracksClient) BeginCreateOrUpdate added in v0.4.0

func (client *TracksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, parameters AssetTrack, options *TracksClientBeginCreateOrUpdateOptions) (*runtime.Poller[TracksClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a Track in the asset If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. trackName - The Asset Track name. parameters - The request parameters options - TracksClientBeginCreateOrUpdateOptions contains the optional parameters for the TracksClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewTracksClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountRainer",
		"text3",
		armmediaservices.AssetTrack{
			Properties: &armmediaservices.AssetTrackProperties{
				Track: &armmediaservices.TextTrack{
					ODataType:        to.Ptr("#Microsoft.Media.TextTrack"),
					DisplayName:      to.Ptr("A new track"),
					FileName:         to.Ptr("text3.ttml"),
					PlayerVisibility: to.Ptr(armmediaservices.VisibilityVisible),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*TracksClient) BeginDelete added in v0.4.0

func (client *TracksClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, options *TracksClientBeginDeleteOptions) (*runtime.Poller[TracksClientDeleteResponse], error)

BeginDelete - Deletes a Track in the asset If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. trackName - The Asset Track name. options - TracksClientBeginDeleteOptions contains the optional parameters for the TracksClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewTracksClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountRainer",
		"text2",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*TracksClient) BeginUpdate added in v0.4.0

func (client *TracksClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, parameters AssetTrack, options *TracksClientBeginUpdateOptions) (*runtime.Poller[TracksClientUpdateResponse], error)

BeginUpdate - Updates an existing Track in the asset If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. trackName - The Asset Track name. parameters - The request parameters options - TracksClientBeginUpdateOptions contains the optional parameters for the TracksClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewTracksClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountRainer",
		"text1",
		armmediaservices.AssetTrack{
			Properties: &armmediaservices.AssetTrackProperties{
				Track: &armmediaservices.TextTrack{
					ODataType:   to.Ptr("#Microsoft.Media.TextTrack"),
					DisplayName: to.Ptr("A new name"),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*TracksClient) BeginUpdateTrackData added in v0.4.0

func (client *TracksClient) BeginUpdateTrackData(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, options *TracksClientBeginUpdateTrackDataOptions) (*runtime.Poller[TracksClientUpdateTrackDataResponse], error)

BeginUpdateTrackData - Update the track data. Call this API after any changes are made to the track data stored in the asset container. For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, viewers will not see the new version of the captions unless this API is called. Note, the changes may not be reflected immediately. CDN cache may also need to be purged if applicable. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. trackName - The Asset Track name. options - TracksClientBeginUpdateTrackDataOptions contains the optional parameters for the TracksClient.BeginUpdateTrackData method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-update-data.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewTracksClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdateTrackData(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountRainer",
		"text2",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*TracksClient) Get added in v0.4.0

func (client *TracksClient) Get(ctx context.Context, resourceGroupName string, accountName string, assetName string, trackName string, options *TracksClientGetOptions) (TracksClientGetResponse, error)

Get - Get the details of a Track in the Asset If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. trackName - The Asset Track name. options - TracksClientGetOptions contains the optional parameters for the TracksClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-get-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewTracksClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contoso",
		"contosomedia",
		"ClimbingMountRainer",
		"text1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*TracksClient) NewListPager added in v0.6.0

func (client *TracksClient) NewListPager(resourceGroupName string, accountName string, assetName string, options *TracksClientListOptions) *runtime.Pager[TracksClientListResponse]

NewListPager - Lists the Tracks in the asset If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. assetName - The Asset name. options - TracksClientListOptions contains the optional parameters for the TracksClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/asset-tracks-list-all.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewTracksClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("contoso",
		"contosomedia",
		"ClimbingMountRainer",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type TracksClientBeginCreateOrUpdateOptions added in v0.4.0

type TracksClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TracksClientBeginCreateOrUpdateOptions contains the optional parameters for the TracksClient.BeginCreateOrUpdate method.

type TracksClientBeginDeleteOptions added in v0.4.0

type TracksClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TracksClientBeginDeleteOptions contains the optional parameters for the TracksClient.BeginDelete method.

type TracksClientBeginUpdateOptions added in v0.4.0

type TracksClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TracksClientBeginUpdateOptions contains the optional parameters for the TracksClient.BeginUpdate method.

type TracksClientBeginUpdateTrackDataOptions added in v0.4.0

type TracksClientBeginUpdateTrackDataOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TracksClientBeginUpdateTrackDataOptions contains the optional parameters for the TracksClient.BeginUpdateTrackData method.

type TracksClientCreateOrUpdateResponse added in v0.4.0

type TracksClientCreateOrUpdateResponse struct {
	AssetTrack
}

TracksClientCreateOrUpdateResponse contains the response from method TracksClient.CreateOrUpdate.

type TracksClientDeleteResponse added in v0.4.0

type TracksClientDeleteResponse struct {
}

TracksClientDeleteResponse contains the response from method TracksClient.Delete.

type TracksClientGetOptions added in v0.4.0

type TracksClientGetOptions struct {
}

TracksClientGetOptions contains the optional parameters for the TracksClient.Get method.

type TracksClientGetResponse added in v0.4.0

type TracksClientGetResponse struct {
	AssetTrack
}

TracksClientGetResponse contains the response from method TracksClient.Get.

type TracksClientListOptions added in v0.4.0

type TracksClientListOptions struct {
}

TracksClientListOptions contains the optional parameters for the TracksClient.List method.

type TracksClientListResponse added in v0.4.0

type TracksClientListResponse struct {
	AssetTrackCollection
}

TracksClientListResponse contains the response from method TracksClient.List.

type TracksClientUpdateResponse added in v0.4.0

type TracksClientUpdateResponse struct {
	AssetTrack
}

TracksClientUpdateResponse contains the response from method TracksClient.Update.

type TracksClientUpdateTrackDataResponse added in v0.4.0

type TracksClientUpdateTrackDataResponse struct {
}

TracksClientUpdateTrackDataResponse contains the response from method TracksClient.UpdateTrackData.

type Transform

type Transform struct {
	// The resource properties.
	Properties *TransformProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Transform - A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by transcoding or by extracting insights. After the Transform is created, it can be applied to input media by creating Jobs.

func (Transform) MarshalJSON

func (t Transform) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Transform.

type TransformCollection

type TransformCollection struct {
	// A link to the next page of the collection (when the collection contains too many results to return in one response).
	ODataNextLink *string `json:"@odata.nextLink,omitempty"`

	// A collection of Transform items.
	Value []*Transform `json:"value,omitempty"`
}

TransformCollection - A collection of Transform items.

type TransformOutput

type TransformOutput struct {
	// REQUIRED; Preset that describes the operations that will be used to modify, transcode, or extract insights from the source
	// file to generate the output.
	Preset PresetClassification `json:"preset,omitempty"`

	// A Transform can define more than one outputs. This property defines what the service should do when one output fails -
	// either continue to produce other outputs, or, stop the other outputs. The overall
	// Job state will not reflect failures of outputs that are specified with 'ContinueJob'. The default is 'StopProcessingJob'.
	OnError *OnErrorType `json:"onError,omitempty"`

	// Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for
	// processing TransformOutputs. The default priority is Normal.
	RelativePriority *Priority `json:"relativePriority,omitempty"`
}

TransformOutput - Describes the properties of a TransformOutput, which are the rules to be applied while generating the desired output.

func (TransformOutput) MarshalJSON

func (t TransformOutput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TransformOutput.

func (*TransformOutput) UnmarshalJSON

func (t *TransformOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TransformOutput.

type TransformProperties

type TransformProperties struct {
	// REQUIRED; An array of one or more TransformOutputs that the Transform should generate.
	Outputs []*TransformOutput `json:"outputs,omitempty"`

	// An optional verbose description of the Transform.
	Description *string `json:"description,omitempty"`

	// READ-ONLY; The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format.
	Created *time.Time `json:"created,omitempty" azure:"ro"`

	// READ-ONLY; The UTC date and time when the Transform was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format.
	LastModified *time.Time `json:"lastModified,omitempty" azure:"ro"`
}

TransformProperties - A Transform.

func (TransformProperties) MarshalJSON

func (t TransformProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TransformProperties.

func (*TransformProperties) UnmarshalJSON

func (t *TransformProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TransformProperties.

type TransformsClient

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

TransformsClient contains the methods for the Transforms group. Don't use this type directly, use NewTransformsClient() instead.

func NewTransformsClient

func NewTransformsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TransformsClient, error)

NewTransformsClient creates a new instance of TransformsClient with the specified values. subscriptionID - The unique identifier for a Microsoft Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*TransformsClient) CreateOrUpdate

func (client *TransformsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, transformName string, parameters Transform, options *TransformsClientCreateOrUpdateOptions) (TransformsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a new Transform. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. transformName - The Transform name. parameters - The request parameters options - TransformsClientCreateOrUpdateOptions contains the optional parameters for the TransformsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/transforms-create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewTransformsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"contosoresources",
		"contosomedia",
		"createdTransform",
		armmediaservices.Transform{
			Properties: &armmediaservices.TransformProperties{
				Description: to.Ptr("Example Transform to illustrate create and update."),
				Outputs: []*armmediaservices.TransformOutput{
					{
						Preset: &armmediaservices.BuiltInStandardEncoderPreset{
							ODataType:  to.Ptr("#Microsoft.Media.BuiltInStandardEncoderPreset"),
							PresetName: to.Ptr(armmediaservices.EncoderNamedPresetAdaptiveStreaming),
						},
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*TransformsClient) Delete

func (client *TransformsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, transformName string, options *TransformsClientDeleteOptions) (TransformsClientDeleteResponse, error)

Delete - Deletes a Transform. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. transformName - The Transform name. options - TransformsClientDeleteOptions contains the optional parameters for the TransformsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/transforms-delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewTransformsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"contosoresources",
		"contosomedia",
		"sampleTransform",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*TransformsClient) Get

func (client *TransformsClient) Get(ctx context.Context, resourceGroupName string, accountName string, transformName string, options *TransformsClientGetOptions) (TransformsClientGetResponse, error)

Get - Gets a Transform. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. transformName - The Transform name. options - TransformsClientGetOptions contains the optional parameters for the TransformsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/transforms-get-by-name.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewTransformsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contosoresources",
		"contosomedia",
		"sampleTransform",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*TransformsClient) NewListPager added in v0.6.0

func (client *TransformsClient) NewListPager(resourceGroupName string, accountName string, options *TransformsClientListOptions) *runtime.Pager[TransformsClientListResponse]

NewListPager - Lists the Transforms in the account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. options - TransformsClientListOptions contains the optional parameters for the TransformsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/transforms-list-all.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewTransformsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("contosoresources",
		"contosomedia",
		&armmediaservices.TransformsClientListOptions{Filter: nil,
			Orderby: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*TransformsClient) Update

func (client *TransformsClient) Update(ctx context.Context, resourceGroupName string, accountName string, transformName string, parameters Transform, options *TransformsClientUpdateOptions) (TransformsClientUpdateResponse, error)

Update - Updates a Transform. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-11-01 resourceGroupName - The name of the resource group within the Azure subscription. accountName - The Media Services account name. transformName - The Transform name. parameters - The request parameters options - TransformsClientUpdateOptions contains the optional parameters for the TransformsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/transforms-update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mediaservices/armmediaservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armmediaservices.NewTransformsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"contosoresources",
		"contosomedia",
		"transformToUpdate",
		armmediaservices.Transform{
			Properties: &armmediaservices.TransformProperties{
				Description: to.Ptr("Example transform to illustrate update."),
				Outputs: []*armmediaservices.TransformOutput{
					{
						Preset: &armmediaservices.BuiltInStandardEncoderPreset{
							ODataType:  to.Ptr("#Microsoft.Media.BuiltInStandardEncoderPreset"),
							PresetName: to.Ptr(armmediaservices.EncoderNamedPresetH264MultipleBitrate720P),
						},
						RelativePriority: to.Ptr(armmediaservices.PriorityHigh),
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type TransformsClientCreateOrUpdateOptions added in v0.3.0

type TransformsClientCreateOrUpdateOptions struct {
}

TransformsClientCreateOrUpdateOptions contains the optional parameters for the TransformsClient.CreateOrUpdate method.

type TransformsClientCreateOrUpdateResponse added in v0.3.0

type TransformsClientCreateOrUpdateResponse struct {
	Transform
}

TransformsClientCreateOrUpdateResponse contains the response from method TransformsClient.CreateOrUpdate.

type TransformsClientDeleteOptions added in v0.3.0

type TransformsClientDeleteOptions struct {
}

TransformsClientDeleteOptions contains the optional parameters for the TransformsClient.Delete method.

type TransformsClientDeleteResponse added in v0.3.0

type TransformsClientDeleteResponse struct {
}

TransformsClientDeleteResponse contains the response from method TransformsClient.Delete.

type TransformsClientGetOptions added in v0.3.0

type TransformsClientGetOptions struct {
}

TransformsClientGetOptions contains the optional parameters for the TransformsClient.Get method.

type TransformsClientGetResponse added in v0.3.0

type TransformsClientGetResponse struct {
	Transform
}

TransformsClientGetResponse contains the response from method TransformsClient.Get.

type TransformsClientListOptions added in v0.3.0

type TransformsClientListOptions struct {
	// Restricts the set of items returned.
	Filter *string
	// Specifies the key by which the result collection should be ordered.
	Orderby *string
}

TransformsClientListOptions contains the optional parameters for the TransformsClient.List method.

type TransformsClientListResponse added in v0.3.0

type TransformsClientListResponse struct {
	TransformCollection
}

TransformsClientListResponse contains the response from method TransformsClient.List.

type TransformsClientUpdateOptions added in v0.3.0

type TransformsClientUpdateOptions struct {
}

TransformsClientUpdateOptions contains the optional parameters for the TransformsClient.Update method.

type TransformsClientUpdateResponse added in v0.3.0

type TransformsClientUpdateResponse struct {
	Transform
}

TransformsClientUpdateResponse contains the response from method TransformsClient.Update.

type TransportStreamFormat

type TransportStreamFormat struct {
	// REQUIRED; The pattern of the file names for the generated output files. The following macros are supported in the file
	// name: {Basename} - An expansion macro that will use the name of the input video file. If
	// the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of
	// input video files will be used. If the length of base name of the input video
	// file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate
	// extension for this format. {Label} - The label assigned to the
	// codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate.
	// Not applicable to thumbnails. {Codec} - The type of the audio/video codec.
	// {Resolution} - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename.
	FilenamePattern *string `json:"filenamePattern,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together
	// .
	OutputFiles []*OutputFile `json:"outputFiles,omitempty"`
}

TransportStreamFormat - Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC 13818-1) output video file(s).

func (*TransportStreamFormat) GetFormat added in v0.3.0

func (t *TransportStreamFormat) GetFormat() *Format

GetFormat implements the FormatClassification interface for type TransportStreamFormat.

func (*TransportStreamFormat) GetMultiBitrateFormat added in v0.3.0

func (t *TransportStreamFormat) GetMultiBitrateFormat() *MultiBitrateFormat

GetMultiBitrateFormat implements the MultiBitrateFormatClassification interface for type TransportStreamFormat.

func (TransportStreamFormat) MarshalJSON

func (t TransportStreamFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TransportStreamFormat.

func (*TransportStreamFormat) UnmarshalJSON added in v0.3.0

func (t *TransportStreamFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TransportStreamFormat.

type UTCClipTime

type UTCClipTime struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// REQUIRED; The time position on the timeline of the input media based on Utc time.
	Time *time.Time `json:"time,omitempty"`
}

UTCClipTime - Specifies the clip time as a Utc time position in the media file. The Utc time can point to a different position depending on whether the media file starts from a timestamp of zero or not.

func (*UTCClipTime) GetClipTime added in v0.3.0

func (u *UTCClipTime) GetClipTime() *ClipTime

GetClipTime implements the ClipTimeClassification interface for type UTCClipTime.

func (UTCClipTime) MarshalJSON

func (u UTCClipTime) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UTCClipTime.

func (*UTCClipTime) UnmarshalJSON

func (u *UTCClipTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UTCClipTime.

type UserAssignedManagedIdentity

type UserAssignedManagedIdentity struct {
	// READ-ONLY; The client ID.
	ClientID *string `json:"clientId,omitempty" azure:"ro"`

	// READ-ONLY; The principal ID.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`
}

type Video

type Video struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The distance between two key frames. The value should be non-zero in the range [0.5, 20] seconds, specified in ISO 8601
	// format. The default is 2 seconds(PT2S). Note that this setting is ignored if
	// VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source setting.
	KeyFrameInterval *string `json:"keyFrameInterval,omitempty"`

	// An optional label for the codec. The label can be used to control muxing behavior.
	Label *string `json:"label,omitempty"`

	// The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize
	StretchMode *StretchMode `json:"stretchMode,omitempty"`

	// The Video Sync Mode
	SyncMode *VideoSyncMode `json:"syncMode,omitempty"`
}

Video - Describes the basic properties for encoding the input video.

func (*Video) GetCodec added in v0.3.0

func (v *Video) GetCodec() *Codec

GetCodec implements the CodecClassification interface for type Video.

func (*Video) GetVideo

func (v *Video) GetVideo() *Video

GetVideo implements the VideoClassification interface for type Video.

func (Video) MarshalJSON added in v0.3.0

func (v Video) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Video.

func (*Video) UnmarshalJSON

func (v *Video) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Video.

type VideoAnalyzerPreset

type VideoAnalyzerPreset struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you
	// know the language of your content, it is recommended that you specify it. The
	// language must be specified explicitly for AudioAnalysisMode::Basic, since automatic language detection is not included
	// in basic mode. If the language isn't specified or set to null, automatic language
	// detection will choose the first language detected and process with the selected language for the duration of the file.
	// It does not currently support dynamically switching between languages after the
	// first language is detected. The automatic detection works best with audio recordings with clearly discernable speech. If
	// automatic detection fails to find the language, transcription would fallback to
	// 'en-US'." The list of supported languages is available here: https://go.microsoft.com/fwlink/?linkid=2109463
	AudioLanguage *string `json:"audioLanguage,omitempty"`

	// Dictionary containing key value pairs for parameters not exposed in the preset itself
	ExperimentalOptions map[string]*string `json:"experimentalOptions,omitempty"`

	// Defines the type of insights that you want the service to generate. The allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly',
	// and 'AllInsights'. The default is AllInsights. If you set this to
	// AllInsights and the input is audio only, then only audio insights are generated. Similarly if the input is video only,
	// then only video insights are generated. It is recommended that you not use
	// AudioInsightsOnly if you expect some of your inputs to be video only; or use VideoInsightsOnly if you expect some of your
	// inputs to be audio only. Your Jobs in such conditions would error out.
	InsightsToExtract *InsightsType `json:"insightsToExtract,omitempty"`

	// Determines the set of audio analysis operations to be performed. If unspecified, the Standard AudioAnalysisMode would be
	// chosen.
	Mode *AudioAnalysisMode `json:"mode,omitempty"`
}

VideoAnalyzerPreset - A video analyzer preset that extracts insights (rich metadata) from both audio and video, and outputs a JSON format file.

func (*VideoAnalyzerPreset) GetAudioAnalyzerPreset added in v0.3.0

func (v *VideoAnalyzerPreset) GetAudioAnalyzerPreset() *AudioAnalyzerPreset

GetAudioAnalyzerPreset implements the AudioAnalyzerPresetClassification interface for type VideoAnalyzerPreset.

func (*VideoAnalyzerPreset) GetPreset added in v0.3.0

func (v *VideoAnalyzerPreset) GetPreset() *Preset

GetPreset implements the PresetClassification interface for type VideoAnalyzerPreset.

func (VideoAnalyzerPreset) MarshalJSON

func (v VideoAnalyzerPreset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VideoAnalyzerPreset.

func (*VideoAnalyzerPreset) UnmarshalJSON

func (v *VideoAnalyzerPreset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VideoAnalyzerPreset.

type VideoClassification

type VideoClassification interface {
	CodecClassification
	// GetVideo returns the Video content of the underlying type.
	GetVideo() *Video
}

VideoClassification provides polymorphic access to related types. Call the interface's GetVideo() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *H264Video, *H265Video, *Image, *JpgImage, *PNGImage, *Video

type VideoLayer

type VideoLayer struct {
	// REQUIRED; The average bitrate in bits per second at which to encode the input video when generating this layer. This is
	// a required field.
	Bitrate *int32 `json:"bitrate,omitempty"`

	// Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on
	// whenever the video profile permits its use.
	AdaptiveBFrame *bool `json:"adaptiveBFrame,omitempty"`

	// The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number
	// based on the video profile and level.
	BFrames *int32 `json:"bFrames,omitempty"`

	// The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N
	// are integers (For example, 30000/1001), or in the form of a number (For example,
	// 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified,
	// the encoder will use the same frame rate as the input video.
	FrameRate *string `json:"frameRate,omitempty"`

	// The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in height as the input.
	Height *string `json:"height,omitempty"`

	// The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming
	// the output file.
	Label *string `json:"label,omitempty"`

	// The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults
	// to the same value as bitrate.
	MaxBitrate *int32 `json:"maxBitrate,omitempty"`

	// The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will
	// use a single slice for each frame.
	Slices *int32 `json:"slices,omitempty"`

	// The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example
	// 50% means the output video has half as many pixels in width as the input.
	Width *string `json:"width,omitempty"`
}

VideoLayer - Describes the settings to be used when encoding the input video into a desired output bitrate layer.

type VideoOverlay

type VideoOverlay struct {
	// REQUIRED; The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can
	// specify an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV,
	// MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video
	// file formats.
	InputLabel *string `json:"inputLabel,omitempty"`

	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`

	// The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0.
	AudioGainLevel *float64 `json:"audioGainLevel,omitempty"`

	// An optional rectangular window used to crop the overlay image or video.
	CropRectangle *Rectangle `json:"cropRectangle,omitempty"`

	// The end position, with reference to the input video, at which the overlay ends. The value should be in ISO 8601 format.
	// For example, PT30S to end the overlay at 30 seconds into the input video. If not
	// specified or the value is greater than the input video duration, the overlay will be applied until the end of the input
	// video if the overlay media duration is greater than the input video duration,
	// else the overlay will last as long as the overlay media duration.
	End *string `json:"end,omitempty"`

	// The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If
	// not specified the default behavior is to have no fade in (same as PT0S).
	FadeInDuration *string `json:"fadeInDuration,omitempty"`

	// The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not
	// specified the default behavior is to have no fade out (same as PT0S).
	FadeOutDuration *string `json:"fadeOutDuration,omitempty"`

	// The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque.
	Opacity *float64 `json:"opacity,omitempty"`

	// The location in the input video where the overlay is applied.
	Position *Rectangle `json:"position,omitempty"`

	// The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format.
	// For example, PT05S to start the overlay at 5 seconds into the input video.
	// If not specified the overlay starts from the beginning of the input video.
	Start *string `json:"start,omitempty"`
}

VideoOverlay - Describes the properties of a video overlay.

func (*VideoOverlay) GetOverlay added in v0.3.0

func (v *VideoOverlay) GetOverlay() *Overlay

GetOverlay implements the OverlayClassification interface for type VideoOverlay.

func (VideoOverlay) MarshalJSON

func (v VideoOverlay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VideoOverlay.

func (*VideoOverlay) UnmarshalJSON

func (v *VideoOverlay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VideoOverlay.

type VideoSyncMode

type VideoSyncMode string

VideoSyncMode - The Video Sync Mode

const (
	// VideoSyncModeAuto - This is the default method. Chooses between Cfr and Vfr depending on muxer capabilities. For output
	// format MP4, the default mode is Cfr.
	VideoSyncModeAuto VideoSyncMode = "Auto"
	// VideoSyncModeCfr - Input frames will be repeated and/or dropped as needed to achieve exactly the requested constant frame
	// rate. Recommended when the output frame rate is explicitly set at a specified value
	VideoSyncModeCfr VideoSyncMode = "Cfr"
	// VideoSyncModePassthrough - The presentation timestamps on frames are passed through from the input file to the output file
	// writer. Recommended when the input source has variable frame rate, and are attempting to produce multiple layers for adaptive
	// streaming in the output which have aligned GOP boundaries. Note: if two or more frames in the input have duplicate timestamps,
	// then the output will also have the same behavior
	VideoSyncModePassthrough VideoSyncMode = "Passthrough"
	// VideoSyncModeVfr - Similar to the Passthrough mode, but if the input has frames that have duplicate timestamps, then only
	// one frame is passed through to the output, and others are dropped. Recommended when the number of output frames is expected
	// to be equal to the number of input frames. For example, the output is used to calculate a quality metric like PSNR against
	// the input
	VideoSyncModeVfr VideoSyncMode = "Vfr"
)

func PossibleVideoSyncModeValues

func PossibleVideoSyncModeValues() []VideoSyncMode

PossibleVideoSyncModeValues returns the possible values for the VideoSyncMode const type.

type VideoTrack added in v0.4.0

type VideoTrack struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

VideoTrack - Represents a video track in the asset.

func (*VideoTrack) GetTrackBase added in v0.4.0

func (v *VideoTrack) GetTrackBase() *TrackBase

GetTrackBase implements the TrackBaseClassification interface for type VideoTrack.

func (VideoTrack) MarshalJSON added in v0.4.0

func (v VideoTrack) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VideoTrack.

func (*VideoTrack) UnmarshalJSON added in v0.4.0

func (v *VideoTrack) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VideoTrack.

type VideoTrackDescriptor

type VideoTrackDescriptor struct {
	// REQUIRED; The discriminator for derived types.
	ODataType *string `json:"@odata.type,omitempty"`
}

VideoTrackDescriptor - A TrackSelection to select video tracks.

func (*VideoTrackDescriptor) GetTrackDescriptor added in v0.3.0

func (v *VideoTrackDescriptor) GetTrackDescriptor() *TrackDescriptor

GetTrackDescriptor implements the TrackDescriptorClassification interface for type VideoTrackDescriptor.

func (*VideoTrackDescriptor) GetVideoTrackDescriptor

func (v *VideoTrackDescriptor) GetVideoTrackDescriptor() *VideoTrackDescriptor

GetVideoTrackDescriptor implements the VideoTrackDescriptorClassification interface for type VideoTrackDescriptor.

func (VideoTrackDescriptor) MarshalJSON

func (v VideoTrackDescriptor) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VideoTrackDescriptor.

func (*VideoTrackDescriptor) UnmarshalJSON added in v0.3.0

func (v *VideoTrackDescriptor) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VideoTrackDescriptor.

type VideoTrackDescriptorClassification

type VideoTrackDescriptorClassification interface {
	TrackDescriptorClassification
	// GetVideoTrackDescriptor returns the VideoTrackDescriptor content of the underlying type.
	GetVideoTrackDescriptor() *VideoTrackDescriptor
}

VideoTrackDescriptorClassification provides polymorphic access to related types. Call the interface's GetVideoTrackDescriptor() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *SelectVideoTrackByAttribute, *SelectVideoTrackByID, *VideoTrackDescriptor

type Visibility added in v0.4.0

type Visibility string

Visibility - When PlayerVisibility is set to "Visible", the text track will be present in the DASH manifest or HLS playlist when requested by a client. When the PlayerVisibility is set to "Hidden", the text will not be available to the client. The default value is "Visible".

const (
	// VisibilityHidden - The track is hidden to video player.
	VisibilityHidden Visibility = "Hidden"
	// VisibilityVisible - The track is visible to video player.
	VisibilityVisible Visibility = "Visible"
)

func PossibleVisibilityValues added in v0.4.0

func PossibleVisibilityValues() []Visibility

PossibleVisibilityValues returns the possible values for the Visibility const type.

Jump to

Keyboard shortcuts

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