Skip to content

Commit 356faf3

Browse files
author
hc-github-team-tf-azure
committed
Updating based on 2c1a6e19f
1 parent 09383c9 commit 356faf3

17 files changed

+36
-156
lines changed

resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_dataset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ func UnmarshalDatasetImplementation(input []byte) (Dataset, error) {
500500
return out, nil
501501
}
502502

503-
if strings.EqualFold(value, "LakeHouseTable") {
503+
if strings.EqualFold(value, "LakehouseTable") {
504504
var out LakeHouseTableDataset
505505
if err := json.Unmarshal(input, &out); err != nil {
506506
return nil, fmt.Errorf("unmarshaling into LakeHouseTableDataset: %+v", err)

resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_lakehouselinkedservice.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (s LakeHouseLinkedService) MarshalJSON() ([]byte, error) {
4949
return nil, fmt.Errorf("unmarshaling LakeHouseLinkedService: %+v", err)
5050
}
5151

52-
decoded["type"] = "LakeHouse"
52+
decoded["type"] = "Lakehouse"
5353

5454
encoded, err = json.Marshal(decoded)
5555
if err != nil {

resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_lakehousetabledataset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (s LakeHouseTableDataset) MarshalJSON() ([]byte, error) {
5353
return nil, fmt.Errorf("unmarshaling LakeHouseTableDataset: %+v", err)
5454
}
5555

56-
decoded["type"] = "LakeHouseTable"
56+
decoded["type"] = "LakehouseTable"
5757

5858
encoded, err = json.Marshal(decoded)
5959
if err != nil {

resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_linkedservice.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ func UnmarshalLinkedServiceImplementation(input []byte) (LinkedService, error) {
598598
return out, nil
599599
}
600600

601-
if strings.EqualFold(value, "LakeHouse") {
601+
if strings.EqualFold(value, "Lakehouse") {
602602
var out LakeHouseLinkedService
603603
if err := json.Unmarshal(input, &out); err != nil {
604604
return nil, fmt.Errorf("unmarshaling into LakeHouseLinkedService: %+v", err)

resource-manager/datafactory/2018-06-01/datasets/model_dataset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ func UnmarshalDatasetImplementation(input []byte) (Dataset, error) {
460460
return out, nil
461461
}
462462

463-
if strings.EqualFold(value, "LakeHouseTable") {
463+
if strings.EqualFold(value, "LakehouseTable") {
464464
var out LakeHouseTableDataset
465465
if err := json.Unmarshal(input, &out); err != nil {
466466
return nil, fmt.Errorf("unmarshaling into LakeHouseTableDataset: %+v", err)

resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledataset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (s LakeHouseTableDataset) MarshalJSON() ([]byte, error) {
5353
return nil, fmt.Errorf("unmarshaling LakeHouseTableDataset: %+v", err)
5454
}
5555

56-
decoded["type"] = "LakeHouseTable"
56+
decoded["type"] = "LakehouseTable"
5757

5858
encoded, err = json.Marshal(decoded)
5959
if err != nil {

resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservice.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (s LakeHouseLinkedService) MarshalJSON() ([]byte, error) {
4949
return nil, fmt.Errorf("unmarshaling LakeHouseLinkedService: %+v", err)
5050
}
5151

52-
decoded["type"] = "LakeHouse"
52+
decoded["type"] = "Lakehouse"
5353

5454
encoded, err = json.Marshal(decoded)
5555
if err != nil {

resource-manager/datafactory/2018-06-01/linkedservices/model_linkedservice.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ func UnmarshalLinkedServiceImplementation(input []byte) (LinkedService, error) {
562562
return out, nil
563563
}
564564

565-
if strings.EqualFold(value, "LakeHouse") {
565+
if strings.EqualFold(value, "Lakehouse") {
566566
var out LakeHouseLinkedService
567567
if err := json.Unmarshal(input, &out); err != nil {
568568
return nil, fmt.Errorf("unmarshaling into LakeHouseLinkedService: %+v", err)

resource-manager/postgresql/2024-08-01/replicas/constants.go

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -309,50 +309,6 @@ func parseHighAvailabilityMode(input string) (*HighAvailabilityMode, error) {
309309
return &out, nil
310310
}
311311

312-
type IdentityType string
313-
314-
const (
315-
IdentityTypeNone IdentityType = "None"
316-
IdentityTypeSystemAssigned IdentityType = "SystemAssigned"
317-
IdentityTypeUserAssigned IdentityType = "UserAssigned"
318-
)
319-
320-
func PossibleValuesForIdentityType() []string {
321-
return []string{
322-
string(IdentityTypeNone),
323-
string(IdentityTypeSystemAssigned),
324-
string(IdentityTypeUserAssigned),
325-
}
326-
}
327-
328-
func (s *IdentityType) UnmarshalJSON(bytes []byte) error {
329-
var decoded string
330-
if err := json.Unmarshal(bytes, &decoded); err != nil {
331-
return fmt.Errorf("unmarshaling: %+v", err)
332-
}
333-
out, err := parseIdentityType(decoded)
334-
if err != nil {
335-
return fmt.Errorf("parsing %q: %+v", decoded, err)
336-
}
337-
*s = *out
338-
return nil
339-
}
340-
341-
func parseIdentityType(input string) (*IdentityType, error) {
342-
vals := map[string]IdentityType{
343-
"none": IdentityTypeNone,
344-
"systemassigned": IdentityTypeSystemAssigned,
345-
"userassigned": IdentityTypeUserAssigned,
346-
}
347-
if v, ok := vals[strings.ToLower(input)]; ok {
348-
return &v, nil
349-
}
350-
351-
// otherwise presume it's an undefined value and best-effort it
352-
out := IdentityType(input)
353-
return &out, nil
354-
}
355-
356312
type KeyStatusEnum string
357313

358314
const (
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
package replicas
22

33
import (
4+
"github.com/hashicorp/go-azure-helpers/resourcemanager/identity"
45
"github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata"
56
)
67

78
// Copyright (c) Microsoft Corporation. All rights reserved.
89
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
910

1011
type Server struct {
11-
Id *string `json:"id,omitempty"`
12-
Identity *UserAssignedIdentity `json:"identity,omitempty"`
13-
Location string `json:"location"`
14-
Name *string `json:"name,omitempty"`
15-
Properties *ServerProperties `json:"properties,omitempty"`
16-
Sku *Sku `json:"sku,omitempty"`
17-
SystemData *systemdata.SystemData `json:"systemData,omitempty"`
18-
Tags *map[string]string `json:"tags,omitempty"`
19-
Type *string `json:"type,omitempty"`
12+
Id *string `json:"id,omitempty"`
13+
Identity *identity.SystemOrUserAssignedMap `json:"identity,omitempty"`
14+
Location string `json:"location"`
15+
Name *string `json:"name,omitempty"`
16+
Properties *ServerProperties `json:"properties,omitempty"`
17+
Sku *Sku `json:"sku,omitempty"`
18+
SystemData *systemdata.SystemData `json:"systemData,omitempty"`
19+
Tags *map[string]string `json:"tags,omitempty"`
20+
Type *string `json:"type,omitempty"`
2021
}

0 commit comments

Comments
 (0)