From ef67b84f404f156001ce402bfa1c37870372d727 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Fri, 12 Nov 2021 15:25:45 +0100 Subject: [PATCH] videoanalyzer: updating to the latest embedded sdk --- .../videoanalyzer/id_accesspolicies.go | 12 ++++---- .../videoanalyzer/id_accesspolicies_test.go | 15 ++++++++++ .../videoanalyzer/id_edgemodule.go | 12 ++++---- .../videoanalyzer/id_edgemodule_test.go | 15 ++++++++++ .../videoanalyzer/id_location.go | 8 ++--- .../videoanalyzer/id_location_test.go | 15 ++++++++++ .../videoanalyzer/id_resourcegroup.go | 4 +-- .../videoanalyzer/id_resourcegroup_test.go | 15 ++++++++++ .../videoanalyzer/id_subscription.go | 2 +- .../videoanalyzer/id_subscription_test.go | 15 ++++++++++ .../videoanalyzer/id_video.go | 12 ++++---- .../videoanalyzer/id_video_test.go | 15 ++++++++++ .../videoanalyzer/id_videoanalyzer.go | 10 +++---- .../videoanalyzer/id_videoanalyzer_test.go | 15 ++++++++++ .../videoanalyzer/model_ecctokenkey.go | 5 ++++ .../model_edgemoduleprovisioningtoken.go | 18 +++++++++++ .../videoanalyzer/model_jwtauthentication.go | 4 +++ .../model_listprovisioningtokeninput.go | 15 ++++++++++ .../videoanalyzer/model_rsatokenkey.go | 5 ++++ .../videoanalyzer/model_systemdata.go | 30 +++++++++++++++++++ .../model_videostreamingtoken.go | 18 +++++++++++ 21 files changed, 230 insertions(+), 30 deletions(-) diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_accesspolicies.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_accesspolicies.go index a248ec48d81d..858b038713c4 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_accesspolicies.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_accesspolicies.go @@ -112,15 +112,15 @@ func (id AccessPoliciesId) ID() string { // Segments returns a slice of Resource ID Segments which comprise this Access Policies ID func (id AccessPoliciesId) Segments() []resourceids.Segment { return []resourceids.Segment{ - resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"), + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("providers", "providers", "providers"), - resourceids.ResourceProviderSegment("microsoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("videoAnalyzers", "videoAnalyzers", "videoAnalyzers"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), + resourceids.StaticSegment("staticVideoAnalyzers", "videoAnalyzers", "videoAnalyzers"), resourceids.UserSpecifiedSegment("accountName", "accountValue"), - resourceids.StaticSegment("accessPolicies", "accessPolicies", "accessPolicies"), + resourceids.StaticSegment("staticAccessPolicies", "accessPolicies", "accessPolicies"), resourceids.UserSpecifiedSegment("accessPolicyName", "accessPolicyValue"), } } diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_accesspolicies_test.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_accesspolicies_test.go index abdfc5936edd..d3a49d964bbe 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_accesspolicies_test.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_accesspolicies_test.go @@ -307,3 +307,18 @@ func TestParseAccessPoliciesIDInsensitively(t *testing.T) { } } + +func TestSegmentsForAccessPoliciesId(t *testing.T) { + segments := AccessPoliciesId{}.Segments() + if len(segments) == 0 { + t.Fatalf("AccessPoliciesId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_edgemodule.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_edgemodule.go index 53ded2189aec..10fa71d5b918 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_edgemodule.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_edgemodule.go @@ -112,15 +112,15 @@ func (id EdgeModuleId) ID() string { // Segments returns a slice of Resource ID Segments which comprise this Edge Module ID func (id EdgeModuleId) Segments() []resourceids.Segment { return []resourceids.Segment{ - resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"), + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("providers", "providers", "providers"), - resourceids.ResourceProviderSegment("microsoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("videoAnalyzers", "videoAnalyzers", "videoAnalyzers"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), + resourceids.StaticSegment("staticVideoAnalyzers", "videoAnalyzers", "videoAnalyzers"), resourceids.UserSpecifiedSegment("accountName", "accountValue"), - resourceids.StaticSegment("edgeModules", "edgeModules", "edgeModules"), + resourceids.StaticSegment("staticEdgeModules", "edgeModules", "edgeModules"), resourceids.UserSpecifiedSegment("edgeModuleName", "edgeModuleValue"), } } diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_edgemodule_test.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_edgemodule_test.go index ed40a2acb091..04feb01e16eb 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_edgemodule_test.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_edgemodule_test.go @@ -307,3 +307,18 @@ func TestParseEdgeModuleIDInsensitively(t *testing.T) { } } + +func TestSegmentsForEdgeModuleId(t *testing.T) { + segments := EdgeModuleId{}.Segments() + if len(segments) == 0 { + t.Fatalf("EdgeModuleId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_location.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_location.go index 81b6a6c84a35..2a9a9f715884 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_location.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_location.go @@ -92,11 +92,11 @@ func (id LocationId) ID() string { // Segments returns a slice of Resource ID Segments which comprise this Location ID func (id LocationId) Segments() []resourceids.Segment { return []resourceids.Segment{ - resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"), + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("providers", "providers", "providers"), - resourceids.ResourceProviderSegment("microsoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("locations", "locations", "locations"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), resourceids.UserSpecifiedSegment("locationName", "locationValue"), } } diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_location_test.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_location_test.go index 4dce54e48500..54d4c85f8e79 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_location_test.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_location_test.go @@ -217,3 +217,18 @@ func TestParseLocationIDInsensitively(t *testing.T) { } } + +func TestSegmentsForLocationId(t *testing.T) { + segments := LocationId{}.Segments() + if len(segments) == 0 { + t.Fatalf("LocationId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_resourcegroup.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_resourcegroup.go index 919d7b5ce114..81fcb1da9578 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_resourcegroup.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_resourcegroup.go @@ -92,9 +92,9 @@ func (id ResourceGroupId) ID() string { // Segments returns a slice of Resource ID Segments which comprise this Resource Group ID func (id ResourceGroupId) Segments() []resourceids.Segment { return []resourceids.Segment{ - resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"), + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), } } diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_resourcegroup_test.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_resourcegroup_test.go index 7ed5a580396a..a44258d61860 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_resourcegroup_test.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_resourcegroup_test.go @@ -187,3 +187,18 @@ func TestParseResourceGroupIDInsensitively(t *testing.T) { } } + +func TestSegmentsForResourceGroupId(t *testing.T) { + segments := ResourceGroupId{}.Segments() + if len(segments) == 0 { + t.Fatalf("ResourceGroupId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_subscription.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_subscription.go index 4b126aba9c78..59eaf25c68d5 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_subscription.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_subscription.go @@ -82,7 +82,7 @@ func (id SubscriptionId) ID() string { // Segments returns a slice of Resource ID Segments which comprise this Subscription ID func (id SubscriptionId) Segments() []resourceids.Segment { return []resourceids.Segment{ - resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"), + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), } } diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_subscription_test.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_subscription_test.go index a9d6a2485878..9473a2e3b9f9 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_subscription_test.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_subscription_test.go @@ -142,3 +142,18 @@ func TestParseSubscriptionIDInsensitively(t *testing.T) { } } + +func TestSegmentsForSubscriptionId(t *testing.T) { + segments := SubscriptionId{}.Segments() + if len(segments) == 0 { + t.Fatalf("SubscriptionId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_video.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_video.go index c8f04b34f21a..c6139ec3b383 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_video.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_video.go @@ -112,15 +112,15 @@ func (id VideoId) ID() string { // Segments returns a slice of Resource ID Segments which comprise this Video ID func (id VideoId) Segments() []resourceids.Segment { return []resourceids.Segment{ - resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"), + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("providers", "providers", "providers"), - resourceids.ResourceProviderSegment("microsoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("videoAnalyzers", "videoAnalyzers", "videoAnalyzers"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), + resourceids.StaticSegment("staticVideoAnalyzers", "videoAnalyzers", "videoAnalyzers"), resourceids.UserSpecifiedSegment("accountName", "accountValue"), - resourceids.StaticSegment("videos", "videos", "videos"), + resourceids.StaticSegment("staticVideos", "videos", "videos"), resourceids.UserSpecifiedSegment("videoName", "videoValue"), } } diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_video_test.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_video_test.go index df63656c71b6..2b73e8fac7fd 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_video_test.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_video_test.go @@ -307,3 +307,18 @@ func TestParseVideoIDInsensitively(t *testing.T) { } } + +func TestSegmentsForVideoId(t *testing.T) { + segments := VideoId{}.Segments() + if len(segments) == 0 { + t.Fatalf("VideoId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_videoanalyzer.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_videoanalyzer.go index c0372f29fa74..8eba6a0e47cc 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_videoanalyzer.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_videoanalyzer.go @@ -102,13 +102,13 @@ func (id VideoAnalyzerId) ID() string { // Segments returns a slice of Resource ID Segments which comprise this Video Analyzer ID func (id VideoAnalyzerId) Segments() []resourceids.Segment { return []resourceids.Segment{ - resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"), + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("providers", "providers", "providers"), - resourceids.ResourceProviderSegment("microsoftMedia", "Microsoft.Media", "Microsoft.Media"), - resourceids.StaticSegment("videoAnalyzers", "videoAnalyzers", "videoAnalyzers"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"), + resourceids.StaticSegment("staticVideoAnalyzers", "videoAnalyzers", "videoAnalyzers"), resourceids.UserSpecifiedSegment("accountName", "accountValue"), } } diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_videoanalyzer_test.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_videoanalyzer_test.go index 4f5b7788977f..8036b2ef2230 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_videoanalyzer_test.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_videoanalyzer_test.go @@ -262,3 +262,18 @@ func TestParseVideoAnalyzerIDInsensitively(t *testing.T) { } } + +func TestSegmentsForVideoAnalyzerId(t *testing.T) { + segments := VideoAnalyzerId{}.Segments() + if len(segments) == 0 { + t.Fatalf("VideoAnalyzerId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_ecctokenkey.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_ecctokenkey.go index 201470411287..3719b34c41b3 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_ecctokenkey.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_ecctokenkey.go @@ -5,10 +5,15 @@ import ( "fmt" ) +var _ TokenKey = EccTokenKey{} + type EccTokenKey struct { Alg AccessPolicyEccAlgo `json:"alg"` X string `json:"x"` Y string `json:"y"` + + // Fields inherited from TokenKey + Kid string `json:"kid"` } var _ json.Marshaler = EccTokenKey{} diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_edgemoduleprovisioningtoken.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_edgemoduleprovisioningtoken.go index 9509598b556d..7bdcee7c0f7a 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_edgemoduleprovisioningtoken.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_edgemoduleprovisioningtoken.go @@ -1,6 +1,24 @@ package videoanalyzer +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + type EdgeModuleProvisioningToken struct { ExpirationDate *string `json:"expirationDate,omitempty"` Token *string `json:"token,omitempty"` } + +func (o EdgeModuleProvisioningToken) GetExpirationDateAsTime() (*time.Time, error) { + if o.ExpirationDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ExpirationDate, "2006-01-02T15:04:05Z07:00") +} + +func (o EdgeModuleProvisioningToken) SetExpirationDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ExpirationDate = &formatted +} diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_jwtauthentication.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_jwtauthentication.go index 74020c7c9948..c9404467d784 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_jwtauthentication.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_jwtauthentication.go @@ -5,11 +5,15 @@ import ( "fmt" ) +var _ AuthenticationBase = JwtAuthentication{} + type JwtAuthentication struct { Audiences *[]string `json:"audiences,omitempty"` Claims *[]TokenClaim `json:"claims,omitempty"` Issuers *[]string `json:"issuers,omitempty"` Keys *[]TokenKey `json:"keys,omitempty"` + + // Fields inherited from AuthenticationBase } var _ json.Marshaler = JwtAuthentication{} diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_listprovisioningtokeninput.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_listprovisioningtokeninput.go index 373dac8e7bce..ca8b5325b6de 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_listprovisioningtokeninput.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_listprovisioningtokeninput.go @@ -1,5 +1,20 @@ package videoanalyzer +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + type ListProvisioningTokenInput struct { ExpirationDate string `json:"expirationDate"` } + +func (o ListProvisioningTokenInput) GetExpirationDateAsTime() (*time.Time, error) { + return dates.ParseAsFormat(&o.ExpirationDate, "2006-01-02T15:04:05Z07:00") +} + +func (o ListProvisioningTokenInput) SetExpirationDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ExpirationDate = formatted +} diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_rsatokenkey.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_rsatokenkey.go index 0f5873d2dfcd..b7f76314b54e 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_rsatokenkey.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_rsatokenkey.go @@ -5,10 +5,15 @@ import ( "fmt" ) +var _ TokenKey = RsaTokenKey{} + type RsaTokenKey struct { Alg AccessPolicyRsaAlgo `json:"alg"` E string `json:"e"` N string `json:"n"` + + // Fields inherited from TokenKey + Kid string `json:"kid"` } var _ json.Marshaler = RsaTokenKey{} diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_systemdata.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_systemdata.go index bec5be4825d7..d423bee06e69 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_systemdata.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_systemdata.go @@ -1,5 +1,11 @@ package videoanalyzer +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + type SystemData struct { CreatedAt *string `json:"createdAt,omitempty"` CreatedBy *string `json:"createdBy,omitempty"` @@ -8,3 +14,27 @@ type SystemData struct { LastModifiedBy *string `json:"lastModifiedBy,omitempty"` LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` } + +func (o SystemData) GetCreatedAtAsTime() (*time.Time, error) { + if o.CreatedAt == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedAt, "2006-01-02T15:04:05Z07:00") +} + +func (o SystemData) SetCreatedAtAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedAt = &formatted +} + +func (o SystemData) GetLastModifiedAtAsTime() (*time.Time, error) { + if o.LastModifiedAt == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastModifiedAt, "2006-01-02T15:04:05Z07:00") +} + +func (o SystemData) SetLastModifiedAtAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastModifiedAt = &formatted +} diff --git a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_videostreamingtoken.go b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_videostreamingtoken.go index 460df8a17f01..b8d8f55c5239 100644 --- a/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_videostreamingtoken.go +++ b/internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_videostreamingtoken.go @@ -1,6 +1,24 @@ package videoanalyzer +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + type VideoStreamingToken struct { ExpirationDate *string `json:"expirationDate,omitempty"` Token *string `json:"token,omitempty"` } + +func (o VideoStreamingToken) GetExpirationDateAsTime() (*time.Time, error) { + if o.ExpirationDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ExpirationDate, "2006-01-02T15:04:05Z07:00") +} + +func (o VideoStreamingToken) SetExpirationDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ExpirationDate = &formatted +}