Skip to content

Commit ef67b84

Browse files
videoanalyzer: updating to the latest embedded sdk
1 parent cfa47b7 commit ef67b84

21 files changed

+230
-30
lines changed

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_accesspolicies.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ func (id AccessPoliciesId) ID() string {
112112
// Segments returns a slice of Resource ID Segments which comprise this Access Policies ID
113113
func (id AccessPoliciesId) Segments() []resourceids.Segment {
114114
return []resourceids.Segment{
115-
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
115+
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
116116
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
117-
resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"),
117+
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
118118
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
119-
resourceids.StaticSegment("providers", "providers", "providers"),
120-
resourceids.ResourceProviderSegment("microsoftMedia", "Microsoft.Media", "Microsoft.Media"),
121-
resourceids.StaticSegment("videoAnalyzers", "videoAnalyzers", "videoAnalyzers"),
119+
resourceids.StaticSegment("staticProviders", "providers", "providers"),
120+
resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"),
121+
resourceids.StaticSegment("staticVideoAnalyzers", "videoAnalyzers", "videoAnalyzers"),
122122
resourceids.UserSpecifiedSegment("accountName", "accountValue"),
123-
resourceids.StaticSegment("accessPolicies", "accessPolicies", "accessPolicies"),
123+
resourceids.StaticSegment("staticAccessPolicies", "accessPolicies", "accessPolicies"),
124124
resourceids.UserSpecifiedSegment("accessPolicyName", "accessPolicyValue"),
125125
}
126126
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_accesspolicies_test.go

+15
Original file line numberDiff line numberDiff line change
@@ -307,3 +307,18 @@ func TestParseAccessPoliciesIDInsensitively(t *testing.T) {
307307

308308
}
309309
}
310+
311+
func TestSegmentsForAccessPoliciesId(t *testing.T) {
312+
segments := AccessPoliciesId{}.Segments()
313+
if len(segments) == 0 {
314+
t.Fatalf("AccessPoliciesId has no segments")
315+
}
316+
317+
uniqueNames := make(map[string]struct{}, 0)
318+
for _, segment := range segments {
319+
uniqueNames[segment.Name] = struct{}{}
320+
}
321+
if len(uniqueNames) != len(segments) {
322+
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
323+
}
324+
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_edgemodule.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ func (id EdgeModuleId) ID() string {
112112
// Segments returns a slice of Resource ID Segments which comprise this Edge Module ID
113113
func (id EdgeModuleId) Segments() []resourceids.Segment {
114114
return []resourceids.Segment{
115-
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
115+
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
116116
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
117-
resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"),
117+
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
118118
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
119-
resourceids.StaticSegment("providers", "providers", "providers"),
120-
resourceids.ResourceProviderSegment("microsoftMedia", "Microsoft.Media", "Microsoft.Media"),
121-
resourceids.StaticSegment("videoAnalyzers", "videoAnalyzers", "videoAnalyzers"),
119+
resourceids.StaticSegment("staticProviders", "providers", "providers"),
120+
resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"),
121+
resourceids.StaticSegment("staticVideoAnalyzers", "videoAnalyzers", "videoAnalyzers"),
122122
resourceids.UserSpecifiedSegment("accountName", "accountValue"),
123-
resourceids.StaticSegment("edgeModules", "edgeModules", "edgeModules"),
123+
resourceids.StaticSegment("staticEdgeModules", "edgeModules", "edgeModules"),
124124
resourceids.UserSpecifiedSegment("edgeModuleName", "edgeModuleValue"),
125125
}
126126
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_edgemodule_test.go

+15
Original file line numberDiff line numberDiff line change
@@ -307,3 +307,18 @@ func TestParseEdgeModuleIDInsensitively(t *testing.T) {
307307

308308
}
309309
}
310+
311+
func TestSegmentsForEdgeModuleId(t *testing.T) {
312+
segments := EdgeModuleId{}.Segments()
313+
if len(segments) == 0 {
314+
t.Fatalf("EdgeModuleId has no segments")
315+
}
316+
317+
uniqueNames := make(map[string]struct{}, 0)
318+
for _, segment := range segments {
319+
uniqueNames[segment.Name] = struct{}{}
320+
}
321+
if len(uniqueNames) != len(segments) {
322+
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
323+
}
324+
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_location.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ func (id LocationId) ID() string {
9292
// Segments returns a slice of Resource ID Segments which comprise this Location ID
9393
func (id LocationId) Segments() []resourceids.Segment {
9494
return []resourceids.Segment{
95-
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
95+
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
9696
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
97-
resourceids.StaticSegment("providers", "providers", "providers"),
98-
resourceids.ResourceProviderSegment("microsoftMedia", "Microsoft.Media", "Microsoft.Media"),
99-
resourceids.StaticSegment("locations", "locations", "locations"),
97+
resourceids.StaticSegment("staticProviders", "providers", "providers"),
98+
resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"),
99+
resourceids.StaticSegment("staticLocations", "locations", "locations"),
100100
resourceids.UserSpecifiedSegment("locationName", "locationValue"),
101101
}
102102
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_location_test.go

+15
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,18 @@ func TestParseLocationIDInsensitively(t *testing.T) {
217217

218218
}
219219
}
220+
221+
func TestSegmentsForLocationId(t *testing.T) {
222+
segments := LocationId{}.Segments()
223+
if len(segments) == 0 {
224+
t.Fatalf("LocationId has no segments")
225+
}
226+
227+
uniqueNames := make(map[string]struct{}, 0)
228+
for _, segment := range segments {
229+
uniqueNames[segment.Name] = struct{}{}
230+
}
231+
if len(uniqueNames) != len(segments) {
232+
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
233+
}
234+
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_resourcegroup.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ func (id ResourceGroupId) ID() string {
9292
// Segments returns a slice of Resource ID Segments which comprise this Resource Group ID
9393
func (id ResourceGroupId) Segments() []resourceids.Segment {
9494
return []resourceids.Segment{
95-
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
95+
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
9696
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
97-
resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"),
97+
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
9898
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
9999
}
100100
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_resourcegroup_test.go

+15
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,18 @@ func TestParseResourceGroupIDInsensitively(t *testing.T) {
187187

188188
}
189189
}
190+
191+
func TestSegmentsForResourceGroupId(t *testing.T) {
192+
segments := ResourceGroupId{}.Segments()
193+
if len(segments) == 0 {
194+
t.Fatalf("ResourceGroupId has no segments")
195+
}
196+
197+
uniqueNames := make(map[string]struct{}, 0)
198+
for _, segment := range segments {
199+
uniqueNames[segment.Name] = struct{}{}
200+
}
201+
if len(uniqueNames) != len(segments) {
202+
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
203+
}
204+
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_subscription.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (id SubscriptionId) ID() string {
8282
// Segments returns a slice of Resource ID Segments which comprise this Subscription ID
8383
func (id SubscriptionId) Segments() []resourceids.Segment {
8484
return []resourceids.Segment{
85-
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
85+
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
8686
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
8787
}
8888
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_subscription_test.go

+15
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,18 @@ func TestParseSubscriptionIDInsensitively(t *testing.T) {
142142

143143
}
144144
}
145+
146+
func TestSegmentsForSubscriptionId(t *testing.T) {
147+
segments := SubscriptionId{}.Segments()
148+
if len(segments) == 0 {
149+
t.Fatalf("SubscriptionId has no segments")
150+
}
151+
152+
uniqueNames := make(map[string]struct{}, 0)
153+
for _, segment := range segments {
154+
uniqueNames[segment.Name] = struct{}{}
155+
}
156+
if len(uniqueNames) != len(segments) {
157+
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
158+
}
159+
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_video.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ func (id VideoId) ID() string {
112112
// Segments returns a slice of Resource ID Segments which comprise this Video ID
113113
func (id VideoId) Segments() []resourceids.Segment {
114114
return []resourceids.Segment{
115-
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
115+
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
116116
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
117-
resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"),
117+
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
118118
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
119-
resourceids.StaticSegment("providers", "providers", "providers"),
120-
resourceids.ResourceProviderSegment("microsoftMedia", "Microsoft.Media", "Microsoft.Media"),
121-
resourceids.StaticSegment("videoAnalyzers", "videoAnalyzers", "videoAnalyzers"),
119+
resourceids.StaticSegment("staticProviders", "providers", "providers"),
120+
resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"),
121+
resourceids.StaticSegment("staticVideoAnalyzers", "videoAnalyzers", "videoAnalyzers"),
122122
resourceids.UserSpecifiedSegment("accountName", "accountValue"),
123-
resourceids.StaticSegment("videos", "videos", "videos"),
123+
resourceids.StaticSegment("staticVideos", "videos", "videos"),
124124
resourceids.UserSpecifiedSegment("videoName", "videoValue"),
125125
}
126126
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_video_test.go

+15
Original file line numberDiff line numberDiff line change
@@ -307,3 +307,18 @@ func TestParseVideoIDInsensitively(t *testing.T) {
307307

308308
}
309309
}
310+
311+
func TestSegmentsForVideoId(t *testing.T) {
312+
segments := VideoId{}.Segments()
313+
if len(segments) == 0 {
314+
t.Fatalf("VideoId has no segments")
315+
}
316+
317+
uniqueNames := make(map[string]struct{}, 0)
318+
for _, segment := range segments {
319+
uniqueNames[segment.Name] = struct{}{}
320+
}
321+
if len(uniqueNames) != len(segments) {
322+
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
323+
}
324+
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_videoanalyzer.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ func (id VideoAnalyzerId) ID() string {
102102
// Segments returns a slice of Resource ID Segments which comprise this Video Analyzer ID
103103
func (id VideoAnalyzerId) Segments() []resourceids.Segment {
104104
return []resourceids.Segment{
105-
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
105+
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
106106
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
107-
resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"),
107+
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
108108
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
109-
resourceids.StaticSegment("providers", "providers", "providers"),
110-
resourceids.ResourceProviderSegment("microsoftMedia", "Microsoft.Media", "Microsoft.Media"),
111-
resourceids.StaticSegment("videoAnalyzers", "videoAnalyzers", "videoAnalyzers"),
109+
resourceids.StaticSegment("staticProviders", "providers", "providers"),
110+
resourceids.ResourceProviderSegment("staticMicrosoftMedia", "Microsoft.Media", "Microsoft.Media"),
111+
resourceids.StaticSegment("staticVideoAnalyzers", "videoAnalyzers", "videoAnalyzers"),
112112
resourceids.UserSpecifiedSegment("accountName", "accountValue"),
113113
}
114114
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/id_videoanalyzer_test.go

+15
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,18 @@ func TestParseVideoAnalyzerIDInsensitively(t *testing.T) {
262262

263263
}
264264
}
265+
266+
func TestSegmentsForVideoAnalyzerId(t *testing.T) {
267+
segments := VideoAnalyzerId{}.Segments()
268+
if len(segments) == 0 {
269+
t.Fatalf("VideoAnalyzerId has no segments")
270+
}
271+
272+
uniqueNames := make(map[string]struct{}, 0)
273+
for _, segment := range segments {
274+
uniqueNames[segment.Name] = struct{}{}
275+
}
276+
if len(uniqueNames) != len(segments) {
277+
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
278+
}
279+
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_ecctokenkey.go

+5
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ import (
55
"fmt"
66
)
77

8+
var _ TokenKey = EccTokenKey{}
9+
810
type EccTokenKey struct {
911
Alg AccessPolicyEccAlgo `json:"alg"`
1012
X string `json:"x"`
1113
Y string `json:"y"`
14+
15+
// Fields inherited from TokenKey
16+
Kid string `json:"kid"`
1217
}
1318

1419
var _ json.Marshaler = EccTokenKey{}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
package videoanalyzer
22

3+
import (
4+
"time"
5+
6+
"github.com/hashicorp/go-azure-helpers/lang/dates"
7+
)
8+
39
type EdgeModuleProvisioningToken struct {
410
ExpirationDate *string `json:"expirationDate,omitempty"`
511
Token *string `json:"token,omitempty"`
612
}
13+
14+
func (o EdgeModuleProvisioningToken) GetExpirationDateAsTime() (*time.Time, error) {
15+
if o.ExpirationDate == nil {
16+
return nil, nil
17+
}
18+
return dates.ParseAsFormat(o.ExpirationDate, "2006-01-02T15:04:05Z07:00")
19+
}
20+
21+
func (o EdgeModuleProvisioningToken) SetExpirationDateAsTime(input time.Time) {
22+
formatted := input.Format("2006-01-02T15:04:05Z07:00")
23+
o.ExpirationDate = &formatted
24+
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_jwtauthentication.go

+4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ import (
55
"fmt"
66
)
77

8+
var _ AuthenticationBase = JwtAuthentication{}
9+
810
type JwtAuthentication struct {
911
Audiences *[]string `json:"audiences,omitempty"`
1012
Claims *[]TokenClaim `json:"claims,omitempty"`
1113
Issuers *[]string `json:"issuers,omitempty"`
1214
Keys *[]TokenKey `json:"keys,omitempty"`
15+
16+
// Fields inherited from AuthenticationBase
1317
}
1418

1519
var _ json.Marshaler = JwtAuthentication{}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
package videoanalyzer
22

3+
import (
4+
"time"
5+
6+
"github.com/hashicorp/go-azure-helpers/lang/dates"
7+
)
8+
39
type ListProvisioningTokenInput struct {
410
ExpirationDate string `json:"expirationDate"`
511
}
12+
13+
func (o ListProvisioningTokenInput) GetExpirationDateAsTime() (*time.Time, error) {
14+
return dates.ParseAsFormat(&o.ExpirationDate, "2006-01-02T15:04:05Z07:00")
15+
}
16+
17+
func (o ListProvisioningTokenInput) SetExpirationDateAsTime(input time.Time) {
18+
formatted := input.Format("2006-01-02T15:04:05Z07:00")
19+
o.ExpirationDate = formatted
20+
}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_rsatokenkey.go

+5
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ import (
55
"fmt"
66
)
77

8+
var _ TokenKey = RsaTokenKey{}
9+
810
type RsaTokenKey struct {
911
Alg AccessPolicyRsaAlgo `json:"alg"`
1012
E string `json:"e"`
1113
N string `json:"n"`
14+
15+
// Fields inherited from TokenKey
16+
Kid string `json:"kid"`
1217
}
1318

1419
var _ json.Marshaler = RsaTokenKey{}

internal/services/videoanalyzer/sdk/2021-05-01-preview/videoanalyzer/model_systemdata.go

+30
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package videoanalyzer
22

3+
import (
4+
"time"
5+
6+
"github.com/hashicorp/go-azure-helpers/lang/dates"
7+
)
8+
39
type SystemData struct {
410
CreatedAt *string `json:"createdAt,omitempty"`
511
CreatedBy *string `json:"createdBy,omitempty"`
@@ -8,3 +14,27 @@ type SystemData struct {
814
LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
915
LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
1016
}
17+
18+
func (o SystemData) GetCreatedAtAsTime() (*time.Time, error) {
19+
if o.CreatedAt == nil {
20+
return nil, nil
21+
}
22+
return dates.ParseAsFormat(o.CreatedAt, "2006-01-02T15:04:05Z07:00")
23+
}
24+
25+
func (o SystemData) SetCreatedAtAsTime(input time.Time) {
26+
formatted := input.Format("2006-01-02T15:04:05Z07:00")
27+
o.CreatedAt = &formatted
28+
}
29+
30+
func (o SystemData) GetLastModifiedAtAsTime() (*time.Time, error) {
31+
if o.LastModifiedAt == nil {
32+
return nil, nil
33+
}
34+
return dates.ParseAsFormat(o.LastModifiedAt, "2006-01-02T15:04:05Z07:00")
35+
}
36+
37+
func (o SystemData) SetLastModifiedAtAsTime(input time.Time) {
38+
formatted := input.Format("2006-01-02T15:04:05Z07:00")
39+
o.LastModifiedAt = &formatted
40+
}

0 commit comments

Comments
 (0)