diff --git a/internal/services/media/client/client.go b/internal/services/media/client/client.go index dff1e03e73f7..625cb560a889 100644 --- a/internal/services/media/client/client.go +++ b/internal/services/media/client/client.go @@ -2,23 +2,17 @@ package client import ( "github.com/Azure/go-autorest/autorest" - mediaV20200501 "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01" mediaV20211101 "github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01" mediaV20220801 "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) type Client struct { - V20200501Client *mediaV20200501.Client V20211101Client *mediaV20211101.Client V20220801Client *mediaV20220801.Client } func NewClient(o *common.ClientOptions) *Client { - V20200501Client := mediaV20200501.NewClientWithBaseURI(o.ResourceManagerEndpoint, func(c *autorest.Client) { - c.Authorizer = o.ResourceManagerAuthorizer - }) - V20211101Client := mediaV20211101.NewClientWithBaseURI(o.ResourceManagerEndpoint, func(c *autorest.Client) { c.Authorizer = o.ResourceManagerAuthorizer }) @@ -28,7 +22,6 @@ func NewClient(o *common.ClientOptions) *Client { }) return &Client{ - V20200501Client: &V20200501Client, V20211101Client: &V20211101Client, V20220801Client: &V20220801Client, } diff --git a/internal/services/media/media_streaming_endpoint_resource.go b/internal/services/media/media_streaming_endpoint_resource.go index d581532bf696..17fdee505c98 100644 --- a/internal/services/media/media_streaming_endpoint_resource.go +++ b/internal/services/media/media_streaming_endpoint_resource.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/media/migration" @@ -219,7 +219,7 @@ func resourceMediaStreamingEndpoint() *pluginsdk.Resource { func resourceMediaStreamingEndpointCreate(d *pluginsdk.ResourceData, meta interface{}) error { subscriptionId := meta.(*clients.Client).Account.SubscriptionId - client := meta.(*clients.Client).Media.V20200501Client.StreamingEndpoints + client := meta.(*clients.Client).Media.V20220801Client.StreamingEndpoints ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -294,7 +294,7 @@ func resourceMediaStreamingEndpointCreate(d *pluginsdk.ResourceData, meta interf } func resourceMediaStreamingEndpointUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20200501Client.StreamingEndpoints + client := meta.(*clients.Client).Media.V20220801Client.StreamingEndpoints ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -367,7 +367,7 @@ func resourceMediaStreamingEndpointUpdate(d *pluginsdk.ResourceData, meta interf } func resourceMediaStreamingEndpointRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20200501Client.StreamingEndpoints + client := meta.(*clients.Client).Media.V20220801Client.StreamingEndpoints ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -429,7 +429,7 @@ func resourceMediaStreamingEndpointRead(d *pluginsdk.ResourceData, meta interfac } func resourceMediaStreamingEndpointDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Media.V20200501Client.StreamingEndpoints + client := meta.(*clients.Client).Media.V20220801Client.StreamingEndpoints ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/media/media_streaming_endpoint_resource_test.go b/internal/services/media/media_streaming_endpoint_resource_test.go index e135d8b63df3..295a59311b9e 100644 --- a/internal/services/media/media_streaming_endpoint_resource_test.go +++ b/internal/services/media/media_streaming_endpoint_resource_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -97,7 +97,7 @@ func (r MediaStreamingEndpointResource) Start(ctx context.Context, client *clien return err } - if err := client.Media.V20200501Client.StreamingEndpoints.StartThenPoll(ctx, *id); err != nil { + if err := client.Media.V20220801Client.StreamingEndpoints.StartThenPoll(ctx, *id); err != nil { return fmt.Errorf("starting %s: %+v", id, err) } @@ -110,7 +110,7 @@ func (MediaStreamingEndpointResource) Exists(ctx context.Context, clients *clien return nil, err } - resp, err := clients.Media.V20200501Client.StreamingEndpoints.Get(ctx, *id) + resp, err := clients.Media.V20220801Client.StreamingEndpoints.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving %s: %v", id.String(), err) } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/README.md deleted file mode 100644 index d752ead98b47..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/README.md +++ /dev/null @@ -1,111 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters` Documentation - -The `accountfilters` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2020-05-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters" -``` - - -### Client Initialization - -```go -client := accountfilters.NewAccountFiltersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AccountFiltersClient.AccountFiltersCreateOrUpdate` - -```go -ctx := context.TODO() -id := accountfilters.NewAccountFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "accountFilterValue") - -payload := accountfilters.AccountFilter{ - // ... -} - - -read, err := client.AccountFiltersCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountFiltersClient.AccountFiltersDelete` - -```go -ctx := context.TODO() -id := accountfilters.NewAccountFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "accountFilterValue") - -read, err := client.AccountFiltersDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountFiltersClient.AccountFiltersGet` - -```go -ctx := context.TODO() -id := accountfilters.NewAccountFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "accountFilterValue") - -read, err := client.AccountFiltersGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountFiltersClient.AccountFiltersList` - -```go -ctx := context.TODO() -id := accountfilters.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.AccountFiltersList(ctx, id)` can be used to do batched pagination -items, err := client.AccountFiltersListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AccountFiltersClient.AccountFiltersUpdate` - -```go -ctx := context.TODO() -id := accountfilters.NewAccountFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "accountFilterValue") - -payload := accountfilters.AccountFilter{ - // ... -} - - -read, err := client.AccountFiltersUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/client.go deleted file mode 100644 index 5e041095dd7d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/client.go +++ /dev/null @@ -1,18 +0,0 @@ -package accountfilters - -import "github.com/Azure/go-autorest/autorest" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountFiltersClient struct { - Client autorest.Client - baseUri string -} - -func NewAccountFiltersClientWithBaseURI(endpoint string) AccountFiltersClient { - return AccountFiltersClient{ - Client: autorest.NewClientWithUserAgent(userAgent()), - baseUri: endpoint, - } -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/constants.go deleted file mode 100644 index 8dd03ce1df0b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/constants.go +++ /dev/null @@ -1,74 +0,0 @@ -package accountfilters - -import "strings" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackPropertyCompareOperation string - -const ( - FilterTrackPropertyCompareOperationEqual FilterTrackPropertyCompareOperation = "Equal" - FilterTrackPropertyCompareOperationNotEqual FilterTrackPropertyCompareOperation = "NotEqual" -) - -func PossibleValuesForFilterTrackPropertyCompareOperation() []string { - return []string{ - string(FilterTrackPropertyCompareOperationEqual), - string(FilterTrackPropertyCompareOperationNotEqual), - } -} - -func parseFilterTrackPropertyCompareOperation(input string) (*FilterTrackPropertyCompareOperation, error) { - vals := map[string]FilterTrackPropertyCompareOperation{ - "equal": FilterTrackPropertyCompareOperationEqual, - "notequal": FilterTrackPropertyCompareOperationNotEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FilterTrackPropertyCompareOperation(input) - return &out, nil -} - -type FilterTrackPropertyType string - -const ( - FilterTrackPropertyTypeBitrate FilterTrackPropertyType = "Bitrate" - FilterTrackPropertyTypeFourCC FilterTrackPropertyType = "FourCC" - FilterTrackPropertyTypeLanguage FilterTrackPropertyType = "Language" - FilterTrackPropertyTypeName FilterTrackPropertyType = "Name" - FilterTrackPropertyTypeType FilterTrackPropertyType = "Type" - FilterTrackPropertyTypeUnknown FilterTrackPropertyType = "Unknown" -) - -func PossibleValuesForFilterTrackPropertyType() []string { - return []string{ - string(FilterTrackPropertyTypeBitrate), - string(FilterTrackPropertyTypeFourCC), - string(FilterTrackPropertyTypeLanguage), - string(FilterTrackPropertyTypeName), - string(FilterTrackPropertyTypeType), - string(FilterTrackPropertyTypeUnknown), - } -} - -func parseFilterTrackPropertyType(input string) (*FilterTrackPropertyType, error) { - vals := map[string]FilterTrackPropertyType{ - "bitrate": FilterTrackPropertyTypeBitrate, - "fourcc": FilterTrackPropertyTypeFourCC, - "language": FilterTrackPropertyTypeLanguage, - "name": FilterTrackPropertyTypeName, - "type": FilterTrackPropertyTypeType, - "unknown": FilterTrackPropertyTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FilterTrackPropertyType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/id_accountfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/id_accountfilter.go deleted file mode 100644 index 55c7c259c307..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/id_accountfilter.go +++ /dev/null @@ -1,137 +0,0 @@ -package accountfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = AccountFilterId{} - -// AccountFilterId is a struct representing the Resource ID for a Account Filter -type AccountFilterId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - AccountFilterName string -} - -// NewAccountFilterID returns a new AccountFilterId struct -func NewAccountFilterID(subscriptionId string, resourceGroupName string, mediaServiceName string, accountFilterName string) AccountFilterId { - return AccountFilterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - AccountFilterName: accountFilterName, - } -} - -// ParseAccountFilterID parses 'input' into a AccountFilterId -func ParseAccountFilterID(input string) (*AccountFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(AccountFilterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AccountFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.AccountFilterName, ok = parsed.Parsed["accountFilterName"]; !ok { - return nil, fmt.Errorf("the segment 'accountFilterName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseAccountFilterIDInsensitively parses 'input' case-insensitively into a AccountFilterId -// note: this method should only be used for API response data and not user input -func ParseAccountFilterIDInsensitively(input string) (*AccountFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(AccountFilterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AccountFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.AccountFilterName, ok = parsed.Parsed["accountFilterName"]; !ok { - return nil, fmt.Errorf("the segment 'accountFilterName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateAccountFilterID checks that 'input' can be parsed as a Account Filter ID -func ValidateAccountFilterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAccountFilterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Account Filter ID -func (id AccountFilterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/accountFilters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.AccountFilterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Account Filter ID -func (id AccountFilterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticAccountFilters", "accountFilters", "accountFilters"), - resourceids.UserSpecifiedSegment("accountFilterName", "accountFilterValue"), - } -} - -// String returns a human-readable description of this Account Filter ID -func (id AccountFilterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Account Filter Name: %q", id.AccountFilterName), - } - return fmt.Sprintf("Account Filter (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/id_mediaservice.go deleted file mode 100644 index 2354e3c5253b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/id_mediaservice.go +++ /dev/null @@ -1,124 +0,0 @@ -package accountfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfilterscreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfilterscreateorupdate_autorest.go deleted file mode 100644 index 3bec2771a02e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfilterscreateorupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package accountfilters - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountFiltersCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - Model *AccountFilter -} - -// AccountFiltersCreateOrUpdate ... -func (c AccountFiltersClient) AccountFiltersCreateOrUpdate(ctx context.Context, id AccountFilterId, input AccountFilter) (result AccountFiltersCreateOrUpdateOperationResponse, err error) { - req, err := c.preparerForAccountFiltersCreateOrUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersCreateOrUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersCreateOrUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAccountFiltersCreateOrUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersCreateOrUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAccountFiltersCreateOrUpdate prepares the AccountFiltersCreateOrUpdate request. -func (c AccountFiltersClient) preparerForAccountFiltersCreateOrUpdate(ctx context.Context, id AccountFilterId, input AccountFilter) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAccountFiltersCreateOrUpdate handles the response to the AccountFiltersCreateOrUpdate request. The method always -// closes the http.Response Body. -func (c AccountFiltersClient) responderForAccountFiltersCreateOrUpdate(resp *http.Response) (result AccountFiltersCreateOrUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfiltersdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfiltersdelete_autorest.go deleted file mode 100644 index 45684a72736c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfiltersdelete_autorest.go +++ /dev/null @@ -1,66 +0,0 @@ -package accountfilters - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountFiltersDeleteOperationResponse struct { - HttpResponse *http.Response -} - -// AccountFiltersDelete ... -func (c AccountFiltersClient) AccountFiltersDelete(ctx context.Context, id AccountFilterId) (result AccountFiltersDeleteOperationResponse, err error) { - req, err := c.preparerForAccountFiltersDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersDelete", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersDelete", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAccountFiltersDelete(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersDelete", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAccountFiltersDelete prepares the AccountFiltersDelete request. -func (c AccountFiltersClient) preparerForAccountFiltersDelete(ctx context.Context, id AccountFilterId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAccountFiltersDelete handles the response to the AccountFiltersDelete request. The method always -// closes the http.Response Body. -func (c AccountFiltersClient) responderForAccountFiltersDelete(resp *http.Response) (result AccountFiltersDeleteOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfiltersget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfiltersget_autorest.go deleted file mode 100644 index f8e73d95b3d5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfiltersget_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package accountfilters - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountFiltersGetOperationResponse struct { - HttpResponse *http.Response - Model *AccountFilter -} - -// AccountFiltersGet ... -func (c AccountFiltersClient) AccountFiltersGet(ctx context.Context, id AccountFilterId) (result AccountFiltersGetOperationResponse, err error) { - req, err := c.preparerForAccountFiltersGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersGet", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersGet", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAccountFiltersGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersGet", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAccountFiltersGet prepares the AccountFiltersGet request. -func (c AccountFiltersClient) preparerForAccountFiltersGet(ctx context.Context, id AccountFilterId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAccountFiltersGet handles the response to the AccountFiltersGet request. The method always -// closes the http.Response Body. -func (c AccountFiltersClient) responderForAccountFiltersGet(resp *http.Response) (result AccountFiltersGetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfilterslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfilterslist_autorest.go deleted file mode 100644 index 7afc16cbf9b7..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfilterslist_autorest.go +++ /dev/null @@ -1,186 +0,0 @@ -package accountfilters - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountFiltersListOperationResponse struct { - HttpResponse *http.Response - Model *[]AccountFilter - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (AccountFiltersListOperationResponse, error) -} - -type AccountFiltersListCompleteResult struct { - Items []AccountFilter -} - -func (r AccountFiltersListOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r AccountFiltersListOperationResponse) LoadMore(ctx context.Context) (resp AccountFiltersListOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -// AccountFiltersList ... -func (c AccountFiltersClient) AccountFiltersList(ctx context.Context, id MediaServiceId) (resp AccountFiltersListOperationResponse, err error) { - req, err := c.preparerForAccountFiltersList(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersList", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersList", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForAccountFiltersList(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersList", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForAccountFiltersList prepares the AccountFiltersList request. -func (c AccountFiltersClient) preparerForAccountFiltersList(ctx context.Context, id MediaServiceId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/accountFilters", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForAccountFiltersListWithNextLink prepares the AccountFiltersList request with the given nextLink token. -func (c AccountFiltersClient) preparerForAccountFiltersListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAccountFiltersList handles the response to the AccountFiltersList request. The method always -// closes the http.Response Body. -func (c AccountFiltersClient) responderForAccountFiltersList(resp *http.Response) (result AccountFiltersListOperationResponse, err error) { - type page struct { - Values []AccountFilter `json:"value"` - NextLink *string `json:"@odata.nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result AccountFiltersListOperationResponse, err error) { - req, err := c.preparerForAccountFiltersListWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersList", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersList", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAccountFiltersList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersList", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// AccountFiltersListComplete retrieves all of the results into a single object -func (c AccountFiltersClient) AccountFiltersListComplete(ctx context.Context, id MediaServiceId) (AccountFiltersListCompleteResult, error) { - return c.AccountFiltersListCompleteMatchingPredicate(ctx, id, AccountFilterOperationPredicate{}) -} - -// AccountFiltersListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AccountFiltersClient) AccountFiltersListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, predicate AccountFilterOperationPredicate) (resp AccountFiltersListCompleteResult, err error) { - items := make([]AccountFilter, 0) - - page, err := c.AccountFiltersList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := AccountFiltersListCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfiltersupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfiltersupdate_autorest.go deleted file mode 100644 index f04a6cc8d9e5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/method_accountfiltersupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package accountfilters - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountFiltersUpdateOperationResponse struct { - HttpResponse *http.Response - Model *AccountFilter -} - -// AccountFiltersUpdate ... -func (c AccountFiltersClient) AccountFiltersUpdate(ctx context.Context, id AccountFilterId, input AccountFilter) (result AccountFiltersUpdateOperationResponse, err error) { - req, err := c.preparerForAccountFiltersUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAccountFiltersUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accountfilters.AccountFiltersClient", "AccountFiltersUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAccountFiltersUpdate prepares the AccountFiltersUpdate request. -func (c AccountFiltersClient) preparerForAccountFiltersUpdate(ctx context.Context, id AccountFilterId, input AccountFilter) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAccountFiltersUpdate handles the response to the AccountFiltersUpdate request. The method always -// closes the http.Response Body. -func (c AccountFiltersClient) responderForAccountFiltersUpdate(resp *http.Response) (result AccountFiltersUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_accountfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_accountfilter.go deleted file mode 100644 index 5f99540d26e8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_accountfilter.go +++ /dev/null @@ -1,16 +0,0 @@ -package accountfilters - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountFilter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *MediaFilterProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_filtertrackpropertycondition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_filtertrackpropertycondition.go deleted file mode 100644 index ecfd372cc9cc..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_filtertrackpropertycondition.go +++ /dev/null @@ -1,10 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackPropertyCondition struct { - Operation FilterTrackPropertyCompareOperation `json:"operation"` - Property FilterTrackPropertyType `json:"property"` - Value string `json:"value"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_filtertrackselection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_filtertrackselection.go deleted file mode 100644 index d80799ed2c0f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_filtertrackselection.go +++ /dev/null @@ -1,8 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackSelection struct { - TrackSelections []FilterTrackPropertyCondition `json:"trackSelections"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_firstquality.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_firstquality.go deleted file mode 100644 index c4854fd56969..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_firstquality.go +++ /dev/null @@ -1,8 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirstQuality struct { - Bitrate int64 `json:"bitrate"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_mediafilterproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_mediafilterproperties.go deleted file mode 100644 index 70be94a28728..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_mediafilterproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaFilterProperties struct { - FirstQuality *FirstQuality `json:"firstQuality,omitempty"` - PresentationTimeRange *PresentationTimeRange `json:"presentationTimeRange,omitempty"` - Tracks *[]FilterTrackSelection `json:"tracks,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_presentationtimerange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_presentationtimerange.go deleted file mode 100644 index f36ec8315716..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/model_presentationtimerange.go +++ /dev/null @@ -1,13 +0,0 @@ -package accountfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PresentationTimeRange struct { - EndTimestamp *int64 `json:"endTimestamp,omitempty"` - ForceEndTimestamp *bool `json:"forceEndTimestamp,omitempty"` - LiveBackoffDuration *int64 `json:"liveBackoffDuration,omitempty"` - PresentationWindowDuration *int64 `json:"presentationWindowDuration,omitempty"` - StartTimestamp *int64 `json:"startTimestamp,omitempty"` - Timescale *int64 `json:"timescale,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/predicates.go deleted file mode 100644 index ad92fefc81af..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/predicates.go +++ /dev/null @@ -1,24 +0,0 @@ -package accountfilters - -type AccountFilterOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p AccountFilterOperationPredicate) Matches(input AccountFilter) bool { - - if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/version.go deleted file mode 100644 index d9e58d88e3a1..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package accountfilters - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2020-05-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accountfilters/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/README.md deleted file mode 100644 index cfe536f5a574..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/README.md +++ /dev/null @@ -1,308 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts` Documentation - -The `accounts` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2020-05-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts" -``` - - -### Client Initialization - -```go -client := accounts.NewAccountsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AccountsClient.LocationsCheckNameAvailability` - -```go -ctx := context.TODO() -id := accounts.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -payload := accounts.CheckNameAvailabilityInput{ - // ... -} - - -read, err := client.LocationsCheckNameAvailability(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.MediaservicesCreateOrUpdate` - -```go -ctx := context.TODO() -id := accounts.NewProviderMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -payload := accounts.MediaService{ - // ... -} - - -read, err := client.MediaservicesCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.MediaservicesDelete` - -```go -ctx := context.TODO() -id := accounts.NewProviderMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -read, err := client.MediaservicesDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.MediaservicesGet` - -```go -ctx := context.TODO() -id := accounts.NewProviderMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -read, err := client.MediaservicesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.MediaservicesGetBySubscription` - -```go -ctx := context.TODO() -id := accounts.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "mediaServiceValue") - -read, err := client.MediaservicesGetBySubscription(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.MediaservicesList` - -```go -ctx := context.TODO() -id := accounts.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.MediaservicesList(ctx, id)` can be used to do batched pagination -items, err := client.MediaservicesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AccountsClient.MediaservicesListBySubscription` - -```go -ctx := context.TODO() -id := accounts.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.MediaservicesListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.MediaservicesListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AccountsClient.MediaservicesListEdgePolicies` - -```go -ctx := context.TODO() -id := accounts.NewProviderMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -payload := accounts.ListEdgePoliciesInput{ - // ... -} - - -read, err := client.MediaservicesListEdgePolicies(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.MediaservicesSyncStorageKeys` - -```go -ctx := context.TODO() -id := accounts.NewProviderMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -payload := accounts.SyncStorageKeysInput{ - // ... -} - - -read, err := client.MediaservicesSyncStorageKeys(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.MediaservicesUpdate` - -```go -ctx := context.TODO() -id := accounts.NewProviderMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -payload := accounts.MediaService{ - // ... -} - - -read, err := client.MediaservicesUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.PrivateEndpointConnectionsCreateOrUpdate` - -```go -ctx := context.TODO() -id := accounts.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "privateEndpointConnectionValue") - -payload := accounts.PrivateEndpointConnection{ - // ... -} - - -read, err := client.PrivateEndpointConnectionsCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.PrivateEndpointConnectionsDelete` - -```go -ctx := context.TODO() -id := accounts.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "privateEndpointConnectionValue") - -read, err := client.PrivateEndpointConnectionsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.PrivateEndpointConnectionsGet` - -```go -ctx := context.TODO() -id := accounts.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "privateEndpointConnectionValue") - -read, err := client.PrivateEndpointConnectionsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.PrivateEndpointConnectionsList` - -```go -ctx := context.TODO() -id := accounts.NewProviderMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -read, err := client.PrivateEndpointConnectionsList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.PrivateLinkResourcesGet` - -```go -ctx := context.TODO() -id := accounts.NewPrivateLinkResourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "privateLinkResourceValue") - -read, err := client.PrivateLinkResourcesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AccountsClient.PrivateLinkResourcesList` - -```go -ctx := context.TODO() -id := accounts.NewProviderMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -read, err := client.PrivateLinkResourcesList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/client.go deleted file mode 100644 index edcf2d80f353..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/client.go +++ /dev/null @@ -1,18 +0,0 @@ -package accounts - -import "github.com/Azure/go-autorest/autorest" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountsClient struct { - Client autorest.Client - baseUri string -} - -func NewAccountsClientWithBaseURI(endpoint string) AccountsClient { - return AccountsClient{ - Client: autorest.NewClientWithUserAgent(userAgent()), - baseUri: endpoint, - } -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/constants.go deleted file mode 100644 index 3768d9533457..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/constants.go +++ /dev/null @@ -1,155 +0,0 @@ -package accounts - -import "strings" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountEncryptionKeyType string - -const ( - AccountEncryptionKeyTypeCustomerKey AccountEncryptionKeyType = "CustomerKey" - AccountEncryptionKeyTypeSystemKey AccountEncryptionKeyType = "SystemKey" -) - -func PossibleValuesForAccountEncryptionKeyType() []string { - return []string{ - string(AccountEncryptionKeyTypeCustomerKey), - string(AccountEncryptionKeyTypeSystemKey), - } -} - -func parseAccountEncryptionKeyType(input string) (*AccountEncryptionKeyType, error) { - vals := map[string]AccountEncryptionKeyType{ - "customerkey": AccountEncryptionKeyTypeCustomerKey, - "systemkey": AccountEncryptionKeyTypeSystemKey, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AccountEncryptionKeyType(input) - return &out, nil -} - -type PrivateEndpointConnectionProvisioningState string - -const ( - PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" - PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" - PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" - PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" -) - -func PossibleValuesForPrivateEndpointConnectionProvisioningState() []string { - return []string{ - string(PrivateEndpointConnectionProvisioningStateCreating), - string(PrivateEndpointConnectionProvisioningStateDeleting), - string(PrivateEndpointConnectionProvisioningStateFailed), - string(PrivateEndpointConnectionProvisioningStateSucceeded), - } -} - -func parsePrivateEndpointConnectionProvisioningState(input string) (*PrivateEndpointConnectionProvisioningState, error) { - vals := map[string]PrivateEndpointConnectionProvisioningState{ - "creating": PrivateEndpointConnectionProvisioningStateCreating, - "deleting": PrivateEndpointConnectionProvisioningStateDeleting, - "failed": PrivateEndpointConnectionProvisioningStateFailed, - "succeeded": PrivateEndpointConnectionProvisioningStateSucceeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PrivateEndpointConnectionProvisioningState(input) - return &out, nil -} - -type PrivateEndpointServiceConnectionStatus string - -const ( - PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" - PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" - PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" -) - -func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string { - return []string{ - string(PrivateEndpointServiceConnectionStatusApproved), - string(PrivateEndpointServiceConnectionStatusPending), - string(PrivateEndpointServiceConnectionStatusRejected), - } -} - -func parsePrivateEndpointServiceConnectionStatus(input string) (*PrivateEndpointServiceConnectionStatus, error) { - vals := map[string]PrivateEndpointServiceConnectionStatus{ - "approved": PrivateEndpointServiceConnectionStatusApproved, - "pending": PrivateEndpointServiceConnectionStatusPending, - "rejected": PrivateEndpointServiceConnectionStatusRejected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PrivateEndpointServiceConnectionStatus(input) - return &out, nil -} - -type StorageAccountType string - -const ( - StorageAccountTypePrimary StorageAccountType = "Primary" - StorageAccountTypeSecondary StorageAccountType = "Secondary" -) - -func PossibleValuesForStorageAccountType() []string { - return []string{ - string(StorageAccountTypePrimary), - string(StorageAccountTypeSecondary), - } -} - -func parseStorageAccountType(input string) (*StorageAccountType, error) { - vals := map[string]StorageAccountType{ - "primary": StorageAccountTypePrimary, - "secondary": StorageAccountTypeSecondary, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StorageAccountType(input) - return &out, nil -} - -type StorageAuthentication string - -const ( - StorageAuthenticationManagedIdentity StorageAuthentication = "ManagedIdentity" - StorageAuthenticationSystem StorageAuthentication = "System" -) - -func PossibleValuesForStorageAuthentication() []string { - return []string{ - string(StorageAuthenticationManagedIdentity), - string(StorageAuthenticationSystem), - } -} - -func parseStorageAuthentication(input string) (*StorageAuthentication, error) { - vals := map[string]StorageAuthentication{ - "managedidentity": StorageAuthenticationManagedIdentity, - "system": StorageAuthenticationSystem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StorageAuthentication(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_location.go deleted file mode 100644 index 5060f1c3c199..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_location.go +++ /dev/null @@ -1,111 +0,0 @@ -package accounts - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, fmt.Errorf("the segment 'locationName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, fmt.Errorf("the segment 'locationName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Media/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_mediaservice.go deleted file mode 100644 index d9192b043956..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_mediaservice.go +++ /dev/null @@ -1,111 +0,0 @@ -package accounts - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_privateendpointconnection.go deleted file mode 100644 index 91ac4154975f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_privateendpointconnection.go +++ /dev/null @@ -1,137 +0,0 @@ -package accounts - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = PrivateEndpointConnectionId{} - -// PrivateEndpointConnectionId is a struct representing the Resource ID for a Private Endpoint Connection -type PrivateEndpointConnectionId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - PrivateEndpointConnectionName string -} - -// NewPrivateEndpointConnectionID returns a new PrivateEndpointConnectionId struct -func NewPrivateEndpointConnectionID(subscriptionId string, resourceGroupName string, mediaServiceName string, privateEndpointConnectionName string) PrivateEndpointConnectionId { - return PrivateEndpointConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - PrivateEndpointConnectionName: privateEndpointConnectionName, - } -} - -// ParsePrivateEndpointConnectionID parses 'input' into a PrivateEndpointConnectionId -func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, fmt.Errorf("the segment 'privateEndpointConnectionName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParsePrivateEndpointConnectionIDInsensitively parses 'input' case-insensitively into a PrivateEndpointConnectionId -// note: this method should only be used for API response data and not user input -func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpointConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, fmt.Errorf("the segment 'privateEndpointConnectionName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID -func ValidatePrivateEndpointConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateEndpointConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Endpoint Connection ID -func (id PrivateEndpointConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/privateEndpointConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.PrivateEndpointConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Endpoint Connection ID -func (id PrivateEndpointConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticPrivateEndpointConnections", "privateEndpointConnections", "privateEndpointConnections"), - resourceids.UserSpecifiedSegment("privateEndpointConnectionName", "privateEndpointConnectionValue"), - } -} - -// String returns a human-readable description of this Private Endpoint Connection ID -func (id PrivateEndpointConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Private Endpoint Connection Name: %q", id.PrivateEndpointConnectionName), - } - return fmt.Sprintf("Private Endpoint Connection (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_privatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_privatelinkresource.go deleted file mode 100644 index 2a2198185bbf..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_privatelinkresource.go +++ /dev/null @@ -1,137 +0,0 @@ -package accounts - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = PrivateLinkResourceId{} - -// PrivateLinkResourceId is a struct representing the Resource ID for a Private Link Resource -type PrivateLinkResourceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - PrivateLinkResourceName string -} - -// NewPrivateLinkResourceID returns a new PrivateLinkResourceId struct -func NewPrivateLinkResourceID(subscriptionId string, resourceGroupName string, mediaServiceName string, privateLinkResourceName string) PrivateLinkResourceId { - return PrivateLinkResourceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - PrivateLinkResourceName: privateLinkResourceName, - } -} - -// ParsePrivateLinkResourceID parses 'input' into a PrivateLinkResourceId -func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateLinkResourceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateLinkResourceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.PrivateLinkResourceName, ok = parsed.Parsed["privateLinkResourceName"]; !ok { - return nil, fmt.Errorf("the segment 'privateLinkResourceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParsePrivateLinkResourceIDInsensitively parses 'input' case-insensitively into a PrivateLinkResourceId -// note: this method should only be used for API response data and not user input -func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResourceId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateLinkResourceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateLinkResourceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.PrivateLinkResourceName, ok = parsed.Parsed["privateLinkResourceName"]; !ok { - return nil, fmt.Errorf("the segment 'privateLinkResourceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidatePrivateLinkResourceID checks that 'input' can be parsed as a Private Link Resource ID -func ValidatePrivateLinkResourceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateLinkResourceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Link Resource ID -func (id PrivateLinkResourceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/privateLinkResources/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.PrivateLinkResourceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Link Resource ID -func (id PrivateLinkResourceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticPrivateLinkResources", "privateLinkResources", "privateLinkResources"), - resourceids.UserSpecifiedSegment("privateLinkResourceName", "privateLinkResourceValue"), - } -} - -// String returns a human-readable description of this Private Link Resource ID -func (id PrivateLinkResourceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Private Link Resource Name: %q", id.PrivateLinkResourceName), - } - return fmt.Sprintf("Private Link Resource (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_providermediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_providermediaservice.go deleted file mode 100644 index eeda801ab3e1..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/id_providermediaservice.go +++ /dev/null @@ -1,124 +0,0 @@ -package accounts - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = ProviderMediaServiceId{} - -// ProviderMediaServiceId is a struct representing the Resource ID for a Provider Media Service -type ProviderMediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewProviderMediaServiceID returns a new ProviderMediaServiceId struct -func NewProviderMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) ProviderMediaServiceId { - return ProviderMediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseProviderMediaServiceID parses 'input' into a ProviderMediaServiceId -func ParseProviderMediaServiceID(input string) (*ProviderMediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderMediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderMediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseProviderMediaServiceIDInsensitively parses 'input' case-insensitively into a ProviderMediaServiceId -// note: this method should only be used for API response data and not user input -func ParseProviderMediaServiceIDInsensitively(input string) (*ProviderMediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderMediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderMediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateProviderMediaServiceID checks that 'input' can be parsed as a Provider Media Service ID -func ValidateProviderMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviderMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Media Service ID -func (id ProviderMediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Media Service ID -func (id ProviderMediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Provider Media Service ID -func (id ProviderMediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Provider Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_locationschecknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_locationschecknameavailability_autorest.go deleted file mode 100644 index a73326352ae4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_locationschecknameavailability_autorest.go +++ /dev/null @@ -1,70 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocationsCheckNameAvailabilityOperationResponse struct { - HttpResponse *http.Response - Model *EntityNameAvailabilityCheckOutput -} - -// LocationsCheckNameAvailability ... -func (c AccountsClient) LocationsCheckNameAvailability(ctx context.Context, id LocationId, input CheckNameAvailabilityInput) (result LocationsCheckNameAvailabilityOperationResponse, err error) { - req, err := c.preparerForLocationsCheckNameAvailability(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "LocationsCheckNameAvailability", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "LocationsCheckNameAvailability", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForLocationsCheckNameAvailability(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "LocationsCheckNameAvailability", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForLocationsCheckNameAvailability prepares the LocationsCheckNameAvailability request. -func (c AccountsClient) preparerForLocationsCheckNameAvailability(ctx context.Context, id LocationId, input CheckNameAvailabilityInput) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/checkNameAvailability", id.ID())), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForLocationsCheckNameAvailability handles the response to the LocationsCheckNameAvailability request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForLocationsCheckNameAvailability(resp *http.Response) (result LocationsCheckNameAvailabilityOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicescreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicescreateorupdate_autorest.go deleted file mode 100644 index b3a62f89a7c2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicescreateorupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - Model *MediaService -} - -// MediaservicesCreateOrUpdate ... -func (c AccountsClient) MediaservicesCreateOrUpdate(ctx context.Context, id ProviderMediaServiceId, input MediaService) (result MediaservicesCreateOrUpdateOperationResponse, err error) { - req, err := c.preparerForMediaservicesCreateOrUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesCreateOrUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesCreateOrUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForMediaservicesCreateOrUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesCreateOrUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForMediaservicesCreateOrUpdate prepares the MediaservicesCreateOrUpdate request. -func (c AccountsClient) preparerForMediaservicesCreateOrUpdate(ctx context.Context, id ProviderMediaServiceId, input MediaService) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForMediaservicesCreateOrUpdate handles the response to the MediaservicesCreateOrUpdate request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForMediaservicesCreateOrUpdate(resp *http.Response) (result MediaservicesCreateOrUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicesdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicesdelete_autorest.go deleted file mode 100644 index 7bc350f8ff5b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicesdelete_autorest.go +++ /dev/null @@ -1,66 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesDeleteOperationResponse struct { - HttpResponse *http.Response -} - -// MediaservicesDelete ... -func (c AccountsClient) MediaservicesDelete(ctx context.Context, id ProviderMediaServiceId) (result MediaservicesDeleteOperationResponse, err error) { - req, err := c.preparerForMediaservicesDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesDelete", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesDelete", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForMediaservicesDelete(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesDelete", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForMediaservicesDelete prepares the MediaservicesDelete request. -func (c AccountsClient) preparerForMediaservicesDelete(ctx context.Context, id ProviderMediaServiceId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForMediaservicesDelete handles the response to the MediaservicesDelete request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForMediaservicesDelete(resp *http.Response) (result MediaservicesDeleteOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicesget_autorest.go deleted file mode 100644 index d7128cdf465c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicesget_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesGetOperationResponse struct { - HttpResponse *http.Response - Model *MediaService -} - -// MediaservicesGet ... -func (c AccountsClient) MediaservicesGet(ctx context.Context, id ProviderMediaServiceId) (result MediaservicesGetOperationResponse, err error) { - req, err := c.preparerForMediaservicesGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesGet", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesGet", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForMediaservicesGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesGet", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForMediaservicesGet prepares the MediaservicesGet request. -func (c AccountsClient) preparerForMediaservicesGet(ctx context.Context, id ProviderMediaServiceId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForMediaservicesGet handles the response to the MediaservicesGet request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForMediaservicesGet(resp *http.Response) (result MediaservicesGetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicesgetbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicesgetbysubscription_autorest.go deleted file mode 100644 index 87015c126376..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicesgetbysubscription_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesGetBySubscriptionOperationResponse struct { - HttpResponse *http.Response - Model *MediaService -} - -// MediaservicesGetBySubscription ... -func (c AccountsClient) MediaservicesGetBySubscription(ctx context.Context, id MediaServiceId) (result MediaservicesGetBySubscriptionOperationResponse, err error) { - req, err := c.preparerForMediaservicesGetBySubscription(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesGetBySubscription", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesGetBySubscription", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForMediaservicesGetBySubscription(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesGetBySubscription", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForMediaservicesGetBySubscription prepares the MediaservicesGetBySubscription request. -func (c AccountsClient) preparerForMediaservicesGetBySubscription(ctx context.Context, id MediaServiceId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForMediaservicesGetBySubscription handles the response to the MediaservicesGetBySubscription request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForMediaservicesGetBySubscription(resp *http.Response) (result MediaservicesGetBySubscriptionOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaserviceslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaserviceslist_autorest.go deleted file mode 100644 index 45adcabb761f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaserviceslist_autorest.go +++ /dev/null @@ -1,187 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesListOperationResponse struct { - HttpResponse *http.Response - Model *[]MediaService - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (MediaservicesListOperationResponse, error) -} - -type MediaservicesListCompleteResult struct { - Items []MediaService -} - -func (r MediaservicesListOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r MediaservicesListOperationResponse) LoadMore(ctx context.Context) (resp MediaservicesListOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -// MediaservicesList ... -func (c AccountsClient) MediaservicesList(ctx context.Context, id commonids.ResourceGroupId) (resp MediaservicesListOperationResponse, err error) { - req, err := c.preparerForMediaservicesList(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesList", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesList", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForMediaservicesList(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesList", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForMediaservicesList prepares the MediaservicesList request. -func (c AccountsClient) preparerForMediaservicesList(ctx context.Context, id commonids.ResourceGroupId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Media/mediaServices", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForMediaservicesListWithNextLink prepares the MediaservicesList request with the given nextLink token. -func (c AccountsClient) preparerForMediaservicesListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForMediaservicesList handles the response to the MediaservicesList request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForMediaservicesList(resp *http.Response) (result MediaservicesListOperationResponse, err error) { - type page struct { - Values []MediaService `json:"value"` - NextLink *string `json:"@odata.nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result MediaservicesListOperationResponse, err error) { - req, err := c.preparerForMediaservicesListWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesList", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesList", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForMediaservicesList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesList", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// MediaservicesListComplete retrieves all of the results into a single object -func (c AccountsClient) MediaservicesListComplete(ctx context.Context, id commonids.ResourceGroupId) (MediaservicesListCompleteResult, error) { - return c.MediaservicesListCompleteMatchingPredicate(ctx, id, MediaServiceOperationPredicate{}) -} - -// MediaservicesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AccountsClient) MediaservicesListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate MediaServiceOperationPredicate) (resp MediaservicesListCompleteResult, err error) { - items := make([]MediaService, 0) - - page, err := c.MediaservicesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := MediaservicesListCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaserviceslistbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaserviceslistbysubscription_autorest.go deleted file mode 100644 index 592c1b3162f0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaserviceslistbysubscription_autorest.go +++ /dev/null @@ -1,187 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - Model *[]MediaService - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (MediaservicesListBySubscriptionOperationResponse, error) -} - -type MediaservicesListBySubscriptionCompleteResult struct { - Items []MediaService -} - -func (r MediaservicesListBySubscriptionOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r MediaservicesListBySubscriptionOperationResponse) LoadMore(ctx context.Context) (resp MediaservicesListBySubscriptionOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -// MediaservicesListBySubscription ... -func (c AccountsClient) MediaservicesListBySubscription(ctx context.Context, id commonids.SubscriptionId) (resp MediaservicesListBySubscriptionOperationResponse, err error) { - req, err := c.preparerForMediaservicesListBySubscription(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesListBySubscription", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesListBySubscription", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForMediaservicesListBySubscription(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesListBySubscription", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForMediaservicesListBySubscription prepares the MediaservicesListBySubscription request. -func (c AccountsClient) preparerForMediaservicesListBySubscription(ctx context.Context, id commonids.SubscriptionId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Media/mediaServices", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForMediaservicesListBySubscriptionWithNextLink prepares the MediaservicesListBySubscription request with the given nextLink token. -func (c AccountsClient) preparerForMediaservicesListBySubscriptionWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForMediaservicesListBySubscription handles the response to the MediaservicesListBySubscription request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForMediaservicesListBySubscription(resp *http.Response) (result MediaservicesListBySubscriptionOperationResponse, err error) { - type page struct { - Values []MediaService `json:"value"` - NextLink *string `json:"@odata.nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result MediaservicesListBySubscriptionOperationResponse, err error) { - req, err := c.preparerForMediaservicesListBySubscriptionWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesListBySubscription", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesListBySubscription", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForMediaservicesListBySubscription(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesListBySubscription", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// MediaservicesListBySubscriptionComplete retrieves all of the results into a single object -func (c AccountsClient) MediaservicesListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (MediaservicesListBySubscriptionCompleteResult, error) { - return c.MediaservicesListBySubscriptionCompleteMatchingPredicate(ctx, id, MediaServiceOperationPredicate{}) -} - -// MediaservicesListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AccountsClient) MediaservicesListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate MediaServiceOperationPredicate) (resp MediaservicesListBySubscriptionCompleteResult, err error) { - items := make([]MediaService, 0) - - page, err := c.MediaservicesListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := MediaservicesListBySubscriptionCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaserviceslistedgepolicies_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaserviceslistedgepolicies_autorest.go deleted file mode 100644 index 8d733911a572..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaserviceslistedgepolicies_autorest.go +++ /dev/null @@ -1,70 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesListEdgePoliciesOperationResponse struct { - HttpResponse *http.Response - Model *EdgePolicies -} - -// MediaservicesListEdgePolicies ... -func (c AccountsClient) MediaservicesListEdgePolicies(ctx context.Context, id ProviderMediaServiceId, input ListEdgePoliciesInput) (result MediaservicesListEdgePoliciesOperationResponse, err error) { - req, err := c.preparerForMediaservicesListEdgePolicies(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesListEdgePolicies", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesListEdgePolicies", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForMediaservicesListEdgePolicies(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesListEdgePolicies", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForMediaservicesListEdgePolicies prepares the MediaservicesListEdgePolicies request. -func (c AccountsClient) preparerForMediaservicesListEdgePolicies(ctx context.Context, id ProviderMediaServiceId, input ListEdgePoliciesInput) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/listEdgePolicies", id.ID())), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForMediaservicesListEdgePolicies handles the response to the MediaservicesListEdgePolicies request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForMediaservicesListEdgePolicies(resp *http.Response) (result MediaservicesListEdgePoliciesOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicessyncstoragekeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicessyncstoragekeys_autorest.go deleted file mode 100644 index 48fd8e7f629f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicessyncstoragekeys_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesSyncStorageKeysOperationResponse struct { - HttpResponse *http.Response -} - -// MediaservicesSyncStorageKeys ... -func (c AccountsClient) MediaservicesSyncStorageKeys(ctx context.Context, id ProviderMediaServiceId, input SyncStorageKeysInput) (result MediaservicesSyncStorageKeysOperationResponse, err error) { - req, err := c.preparerForMediaservicesSyncStorageKeys(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesSyncStorageKeys", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesSyncStorageKeys", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForMediaservicesSyncStorageKeys(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesSyncStorageKeys", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForMediaservicesSyncStorageKeys prepares the MediaservicesSyncStorageKeys request. -func (c AccountsClient) preparerForMediaservicesSyncStorageKeys(ctx context.Context, id ProviderMediaServiceId, input SyncStorageKeysInput) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/syncStorageKeys", id.ID())), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForMediaservicesSyncStorageKeys handles the response to the MediaservicesSyncStorageKeys request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForMediaservicesSyncStorageKeys(resp *http.Response) (result MediaservicesSyncStorageKeysOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicesupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicesupdate_autorest.go deleted file mode 100644 index efb4edebbbed..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_mediaservicesupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaservicesUpdateOperationResponse struct { - HttpResponse *http.Response - Model *MediaService -} - -// MediaservicesUpdate ... -func (c AccountsClient) MediaservicesUpdate(ctx context.Context, id ProviderMediaServiceId, input MediaService) (result MediaservicesUpdateOperationResponse, err error) { - req, err := c.preparerForMediaservicesUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForMediaservicesUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "MediaservicesUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForMediaservicesUpdate prepares the MediaservicesUpdate request. -func (c AccountsClient) preparerForMediaservicesUpdate(ctx context.Context, id ProviderMediaServiceId, input MediaService) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForMediaservicesUpdate handles the response to the MediaservicesUpdate request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForMediaservicesUpdate(resp *http.Response) (result MediaservicesUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privateendpointconnectionscreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privateendpointconnectionscreateorupdate_autorest.go deleted file mode 100644 index 9eadb86f9b34..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privateendpointconnectionscreateorupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionsCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - Model *PrivateEndpointConnection -} - -// PrivateEndpointConnectionsCreateOrUpdate ... -func (c AccountsClient) PrivateEndpointConnectionsCreateOrUpdate(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection) (result PrivateEndpointConnectionsCreateOrUpdateOperationResponse, err error) { - req, err := c.preparerForPrivateEndpointConnectionsCreateOrUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateEndpointConnectionsCreateOrUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateEndpointConnectionsCreateOrUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForPrivateEndpointConnectionsCreateOrUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateEndpointConnectionsCreateOrUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForPrivateEndpointConnectionsCreateOrUpdate prepares the PrivateEndpointConnectionsCreateOrUpdate request. -func (c AccountsClient) preparerForPrivateEndpointConnectionsCreateOrUpdate(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForPrivateEndpointConnectionsCreateOrUpdate handles the response to the PrivateEndpointConnectionsCreateOrUpdate request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForPrivateEndpointConnectionsCreateOrUpdate(resp *http.Response) (result PrivateEndpointConnectionsCreateOrUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privateendpointconnectionsdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privateendpointconnectionsdelete_autorest.go deleted file mode 100644 index 1b37407841af..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privateendpointconnectionsdelete_autorest.go +++ /dev/null @@ -1,66 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionsDeleteOperationResponse struct { - HttpResponse *http.Response -} - -// PrivateEndpointConnectionsDelete ... -func (c AccountsClient) PrivateEndpointConnectionsDelete(ctx context.Context, id PrivateEndpointConnectionId) (result PrivateEndpointConnectionsDeleteOperationResponse, err error) { - req, err := c.preparerForPrivateEndpointConnectionsDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateEndpointConnectionsDelete", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateEndpointConnectionsDelete", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForPrivateEndpointConnectionsDelete(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateEndpointConnectionsDelete", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForPrivateEndpointConnectionsDelete prepares the PrivateEndpointConnectionsDelete request. -func (c AccountsClient) preparerForPrivateEndpointConnectionsDelete(ctx context.Context, id PrivateEndpointConnectionId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForPrivateEndpointConnectionsDelete handles the response to the PrivateEndpointConnectionsDelete request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForPrivateEndpointConnectionsDelete(resp *http.Response) (result PrivateEndpointConnectionsDeleteOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privateendpointconnectionsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privateendpointconnectionsget_autorest.go deleted file mode 100644 index 26ae803596a2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privateendpointconnectionsget_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionsGetOperationResponse struct { - HttpResponse *http.Response - Model *PrivateEndpointConnection -} - -// PrivateEndpointConnectionsGet ... -func (c AccountsClient) PrivateEndpointConnectionsGet(ctx context.Context, id PrivateEndpointConnectionId) (result PrivateEndpointConnectionsGetOperationResponse, err error) { - req, err := c.preparerForPrivateEndpointConnectionsGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateEndpointConnectionsGet", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateEndpointConnectionsGet", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForPrivateEndpointConnectionsGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateEndpointConnectionsGet", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForPrivateEndpointConnectionsGet prepares the PrivateEndpointConnectionsGet request. -func (c AccountsClient) preparerForPrivateEndpointConnectionsGet(ctx context.Context, id PrivateEndpointConnectionId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForPrivateEndpointConnectionsGet handles the response to the PrivateEndpointConnectionsGet request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForPrivateEndpointConnectionsGet(resp *http.Response) (result PrivateEndpointConnectionsGetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privateendpointconnectionslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privateendpointconnectionslist_autorest.go deleted file mode 100644 index 155eab769073..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privateendpointconnectionslist_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionsListOperationResponse struct { - HttpResponse *http.Response - Model *PrivateEndpointConnectionListResult -} - -// PrivateEndpointConnectionsList ... -func (c AccountsClient) PrivateEndpointConnectionsList(ctx context.Context, id ProviderMediaServiceId) (result PrivateEndpointConnectionsListOperationResponse, err error) { - req, err := c.preparerForPrivateEndpointConnectionsList(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateEndpointConnectionsList", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateEndpointConnectionsList", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForPrivateEndpointConnectionsList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateEndpointConnectionsList", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForPrivateEndpointConnectionsList prepares the PrivateEndpointConnectionsList request. -func (c AccountsClient) preparerForPrivateEndpointConnectionsList(ctx context.Context, id ProviderMediaServiceId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/privateEndpointConnections", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForPrivateEndpointConnectionsList handles the response to the PrivateEndpointConnectionsList request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForPrivateEndpointConnectionsList(resp *http.Response) (result PrivateEndpointConnectionsListOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privatelinkresourcesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privatelinkresourcesget_autorest.go deleted file mode 100644 index f755ef52de09..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privatelinkresourcesget_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package accounts - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkResourcesGetOperationResponse struct { - HttpResponse *http.Response - Model *PrivateLinkResource -} - -// PrivateLinkResourcesGet ... -func (c AccountsClient) PrivateLinkResourcesGet(ctx context.Context, id PrivateLinkResourceId) (result PrivateLinkResourcesGetOperationResponse, err error) { - req, err := c.preparerForPrivateLinkResourcesGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateLinkResourcesGet", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateLinkResourcesGet", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForPrivateLinkResourcesGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateLinkResourcesGet", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForPrivateLinkResourcesGet prepares the PrivateLinkResourcesGet request. -func (c AccountsClient) preparerForPrivateLinkResourcesGet(ctx context.Context, id PrivateLinkResourceId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForPrivateLinkResourcesGet handles the response to the PrivateLinkResourcesGet request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForPrivateLinkResourcesGet(resp *http.Response) (result PrivateLinkResourcesGetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privatelinkresourceslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privatelinkresourceslist_autorest.go deleted file mode 100644 index 4541ccb02b6e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/method_privatelinkresourceslist_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package accounts - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkResourcesListOperationResponse struct { - HttpResponse *http.Response - Model *PrivateLinkResourceListResult -} - -// PrivateLinkResourcesList ... -func (c AccountsClient) PrivateLinkResourcesList(ctx context.Context, id ProviderMediaServiceId) (result PrivateLinkResourcesListOperationResponse, err error) { - req, err := c.preparerForPrivateLinkResourcesList(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateLinkResourcesList", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateLinkResourcesList", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForPrivateLinkResourcesList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "accounts.AccountsClient", "PrivateLinkResourcesList", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForPrivateLinkResourcesList prepares the PrivateLinkResourcesList request. -func (c AccountsClient) preparerForPrivateLinkResourcesList(ctx context.Context, id ProviderMediaServiceId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/privateLinkResources", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForPrivateLinkResourcesList handles the response to the PrivateLinkResourcesList request. The method always -// closes the http.Response Body. -func (c AccountsClient) responderForPrivateLinkResourcesList(resp *http.Response) (result PrivateLinkResourcesListOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_accountencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_accountencryption.go deleted file mode 100644 index 464a5dae1645..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_accountencryption.go +++ /dev/null @@ -1,9 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountEncryption struct { - KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"` - Type AccountEncryptionKeyType `json:"type"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_checknameavailabilityinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_checknameavailabilityinput.go deleted file mode 100644 index 707c4a0bdaba..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_checknameavailabilityinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckNameAvailabilityInput struct { - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_edgepolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_edgepolicies.go deleted file mode 100644 index 1a11ba9b4748..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_edgepolicies.go +++ /dev/null @@ -1,8 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EdgePolicies struct { - UsageDataCollectionPolicy *EdgeUsageDataCollectionPolicy `json:"usageDataCollectionPolicy,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_edgeusagedatacollectionpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_edgeusagedatacollectionpolicy.go deleted file mode 100644 index f58117e0c59b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_edgeusagedatacollectionpolicy.go +++ /dev/null @@ -1,11 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EdgeUsageDataCollectionPolicy struct { - DataCollectionFrequency *string `json:"dataCollectionFrequency,omitempty"` - DataReportingFrequency *string `json:"dataReportingFrequency,omitempty"` - EventHubDetails *EdgeUsageDataEventHub `json:"eventHubDetails,omitempty"` - MaxAllowedUnreportedUsageDuration *string `json:"maxAllowedUnreportedUsageDuration,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_edgeusagedataeventhub.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_edgeusagedataeventhub.go deleted file mode 100644 index 65ac7083283a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_edgeusagedataeventhub.go +++ /dev/null @@ -1,10 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EdgeUsageDataEventHub struct { - Name *string `json:"name,omitempty"` - Namespace *string `json:"namespace,omitempty"` - Token *string `json:"token,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_entitynameavailabilitycheckoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_entitynameavailabilitycheckoutput.go deleted file mode 100644 index 48f4c009d58d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_entitynameavailabilitycheckoutput.go +++ /dev/null @@ -1,10 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EntityNameAvailabilityCheckOutput struct { - Message *string `json:"message,omitempty"` - NameAvailable bool `json:"nameAvailable"` - Reason *string `json:"reason,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_keyvaultproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_keyvaultproperties.go deleted file mode 100644 index f94833df6956..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_keyvaultproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type KeyVaultProperties struct { - CurrentKeyIdentifier *string `json:"currentKeyIdentifier,omitempty"` - KeyIdentifier *string `json:"keyIdentifier,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_listedgepoliciesinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_listedgepoliciesinput.go deleted file mode 100644 index accc1e3b05a7..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_listedgepoliciesinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListEdgePoliciesInput struct { - DeviceId *string `json:"deviceId,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_mediaservice.go deleted file mode 100644 index 8b8a57a833fb..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_mediaservice.go +++ /dev/null @@ -1,20 +0,0 @@ -package accounts - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaService struct { - Id *string `json:"id,omitempty"` - Identity *identity.SystemAssigned `json:"identity,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *MediaServiceProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_mediaserviceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_mediaserviceproperties.go deleted file mode 100644 index 19a3a32f94a9..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_mediaserviceproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaServiceProperties struct { - Encryption *AccountEncryption `json:"encryption,omitempty"` - MediaServiceId *string `json:"mediaServiceId,omitempty"` - StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"` - StorageAuthentication *StorageAuthentication `json:"storageAuthentication,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privateendpoint.go deleted file mode 100644 index 02b184cde738..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privateendpoint.go +++ /dev/null @@ -1,8 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Id *string `json:"id,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privateendpointconnection.go deleted file mode 100644 index 133080ab8a2b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privateendpointconnection.go +++ /dev/null @@ -1,11 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privateendpointconnectionlistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privateendpointconnectionlistresult.go deleted file mode 100644 index 82d2b5727e1c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privateendpointconnectionlistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionListResult struct { - Value *[]PrivateEndpointConnection `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privateendpointconnectionproperties.go deleted file mode 100644 index fbf3e1aa3377..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState"` - ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privatelinkresource.go deleted file mode 100644 index dc2a3eb52827..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privatelinkresource.go +++ /dev/null @@ -1,11 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkResource struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privatelinkresourcelistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privatelinkresourcelistresult.go deleted file mode 100644 index cc200b3f03a4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privatelinkresourcelistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkResourceListResult struct { - Value *[]PrivateLinkResource `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privatelinkresourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privatelinkresourceproperties.go deleted file mode 100644 index fb7c9a24b991..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privatelinkresourceproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkResourceProperties struct { - GroupId *string `json:"groupId,omitempty"` - RequiredMembers *[]string `json:"requiredMembers,omitempty"` - RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index c7ce04574ec7..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_storageaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_storageaccount.go deleted file mode 100644 index a7d1e58f08fa..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_storageaccount.go +++ /dev/null @@ -1,9 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StorageAccount struct { - Id *string `json:"id,omitempty"` - Type StorageAccountType `json:"type"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_syncstoragekeysinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_syncstoragekeysinput.go deleted file mode 100644 index af87a8312839..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/model_syncstoragekeysinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package accounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncStorageKeysInput struct { - Id *string `json:"id,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/predicates.go deleted file mode 100644 index 21d7064b0ec6..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/predicates.go +++ /dev/null @@ -1,29 +0,0 @@ -package accounts - -type MediaServiceOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p MediaServiceOperationPredicate) Matches(input MediaService) bool { - - if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/version.go deleted file mode 100644 index 625047177c44..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package accounts - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2020-05-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accounts/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/README.md deleted file mode 100644 index 8215bf6e7195..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/README.md +++ /dev/null @@ -1,255 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters` Documentation - -The `assetsandassetfilters` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2020-05-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters" -``` - - -### Client Initialization - -```go -client := assetsandassetfilters.NewAssetsAndAssetFiltersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersCreateOrUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "assetFilterValue") - -payload := assetsandassetfilters.AssetFilter{ - // ... -} - - -read, err := client.AssetFiltersCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersDelete` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "assetFilterValue") - -read, err := client.AssetFiltersDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersGet` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "assetFilterValue") - -read, err := client.AssetFiltersGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersList` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -// alternatively `client.AssetFiltersList(ctx, id)` can be used to do batched pagination -items, err := client.AssetFiltersListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetFiltersUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue", "assetFilterValue") - -payload := assetsandassetfilters.AssetFilter{ - // ... -} - - -read, err := client.AssetFiltersUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsCreateOrUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -payload := assetsandassetfilters.Asset{ - // ... -} - - -read, err := client.AssetsCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsDelete` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.AssetsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsGet` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.AssetsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsGetEncryptionKey` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.AssetsGetEncryptionKey(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsList` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.AssetsList(ctx, id, assetsandassetfilters.DefaultAssetsListOperationOptions())` can be used to do batched pagination -items, err := client.AssetsListComplete(ctx, id, assetsandassetfilters.DefaultAssetsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsListContainerSas` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -payload := assetsandassetfilters.ListContainerSasInput{ - // ... -} - - -read, err := client.AssetsListContainerSas(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsListStreamingLocators` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -read, err := client.AssetsListStreamingLocators(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AssetsAndAssetFiltersClient.AssetsUpdate` - -```go -ctx := context.TODO() -id := assetsandassetfilters.NewAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "assetValue") - -payload := assetsandassetfilters.Asset{ - // ... -} - - -read, err := client.AssetsUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/client.go deleted file mode 100644 index 9d09bfc90b49..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/client.go +++ /dev/null @@ -1,18 +0,0 @@ -package assetsandassetfilters - -import "github.com/Azure/go-autorest/autorest" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsAndAssetFiltersClient struct { - Client autorest.Client - baseUri string -} - -func NewAssetsAndAssetFiltersClientWithBaseURI(endpoint string) AssetsAndAssetFiltersClient { - return AssetsAndAssetFiltersClient{ - Client: autorest.NewClientWithUserAgent(userAgent()), - baseUri: endpoint, - } -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/constants.go deleted file mode 100644 index c010ec3f8cf9..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/constants.go +++ /dev/null @@ -1,133 +0,0 @@ -package assetsandassetfilters - -import "strings" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetContainerPermission string - -const ( - AssetContainerPermissionRead AssetContainerPermission = "Read" - AssetContainerPermissionReadWrite AssetContainerPermission = "ReadWrite" - AssetContainerPermissionReadWriteDelete AssetContainerPermission = "ReadWriteDelete" -) - -func PossibleValuesForAssetContainerPermission() []string { - return []string{ - string(AssetContainerPermissionRead), - string(AssetContainerPermissionReadWrite), - string(AssetContainerPermissionReadWriteDelete), - } -} - -func parseAssetContainerPermission(input string) (*AssetContainerPermission, error) { - vals := map[string]AssetContainerPermission{ - "read": AssetContainerPermissionRead, - "readwrite": AssetContainerPermissionReadWrite, - "readwritedelete": AssetContainerPermissionReadWriteDelete, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AssetContainerPermission(input) - return &out, nil -} - -type AssetStorageEncryptionFormat string - -const ( - AssetStorageEncryptionFormatMediaStorageClientEncryption AssetStorageEncryptionFormat = "MediaStorageClientEncryption" - AssetStorageEncryptionFormatNone AssetStorageEncryptionFormat = "None" -) - -func PossibleValuesForAssetStorageEncryptionFormat() []string { - return []string{ - string(AssetStorageEncryptionFormatMediaStorageClientEncryption), - string(AssetStorageEncryptionFormatNone), - } -} - -func parseAssetStorageEncryptionFormat(input string) (*AssetStorageEncryptionFormat, error) { - vals := map[string]AssetStorageEncryptionFormat{ - "mediastorageclientencryption": AssetStorageEncryptionFormatMediaStorageClientEncryption, - "none": AssetStorageEncryptionFormatNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AssetStorageEncryptionFormat(input) - return &out, nil -} - -type FilterTrackPropertyCompareOperation string - -const ( - FilterTrackPropertyCompareOperationEqual FilterTrackPropertyCompareOperation = "Equal" - FilterTrackPropertyCompareOperationNotEqual FilterTrackPropertyCompareOperation = "NotEqual" -) - -func PossibleValuesForFilterTrackPropertyCompareOperation() []string { - return []string{ - string(FilterTrackPropertyCompareOperationEqual), - string(FilterTrackPropertyCompareOperationNotEqual), - } -} - -func parseFilterTrackPropertyCompareOperation(input string) (*FilterTrackPropertyCompareOperation, error) { - vals := map[string]FilterTrackPropertyCompareOperation{ - "equal": FilterTrackPropertyCompareOperationEqual, - "notequal": FilterTrackPropertyCompareOperationNotEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FilterTrackPropertyCompareOperation(input) - return &out, nil -} - -type FilterTrackPropertyType string - -const ( - FilterTrackPropertyTypeBitrate FilterTrackPropertyType = "Bitrate" - FilterTrackPropertyTypeFourCC FilterTrackPropertyType = "FourCC" - FilterTrackPropertyTypeLanguage FilterTrackPropertyType = "Language" - FilterTrackPropertyTypeName FilterTrackPropertyType = "Name" - FilterTrackPropertyTypeType FilterTrackPropertyType = "Type" - FilterTrackPropertyTypeUnknown FilterTrackPropertyType = "Unknown" -) - -func PossibleValuesForFilterTrackPropertyType() []string { - return []string{ - string(FilterTrackPropertyTypeBitrate), - string(FilterTrackPropertyTypeFourCC), - string(FilterTrackPropertyTypeLanguage), - string(FilterTrackPropertyTypeName), - string(FilterTrackPropertyTypeType), - string(FilterTrackPropertyTypeUnknown), - } -} - -func parseFilterTrackPropertyType(input string) (*FilterTrackPropertyType, error) { - vals := map[string]FilterTrackPropertyType{ - "bitrate": FilterTrackPropertyTypeBitrate, - "fourcc": FilterTrackPropertyTypeFourCC, - "language": FilterTrackPropertyTypeLanguage, - "name": FilterTrackPropertyTypeName, - "type": FilterTrackPropertyTypeType, - "unknown": FilterTrackPropertyTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FilterTrackPropertyType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/id_asset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/id_asset.go deleted file mode 100644 index 0102e8dc7313..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/id_asset.go +++ /dev/null @@ -1,137 +0,0 @@ -package assetsandassetfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = AssetId{} - -// AssetId is a struct representing the Resource ID for a Asset -type AssetId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - AssetName string -} - -// NewAssetID returns a new AssetId struct -func NewAssetID(subscriptionId string, resourceGroupName string, mediaServiceName string, assetName string) AssetId { - return AssetId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - AssetName: assetName, - } -} - -// ParseAssetID parses 'input' into a AssetId -func ParseAssetID(input string) (*AssetId, error) { - parser := resourceids.NewParserFromResourceIdType(AssetId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AssetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, fmt.Errorf("the segment 'assetName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseAssetIDInsensitively parses 'input' case-insensitively into a AssetId -// note: this method should only be used for API response data and not user input -func ParseAssetIDInsensitively(input string) (*AssetId, error) { - parser := resourceids.NewParserFromResourceIdType(AssetId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AssetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, fmt.Errorf("the segment 'assetName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateAssetID checks that 'input' can be parsed as a Asset ID -func ValidateAssetID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAssetID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Asset ID -func (id AssetId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/assets/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.AssetName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Asset ID -func (id AssetId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticAssets", "assets", "assets"), - resourceids.UserSpecifiedSegment("assetName", "assetValue"), - } -} - -// String returns a human-readable description of this Asset ID -func (id AssetId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Asset Name: %q", id.AssetName), - } - return fmt.Sprintf("Asset (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/id_assetfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/id_assetfilter.go deleted file mode 100644 index 3f230a8f82c7..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/id_assetfilter.go +++ /dev/null @@ -1,150 +0,0 @@ -package assetsandassetfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = AssetFilterId{} - -// AssetFilterId is a struct representing the Resource ID for a Asset Filter -type AssetFilterId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - AssetName string - AssetFilterName string -} - -// NewAssetFilterID returns a new AssetFilterId struct -func NewAssetFilterID(subscriptionId string, resourceGroupName string, mediaServiceName string, assetName string, assetFilterName string) AssetFilterId { - return AssetFilterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - AssetName: assetName, - AssetFilterName: assetFilterName, - } -} - -// ParseAssetFilterID parses 'input' into a AssetFilterId -func ParseAssetFilterID(input string) (*AssetFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(AssetFilterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AssetFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, fmt.Errorf("the segment 'assetName' was not found in the resource id %q", input) - } - - if id.AssetFilterName, ok = parsed.Parsed["assetFilterName"]; !ok { - return nil, fmt.Errorf("the segment 'assetFilterName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseAssetFilterIDInsensitively parses 'input' case-insensitively into a AssetFilterId -// note: this method should only be used for API response data and not user input -func ParseAssetFilterIDInsensitively(input string) (*AssetFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(AssetFilterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AssetFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, fmt.Errorf("the segment 'assetName' was not found in the resource id %q", input) - } - - if id.AssetFilterName, ok = parsed.Parsed["assetFilterName"]; !ok { - return nil, fmt.Errorf("the segment 'assetFilterName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateAssetFilterID checks that 'input' can be parsed as a Asset Filter ID -func ValidateAssetFilterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAssetFilterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Asset Filter ID -func (id AssetFilterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/assets/%s/assetFilters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.AssetName, id.AssetFilterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Asset Filter ID -func (id AssetFilterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticAssets", "assets", "assets"), - resourceids.UserSpecifiedSegment("assetName", "assetValue"), - resourceids.StaticSegment("staticAssetFilters", "assetFilters", "assetFilters"), - resourceids.UserSpecifiedSegment("assetFilterName", "assetFilterValue"), - } -} - -// String returns a human-readable description of this Asset Filter ID -func (id AssetFilterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Asset Name: %q", id.AssetName), - fmt.Sprintf("Asset Filter Name: %q", id.AssetFilterName), - } - return fmt.Sprintf("Asset Filter (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/id_mediaservice.go deleted file mode 100644 index 03495a732374..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/id_mediaservice.go +++ /dev/null @@ -1,124 +0,0 @@ -package assetsandassetfilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfilterscreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfilterscreateorupdate_autorest.go deleted file mode 100644 index 770130fe3cab..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfilterscreateorupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - Model *AssetFilter -} - -// AssetFiltersCreateOrUpdate ... -func (c AssetsAndAssetFiltersClient) AssetFiltersCreateOrUpdate(ctx context.Context, id AssetFilterId, input AssetFilter) (result AssetFiltersCreateOrUpdateOperationResponse, err error) { - req, err := c.preparerForAssetFiltersCreateOrUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersCreateOrUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersCreateOrUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAssetFiltersCreateOrUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersCreateOrUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAssetFiltersCreateOrUpdate prepares the AssetFiltersCreateOrUpdate request. -func (c AssetsAndAssetFiltersClient) preparerForAssetFiltersCreateOrUpdate(ctx context.Context, id AssetFilterId, input AssetFilter) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAssetFiltersCreateOrUpdate handles the response to the AssetFiltersCreateOrUpdate request. The method always -// closes the http.Response Body. -func (c AssetsAndAssetFiltersClient) responderForAssetFiltersCreateOrUpdate(resp *http.Response) (result AssetFiltersCreateOrUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfiltersdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfiltersdelete_autorest.go deleted file mode 100644 index ccaa78367b6e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfiltersdelete_autorest.go +++ /dev/null @@ -1,66 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersDeleteOperationResponse struct { - HttpResponse *http.Response -} - -// AssetFiltersDelete ... -func (c AssetsAndAssetFiltersClient) AssetFiltersDelete(ctx context.Context, id AssetFilterId) (result AssetFiltersDeleteOperationResponse, err error) { - req, err := c.preparerForAssetFiltersDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersDelete", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersDelete", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAssetFiltersDelete(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersDelete", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAssetFiltersDelete prepares the AssetFiltersDelete request. -func (c AssetsAndAssetFiltersClient) preparerForAssetFiltersDelete(ctx context.Context, id AssetFilterId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAssetFiltersDelete handles the response to the AssetFiltersDelete request. The method always -// closes the http.Response Body. -func (c AssetsAndAssetFiltersClient) responderForAssetFiltersDelete(resp *http.Response) (result AssetFiltersDeleteOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfiltersget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfiltersget_autorest.go deleted file mode 100644 index 7efc3524f8c0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfiltersget_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersGetOperationResponse struct { - HttpResponse *http.Response - Model *AssetFilter -} - -// AssetFiltersGet ... -func (c AssetsAndAssetFiltersClient) AssetFiltersGet(ctx context.Context, id AssetFilterId) (result AssetFiltersGetOperationResponse, err error) { - req, err := c.preparerForAssetFiltersGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersGet", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersGet", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAssetFiltersGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersGet", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAssetFiltersGet prepares the AssetFiltersGet request. -func (c AssetsAndAssetFiltersClient) preparerForAssetFiltersGet(ctx context.Context, id AssetFilterId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAssetFiltersGet handles the response to the AssetFiltersGet request. The method always -// closes the http.Response Body. -func (c AssetsAndAssetFiltersClient) responderForAssetFiltersGet(resp *http.Response) (result AssetFiltersGetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfilterslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfilterslist_autorest.go deleted file mode 100644 index a042394468d5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfilterslist_autorest.go +++ /dev/null @@ -1,186 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersListOperationResponse struct { - HttpResponse *http.Response - Model *[]AssetFilter - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (AssetFiltersListOperationResponse, error) -} - -type AssetFiltersListCompleteResult struct { - Items []AssetFilter -} - -func (r AssetFiltersListOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r AssetFiltersListOperationResponse) LoadMore(ctx context.Context) (resp AssetFiltersListOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -// AssetFiltersList ... -func (c AssetsAndAssetFiltersClient) AssetFiltersList(ctx context.Context, id AssetId) (resp AssetFiltersListOperationResponse, err error) { - req, err := c.preparerForAssetFiltersList(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersList", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersList", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForAssetFiltersList(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersList", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForAssetFiltersList prepares the AssetFiltersList request. -func (c AssetsAndAssetFiltersClient) preparerForAssetFiltersList(ctx context.Context, id AssetId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/assetFilters", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForAssetFiltersListWithNextLink prepares the AssetFiltersList request with the given nextLink token. -func (c AssetsAndAssetFiltersClient) preparerForAssetFiltersListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAssetFiltersList handles the response to the AssetFiltersList request. The method always -// closes the http.Response Body. -func (c AssetsAndAssetFiltersClient) responderForAssetFiltersList(resp *http.Response) (result AssetFiltersListOperationResponse, err error) { - type page struct { - Values []AssetFilter `json:"value"` - NextLink *string `json:"@odata.nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result AssetFiltersListOperationResponse, err error) { - req, err := c.preparerForAssetFiltersListWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersList", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersList", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAssetFiltersList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersList", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// AssetFiltersListComplete retrieves all of the results into a single object -func (c AssetsAndAssetFiltersClient) AssetFiltersListComplete(ctx context.Context, id AssetId) (AssetFiltersListCompleteResult, error) { - return c.AssetFiltersListCompleteMatchingPredicate(ctx, id, AssetFilterOperationPredicate{}) -} - -// AssetFiltersListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AssetsAndAssetFiltersClient) AssetFiltersListCompleteMatchingPredicate(ctx context.Context, id AssetId, predicate AssetFilterOperationPredicate) (resp AssetFiltersListCompleteResult, err error) { - items := make([]AssetFilter, 0) - - page, err := c.AssetFiltersList(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := AssetFiltersListCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfiltersupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfiltersupdate_autorest.go deleted file mode 100644 index 5ee5c4528709..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetfiltersupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFiltersUpdateOperationResponse struct { - HttpResponse *http.Response - Model *AssetFilter -} - -// AssetFiltersUpdate ... -func (c AssetsAndAssetFiltersClient) AssetFiltersUpdate(ctx context.Context, id AssetFilterId, input AssetFilter) (result AssetFiltersUpdateOperationResponse, err error) { - req, err := c.preparerForAssetFiltersUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAssetFiltersUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetFiltersUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAssetFiltersUpdate prepares the AssetFiltersUpdate request. -func (c AssetsAndAssetFiltersClient) preparerForAssetFiltersUpdate(ctx context.Context, id AssetFilterId, input AssetFilter) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAssetFiltersUpdate handles the response to the AssetFiltersUpdate request. The method always -// closes the http.Response Body. -func (c AssetsAndAssetFiltersClient) responderForAssetFiltersUpdate(resp *http.Response) (result AssetFiltersUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetscreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetscreateorupdate_autorest.go deleted file mode 100644 index 97aab4648de8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetscreateorupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - Model *Asset -} - -// AssetsCreateOrUpdate ... -func (c AssetsAndAssetFiltersClient) AssetsCreateOrUpdate(ctx context.Context, id AssetId, input Asset) (result AssetsCreateOrUpdateOperationResponse, err error) { - req, err := c.preparerForAssetsCreateOrUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsCreateOrUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsCreateOrUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAssetsCreateOrUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsCreateOrUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAssetsCreateOrUpdate prepares the AssetsCreateOrUpdate request. -func (c AssetsAndAssetFiltersClient) preparerForAssetsCreateOrUpdate(ctx context.Context, id AssetId, input Asset) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAssetsCreateOrUpdate handles the response to the AssetsCreateOrUpdate request. The method always -// closes the http.Response Body. -func (c AssetsAndAssetFiltersClient) responderForAssetsCreateOrUpdate(resp *http.Response) (result AssetsCreateOrUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsdelete_autorest.go deleted file mode 100644 index dd0b0526ba80..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsdelete_autorest.go +++ /dev/null @@ -1,66 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsDeleteOperationResponse struct { - HttpResponse *http.Response -} - -// AssetsDelete ... -func (c AssetsAndAssetFiltersClient) AssetsDelete(ctx context.Context, id AssetId) (result AssetsDeleteOperationResponse, err error) { - req, err := c.preparerForAssetsDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsDelete", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsDelete", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAssetsDelete(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsDelete", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAssetsDelete prepares the AssetsDelete request. -func (c AssetsAndAssetFiltersClient) preparerForAssetsDelete(ctx context.Context, id AssetId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAssetsDelete handles the response to the AssetsDelete request. The method always -// closes the http.Response Body. -func (c AssetsAndAssetFiltersClient) responderForAssetsDelete(resp *http.Response) (result AssetsDeleteOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsget_autorest.go deleted file mode 100644 index 29b972bfabd8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsget_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsGetOperationResponse struct { - HttpResponse *http.Response - Model *Asset -} - -// AssetsGet ... -func (c AssetsAndAssetFiltersClient) AssetsGet(ctx context.Context, id AssetId) (result AssetsGetOperationResponse, err error) { - req, err := c.preparerForAssetsGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsGet", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsGet", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAssetsGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsGet", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAssetsGet prepares the AssetsGet request. -func (c AssetsAndAssetFiltersClient) preparerForAssetsGet(ctx context.Context, id AssetId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAssetsGet handles the response to the AssetsGet request. The method always -// closes the http.Response Body. -func (c AssetsAndAssetFiltersClient) responderForAssetsGet(resp *http.Response) (result AssetsGetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsgetencryptionkey_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsgetencryptionkey_autorest.go deleted file mode 100644 index beaa8bffc5e9..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsgetencryptionkey_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsGetEncryptionKeyOperationResponse struct { - HttpResponse *http.Response - Model *StorageEncryptedAssetDecryptionData -} - -// AssetsGetEncryptionKey ... -func (c AssetsAndAssetFiltersClient) AssetsGetEncryptionKey(ctx context.Context, id AssetId) (result AssetsGetEncryptionKeyOperationResponse, err error) { - req, err := c.preparerForAssetsGetEncryptionKey(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsGetEncryptionKey", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsGetEncryptionKey", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAssetsGetEncryptionKey(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsGetEncryptionKey", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAssetsGetEncryptionKey prepares the AssetsGetEncryptionKey request. -func (c AssetsAndAssetFiltersClient) preparerForAssetsGetEncryptionKey(ctx context.Context, id AssetId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/getEncryptionKey", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAssetsGetEncryptionKey handles the response to the AssetsGetEncryptionKey request. The method always -// closes the http.Response Body. -func (c AssetsAndAssetFiltersClient) responderForAssetsGetEncryptionKey(resp *http.Response) (result AssetsGetEncryptionKeyOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetslist_autorest.go deleted file mode 100644 index bd8e1acf1058..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetslist_autorest.go +++ /dev/null @@ -1,225 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsListOperationResponse struct { - HttpResponse *http.Response - Model *[]Asset - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (AssetsListOperationResponse, error) -} - -type AssetsListCompleteResult struct { - Items []Asset -} - -func (r AssetsListOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r AssetsListOperationResponse) LoadMore(ctx context.Context) (resp AssetsListOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -type AssetsListOperationOptions struct { - Filter *string - Orderby *string - Top *int64 -} - -func DefaultAssetsListOperationOptions() AssetsListOperationOptions { - return AssetsListOperationOptions{} -} - -func (o AssetsListOperationOptions) toHeaders() map[string]interface{} { - out := make(map[string]interface{}) - - return out -} - -func (o AssetsListOperationOptions) toQueryString() map[string]interface{} { - out := make(map[string]interface{}) - - if o.Filter != nil { - out["$filter"] = *o.Filter - } - - if o.Orderby != nil { - out["$orderby"] = *o.Orderby - } - - if o.Top != nil { - out["$top"] = *o.Top - } - - return out -} - -// AssetsList ... -func (c AssetsAndAssetFiltersClient) AssetsList(ctx context.Context, id MediaServiceId, options AssetsListOperationOptions) (resp AssetsListOperationResponse, err error) { - req, err := c.preparerForAssetsList(ctx, id, options) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsList", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsList", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForAssetsList(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsList", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForAssetsList prepares the AssetsList request. -func (c AssetsAndAssetFiltersClient) preparerForAssetsList(ctx context.Context, id MediaServiceId, options AssetsListOperationOptions) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - for k, v := range options.toQueryString() { - queryParameters[k] = autorest.Encode("query", v) - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithHeaders(options.toHeaders()), - autorest.WithPath(fmt.Sprintf("%s/assets", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForAssetsListWithNextLink prepares the AssetsList request with the given nextLink token. -func (c AssetsAndAssetFiltersClient) preparerForAssetsListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAssetsList handles the response to the AssetsList request. The method always -// closes the http.Response Body. -func (c AssetsAndAssetFiltersClient) responderForAssetsList(resp *http.Response) (result AssetsListOperationResponse, err error) { - type page struct { - Values []Asset `json:"value"` - NextLink *string `json:"@odata.nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result AssetsListOperationResponse, err error) { - req, err := c.preparerForAssetsListWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsList", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsList", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAssetsList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsList", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// AssetsListComplete retrieves all of the results into a single object -func (c AssetsAndAssetFiltersClient) AssetsListComplete(ctx context.Context, id MediaServiceId, options AssetsListOperationOptions) (AssetsListCompleteResult, error) { - return c.AssetsListCompleteMatchingPredicate(ctx, id, options, AssetOperationPredicate{}) -} - -// AssetsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c AssetsAndAssetFiltersClient) AssetsListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options AssetsListOperationOptions, predicate AssetOperationPredicate) (resp AssetsListCompleteResult, err error) { - items := make([]Asset, 0) - - page, err := c.AssetsList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := AssetsListCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetslistcontainersas_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetslistcontainersas_autorest.go deleted file mode 100644 index b557d67028a2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetslistcontainersas_autorest.go +++ /dev/null @@ -1,70 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsListContainerSasOperationResponse struct { - HttpResponse *http.Response - Model *AssetContainerSas -} - -// AssetsListContainerSas ... -func (c AssetsAndAssetFiltersClient) AssetsListContainerSas(ctx context.Context, id AssetId, input ListContainerSasInput) (result AssetsListContainerSasOperationResponse, err error) { - req, err := c.preparerForAssetsListContainerSas(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsListContainerSas", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsListContainerSas", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAssetsListContainerSas(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsListContainerSas", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAssetsListContainerSas prepares the AssetsListContainerSas request. -func (c AssetsAndAssetFiltersClient) preparerForAssetsListContainerSas(ctx context.Context, id AssetId, input ListContainerSasInput) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/listContainerSas", id.ID())), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAssetsListContainerSas handles the response to the AssetsListContainerSas request. The method always -// closes the http.Response Body. -func (c AssetsAndAssetFiltersClient) responderForAssetsListContainerSas(resp *http.Response) (result AssetsListContainerSasOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsliststreaminglocators_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsliststreaminglocators_autorest.go deleted file mode 100644 index 50cda393d973..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsliststreaminglocators_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsListStreamingLocatorsOperationResponse struct { - HttpResponse *http.Response - Model *ListStreamingLocatorsResponse -} - -// AssetsListStreamingLocators ... -func (c AssetsAndAssetFiltersClient) AssetsListStreamingLocators(ctx context.Context, id AssetId) (result AssetsListStreamingLocatorsOperationResponse, err error) { - req, err := c.preparerForAssetsListStreamingLocators(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsListStreamingLocators", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsListStreamingLocators", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAssetsListStreamingLocators(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsListStreamingLocators", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAssetsListStreamingLocators prepares the AssetsListStreamingLocators request. -func (c AssetsAndAssetFiltersClient) preparerForAssetsListStreamingLocators(ctx context.Context, id AssetId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/listStreamingLocators", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAssetsListStreamingLocators handles the response to the AssetsListStreamingLocators request. The method always -// closes the http.Response Body. -func (c AssetsAndAssetFiltersClient) responderForAssetsListStreamingLocators(resp *http.Response) (result AssetsListStreamingLocatorsOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsupdate_autorest.go deleted file mode 100644 index 406afb9c5440..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/method_assetsupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package assetsandassetfilters - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetsUpdateOperationResponse struct { - HttpResponse *http.Response - Model *Asset -} - -// AssetsUpdate ... -func (c AssetsAndAssetFiltersClient) AssetsUpdate(ctx context.Context, id AssetId, input Asset) (result AssetsUpdateOperationResponse, err error) { - req, err := c.preparerForAssetsUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForAssetsUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "assetsandassetfilters.AssetsAndAssetFiltersClient", "AssetsUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForAssetsUpdate prepares the AssetsUpdate request. -func (c AssetsAndAssetFiltersClient) preparerForAssetsUpdate(ctx context.Context, id AssetId, input Asset) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForAssetsUpdate handles the response to the AssetsUpdate request. The method always -// closes the http.Response Body. -func (c AssetsAndAssetFiltersClient) responderForAssetsUpdate(resp *http.Response) (result AssetsUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_asset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_asset.go deleted file mode 100644 index e28bbc5358de..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_asset.go +++ /dev/null @@ -1,16 +0,0 @@ -package assetsandassetfilters - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Asset struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AssetProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetcontainersas.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetcontainersas.go deleted file mode 100644 index af36c40966d4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetcontainersas.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetContainerSas struct { - AssetContainerSasUrls *[]string `json:"assetContainerSasUrls,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetfileencryptionmetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetfileencryptionmetadata.go deleted file mode 100644 index 75b8dccb16a4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetfileencryptionmetadata.go +++ /dev/null @@ -1,10 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFileEncryptionMetadata struct { - AssetFileId string `json:"assetFileId"` - AssetFileName *string `json:"assetFileName,omitempty"` - InitializationVector *string `json:"initializationVector,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetfilter.go deleted file mode 100644 index 21cd7a2e7724..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetfilter.go +++ /dev/null @@ -1,16 +0,0 @@ -package assetsandassetfilters - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetFilter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *MediaFilterProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetproperties.go deleted file mode 100644 index 5127047160b8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package assetsandassetfilters - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetProperties struct { - AlternateId *string `json:"alternateId,omitempty"` - AssetId *string `json:"assetId,omitempty"` - Container *string `json:"container,omitempty"` - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - StorageAccountName *string `json:"storageAccountName,omitempty"` - StorageEncryptionFormat *AssetStorageEncryptionFormat `json:"storageEncryptionFormat,omitempty"` -} - -func (o *AssetProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *AssetProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetstreaminglocator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetstreaminglocator.go deleted file mode 100644 index d72048fce46e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_assetstreaminglocator.go +++ /dev/null @@ -1,57 +0,0 @@ -package assetsandassetfilters - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AssetStreamingLocator struct { - AssetName *string `json:"assetName,omitempty"` - Created *string `json:"created,omitempty"` - DefaultContentKeyPolicyName *string `json:"defaultContentKeyPolicyName,omitempty"` - EndTime *string `json:"endTime,omitempty"` - Name *string `json:"name,omitempty"` - StartTime *string `json:"startTime,omitempty"` - StreamingLocatorId *string `json:"streamingLocatorId,omitempty"` - StreamingPolicyName *string `json:"streamingPolicyName,omitempty"` -} - -func (o *AssetStreamingLocator) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetStreamingLocator) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *AssetStreamingLocator) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetStreamingLocator) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *AssetStreamingLocator) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *AssetStreamingLocator) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_filtertrackpropertycondition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_filtertrackpropertycondition.go deleted file mode 100644 index cc9cd652d8bb..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_filtertrackpropertycondition.go +++ /dev/null @@ -1,10 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackPropertyCondition struct { - Operation FilterTrackPropertyCompareOperation `json:"operation"` - Property FilterTrackPropertyType `json:"property"` - Value string `json:"value"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_filtertrackselection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_filtertrackselection.go deleted file mode 100644 index a8a78cd8dd36..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_filtertrackselection.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterTrackSelection struct { - TrackSelections []FilterTrackPropertyCondition `json:"trackSelections"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_firstquality.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_firstquality.go deleted file mode 100644 index f8043a2c2625..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_firstquality.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirstQuality struct { - Bitrate int64 `json:"bitrate"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_listcontainersasinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_listcontainersasinput.go deleted file mode 100644 index 40c9e957818b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_listcontainersasinput.go +++ /dev/null @@ -1,27 +0,0 @@ -package assetsandassetfilters - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListContainerSasInput struct { - ExpiryTime *string `json:"expiryTime,omitempty"` - Permissions *AssetContainerPermission `json:"permissions,omitempty"` -} - -func (o *ListContainerSasInput) GetExpiryTimeAsTime() (*time.Time, error) { - if o.ExpiryTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ExpiryTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ListContainerSasInput) SetExpiryTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ExpiryTime = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_liststreaminglocatorsresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_liststreaminglocatorsresponse.go deleted file mode 100644 index 816c7e9dc16d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_liststreaminglocatorsresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListStreamingLocatorsResponse struct { - StreamingLocators *[]AssetStreamingLocator `json:"streamingLocators,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_mediafilterproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_mediafilterproperties.go deleted file mode 100644 index 76f8bb211d07..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_mediafilterproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MediaFilterProperties struct { - FirstQuality *FirstQuality `json:"firstQuality,omitempty"` - PresentationTimeRange *PresentationTimeRange `json:"presentationTimeRange,omitempty"` - Tracks *[]FilterTrackSelection `json:"tracks,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_presentationtimerange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_presentationtimerange.go deleted file mode 100644 index 37c9d4fd171d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_presentationtimerange.go +++ /dev/null @@ -1,13 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PresentationTimeRange struct { - EndTimestamp *int64 `json:"endTimestamp,omitempty"` - ForceEndTimestamp *bool `json:"forceEndTimestamp,omitempty"` - LiveBackoffDuration *int64 `json:"liveBackoffDuration,omitempty"` - PresentationWindowDuration *int64 `json:"presentationWindowDuration,omitempty"` - StartTimestamp *int64 `json:"startTimestamp,omitempty"` - Timescale *int64 `json:"timescale,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_storageencryptedassetdecryptiondata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_storageencryptedassetdecryptiondata.go deleted file mode 100644 index 33ae81cea0d1..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/model_storageencryptedassetdecryptiondata.go +++ /dev/null @@ -1,9 +0,0 @@ -package assetsandassetfilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StorageEncryptedAssetDecryptionData struct { - AssetFileEncryptionMetadata *[]AssetFileEncryptionMetadata `json:"assetFileEncryptionMetadata,omitempty"` - Key *string `json:"key,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/predicates.go deleted file mode 100644 index eb685c85dbd0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/predicates.go +++ /dev/null @@ -1,47 +0,0 @@ -package assetsandassetfilters - -type AssetOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p AssetOperationPredicate) Matches(input Asset) bool { - - if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { - return false - } - - return true -} - -type AssetFilterOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p AssetFilterOperationPredicate) Matches(input AssetFilter) bool { - - if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/version.go deleted file mode 100644 index 6b3b4506a021..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package assetsandassetfilters - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2020-05-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/assetsandassetfilters/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/client.go deleted file mode 100644 index 2bed4a7822e8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/client.go +++ /dev/null @@ -1,68 +0,0 @@ -package v2020_05_01 - -import ( - "github.com/Azure/go-autorest/autorest" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints" - "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators" -) - -type Client struct { - AccountFilters *accountfilters.AccountFiltersClient - Accounts *accounts.AccountsClient - AssetsAndAssetFilters *assetsandassetfilters.AssetsAndAssetFiltersClient - ContentKeyPolicies *contentkeypolicies.ContentKeyPoliciesClient - Encodings *encodings.EncodingsClient - LiveEvents *liveevents.LiveEventsClient - LiveOutputs *liveoutputs.LiveOutputsClient - StreamingEndpoints *streamingendpoints.StreamingEndpointsClient - StreamingPoliciesAndStreamingLocators *streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient -} - -func NewClientWithBaseURI(endpoint string, configureAuthFunc func(c *autorest.Client)) Client { - - accountFiltersClient := accountfilters.NewAccountFiltersClientWithBaseURI(endpoint) - configureAuthFunc(&accountFiltersClient.Client) - - accountsClient := accounts.NewAccountsClientWithBaseURI(endpoint) - configureAuthFunc(&accountsClient.Client) - - assetsAndAssetFiltersClient := assetsandassetfilters.NewAssetsAndAssetFiltersClientWithBaseURI(endpoint) - configureAuthFunc(&assetsAndAssetFiltersClient.Client) - - contentKeyPoliciesClient := contentkeypolicies.NewContentKeyPoliciesClientWithBaseURI(endpoint) - configureAuthFunc(&contentKeyPoliciesClient.Client) - - encodingsClient := encodings.NewEncodingsClientWithBaseURI(endpoint) - configureAuthFunc(&encodingsClient.Client) - - liveEventsClient := liveevents.NewLiveEventsClientWithBaseURI(endpoint) - configureAuthFunc(&liveEventsClient.Client) - - liveOutputsClient := liveoutputs.NewLiveOutputsClientWithBaseURI(endpoint) - configureAuthFunc(&liveOutputsClient.Client) - - streamingEndpointsClient := streamingendpoints.NewStreamingEndpointsClientWithBaseURI(endpoint) - configureAuthFunc(&streamingEndpointsClient.Client) - - streamingPoliciesAndStreamingLocatorsClient := streamingpoliciesandstreaminglocators.NewStreamingPoliciesAndStreamingLocatorsClientWithBaseURI(endpoint) - configureAuthFunc(&streamingPoliciesAndStreamingLocatorsClient.Client) - - return Client{ - AccountFilters: &accountFiltersClient, - Accounts: &accountsClient, - AssetsAndAssetFilters: &assetsAndAssetFiltersClient, - ContentKeyPolicies: &contentKeyPoliciesClient, - Encodings: &encodingsClient, - LiveEvents: &liveEventsClient, - LiveOutputs: &liveOutputsClient, - StreamingEndpoints: &streamingEndpointsClient, - StreamingPoliciesAndStreamingLocators: &streamingPoliciesAndStreamingLocatorsClient, - } -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/README.md deleted file mode 100644 index 89bf212900ce..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/README.md +++ /dev/null @@ -1,127 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies` Documentation - -The `contentkeypolicies` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2020-05-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies" -``` - - -### Client Initialization - -```go -client := contentkeypolicies.NewContentKeyPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ContentKeyPoliciesClient.ContentKeyPoliciesCreateOrUpdate` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -payload := contentkeypolicies.ContentKeyPolicy{ - // ... -} - - -read, err := client.ContentKeyPoliciesCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.ContentKeyPoliciesDelete` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -read, err := client.ContentKeyPoliciesDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.ContentKeyPoliciesGet` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -read, err := client.ContentKeyPoliciesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.ContentKeyPoliciesGetPolicyPropertiesWithSecrets` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -read, err := client.ContentKeyPoliciesGetPolicyPropertiesWithSecrets(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.ContentKeyPoliciesList` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.ContentKeyPoliciesList(ctx, id, contentkeypolicies.DefaultContentKeyPoliciesListOperationOptions())` can be used to do batched pagination -items, err := client.ContentKeyPoliciesListComplete(ctx, id, contentkeypolicies.DefaultContentKeyPoliciesListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ContentKeyPoliciesClient.ContentKeyPoliciesUpdate` - -```go -ctx := context.TODO() -id := contentkeypolicies.NewContentKeyPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "contentKeyPolicyValue") - -payload := contentkeypolicies.ContentKeyPolicy{ - // ... -} - - -read, err := client.ContentKeyPoliciesUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/client.go deleted file mode 100644 index 355952a3f4ae..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/client.go +++ /dev/null @@ -1,18 +0,0 @@ -package contentkeypolicies - -import "github.com/Azure/go-autorest/autorest" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPoliciesClient struct { - Client autorest.Client - baseUri string -} - -func NewContentKeyPoliciesClientWithBaseURI(endpoint string) ContentKeyPoliciesClient { - return ContentKeyPoliciesClient{ - Client: autorest.NewClientWithUserAgent(userAgent()), - baseUri: endpoint, - } -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/constants.go deleted file mode 100644 index 6cc36387f29f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/constants.go +++ /dev/null @@ -1,173 +0,0 @@ -package contentkeypolicies - -import "strings" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyFairPlayRentalAndLeaseKeyType string - -const ( - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "DualExpiry" - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "PersistentLimited" - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "PersistentUnlimited" - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "Undefined" - ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUnknown ContentKeyPolicyFairPlayRentalAndLeaseKeyType = "Unknown" -) - -func PossibleValuesForContentKeyPolicyFairPlayRentalAndLeaseKeyType() []string { - return []string{ - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry), - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited), - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited), - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined), - string(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUnknown), - } -} - -func parseContentKeyPolicyFairPlayRentalAndLeaseKeyType(input string) (*ContentKeyPolicyFairPlayRentalAndLeaseKeyType, error) { - vals := map[string]ContentKeyPolicyFairPlayRentalAndLeaseKeyType{ - "dualexpiry": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeDualExpiry, - "persistentlimited": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentLimited, - "persistentunlimited": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypePersistentUnlimited, - "undefined": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUndefined, - "unknown": ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyFairPlayRentalAndLeaseKeyType(input) - return &out, nil -} - -type ContentKeyPolicyPlayReadyContentType string - -const ( - ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload ContentKeyPolicyPlayReadyContentType = "UltraVioletDownload" - ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming ContentKeyPolicyPlayReadyContentType = "UltraVioletStreaming" - ContentKeyPolicyPlayReadyContentTypeUnknown ContentKeyPolicyPlayReadyContentType = "Unknown" - ContentKeyPolicyPlayReadyContentTypeUnspecified ContentKeyPolicyPlayReadyContentType = "Unspecified" -) - -func PossibleValuesForContentKeyPolicyPlayReadyContentType() []string { - return []string{ - string(ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload), - string(ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming), - string(ContentKeyPolicyPlayReadyContentTypeUnknown), - string(ContentKeyPolicyPlayReadyContentTypeUnspecified), - } -} - -func parseContentKeyPolicyPlayReadyContentType(input string) (*ContentKeyPolicyPlayReadyContentType, error) { - vals := map[string]ContentKeyPolicyPlayReadyContentType{ - "ultravioletdownload": ContentKeyPolicyPlayReadyContentTypeUltraVioletDownload, - "ultravioletstreaming": ContentKeyPolicyPlayReadyContentTypeUltraVioletStreaming, - "unknown": ContentKeyPolicyPlayReadyContentTypeUnknown, - "unspecified": ContentKeyPolicyPlayReadyContentTypeUnspecified, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyPlayReadyContentType(input) - return &out, nil -} - -type ContentKeyPolicyPlayReadyLicenseType string - -const ( - ContentKeyPolicyPlayReadyLicenseTypeNonPersistent ContentKeyPolicyPlayReadyLicenseType = "NonPersistent" - ContentKeyPolicyPlayReadyLicenseTypePersistent ContentKeyPolicyPlayReadyLicenseType = "Persistent" - ContentKeyPolicyPlayReadyLicenseTypeUnknown ContentKeyPolicyPlayReadyLicenseType = "Unknown" -) - -func PossibleValuesForContentKeyPolicyPlayReadyLicenseType() []string { - return []string{ - string(ContentKeyPolicyPlayReadyLicenseTypeNonPersistent), - string(ContentKeyPolicyPlayReadyLicenseTypePersistent), - string(ContentKeyPolicyPlayReadyLicenseTypeUnknown), - } -} - -func parseContentKeyPolicyPlayReadyLicenseType(input string) (*ContentKeyPolicyPlayReadyLicenseType, error) { - vals := map[string]ContentKeyPolicyPlayReadyLicenseType{ - "nonpersistent": ContentKeyPolicyPlayReadyLicenseTypeNonPersistent, - "persistent": ContentKeyPolicyPlayReadyLicenseTypePersistent, - "unknown": ContentKeyPolicyPlayReadyLicenseTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyPlayReadyLicenseType(input) - return &out, nil -} - -type ContentKeyPolicyPlayReadyUnknownOutputPassingOption string - -const ( - ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "Allowed" - ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "AllowedWithVideoConstriction" - ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "NotAllowed" - ContentKeyPolicyPlayReadyUnknownOutputPassingOptionUnknown ContentKeyPolicyPlayReadyUnknownOutputPassingOption = "Unknown" -) - -func PossibleValuesForContentKeyPolicyPlayReadyUnknownOutputPassingOption() []string { - return []string{ - string(ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed), - string(ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction), - string(ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed), - string(ContentKeyPolicyPlayReadyUnknownOutputPassingOptionUnknown), - } -} - -func parseContentKeyPolicyPlayReadyUnknownOutputPassingOption(input string) (*ContentKeyPolicyPlayReadyUnknownOutputPassingOption, error) { - vals := map[string]ContentKeyPolicyPlayReadyUnknownOutputPassingOption{ - "allowed": ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowed, - "allowedwithvideoconstriction": ContentKeyPolicyPlayReadyUnknownOutputPassingOptionAllowedWithVideoConstriction, - "notallowed": ContentKeyPolicyPlayReadyUnknownOutputPassingOptionNotAllowed, - "unknown": ContentKeyPolicyPlayReadyUnknownOutputPassingOptionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyPlayReadyUnknownOutputPassingOption(input) - return &out, nil -} - -type ContentKeyPolicyRestrictionTokenType string - -const ( - ContentKeyPolicyRestrictionTokenTypeJwt ContentKeyPolicyRestrictionTokenType = "Jwt" - ContentKeyPolicyRestrictionTokenTypeSwt ContentKeyPolicyRestrictionTokenType = "Swt" - ContentKeyPolicyRestrictionTokenTypeUnknown ContentKeyPolicyRestrictionTokenType = "Unknown" -) - -func PossibleValuesForContentKeyPolicyRestrictionTokenType() []string { - return []string{ - string(ContentKeyPolicyRestrictionTokenTypeJwt), - string(ContentKeyPolicyRestrictionTokenTypeSwt), - string(ContentKeyPolicyRestrictionTokenTypeUnknown), - } -} - -func parseContentKeyPolicyRestrictionTokenType(input string) (*ContentKeyPolicyRestrictionTokenType, error) { - vals := map[string]ContentKeyPolicyRestrictionTokenType{ - "jwt": ContentKeyPolicyRestrictionTokenTypeJwt, - "swt": ContentKeyPolicyRestrictionTokenTypeSwt, - "unknown": ContentKeyPolicyRestrictionTokenTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentKeyPolicyRestrictionTokenType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/id_contentkeypolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/id_contentkeypolicy.go deleted file mode 100644 index 4df3f4179d65..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/id_contentkeypolicy.go +++ /dev/null @@ -1,137 +0,0 @@ -package contentkeypolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = ContentKeyPolicyId{} - -// ContentKeyPolicyId is a struct representing the Resource ID for a Content Key Policy -type ContentKeyPolicyId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - ContentKeyPolicyName string -} - -// NewContentKeyPolicyID returns a new ContentKeyPolicyId struct -func NewContentKeyPolicyID(subscriptionId string, resourceGroupName string, mediaServiceName string, contentKeyPolicyName string) ContentKeyPolicyId { - return ContentKeyPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - ContentKeyPolicyName: contentKeyPolicyName, - } -} - -// ParseContentKeyPolicyID parses 'input' into a ContentKeyPolicyId -func ParseContentKeyPolicyID(input string) (*ContentKeyPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ContentKeyPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ContentKeyPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.ContentKeyPolicyName, ok = parsed.Parsed["contentKeyPolicyName"]; !ok { - return nil, fmt.Errorf("the segment 'contentKeyPolicyName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseContentKeyPolicyIDInsensitively parses 'input' case-insensitively into a ContentKeyPolicyId -// note: this method should only be used for API response data and not user input -func ParseContentKeyPolicyIDInsensitively(input string) (*ContentKeyPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ContentKeyPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ContentKeyPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.ContentKeyPolicyName, ok = parsed.Parsed["contentKeyPolicyName"]; !ok { - return nil, fmt.Errorf("the segment 'contentKeyPolicyName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateContentKeyPolicyID checks that 'input' can be parsed as a Content Key Policy ID -func ValidateContentKeyPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseContentKeyPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Content Key Policy ID -func (id ContentKeyPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/contentKeyPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.ContentKeyPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Content Key Policy ID -func (id ContentKeyPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticContentKeyPolicies", "contentKeyPolicies", "contentKeyPolicies"), - resourceids.UserSpecifiedSegment("contentKeyPolicyName", "contentKeyPolicyValue"), - } -} - -// String returns a human-readable description of this Content Key Policy ID -func (id ContentKeyPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Content Key Policy Name: %q", id.ContentKeyPolicyName), - } - return fmt.Sprintf("Content Key Policy (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/id_mediaservice.go deleted file mode 100644 index 16c9a97afdc3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/id_mediaservice.go +++ /dev/null @@ -1,124 +0,0 @@ -package contentkeypolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciescreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciescreateorupdate_autorest.go deleted file mode 100644 index 8b620275773e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciescreateorupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPoliciesCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - Model *ContentKeyPolicy -} - -// ContentKeyPoliciesCreateOrUpdate ... -func (c ContentKeyPoliciesClient) ContentKeyPoliciesCreateOrUpdate(ctx context.Context, id ContentKeyPolicyId, input ContentKeyPolicy) (result ContentKeyPoliciesCreateOrUpdateOperationResponse, err error) { - req, err := c.preparerForContentKeyPoliciesCreateOrUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesCreateOrUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesCreateOrUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForContentKeyPoliciesCreateOrUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesCreateOrUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForContentKeyPoliciesCreateOrUpdate prepares the ContentKeyPoliciesCreateOrUpdate request. -func (c ContentKeyPoliciesClient) preparerForContentKeyPoliciesCreateOrUpdate(ctx context.Context, id ContentKeyPolicyId, input ContentKeyPolicy) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForContentKeyPoliciesCreateOrUpdate handles the response to the ContentKeyPoliciesCreateOrUpdate request. The method always -// closes the http.Response Body. -func (c ContentKeyPoliciesClient) responderForContentKeyPoliciesCreateOrUpdate(resp *http.Response) (result ContentKeyPoliciesCreateOrUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciesdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciesdelete_autorest.go deleted file mode 100644 index c45e127b3d6f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciesdelete_autorest.go +++ /dev/null @@ -1,66 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPoliciesDeleteOperationResponse struct { - HttpResponse *http.Response -} - -// ContentKeyPoliciesDelete ... -func (c ContentKeyPoliciesClient) ContentKeyPoliciesDelete(ctx context.Context, id ContentKeyPolicyId) (result ContentKeyPoliciesDeleteOperationResponse, err error) { - req, err := c.preparerForContentKeyPoliciesDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesDelete", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesDelete", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForContentKeyPoliciesDelete(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesDelete", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForContentKeyPoliciesDelete prepares the ContentKeyPoliciesDelete request. -func (c ContentKeyPoliciesClient) preparerForContentKeyPoliciesDelete(ctx context.Context, id ContentKeyPolicyId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForContentKeyPoliciesDelete handles the response to the ContentKeyPoliciesDelete request. The method always -// closes the http.Response Body. -func (c ContentKeyPoliciesClient) responderForContentKeyPoliciesDelete(resp *http.Response) (result ContentKeyPoliciesDeleteOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciesget_autorest.go deleted file mode 100644 index 1b7db7abc3d2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciesget_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPoliciesGetOperationResponse struct { - HttpResponse *http.Response - Model *ContentKeyPolicy -} - -// ContentKeyPoliciesGet ... -func (c ContentKeyPoliciesClient) ContentKeyPoliciesGet(ctx context.Context, id ContentKeyPolicyId) (result ContentKeyPoliciesGetOperationResponse, err error) { - req, err := c.preparerForContentKeyPoliciesGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesGet", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesGet", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForContentKeyPoliciesGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesGet", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForContentKeyPoliciesGet prepares the ContentKeyPoliciesGet request. -func (c ContentKeyPoliciesClient) preparerForContentKeyPoliciesGet(ctx context.Context, id ContentKeyPolicyId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForContentKeyPoliciesGet handles the response to the ContentKeyPoliciesGet request. The method always -// closes the http.Response Body. -func (c ContentKeyPoliciesClient) responderForContentKeyPoliciesGet(resp *http.Response) (result ContentKeyPoliciesGetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciesgetpolicypropertieswithsecrets_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciesgetpolicypropertieswithsecrets_autorest.go deleted file mode 100644 index b868fe13b968..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciesgetpolicypropertieswithsecrets_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPoliciesGetPolicyPropertiesWithSecretsOperationResponse struct { - HttpResponse *http.Response - Model *ContentKeyPolicyProperties -} - -// ContentKeyPoliciesGetPolicyPropertiesWithSecrets ... -func (c ContentKeyPoliciesClient) ContentKeyPoliciesGetPolicyPropertiesWithSecrets(ctx context.Context, id ContentKeyPolicyId) (result ContentKeyPoliciesGetPolicyPropertiesWithSecretsOperationResponse, err error) { - req, err := c.preparerForContentKeyPoliciesGetPolicyPropertiesWithSecrets(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesGetPolicyPropertiesWithSecrets", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesGetPolicyPropertiesWithSecrets", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForContentKeyPoliciesGetPolicyPropertiesWithSecrets(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesGetPolicyPropertiesWithSecrets", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForContentKeyPoliciesGetPolicyPropertiesWithSecrets prepares the ContentKeyPoliciesGetPolicyPropertiesWithSecrets request. -func (c ContentKeyPoliciesClient) preparerForContentKeyPoliciesGetPolicyPropertiesWithSecrets(ctx context.Context, id ContentKeyPolicyId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/getPolicyPropertiesWithSecrets", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForContentKeyPoliciesGetPolicyPropertiesWithSecrets handles the response to the ContentKeyPoliciesGetPolicyPropertiesWithSecrets request. The method always -// closes the http.Response Body. -func (c ContentKeyPoliciesClient) responderForContentKeyPoliciesGetPolicyPropertiesWithSecrets(resp *http.Response) (result ContentKeyPoliciesGetPolicyPropertiesWithSecretsOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypolicieslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypolicieslist_autorest.go deleted file mode 100644 index eedc3fa0569e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypolicieslist_autorest.go +++ /dev/null @@ -1,225 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPoliciesListOperationResponse struct { - HttpResponse *http.Response - Model *[]ContentKeyPolicy - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (ContentKeyPoliciesListOperationResponse, error) -} - -type ContentKeyPoliciesListCompleteResult struct { - Items []ContentKeyPolicy -} - -func (r ContentKeyPoliciesListOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r ContentKeyPoliciesListOperationResponse) LoadMore(ctx context.Context) (resp ContentKeyPoliciesListOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -type ContentKeyPoliciesListOperationOptions struct { - Filter *string - Orderby *string - Top *int64 -} - -func DefaultContentKeyPoliciesListOperationOptions() ContentKeyPoliciesListOperationOptions { - return ContentKeyPoliciesListOperationOptions{} -} - -func (o ContentKeyPoliciesListOperationOptions) toHeaders() map[string]interface{} { - out := make(map[string]interface{}) - - return out -} - -func (o ContentKeyPoliciesListOperationOptions) toQueryString() map[string]interface{} { - out := make(map[string]interface{}) - - if o.Filter != nil { - out["$filter"] = *o.Filter - } - - if o.Orderby != nil { - out["$orderby"] = *o.Orderby - } - - if o.Top != nil { - out["$top"] = *o.Top - } - - return out -} - -// ContentKeyPoliciesList ... -func (c ContentKeyPoliciesClient) ContentKeyPoliciesList(ctx context.Context, id MediaServiceId, options ContentKeyPoliciesListOperationOptions) (resp ContentKeyPoliciesListOperationResponse, err error) { - req, err := c.preparerForContentKeyPoliciesList(ctx, id, options) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesList", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesList", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForContentKeyPoliciesList(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesList", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForContentKeyPoliciesList prepares the ContentKeyPoliciesList request. -func (c ContentKeyPoliciesClient) preparerForContentKeyPoliciesList(ctx context.Context, id MediaServiceId, options ContentKeyPoliciesListOperationOptions) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - for k, v := range options.toQueryString() { - queryParameters[k] = autorest.Encode("query", v) - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithHeaders(options.toHeaders()), - autorest.WithPath(fmt.Sprintf("%s/contentKeyPolicies", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForContentKeyPoliciesListWithNextLink prepares the ContentKeyPoliciesList request with the given nextLink token. -func (c ContentKeyPoliciesClient) preparerForContentKeyPoliciesListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForContentKeyPoliciesList handles the response to the ContentKeyPoliciesList request. The method always -// closes the http.Response Body. -func (c ContentKeyPoliciesClient) responderForContentKeyPoliciesList(resp *http.Response) (result ContentKeyPoliciesListOperationResponse, err error) { - type page struct { - Values []ContentKeyPolicy `json:"value"` - NextLink *string `json:"@odata.nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result ContentKeyPoliciesListOperationResponse, err error) { - req, err := c.preparerForContentKeyPoliciesListWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesList", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesList", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForContentKeyPoliciesList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesList", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// ContentKeyPoliciesListComplete retrieves all of the results into a single object -func (c ContentKeyPoliciesClient) ContentKeyPoliciesListComplete(ctx context.Context, id MediaServiceId, options ContentKeyPoliciesListOperationOptions) (ContentKeyPoliciesListCompleteResult, error) { - return c.ContentKeyPoliciesListCompleteMatchingPredicate(ctx, id, options, ContentKeyPolicyOperationPredicate{}) -} - -// ContentKeyPoliciesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c ContentKeyPoliciesClient) ContentKeyPoliciesListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options ContentKeyPoliciesListOperationOptions, predicate ContentKeyPolicyOperationPredicate) (resp ContentKeyPoliciesListCompleteResult, err error) { - items := make([]ContentKeyPolicy, 0) - - page, err := c.ContentKeyPoliciesList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ContentKeyPoliciesListCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciesupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciesupdate_autorest.go deleted file mode 100644 index a43fb9d27150..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/method_contentkeypoliciesupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package contentkeypolicies - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPoliciesUpdateOperationResponse struct { - HttpResponse *http.Response - Model *ContentKeyPolicy -} - -// ContentKeyPoliciesUpdate ... -func (c ContentKeyPoliciesClient) ContentKeyPoliciesUpdate(ctx context.Context, id ContentKeyPolicyId, input ContentKeyPolicy) (result ContentKeyPoliciesUpdateOperationResponse, err error) { - req, err := c.preparerForContentKeyPoliciesUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForContentKeyPoliciesUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "contentkeypolicies.ContentKeyPoliciesClient", "ContentKeyPoliciesUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForContentKeyPoliciesUpdate prepares the ContentKeyPoliciesUpdate request. -func (c ContentKeyPoliciesClient) preparerForContentKeyPoliciesUpdate(ctx context.Context, id ContentKeyPolicyId, input ContentKeyPolicy) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForContentKeyPoliciesUpdate handles the response to the ContentKeyPoliciesUpdate request. The method always -// closes the http.Response Body. -func (c ContentKeyPoliciesClient) responderForContentKeyPoliciesUpdate(resp *http.Response) (result ContentKeyPoliciesUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicy.go deleted file mode 100644 index ddca04cc83cb..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicy.go +++ /dev/null @@ -1,16 +0,0 @@ -package contentkeypolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicy struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ContentKeyPolicyProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go deleted file mode 100644 index 9cc26cd28e8b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyClearKeyConfiguration{} - -type ContentKeyPolicyClearKeyConfiguration struct { - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyClearKeyConfiguration{} - -func (s ContentKeyPolicyClearKeyConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyClearKeyConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyClearKeyConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyClearKeyConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyClearKeyConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyconfiguration.go deleted file mode 100644 index 42989de5c62d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyconfiguration.go +++ /dev/null @@ -1,80 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyConfiguration interface { -} - -func unmarshalContentKeyPolicyConfigurationImplementation(input []byte) (ContentKeyPolicyConfiguration, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyConfiguration into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration") { - var out ContentKeyPolicyClearKeyConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyClearKeyConfiguration: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration") { - var out ContentKeyPolicyFairPlayConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyFairPlayConfiguration: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration") { - var out ContentKeyPolicyPlayReadyConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyPlayReadyConfiguration: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyUnknownConfiguration") { - var out ContentKeyPolicyUnknownConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyUnknownConfiguration: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyWidevineConfiguration") { - var out ContentKeyPolicyWidevineConfiguration - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyWidevineConfiguration: %+v", err) - } - return out, nil - } - - type RawContentKeyPolicyConfigurationImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawContentKeyPolicyConfigurationImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go deleted file mode 100644 index f7983ee301a5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go +++ /dev/null @@ -1,46 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyFairPlayConfiguration{} - -type ContentKeyPolicyFairPlayConfiguration struct { - Ask string `json:"ask"` - FairPlayPfx string `json:"fairPlayPfx"` - FairPlayPfxPassword string `json:"fairPlayPfxPassword"` - OfflineRentalConfiguration *ContentKeyPolicyFairPlayOfflineRentalConfiguration `json:"offlineRentalConfiguration,omitempty"` - RentalAndLeaseKeyType ContentKeyPolicyFairPlayRentalAndLeaseKeyType `json:"rentalAndLeaseKeyType"` - RentalDuration int64 `json:"rentalDuration"` - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyFairPlayConfiguration{} - -func (s ContentKeyPolicyFairPlayConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyFairPlayConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyFairPlayConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyFairPlayConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyFairPlayConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyfairplayofflinerentalconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyfairplayofflinerentalconfiguration.go deleted file mode 100644 index 63337b098e7d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyfairplayofflinerentalconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyFairPlayOfflineRentalConfiguration struct { - PlaybackDurationSeconds int64 `json:"playbackDurationSeconds"` - StorageDurationSeconds int64 `json:"storageDurationSeconds"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go deleted file mode 100644 index 4a5e74404b16..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestriction = ContentKeyPolicyOpenRestriction{} - -type ContentKeyPolicyOpenRestriction struct { - - // Fields inherited from ContentKeyPolicyRestriction -} - -var _ json.Marshaler = ContentKeyPolicyOpenRestriction{} - -func (s ContentKeyPolicyOpenRestriction) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyOpenRestriction - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyOpenRestriction: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyOpenRestriction: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyOpenRestriction" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyOpenRestriction: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyoption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyoption.go deleted file mode 100644 index 687ed9dd6c88..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyoption.go +++ /dev/null @@ -1,51 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyOption struct { - Configuration ContentKeyPolicyConfiguration `json:"configuration"` - Name *string `json:"name,omitempty"` - PolicyOptionId *string `json:"policyOptionId,omitempty"` - Restriction ContentKeyPolicyRestriction `json:"restriction"` -} - -var _ json.Unmarshaler = &ContentKeyPolicyOption{} - -func (s *ContentKeyPolicyOption) UnmarshalJSON(bytes []byte) error { - type alias ContentKeyPolicyOption - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ContentKeyPolicyOption: %+v", err) - } - - s.Name = decoded.Name - s.PolicyOptionId = decoded.PolicyOptionId - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ContentKeyPolicyOption into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["configuration"]; ok { - impl, err := unmarshalContentKeyPolicyConfigurationImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Configuration' for 'ContentKeyPolicyOption': %+v", err) - } - s.Configuration = impl - } - - if v, ok := temp["restriction"]; ok { - impl, err := unmarshalContentKeyPolicyRestrictionImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Restriction' for 'ContentKeyPolicyOption': %+v", err) - } - s.Restriction = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go deleted file mode 100644 index 3f609b4a8da4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go +++ /dev/null @@ -1,42 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyPlayReadyConfiguration{} - -type ContentKeyPolicyPlayReadyConfiguration struct { - Licenses []ContentKeyPolicyPlayReadyLicense `json:"licenses"` - ResponseCustomData *string `json:"responseCustomData,omitempty"` - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyPlayReadyConfiguration{} - -func (s ContentKeyPolicyPlayReadyConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyPlayReadyConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyPlayReadyConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyPlayReadyConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go deleted file mode 100644 index 1795b14bc22b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyPlayReadyContentKeyLocation = ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader{} - -type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader struct { - - // Fields inherited from ContentKeyPolicyPlayReadyContentKeyLocation -} - -var _ json.Marshaler = ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader{} - -func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go deleted file mode 100644 index 91ed242963b5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go +++ /dev/null @@ -1,41 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyPlayReadyContentKeyLocation = ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier{} - -type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier struct { - KeyId string `json:"keyId"` - - // Fields inherited from ContentKeyPolicyPlayReadyContentKeyLocation -} - -var _ json.Marshaler = ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier{} - -func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go deleted file mode 100644 index 75a94bf4c3a8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go +++ /dev/null @@ -1,56 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyPlayReadyContentKeyLocation interface { -} - -func unmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(input []byte) (ContentKeyPolicyPlayReadyContentKeyLocation, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyContentKeyLocation into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader") { - var out ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier") { - var out ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) - } - return out, nil - } - - type RawContentKeyPolicyPlayReadyContentKeyLocationImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawContentKeyPolicyPlayReadyContentKeyLocationImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadyexplicitanalogtelevisionrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadyexplicitanalogtelevisionrestriction.go deleted file mode 100644 index 8720a1e96ff0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadyexplicitanalogtelevisionrestriction.go +++ /dev/null @@ -1,9 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction struct { - BestEffort bool `json:"bestEffort"` - ConfigurationData int64 `json:"configurationData"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go deleted file mode 100644 index db772324208f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go +++ /dev/null @@ -1,83 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyPlayReadyLicense struct { - AllowTestDevices bool `json:"allowTestDevices"` - BeginDate *string `json:"beginDate,omitempty"` - ContentKeyLocation ContentKeyPolicyPlayReadyContentKeyLocation `json:"contentKeyLocation"` - ContentType ContentKeyPolicyPlayReadyContentType `json:"contentType"` - ExpirationDate *string `json:"expirationDate,omitempty"` - GracePeriod *string `json:"gracePeriod,omitempty"` - LicenseType ContentKeyPolicyPlayReadyLicenseType `json:"licenseType"` - PlayRight *ContentKeyPolicyPlayReadyPlayRight `json:"playRight,omitempty"` - RelativeBeginDate *string `json:"relativeBeginDate,omitempty"` - RelativeExpirationDate *string `json:"relativeExpirationDate,omitempty"` -} - -func (o *ContentKeyPolicyPlayReadyLicense) GetBeginDateAsTime() (*time.Time, error) { - if o.BeginDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.BeginDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *ContentKeyPolicyPlayReadyLicense) SetBeginDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.BeginDate = &formatted -} - -func (o *ContentKeyPolicyPlayReadyLicense) GetExpirationDateAsTime() (*time.Time, error) { - if o.ExpirationDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ExpirationDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *ContentKeyPolicyPlayReadyLicense) SetExpirationDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ExpirationDate = &formatted -} - -var _ json.Unmarshaler = &ContentKeyPolicyPlayReadyLicense{} - -func (s *ContentKeyPolicyPlayReadyLicense) UnmarshalJSON(bytes []byte) error { - type alias ContentKeyPolicyPlayReadyLicense - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ContentKeyPolicyPlayReadyLicense: %+v", err) - } - - s.AllowTestDevices = decoded.AllowTestDevices - s.BeginDate = decoded.BeginDate - s.ContentType = decoded.ContentType - s.ExpirationDate = decoded.ExpirationDate - s.GracePeriod = decoded.GracePeriod - s.LicenseType = decoded.LicenseType - s.PlayRight = decoded.PlayRight - s.RelativeBeginDate = decoded.RelativeBeginDate - s.RelativeExpirationDate = decoded.RelativeExpirationDate - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyLicense into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["contentKeyLocation"]; ok { - impl, err := unmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'ContentKeyLocation' for 'ContentKeyPolicyPlayReadyLicense': %+v", err) - } - s.ContentKeyLocation = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadyplayright.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadyplayright.go deleted file mode 100644 index 315378b0a22c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyplayreadyplayright.go +++ /dev/null @@ -1,20 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyPlayReadyPlayRight struct { - AgcAndColorStripeRestriction *int64 `json:"agcAndColorStripeRestriction,omitempty"` - AllowPassingVideoContentToUnknownOutput ContentKeyPolicyPlayReadyUnknownOutputPassingOption `json:"allowPassingVideoContentToUnknownOutput"` - AnalogVideoOpl *int64 `json:"analogVideoOpl,omitempty"` - CompressedDigitalAudioOpl *int64 `json:"compressedDigitalAudioOpl,omitempty"` - CompressedDigitalVideoOpl *int64 `json:"compressedDigitalVideoOpl,omitempty"` - DigitalVideoOnlyContentRestriction bool `json:"digitalVideoOnlyContentRestriction"` - ExplicitAnalogTelevisionOutputRestriction *ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction `json:"explicitAnalogTelevisionOutputRestriction,omitempty"` - FirstPlayExpiration *string `json:"firstPlayExpiration,omitempty"` - ImageConstraintForAnalogComponentVideoRestriction bool `json:"imageConstraintForAnalogComponentVideoRestriction"` - ImageConstraintForAnalogComputerMonitorRestriction bool `json:"imageConstraintForAnalogComputerMonitorRestriction"` - ScmsRestriction *int64 `json:"scmsRestriction,omitempty"` - UncompressedDigitalAudioOpl *int64 `json:"uncompressedDigitalAudioOpl,omitempty"` - UncompressedDigitalVideoOpl *int64 `json:"uncompressedDigitalVideoOpl,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyproperties.go deleted file mode 100644 index af3576dec79d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyproperties.go +++ /dev/null @@ -1,42 +0,0 @@ -package contentkeypolicies - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyProperties struct { - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - Options []ContentKeyPolicyOption `json:"options"` - PolicyId *string `json:"policyId,omitempty"` -} - -func (o *ContentKeyPolicyProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *ContentKeyPolicyProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *ContentKeyPolicyProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *ContentKeyPolicyProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyrestriction.go deleted file mode 100644 index 155776286c30..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyrestriction.go +++ /dev/null @@ -1,64 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyRestriction interface { -} - -func unmarshalContentKeyPolicyRestrictionImplementation(input []byte) (ContentKeyPolicyRestriction, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyRestriction into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyOpenRestriction") { - var out ContentKeyPolicyOpenRestriction - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyOpenRestriction: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyTokenRestriction") { - var out ContentKeyPolicyTokenRestriction - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyTokenRestriction: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyUnknownRestriction") { - var out ContentKeyPolicyUnknownRestriction - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyUnknownRestriction: %+v", err) - } - return out, nil - } - - type RawContentKeyPolicyRestrictionImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawContentKeyPolicyRestrictionImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go deleted file mode 100644 index 1cf28ead243f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go +++ /dev/null @@ -1,64 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyRestrictionTokenKey interface { -} - -func unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(input []byte) (ContentKeyPolicyRestrictionTokenKey, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyRestrictionTokenKey into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyRsaTokenKey") { - var out ContentKeyPolicyRsaTokenKey - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyRsaTokenKey: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicySymmetricTokenKey") { - var out ContentKeyPolicySymmetricTokenKey - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicySymmetricTokenKey: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey") { - var out ContentKeyPolicyX509CertificateTokenKey - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ContentKeyPolicyX509CertificateTokenKey: %+v", err) - } - return out, nil - } - - type RawContentKeyPolicyRestrictionTokenKeyImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawContentKeyPolicyRestrictionTokenKeyImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go deleted file mode 100644 index 75dc037576d1..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go +++ /dev/null @@ -1,42 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestrictionTokenKey = ContentKeyPolicyRsaTokenKey{} - -type ContentKeyPolicyRsaTokenKey struct { - Exponent string `json:"exponent"` - Modulus string `json:"modulus"` - - // Fields inherited from ContentKeyPolicyRestrictionTokenKey -} - -var _ json.Marshaler = ContentKeyPolicyRsaTokenKey{} - -func (s ContentKeyPolicyRsaTokenKey) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyRsaTokenKey - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyRsaTokenKey: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyRsaTokenKey: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyRsaTokenKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyRsaTokenKey: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go deleted file mode 100644 index 97eab4e535d4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go +++ /dev/null @@ -1,41 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestrictionTokenKey = ContentKeyPolicySymmetricTokenKey{} - -type ContentKeyPolicySymmetricTokenKey struct { - KeyValue string `json:"keyValue"` - - // Fields inherited from ContentKeyPolicyRestrictionTokenKey -} - -var _ json.Marshaler = ContentKeyPolicySymmetricTokenKey{} - -func (s ContentKeyPolicySymmetricTokenKey) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicySymmetricTokenKey - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicySymmetricTokenKey: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicySymmetricTokenKey: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicySymmetricTokenKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicySymmetricTokenKey: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicytokenclaim.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicytokenclaim.go deleted file mode 100644 index 5ce3fb3f3197..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicytokenclaim.go +++ /dev/null @@ -1,9 +0,0 @@ -package contentkeypolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContentKeyPolicyTokenClaim struct { - ClaimType *string `json:"claimType,omitempty"` - ClaimValue *string `json:"claimValue,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go deleted file mode 100644 index 6b5e417cc011..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go +++ /dev/null @@ -1,94 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestriction = ContentKeyPolicyTokenRestriction{} - -type ContentKeyPolicyTokenRestriction struct { - AlternateVerificationKeys *[]ContentKeyPolicyRestrictionTokenKey `json:"alternateVerificationKeys,omitempty"` - Audience string `json:"audience"` - Issuer string `json:"issuer"` - OpenIdConnectDiscoveryDocument *string `json:"openIdConnectDiscoveryDocument,omitempty"` - PrimaryVerificationKey ContentKeyPolicyRestrictionTokenKey `json:"primaryVerificationKey"` - RequiredClaims *[]ContentKeyPolicyTokenClaim `json:"requiredClaims,omitempty"` - RestrictionTokenType ContentKeyPolicyRestrictionTokenType `json:"restrictionTokenType"` - - // Fields inherited from ContentKeyPolicyRestriction -} - -var _ json.Marshaler = ContentKeyPolicyTokenRestriction{} - -func (s ContentKeyPolicyTokenRestriction) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyTokenRestriction - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyTokenRestriction: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyTokenRestriction: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyTokenRestriction" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyTokenRestriction: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &ContentKeyPolicyTokenRestriction{} - -func (s *ContentKeyPolicyTokenRestriction) UnmarshalJSON(bytes []byte) error { - type alias ContentKeyPolicyTokenRestriction - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ContentKeyPolicyTokenRestriction: %+v", err) - } - - s.Audience = decoded.Audience - s.Issuer = decoded.Issuer - s.OpenIdConnectDiscoveryDocument = decoded.OpenIdConnectDiscoveryDocument - s.RequiredClaims = decoded.RequiredClaims - s.RestrictionTokenType = decoded.RestrictionTokenType - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ContentKeyPolicyTokenRestriction into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["alternateVerificationKeys"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling AlternateVerificationKeys into list []json.RawMessage: %+v", err) - } - - output := make([]ContentKeyPolicyRestrictionTokenKey, 0) - for i, val := range listTemp { - impl, err := unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'AlternateVerificationKeys' for 'ContentKeyPolicyTokenRestriction': %+v", i, err) - } - output = append(output, impl) - } - s.AlternateVerificationKeys = &output - } - - if v, ok := temp["primaryVerificationKey"]; ok { - impl, err := unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'PrimaryVerificationKey' for 'ContentKeyPolicyTokenRestriction': %+v", err) - } - s.PrimaryVerificationKey = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go deleted file mode 100644 index 9683eb34e564..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyUnknownConfiguration{} - -type ContentKeyPolicyUnknownConfiguration struct { - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyUnknownConfiguration{} - -func (s ContentKeyPolicyUnknownConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyUnknownConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyUnknownConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyUnknownConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyUnknownConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyUnknownConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go deleted file mode 100644 index a7ab64728f2f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go +++ /dev/null @@ -1,40 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestriction = ContentKeyPolicyUnknownRestriction{} - -type ContentKeyPolicyUnknownRestriction struct { - - // Fields inherited from ContentKeyPolicyRestriction -} - -var _ json.Marshaler = ContentKeyPolicyUnknownRestriction{} - -func (s ContentKeyPolicyUnknownRestriction) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyUnknownRestriction - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyUnknownRestriction: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyUnknownRestriction: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyUnknownRestriction" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyUnknownRestriction: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go deleted file mode 100644 index 1a79d2879645..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go +++ /dev/null @@ -1,41 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyConfiguration = ContentKeyPolicyWidevineConfiguration{} - -type ContentKeyPolicyWidevineConfiguration struct { - WidevineTemplate string `json:"widevineTemplate"` - - // Fields inherited from ContentKeyPolicyConfiguration -} - -var _ json.Marshaler = ContentKeyPolicyWidevineConfiguration{} - -func (s ContentKeyPolicyWidevineConfiguration) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyWidevineConfiguration - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyWidevineConfiguration: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyWidevineConfiguration: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyWidevineConfiguration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyWidevineConfiguration: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go deleted file mode 100644 index 0810b28176e1..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go +++ /dev/null @@ -1,41 +0,0 @@ -package contentkeypolicies - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ContentKeyPolicyRestrictionTokenKey = ContentKeyPolicyX509CertificateTokenKey{} - -type ContentKeyPolicyX509CertificateTokenKey struct { - RawBody string `json:"rawBody"` - - // Fields inherited from ContentKeyPolicyRestrictionTokenKey -} - -var _ json.Marshaler = ContentKeyPolicyX509CertificateTokenKey{} - -func (s ContentKeyPolicyX509CertificateTokenKey) MarshalJSON() ([]byte, error) { - type wrapper ContentKeyPolicyX509CertificateTokenKey - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ContentKeyPolicyX509CertificateTokenKey: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ContentKeyPolicyX509CertificateTokenKey: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ContentKeyPolicyX509CertificateTokenKey: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/predicates.go deleted file mode 100644 index d16ed09d1719..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/predicates.go +++ /dev/null @@ -1,24 +0,0 @@ -package contentkeypolicies - -type ContentKeyPolicyOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ContentKeyPolicyOperationPredicate) Matches(input ContentKeyPolicy) bool { - - if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/version.go deleted file mode 100644 index 281b480bc314..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package contentkeypolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2020-05-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contentkeypolicies/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/README.md deleted file mode 100644 index ecae4eb91fe9..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/README.md +++ /dev/null @@ -1,218 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings` Documentation - -The `encodings` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2020-05-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings" -``` - - -### Client Initialization - -```go -client := encodings.NewEncodingsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `EncodingsClient.JobsCancelJob` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -read, err := client.JobsCancelJob(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.JobsCreate` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -payload := encodings.Job{ - // ... -} - - -read, err := client.JobsCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.JobsDelete` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -read, err := client.JobsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.JobsGet` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -read, err := client.JobsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.JobsList` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -// alternatively `client.JobsList(ctx, id, encodings.DefaultJobsListOperationOptions())` can be used to do batched pagination -items, err := client.JobsListComplete(ctx, id, encodings.DefaultJobsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `EncodingsClient.JobsUpdate` - -```go -ctx := context.TODO() -id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue") - -payload := encodings.Job{ - // ... -} - - -read, err := client.JobsUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.TransformsCreateOrUpdate` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -payload := encodings.Transform{ - // ... -} - - -read, err := client.TransformsCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.TransformsDelete` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -read, err := client.TransformsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.TransformsGet` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -read, err := client.TransformsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `EncodingsClient.TransformsList` - -```go -ctx := context.TODO() -id := encodings.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.TransformsList(ctx, id, encodings.DefaultTransformsListOperationOptions())` can be used to do batched pagination -items, err := client.TransformsListComplete(ctx, id, encodings.DefaultTransformsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `EncodingsClient.TransformsUpdate` - -```go -ctx := context.TODO() -id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue") - -payload := encodings.Transform{ - // ... -} - - -read, err := client.TransformsUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/client.go deleted file mode 100644 index 8536e0c8a4dd..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/client.go +++ /dev/null @@ -1,18 +0,0 @@ -package encodings - -import "github.com/Azure/go-autorest/autorest" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EncodingsClient struct { - Client autorest.Client - baseUri string -} - -func NewEncodingsClientWithBaseURI(endpoint string) EncodingsClient { - return EncodingsClient{ - Client: autorest.NewClientWithUserAgent(userAgent()), - baseUri: endpoint, - } -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/constants.go deleted file mode 100644 index 1b90081f568f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/constants.go +++ /dev/null @@ -1,908 +0,0 @@ -package encodings - -import "strings" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AacAudioProfile string - -const ( - AacAudioProfileAacLc AacAudioProfile = "AacLc" - AacAudioProfileHeAacVOne AacAudioProfile = "HeAacV1" - AacAudioProfileHeAacVTwo AacAudioProfile = "HeAacV2" -) - -func PossibleValuesForAacAudioProfile() []string { - return []string{ - string(AacAudioProfileAacLc), - string(AacAudioProfileHeAacVOne), - string(AacAudioProfileHeAacVTwo), - } -} - -func parseAacAudioProfile(input string) (*AacAudioProfile, error) { - vals := map[string]AacAudioProfile{ - "aaclc": AacAudioProfileAacLc, - "heaacv1": AacAudioProfileHeAacVOne, - "heaacv2": AacAudioProfileHeAacVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AacAudioProfile(input) - return &out, nil -} - -type AnalysisResolution string - -const ( - AnalysisResolutionSourceResolution AnalysisResolution = "SourceResolution" - AnalysisResolutionStandardDefinition AnalysisResolution = "StandardDefinition" -) - -func PossibleValuesForAnalysisResolution() []string { - return []string{ - string(AnalysisResolutionSourceResolution), - string(AnalysisResolutionStandardDefinition), - } -} - -func parseAnalysisResolution(input string) (*AnalysisResolution, error) { - vals := map[string]AnalysisResolution{ - "sourceresolution": AnalysisResolutionSourceResolution, - "standarddefinition": AnalysisResolutionStandardDefinition, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AnalysisResolution(input) - return &out, nil -} - -type AttributeFilter string - -const ( - AttributeFilterAll AttributeFilter = "All" - AttributeFilterBottom AttributeFilter = "Bottom" - AttributeFilterTop AttributeFilter = "Top" - AttributeFilterValueEquals AttributeFilter = "ValueEquals" -) - -func PossibleValuesForAttributeFilter() []string { - return []string{ - string(AttributeFilterAll), - string(AttributeFilterBottom), - string(AttributeFilterTop), - string(AttributeFilterValueEquals), - } -} - -func parseAttributeFilter(input string) (*AttributeFilter, error) { - vals := map[string]AttributeFilter{ - "all": AttributeFilterAll, - "bottom": AttributeFilterBottom, - "top": AttributeFilterTop, - "valueequals": AttributeFilterValueEquals, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AttributeFilter(input) - return &out, nil -} - -type AudioAnalysisMode string - -const ( - AudioAnalysisModeBasic AudioAnalysisMode = "Basic" - AudioAnalysisModeStandard AudioAnalysisMode = "Standard" -) - -func PossibleValuesForAudioAnalysisMode() []string { - return []string{ - string(AudioAnalysisModeBasic), - string(AudioAnalysisModeStandard), - } -} - -func parseAudioAnalysisMode(input string) (*AudioAnalysisMode, error) { - vals := map[string]AudioAnalysisMode{ - "basic": AudioAnalysisModeBasic, - "standard": AudioAnalysisModeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AudioAnalysisMode(input) - return &out, nil -} - -type BlurType string - -const ( - BlurTypeBlack BlurType = "Black" - BlurTypeBox BlurType = "Box" - BlurTypeHigh BlurType = "High" - BlurTypeLow BlurType = "Low" - BlurTypeMed BlurType = "Med" -) - -func PossibleValuesForBlurType() []string { - return []string{ - string(BlurTypeBlack), - string(BlurTypeBox), - string(BlurTypeHigh), - string(BlurTypeLow), - string(BlurTypeMed), - } -} - -func parseBlurType(input string) (*BlurType, error) { - vals := map[string]BlurType{ - "black": BlurTypeBlack, - "box": BlurTypeBox, - "high": BlurTypeHigh, - "low": BlurTypeLow, - "med": BlurTypeMed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BlurType(input) - return &out, nil -} - -type ChannelMapping string - -const ( - ChannelMappingBackLeft ChannelMapping = "BackLeft" - ChannelMappingBackRight ChannelMapping = "BackRight" - ChannelMappingCenter ChannelMapping = "Center" - ChannelMappingFrontLeft ChannelMapping = "FrontLeft" - ChannelMappingFrontRight ChannelMapping = "FrontRight" - ChannelMappingLowFrequencyEffects ChannelMapping = "LowFrequencyEffects" - ChannelMappingStereoLeft ChannelMapping = "StereoLeft" - ChannelMappingStereoRight ChannelMapping = "StereoRight" -) - -func PossibleValuesForChannelMapping() []string { - return []string{ - string(ChannelMappingBackLeft), - string(ChannelMappingBackRight), - string(ChannelMappingCenter), - string(ChannelMappingFrontLeft), - string(ChannelMappingFrontRight), - string(ChannelMappingLowFrequencyEffects), - string(ChannelMappingStereoLeft), - string(ChannelMappingStereoRight), - } -} - -func parseChannelMapping(input string) (*ChannelMapping, error) { - vals := map[string]ChannelMapping{ - "backleft": ChannelMappingBackLeft, - "backright": ChannelMappingBackRight, - "center": ChannelMappingCenter, - "frontleft": ChannelMappingFrontLeft, - "frontright": ChannelMappingFrontRight, - "lowfrequencyeffects": ChannelMappingLowFrequencyEffects, - "stereoleft": ChannelMappingStereoLeft, - "stereoright": ChannelMappingStereoRight, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ChannelMapping(input) - return &out, nil -} - -type DeinterlaceMode string - -const ( - DeinterlaceModeAutoPixelAdaptive DeinterlaceMode = "AutoPixelAdaptive" - DeinterlaceModeOff DeinterlaceMode = "Off" -) - -func PossibleValuesForDeinterlaceMode() []string { - return []string{ - string(DeinterlaceModeAutoPixelAdaptive), - string(DeinterlaceModeOff), - } -} - -func parseDeinterlaceMode(input string) (*DeinterlaceMode, error) { - vals := map[string]DeinterlaceMode{ - "autopixeladaptive": DeinterlaceModeAutoPixelAdaptive, - "off": DeinterlaceModeOff, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeinterlaceMode(input) - return &out, nil -} - -type DeinterlaceParity string - -const ( - DeinterlaceParityAuto DeinterlaceParity = "Auto" - DeinterlaceParityBottomFieldFirst DeinterlaceParity = "BottomFieldFirst" - DeinterlaceParityTopFieldFirst DeinterlaceParity = "TopFieldFirst" -) - -func PossibleValuesForDeinterlaceParity() []string { - return []string{ - string(DeinterlaceParityAuto), - string(DeinterlaceParityBottomFieldFirst), - string(DeinterlaceParityTopFieldFirst), - } -} - -func parseDeinterlaceParity(input string) (*DeinterlaceParity, error) { - vals := map[string]DeinterlaceParity{ - "auto": DeinterlaceParityAuto, - "bottomfieldfirst": DeinterlaceParityBottomFieldFirst, - "topfieldfirst": DeinterlaceParityTopFieldFirst, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeinterlaceParity(input) - return &out, nil -} - -type EncoderNamedPreset string - -const ( - EncoderNamedPresetAACGoodQualityAudio EncoderNamedPreset = "AACGoodQualityAudio" - EncoderNamedPresetAdaptiveStreaming EncoderNamedPreset = "AdaptiveStreaming" - EncoderNamedPresetContentAwareEncoding EncoderNamedPreset = "ContentAwareEncoding" - EncoderNamedPresetContentAwareEncodingExperimental EncoderNamedPreset = "ContentAwareEncodingExperimental" - EncoderNamedPresetCopyAllBitrateNonInterleaved EncoderNamedPreset = "CopyAllBitrateNonInterleaved" - EncoderNamedPresetHTwoSixFiveAdaptiveStreaming EncoderNamedPreset = "H265AdaptiveStreaming" - EncoderNamedPresetHTwoSixFiveContentAwareEncoding EncoderNamedPreset = "H265ContentAwareEncoding" - EncoderNamedPresetHTwoSixFiveSingleBitrateFourK EncoderNamedPreset = "H265SingleBitrate4K" - EncoderNamedPresetHTwoSixFiveSingleBitrateOneZeroEightZerop EncoderNamedPreset = "H265SingleBitrate1080p" - EncoderNamedPresetHTwoSixFiveSingleBitrateSevenTwoZerop EncoderNamedPreset = "H265SingleBitrate720p" - EncoderNamedPresetHTwoSixFourMultipleBitrateOneZeroEightZerop EncoderNamedPreset = "H264MultipleBitrate1080p" - EncoderNamedPresetHTwoSixFourMultipleBitrateSD EncoderNamedPreset = "H264MultipleBitrateSD" - EncoderNamedPresetHTwoSixFourMultipleBitrateSevenTwoZerop EncoderNamedPreset = "H264MultipleBitrate720p" - EncoderNamedPresetHTwoSixFourSingleBitrateOneZeroEightZerop EncoderNamedPreset = "H264SingleBitrate1080p" - EncoderNamedPresetHTwoSixFourSingleBitrateSD EncoderNamedPreset = "H264SingleBitrateSD" - EncoderNamedPresetHTwoSixFourSingleBitrateSevenTwoZerop EncoderNamedPreset = "H264SingleBitrate720p" -) - -func PossibleValuesForEncoderNamedPreset() []string { - return []string{ - string(EncoderNamedPresetAACGoodQualityAudio), - string(EncoderNamedPresetAdaptiveStreaming), - string(EncoderNamedPresetContentAwareEncoding), - string(EncoderNamedPresetContentAwareEncodingExperimental), - string(EncoderNamedPresetCopyAllBitrateNonInterleaved), - string(EncoderNamedPresetHTwoSixFiveAdaptiveStreaming), - string(EncoderNamedPresetHTwoSixFiveContentAwareEncoding), - string(EncoderNamedPresetHTwoSixFiveSingleBitrateFourK), - string(EncoderNamedPresetHTwoSixFiveSingleBitrateOneZeroEightZerop), - string(EncoderNamedPresetHTwoSixFiveSingleBitrateSevenTwoZerop), - string(EncoderNamedPresetHTwoSixFourMultipleBitrateOneZeroEightZerop), - string(EncoderNamedPresetHTwoSixFourMultipleBitrateSD), - string(EncoderNamedPresetHTwoSixFourMultipleBitrateSevenTwoZerop), - string(EncoderNamedPresetHTwoSixFourSingleBitrateOneZeroEightZerop), - string(EncoderNamedPresetHTwoSixFourSingleBitrateSD), - string(EncoderNamedPresetHTwoSixFourSingleBitrateSevenTwoZerop), - } -} - -func parseEncoderNamedPreset(input string) (*EncoderNamedPreset, error) { - vals := map[string]EncoderNamedPreset{ - "aacgoodqualityaudio": EncoderNamedPresetAACGoodQualityAudio, - "adaptivestreaming": EncoderNamedPresetAdaptiveStreaming, - "contentawareencoding": EncoderNamedPresetContentAwareEncoding, - "contentawareencodingexperimental": EncoderNamedPresetContentAwareEncodingExperimental, - "copyallbitratenoninterleaved": EncoderNamedPresetCopyAllBitrateNonInterleaved, - "h265adaptivestreaming": EncoderNamedPresetHTwoSixFiveAdaptiveStreaming, - "h265contentawareencoding": EncoderNamedPresetHTwoSixFiveContentAwareEncoding, - "h265singlebitrate4k": EncoderNamedPresetHTwoSixFiveSingleBitrateFourK, - "h265singlebitrate1080p": EncoderNamedPresetHTwoSixFiveSingleBitrateOneZeroEightZerop, - "h265singlebitrate720p": EncoderNamedPresetHTwoSixFiveSingleBitrateSevenTwoZerop, - "h264multiplebitrate1080p": EncoderNamedPresetHTwoSixFourMultipleBitrateOneZeroEightZerop, - "h264multiplebitratesd": EncoderNamedPresetHTwoSixFourMultipleBitrateSD, - "h264multiplebitrate720p": EncoderNamedPresetHTwoSixFourMultipleBitrateSevenTwoZerop, - "h264singlebitrate1080p": EncoderNamedPresetHTwoSixFourSingleBitrateOneZeroEightZerop, - "h264singlebitratesd": EncoderNamedPresetHTwoSixFourSingleBitrateSD, - "h264singlebitrate720p": EncoderNamedPresetHTwoSixFourSingleBitrateSevenTwoZerop, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EncoderNamedPreset(input) - return &out, nil -} - -type EntropyMode string - -const ( - EntropyModeCabac EntropyMode = "Cabac" - EntropyModeCavlc EntropyMode = "Cavlc" -) - -func PossibleValuesForEntropyMode() []string { - return []string{ - string(EntropyModeCabac), - string(EntropyModeCavlc), - } -} - -func parseEntropyMode(input string) (*EntropyMode, error) { - vals := map[string]EntropyMode{ - "cabac": EntropyModeCabac, - "cavlc": EntropyModeCavlc, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EntropyMode(input) - return &out, nil -} - -type FaceRedactorMode string - -const ( - FaceRedactorModeAnalyze FaceRedactorMode = "Analyze" - FaceRedactorModeCombined FaceRedactorMode = "Combined" - FaceRedactorModeRedact FaceRedactorMode = "Redact" -) - -func PossibleValuesForFaceRedactorMode() []string { - return []string{ - string(FaceRedactorModeAnalyze), - string(FaceRedactorModeCombined), - string(FaceRedactorModeRedact), - } -} - -func parseFaceRedactorMode(input string) (*FaceRedactorMode, error) { - vals := map[string]FaceRedactorMode{ - "analyze": FaceRedactorModeAnalyze, - "combined": FaceRedactorModeCombined, - "redact": FaceRedactorModeRedact, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FaceRedactorMode(input) - return &out, nil -} - -type H264Complexity string - -const ( - H264ComplexityBalanced H264Complexity = "Balanced" - H264ComplexityQuality H264Complexity = "Quality" - H264ComplexitySpeed H264Complexity = "Speed" -) - -func PossibleValuesForH264Complexity() []string { - return []string{ - string(H264ComplexityBalanced), - string(H264ComplexityQuality), - string(H264ComplexitySpeed), - } -} - -func parseH264Complexity(input string) (*H264Complexity, error) { - vals := map[string]H264Complexity{ - "balanced": H264ComplexityBalanced, - "quality": H264ComplexityQuality, - "speed": H264ComplexitySpeed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H264Complexity(input) - return &out, nil -} - -type H264VideoProfile string - -const ( - H264VideoProfileAuto H264VideoProfile = "Auto" - H264VideoProfileBaseline H264VideoProfile = "Baseline" - H264VideoProfileHigh H264VideoProfile = "High" - H264VideoProfileHighFourFourFour H264VideoProfile = "High444" - H264VideoProfileHighFourTwoTwo H264VideoProfile = "High422" - H264VideoProfileMain H264VideoProfile = "Main" -) - -func PossibleValuesForH264VideoProfile() []string { - return []string{ - string(H264VideoProfileAuto), - string(H264VideoProfileBaseline), - string(H264VideoProfileHigh), - string(H264VideoProfileHighFourFourFour), - string(H264VideoProfileHighFourTwoTwo), - string(H264VideoProfileMain), - } -} - -func parseH264VideoProfile(input string) (*H264VideoProfile, error) { - vals := map[string]H264VideoProfile{ - "auto": H264VideoProfileAuto, - "baseline": H264VideoProfileBaseline, - "high": H264VideoProfileHigh, - "high444": H264VideoProfileHighFourFourFour, - "high422": H264VideoProfileHighFourTwoTwo, - "main": H264VideoProfileMain, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H264VideoProfile(input) - return &out, nil -} - -type H265Complexity string - -const ( - H265ComplexityBalanced H265Complexity = "Balanced" - H265ComplexityQuality H265Complexity = "Quality" - H265ComplexitySpeed H265Complexity = "Speed" -) - -func PossibleValuesForH265Complexity() []string { - return []string{ - string(H265ComplexityBalanced), - string(H265ComplexityQuality), - string(H265ComplexitySpeed), - } -} - -func parseH265Complexity(input string) (*H265Complexity, error) { - vals := map[string]H265Complexity{ - "balanced": H265ComplexityBalanced, - "quality": H265ComplexityQuality, - "speed": H265ComplexitySpeed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H265Complexity(input) - return &out, nil -} - -type H265VideoProfile string - -const ( - H265VideoProfileAuto H265VideoProfile = "Auto" - H265VideoProfileMain H265VideoProfile = "Main" -) - -func PossibleValuesForH265VideoProfile() []string { - return []string{ - string(H265VideoProfileAuto), - string(H265VideoProfileMain), - } -} - -func parseH265VideoProfile(input string) (*H265VideoProfile, error) { - vals := map[string]H265VideoProfile{ - "auto": H265VideoProfileAuto, - "main": H265VideoProfileMain, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := H265VideoProfile(input) - return &out, nil -} - -type InsightsType string - -const ( - InsightsTypeAllInsights InsightsType = "AllInsights" - InsightsTypeAudioInsightsOnly InsightsType = "AudioInsightsOnly" - InsightsTypeVideoInsightsOnly InsightsType = "VideoInsightsOnly" -) - -func PossibleValuesForInsightsType() []string { - return []string{ - string(InsightsTypeAllInsights), - string(InsightsTypeAudioInsightsOnly), - string(InsightsTypeVideoInsightsOnly), - } -} - -func parseInsightsType(input string) (*InsightsType, error) { - vals := map[string]InsightsType{ - "allinsights": InsightsTypeAllInsights, - "audioinsightsonly": InsightsTypeAudioInsightsOnly, - "videoinsightsonly": InsightsTypeVideoInsightsOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := InsightsType(input) - return &out, nil -} - -type JobErrorCategory string - -const ( - JobErrorCategoryConfiguration JobErrorCategory = "Configuration" - JobErrorCategoryContent JobErrorCategory = "Content" - JobErrorCategoryDownload JobErrorCategory = "Download" - JobErrorCategoryService JobErrorCategory = "Service" - JobErrorCategoryUpload JobErrorCategory = "Upload" -) - -func PossibleValuesForJobErrorCategory() []string { - return []string{ - string(JobErrorCategoryConfiguration), - string(JobErrorCategoryContent), - string(JobErrorCategoryDownload), - string(JobErrorCategoryService), - string(JobErrorCategoryUpload), - } -} - -func parseJobErrorCategory(input string) (*JobErrorCategory, error) { - vals := map[string]JobErrorCategory{ - "configuration": JobErrorCategoryConfiguration, - "content": JobErrorCategoryContent, - "download": JobErrorCategoryDownload, - "service": JobErrorCategoryService, - "upload": JobErrorCategoryUpload, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := JobErrorCategory(input) - return &out, nil -} - -type JobErrorCode string - -const ( - JobErrorCodeConfigurationUnsupported JobErrorCode = "ConfigurationUnsupported" - JobErrorCodeContentMalformed JobErrorCode = "ContentMalformed" - JobErrorCodeContentUnsupported JobErrorCode = "ContentUnsupported" - JobErrorCodeDownloadNotAccessible JobErrorCode = "DownloadNotAccessible" - JobErrorCodeDownloadTransientError JobErrorCode = "DownloadTransientError" - JobErrorCodeServiceError JobErrorCode = "ServiceError" - JobErrorCodeServiceTransientError JobErrorCode = "ServiceTransientError" - JobErrorCodeUploadNotAccessible JobErrorCode = "UploadNotAccessible" - JobErrorCodeUploadTransientError JobErrorCode = "UploadTransientError" -) - -func PossibleValuesForJobErrorCode() []string { - return []string{ - string(JobErrorCodeConfigurationUnsupported), - string(JobErrorCodeContentMalformed), - string(JobErrorCodeContentUnsupported), - string(JobErrorCodeDownloadNotAccessible), - string(JobErrorCodeDownloadTransientError), - string(JobErrorCodeServiceError), - string(JobErrorCodeServiceTransientError), - string(JobErrorCodeUploadNotAccessible), - string(JobErrorCodeUploadTransientError), - } -} - -func parseJobErrorCode(input string) (*JobErrorCode, error) { - vals := map[string]JobErrorCode{ - "configurationunsupported": JobErrorCodeConfigurationUnsupported, - "contentmalformed": JobErrorCodeContentMalformed, - "contentunsupported": JobErrorCodeContentUnsupported, - "downloadnotaccessible": JobErrorCodeDownloadNotAccessible, - "downloadtransienterror": JobErrorCodeDownloadTransientError, - "serviceerror": JobErrorCodeServiceError, - "servicetransienterror": JobErrorCodeServiceTransientError, - "uploadnotaccessible": JobErrorCodeUploadNotAccessible, - "uploadtransienterror": JobErrorCodeUploadTransientError, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := JobErrorCode(input) - return &out, nil -} - -type JobRetry string - -const ( - JobRetryDoNotRetry JobRetry = "DoNotRetry" - JobRetryMayRetry JobRetry = "MayRetry" -) - -func PossibleValuesForJobRetry() []string { - return []string{ - string(JobRetryDoNotRetry), - string(JobRetryMayRetry), - } -} - -func parseJobRetry(input string) (*JobRetry, error) { - vals := map[string]JobRetry{ - "donotretry": JobRetryDoNotRetry, - "mayretry": JobRetryMayRetry, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := JobRetry(input) - return &out, nil -} - -type JobState string - -const ( - JobStateCanceled JobState = "Canceled" - JobStateCanceling JobState = "Canceling" - JobStateError JobState = "Error" - JobStateFinished JobState = "Finished" - JobStateProcessing JobState = "Processing" - JobStateQueued JobState = "Queued" - JobStateScheduled JobState = "Scheduled" -) - -func PossibleValuesForJobState() []string { - return []string{ - string(JobStateCanceled), - string(JobStateCanceling), - string(JobStateError), - string(JobStateFinished), - string(JobStateProcessing), - string(JobStateQueued), - string(JobStateScheduled), - } -} - -func parseJobState(input string) (*JobState, error) { - vals := map[string]JobState{ - "canceled": JobStateCanceled, - "canceling": JobStateCanceling, - "error": JobStateError, - "finished": JobStateFinished, - "processing": JobStateProcessing, - "queued": JobStateQueued, - "scheduled": JobStateScheduled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := JobState(input) - return &out, nil -} - -type OnErrorType string - -const ( - OnErrorTypeContinueJob OnErrorType = "ContinueJob" - OnErrorTypeStopProcessingJob OnErrorType = "StopProcessingJob" -) - -func PossibleValuesForOnErrorType() []string { - return []string{ - string(OnErrorTypeContinueJob), - string(OnErrorTypeStopProcessingJob), - } -} - -func parseOnErrorType(input string) (*OnErrorType, error) { - vals := map[string]OnErrorType{ - "continuejob": OnErrorTypeContinueJob, - "stopprocessingjob": OnErrorTypeStopProcessingJob, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OnErrorType(input) - return &out, nil -} - -type Priority string - -const ( - PriorityHigh Priority = "High" - PriorityLow Priority = "Low" - PriorityNormal Priority = "Normal" -) - -func PossibleValuesForPriority() []string { - return []string{ - string(PriorityHigh), - string(PriorityLow), - string(PriorityNormal), - } -} - -func parsePriority(input string) (*Priority, error) { - vals := map[string]Priority{ - "high": PriorityHigh, - "low": PriorityLow, - "normal": PriorityNormal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Priority(input) - return &out, nil -} - -type Rotation string - -const ( - RotationAuto Rotation = "Auto" - RotationNone Rotation = "None" - RotationRotateNineZero Rotation = "Rotate90" - RotationRotateOneEightZero Rotation = "Rotate180" - RotationRotateTwoSevenZero Rotation = "Rotate270" - RotationRotateZero Rotation = "Rotate0" -) - -func PossibleValuesForRotation() []string { - return []string{ - string(RotationAuto), - string(RotationNone), - string(RotationRotateNineZero), - string(RotationRotateOneEightZero), - string(RotationRotateTwoSevenZero), - string(RotationRotateZero), - } -} - -func parseRotation(input string) (*Rotation, error) { - vals := map[string]Rotation{ - "auto": RotationAuto, - "none": RotationNone, - "rotate90": RotationRotateNineZero, - "rotate180": RotationRotateOneEightZero, - "rotate270": RotationRotateTwoSevenZero, - "rotate0": RotationRotateZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Rotation(input) - return &out, nil -} - -type StretchMode string - -const ( - StretchModeAutoFit StretchMode = "AutoFit" - StretchModeAutoSize StretchMode = "AutoSize" - StretchModeNone StretchMode = "None" -) - -func PossibleValuesForStretchMode() []string { - return []string{ - string(StretchModeAutoFit), - string(StretchModeAutoSize), - string(StretchModeNone), - } -} - -func parseStretchMode(input string) (*StretchMode, error) { - vals := map[string]StretchMode{ - "autofit": StretchModeAutoFit, - "autosize": StretchModeAutoSize, - "none": StretchModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StretchMode(input) - return &out, nil -} - -type TrackAttribute string - -const ( - TrackAttributeBitrate TrackAttribute = "Bitrate" - TrackAttributeLanguage TrackAttribute = "Language" -) - -func PossibleValuesForTrackAttribute() []string { - return []string{ - string(TrackAttributeBitrate), - string(TrackAttributeLanguage), - } -} - -func parseTrackAttribute(input string) (*TrackAttribute, error) { - vals := map[string]TrackAttribute{ - "bitrate": TrackAttributeBitrate, - "language": TrackAttributeLanguage, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TrackAttribute(input) - return &out, nil -} - -type VideoSyncMode string - -const ( - VideoSyncModeAuto VideoSyncMode = "Auto" - VideoSyncModeCfr VideoSyncMode = "Cfr" - VideoSyncModePassthrough VideoSyncMode = "Passthrough" - VideoSyncModeVfr VideoSyncMode = "Vfr" -) - -func PossibleValuesForVideoSyncMode() []string { - return []string{ - string(VideoSyncModeAuto), - string(VideoSyncModeCfr), - string(VideoSyncModePassthrough), - string(VideoSyncModeVfr), - } -} - -func parseVideoSyncMode(input string) (*VideoSyncMode, error) { - vals := map[string]VideoSyncMode{ - "auto": VideoSyncModeAuto, - "cfr": VideoSyncModeCfr, - "passthrough": VideoSyncModePassthrough, - "vfr": VideoSyncModeVfr, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VideoSyncMode(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/id_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/id_job.go deleted file mode 100644 index 167b08cac4a6..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/id_job.go +++ /dev/null @@ -1,150 +0,0 @@ -package encodings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = JobId{} - -// JobId is a struct representing the Resource ID for a Job -type JobId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - TransformName string - JobName string -} - -// NewJobID returns a new JobId struct -func NewJobID(subscriptionId string, resourceGroupName string, mediaServiceName string, transformName string, jobName string) JobId { - return JobId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - TransformName: transformName, - JobName: jobName, - } -} - -// ParseJobID parses 'input' into a JobId -func ParseJobID(input string) (*JobId, error) { - parser := resourceids.NewParserFromResourceIdType(JobId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := JobId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.TransformName, ok = parsed.Parsed["transformName"]; !ok { - return nil, fmt.Errorf("the segment 'transformName' was not found in the resource id %q", input) - } - - if id.JobName, ok = parsed.Parsed["jobName"]; !ok { - return nil, fmt.Errorf("the segment 'jobName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseJobIDInsensitively parses 'input' case-insensitively into a JobId -// note: this method should only be used for API response data and not user input -func ParseJobIDInsensitively(input string) (*JobId, error) { - parser := resourceids.NewParserFromResourceIdType(JobId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := JobId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.TransformName, ok = parsed.Parsed["transformName"]; !ok { - return nil, fmt.Errorf("the segment 'transformName' was not found in the resource id %q", input) - } - - if id.JobName, ok = parsed.Parsed["jobName"]; !ok { - return nil, fmt.Errorf("the segment 'jobName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateJobID checks that 'input' can be parsed as a Job ID -func ValidateJobID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseJobID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Job ID -func (id JobId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/transforms/%s/jobs/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.TransformName, id.JobName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Job ID -func (id JobId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticTransforms", "transforms", "transforms"), - resourceids.UserSpecifiedSegment("transformName", "transformValue"), - resourceids.StaticSegment("staticJobs", "jobs", "jobs"), - resourceids.UserSpecifiedSegment("jobName", "jobValue"), - } -} - -// String returns a human-readable description of this Job ID -func (id JobId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Transform Name: %q", id.TransformName), - fmt.Sprintf("Job Name: %q", id.JobName), - } - return fmt.Sprintf("Job (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/id_mediaservice.go deleted file mode 100644 index 558eaaf1c401..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/id_mediaservice.go +++ /dev/null @@ -1,124 +0,0 @@ -package encodings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/id_transform.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/id_transform.go deleted file mode 100644 index dc8d1dca3f89..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/id_transform.go +++ /dev/null @@ -1,137 +0,0 @@ -package encodings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = TransformId{} - -// TransformId is a struct representing the Resource ID for a Transform -type TransformId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - TransformName string -} - -// NewTransformID returns a new TransformId struct -func NewTransformID(subscriptionId string, resourceGroupName string, mediaServiceName string, transformName string) TransformId { - return TransformId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - TransformName: transformName, - } -} - -// ParseTransformID parses 'input' into a TransformId -func ParseTransformID(input string) (*TransformId, error) { - parser := resourceids.NewParserFromResourceIdType(TransformId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := TransformId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.TransformName, ok = parsed.Parsed["transformName"]; !ok { - return nil, fmt.Errorf("the segment 'transformName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseTransformIDInsensitively parses 'input' case-insensitively into a TransformId -// note: this method should only be used for API response data and not user input -func ParseTransformIDInsensitively(input string) (*TransformId, error) { - parser := resourceids.NewParserFromResourceIdType(TransformId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := TransformId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.TransformName, ok = parsed.Parsed["transformName"]; !ok { - return nil, fmt.Errorf("the segment 'transformName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateTransformID checks that 'input' can be parsed as a Transform ID -func ValidateTransformID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseTransformID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Transform ID -func (id TransformId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/transforms/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.TransformName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Transform ID -func (id TransformId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticTransforms", "transforms", "transforms"), - resourceids.UserSpecifiedSegment("transformName", "transformValue"), - } -} - -// String returns a human-readable description of this Transform ID -func (id TransformId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Transform Name: %q", id.TransformName), - } - return fmt.Sprintf("Transform (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobscanceljob_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobscanceljob_autorest.go deleted file mode 100644 index d49f2c4d6500..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobscanceljob_autorest.go +++ /dev/null @@ -1,67 +0,0 @@ -package encodings - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsCancelJobOperationResponse struct { - HttpResponse *http.Response -} - -// JobsCancelJob ... -func (c EncodingsClient) JobsCancelJob(ctx context.Context, id JobId) (result JobsCancelJobOperationResponse, err error) { - req, err := c.preparerForJobsCancelJob(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsCancelJob", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsCancelJob", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForJobsCancelJob(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsCancelJob", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForJobsCancelJob prepares the JobsCancelJob request. -func (c EncodingsClient) preparerForJobsCancelJob(ctx context.Context, id JobId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/cancelJob", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForJobsCancelJob handles the response to the JobsCancelJob request. The method always -// closes the http.Response Body. -func (c EncodingsClient) responderForJobsCancelJob(resp *http.Response) (result JobsCancelJobOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobscreate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobscreate_autorest.go deleted file mode 100644 index 8821acb2b283..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobscreate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsCreateOperationResponse struct { - HttpResponse *http.Response - Model *Job -} - -// JobsCreate ... -func (c EncodingsClient) JobsCreate(ctx context.Context, id JobId, input Job) (result JobsCreateOperationResponse, err error) { - req, err := c.preparerForJobsCreate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsCreate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsCreate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForJobsCreate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsCreate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForJobsCreate prepares the JobsCreate request. -func (c EncodingsClient) preparerForJobsCreate(ctx context.Context, id JobId, input Job) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForJobsCreate handles the response to the JobsCreate request. The method always -// closes the http.Response Body. -func (c EncodingsClient) responderForJobsCreate(resp *http.Response) (result JobsCreateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusCreated), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobsdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobsdelete_autorest.go deleted file mode 100644 index 64de15013ad3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobsdelete_autorest.go +++ /dev/null @@ -1,66 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsDeleteOperationResponse struct { - HttpResponse *http.Response -} - -// JobsDelete ... -func (c EncodingsClient) JobsDelete(ctx context.Context, id JobId) (result JobsDeleteOperationResponse, err error) { - req, err := c.preparerForJobsDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsDelete", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsDelete", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForJobsDelete(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsDelete", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForJobsDelete prepares the JobsDelete request. -func (c EncodingsClient) preparerForJobsDelete(ctx context.Context, id JobId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForJobsDelete handles the response to the JobsDelete request. The method always -// closes the http.Response Body. -func (c EncodingsClient) responderForJobsDelete(resp *http.Response) (result JobsDeleteOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobsget_autorest.go deleted file mode 100644 index 7626362c6628..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobsget_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsGetOperationResponse struct { - HttpResponse *http.Response - Model *Job -} - -// JobsGet ... -func (c EncodingsClient) JobsGet(ctx context.Context, id JobId) (result JobsGetOperationResponse, err error) { - req, err := c.preparerForJobsGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsGet", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsGet", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForJobsGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsGet", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForJobsGet prepares the JobsGet request. -func (c EncodingsClient) preparerForJobsGet(ctx context.Context, id JobId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForJobsGet handles the response to the JobsGet request. The method always -// closes the http.Response Body. -func (c EncodingsClient) responderForJobsGet(resp *http.Response) (result JobsGetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobslist_autorest.go deleted file mode 100644 index 1ebf64e2eb90..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobslist_autorest.go +++ /dev/null @@ -1,220 +0,0 @@ -package encodings - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsListOperationResponse struct { - HttpResponse *http.Response - Model *[]Job - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (JobsListOperationResponse, error) -} - -type JobsListCompleteResult struct { - Items []Job -} - -func (r JobsListOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r JobsListOperationResponse) LoadMore(ctx context.Context) (resp JobsListOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -type JobsListOperationOptions struct { - Filter *string - Orderby *string -} - -func DefaultJobsListOperationOptions() JobsListOperationOptions { - return JobsListOperationOptions{} -} - -func (o JobsListOperationOptions) toHeaders() map[string]interface{} { - out := make(map[string]interface{}) - - return out -} - -func (o JobsListOperationOptions) toQueryString() map[string]interface{} { - out := make(map[string]interface{}) - - if o.Filter != nil { - out["$filter"] = *o.Filter - } - - if o.Orderby != nil { - out["$orderby"] = *o.Orderby - } - - return out -} - -// JobsList ... -func (c EncodingsClient) JobsList(ctx context.Context, id TransformId, options JobsListOperationOptions) (resp JobsListOperationResponse, err error) { - req, err := c.preparerForJobsList(ctx, id, options) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsList", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsList", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForJobsList(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsList", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForJobsList prepares the JobsList request. -func (c EncodingsClient) preparerForJobsList(ctx context.Context, id TransformId, options JobsListOperationOptions) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - for k, v := range options.toQueryString() { - queryParameters[k] = autorest.Encode("query", v) - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithHeaders(options.toHeaders()), - autorest.WithPath(fmt.Sprintf("%s/jobs", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForJobsListWithNextLink prepares the JobsList request with the given nextLink token. -func (c EncodingsClient) preparerForJobsListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForJobsList handles the response to the JobsList request. The method always -// closes the http.Response Body. -func (c EncodingsClient) responderForJobsList(resp *http.Response) (result JobsListOperationResponse, err error) { - type page struct { - Values []Job `json:"value"` - NextLink *string `json:"@odata.nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result JobsListOperationResponse, err error) { - req, err := c.preparerForJobsListWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsList", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsList", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForJobsList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsList", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// JobsListComplete retrieves all of the results into a single object -func (c EncodingsClient) JobsListComplete(ctx context.Context, id TransformId, options JobsListOperationOptions) (JobsListCompleteResult, error) { - return c.JobsListCompleteMatchingPredicate(ctx, id, options, JobOperationPredicate{}) -} - -// JobsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c EncodingsClient) JobsListCompleteMatchingPredicate(ctx context.Context, id TransformId, options JobsListOperationOptions, predicate JobOperationPredicate) (resp JobsListCompleteResult, err error) { - items := make([]Job, 0) - - page, err := c.JobsList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := JobsListCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobsupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobsupdate_autorest.go deleted file mode 100644 index e333a9d98bcd..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_jobsupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobsUpdateOperationResponse struct { - HttpResponse *http.Response - Model *Job -} - -// JobsUpdate ... -func (c EncodingsClient) JobsUpdate(ctx context.Context, id JobId, input Job) (result JobsUpdateOperationResponse, err error) { - req, err := c.preparerForJobsUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForJobsUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "JobsUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForJobsUpdate prepares the JobsUpdate request. -func (c EncodingsClient) preparerForJobsUpdate(ctx context.Context, id JobId, input Job) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForJobsUpdate handles the response to the JobsUpdate request. The method always -// closes the http.Response Body. -func (c EncodingsClient) responderForJobsUpdate(resp *http.Response) (result JobsUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformscreateorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformscreateorupdate_autorest.go deleted file mode 100644 index 019866b44efd..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformscreateorupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - Model *Transform -} - -// TransformsCreateOrUpdate ... -func (c EncodingsClient) TransformsCreateOrUpdate(ctx context.Context, id TransformId, input Transform) (result TransformsCreateOrUpdateOperationResponse, err error) { - req, err := c.preparerForTransformsCreateOrUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsCreateOrUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsCreateOrUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForTransformsCreateOrUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsCreateOrUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForTransformsCreateOrUpdate prepares the TransformsCreateOrUpdate request. -func (c EncodingsClient) preparerForTransformsCreateOrUpdate(ctx context.Context, id TransformId, input Transform) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForTransformsCreateOrUpdate handles the response to the TransformsCreateOrUpdate request. The method always -// closes the http.Response Body. -func (c EncodingsClient) responderForTransformsCreateOrUpdate(resp *http.Response) (result TransformsCreateOrUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformsdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformsdelete_autorest.go deleted file mode 100644 index 8274e081fae4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformsdelete_autorest.go +++ /dev/null @@ -1,66 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsDeleteOperationResponse struct { - HttpResponse *http.Response -} - -// TransformsDelete ... -func (c EncodingsClient) TransformsDelete(ctx context.Context, id TransformId) (result TransformsDeleteOperationResponse, err error) { - req, err := c.preparerForTransformsDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsDelete", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsDelete", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForTransformsDelete(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsDelete", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForTransformsDelete prepares the TransformsDelete request. -func (c EncodingsClient) preparerForTransformsDelete(ctx context.Context, id TransformId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForTransformsDelete handles the response to the TransformsDelete request. The method always -// closes the http.Response Body. -func (c EncodingsClient) responderForTransformsDelete(resp *http.Response) (result TransformsDeleteOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformsget_autorest.go deleted file mode 100644 index bc26739986bc..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformsget_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsGetOperationResponse struct { - HttpResponse *http.Response - Model *Transform -} - -// TransformsGet ... -func (c EncodingsClient) TransformsGet(ctx context.Context, id TransformId) (result TransformsGetOperationResponse, err error) { - req, err := c.preparerForTransformsGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsGet", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsGet", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForTransformsGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsGet", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForTransformsGet prepares the TransformsGet request. -func (c EncodingsClient) preparerForTransformsGet(ctx context.Context, id TransformId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForTransformsGet handles the response to the TransformsGet request. The method always -// closes the http.Response Body. -func (c EncodingsClient) responderForTransformsGet(resp *http.Response) (result TransformsGetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformslist_autorest.go deleted file mode 100644 index 3d99c17b2a6e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformslist_autorest.go +++ /dev/null @@ -1,220 +0,0 @@ -package encodings - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsListOperationResponse struct { - HttpResponse *http.Response - Model *[]Transform - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (TransformsListOperationResponse, error) -} - -type TransformsListCompleteResult struct { - Items []Transform -} - -func (r TransformsListOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r TransformsListOperationResponse) LoadMore(ctx context.Context) (resp TransformsListOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -type TransformsListOperationOptions struct { - Filter *string - Orderby *string -} - -func DefaultTransformsListOperationOptions() TransformsListOperationOptions { - return TransformsListOperationOptions{} -} - -func (o TransformsListOperationOptions) toHeaders() map[string]interface{} { - out := make(map[string]interface{}) - - return out -} - -func (o TransformsListOperationOptions) toQueryString() map[string]interface{} { - out := make(map[string]interface{}) - - if o.Filter != nil { - out["$filter"] = *o.Filter - } - - if o.Orderby != nil { - out["$orderby"] = *o.Orderby - } - - return out -} - -// TransformsList ... -func (c EncodingsClient) TransformsList(ctx context.Context, id MediaServiceId, options TransformsListOperationOptions) (resp TransformsListOperationResponse, err error) { - req, err := c.preparerForTransformsList(ctx, id, options) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsList", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsList", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForTransformsList(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsList", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForTransformsList prepares the TransformsList request. -func (c EncodingsClient) preparerForTransformsList(ctx context.Context, id MediaServiceId, options TransformsListOperationOptions) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - for k, v := range options.toQueryString() { - queryParameters[k] = autorest.Encode("query", v) - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithHeaders(options.toHeaders()), - autorest.WithPath(fmt.Sprintf("%s/transforms", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForTransformsListWithNextLink prepares the TransformsList request with the given nextLink token. -func (c EncodingsClient) preparerForTransformsListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForTransformsList handles the response to the TransformsList request. The method always -// closes the http.Response Body. -func (c EncodingsClient) responderForTransformsList(resp *http.Response) (result TransformsListOperationResponse, err error) { - type page struct { - Values []Transform `json:"value"` - NextLink *string `json:"@odata.nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result TransformsListOperationResponse, err error) { - req, err := c.preparerForTransformsListWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsList", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsList", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForTransformsList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsList", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// TransformsListComplete retrieves all of the results into a single object -func (c EncodingsClient) TransformsListComplete(ctx context.Context, id MediaServiceId, options TransformsListOperationOptions) (TransformsListCompleteResult, error) { - return c.TransformsListCompleteMatchingPredicate(ctx, id, options, TransformOperationPredicate{}) -} - -// TransformsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c EncodingsClient) TransformsListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options TransformsListOperationOptions, predicate TransformOperationPredicate) (resp TransformsListCompleteResult, err error) { - items := make([]Transform, 0) - - page, err := c.TransformsList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := TransformsListCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformsupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformsupdate_autorest.go deleted file mode 100644 index a8d95cc3b770..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/method_transformsupdate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformsUpdateOperationResponse struct { - HttpResponse *http.Response - Model *Transform -} - -// TransformsUpdate ... -func (c EncodingsClient) TransformsUpdate(ctx context.Context, id TransformId, input Transform) (result TransformsUpdateOperationResponse, err error) { - req, err := c.preparerForTransformsUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsUpdate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsUpdate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForTransformsUpdate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "encodings.EncodingsClient", "TransformsUpdate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForTransformsUpdate prepares the TransformsUpdate request. -func (c EncodingsClient) preparerForTransformsUpdate(ctx context.Context, id TransformId, input Transform) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForTransformsUpdate handles the response to the TransformsUpdate request. The method always -// closes the http.Response Body. -func (c EncodingsClient) responderForTransformsUpdate(resp *http.Response) (result TransformsUpdateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_aacaudio.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_aacaudio.go deleted file mode 100644 index 067403385aed..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_aacaudio.go +++ /dev/null @@ -1,45 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = AacAudio{} - -type AacAudio struct { - Bitrate *int64 `json:"bitrate,omitempty"` - Channels *int64 `json:"channels,omitempty"` - Profile *AacAudioProfile `json:"profile,omitempty"` - SamplingRate *int64 `json:"samplingRate,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = AacAudio{} - -func (s AacAudio) MarshalJSON() ([]byte, error) { - type wrapper AacAudio - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AacAudio: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AacAudio: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AacAudio" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AacAudio: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_absolutecliptime.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_absolutecliptime.go deleted file mode 100644 index e1e8cedcd10b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_absolutecliptime.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClipTime = AbsoluteClipTime{} - -type AbsoluteClipTime struct { - Time string `json:"time"` - - // Fields inherited from ClipTime -} - -var _ json.Marshaler = AbsoluteClipTime{} - -func (s AbsoluteClipTime) MarshalJSON() ([]byte, error) { - type wrapper AbsoluteClipTime - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AbsoluteClipTime: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AbsoluteClipTime: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AbsoluteClipTime" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AbsoluteClipTime: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_audio.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_audio.go deleted file mode 100644 index a2007b0056c5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_audio.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = Audio{} - -type Audio struct { - Bitrate *int64 `json:"bitrate,omitempty"` - Channels *int64 `json:"channels,omitempty"` - SamplingRate *int64 `json:"samplingRate,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = Audio{} - -func (s Audio) MarshalJSON() ([]byte, error) { - type wrapper Audio - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Audio: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Audio: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.Audio" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Audio: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_audioanalyzerpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_audioanalyzerpreset.go deleted file mode 100644 index 45a7be9a1c1e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_audioanalyzerpreset.go +++ /dev/null @@ -1,43 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = AudioAnalyzerPreset{} - -type AudioAnalyzerPreset struct { - AudioLanguage *string `json:"audioLanguage,omitempty"` - ExperimentalOptions *map[string]string `json:"experimentalOptions,omitempty"` - Mode *AudioAnalysisMode `json:"mode,omitempty"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = AudioAnalyzerPreset{} - -func (s AudioAnalyzerPreset) MarshalJSON() ([]byte, error) { - type wrapper AudioAnalyzerPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AudioAnalyzerPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AudioAnalyzerPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AudioAnalyzerPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AudioAnalyzerPreset: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_audiooverlay.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_audiooverlay.go deleted file mode 100644 index 3d21e6aeb171..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_audiooverlay.go +++ /dev/null @@ -1,46 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Overlay = AudioOverlay{} - -type AudioOverlay struct { - - // Fields inherited from Overlay - AudioGainLevel *float64 `json:"audioGainLevel,omitempty"` - End *string `json:"end,omitempty"` - FadeInDuration *string `json:"fadeInDuration,omitempty"` - FadeOutDuration *string `json:"fadeOutDuration,omitempty"` - InputLabel string `json:"inputLabel"` - Start *string `json:"start,omitempty"` -} - -var _ json.Marshaler = AudioOverlay{} - -func (s AudioOverlay) MarshalJSON() ([]byte, error) { - type wrapper AudioOverlay - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AudioOverlay: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AudioOverlay: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AudioOverlay" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AudioOverlay: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_audiotrackdescriptor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_audiotrackdescriptor.go deleted file mode 100644 index 81990a6d7d23..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_audiotrackdescriptor.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = AudioTrackDescriptor{} - -type AudioTrackDescriptor struct { - ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = AudioTrackDescriptor{} - -func (s AudioTrackDescriptor) MarshalJSON() ([]byte, error) { - type wrapper AudioTrackDescriptor - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AudioTrackDescriptor: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AudioTrackDescriptor: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.AudioTrackDescriptor" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AudioTrackDescriptor: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_builtinstandardencoderpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_builtinstandardencoderpreset.go deleted file mode 100644 index c6b6272a3b40..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_builtinstandardencoderpreset.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = BuiltInStandardEncoderPreset{} - -type BuiltInStandardEncoderPreset struct { - PresetName EncoderNamedPreset `json:"presetName"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = BuiltInStandardEncoderPreset{} - -func (s BuiltInStandardEncoderPreset) MarshalJSON() ([]byte, error) { - type wrapper BuiltInStandardEncoderPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling BuiltInStandardEncoderPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling BuiltInStandardEncoderPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.BuiltInStandardEncoderPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling BuiltInStandardEncoderPreset: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_cliptime.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_cliptime.go deleted file mode 100644 index 603c023e1fee..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_cliptime.go +++ /dev/null @@ -1,56 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClipTime interface { -} - -func unmarshalClipTimeImplementation(input []byte) (ClipTime, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ClipTime into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AbsoluteClipTime") { - var out AbsoluteClipTime - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AbsoluteClipTime: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.UtcClipTime") { - var out UtcClipTime - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into UtcClipTime: %+v", err) - } - return out, nil - } - - type RawClipTimeImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawClipTimeImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_codec.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_codec.go deleted file mode 100644 index e6b4e8d4d36d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_codec.go +++ /dev/null @@ -1,104 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Codec interface { -} - -func unmarshalCodecImplementation(input []byte) (Codec, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Codec into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AacAudio") { - var out AacAudio - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AacAudio: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.Audio") { - var out Audio - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Audio: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.CopyAudio") { - var out CopyAudio - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into CopyAudio: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.CopyVideo") { - var out CopyVideo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into CopyVideo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.H264Video") { - var out H264Video - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into H264Video: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.H265Video") { - var out H265Video - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into H265Video: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.Image") { - var out Image - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Image: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.Video") { - var out Video - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Video: %+v", err) - } - return out, nil - } - - type RawCodecImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawCodecImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_copyaudio.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_copyaudio.go deleted file mode 100644 index 5d1be89597ee..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_copyaudio.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = CopyAudio{} - -type CopyAudio struct { - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = CopyAudio{} - -func (s CopyAudio) MarshalJSON() ([]byte, error) { - type wrapper CopyAudio - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling CopyAudio: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling CopyAudio: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.CopyAudio" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling CopyAudio: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_copyvideo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_copyvideo.go deleted file mode 100644 index 5f663b6d2bfe..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_copyvideo.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = CopyVideo{} - -type CopyVideo struct { - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = CopyVideo{} - -func (s CopyVideo) MarshalJSON() ([]byte, error) { - type wrapper CopyVideo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling CopyVideo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling CopyVideo: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.CopyVideo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling CopyVideo: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_deinterlace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_deinterlace.go deleted file mode 100644 index e32750ed4a71..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_deinterlace.go +++ /dev/null @@ -1,9 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Deinterlace struct { - Mode *DeinterlaceMode `json:"mode,omitempty"` - Parity *DeinterlaceParity `json:"parity,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_facedetectorpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_facedetectorpreset.go deleted file mode 100644 index b6b9b66de46c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_facedetectorpreset.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = FaceDetectorPreset{} - -type FaceDetectorPreset struct { - BlurType *BlurType `json:"blurType,omitempty"` - ExperimentalOptions *map[string]string `json:"experimentalOptions,omitempty"` - Mode *FaceRedactorMode `json:"mode,omitempty"` - Resolution *AnalysisResolution `json:"resolution,omitempty"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = FaceDetectorPreset{} - -func (s FaceDetectorPreset) MarshalJSON() ([]byte, error) { - type wrapper FaceDetectorPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FaceDetectorPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FaceDetectorPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.FaceDetectorPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FaceDetectorPreset: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_filters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_filters.go deleted file mode 100644 index 4e50eaa91aef..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_filters.go +++ /dev/null @@ -1,53 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Filters struct { - Crop *Rectangle `json:"crop,omitempty"` - Deinterlace *Deinterlace `json:"deinterlace,omitempty"` - Overlays *[]Overlay `json:"overlays,omitempty"` - Rotation *Rotation `json:"rotation,omitempty"` -} - -var _ json.Unmarshaler = &Filters{} - -func (s *Filters) UnmarshalJSON(bytes []byte) error { - type alias Filters - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into Filters: %+v", err) - } - - s.Crop = decoded.Crop - s.Deinterlace = decoded.Deinterlace - s.Rotation = decoded.Rotation - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling Filters into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["overlays"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Overlays into list []json.RawMessage: %+v", err) - } - - output := make([]Overlay, 0) - for i, val := range listTemp { - impl, err := unmarshalOverlayImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Overlays' for 'Filters': %+v", i, err) - } - output = append(output, impl) - } - s.Overlays = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_format.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_format.go deleted file mode 100644 index bc756a0bb288..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_format.go +++ /dev/null @@ -1,88 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Format interface { -} - -func unmarshalFormatImplementation(input []byte) (Format, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Format into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.ImageFormat") { - var out ImageFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ImageFormat: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JpgFormat") { - var out JpgFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JpgFormat: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.Mp4Format") { - var out Mp4Format - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into Mp4Format: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.MultiBitrateFormat") { - var out MultiBitrateFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MultiBitrateFormat: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.PngFormat") { - var out PngFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PngFormat: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.TransportStreamFormat") { - var out TransportStreamFormat - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into TransportStreamFormat: %+v", err) - } - return out, nil - } - - type RawFormatImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawFormatImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_fromallinputfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_fromallinputfile.go deleted file mode 100644 index c1a7d3860e4b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_fromallinputfile.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ InputDefinition = FromAllInputFile{} - -type FromAllInputFile struct { - - // Fields inherited from InputDefinition - IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` -} - -var _ json.Marshaler = FromAllInputFile{} - -func (s FromAllInputFile) MarshalJSON() ([]byte, error) { - type wrapper FromAllInputFile - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FromAllInputFile: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FromAllInputFile: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.FromAllInputFile" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FromAllInputFile: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &FromAllInputFile{} - -func (s *FromAllInputFile) UnmarshalJSON(bytes []byte) error { - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling FromAllInputFile into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["includedTracks"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling IncludedTracks into list []json.RawMessage: %+v", err) - } - - output := make([]TrackDescriptor, 0) - for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'FromAllInputFile': %+v", i, err) - } - output = append(output, impl) - } - s.IncludedTracks = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_fromeachinputfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_fromeachinputfile.go deleted file mode 100644 index 02137a86e8ad..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_fromeachinputfile.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ InputDefinition = FromEachInputFile{} - -type FromEachInputFile struct { - - // Fields inherited from InputDefinition - IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` -} - -var _ json.Marshaler = FromEachInputFile{} - -func (s FromEachInputFile) MarshalJSON() ([]byte, error) { - type wrapper FromEachInputFile - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FromEachInputFile: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FromEachInputFile: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.FromEachInputFile" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FromEachInputFile: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &FromEachInputFile{} - -func (s *FromEachInputFile) UnmarshalJSON(bytes []byte) error { - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling FromEachInputFile into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["includedTracks"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling IncludedTracks into list []json.RawMessage: %+v", err) - } - - output := make([]TrackDescriptor, 0) - for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'FromEachInputFile': %+v", i, err) - } - output = append(output, impl) - } - s.IncludedTracks = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h264layer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h264layer.go deleted file mode 100644 index ba82bc3392e1..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h264layer.go +++ /dev/null @@ -1,54 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Layer = H264Layer{} - -type H264Layer struct { - AdaptiveBFrame *bool `json:"adaptiveBFrame,omitempty"` - BFrames *int64 `json:"bFrames,omitempty"` - Bitrate int64 `json:"bitrate"` - BufferWindow *string `json:"bufferWindow,omitempty"` - EntropyMode *EntropyMode `json:"entropyMode,omitempty"` - FrameRate *string `json:"frameRate,omitempty"` - Level *string `json:"level,omitempty"` - MaxBitrate *int64 `json:"maxBitrate,omitempty"` - Profile *H264VideoProfile `json:"profile,omitempty"` - ReferenceFrames *int64 `json:"referenceFrames,omitempty"` - Slices *int64 `json:"slices,omitempty"` - - // Fields inherited from Layer - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Width *string `json:"width,omitempty"` -} - -var _ json.Marshaler = H264Layer{} - -func (s H264Layer) MarshalJSON() ([]byte, error) { - type wrapper H264Layer - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling H264Layer: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling H264Layer: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.H264Layer" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling H264Layer: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h264video.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h264video.go deleted file mode 100644 index 274ea9f8f855..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h264video.go +++ /dev/null @@ -1,87 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = H264Video{} - -type H264Video struct { - Complexity *H264Complexity `json:"complexity,omitempty"` - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - Layers *[]Layer `json:"layers,omitempty"` - SceneChangeDetection *bool `json:"sceneChangeDetection,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = H264Video{} - -func (s H264Video) MarshalJSON() ([]byte, error) { - type wrapper H264Video - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling H264Video: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling H264Video: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.H264Video" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling H264Video: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &H264Video{} - -func (s *H264Video) UnmarshalJSON(bytes []byte) error { - type alias H264Video - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into H264Video: %+v", err) - } - - s.Complexity = decoded.Complexity - s.KeyFrameInterval = decoded.KeyFrameInterval - s.Label = decoded.Label - s.SceneChangeDetection = decoded.SceneChangeDetection - s.StretchMode = decoded.StretchMode - s.SyncMode = decoded.SyncMode - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling H264Video into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["layers"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Layers into list []json.RawMessage: %+v", err) - } - - output := make([]Layer, 0) - for i, val := range listTemp { - impl, err := unmarshalLayerImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Layers' for 'H264Video': %+v", i, err) - } - output = append(output, impl) - } - s.Layers = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h265layer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h265layer.go deleted file mode 100644 index e220a0697e2e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h265layer.go +++ /dev/null @@ -1,53 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Layer = H265Layer{} - -type H265Layer struct { - AdaptiveBFrame *bool `json:"adaptiveBFrame,omitempty"` - BFrames *int64 `json:"bFrames,omitempty"` - Bitrate int64 `json:"bitrate"` - BufferWindow *string `json:"bufferWindow,omitempty"` - FrameRate *string `json:"frameRate,omitempty"` - Level *string `json:"level,omitempty"` - MaxBitrate *int64 `json:"maxBitrate,omitempty"` - Profile *H265VideoProfile `json:"profile,omitempty"` - ReferenceFrames *int64 `json:"referenceFrames,omitempty"` - Slices *int64 `json:"slices,omitempty"` - - // Fields inherited from Layer - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Width *string `json:"width,omitempty"` -} - -var _ json.Marshaler = H265Layer{} - -func (s H265Layer) MarshalJSON() ([]byte, error) { - type wrapper H265Layer - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling H265Layer: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling H265Layer: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.H265Layer" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling H265Layer: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h265video.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h265video.go deleted file mode 100644 index 12634d3d480b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h265video.go +++ /dev/null @@ -1,87 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = H265Video{} - -type H265Video struct { - Complexity *H265Complexity `json:"complexity,omitempty"` - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - Layers *[]Layer `json:"layers,omitempty"` - SceneChangeDetection *bool `json:"sceneChangeDetection,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = H265Video{} - -func (s H265Video) MarshalJSON() ([]byte, error) { - type wrapper H265Video - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling H265Video: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling H265Video: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.H265Video" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling H265Video: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &H265Video{} - -func (s *H265Video) UnmarshalJSON(bytes []byte) error { - type alias H265Video - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into H265Video: %+v", err) - } - - s.Complexity = decoded.Complexity - s.KeyFrameInterval = decoded.KeyFrameInterval - s.Label = decoded.Label - s.SceneChangeDetection = decoded.SceneChangeDetection - s.StretchMode = decoded.StretchMode - s.SyncMode = decoded.SyncMode - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling H265Video into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["layers"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Layers into list []json.RawMessage: %+v", err) - } - - output := make([]Layer, 0) - for i, val := range listTemp { - impl, err := unmarshalLayerImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Layers' for 'H265Video': %+v", i, err) - } - output = append(output, impl) - } - s.Layers = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h265videolayer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h265videolayer.go deleted file mode 100644 index b5c5769a610e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_h265videolayer.go +++ /dev/null @@ -1,49 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Layer = H265VideoLayer{} - -type H265VideoLayer struct { - AdaptiveBFrame *bool `json:"adaptiveBFrame,omitempty"` - BFrames *int64 `json:"bFrames,omitempty"` - Bitrate int64 `json:"bitrate"` - FrameRate *string `json:"frameRate,omitempty"` - MaxBitrate *int64 `json:"maxBitrate,omitempty"` - Slices *int64 `json:"slices,omitempty"` - - // Fields inherited from Layer - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Width *string `json:"width,omitempty"` -} - -var _ json.Marshaler = H265VideoLayer{} - -func (s H265VideoLayer) MarshalJSON() ([]byte, error) { - type wrapper H265VideoLayer - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling H265VideoLayer: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling H265VideoLayer: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.H265VideoLayer" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling H265VideoLayer: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_image.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_image.go deleted file mode 100644 index 072a1a7537e0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_image.go +++ /dev/null @@ -1,47 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = Image{} - -type Image struct { - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - Range *string `json:"range,omitempty"` - Start string `json:"start"` - Step *string `json:"step,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = Image{} - -func (s Image) MarshalJSON() ([]byte, error) { - type wrapper Image - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Image: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Image: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.Image" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Image: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_imageformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_imageformat.go deleted file mode 100644 index 0e390a0c6f37..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_imageformat.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = ImageFormat{} - -type ImageFormat struct { - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = ImageFormat{} - -func (s ImageFormat) MarshalJSON() ([]byte, error) { - type wrapper ImageFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ImageFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ImageFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.ImageFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ImageFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_inputdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_inputdefinition.go deleted file mode 100644 index bf5faf47a4c9..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_inputdefinition.go +++ /dev/null @@ -1,64 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InputDefinition interface { -} - -func unmarshalInputDefinitionImplementation(input []byte) (InputDefinition, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling InputDefinition into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.FromAllInputFile") { - var out FromAllInputFile - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FromAllInputFile: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.FromEachInputFile") { - var out FromEachInputFile - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FromEachInputFile: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.InputFile") { - var out InputFile - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into InputFile: %+v", err) - } - return out, nil - } - - type RawInputDefinitionImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawInputDefinitionImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_inputfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_inputfile.go deleted file mode 100644 index 4c3f11b6d7f9..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_inputfile.go +++ /dev/null @@ -1,77 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ InputDefinition = InputFile{} - -type InputFile struct { - Filename *string `json:"filename,omitempty"` - - // Fields inherited from InputDefinition - IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` -} - -var _ json.Marshaler = InputFile{} - -func (s InputFile) MarshalJSON() ([]byte, error) { - type wrapper InputFile - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling InputFile: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling InputFile: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.InputFile" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling InputFile: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &InputFile{} - -func (s *InputFile) UnmarshalJSON(bytes []byte) error { - type alias InputFile - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into InputFile: %+v", err) - } - - s.Filename = decoded.Filename - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling InputFile into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["includedTracks"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling IncludedTracks into list []json.RawMessage: %+v", err) - } - - output := make([]TrackDescriptor, 0) - for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'InputFile': %+v", i, err) - } - output = append(output, impl) - } - s.IncludedTracks = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_job.go deleted file mode 100644 index db973712dda3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_job.go +++ /dev/null @@ -1,16 +0,0 @@ -package encodings - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Job struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *JobProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_joberror.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_joberror.go deleted file mode 100644 index c14b785a690b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_joberror.go +++ /dev/null @@ -1,12 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobError struct { - Category *JobErrorCategory `json:"category,omitempty"` - Code *JobErrorCode `json:"code,omitempty"` - Details *[]JobErrorDetail `json:"details,omitempty"` - Message *string `json:"message,omitempty"` - Retry *JobRetry `json:"retry,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_joberrordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_joberrordetail.go deleted file mode 100644 index 80595e90276a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_joberrordetail.go +++ /dev/null @@ -1,9 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobErrorDetail struct { - Code *string `json:"code,omitempty"` - Message *string `json:"message,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinput.go deleted file mode 100644 index e44a0cf5249b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinput.go +++ /dev/null @@ -1,80 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobInput interface { -} - -func unmarshalJobInputImplementation(input []byte) (JobInput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling JobInput into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputAsset") { - var out JobInputAsset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputAsset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputClip") { - var out JobInputClip - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputClip: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputHttp") { - var out JobInputHTTP - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputHTTP: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputSequence") { - var out JobInputSequence - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputSequence: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobInputs") { - var out JobInputs - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobInputs: %+v", err) - } - return out, nil - } - - type RawJobInputImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawJobInputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputasset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputasset.go deleted file mode 100644 index 689f8282884e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputasset.go +++ /dev/null @@ -1,99 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputAsset{} - -type JobInputAsset struct { - AssetName string `json:"assetName"` - End ClipTime `json:"end"` - Files *[]string `json:"files,omitempty"` - InputDefinitions *[]InputDefinition `json:"inputDefinitions,omitempty"` - Label *string `json:"label,omitempty"` - Start ClipTime `json:"start"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputAsset{} - -func (s JobInputAsset) MarshalJSON() ([]byte, error) { - type wrapper JobInputAsset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputAsset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputAsset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputAsset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputAsset: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobInputAsset{} - -func (s *JobInputAsset) UnmarshalJSON(bytes []byte) error { - type alias JobInputAsset - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobInputAsset: %+v", err) - } - - s.AssetName = decoded.AssetName - s.Files = decoded.Files - s.Label = decoded.Label - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobInputAsset into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'End' for 'JobInputAsset': %+v", err) - } - s.End = impl - } - - if v, ok := temp["inputDefinitions"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling InputDefinitions into list []json.RawMessage: %+v", err) - } - - output := make([]InputDefinition, 0) - for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputAsset': %+v", i, err) - } - output = append(output, impl) - } - s.InputDefinitions = &output - } - - if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Start' for 'JobInputAsset': %+v", err) - } - s.Start = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputclip.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputclip.go deleted file mode 100644 index 5136c539d5b3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputclip.go +++ /dev/null @@ -1,97 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputClip{} - -type JobInputClip struct { - End ClipTime `json:"end"` - Files *[]string `json:"files,omitempty"` - InputDefinitions *[]InputDefinition `json:"inputDefinitions,omitempty"` - Label *string `json:"label,omitempty"` - Start ClipTime `json:"start"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputClip{} - -func (s JobInputClip) MarshalJSON() ([]byte, error) { - type wrapper JobInputClip - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputClip: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputClip: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputClip" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputClip: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobInputClip{} - -func (s *JobInputClip) UnmarshalJSON(bytes []byte) error { - type alias JobInputClip - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobInputClip: %+v", err) - } - - s.Files = decoded.Files - s.Label = decoded.Label - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobInputClip into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'End' for 'JobInputClip': %+v", err) - } - s.End = impl - } - - if v, ok := temp["inputDefinitions"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling InputDefinitions into list []json.RawMessage: %+v", err) - } - - output := make([]InputDefinition, 0) - for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputClip': %+v", i, err) - } - output = append(output, impl) - } - s.InputDefinitions = &output - } - - if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Start' for 'JobInputClip': %+v", err) - } - s.Start = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputhttp.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputhttp.go deleted file mode 100644 index 57beddd3fde4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputhttp.go +++ /dev/null @@ -1,99 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputHTTP{} - -type JobInputHTTP struct { - BaseUri *string `json:"baseUri,omitempty"` - End ClipTime `json:"end"` - Files *[]string `json:"files,omitempty"` - InputDefinitions *[]InputDefinition `json:"inputDefinitions,omitempty"` - Label *string `json:"label,omitempty"` - Start ClipTime `json:"start"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputHTTP{} - -func (s JobInputHTTP) MarshalJSON() ([]byte, error) { - type wrapper JobInputHTTP - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputHTTP: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputHTTP: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputHttp" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputHTTP: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobInputHTTP{} - -func (s *JobInputHTTP) UnmarshalJSON(bytes []byte) error { - type alias JobInputHTTP - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobInputHTTP: %+v", err) - } - - s.BaseUri = decoded.BaseUri - s.Files = decoded.Files - s.Label = decoded.Label - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobInputHTTP into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'End' for 'JobInputHTTP': %+v", err) - } - s.End = impl - } - - if v, ok := temp["inputDefinitions"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling InputDefinitions into list []json.RawMessage: %+v", err) - } - - output := make([]InputDefinition, 0) - for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputHTTP': %+v", i, err) - } - output = append(output, impl) - } - s.InputDefinitions = &output - } - - if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Start' for 'JobInputHTTP': %+v", err) - } - s.Start = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputs.go deleted file mode 100644 index b63a141b6e04..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputs.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputs{} - -type JobInputs struct { - Inputs *[]JobInput `json:"inputs,omitempty"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputs{} - -func (s JobInputs) MarshalJSON() ([]byte, error) { - type wrapper JobInputs - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputs: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputs: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputs" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputs: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobInputs{} - -func (s *JobInputs) UnmarshalJSON(bytes []byte) error { - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobInputs into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["inputs"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Inputs into list []json.RawMessage: %+v", err) - } - - output := make([]JobInput, 0) - for i, val := range listTemp { - impl, err := unmarshalJobInputImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Inputs' for 'JobInputs': %+v", i, err) - } - output = append(output, impl) - } - s.Inputs = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputsequence.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputsequence.go deleted file mode 100644 index 1d87ba0ce471..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobinputsequence.go +++ /dev/null @@ -1,69 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobInput = JobInputSequence{} - -type JobInputSequence struct { - Inputs *[]JobInput `json:"inputs,omitempty"` - - // Fields inherited from JobInput -} - -var _ json.Marshaler = JobInputSequence{} - -func (s JobInputSequence) MarshalJSON() ([]byte, error) { - type wrapper JobInputSequence - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobInputSequence: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobInputSequence: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobInputSequence" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobInputSequence: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &JobInputSequence{} - -func (s *JobInputSequence) UnmarshalJSON(bytes []byte) error { - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobInputSequence into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["inputs"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Inputs into list []json.RawMessage: %+v", err) - } - - output := make([]JobInput, 0) - for i, val := range listTemp { - impl, err := unmarshalJobInputImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Inputs' for 'JobInputSequence': %+v", i, err) - } - output = append(output, impl) - } - s.Inputs = &output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_joboutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_joboutput.go deleted file mode 100644 index 39bd27d30410..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_joboutput.go +++ /dev/null @@ -1,48 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobOutput interface { -} - -func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling JobOutput into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JobOutputAsset") { - var out JobOutputAsset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JobOutputAsset: %+v", err) - } - return out, nil - } - - type RawJobOutputImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawJobOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_joboutputasset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_joboutputasset.go deleted file mode 100644 index 394018024032..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_joboutputasset.go +++ /dev/null @@ -1,74 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ JobOutput = JobOutputAsset{} - -type JobOutputAsset struct { - AssetName string `json:"assetName"` - - // Fields inherited from JobOutput - EndTime *string `json:"endTime,omitempty"` - Error *JobError `json:"error,omitempty"` - Label *string `json:"label,omitempty"` - Progress *int64 `json:"progress,omitempty"` - StartTime *string `json:"startTime,omitempty"` - State *JobState `json:"state,omitempty"` -} - -func (o *JobOutputAsset) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobOutputAsset) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *JobOutputAsset) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobOutputAsset) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} - -var _ json.Marshaler = JobOutputAsset{} - -func (s JobOutputAsset) MarshalJSON() ([]byte, error) { - type wrapper JobOutputAsset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JobOutputAsset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JobOutputAsset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JobOutputAsset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JobOutputAsset: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobproperties.go deleted file mode 100644 index d1d9fcd58d52..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jobproperties.go +++ /dev/null @@ -1,123 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobProperties struct { - CorrelationData *map[string]string `json:"correlationData,omitempty"` - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - EndTime *string `json:"endTime,omitempty"` - Input JobInput `json:"input"` - LastModified *string `json:"lastModified,omitempty"` - Outputs []JobOutput `json:"outputs"` - Priority *Priority `json:"priority,omitempty"` - StartTime *string `json:"startTime,omitempty"` - State *JobState `json:"state,omitempty"` -} - -func (o *JobProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *JobProperties) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobProperties) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *JobProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} - -func (o *JobProperties) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *JobProperties) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} - -var _ json.Unmarshaler = &JobProperties{} - -func (s *JobProperties) UnmarshalJSON(bytes []byte) error { - type alias JobProperties - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into JobProperties: %+v", err) - } - - s.CorrelationData = decoded.CorrelationData - s.Created = decoded.Created - s.Description = decoded.Description - s.EndTime = decoded.EndTime - s.LastModified = decoded.LastModified - s.Priority = decoded.Priority - s.StartTime = decoded.StartTime - s.State = decoded.State - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling JobProperties into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["input"]; ok { - impl, err := unmarshalJobInputImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Input' for 'JobProperties': %+v", err) - } - s.Input = impl - } - - if v, ok := temp["outputs"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Outputs into list []json.RawMessage: %+v", err) - } - - output := make([]JobOutput, 0) - for i, val := range listTemp { - impl, err := unmarshalJobOutputImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Outputs' for 'JobProperties': %+v", i, err) - } - output = append(output, impl) - } - s.Outputs = output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jpgformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jpgformat.go deleted file mode 100644 index de3e7aba6df3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jpgformat.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = JpgFormat{} - -type JpgFormat struct { - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = JpgFormat{} - -func (s JpgFormat) MarshalJSON() ([]byte, error) { - type wrapper JpgFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JpgFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JpgFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JpgFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JpgFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jpglayer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jpglayer.go deleted file mode 100644 index 16df6ebf24af..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_jpglayer.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Layer = JpgLayer{} - -type JpgLayer struct { - Quality *int64 `json:"quality,omitempty"` - - // Fields inherited from Layer - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Width *string `json:"width,omitempty"` -} - -var _ json.Marshaler = JpgLayer{} - -func (s JpgLayer) MarshalJSON() ([]byte, error) { - type wrapper JpgLayer - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling JpgLayer: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling JpgLayer: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.JpgLayer" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling JpgLayer: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_layer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_layer.go deleted file mode 100644 index ab5566e3fa11..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_layer.go +++ /dev/null @@ -1,88 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Layer interface { -} - -func unmarshalLayerImplementation(input []byte) (Layer, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Layer into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.H264Layer") { - var out H264Layer - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into H264Layer: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.H265Layer") { - var out H265Layer - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into H265Layer: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.H265VideoLayer") { - var out H265VideoLayer - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into H265VideoLayer: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.JpgLayer") { - var out JpgLayer - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into JpgLayer: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.PngLayer") { - var out PngLayer - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PngLayer: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.VideoLayer") { - var out VideoLayer - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into VideoLayer: %+v", err) - } - return out, nil - } - - type RawLayerImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawLayerImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_mp4format.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_mp4format.go deleted file mode 100644 index 44e41dd94921..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_mp4format.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = Mp4Format{} - -type Mp4Format struct { - OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = Mp4Format{} - -func (s Mp4Format) MarshalJSON() ([]byte, error) { - type wrapper Mp4Format - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Mp4Format: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Mp4Format: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.Mp4Format" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Mp4Format: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_multibitrateformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_multibitrateformat.go deleted file mode 100644 index fec53d0e6804..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_multibitrateformat.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = MultiBitrateFormat{} - -type MultiBitrateFormat struct { - OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = MultiBitrateFormat{} - -func (s MultiBitrateFormat) MarshalJSON() ([]byte, error) { - type wrapper MultiBitrateFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MultiBitrateFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MultiBitrateFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.MultiBitrateFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MultiBitrateFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_outputfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_outputfile.go deleted file mode 100644 index e83b5bdb27f2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_outputfile.go +++ /dev/null @@ -1,8 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OutputFile struct { - Labels []string `json:"labels"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_overlay.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_overlay.go deleted file mode 100644 index 0b3ec59cc8ac..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_overlay.go +++ /dev/null @@ -1,56 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Overlay interface { -} - -func unmarshalOverlayImplementation(input []byte) (Overlay, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Overlay into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AudioOverlay") { - var out AudioOverlay - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AudioOverlay: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.VideoOverlay") { - var out VideoOverlay - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into VideoOverlay: %+v", err) - } - return out, nil - } - - type RawOverlayImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawOverlayImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_pngformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_pngformat.go deleted file mode 100644 index e9b5216bb869..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_pngformat.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = PngFormat{} - -type PngFormat struct { - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = PngFormat{} - -func (s PngFormat) MarshalJSON() ([]byte, error) { - type wrapper PngFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PngFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PngFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.PngFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PngFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_pnglayer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_pnglayer.go deleted file mode 100644 index 73748bf8fa17..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_pnglayer.go +++ /dev/null @@ -1,43 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Layer = PngLayer{} - -type PngLayer struct { - - // Fields inherited from Layer - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Width *string `json:"width,omitempty"` -} - -var _ json.Marshaler = PngLayer{} - -func (s PngLayer) MarshalJSON() ([]byte, error) { - type wrapper PngLayer - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PngLayer: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PngLayer: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.PngLayer" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PngLayer: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_preset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_preset.go deleted file mode 100644 index dd860f8e9813..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_preset.go +++ /dev/null @@ -1,80 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Preset interface { -} - -func unmarshalPresetImplementation(input []byte) (Preset, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Preset into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AudioAnalyzerPreset") { - var out AudioAnalyzerPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AudioAnalyzerPreset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.BuiltInStandardEncoderPreset") { - var out BuiltInStandardEncoderPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into BuiltInStandardEncoderPreset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.FaceDetectorPreset") { - var out FaceDetectorPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FaceDetectorPreset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.StandardEncoderPreset") { - var out StandardEncoderPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into StandardEncoderPreset: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.VideoAnalyzerPreset") { - var out VideoAnalyzerPreset - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into VideoAnalyzerPreset: %+v", err) - } - return out, nil - } - - type RawPresetImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawPresetImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_rectangle.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_rectangle.go deleted file mode 100644 index 09b1ba538a97..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_rectangle.go +++ /dev/null @@ -1,11 +0,0 @@ -package encodings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Rectangle struct { - Height *string `json:"height,omitempty"` - Left *string `json:"left,omitempty"` - Top *string `json:"top,omitempty"` - Width *string `json:"width,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_selectaudiotrackbyattribute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_selectaudiotrackbyattribute.go deleted file mode 100644 index ae6bafef5035..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_selectaudiotrackbyattribute.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = SelectAudioTrackByAttribute{} - -type SelectAudioTrackByAttribute struct { - Attribute TrackAttribute `json:"attribute"` - ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"` - Filter AttributeFilter `json:"filter"` - FilterValue *string `json:"filterValue,omitempty"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = SelectAudioTrackByAttribute{} - -func (s SelectAudioTrackByAttribute) MarshalJSON() ([]byte, error) { - type wrapper SelectAudioTrackByAttribute - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SelectAudioTrackByAttribute: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SelectAudioTrackByAttribute: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.SelectAudioTrackByAttribute" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SelectAudioTrackByAttribute: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_selectaudiotrackbyid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_selectaudiotrackbyid.go deleted file mode 100644 index e9b4587be0c3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_selectaudiotrackbyid.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = SelectAudioTrackById{} - -type SelectAudioTrackById struct { - ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"` - TrackId int64 `json:"trackId"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = SelectAudioTrackById{} - -func (s SelectAudioTrackById) MarshalJSON() ([]byte, error) { - type wrapper SelectAudioTrackById - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SelectAudioTrackById: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SelectAudioTrackById: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.SelectAudioTrackById" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SelectAudioTrackById: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_selectvideotrackbyattribute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_selectvideotrackbyattribute.go deleted file mode 100644 index 82305909c361..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_selectvideotrackbyattribute.go +++ /dev/null @@ -1,43 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = SelectVideoTrackByAttribute{} - -type SelectVideoTrackByAttribute struct { - Attribute TrackAttribute `json:"attribute"` - Filter AttributeFilter `json:"filter"` - FilterValue *string `json:"filterValue,omitempty"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = SelectVideoTrackByAttribute{} - -func (s SelectVideoTrackByAttribute) MarshalJSON() ([]byte, error) { - type wrapper SelectVideoTrackByAttribute - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SelectVideoTrackByAttribute: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SelectVideoTrackByAttribute: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.SelectVideoTrackByAttribute" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SelectVideoTrackByAttribute: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_selectvideotrackbyid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_selectvideotrackbyid.go deleted file mode 100644 index 4527e73336eb..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_selectvideotrackbyid.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = SelectVideoTrackById{} - -type SelectVideoTrackById struct { - TrackId int64 `json:"trackId"` - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = SelectVideoTrackById{} - -func (s SelectVideoTrackById) MarshalJSON() ([]byte, error) { - type wrapper SelectVideoTrackById - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SelectVideoTrackById: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SelectVideoTrackById: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.SelectVideoTrackById" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SelectVideoTrackById: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_standardencoderpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_standardencoderpreset.go deleted file mode 100644 index 35c5b09d1b45..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_standardencoderpreset.go +++ /dev/null @@ -1,95 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = StandardEncoderPreset{} - -type StandardEncoderPreset struct { - Codecs []Codec `json:"codecs"` - Filters *Filters `json:"filters,omitempty"` - Formats []Format `json:"formats"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = StandardEncoderPreset{} - -func (s StandardEncoderPreset) MarshalJSON() ([]byte, error) { - type wrapper StandardEncoderPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling StandardEncoderPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling StandardEncoderPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.StandardEncoderPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling StandardEncoderPreset: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &StandardEncoderPreset{} - -func (s *StandardEncoderPreset) UnmarshalJSON(bytes []byte) error { - type alias StandardEncoderPreset - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into StandardEncoderPreset: %+v", err) - } - - s.Filters = decoded.Filters - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling StandardEncoderPreset into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["codecs"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Codecs into list []json.RawMessage: %+v", err) - } - - output := make([]Codec, 0) - for i, val := range listTemp { - impl, err := unmarshalCodecImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Codecs' for 'StandardEncoderPreset': %+v", i, err) - } - output = append(output, impl) - } - s.Codecs = output - } - - if v, ok := temp["formats"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Formats into list []json.RawMessage: %+v", err) - } - - output := make([]Format, 0) - for i, val := range listTemp { - impl, err := unmarshalFormatImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Formats' for 'StandardEncoderPreset': %+v", i, err) - } - output = append(output, impl) - } - s.Formats = output - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_trackdescriptor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_trackdescriptor.go deleted file mode 100644 index d9a61383ca28..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_trackdescriptor.go +++ /dev/null @@ -1,88 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrackDescriptor interface { -} - -func unmarshalTrackDescriptorImplementation(input []byte) (TrackDescriptor, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling TrackDescriptor into map[string]interface: %+v", err) - } - - value, ok := temp["@odata.type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.AudioTrackDescriptor") { - var out AudioTrackDescriptor - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AudioTrackDescriptor: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.SelectAudioTrackByAttribute") { - var out SelectAudioTrackByAttribute - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SelectAudioTrackByAttribute: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.SelectAudioTrackById") { - var out SelectAudioTrackById - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SelectAudioTrackById: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.SelectVideoTrackByAttribute") { - var out SelectVideoTrackByAttribute - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SelectVideoTrackByAttribute: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.SelectVideoTrackById") { - var out SelectVideoTrackById - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SelectVideoTrackById: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "#Microsoft.Media.VideoTrackDescriptor") { - var out VideoTrackDescriptor - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into VideoTrackDescriptor: %+v", err) - } - return out, nil - } - - type RawTrackDescriptorImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawTrackDescriptorImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_transform.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_transform.go deleted file mode 100644 index 01cf33e34808..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_transform.go +++ /dev/null @@ -1,16 +0,0 @@ -package encodings - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Transform struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *TransformProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_transformoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_transformoutput.go deleted file mode 100644 index 8532442b750d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_transformoutput.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformOutput struct { - OnError *OnErrorType `json:"onError,omitempty"` - Preset Preset `json:"preset"` - RelativePriority *Priority `json:"relativePriority,omitempty"` -} - -var _ json.Unmarshaler = &TransformOutput{} - -func (s *TransformOutput) UnmarshalJSON(bytes []byte) error { - type alias TransformOutput - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into TransformOutput: %+v", err) - } - - s.OnError = decoded.OnError - s.RelativePriority = decoded.RelativePriority - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling TransformOutput into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["preset"]; ok { - impl, err := unmarshalPresetImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Preset' for 'TransformOutput': %+v", err) - } - s.Preset = impl - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_transformproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_transformproperties.go deleted file mode 100644 index 74e7048d6961..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_transformproperties.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TransformProperties struct { - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - Outputs []TransformOutput `json:"outputs"` -} - -func (o *TransformProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *TransformProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *TransformProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *TransformProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_transportstreamformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_transportstreamformat.go deleted file mode 100644 index 5a869925fa55..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_transportstreamformat.go +++ /dev/null @@ -1,42 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Format = TransportStreamFormat{} - -type TransportStreamFormat struct { - OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` - - // Fields inherited from Format - FilenamePattern string `json:"filenamePattern"` -} - -var _ json.Marshaler = TransportStreamFormat{} - -func (s TransportStreamFormat) MarshalJSON() ([]byte, error) { - type wrapper TransportStreamFormat - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling TransportStreamFormat: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling TransportStreamFormat: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.TransportStreamFormat" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling TransportStreamFormat: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_utccliptime.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_utccliptime.go deleted file mode 100644 index 0787e406a942..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_utccliptime.go +++ /dev/null @@ -1,41 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClipTime = UtcClipTime{} - -type UtcClipTime struct { - Time string `json:"time"` - - // Fields inherited from ClipTime -} - -var _ json.Marshaler = UtcClipTime{} - -func (s UtcClipTime) MarshalJSON() ([]byte, error) { - type wrapper UtcClipTime - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling UtcClipTime: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling UtcClipTime: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.UtcClipTime" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling UtcClipTime: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_video.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_video.go deleted file mode 100644 index 35e566481c9d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_video.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Codec = Video{} - -type Video struct { - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` - SyncMode *VideoSyncMode `json:"syncMode,omitempty"` - - // Fields inherited from Codec - Label *string `json:"label,omitempty"` -} - -var _ json.Marshaler = Video{} - -func (s Video) MarshalJSON() ([]byte, error) { - type wrapper Video - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling Video: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling Video: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.Video" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling Video: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_videoanalyzerpreset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_videoanalyzerpreset.go deleted file mode 100644 index d98ab1914de8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_videoanalyzerpreset.go +++ /dev/null @@ -1,44 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Preset = VideoAnalyzerPreset{} - -type VideoAnalyzerPreset struct { - AudioLanguage *string `json:"audioLanguage,omitempty"` - ExperimentalOptions *map[string]string `json:"experimentalOptions,omitempty"` - InsightsToExtract *InsightsType `json:"insightsToExtract,omitempty"` - Mode *AudioAnalysisMode `json:"mode,omitempty"` - - // Fields inherited from Preset -} - -var _ json.Marshaler = VideoAnalyzerPreset{} - -func (s VideoAnalyzerPreset) MarshalJSON() ([]byte, error) { - type wrapper VideoAnalyzerPreset - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling VideoAnalyzerPreset: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling VideoAnalyzerPreset: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.VideoAnalyzerPreset" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling VideoAnalyzerPreset: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_videolayer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_videolayer.go deleted file mode 100644 index 80a0c9b2dfea..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_videolayer.go +++ /dev/null @@ -1,49 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Layer = VideoLayer{} - -type VideoLayer struct { - AdaptiveBFrame *bool `json:"adaptiveBFrame,omitempty"` - BFrames *int64 `json:"bFrames,omitempty"` - Bitrate int64 `json:"bitrate"` - FrameRate *string `json:"frameRate,omitempty"` - MaxBitrate *int64 `json:"maxBitrate,omitempty"` - Slices *int64 `json:"slices,omitempty"` - - // Fields inherited from Layer - Height *string `json:"height,omitempty"` - Label *string `json:"label,omitempty"` - Width *string `json:"width,omitempty"` -} - -var _ json.Marshaler = VideoLayer{} - -func (s VideoLayer) MarshalJSON() ([]byte, error) { - type wrapper VideoLayer - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling VideoLayer: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling VideoLayer: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.VideoLayer" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling VideoLayer: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_videooverlay.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_videooverlay.go deleted file mode 100644 index 27d0f0282567..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_videooverlay.go +++ /dev/null @@ -1,49 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Overlay = VideoOverlay{} - -type VideoOverlay struct { - CropRectangle *Rectangle `json:"cropRectangle,omitempty"` - Opacity *float64 `json:"opacity,omitempty"` - Position *Rectangle `json:"position,omitempty"` - - // Fields inherited from Overlay - AudioGainLevel *float64 `json:"audioGainLevel,omitempty"` - End *string `json:"end,omitempty"` - FadeInDuration *string `json:"fadeInDuration,omitempty"` - FadeOutDuration *string `json:"fadeOutDuration,omitempty"` - InputLabel string `json:"inputLabel"` - Start *string `json:"start,omitempty"` -} - -var _ json.Marshaler = VideoOverlay{} - -func (s VideoOverlay) MarshalJSON() ([]byte, error) { - type wrapper VideoOverlay - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling VideoOverlay: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling VideoOverlay: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.VideoOverlay" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling VideoOverlay: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_videotrackdescriptor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_videotrackdescriptor.go deleted file mode 100644 index ff1f690b1d0d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/model_videotrackdescriptor.go +++ /dev/null @@ -1,40 +0,0 @@ -package encodings - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ TrackDescriptor = VideoTrackDescriptor{} - -type VideoTrackDescriptor struct { - - // Fields inherited from TrackDescriptor -} - -var _ json.Marshaler = VideoTrackDescriptor{} - -func (s VideoTrackDescriptor) MarshalJSON() ([]byte, error) { - type wrapper VideoTrackDescriptor - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling VideoTrackDescriptor: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling VideoTrackDescriptor: %+v", err) - } - decoded["@odata.type"] = "#Microsoft.Media.VideoTrackDescriptor" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling VideoTrackDescriptor: %+v", err) - } - - return encoded, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/predicates.go deleted file mode 100644 index 7a44edd43761..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/predicates.go +++ /dev/null @@ -1,47 +0,0 @@ -package encodings - -type JobOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p JobOperationPredicate) Matches(input Job) bool { - - if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { - return false - } - - return true -} - -type TransformOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p TransformOperationPredicate) Matches(input Transform) bool { - - if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/version.go deleted file mode 100644 index cfe48ae276ce..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package encodings - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2020-05-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/encodings/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/README.md deleted file mode 100644 index 31e6d86cacf2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/README.md +++ /dev/null @@ -1,152 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents` Documentation - -The `liveevents` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2020-05-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents" -``` - - -### Client Initialization - -```go -client := liveevents.NewLiveEventsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LiveEventsClient.Allocate` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -if err := client.AllocateThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Create` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -payload := liveevents.LiveEvent{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload, liveevents.DefaultCreateOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Delete` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Get` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LiveEventsClient.List` - -```go -ctx := context.TODO() -id := liveevents.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LiveEventsClient.Reset` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -if err := client.ResetThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Start` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Stop` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -payload := liveevents.LiveEventActionInput{ - // ... -} - - -if err := client.StopThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveEventsClient.Update` - -```go -ctx := context.TODO() -id := liveevents.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -payload := liveevents.LiveEvent{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/client.go deleted file mode 100644 index 3a48113ed79d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/client.go +++ /dev/null @@ -1,18 +0,0 @@ -package liveevents - -import "github.com/Azure/go-autorest/autorest" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventsClient struct { - Client autorest.Client - baseUri string -} - -func NewLiveEventsClientWithBaseURI(endpoint string) LiveEventsClient { - return LiveEventsClient{ - Client: autorest.NewClientWithUserAgent(userAgent()), - baseUri: endpoint, - } -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/constants.go deleted file mode 100644 index c4befce65ff5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/constants.go +++ /dev/null @@ -1,167 +0,0 @@ -package liveevents - -import "strings" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventEncodingType string - -const ( - LiveEventEncodingTypeNone LiveEventEncodingType = "None" - LiveEventEncodingTypePremiumOneZeroEightZerop LiveEventEncodingType = "Premium1080p" - LiveEventEncodingTypeStandard LiveEventEncodingType = "Standard" -) - -func PossibleValuesForLiveEventEncodingType() []string { - return []string{ - string(LiveEventEncodingTypeNone), - string(LiveEventEncodingTypePremiumOneZeroEightZerop), - string(LiveEventEncodingTypeStandard), - } -} - -func parseLiveEventEncodingType(input string) (*LiveEventEncodingType, error) { - vals := map[string]LiveEventEncodingType{ - "none": LiveEventEncodingTypeNone, - "premium1080p": LiveEventEncodingTypePremiumOneZeroEightZerop, - "standard": LiveEventEncodingTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiveEventEncodingType(input) - return &out, nil -} - -type LiveEventInputProtocol string - -const ( - LiveEventInputProtocolFragmentedMPFour LiveEventInputProtocol = "FragmentedMP4" - LiveEventInputProtocolRTMP LiveEventInputProtocol = "RTMP" -) - -func PossibleValuesForLiveEventInputProtocol() []string { - return []string{ - string(LiveEventInputProtocolFragmentedMPFour), - string(LiveEventInputProtocolRTMP), - } -} - -func parseLiveEventInputProtocol(input string) (*LiveEventInputProtocol, error) { - vals := map[string]LiveEventInputProtocol{ - "fragmentedmp4": LiveEventInputProtocolFragmentedMPFour, - "rtmp": LiveEventInputProtocolRTMP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiveEventInputProtocol(input) - return &out, nil -} - -type LiveEventResourceState string - -const ( - LiveEventResourceStateAllocating LiveEventResourceState = "Allocating" - LiveEventResourceStateDeleting LiveEventResourceState = "Deleting" - LiveEventResourceStateRunning LiveEventResourceState = "Running" - LiveEventResourceStateStandBy LiveEventResourceState = "StandBy" - LiveEventResourceStateStarting LiveEventResourceState = "Starting" - LiveEventResourceStateStopped LiveEventResourceState = "Stopped" - LiveEventResourceStateStopping LiveEventResourceState = "Stopping" -) - -func PossibleValuesForLiveEventResourceState() []string { - return []string{ - string(LiveEventResourceStateAllocating), - string(LiveEventResourceStateDeleting), - string(LiveEventResourceStateRunning), - string(LiveEventResourceStateStandBy), - string(LiveEventResourceStateStarting), - string(LiveEventResourceStateStopped), - string(LiveEventResourceStateStopping), - } -} - -func parseLiveEventResourceState(input string) (*LiveEventResourceState, error) { - vals := map[string]LiveEventResourceState{ - "allocating": LiveEventResourceStateAllocating, - "deleting": LiveEventResourceStateDeleting, - "running": LiveEventResourceStateRunning, - "standby": LiveEventResourceStateStandBy, - "starting": LiveEventResourceStateStarting, - "stopped": LiveEventResourceStateStopped, - "stopping": LiveEventResourceStateStopping, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiveEventResourceState(input) - return &out, nil -} - -type StreamOptionsFlag string - -const ( - StreamOptionsFlagDefault StreamOptionsFlag = "Default" - StreamOptionsFlagLowLatency StreamOptionsFlag = "LowLatency" -) - -func PossibleValuesForStreamOptionsFlag() []string { - return []string{ - string(StreamOptionsFlagDefault), - string(StreamOptionsFlagLowLatency), - } -} - -func parseStreamOptionsFlag(input string) (*StreamOptionsFlag, error) { - vals := map[string]StreamOptionsFlag{ - "default": StreamOptionsFlagDefault, - "lowlatency": StreamOptionsFlagLowLatency, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StreamOptionsFlag(input) - return &out, nil -} - -type StretchMode string - -const ( - StretchModeAutoFit StretchMode = "AutoFit" - StretchModeAutoSize StretchMode = "AutoSize" - StretchModeNone StretchMode = "None" -) - -func PossibleValuesForStretchMode() []string { - return []string{ - string(StretchModeAutoFit), - string(StretchModeAutoSize), - string(StretchModeNone), - } -} - -func parseStretchMode(input string) (*StretchMode, error) { - vals := map[string]StretchMode{ - "autofit": StretchModeAutoFit, - "autosize": StretchModeAutoSize, - "none": StretchModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StretchMode(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/id_liveevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/id_liveevent.go deleted file mode 100644 index 3d228d8ae5d2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/id_liveevent.go +++ /dev/null @@ -1,137 +0,0 @@ -package liveevents - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = LiveEventId{} - -// LiveEventId is a struct representing the Resource ID for a Live Event -type LiveEventId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - LiveEventName string -} - -// NewLiveEventID returns a new LiveEventId struct -func NewLiveEventID(subscriptionId string, resourceGroupName string, mediaServiceName string, liveEventName string) LiveEventId { - return LiveEventId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - LiveEventName: liveEventName, - } -} - -// ParseLiveEventID parses 'input' into a LiveEventId -func ParseLiveEventID(input string) (*LiveEventId, error) { - parser := resourceids.NewParserFromResourceIdType(LiveEventId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LiveEventId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, fmt.Errorf("the segment 'liveEventName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseLiveEventIDInsensitively parses 'input' case-insensitively into a LiveEventId -// note: this method should only be used for API response data and not user input -func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { - parser := resourceids.NewParserFromResourceIdType(LiveEventId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LiveEventId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, fmt.Errorf("the segment 'liveEventName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateLiveEventID checks that 'input' can be parsed as a Live Event ID -func ValidateLiveEventID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLiveEventID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Live Event ID -func (id LiveEventId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/liveEvents/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.LiveEventName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Live Event ID -func (id LiveEventId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticLiveEvents", "liveEvents", "liveEvents"), - resourceids.UserSpecifiedSegment("liveEventName", "liveEventValue"), - } -} - -// String returns a human-readable description of this Live Event ID -func (id LiveEventId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Live Event Name: %q", id.LiveEventName), - } - return fmt.Sprintf("Live Event (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/id_mediaservice.go deleted file mode 100644 index e35d784539b0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/id_mediaservice.go +++ /dev/null @@ -1,124 +0,0 @@ -package liveevents - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_allocate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_allocate_autorest.go deleted file mode 100644 index 5786b575b4c8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_allocate_autorest.go +++ /dev/null @@ -1,78 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AllocateOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// Allocate ... -func (c LiveEventsClient) Allocate(ctx context.Context, id LiveEventId) (result AllocateOperationResponse, err error) { - req, err := c.preparerForAllocate(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Allocate", nil, "Failure preparing request") - return - } - - result, err = c.senderForAllocate(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Allocate", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// AllocateThenPoll performs Allocate then polls until it's completed -func (c LiveEventsClient) AllocateThenPoll(ctx context.Context, id LiveEventId) error { - result, err := c.Allocate(ctx, id) - if err != nil { - return fmt.Errorf("performing Allocate: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Allocate: %+v", err) - } - - return nil -} - -// preparerForAllocate prepares the Allocate request. -func (c LiveEventsClient) preparerForAllocate(ctx context.Context, id LiveEventId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/allocate", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForAllocate sends the Allocate request. The method will close the -// http.Response Body if it receives an error. -func (c LiveEventsClient) senderForAllocate(ctx context.Context, req *http.Request) (future AllocateOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_create_autorest.go deleted file mode 100644 index 2922c1b63dbd..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_create_autorest.go +++ /dev/null @@ -1,108 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -type CreateOperationOptions struct { - AutoStart *bool -} - -func DefaultCreateOperationOptions() CreateOperationOptions { - return CreateOperationOptions{} -} - -func (o CreateOperationOptions) toHeaders() map[string]interface{} { - out := make(map[string]interface{}) - - return out -} - -func (o CreateOperationOptions) toQueryString() map[string]interface{} { - out := make(map[string]interface{}) - - if o.AutoStart != nil { - out["autoStart"] = *o.AutoStart - } - - return out -} - -// Create ... -func (c LiveEventsClient) Create(ctx context.Context, id LiveEventId, input LiveEvent, options CreateOperationOptions) (result CreateOperationResponse, err error) { - req, err := c.preparerForCreate(ctx, id, input, options) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Create", nil, "Failure preparing request") - return - } - - result, err = c.senderForCreate(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Create", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c LiveEventsClient) CreateThenPoll(ctx context.Context, id LiveEventId, input LiveEvent, options CreateOperationOptions) error { - result, err := c.Create(ctx, id, input, options) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} - -// preparerForCreate prepares the Create request. -func (c LiveEventsClient) preparerForCreate(ctx context.Context, id LiveEventId, input LiveEvent, options CreateOperationOptions) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - for k, v := range options.toQueryString() { - queryParameters[k] = autorest.Encode("query", v) - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithHeaders(options.toHeaders()), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForCreate sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (c LiveEventsClient) senderForCreate(ctx context.Context, req *http.Request) (future CreateOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_delete_autorest.go deleted file mode 100644 index cb3ff602fcf4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_delete_autorest.go +++ /dev/null @@ -1,78 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// Delete ... -func (c LiveEventsClient) Delete(ctx context.Context, id LiveEventId) (result DeleteOperationResponse, err error) { - req, err := c.preparerForDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = c.senderForDelete(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Delete", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c LiveEventsClient) DeleteThenPoll(ctx context.Context, id LiveEventId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} - -// preparerForDelete prepares the Delete request. -func (c LiveEventsClient) preparerForDelete(ctx context.Context, id LiveEventId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForDelete sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (c LiveEventsClient) senderForDelete(ctx context.Context, req *http.Request) (future DeleteOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_get_autorest.go deleted file mode 100644 index ddea7146326b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_get_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package liveevents - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - Model *LiveEvent -} - -// Get ... -func (c LiveEventsClient) Get(ctx context.Context, id LiveEventId) (result GetOperationResponse, err error) { - req, err := c.preparerForGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Get", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Get", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Get", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForGet prepares the Get request. -func (c LiveEventsClient) preparerForGet(ctx context.Context, id LiveEventId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForGet handles the response to the Get request. The method always -// closes the http.Response Body. -func (c LiveEventsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_list_autorest.go deleted file mode 100644 index 09c6921fc0cc..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_list_autorest.go +++ /dev/null @@ -1,186 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - Model *[]LiveEvent - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) -} - -type ListCompleteResult struct { - Items []LiveEvent -} - -func (r ListOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -// List ... -func (c LiveEventsClient) List(ctx context.Context, id MediaServiceId) (resp ListOperationResponse, err error) { - req, err := c.preparerForList(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "List", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "List", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForList(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "List", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForList prepares the List request. -func (c LiveEventsClient) preparerForList(ctx context.Context, id MediaServiceId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/liveEvents", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForListWithNextLink prepares the List request with the given nextLink token. -func (c LiveEventsClient) preparerForListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForList handles the response to the List request. The method always -// closes the http.Response Body. -func (c LiveEventsClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { - type page struct { - Values []LiveEvent `json:"value"` - NextLink *string `json:"@odata.nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListOperationResponse, err error) { - req, err := c.preparerForListWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "List", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "List", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "List", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// ListComplete retrieves all of the results into a single object -func (c LiveEventsClient) ListComplete(ctx context.Context, id MediaServiceId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, LiveEventOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c LiveEventsClient) ListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, predicate LiveEventOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]LiveEvent, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_reset_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_reset_autorest.go deleted file mode 100644 index bf19cfc863a9..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_reset_autorest.go +++ /dev/null @@ -1,78 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// Reset ... -func (c LiveEventsClient) Reset(ctx context.Context, id LiveEventId) (result ResetOperationResponse, err error) { - req, err := c.preparerForReset(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Reset", nil, "Failure preparing request") - return - } - - result, err = c.senderForReset(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Reset", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// ResetThenPoll performs Reset then polls until it's completed -func (c LiveEventsClient) ResetThenPoll(ctx context.Context, id LiveEventId) error { - result, err := c.Reset(ctx, id) - if err != nil { - return fmt.Errorf("performing Reset: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Reset: %+v", err) - } - - return nil -} - -// preparerForReset prepares the Reset request. -func (c LiveEventsClient) preparerForReset(ctx context.Context, id LiveEventId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/reset", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForReset sends the Reset request. The method will close the -// http.Response Body if it receives an error. -func (c LiveEventsClient) senderForReset(ctx context.Context, req *http.Request) (future ResetOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_start_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_start_autorest.go deleted file mode 100644 index a7466bf0c9ae..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_start_autorest.go +++ /dev/null @@ -1,78 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// Start ... -func (c LiveEventsClient) Start(ctx context.Context, id LiveEventId) (result StartOperationResponse, err error) { - req, err := c.preparerForStart(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Start", nil, "Failure preparing request") - return - } - - result, err = c.senderForStart(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Start", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// StartThenPoll performs Start then polls until it's completed -func (c LiveEventsClient) StartThenPoll(ctx context.Context, id LiveEventId) error { - result, err := c.Start(ctx, id) - if err != nil { - return fmt.Errorf("performing Start: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Start: %+v", err) - } - - return nil -} - -// preparerForStart prepares the Start request. -func (c LiveEventsClient) preparerForStart(ctx context.Context, id LiveEventId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/start", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForStart sends the Start request. The method will close the -// http.Response Body if it receives an error. -func (c LiveEventsClient) senderForStart(ctx context.Context, req *http.Request) (future StartOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_stop_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_stop_autorest.go deleted file mode 100644 index b49d4e054f99..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_stop_autorest.go +++ /dev/null @@ -1,79 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// Stop ... -func (c LiveEventsClient) Stop(ctx context.Context, id LiveEventId, input LiveEventActionInput) (result StopOperationResponse, err error) { - req, err := c.preparerForStop(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Stop", nil, "Failure preparing request") - return - } - - result, err = c.senderForStop(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Stop", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// StopThenPoll performs Stop then polls until it's completed -func (c LiveEventsClient) StopThenPoll(ctx context.Context, id LiveEventId, input LiveEventActionInput) error { - result, err := c.Stop(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Stop: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Stop: %+v", err) - } - - return nil -} - -// preparerForStop prepares the Stop request. -func (c LiveEventsClient) preparerForStop(ctx context.Context, id LiveEventId, input LiveEventActionInput) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/stop", id.ID())), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForStop sends the Stop request. The method will close the -// http.Response Body if it receives an error. -func (c LiveEventsClient) senderForStop(ctx context.Context, req *http.Request) (future StopOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_update_autorest.go deleted file mode 100644 index d9b8edccb0f8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/method_update_autorest.go +++ /dev/null @@ -1,79 +0,0 @@ -package liveevents - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// Update ... -func (c LiveEventsClient) Update(ctx context.Context, id LiveEventId, input LiveEvent) (result UpdateOperationResponse, err error) { - req, err := c.preparerForUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = c.senderForUpdate(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "liveevents.LiveEventsClient", "Update", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// UpdateThenPoll performs Update then polls until it's completed -func (c LiveEventsClient) UpdateThenPoll(ctx context.Context, id LiveEventId, input LiveEvent) error { - result, err := c.Update(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Update: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Update: %+v", err) - } - - return nil -} - -// preparerForUpdate prepares the Update request. -func (c LiveEventsClient) preparerForUpdate(ctx context.Context, id LiveEventId, input LiveEvent) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForUpdate sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (c LiveEventsClient) senderForUpdate(ctx context.Context, req *http.Request) (future UpdateOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_crosssiteaccesspolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_crosssiteaccesspolicies.go deleted file mode 100644 index 48fe3ea2391b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_crosssiteaccesspolicies.go +++ /dev/null @@ -1,9 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CrossSiteAccessPolicies struct { - ClientAccessPolicy *string `json:"clientAccessPolicy,omitempty"` - CrossDomainPolicy *string `json:"crossDomainPolicy,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_ipaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_ipaccesscontrol.go deleted file mode 100644 index ebabbd6e23e5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_ipaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAccessControl struct { - Allow *[]IPRange `json:"allow,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_iprange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_iprange.go deleted file mode 100644 index f3baaf0ab14f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_iprange.go +++ /dev/null @@ -1,10 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPRange struct { - Address *string `json:"address,omitempty"` - Name *string `json:"name,omitempty"` - SubnetPrefixLength *int64 `json:"subnetPrefixLength,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveevent.go deleted file mode 100644 index 4ce8a6c2cf8b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveevent.go +++ /dev/null @@ -1,18 +0,0 @@ -package liveevents - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEvent struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *LiveEventProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventactioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventactioninput.go deleted file mode 100644 index 9cefd375f15d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventactioninput.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventActionInput struct { - RemoveOutputsOnStop *bool `json:"removeOutputsOnStop,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventencoding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventencoding.go deleted file mode 100644 index 5b523350a398..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventencoding.go +++ /dev/null @@ -1,11 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventEncoding struct { - EncodingType *LiveEventEncodingType `json:"encodingType,omitempty"` - KeyFrameInterval *string `json:"keyFrameInterval,omitempty"` - PresetName *string `json:"presetName,omitempty"` - StretchMode *StretchMode `json:"stretchMode,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventendpoint.go deleted file mode 100644 index 58a27757939b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventendpoint.go +++ /dev/null @@ -1,9 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventEndpoint struct { - Protocol *string `json:"protocol,omitempty"` - Url *string `json:"url,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventinput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventinput.go deleted file mode 100644 index 0eddc34140c3..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventinput.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventInput struct { - AccessControl *LiveEventInputAccessControl `json:"accessControl,omitempty"` - AccessToken *string `json:"accessToken,omitempty"` - Endpoints *[]LiveEventEndpoint `json:"endpoints,omitempty"` - KeyFrameIntervalDuration *string `json:"keyFrameIntervalDuration,omitempty"` - StreamingProtocol LiveEventInputProtocol `json:"streamingProtocol"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventinputaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventinputaccesscontrol.go deleted file mode 100644 index 097779e37a37..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventinputaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventInputAccessControl struct { - IP *IPAccessControl `json:"ip,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventinputtrackselection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventinputtrackselection.go deleted file mode 100644 index a5d8017c5b9e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventinputtrackselection.go +++ /dev/null @@ -1,10 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventInputTrackSelection struct { - Operation *string `json:"operation,omitempty"` - Property *string `json:"property,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventoutputtranscriptiontrack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventoutputtranscriptiontrack.go deleted file mode 100644 index 76d4346a238c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventoutputtranscriptiontrack.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventOutputTranscriptionTrack struct { - TrackName string `json:"trackName"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventpreview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventpreview.go deleted file mode 100644 index 29f8d0caefa8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventpreview.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventPreview struct { - AccessControl *LiveEventPreviewAccessControl `json:"accessControl,omitempty"` - AlternativeMediaId *string `json:"alternativeMediaId,omitempty"` - Endpoints *[]LiveEventEndpoint `json:"endpoints,omitempty"` - PreviewLocator *string `json:"previewLocator,omitempty"` - StreamingPolicyName *string `json:"streamingPolicyName,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventpreviewaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventpreviewaccesscontrol.go deleted file mode 100644 index 2826ebcd7391..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventpreviewaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventPreviewAccessControl struct { - IP *IPAccessControl `json:"ip,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventproperties.go deleted file mode 100644 index c04b10ab7a4a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventproperties.go +++ /dev/null @@ -1,50 +0,0 @@ -package liveevents - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventProperties struct { - Created *string `json:"created,omitempty"` - CrossSiteAccessPolicies *CrossSiteAccessPolicies `json:"crossSiteAccessPolicies,omitempty"` - Description *string `json:"description,omitempty"` - Encoding *LiveEventEncoding `json:"encoding,omitempty"` - HostnamePrefix *string `json:"hostnamePrefix,omitempty"` - Input LiveEventInput `json:"input"` - LastModified *string `json:"lastModified,omitempty"` - Preview *LiveEventPreview `json:"preview,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - ResourceState *LiveEventResourceState `json:"resourceState,omitempty"` - StreamOptions *[]StreamOptionsFlag `json:"streamOptions,omitempty"` - Transcriptions *[]LiveEventTranscription `json:"transcriptions,omitempty"` - UseStaticHostname *bool `json:"useStaticHostname,omitempty"` -} - -func (o *LiveEventProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *LiveEventProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *LiveEventProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *LiveEventProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventtranscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventtranscription.go deleted file mode 100644 index 0ec81c1e59c8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/model_liveeventtranscription.go +++ /dev/null @@ -1,10 +0,0 @@ -package liveevents - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveEventTranscription struct { - InputTrackSelection *[]LiveEventInputTrackSelection `json:"inputTrackSelection,omitempty"` - Language *string `json:"language,omitempty"` - OutputTranscriptionTrack *LiveEventOutputTranscriptionTrack `json:"outputTranscriptionTrack,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/predicates.go deleted file mode 100644 index e6ff9598b171..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/predicates.go +++ /dev/null @@ -1,29 +0,0 @@ -package liveevents - -type LiveEventOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p LiveEventOperationPredicate) Matches(input LiveEvent) bool { - - if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/version.go deleted file mode 100644 index 2a2da6037b6c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveevents - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2020-05-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/liveevents/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/README.md deleted file mode 100644 index 1a77e46c3cb1..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs` Documentation - -The `liveoutputs` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2020-05-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs" -``` - - -### Client Initialization - -```go -client := liveoutputs.NewLiveOutputsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LiveOutputsClient.Create` - -```go -ctx := context.TODO() -id := liveoutputs.NewLiveOutputID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue", "liveOutputValue") - -payload := liveoutputs.LiveOutput{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveOutputsClient.Delete` - -```go -ctx := context.TODO() -id := liveoutputs.NewLiveOutputID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue", "liveOutputValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LiveOutputsClient.Get` - -```go -ctx := context.TODO() -id := liveoutputs.NewLiveOutputID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue", "liveOutputValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LiveOutputsClient.List` - -```go -ctx := context.TODO() -id := liveoutputs.NewLiveEventID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "liveEventValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/client.go deleted file mode 100644 index 68b9de3ac049..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/client.go +++ /dev/null @@ -1,18 +0,0 @@ -package liveoutputs - -import "github.com/Azure/go-autorest/autorest" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveOutputsClient struct { - Client autorest.Client - baseUri string -} - -func NewLiveOutputsClientWithBaseURI(endpoint string) LiveOutputsClient { - return LiveOutputsClient{ - Client: autorest.NewClientWithUserAgent(userAgent()), - baseUri: endpoint, - } -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/constants.go deleted file mode 100644 index 6094e656ebb0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/constants.go +++ /dev/null @@ -1,37 +0,0 @@ -package liveoutputs - -import "strings" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveOutputResourceState string - -const ( - LiveOutputResourceStateCreating LiveOutputResourceState = "Creating" - LiveOutputResourceStateDeleting LiveOutputResourceState = "Deleting" - LiveOutputResourceStateRunning LiveOutputResourceState = "Running" -) - -func PossibleValuesForLiveOutputResourceState() []string { - return []string{ - string(LiveOutputResourceStateCreating), - string(LiveOutputResourceStateDeleting), - string(LiveOutputResourceStateRunning), - } -} - -func parseLiveOutputResourceState(input string) (*LiveOutputResourceState, error) { - vals := map[string]LiveOutputResourceState{ - "creating": LiveOutputResourceStateCreating, - "deleting": LiveOutputResourceStateDeleting, - "running": LiveOutputResourceStateRunning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LiveOutputResourceState(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/id_liveevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/id_liveevent.go deleted file mode 100644 index d230c62c7ac2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/id_liveevent.go +++ /dev/null @@ -1,137 +0,0 @@ -package liveoutputs - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = LiveEventId{} - -// LiveEventId is a struct representing the Resource ID for a Live Event -type LiveEventId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - LiveEventName string -} - -// NewLiveEventID returns a new LiveEventId struct -func NewLiveEventID(subscriptionId string, resourceGroupName string, mediaServiceName string, liveEventName string) LiveEventId { - return LiveEventId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - LiveEventName: liveEventName, - } -} - -// ParseLiveEventID parses 'input' into a LiveEventId -func ParseLiveEventID(input string) (*LiveEventId, error) { - parser := resourceids.NewParserFromResourceIdType(LiveEventId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LiveEventId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, fmt.Errorf("the segment 'liveEventName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseLiveEventIDInsensitively parses 'input' case-insensitively into a LiveEventId -// note: this method should only be used for API response data and not user input -func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { - parser := resourceids.NewParserFromResourceIdType(LiveEventId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LiveEventId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, fmt.Errorf("the segment 'liveEventName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateLiveEventID checks that 'input' can be parsed as a Live Event ID -func ValidateLiveEventID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLiveEventID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Live Event ID -func (id LiveEventId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/liveEvents/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.LiveEventName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Live Event ID -func (id LiveEventId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticLiveEvents", "liveEvents", "liveEvents"), - resourceids.UserSpecifiedSegment("liveEventName", "liveEventValue"), - } -} - -// String returns a human-readable description of this Live Event ID -func (id LiveEventId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Live Event Name: %q", id.LiveEventName), - } - return fmt.Sprintf("Live Event (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/id_liveoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/id_liveoutput.go deleted file mode 100644 index 673de0f6fe63..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/id_liveoutput.go +++ /dev/null @@ -1,150 +0,0 @@ -package liveoutputs - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = LiveOutputId{} - -// LiveOutputId is a struct representing the Resource ID for a Live Output -type LiveOutputId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - LiveEventName string - LiveOutputName string -} - -// NewLiveOutputID returns a new LiveOutputId struct -func NewLiveOutputID(subscriptionId string, resourceGroupName string, mediaServiceName string, liveEventName string, liveOutputName string) LiveOutputId { - return LiveOutputId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - LiveEventName: liveEventName, - LiveOutputName: liveOutputName, - } -} - -// ParseLiveOutputID parses 'input' into a LiveOutputId -func ParseLiveOutputID(input string) (*LiveOutputId, error) { - parser := resourceids.NewParserFromResourceIdType(LiveOutputId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LiveOutputId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, fmt.Errorf("the segment 'liveEventName' was not found in the resource id %q", input) - } - - if id.LiveOutputName, ok = parsed.Parsed["liveOutputName"]; !ok { - return nil, fmt.Errorf("the segment 'liveOutputName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseLiveOutputIDInsensitively parses 'input' case-insensitively into a LiveOutputId -// note: this method should only be used for API response data and not user input -func ParseLiveOutputIDInsensitively(input string) (*LiveOutputId, error) { - parser := resourceids.NewParserFromResourceIdType(LiveOutputId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LiveOutputId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, fmt.Errorf("the segment 'liveEventName' was not found in the resource id %q", input) - } - - if id.LiveOutputName, ok = parsed.Parsed["liveOutputName"]; !ok { - return nil, fmt.Errorf("the segment 'liveOutputName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateLiveOutputID checks that 'input' can be parsed as a Live Output ID -func ValidateLiveOutputID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLiveOutputID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Live Output ID -func (id LiveOutputId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/liveEvents/%s/liveOutputs/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.LiveEventName, id.LiveOutputName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Live Output ID -func (id LiveOutputId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticLiveEvents", "liveEvents", "liveEvents"), - resourceids.UserSpecifiedSegment("liveEventName", "liveEventValue"), - resourceids.StaticSegment("staticLiveOutputs", "liveOutputs", "liveOutputs"), - resourceids.UserSpecifiedSegment("liveOutputName", "liveOutputValue"), - } -} - -// String returns a human-readable description of this Live Output ID -func (id LiveOutputId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Live Event Name: %q", id.LiveEventName), - fmt.Sprintf("Live Output Name: %q", id.LiveOutputName), - } - return fmt.Sprintf("Live Output (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/method_create_autorest.go deleted file mode 100644 index 5e539afb25d6..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/method_create_autorest.go +++ /dev/null @@ -1,79 +0,0 @@ -package liveoutputs - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// Create ... -func (c LiveOutputsClient) Create(ctx context.Context, id LiveOutputId, input LiveOutput) (result CreateOperationResponse, err error) { - req, err := c.preparerForCreate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "liveoutputs.LiveOutputsClient", "Create", nil, "Failure preparing request") - return - } - - result, err = c.senderForCreate(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "liveoutputs.LiveOutputsClient", "Create", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c LiveOutputsClient) CreateThenPoll(ctx context.Context, id LiveOutputId, input LiveOutput) error { - result, err := c.Create(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} - -// preparerForCreate prepares the Create request. -func (c LiveOutputsClient) preparerForCreate(ctx context.Context, id LiveOutputId, input LiveOutput) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForCreate sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (c LiveOutputsClient) senderForCreate(ctx context.Context, req *http.Request) (future CreateOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/method_delete_autorest.go deleted file mode 100644 index d71cf519dec0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/method_delete_autorest.go +++ /dev/null @@ -1,78 +0,0 @@ -package liveoutputs - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// Delete ... -func (c LiveOutputsClient) Delete(ctx context.Context, id LiveOutputId) (result DeleteOperationResponse, err error) { - req, err := c.preparerForDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "liveoutputs.LiveOutputsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = c.senderForDelete(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "liveoutputs.LiveOutputsClient", "Delete", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c LiveOutputsClient) DeleteThenPoll(ctx context.Context, id LiveOutputId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} - -// preparerForDelete prepares the Delete request. -func (c LiveOutputsClient) preparerForDelete(ctx context.Context, id LiveOutputId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForDelete sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (c LiveOutputsClient) senderForDelete(ctx context.Context, req *http.Request) (future DeleteOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/method_get_autorest.go deleted file mode 100644 index fceb86b3d687..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/method_get_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package liveoutputs - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - Model *LiveOutput -} - -// Get ... -func (c LiveOutputsClient) Get(ctx context.Context, id LiveOutputId) (result GetOperationResponse, err error) { - req, err := c.preparerForGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "liveoutputs.LiveOutputsClient", "Get", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "liveoutputs.LiveOutputsClient", "Get", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "liveoutputs.LiveOutputsClient", "Get", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForGet prepares the Get request. -func (c LiveOutputsClient) preparerForGet(ctx context.Context, id LiveOutputId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForGet handles the response to the Get request. The method always -// closes the http.Response Body. -func (c LiveOutputsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/method_list_autorest.go deleted file mode 100644 index dd3226b21e14..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/method_list_autorest.go +++ /dev/null @@ -1,186 +0,0 @@ -package liveoutputs - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - Model *[]LiveOutput - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) -} - -type ListCompleteResult struct { - Items []LiveOutput -} - -func (r ListOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -// List ... -func (c LiveOutputsClient) List(ctx context.Context, id LiveEventId) (resp ListOperationResponse, err error) { - req, err := c.preparerForList(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "liveoutputs.LiveOutputsClient", "List", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "liveoutputs.LiveOutputsClient", "List", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForList(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "liveoutputs.LiveOutputsClient", "List", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForList prepares the List request. -func (c LiveOutputsClient) preparerForList(ctx context.Context, id LiveEventId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/liveOutputs", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForListWithNextLink prepares the List request with the given nextLink token. -func (c LiveOutputsClient) preparerForListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForList handles the response to the List request. The method always -// closes the http.Response Body. -func (c LiveOutputsClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { - type page struct { - Values []LiveOutput `json:"value"` - NextLink *string `json:"@odata.nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListOperationResponse, err error) { - req, err := c.preparerForListWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "liveoutputs.LiveOutputsClient", "List", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "liveoutputs.LiveOutputsClient", "List", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "liveoutputs.LiveOutputsClient", "List", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// ListComplete retrieves all of the results into a single object -func (c LiveOutputsClient) ListComplete(ctx context.Context, id LiveEventId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, LiveOutputOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c LiveOutputsClient) ListCompleteMatchingPredicate(ctx context.Context, id LiveEventId, predicate LiveOutputOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]LiveOutput, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/model_hls.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/model_hls.go deleted file mode 100644 index 8eabe1959166..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/model_hls.go +++ /dev/null @@ -1,8 +0,0 @@ -package liveoutputs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Hls struct { - FragmentsPerTsSegment *int64 `json:"fragmentsPerTsSegment,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/model_liveoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/model_liveoutput.go deleted file mode 100644 index be5c8c3d5c4a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/model_liveoutput.go +++ /dev/null @@ -1,11 +0,0 @@ -package liveoutputs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveOutput struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *LiveOutputProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/model_liveoutputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/model_liveoutputproperties.go deleted file mode 100644 index b48c674681a6..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/model_liveoutputproperties.go +++ /dev/null @@ -1,47 +0,0 @@ -package liveoutputs - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LiveOutputProperties struct { - ArchiveWindowLength string `json:"archiveWindowLength"` - AssetName string `json:"assetName"` - Created *string `json:"created,omitempty"` - Description *string `json:"description,omitempty"` - Hls *Hls `json:"hls,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - ManifestName *string `json:"manifestName,omitempty"` - OutputSnapTime *int64 `json:"outputSnapTime,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - ResourceState *LiveOutputResourceState `json:"resourceState,omitempty"` -} - -func (o *LiveOutputProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *LiveOutputProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *LiveOutputProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *LiveOutputProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/predicates.go deleted file mode 100644 index f7c145c8dda4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/predicates.go +++ /dev/null @@ -1,24 +0,0 @@ -package liveoutputs - -type LiveOutputOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p LiveOutputOperationPredicate) Matches(input LiveOutput) bool { - - if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/version.go deleted file mode 100644 index 94af07e07c82..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package liveoutputs - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2020-05-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/liveoutputs/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/README.md deleted file mode 100644 index 94476702d21a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/README.md +++ /dev/null @@ -1,140 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints` Documentation - -The `streamingendpoints` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2020-05-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints" -``` - - -### Client Initialization - -```go -client := streamingendpoints.NewStreamingEndpointsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `StreamingEndpointsClient.Create` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -payload := streamingendpoints.StreamingEndpoint{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload, streamingendpoints.DefaultCreateOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Delete` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Get` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingEndpointsClient.List` - -```go -ctx := context.TODO() -id := streamingendpoints.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `StreamingEndpointsClient.Scale` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -payload := streamingendpoints.StreamingEntityScaleUnit{ - // ... -} - - -if err := client.ScaleThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Start` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Stop` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -if err := client.StopThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StreamingEndpointsClient.Update` - -```go -ctx := context.TODO() -id := streamingendpoints.NewStreamingEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingEndpointValue") - -payload := streamingendpoints.StreamingEndpoint{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/client.go deleted file mode 100644 index 9bc249849b3f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/client.go +++ /dev/null @@ -1,18 +0,0 @@ -package streamingendpoints - -import "github.com/Azure/go-autorest/autorest" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointsClient struct { - Client autorest.Client - baseUri string -} - -func NewStreamingEndpointsClientWithBaseURI(endpoint string) StreamingEndpointsClient { - return StreamingEndpointsClient{ - Client: autorest.NewClientWithUserAgent(userAgent()), - baseUri: endpoint, - } -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/constants.go deleted file mode 100644 index 3984868942e8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/constants.go +++ /dev/null @@ -1,46 +0,0 @@ -package streamingendpoints - -import "strings" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointResourceState string - -const ( - StreamingEndpointResourceStateDeleting StreamingEndpointResourceState = "Deleting" - StreamingEndpointResourceStateRunning StreamingEndpointResourceState = "Running" - StreamingEndpointResourceStateScaling StreamingEndpointResourceState = "Scaling" - StreamingEndpointResourceStateStarting StreamingEndpointResourceState = "Starting" - StreamingEndpointResourceStateStopped StreamingEndpointResourceState = "Stopped" - StreamingEndpointResourceStateStopping StreamingEndpointResourceState = "Stopping" -) - -func PossibleValuesForStreamingEndpointResourceState() []string { - return []string{ - string(StreamingEndpointResourceStateDeleting), - string(StreamingEndpointResourceStateRunning), - string(StreamingEndpointResourceStateScaling), - string(StreamingEndpointResourceStateStarting), - string(StreamingEndpointResourceStateStopped), - string(StreamingEndpointResourceStateStopping), - } -} - -func parseStreamingEndpointResourceState(input string) (*StreamingEndpointResourceState, error) { - vals := map[string]StreamingEndpointResourceState{ - "deleting": StreamingEndpointResourceStateDeleting, - "running": StreamingEndpointResourceStateRunning, - "scaling": StreamingEndpointResourceStateScaling, - "starting": StreamingEndpointResourceStateStarting, - "stopped": StreamingEndpointResourceStateStopped, - "stopping": StreamingEndpointResourceStateStopping, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StreamingEndpointResourceState(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/id_mediaservice.go deleted file mode 100644 index 885d3947268f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/id_mediaservice.go +++ /dev/null @@ -1,124 +0,0 @@ -package streamingendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/id_streamingendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/id_streamingendpoint.go deleted file mode 100644 index da3bbe0ad88a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/id_streamingendpoint.go +++ /dev/null @@ -1,137 +0,0 @@ -package streamingendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = StreamingEndpointId{} - -// StreamingEndpointId is a struct representing the Resource ID for a Streaming Endpoint -type StreamingEndpointId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - StreamingEndpointName string -} - -// NewStreamingEndpointID returns a new StreamingEndpointId struct -func NewStreamingEndpointID(subscriptionId string, resourceGroupName string, mediaServiceName string, streamingEndpointName string) StreamingEndpointId { - return StreamingEndpointId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - StreamingEndpointName: streamingEndpointName, - } -} - -// ParseStreamingEndpointID parses 'input' into a StreamingEndpointId -func ParseStreamingEndpointID(input string) (*StreamingEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(StreamingEndpointId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := StreamingEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.StreamingEndpointName, ok = parsed.Parsed["streamingEndpointName"]; !ok { - return nil, fmt.Errorf("the segment 'streamingEndpointName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseStreamingEndpointIDInsensitively parses 'input' case-insensitively into a StreamingEndpointId -// note: this method should only be used for API response data and not user input -func ParseStreamingEndpointIDInsensitively(input string) (*StreamingEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(StreamingEndpointId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := StreamingEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.StreamingEndpointName, ok = parsed.Parsed["streamingEndpointName"]; !ok { - return nil, fmt.Errorf("the segment 'streamingEndpointName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateStreamingEndpointID checks that 'input' can be parsed as a Streaming Endpoint ID -func ValidateStreamingEndpointID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseStreamingEndpointID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Streaming Endpoint ID -func (id StreamingEndpointId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/streamingEndpoints/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.StreamingEndpointName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Streaming Endpoint ID -func (id StreamingEndpointId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticStreamingEndpoints", "streamingEndpoints", "streamingEndpoints"), - resourceids.UserSpecifiedSegment("streamingEndpointName", "streamingEndpointValue"), - } -} - -// String returns a human-readable description of this Streaming Endpoint ID -func (id StreamingEndpointId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Streaming Endpoint Name: %q", id.StreamingEndpointName), - } - return fmt.Sprintf("Streaming Endpoint (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_create_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_create_autorest.go deleted file mode 100644 index dcfbee8526c0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_create_autorest.go +++ /dev/null @@ -1,108 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -type CreateOperationOptions struct { - AutoStart *bool -} - -func DefaultCreateOperationOptions() CreateOperationOptions { - return CreateOperationOptions{} -} - -func (o CreateOperationOptions) toHeaders() map[string]interface{} { - out := make(map[string]interface{}) - - return out -} - -func (o CreateOperationOptions) toQueryString() map[string]interface{} { - out := make(map[string]interface{}) - - if o.AutoStart != nil { - out["autoStart"] = *o.AutoStart - } - - return out -} - -// Create ... -func (c StreamingEndpointsClient) Create(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint, options CreateOperationOptions) (result CreateOperationResponse, err error) { - req, err := c.preparerForCreate(ctx, id, input, options) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Create", nil, "Failure preparing request") - return - } - - result, err = c.senderForCreate(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Create", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c StreamingEndpointsClient) CreateThenPoll(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint, options CreateOperationOptions) error { - result, err := c.Create(ctx, id, input, options) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} - -// preparerForCreate prepares the Create request. -func (c StreamingEndpointsClient) preparerForCreate(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint, options CreateOperationOptions) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - for k, v := range options.toQueryString() { - queryParameters[k] = autorest.Encode("query", v) - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithHeaders(options.toHeaders()), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForCreate sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (c StreamingEndpointsClient) senderForCreate(ctx context.Context, req *http.Request) (future CreateOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_delete_autorest.go deleted file mode 100644 index 77aa864d6cb7..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_delete_autorest.go +++ /dev/null @@ -1,78 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// Delete ... -func (c StreamingEndpointsClient) Delete(ctx context.Context, id StreamingEndpointId) (result DeleteOperationResponse, err error) { - req, err := c.preparerForDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = c.senderForDelete(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Delete", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c StreamingEndpointsClient) DeleteThenPoll(ctx context.Context, id StreamingEndpointId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} - -// preparerForDelete prepares the Delete request. -func (c StreamingEndpointsClient) preparerForDelete(ctx context.Context, id StreamingEndpointId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForDelete sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (c StreamingEndpointsClient) senderForDelete(ctx context.Context, req *http.Request) (future DeleteOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_get_autorest.go deleted file mode 100644 index 10efc6a807be..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_get_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package streamingendpoints - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - Model *StreamingEndpoint -} - -// Get ... -func (c StreamingEndpointsClient) Get(ctx context.Context, id StreamingEndpointId) (result GetOperationResponse, err error) { - req, err := c.preparerForGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Get", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Get", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Get", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForGet prepares the Get request. -func (c StreamingEndpointsClient) preparerForGet(ctx context.Context, id StreamingEndpointId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForGet handles the response to the Get request. The method always -// closes the http.Response Body. -func (c StreamingEndpointsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_list_autorest.go deleted file mode 100644 index cb66dadcda4a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_list_autorest.go +++ /dev/null @@ -1,186 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - Model *[]StreamingEndpoint - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) -} - -type ListCompleteResult struct { - Items []StreamingEndpoint -} - -func (r ListOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -// List ... -func (c StreamingEndpointsClient) List(ctx context.Context, id MediaServiceId) (resp ListOperationResponse, err error) { - req, err := c.preparerForList(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "List", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "List", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForList(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "List", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForList prepares the List request. -func (c StreamingEndpointsClient) preparerForList(ctx context.Context, id MediaServiceId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/streamingEndpoints", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForListWithNextLink prepares the List request with the given nextLink token. -func (c StreamingEndpointsClient) preparerForListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForList handles the response to the List request. The method always -// closes the http.Response Body. -func (c StreamingEndpointsClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { - type page struct { - Values []StreamingEndpoint `json:"value"` - NextLink *string `json:"@odata.nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListOperationResponse, err error) { - req, err := c.preparerForListWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "List", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "List", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "List", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// ListComplete retrieves all of the results into a single object -func (c StreamingEndpointsClient) ListComplete(ctx context.Context, id MediaServiceId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, StreamingEndpointOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c StreamingEndpointsClient) ListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, predicate StreamingEndpointOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]StreamingEndpoint, 0) - - page, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := ListCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_scale_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_scale_autorest.go deleted file mode 100644 index f02f5f35ff53..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_scale_autorest.go +++ /dev/null @@ -1,79 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScaleOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// Scale ... -func (c StreamingEndpointsClient) Scale(ctx context.Context, id StreamingEndpointId, input StreamingEntityScaleUnit) (result ScaleOperationResponse, err error) { - req, err := c.preparerForScale(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Scale", nil, "Failure preparing request") - return - } - - result, err = c.senderForScale(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Scale", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// ScaleThenPoll performs Scale then polls until it's completed -func (c StreamingEndpointsClient) ScaleThenPoll(ctx context.Context, id StreamingEndpointId, input StreamingEntityScaleUnit) error { - result, err := c.Scale(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Scale: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Scale: %+v", err) - } - - return nil -} - -// preparerForScale prepares the Scale request. -func (c StreamingEndpointsClient) preparerForScale(ctx context.Context, id StreamingEndpointId, input StreamingEntityScaleUnit) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/scale", id.ID())), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForScale sends the Scale request. The method will close the -// http.Response Body if it receives an error. -func (c StreamingEndpointsClient) senderForScale(ctx context.Context, req *http.Request) (future ScaleOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_start_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_start_autorest.go deleted file mode 100644 index 7cdbd03356d4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_start_autorest.go +++ /dev/null @@ -1,78 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// Start ... -func (c StreamingEndpointsClient) Start(ctx context.Context, id StreamingEndpointId) (result StartOperationResponse, err error) { - req, err := c.preparerForStart(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Start", nil, "Failure preparing request") - return - } - - result, err = c.senderForStart(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Start", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// StartThenPoll performs Start then polls until it's completed -func (c StreamingEndpointsClient) StartThenPoll(ctx context.Context, id StreamingEndpointId) error { - result, err := c.Start(ctx, id) - if err != nil { - return fmt.Errorf("performing Start: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Start: %+v", err) - } - - return nil -} - -// preparerForStart prepares the Start request. -func (c StreamingEndpointsClient) preparerForStart(ctx context.Context, id StreamingEndpointId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/start", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForStart sends the Start request. The method will close the -// http.Response Body if it receives an error. -func (c StreamingEndpointsClient) senderForStart(ctx context.Context, req *http.Request) (future StartOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_stop_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_stop_autorest.go deleted file mode 100644 index 5b75d2dc1efc..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_stop_autorest.go +++ /dev/null @@ -1,78 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// Stop ... -func (c StreamingEndpointsClient) Stop(ctx context.Context, id StreamingEndpointId) (result StopOperationResponse, err error) { - req, err := c.preparerForStop(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Stop", nil, "Failure preparing request") - return - } - - result, err = c.senderForStop(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Stop", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// StopThenPoll performs Stop then polls until it's completed -func (c StreamingEndpointsClient) StopThenPoll(ctx context.Context, id StreamingEndpointId) error { - result, err := c.Stop(ctx, id) - if err != nil { - return fmt.Errorf("performing Stop: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Stop: %+v", err) - } - - return nil -} - -// preparerForStop prepares the Stop request. -func (c StreamingEndpointsClient) preparerForStop(ctx context.Context, id StreamingEndpointId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/stop", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForStop sends the Stop request. The method will close the -// http.Response Body if it receives an error. -func (c StreamingEndpointsClient) senderForStop(ctx context.Context, req *http.Request) (future StopOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_update_autorest.go deleted file mode 100644 index 7a29476eb7be..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/method_update_autorest.go +++ /dev/null @@ -1,79 +0,0 @@ -package streamingendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/hashicorp/go-azure-helpers/polling" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - Poller polling.LongRunningPoller - HttpResponse *http.Response -} - -// Update ... -func (c StreamingEndpointsClient) Update(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint) (result UpdateOperationResponse, err error) { - req, err := c.preparerForUpdate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = c.senderForUpdate(ctx, req) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingendpoints.StreamingEndpointsClient", "Update", result.HttpResponse, "Failure sending request") - return - } - - return -} - -// UpdateThenPoll performs Update then polls until it's completed -func (c StreamingEndpointsClient) UpdateThenPoll(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint) error { - result, err := c.Update(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Update: %+v", err) - } - - if err := result.Poller.PollUntilDone(); err != nil { - return fmt.Errorf("polling after Update: %+v", err) - } - - return nil -} - -// preparerForUpdate prepares the Update request. -func (c StreamingEndpointsClient) preparerForUpdate(ctx context.Context, id StreamingEndpointId, input StreamingEndpoint) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// senderForUpdate sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (c StreamingEndpointsClient) senderForUpdate(ctx context.Context, req *http.Request) (future UpdateOperationResponse, err error) { - var resp *http.Response - resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - return - } - - future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_akamaiaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_akamaiaccesscontrol.go deleted file mode 100644 index 54db60a01f0a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_akamaiaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AkamaiAccessControl struct { - AkamaiSignatureHeaderAuthenticationKeyList *[]AkamaiSignatureHeaderAuthenticationKey `json:"akamaiSignatureHeaderAuthenticationKeyList,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_akamaisignatureheaderauthenticationkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_akamaisignatureheaderauthenticationkey.go deleted file mode 100644 index 32037bfa525e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_akamaisignatureheaderauthenticationkey.go +++ /dev/null @@ -1,28 +0,0 @@ -package streamingendpoints - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AkamaiSignatureHeaderAuthenticationKey struct { - Base64Key *string `json:"base64Key,omitempty"` - Expiration *string `json:"expiration,omitempty"` - Identifier *string `json:"identifier,omitempty"` -} - -func (o *AkamaiSignatureHeaderAuthenticationKey) GetExpirationAsTime() (*time.Time, error) { - if o.Expiration == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Expiration, "2006-01-02T15:04:05Z07:00") -} - -func (o *AkamaiSignatureHeaderAuthenticationKey) SetExpirationAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Expiration = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_crosssiteaccesspolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_crosssiteaccesspolicies.go deleted file mode 100644 index df58bc186f2c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_crosssiteaccesspolicies.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CrossSiteAccessPolicies struct { - ClientAccessPolicy *string `json:"clientAccessPolicy,omitempty"` - CrossDomainPolicy *string `json:"crossDomainPolicy,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_ipaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_ipaccesscontrol.go deleted file mode 100644 index 68255bff449d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_ipaccesscontrol.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAccessControl struct { - Allow *[]IPRange `json:"allow,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_iprange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_iprange.go deleted file mode 100644 index 07cfcae8c2be..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_iprange.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPRange struct { - Address *string `json:"address,omitempty"` - Name *string `json:"name,omitempty"` - SubnetPrefixLength *int64 `json:"subnetPrefixLength,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_streamingendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_streamingendpoint.go deleted file mode 100644 index 2e7e8f301362..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_streamingendpoint.go +++ /dev/null @@ -1,18 +0,0 @@ -package streamingendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpoint struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *StreamingEndpointProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_streamingendpointaccesscontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_streamingendpointaccesscontrol.go deleted file mode 100644 index 3620eaa8196b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_streamingendpointaccesscontrol.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointAccessControl struct { - Akamai *AkamaiAccessControl `json:"akamai,omitempty"` - IP *IPAccessControl `json:"ip,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_streamingendpointproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_streamingendpointproperties.go deleted file mode 100644 index 443118599035..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_streamingendpointproperties.go +++ /dev/null @@ -1,65 +0,0 @@ -package streamingendpoints - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEndpointProperties struct { - AccessControl *StreamingEndpointAccessControl `json:"accessControl,omitempty"` - AvailabilitySetName *string `json:"availabilitySetName,omitempty"` - CdnEnabled *bool `json:"cdnEnabled,omitempty"` - CdnProfile *string `json:"cdnProfile,omitempty"` - CdnProvider *string `json:"cdnProvider,omitempty"` - Created *string `json:"created,omitempty"` - CrossSiteAccessPolicies *CrossSiteAccessPolicies `json:"crossSiteAccessPolicies,omitempty"` - CustomHostNames *[]string `json:"customHostNames,omitempty"` - Description *string `json:"description,omitempty"` - FreeTrialEndTime *string `json:"freeTrialEndTime,omitempty"` - HostName *string `json:"hostName,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - MaxCacheAge *int64 `json:"maxCacheAge,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - ResourceState *StreamingEndpointResourceState `json:"resourceState,omitempty"` - ScaleUnits int64 `json:"scaleUnits"` -} - -func (o *StreamingEndpointProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingEndpointProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *StreamingEndpointProperties) GetFreeTrialEndTimeAsTime() (*time.Time, error) { - if o.FreeTrialEndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.FreeTrialEndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingEndpointProperties) SetFreeTrialEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.FreeTrialEndTime = &formatted -} - -func (o *StreamingEndpointProperties) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingEndpointProperties) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_streamingentityscaleunit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_streamingentityscaleunit.go deleted file mode 100644 index 9af1883b9433..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/model_streamingentityscaleunit.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingEntityScaleUnit struct { - ScaleUnit *int64 `json:"scaleUnit,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/predicates.go deleted file mode 100644 index 1c0d9ee53a01..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/predicates.go +++ /dev/null @@ -1,29 +0,0 @@ -package streamingendpoints - -type StreamingEndpointOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p StreamingEndpointOperationPredicate) Matches(input StreamingEndpoint) bool { - - if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/version.go deleted file mode 100644 index 76ef355450eb..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package streamingendpoints - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2020-05-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/streamingendpoints/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/README.md deleted file mode 100644 index 607048c79807..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/README.md +++ /dev/null @@ -1,192 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators` Documentation - -The `streamingpoliciesandstreaminglocators` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2020-05-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators" -``` - - -### Client Initialization - -```go -client := streamingpoliciesandstreaminglocators.NewStreamingPoliciesAndStreamingLocatorsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsCreate` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -payload := streamingpoliciesandstreaminglocators.StreamingLocator{ - // ... -} - - -read, err := client.StreamingLocatorsCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsDelete` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -read, err := client.StreamingLocatorsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsGet` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -read, err := client.StreamingLocatorsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsList` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.StreamingLocatorsList(ctx, id, streamingpoliciesandstreaminglocators.DefaultStreamingLocatorsListOperationOptions())` can be used to do batched pagination -items, err := client.StreamingLocatorsListComplete(ctx, id, streamingpoliciesandstreaminglocators.DefaultStreamingLocatorsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsListContentKeys` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -read, err := client.StreamingLocatorsListContentKeys(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingLocatorsListPaths` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingLocatorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingLocatorValue") - -read, err := client.StreamingLocatorsListPaths(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingPoliciesCreate` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingPolicyValue") - -payload := streamingpoliciesandstreaminglocators.StreamingPolicy{ - // ... -} - - -read, err := client.StreamingPoliciesCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingPoliciesDelete` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingPolicyValue") - -read, err := client.StreamingPoliciesDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingPoliciesGet` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewStreamingPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "streamingPolicyValue") - -read, err := client.StreamingPoliciesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StreamingPoliciesAndStreamingLocatorsClient.StreamingPoliciesList` - -```go -ctx := context.TODO() -id := streamingpoliciesandstreaminglocators.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue") - -// alternatively `client.StreamingPoliciesList(ctx, id, streamingpoliciesandstreaminglocators.DefaultStreamingPoliciesListOperationOptions())` can be used to do batched pagination -items, err := client.StreamingPoliciesListComplete(ctx, id, streamingpoliciesandstreaminglocators.DefaultStreamingPoliciesListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/client.go deleted file mode 100644 index 9aab35279a2c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/client.go +++ /dev/null @@ -1,18 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import "github.com/Azure/go-autorest/autorest" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesAndStreamingLocatorsClient struct { - Client autorest.Client - baseUri string -} - -func NewStreamingPoliciesAndStreamingLocatorsClientWithBaseURI(endpoint string) StreamingPoliciesAndStreamingLocatorsClient { - return StreamingPoliciesAndStreamingLocatorsClient{ - Client: autorest.NewClientWithUserAgent(userAgent()), - baseUri: endpoint, - } -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/constants.go deleted file mode 100644 index c319bdafadfe..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/constants.go +++ /dev/null @@ -1,161 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import "strings" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EncryptionScheme string - -const ( - EncryptionSchemeCommonEncryptionCbcs EncryptionScheme = "CommonEncryptionCbcs" - EncryptionSchemeCommonEncryptionCenc EncryptionScheme = "CommonEncryptionCenc" - EncryptionSchemeEnvelopeEncryption EncryptionScheme = "EnvelopeEncryption" - EncryptionSchemeNoEncryption EncryptionScheme = "NoEncryption" -) - -func PossibleValuesForEncryptionScheme() []string { - return []string{ - string(EncryptionSchemeCommonEncryptionCbcs), - string(EncryptionSchemeCommonEncryptionCenc), - string(EncryptionSchemeEnvelopeEncryption), - string(EncryptionSchemeNoEncryption), - } -} - -func parseEncryptionScheme(input string) (*EncryptionScheme, error) { - vals := map[string]EncryptionScheme{ - "commonencryptioncbcs": EncryptionSchemeCommonEncryptionCbcs, - "commonencryptioncenc": EncryptionSchemeCommonEncryptionCenc, - "envelopeencryption": EncryptionSchemeEnvelopeEncryption, - "noencryption": EncryptionSchemeNoEncryption, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EncryptionScheme(input) - return &out, nil -} - -type StreamingLocatorContentKeyType string - -const ( - StreamingLocatorContentKeyTypeCommonEncryptionCbcs StreamingLocatorContentKeyType = "CommonEncryptionCbcs" - StreamingLocatorContentKeyTypeCommonEncryptionCenc StreamingLocatorContentKeyType = "CommonEncryptionCenc" - StreamingLocatorContentKeyTypeEnvelopeEncryption StreamingLocatorContentKeyType = "EnvelopeEncryption" -) - -func PossibleValuesForStreamingLocatorContentKeyType() []string { - return []string{ - string(StreamingLocatorContentKeyTypeCommonEncryptionCbcs), - string(StreamingLocatorContentKeyTypeCommonEncryptionCenc), - string(StreamingLocatorContentKeyTypeEnvelopeEncryption), - } -} - -func parseStreamingLocatorContentKeyType(input string) (*StreamingLocatorContentKeyType, error) { - vals := map[string]StreamingLocatorContentKeyType{ - "commonencryptioncbcs": StreamingLocatorContentKeyTypeCommonEncryptionCbcs, - "commonencryptioncenc": StreamingLocatorContentKeyTypeCommonEncryptionCenc, - "envelopeencryption": StreamingLocatorContentKeyTypeEnvelopeEncryption, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StreamingLocatorContentKeyType(input) - return &out, nil -} - -type StreamingPolicyStreamingProtocol string - -const ( - StreamingPolicyStreamingProtocolDash StreamingPolicyStreamingProtocol = "Dash" - StreamingPolicyStreamingProtocolDownload StreamingPolicyStreamingProtocol = "Download" - StreamingPolicyStreamingProtocolHls StreamingPolicyStreamingProtocol = "Hls" - StreamingPolicyStreamingProtocolSmoothStreaming StreamingPolicyStreamingProtocol = "SmoothStreaming" -) - -func PossibleValuesForStreamingPolicyStreamingProtocol() []string { - return []string{ - string(StreamingPolicyStreamingProtocolDash), - string(StreamingPolicyStreamingProtocolDownload), - string(StreamingPolicyStreamingProtocolHls), - string(StreamingPolicyStreamingProtocolSmoothStreaming), - } -} - -func parseStreamingPolicyStreamingProtocol(input string) (*StreamingPolicyStreamingProtocol, error) { - vals := map[string]StreamingPolicyStreamingProtocol{ - "dash": StreamingPolicyStreamingProtocolDash, - "download": StreamingPolicyStreamingProtocolDownload, - "hls": StreamingPolicyStreamingProtocolHls, - "smoothstreaming": StreamingPolicyStreamingProtocolSmoothStreaming, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StreamingPolicyStreamingProtocol(input) - return &out, nil -} - -type TrackPropertyCompareOperation string - -const ( - TrackPropertyCompareOperationEqual TrackPropertyCompareOperation = "Equal" - TrackPropertyCompareOperationUnknown TrackPropertyCompareOperation = "Unknown" -) - -func PossibleValuesForTrackPropertyCompareOperation() []string { - return []string{ - string(TrackPropertyCompareOperationEqual), - string(TrackPropertyCompareOperationUnknown), - } -} - -func parseTrackPropertyCompareOperation(input string) (*TrackPropertyCompareOperation, error) { - vals := map[string]TrackPropertyCompareOperation{ - "equal": TrackPropertyCompareOperationEqual, - "unknown": TrackPropertyCompareOperationUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TrackPropertyCompareOperation(input) - return &out, nil -} - -type TrackPropertyType string - -const ( - TrackPropertyTypeFourCC TrackPropertyType = "FourCC" - TrackPropertyTypeUnknown TrackPropertyType = "Unknown" -) - -func PossibleValuesForTrackPropertyType() []string { - return []string{ - string(TrackPropertyTypeFourCC), - string(TrackPropertyTypeUnknown), - } -} - -func parseTrackPropertyType(input string) (*TrackPropertyType, error) { - vals := map[string]TrackPropertyType{ - "fourcc": TrackPropertyTypeFourCC, - "unknown": TrackPropertyTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TrackPropertyType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/id_mediaservice.go deleted file mode 100644 index ba3aaa702658..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/id_mediaservice.go +++ /dev/null @@ -1,124 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = MediaServiceId{} - -// MediaServiceId is a struct representing the Resource ID for a Media Service -type MediaServiceId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string -} - -// NewMediaServiceID returns a new MediaServiceId struct -func NewMediaServiceID(subscriptionId string, resourceGroupName string, mediaServiceName string) MediaServiceId { - return MediaServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - } -} - -// ParseMediaServiceID parses 'input' into a MediaServiceId -func ParseMediaServiceID(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseMediaServiceIDInsensitively parses 'input' case-insensitively into a MediaServiceId -// note: this method should only be used for API response data and not user input -func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(MediaServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID -func ValidateMediaServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseMediaServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Media Service ID -func (id MediaServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Media Service ID -func (id MediaServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - } -} - -// String returns a human-readable description of this Media Service ID -func (id MediaServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - } - return fmt.Sprintf("Media Service (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go deleted file mode 100644 index 62096fdd6f71..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go +++ /dev/null @@ -1,137 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = StreamingLocatorId{} - -// StreamingLocatorId is a struct representing the Resource ID for a Streaming Locator -type StreamingLocatorId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - StreamingLocatorName string -} - -// NewStreamingLocatorID returns a new StreamingLocatorId struct -func NewStreamingLocatorID(subscriptionId string, resourceGroupName string, mediaServiceName string, streamingLocatorName string) StreamingLocatorId { - return StreamingLocatorId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - StreamingLocatorName: streamingLocatorName, - } -} - -// ParseStreamingLocatorID parses 'input' into a StreamingLocatorId -func ParseStreamingLocatorID(input string) (*StreamingLocatorId, error) { - parser := resourceids.NewParserFromResourceIdType(StreamingLocatorId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := StreamingLocatorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.StreamingLocatorName, ok = parsed.Parsed["streamingLocatorName"]; !ok { - return nil, fmt.Errorf("the segment 'streamingLocatorName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseStreamingLocatorIDInsensitively parses 'input' case-insensitively into a StreamingLocatorId -// note: this method should only be used for API response data and not user input -func ParseStreamingLocatorIDInsensitively(input string) (*StreamingLocatorId, error) { - parser := resourceids.NewParserFromResourceIdType(StreamingLocatorId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := StreamingLocatorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.StreamingLocatorName, ok = parsed.Parsed["streamingLocatorName"]; !ok { - return nil, fmt.Errorf("the segment 'streamingLocatorName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateStreamingLocatorID checks that 'input' can be parsed as a Streaming Locator ID -func ValidateStreamingLocatorID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseStreamingLocatorID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Streaming Locator ID -func (id StreamingLocatorId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/streamingLocators/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.StreamingLocatorName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Streaming Locator ID -func (id StreamingLocatorId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticStreamingLocators", "streamingLocators", "streamingLocators"), - resourceids.UserSpecifiedSegment("streamingLocatorName", "streamingLocatorValue"), - } -} - -// String returns a human-readable description of this Streaming Locator ID -func (id StreamingLocatorId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Streaming Locator Name: %q", id.StreamingLocatorName), - } - return fmt.Sprintf("Streaming Locator (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go deleted file mode 100644 index a7dfa53f75f2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go +++ /dev/null @@ -1,137 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.ResourceId = StreamingPolicyId{} - -// StreamingPolicyId is a struct representing the Resource ID for a Streaming Policy -type StreamingPolicyId struct { - SubscriptionId string - ResourceGroupName string - MediaServiceName string - StreamingPolicyName string -} - -// NewStreamingPolicyID returns a new StreamingPolicyId struct -func NewStreamingPolicyID(subscriptionId string, resourceGroupName string, mediaServiceName string, streamingPolicyName string) StreamingPolicyId { - return StreamingPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - MediaServiceName: mediaServiceName, - StreamingPolicyName: streamingPolicyName, - } -} - -// ParseStreamingPolicyID parses 'input' into a StreamingPolicyId -func ParseStreamingPolicyID(input string) (*StreamingPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(StreamingPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := StreamingPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.StreamingPolicyName, ok = parsed.Parsed["streamingPolicyName"]; !ok { - return nil, fmt.Errorf("the segment 'streamingPolicyName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ParseStreamingPolicyIDInsensitively parses 'input' case-insensitively into a StreamingPolicyId -// note: this method should only be used for API response data and not user input -func ParseStreamingPolicyIDInsensitively(input string) (*StreamingPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(StreamingPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := StreamingPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, fmt.Errorf("the segment 'mediaServiceName' was not found in the resource id %q", input) - } - - if id.StreamingPolicyName, ok = parsed.Parsed["streamingPolicyName"]; !ok { - return nil, fmt.Errorf("the segment 'streamingPolicyName' was not found in the resource id %q", input) - } - - return &id, nil -} - -// ValidateStreamingPolicyID checks that 'input' can be parsed as a Streaming Policy ID -func ValidateStreamingPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseStreamingPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Streaming Policy ID -func (id StreamingPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Media/mediaServices/%s/streamingPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MediaServiceName, id.StreamingPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Streaming Policy ID -func (id StreamingPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("staticMediaServices", "mediaServices", "mediaServices"), - resourceids.UserSpecifiedSegment("mediaServiceName", "mediaServiceValue"), - resourceids.StaticSegment("staticStreamingPolicies", "streamingPolicies", "streamingPolicies"), - resourceids.UserSpecifiedSegment("streamingPolicyName", "streamingPolicyValue"), - } -} - -// String returns a human-readable description of this Streaming Policy ID -func (id StreamingPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Media Service Name: %q", id.MediaServiceName), - fmt.Sprintf("Streaming Policy Name: %q", id.StreamingPolicyName), - } - return fmt.Sprintf("Streaming Policy (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate_autorest.go deleted file mode 100644 index 22bc808ffce4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsCreateOperationResponse struct { - HttpResponse *http.Response - Model *StreamingLocator -} - -// StreamingLocatorsCreate ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsCreate(ctx context.Context, id StreamingLocatorId, input StreamingLocator) (result StreamingLocatorsCreateOperationResponse, err error) { - req, err := c.preparerForStreamingLocatorsCreate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsCreate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsCreate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForStreamingLocatorsCreate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsCreate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForStreamingLocatorsCreate prepares the StreamingLocatorsCreate request. -func (c StreamingPoliciesAndStreamingLocatorsClient) preparerForStreamingLocatorsCreate(ctx context.Context, id StreamingLocatorId, input StreamingLocator) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForStreamingLocatorsCreate handles the response to the StreamingLocatorsCreate request. The method always -// closes the http.Response Body. -func (c StreamingPoliciesAndStreamingLocatorsClient) responderForStreamingLocatorsCreate(resp *http.Response) (result StreamingLocatorsCreateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusCreated), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsdelete_autorest.go deleted file mode 100644 index f0013c1f5632..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsdelete_autorest.go +++ /dev/null @@ -1,66 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsDeleteOperationResponse struct { - HttpResponse *http.Response -} - -// StreamingLocatorsDelete ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsDelete(ctx context.Context, id StreamingLocatorId) (result StreamingLocatorsDeleteOperationResponse, err error) { - req, err := c.preparerForStreamingLocatorsDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsDelete", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsDelete", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForStreamingLocatorsDelete(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsDelete", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForStreamingLocatorsDelete prepares the StreamingLocatorsDelete request. -func (c StreamingPoliciesAndStreamingLocatorsClient) preparerForStreamingLocatorsDelete(ctx context.Context, id StreamingLocatorId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForStreamingLocatorsDelete handles the response to the StreamingLocatorsDelete request. The method always -// closes the http.Response Body. -func (c StreamingPoliciesAndStreamingLocatorsClient) responderForStreamingLocatorsDelete(resp *http.Response) (result StreamingLocatorsDeleteOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget_autorest.go deleted file mode 100644 index 9524359feaa7..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsGetOperationResponse struct { - HttpResponse *http.Response - Model *StreamingLocator -} - -// StreamingLocatorsGet ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsGet(ctx context.Context, id StreamingLocatorId) (result StreamingLocatorsGetOperationResponse, err error) { - req, err := c.preparerForStreamingLocatorsGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsGet", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsGet", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForStreamingLocatorsGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsGet", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForStreamingLocatorsGet prepares the StreamingLocatorsGet request. -func (c StreamingPoliciesAndStreamingLocatorsClient) preparerForStreamingLocatorsGet(ctx context.Context, id StreamingLocatorId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForStreamingLocatorsGet handles the response to the StreamingLocatorsGet request. The method always -// closes the http.Response Body. -func (c StreamingPoliciesAndStreamingLocatorsClient) responderForStreamingLocatorsGet(resp *http.Response) (result StreamingLocatorsGetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist_autorest.go deleted file mode 100644 index 425c4f241f4d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist_autorest.go +++ /dev/null @@ -1,225 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsListOperationResponse struct { - HttpResponse *http.Response - Model *[]StreamingLocator - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (StreamingLocatorsListOperationResponse, error) -} - -type StreamingLocatorsListCompleteResult struct { - Items []StreamingLocator -} - -func (r StreamingLocatorsListOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r StreamingLocatorsListOperationResponse) LoadMore(ctx context.Context) (resp StreamingLocatorsListOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -type StreamingLocatorsListOperationOptions struct { - Filter *string - Orderby *string - Top *int64 -} - -func DefaultStreamingLocatorsListOperationOptions() StreamingLocatorsListOperationOptions { - return StreamingLocatorsListOperationOptions{} -} - -func (o StreamingLocatorsListOperationOptions) toHeaders() map[string]interface{} { - out := make(map[string]interface{}) - - return out -} - -func (o StreamingLocatorsListOperationOptions) toQueryString() map[string]interface{} { - out := make(map[string]interface{}) - - if o.Filter != nil { - out["$filter"] = *o.Filter - } - - if o.Orderby != nil { - out["$orderby"] = *o.Orderby - } - - if o.Top != nil { - out["$top"] = *o.Top - } - - return out -} - -// StreamingLocatorsList ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsList(ctx context.Context, id MediaServiceId, options StreamingLocatorsListOperationOptions) (resp StreamingLocatorsListOperationResponse, err error) { - req, err := c.preparerForStreamingLocatorsList(ctx, id, options) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsList", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsList", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForStreamingLocatorsList(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsList", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForStreamingLocatorsList prepares the StreamingLocatorsList request. -func (c StreamingPoliciesAndStreamingLocatorsClient) preparerForStreamingLocatorsList(ctx context.Context, id MediaServiceId, options StreamingLocatorsListOperationOptions) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - for k, v := range options.toQueryString() { - queryParameters[k] = autorest.Encode("query", v) - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithHeaders(options.toHeaders()), - autorest.WithPath(fmt.Sprintf("%s/streamingLocators", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForStreamingLocatorsListWithNextLink prepares the StreamingLocatorsList request with the given nextLink token. -func (c StreamingPoliciesAndStreamingLocatorsClient) preparerForStreamingLocatorsListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForStreamingLocatorsList handles the response to the StreamingLocatorsList request. The method always -// closes the http.Response Body. -func (c StreamingPoliciesAndStreamingLocatorsClient) responderForStreamingLocatorsList(resp *http.Response) (result StreamingLocatorsListOperationResponse, err error) { - type page struct { - Values []StreamingLocator `json:"value"` - NextLink *string `json:"@odata.nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result StreamingLocatorsListOperationResponse, err error) { - req, err := c.preparerForStreamingLocatorsListWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsList", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsList", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForStreamingLocatorsList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsList", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// StreamingLocatorsListComplete retrieves all of the results into a single object -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListComplete(ctx context.Context, id MediaServiceId, options StreamingLocatorsListOperationOptions) (StreamingLocatorsListCompleteResult, error) { - return c.StreamingLocatorsListCompleteMatchingPredicate(ctx, id, options, StreamingLocatorOperationPredicate{}) -} - -// StreamingLocatorsListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options StreamingLocatorsListOperationOptions, predicate StreamingLocatorOperationPredicate) (resp StreamingLocatorsListCompleteResult, err error) { - items := make([]StreamingLocator, 0) - - page, err := c.StreamingLocatorsList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := StreamingLocatorsListCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys_autorest.go deleted file mode 100644 index 1823f948254d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsListContentKeysOperationResponse struct { - HttpResponse *http.Response - Model *ListContentKeysResponse -} - -// StreamingLocatorsListContentKeys ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListContentKeys(ctx context.Context, id StreamingLocatorId) (result StreamingLocatorsListContentKeysOperationResponse, err error) { - req, err := c.preparerForStreamingLocatorsListContentKeys(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsListContentKeys", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsListContentKeys", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForStreamingLocatorsListContentKeys(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsListContentKeys", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForStreamingLocatorsListContentKeys prepares the StreamingLocatorsListContentKeys request. -func (c StreamingPoliciesAndStreamingLocatorsClient) preparerForStreamingLocatorsListContentKeys(ctx context.Context, id StreamingLocatorId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/listContentKeys", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForStreamingLocatorsListContentKeys handles the response to the StreamingLocatorsListContentKeys request. The method always -// closes the http.Response Body. -func (c StreamingPoliciesAndStreamingLocatorsClient) responderForStreamingLocatorsListContentKeys(resp *http.Response) (result StreamingLocatorsListContentKeysOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths_autorest.go deleted file mode 100644 index b9df52f25685..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "fmt" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorsListPathsOperationResponse struct { - HttpResponse *http.Response - Model *ListPathsResponse -} - -// StreamingLocatorsListPaths ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListPaths(ctx context.Context, id StreamingLocatorId) (result StreamingLocatorsListPathsOperationResponse, err error) { - req, err := c.preparerForStreamingLocatorsListPaths(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsListPaths", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsListPaths", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForStreamingLocatorsListPaths(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingLocatorsListPaths", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForStreamingLocatorsListPaths prepares the StreamingLocatorsListPaths request. -func (c StreamingPoliciesAndStreamingLocatorsClient) preparerForStreamingLocatorsListPaths(ctx context.Context, id StreamingLocatorId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(fmt.Sprintf("%s/listPaths", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForStreamingLocatorsListPaths handles the response to the StreamingLocatorsListPaths request. The method always -// closes the http.Response Body. -func (c StreamingPoliciesAndStreamingLocatorsClient) responderForStreamingLocatorsListPaths(resp *http.Response) (result StreamingLocatorsListPathsOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate_autorest.go deleted file mode 100644 index cbae46457cfd..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate_autorest.go +++ /dev/null @@ -1,69 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesCreateOperationResponse struct { - HttpResponse *http.Response - Model *StreamingPolicy -} - -// StreamingPoliciesCreate ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesCreate(ctx context.Context, id StreamingPolicyId, input StreamingPolicy) (result StreamingPoliciesCreateOperationResponse, err error) { - req, err := c.preparerForStreamingPoliciesCreate(ctx, id, input) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesCreate", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesCreate", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForStreamingPoliciesCreate(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesCreate", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForStreamingPoliciesCreate prepares the StreamingPoliciesCreate request. -func (c StreamingPoliciesAndStreamingLocatorsClient) preparerForStreamingPoliciesCreate(ctx context.Context, id StreamingPolicyId, input StreamingPolicy) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithJSON(input), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForStreamingPoliciesCreate handles the response to the StreamingPoliciesCreate request. The method always -// closes the http.Response Body. -func (c StreamingPoliciesAndStreamingLocatorsClient) responderForStreamingPoliciesCreate(resp *http.Response) (result StreamingPoliciesCreateOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusCreated), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesdelete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesdelete_autorest.go deleted file mode 100644 index cb3a9ad04750..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesdelete_autorest.go +++ /dev/null @@ -1,66 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesDeleteOperationResponse struct { - HttpResponse *http.Response -} - -// StreamingPoliciesDelete ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesDelete(ctx context.Context, id StreamingPolicyId) (result StreamingPoliciesDeleteOperationResponse, err error) { - req, err := c.preparerForStreamingPoliciesDelete(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesDelete", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesDelete", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForStreamingPoliciesDelete(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesDelete", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForStreamingPoliciesDelete prepares the StreamingPoliciesDelete request. -func (c StreamingPoliciesAndStreamingLocatorsClient) preparerForStreamingPoliciesDelete(ctx context.Context, id StreamingPolicyId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsDelete(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForStreamingPoliciesDelete handles the response to the StreamingPoliciesDelete request. The method always -// closes the http.Response Body. -func (c StreamingPoliciesAndStreamingLocatorsClient) responderForStreamingPoliciesDelete(resp *http.Response) (result StreamingPoliciesDeleteOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget_autorest.go deleted file mode 100644 index 7af2ac9158d8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget_autorest.go +++ /dev/null @@ -1,68 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "net/http" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesGetOperationResponse struct { - HttpResponse *http.Response - Model *StreamingPolicy -} - -// StreamingPoliciesGet ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesGet(ctx context.Context, id StreamingPolicyId) (result StreamingPoliciesGetOperationResponse, err error) { - req, err := c.preparerForStreamingPoliciesGet(ctx, id) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesGet", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesGet", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForStreamingPoliciesGet(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesGet", result.HttpResponse, "Failure responding to request") - return - } - - return -} - -// preparerForStreamingPoliciesGet prepares the StreamingPoliciesGet request. -func (c StreamingPoliciesAndStreamingLocatorsClient) preparerForStreamingPoliciesGet(ctx context.Context, id StreamingPolicyId) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(id.ID()), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForStreamingPoliciesGet handles the response to the StreamingPoliciesGet request. The method always -// closes the http.Response Body. -func (c StreamingPoliciesAndStreamingLocatorsClient) responderForStreamingPoliciesGet(resp *http.Response) (result StreamingPoliciesGetOperationResponse, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Model), - autorest.ByClosing()) - result.HttpResponse = resp - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist_autorest.go deleted file mode 100644 index 8b9914debfbd..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist_autorest.go +++ /dev/null @@ -1,225 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPoliciesListOperationResponse struct { - HttpResponse *http.Response - Model *[]StreamingPolicy - - nextLink *string - nextPageFunc func(ctx context.Context, nextLink string) (StreamingPoliciesListOperationResponse, error) -} - -type StreamingPoliciesListCompleteResult struct { - Items []StreamingPolicy -} - -func (r StreamingPoliciesListOperationResponse) HasMore() bool { - return r.nextLink != nil -} - -func (r StreamingPoliciesListOperationResponse) LoadMore(ctx context.Context) (resp StreamingPoliciesListOperationResponse, err error) { - if !r.HasMore() { - err = fmt.Errorf("no more pages returned") - return - } - return r.nextPageFunc(ctx, *r.nextLink) -} - -type StreamingPoliciesListOperationOptions struct { - Filter *string - Orderby *string - Top *int64 -} - -func DefaultStreamingPoliciesListOperationOptions() StreamingPoliciesListOperationOptions { - return StreamingPoliciesListOperationOptions{} -} - -func (o StreamingPoliciesListOperationOptions) toHeaders() map[string]interface{} { - out := make(map[string]interface{}) - - return out -} - -func (o StreamingPoliciesListOperationOptions) toQueryString() map[string]interface{} { - out := make(map[string]interface{}) - - if o.Filter != nil { - out["$filter"] = *o.Filter - } - - if o.Orderby != nil { - out["$orderby"] = *o.Orderby - } - - if o.Top != nil { - out["$top"] = *o.Top - } - - return out -} - -// StreamingPoliciesList ... -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesList(ctx context.Context, id MediaServiceId, options StreamingPoliciesListOperationOptions) (resp StreamingPoliciesListOperationResponse, err error) { - req, err := c.preparerForStreamingPoliciesList(ctx, id, options) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesList", nil, "Failure preparing request") - return - } - - resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesList", resp.HttpResponse, "Failure sending request") - return - } - - resp, err = c.responderForStreamingPoliciesList(resp.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesList", resp.HttpResponse, "Failure responding to request") - return - } - return -} - -// preparerForStreamingPoliciesList prepares the StreamingPoliciesList request. -func (c StreamingPoliciesAndStreamingLocatorsClient) preparerForStreamingPoliciesList(ctx context.Context, id MediaServiceId, options StreamingPoliciesListOperationOptions) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": defaultApiVersion, - } - - for k, v := range options.toQueryString() { - queryParameters[k] = autorest.Encode("query", v) - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithHeaders(options.toHeaders()), - autorest.WithPath(fmt.Sprintf("%s/streamingPolicies", id.ID())), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// preparerForStreamingPoliciesListWithNextLink prepares the StreamingPoliciesList request with the given nextLink token. -func (c StreamingPoliciesAndStreamingLocatorsClient) preparerForStreamingPoliciesListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { - uri, err := url.Parse(nextLink) - if err != nil { - return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) - } - queryParameters := map[string]interface{}{} - for k, v := range uri.Query() { - if len(v) == 0 { - continue - } - val := v[0] - val = autorest.Encode("query", val) - queryParameters[k] = val - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsGet(), - autorest.WithBaseURL(c.baseUri), - autorest.WithPath(uri.Path), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// responderForStreamingPoliciesList handles the response to the StreamingPoliciesList request. The method always -// closes the http.Response Body. -func (c StreamingPoliciesAndStreamingLocatorsClient) responderForStreamingPoliciesList(resp *http.Response) (result StreamingPoliciesListOperationResponse, err error) { - type page struct { - Values []StreamingPolicy `json:"value"` - NextLink *string `json:"@odata.nextLink"` - } - var respObj page - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&respObj), - autorest.ByClosing()) - result.HttpResponse = resp - result.Model = &respObj.Values - result.nextLink = respObj.NextLink - if respObj.NextLink != nil { - result.nextPageFunc = func(ctx context.Context, nextLink string) (result StreamingPoliciesListOperationResponse, err error) { - req, err := c.preparerForStreamingPoliciesListWithNextLink(ctx, nextLink) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesList", nil, "Failure preparing request") - return - } - - result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesList", result.HttpResponse, "Failure sending request") - return - } - - result, err = c.responderForStreamingPoliciesList(result.HttpResponse) - if err != nil { - err = autorest.NewErrorWithError(err, "streamingpoliciesandstreaminglocators.StreamingPoliciesAndStreamingLocatorsClient", "StreamingPoliciesList", result.HttpResponse, "Failure responding to request") - return - } - - return - } - } - return -} - -// StreamingPoliciesListComplete retrieves all of the results into a single object -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesListComplete(ctx context.Context, id MediaServiceId, options StreamingPoliciesListOperationOptions) (StreamingPoliciesListCompleteResult, error) { - return c.StreamingPoliciesListCompleteMatchingPredicate(ctx, id, options, StreamingPolicyOperationPredicate{}) -} - -// StreamingPoliciesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesListCompleteMatchingPredicate(ctx context.Context, id MediaServiceId, options StreamingPoliciesListOperationOptions, predicate StreamingPolicyOperationPredicate) (resp StreamingPoliciesListCompleteResult, err error) { - items := make([]StreamingPolicy, 0) - - page, err := c.StreamingPoliciesList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading the initial page: %+v", err) - return - } - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - for page.HasMore() { - page, err = page.LoadMore(ctx) - if err != nil { - err = fmt.Errorf("loading the next page: %+v", err) - return - } - - if page.Model != nil { - for _, v := range *page.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - } - - out := StreamingPoliciesListCompleteResult{ - Items: items, - } - return out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_cbcsdrmconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_cbcsdrmconfiguration.go deleted file mode 100644 index ae2f7e2f7b93..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_cbcsdrmconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CbcsDrmConfiguration struct { - FairPlay *StreamingPolicyFairPlayConfiguration `json:"fairPlay,omitempty"` - PlayReady *StreamingPolicyPlayReadyConfiguration `json:"playReady,omitempty"` - Widevine *StreamingPolicyWidevineConfiguration `json:"widevine,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_cencdrmconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_cencdrmconfiguration.go deleted file mode 100644 index 303f7515a8ba..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_cencdrmconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CencDrmConfiguration struct { - PlayReady *StreamingPolicyPlayReadyConfiguration `json:"playReady,omitempty"` - Widevine *StreamingPolicyWidevineConfiguration `json:"widevine,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_commonencryptioncbcs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_commonencryptioncbcs.go deleted file mode 100644 index 53f1c51ac43a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_commonencryptioncbcs.go +++ /dev/null @@ -1,11 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommonEncryptionCbcs struct { - ClearTracks *[]TrackSelection `json:"clearTracks,omitempty"` - ContentKeys *StreamingPolicyContentKeys `json:"contentKeys,omitempty"` - Drm *CbcsDrmConfiguration `json:"drm,omitempty"` - EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_commonencryptioncenc.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_commonencryptioncenc.go deleted file mode 100644 index 35fc2df90b12..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_commonencryptioncenc.go +++ /dev/null @@ -1,11 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommonEncryptionCenc struct { - ClearTracks *[]TrackSelection `json:"clearTracks,omitempty"` - ContentKeys *StreamingPolicyContentKeys `json:"contentKeys,omitempty"` - Drm *CencDrmConfiguration `json:"drm,omitempty"` - EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_defaultkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_defaultkey.go deleted file mode 100644 index 45346db27997..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_defaultkey.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultKey struct { - Label *string `json:"label,omitempty"` - PolicyName *string `json:"policyName,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_enabledprotocols.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_enabledprotocols.go deleted file mode 100644 index 6df37395ce29..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_enabledprotocols.go +++ /dev/null @@ -1,11 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EnabledProtocols struct { - Dash bool `json:"dash"` - Download bool `json:"download"` - Hls bool `json:"hls"` - SmoothStreaming bool `json:"smoothStreaming"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_envelopeencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_envelopeencryption.go deleted file mode 100644 index 2d05cea4b5ab..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_envelopeencryption.go +++ /dev/null @@ -1,11 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EnvelopeEncryption struct { - ClearTracks *[]TrackSelection `json:"clearTracks,omitempty"` - ContentKeys *StreamingPolicyContentKeys `json:"contentKeys,omitempty"` - CustomKeyAcquisitionUrlTemplate *string `json:"customKeyAcquisitionUrlTemplate,omitempty"` - EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_listcontentkeysresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_listcontentkeysresponse.go deleted file mode 100644 index 9947072e63d6..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_listcontentkeysresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListContentKeysResponse struct { - ContentKeys *[]StreamingLocatorContentKey `json:"contentKeys,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_listpathsresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_listpathsresponse.go deleted file mode 100644 index dc2d9ca8c659..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_listpathsresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListPathsResponse struct { - DownloadPaths *[]string `json:"downloadPaths,omitempty"` - StreamingPaths *[]StreamingPath `json:"streamingPaths,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_noencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_noencryption.go deleted file mode 100644 index e011fdc6e91c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_noencryption.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NoEncryption struct { - EnabledProtocols *EnabledProtocols `json:"enabledProtocols,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streaminglocator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streaminglocator.go deleted file mode 100644 index dfba5540db69..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streaminglocator.go +++ /dev/null @@ -1,16 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocator struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *StreamingLocatorProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streaminglocatorcontentkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streaminglocatorcontentkey.go deleted file mode 100644 index 52c78e6e9237..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streaminglocatorcontentkey.go +++ /dev/null @@ -1,13 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorContentKey struct { - Id string `json:"id"` - LabelReferenceInStreamingPolicy *string `json:"labelReferenceInStreamingPolicy,omitempty"` - PolicyName *string `json:"policyName,omitempty"` - Tracks *[]TrackSelection `json:"tracks,omitempty"` - Type *StreamingLocatorContentKeyType `json:"type,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streaminglocatorproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streaminglocatorproperties.go deleted file mode 100644 index e9123bd921fa..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streaminglocatorproperties.go +++ /dev/null @@ -1,59 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingLocatorProperties struct { - AlternativeMediaId *string `json:"alternativeMediaId,omitempty"` - AssetName string `json:"assetName"` - ContentKeys *[]StreamingLocatorContentKey `json:"contentKeys,omitempty"` - Created *string `json:"created,omitempty"` - DefaultContentKeyPolicyName *string `json:"defaultContentKeyPolicyName,omitempty"` - EndTime *string `json:"endTime,omitempty"` - Filters *[]string `json:"filters,omitempty"` - StartTime *string `json:"startTime,omitempty"` - StreamingLocatorId *string `json:"streamingLocatorId,omitempty"` - StreamingPolicyName string `json:"streamingPolicyName"` -} - -func (o *StreamingLocatorProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingLocatorProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *StreamingLocatorProperties) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingLocatorProperties) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *StreamingLocatorProperties) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingLocatorProperties) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpath.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpath.go deleted file mode 100644 index 72efd8a9aa27..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpath.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPath struct { - EncryptionScheme EncryptionScheme `json:"encryptionScheme"` - Paths *[]string `json:"paths,omitempty"` - StreamingProtocol StreamingPolicyStreamingProtocol `json:"streamingProtocol"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicy.go deleted file mode 100644 index 3dd17c801455..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicy.go +++ /dev/null @@ -1,16 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicy struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *StreamingPolicyProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkey.go deleted file mode 100644 index 2b8ff87e7686..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkey.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyContentKey struct { - Label *string `json:"label,omitempty"` - PolicyName *string `json:"policyName,omitempty"` - Tracks *[]TrackSelection `json:"tracks,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkeys.go deleted file mode 100644 index 89fc35580ed8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicycontentkeys.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyContentKeys struct { - DefaultKey *DefaultKey `json:"defaultKey,omitempty"` - KeyToTrackMappings *[]StreamingPolicyContentKey `json:"keyToTrackMappings,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicyfairplayconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicyfairplayconfiguration.go deleted file mode 100644 index 08017c68e806..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicyfairplayconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyFairPlayConfiguration struct { - AllowPersistentLicense bool `json:"allowPersistentLicense"` - CustomLicenseAcquisitionUrlTemplate *string `json:"customLicenseAcquisitionUrlTemplate,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicyplayreadyconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicyplayreadyconfiguration.go deleted file mode 100644 index 45d779f1602e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicyplayreadyconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyPlayReadyConfiguration struct { - CustomLicenseAcquisitionUrlTemplate *string `json:"customLicenseAcquisitionUrlTemplate,omitempty"` - PlayReadyCustomAttributes *string `json:"playReadyCustomAttributes,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicyproperties.go deleted file mode 100644 index 69fbe59729b5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicyproperties.go +++ /dev/null @@ -1,31 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyProperties struct { - CommonEncryptionCbcs *CommonEncryptionCbcs `json:"commonEncryptionCbcs,omitempty"` - CommonEncryptionCenc *CommonEncryptionCenc `json:"commonEncryptionCenc,omitempty"` - Created *string `json:"created,omitempty"` - DefaultContentKeyPolicyName *string `json:"defaultContentKeyPolicyName,omitempty"` - EnvelopeEncryption *EnvelopeEncryption `json:"envelopeEncryption,omitempty"` - NoEncryption *NoEncryption `json:"noEncryption,omitempty"` -} - -func (o *StreamingPolicyProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *StreamingPolicyProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicywidevineconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicywidevineconfiguration.go deleted file mode 100644 index 2d2ec405fb18..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_streamingpolicywidevineconfiguration.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StreamingPolicyWidevineConfiguration struct { - CustomLicenseAcquisitionUrlTemplate *string `json:"customLicenseAcquisitionUrlTemplate,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_trackpropertycondition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_trackpropertycondition.go deleted file mode 100644 index 798b212d07ce..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_trackpropertycondition.go +++ /dev/null @@ -1,10 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrackPropertyCondition struct { - Operation TrackPropertyCompareOperation `json:"operation"` - Property TrackPropertyType `json:"property"` - Value *string `json:"value,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_trackselection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_trackselection.go deleted file mode 100644 index be9009cc09e5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/model_trackselection.go +++ /dev/null @@ -1,8 +0,0 @@ -package streamingpoliciesandstreaminglocators - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrackSelection struct { - TrackSelections *[]TrackPropertyCondition `json:"trackSelections,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/predicates.go deleted file mode 100644 index 54331e7e8763..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/predicates.go +++ /dev/null @@ -1,47 +0,0 @@ -package streamingpoliciesandstreaminglocators - -type StreamingLocatorOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p StreamingLocatorOperationPredicate) Matches(input StreamingLocator) bool { - - if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { - return false - } - - return true -} - -type StreamingPolicyOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p StreamingPolicyOperationPredicate) Matches(input StreamingPolicy) bool { - - if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/version.go deleted file mode 100644 index d006e5a9c5ea..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package streamingpoliciesandstreaminglocators - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2020-05-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/streamingpoliciesandstreaminglocators/%s", defaultApiVersion) -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 4548d75a2135..04377e7348c1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -358,16 +358,6 @@ github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules -github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01 -github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accountfilters -github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/accounts -github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/assetsandassetfilters -github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/contentkeypolicies -github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/encodings -github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveevents -github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/liveoutputs -github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingendpoints -github.com/hashicorp/go-azure-sdk/resource-manager/media/2020-05-01/streamingpoliciesandstreaminglocators github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01 github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts