diff --git a/resource-manager/datadog/2023-01-01/createresource/README.md b/resource-manager/datadog/2023-01-01/createresource/README.md index 2ff09463f2a..028e663bbe4 100644 --- a/resource-manager/datadog/2023-01-01/createresource/README.md +++ b/resource-manager/datadog/2023-01-01/createresource/README.md @@ -43,11 +43,12 @@ if model := read.Model; model != nil { ctx := context.TODO() id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") -read, err := client.CreationSupportedList(ctx, id, createresource.DefaultCreationSupportedListOperationOptions()) +// alternatively `client.CreationSupportedList(ctx, id, createresource.DefaultCreationSupportedListOperationOptions())` can be used to do batched pagination +items, err := client.CreationSupportedListComplete(ctx, id, createresource.DefaultCreationSupportedListOperationOptions()) if err != nil { // handle the error } -if model := read.Model; model != nil { - // do something with the model/response object +for _, item := range items { + // do something } ``` diff --git a/resource-manager/datadog/2023-01-01/createresource/method_creationsupportedlist.go b/resource-manager/datadog/2023-01-01/createresource/method_creationsupportedlist.go index 41b7075e70f..5d480a660e4 100644 --- a/resource-manager/datadog/2023-01-01/createresource/method_creationsupportedlist.go +++ b/resource-manager/datadog/2023-01-01/createresource/method_creationsupportedlist.go @@ -16,7 +16,12 @@ import ( type CreationSupportedListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *CreateResourceSupportedResponseList + Model *[]CreateResourceSupportedResponse +} + +type CreationSupportedListCompleteResult struct { + LatestHttpResponse *http.Response + Items []CreateResourceSupportedResponse } type CreationSupportedListOperationOptions struct { @@ -47,6 +52,18 @@ func (o CreationSupportedListOperationOptions) ToQuery() *client.QueryParams { return &out } +type CreationSupportedListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *CreationSupportedListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + // CreationSupportedList ... func (c CreateResourceClient) CreationSupportedList(ctx context.Context, id commonids.SubscriptionId, options CreationSupportedListOperationOptions) (result CreationSupportedListOperationResponse, err error) { opts := client.RequestOptions{ @@ -56,6 +73,7 @@ func (c CreateResourceClient) CreationSupportedList(ctx context.Context, id comm }, HttpMethod: http.MethodGet, OptionsObject: options, + Pager: &CreationSupportedListCustomPager{}, Path: fmt.Sprintf("%s/providers/Microsoft.Datadog/subscriptionStatuses", id.ID()), } @@ -65,7 +83,7 @@ func (c CreateResourceClient) CreationSupportedList(ctx context.Context, id comm } var resp *client.Response - resp, err = req.Execute(ctx) + resp, err = req.ExecutePaged(ctx) if resp != nil { result.OData = resp.OData result.HttpResponse = resp.Response @@ -74,11 +92,44 @@ func (c CreateResourceClient) CreationSupportedList(ctx context.Context, id comm return } - var model CreateResourceSupportedResponseList - result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { + var values struct { + Values *[]CreateResourceSupportedResponse `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { return } + result.Model = values.Values + + return +} + +// CreationSupportedListComplete retrieves all the results into a single object +func (c CreateResourceClient) CreationSupportedListComplete(ctx context.Context, id commonids.SubscriptionId, options CreationSupportedListOperationOptions) (CreationSupportedListCompleteResult, error) { + return c.CreationSupportedListCompleteMatchingPredicate(ctx, id, options, CreateResourceSupportedResponseOperationPredicate{}) +} + +// CreationSupportedListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c CreateResourceClient) CreationSupportedListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options CreationSupportedListOperationOptions, predicate CreateResourceSupportedResponseOperationPredicate) (result CreationSupportedListCompleteResult, err error) { + items := make([]CreateResourceSupportedResponse, 0) + + resp, err := c.CreationSupportedList(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = CreationSupportedListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/datadog/2023-01-01/createresource/predicates.go b/resource-manager/datadog/2023-01-01/createresource/predicates.go new file mode 100644 index 00000000000..6d0aee3581f --- /dev/null +++ b/resource-manager/datadog/2023-01-01/createresource/predicates.go @@ -0,0 +1,12 @@ +package createresource + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateResourceSupportedResponseOperationPredicate struct { +} + +func (p CreateResourceSupportedResponseOperationPredicate) Matches(input CreateResourceSupportedResponse) bool { + + return true +} diff --git a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/README.md b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/README.md index 33a20049004..0ca437ecc75 100644 --- a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/README.md +++ b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/README.md @@ -71,12 +71,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := monitoredsubscriptions.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorName") -read, err := client.List(ctx, id) +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) if err != nil { // handle the error } -if model := read.Model; model != nil { - // do something with the model/response object +for _, item := range items { + // do something } ``` diff --git a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/method_list.go b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/method_list.go index dc41d74e5d3..0b2feef2399 100644 --- a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/method_list.go +++ b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/method_list.go @@ -15,7 +15,24 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *MonitoredSubscriptionPropertiesList + Model *[]MonitoredSubscriptionProperties +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []MonitoredSubscriptionProperties +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink } // List ... @@ -26,6 +43,7 @@ func (c MonitoredSubscriptionsClient) List(ctx context.Context, id MonitorId) (r http.StatusOK, }, HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, Path: fmt.Sprintf("%s/monitoredSubscriptions", id.ID()), } @@ -35,7 +53,7 @@ func (c MonitoredSubscriptionsClient) List(ctx context.Context, id MonitorId) (r } var resp *client.Response - resp, err = req.Execute(ctx) + resp, err = req.ExecutePaged(ctx) if resp != nil { result.OData = resp.OData result.HttpResponse = resp.Response @@ -44,11 +62,44 @@ func (c MonitoredSubscriptionsClient) List(ctx context.Context, id MonitorId) (r return } - var model MonitoredSubscriptionPropertiesList - result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { + var values struct { + Values *[]MonitoredSubscriptionProperties `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { return } + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c MonitoredSubscriptionsClient) ListComplete(ctx context.Context, id MonitorId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, MonitoredSubscriptionPropertiesOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c MonitoredSubscriptionsClient) ListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredSubscriptionPropertiesOperationPredicate) (result ListCompleteResult, err error) { + items := make([]MonitoredSubscriptionProperties, 0) + + resp, err := c.List(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/predicates.go b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/predicates.go new file mode 100644 index 00000000000..e2d724249cb --- /dev/null +++ b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/predicates.go @@ -0,0 +1,27 @@ +package monitoredsubscriptions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MonitoredSubscriptionPropertiesOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p MonitoredSubscriptionPropertiesOperationPredicate) Matches(input MonitoredSubscriptionProperties) 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/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_sapodplinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_sapodplinkedservicetypeproperties.go index 5be9d837145..f376a5e51d7 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_sapodplinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_sapodplinkedservicetypeproperties.go @@ -18,7 +18,7 @@ type SapOdpLinkedServiceTypeProperties struct { Password SecretBase `json:"password"` Server *string `json:"server,omitempty"` SncLibraryPath *string `json:"sncLibraryPath,omitempty"` - SncMode *string `json:"sncMode,omitempty"` + SncMode *bool `json:"sncMode,omitempty"` SncMyName *string `json:"sncMyName,omitempty"` SncPartnerName *string `json:"sncPartnerName,omitempty"` SncQop *string `json:"sncQop,omitempty"` @@ -41,7 +41,7 @@ func (s *SapOdpLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { MessageServerService *string `json:"messageServerService,omitempty"` Server *string `json:"server,omitempty"` SncLibraryPath *string `json:"sncLibraryPath,omitempty"` - SncMode *string `json:"sncMode,omitempty"` + SncMode *bool `json:"sncMode,omitempty"` SncMyName *string `json:"sncMyName,omitempty"` SncPartnerName *string `json:"sncPartnerName,omitempty"` SncQop *string `json:"sncQop,omitempty"` diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_saptablelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_saptablelinkedservicetypeproperties.go index 15c5eb9d256..49b9c8c2e41 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_saptablelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_saptablelinkedservicetypeproperties.go @@ -18,7 +18,7 @@ type SapTableLinkedServiceTypeProperties struct { Password SecretBase `json:"password"` Server *string `json:"server,omitempty"` SncLibraryPath *string `json:"sncLibraryPath,omitempty"` - SncMode *string `json:"sncMode,omitempty"` + SncMode *bool `json:"sncMode,omitempty"` SncMyName *string `json:"sncMyName,omitempty"` SncPartnerName *string `json:"sncPartnerName,omitempty"` SncQop *string `json:"sncQop,omitempty"` @@ -39,7 +39,7 @@ func (s *SapTableLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error MessageServerService *string `json:"messageServerService,omitempty"` Server *string `json:"server,omitempty"` SncLibraryPath *string `json:"sncLibraryPath,omitempty"` - SncMode *string `json:"sncMode,omitempty"` + SncMode *bool `json:"sncMode,omitempty"` SncMyName *string `json:"sncMyName,omitempty"` SncPartnerName *string `json:"sncPartnerName,omitempty"` SncQop *string `json:"sncQop,omitempty"` diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservicetypeproperties.go index 83462caba38..bac4a98b216 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservicetypeproperties.go @@ -18,7 +18,7 @@ type SapOdpLinkedServiceTypeProperties struct { Password SecretBase `json:"password"` Server *string `json:"server,omitempty"` SncLibraryPath *string `json:"sncLibraryPath,omitempty"` - SncMode *string `json:"sncMode,omitempty"` + SncMode *bool `json:"sncMode,omitempty"` SncMyName *string `json:"sncMyName,omitempty"` SncPartnerName *string `json:"sncPartnerName,omitempty"` SncQop *string `json:"sncQop,omitempty"` @@ -41,7 +41,7 @@ func (s *SapOdpLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { MessageServerService *string `json:"messageServerService,omitempty"` Server *string `json:"server,omitempty"` SncLibraryPath *string `json:"sncLibraryPath,omitempty"` - SncMode *string `json:"sncMode,omitempty"` + SncMode *bool `json:"sncMode,omitempty"` SncMyName *string `json:"sncMyName,omitempty"` SncPartnerName *string `json:"sncPartnerName,omitempty"` SncQop *string `json:"sncQop,omitempty"` diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservicetypeproperties.go index 6884fde51ea..6f795a2dbe3 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservicetypeproperties.go @@ -18,7 +18,7 @@ type SapTableLinkedServiceTypeProperties struct { Password SecretBase `json:"password"` Server *string `json:"server,omitempty"` SncLibraryPath *string `json:"sncLibraryPath,omitempty"` - SncMode *string `json:"sncMode,omitempty"` + SncMode *bool `json:"sncMode,omitempty"` SncMyName *string `json:"sncMyName,omitempty"` SncPartnerName *string `json:"sncPartnerName,omitempty"` SncQop *string `json:"sncQop,omitempty"` @@ -39,7 +39,7 @@ func (s *SapTableLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error MessageServerService *string `json:"messageServerService,omitempty"` Server *string `json:"server,omitempty"` SncLibraryPath *string `json:"sncLibraryPath,omitempty"` - SncMode *string `json:"sncMode,omitempty"` + SncMode *bool `json:"sncMode,omitempty"` SncMyName *string `json:"sncMyName,omitempty"` SncPartnerName *string `json:"sncPartnerName,omitempty"` SncQop *string `json:"sncQop,omitempty"` diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivitytypeproperties.go index 0bd14c302c7..a21fc8076ce 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivitytypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivitytypeproperties.go @@ -5,6 +5,7 @@ package pipelines type ScriptActivityTypeProperties struct { LogSettings *ScriptActivityTypePropertiesLogSettings `json:"logSettings,omitempty"` + ReturnMultistatementResult *bool `json:"returnMultistatementResult,omitempty"` ScriptBlockExecutionTimeout *string `json:"scriptBlockExecutionTimeout,omitempty"` Scripts *[]ScriptActivityScriptBlock `json:"scripts,omitempty"` } diff --git a/resource-manager/devopsinfrastructure/2024-10-19/pools/README.md b/resource-manager/devopsinfrastructure/2024-10-19/pools/README.md index 3fd1ec923aa..b2967c942d1 100644 --- a/resource-manager/devopsinfrastructure/2024-10-19/pools/README.md +++ b/resource-manager/devopsinfrastructure/2024-10-19/pools/README.md @@ -21,6 +21,27 @@ client.Client.Authorizer = authorizer ``` +### Example Usage: `PoolsClient.CheckNameAvailability` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +payload := pools.CheckNameAvailability{ + // ... +} + + +read, err := client.CheckNameAvailability(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + ### Example Usage: `PoolsClient.CreateOrUpdate` ```go diff --git a/resource-manager/devopsinfrastructure/2024-10-19/pools/constants.go b/resource-manager/devopsinfrastructure/2024-10-19/pools/constants.go index e311ee19900..7c01c280dbb 100644 --- a/resource-manager/devopsinfrastructure/2024-10-19/pools/constants.go +++ b/resource-manager/devopsinfrastructure/2024-10-19/pools/constants.go @@ -9,6 +9,47 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type AvailabilityStatus string + +const ( + AvailabilityStatusAvailable AvailabilityStatus = "Available" + AvailabilityStatusUnavailable AvailabilityStatus = "Unavailable" +) + +func PossibleValuesForAvailabilityStatus() []string { + return []string{ + string(AvailabilityStatusAvailable), + string(AvailabilityStatusUnavailable), + } +} + +func (s *AvailabilityStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAvailabilityStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAvailabilityStatus(input string) (*AvailabilityStatus, error) { + vals := map[string]AvailabilityStatus{ + "available": AvailabilityStatusAvailable, + "unavailable": AvailabilityStatusUnavailable, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AvailabilityStatus(input) + return &out, nil +} + type AzureDevOpsPermissionType string const ( @@ -97,6 +138,85 @@ func parseCachingType(input string) (*CachingType, error) { return &out, nil } +type CheckNameAvailabilityReason string + +const ( + CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" + CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" +) + +func PossibleValuesForCheckNameAvailabilityReason() []string { + return []string{ + string(CheckNameAvailabilityReasonAlreadyExists), + string(CheckNameAvailabilityReasonInvalid), + } +} + +func (s *CheckNameAvailabilityReason) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCheckNameAvailabilityReason(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCheckNameAvailabilityReason(input string) (*CheckNameAvailabilityReason, error) { + vals := map[string]CheckNameAvailabilityReason{ + "alreadyexists": CheckNameAvailabilityReasonAlreadyExists, + "invalid": CheckNameAvailabilityReasonInvalid, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CheckNameAvailabilityReason(input) + return &out, nil +} + +type DevOpsInfrastructureResourceType string + +const ( + DevOpsInfrastructureResourceTypeMicrosoftPointDevOpsInfrastructurePools DevOpsInfrastructureResourceType = "Microsoft.DevOpsInfrastructure/pools" +) + +func PossibleValuesForDevOpsInfrastructureResourceType() []string { + return []string{ + string(DevOpsInfrastructureResourceTypeMicrosoftPointDevOpsInfrastructurePools), + } +} + +func (s *DevOpsInfrastructureResourceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDevOpsInfrastructureResourceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDevOpsInfrastructureResourceType(input string) (*DevOpsInfrastructureResourceType, error) { + vals := map[string]DevOpsInfrastructureResourceType{ + "microsoft.devopsinfrastructure/pools": DevOpsInfrastructureResourceTypeMicrosoftPointDevOpsInfrastructurePools, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DevOpsInfrastructureResourceType(input) + return &out, nil +} + type LogonType string const ( diff --git a/resource-manager/devopsinfrastructure/2024-10-19/pools/method_checknameavailability.go b/resource-manager/devopsinfrastructure/2024-10-19/pools/method_checknameavailability.go new file mode 100644 index 00000000000..ac113c41a89 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-10-19/pools/method_checknameavailability.go @@ -0,0 +1,59 @@ +package pools + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CheckNameAvailabilityResult +} + +// CheckNameAvailability ... +func (c PoolsClient) CheckNameAvailability(ctx context.Context, id commonids.SubscriptionId, input CheckNameAvailability) (result CheckNameAvailabilityOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/providers/Microsoft.DevOpsInfrastructure/checkNameAvailability", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model CheckNameAvailabilityResult + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/devopsinfrastructure/2024-10-19/pools/model_checknameavailability.go b/resource-manager/devopsinfrastructure/2024-10-19/pools/model_checknameavailability.go new file mode 100644 index 00000000000..443cbd49032 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-10-19/pools/model_checknameavailability.go @@ -0,0 +1,9 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailability struct { + Name string `json:"name"` + Type DevOpsInfrastructureResourceType `json:"type"` +} diff --git a/resource-manager/devopsinfrastructure/2024-10-19/pools/model_checknameavailabilityresult.go b/resource-manager/devopsinfrastructure/2024-10-19/pools/model_checknameavailabilityresult.go new file mode 100644 index 00000000000..7506c4e2270 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-10-19/pools/model_checknameavailabilityresult.go @@ -0,0 +1,11 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityResult struct { + Available AvailabilityStatus `json:"available"` + Message string `json:"message"` + Name string `json:"name"` + Reason CheckNameAvailabilityReason `json:"reason"` +} diff --git a/resource-manager/machinelearningservices/2024-10-01-preview/quota/README.md b/resource-manager/machinelearningservices/2024-10-01-preview/quota/README.md index 904acc9c9ef..d1f8a7ea650 100644 --- a/resource-manager/machinelearningservices/2024-10-01-preview/quota/README.md +++ b/resource-manager/machinelearningservices/2024-10-01-preview/quota/README.md @@ -37,6 +37,56 @@ for _, item := range items { ``` +### Example Usage: `QuotaClient.PTUQuotaGetAvailable` + +```go +ctx := context.TODO() +id := quota.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") + +read, err := client.PTUQuotaGetAvailable(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `QuotaClient.PTUQuotaList` + +```go +ctx := context.TODO() +id := quota.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") + +// alternatively `client.PTUQuotaList(ctx, id, quota.DefaultPTUQuotaListOperationOptions())` can be used to do batched pagination +items, err := client.PTUQuotaListComplete(ctx, id, quota.DefaultPTUQuotaListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `QuotaClient.PTUQuotaListAvailable` + +```go +ctx := context.TODO() +id := quota.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") + +// alternatively `client.PTUQuotaListAvailable(ctx, id, quota.DefaultPTUQuotaListAvailableOperationOptions())` can be used to do batched pagination +items, err := client.PTUQuotaListAvailableComplete(ctx, id, quota.DefaultPTUQuotaListAvailableOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + ### Example Usage: `QuotaClient.Update` ```go diff --git a/resource-manager/machinelearningservices/2024-10-01-preview/quota/method_ptuquotagetavailable.go b/resource-manager/machinelearningservices/2024-10-01-preview/quota/method_ptuquotagetavailable.go new file mode 100644 index 00000000000..3bd7abdb5ba --- /dev/null +++ b/resource-manager/machinelearningservices/2024-10-01-preview/quota/method_ptuquotagetavailable.go @@ -0,0 +1,54 @@ +package quota + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PTUQuotaGetAvailableOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *AvailableQuota +} + +// PTUQuotaGetAvailable ... +func (c QuotaClient) PTUQuotaGetAvailable(ctx context.Context, id LocationId) (result PTUQuotaGetAvailableOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/availableQuota/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model AvailableQuota + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/machinelearningservices/2024-10-01-preview/quota/method_ptuquotalist.go b/resource-manager/machinelearningservices/2024-10-01-preview/quota/method_ptuquotalist.go new file mode 100644 index 00000000000..9cfc0d52ff0 --- /dev/null +++ b/resource-manager/machinelearningservices/2024-10-01-preview/quota/method_ptuquotalist.go @@ -0,0 +1,134 @@ +package quota + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PTUQuotaListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]UsageAndQuotaDetails +} + +type PTUQuotaListCompleteResult struct { + LatestHttpResponse *http.Response + Items []UsageAndQuotaDetails +} + +type PTUQuotaListOperationOptions struct { + Skip *string +} + +func DefaultPTUQuotaListOperationOptions() PTUQuotaListOperationOptions { + return PTUQuotaListOperationOptions{} +} + +func (o PTUQuotaListOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o PTUQuotaListOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + + return &out +} + +func (o PTUQuotaListOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Skip != nil { + out.Append("$skip", fmt.Sprintf("%v", *o.Skip)) + } + return &out +} + +type PTUQuotaListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *PTUQuotaListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// PTUQuotaList ... +func (c QuotaClient) PTUQuotaList(ctx context.Context, id LocationId, options PTUQuotaListOperationOptions) (result PTUQuotaListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &PTUQuotaListCustomPager{}, + Path: fmt.Sprintf("%s/quotaAndUsage", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]UsageAndQuotaDetails `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// PTUQuotaListComplete retrieves all the results into a single object +func (c QuotaClient) PTUQuotaListComplete(ctx context.Context, id LocationId, options PTUQuotaListOperationOptions) (PTUQuotaListCompleteResult, error) { + return c.PTUQuotaListCompleteMatchingPredicate(ctx, id, options, UsageAndQuotaDetailsOperationPredicate{}) +} + +// PTUQuotaListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c QuotaClient) PTUQuotaListCompleteMatchingPredicate(ctx context.Context, id LocationId, options PTUQuotaListOperationOptions, predicate UsageAndQuotaDetailsOperationPredicate) (result PTUQuotaListCompleteResult, err error) { + items := make([]UsageAndQuotaDetails, 0) + + resp, err := c.PTUQuotaList(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = PTUQuotaListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/machinelearningservices/2024-10-01-preview/quota/method_ptuquotalistavailable.go b/resource-manager/machinelearningservices/2024-10-01-preview/quota/method_ptuquotalistavailable.go new file mode 100644 index 00000000000..3d960fbe944 --- /dev/null +++ b/resource-manager/machinelearningservices/2024-10-01-preview/quota/method_ptuquotalistavailable.go @@ -0,0 +1,134 @@ +package quota + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PTUQuotaListAvailableOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]AvailableQuota +} + +type PTUQuotaListAvailableCompleteResult struct { + LatestHttpResponse *http.Response + Items []AvailableQuota +} + +type PTUQuotaListAvailableOperationOptions struct { + Skip *string +} + +func DefaultPTUQuotaListAvailableOperationOptions() PTUQuotaListAvailableOperationOptions { + return PTUQuotaListAvailableOperationOptions{} +} + +func (o PTUQuotaListAvailableOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o PTUQuotaListAvailableOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + + return &out +} + +func (o PTUQuotaListAvailableOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Skip != nil { + out.Append("$skip", fmt.Sprintf("%v", *o.Skip)) + } + return &out +} + +type PTUQuotaListAvailableCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *PTUQuotaListAvailableCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// PTUQuotaListAvailable ... +func (c QuotaClient) PTUQuotaListAvailable(ctx context.Context, id LocationId, options PTUQuotaListAvailableOperationOptions) (result PTUQuotaListAvailableOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &PTUQuotaListAvailableCustomPager{}, + Path: fmt.Sprintf("%s/availableQuota", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]AvailableQuota `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// PTUQuotaListAvailableComplete retrieves all the results into a single object +func (c QuotaClient) PTUQuotaListAvailableComplete(ctx context.Context, id LocationId, options PTUQuotaListAvailableOperationOptions) (PTUQuotaListAvailableCompleteResult, error) { + return c.PTUQuotaListAvailableCompleteMatchingPredicate(ctx, id, options, AvailableQuotaOperationPredicate{}) +} + +// PTUQuotaListAvailableCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c QuotaClient) PTUQuotaListAvailableCompleteMatchingPredicate(ctx context.Context, id LocationId, options PTUQuotaListAvailableOperationOptions, predicate AvailableQuotaOperationPredicate) (result PTUQuotaListAvailableCompleteResult, err error) { + items := make([]AvailableQuota, 0) + + resp, err := c.PTUQuotaListAvailable(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = PTUQuotaListAvailableCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/datadog/2023-01-01/createresource/model_createresourcesupportedresponselist.go b/resource-manager/machinelearningservices/2024-10-01-preview/quota/model_availablequota.go similarity index 53% rename from resource-manager/datadog/2023-01-01/createresource/model_createresourcesupportedresponselist.go rename to resource-manager/machinelearningservices/2024-10-01-preview/quota/model_availablequota.go index 43d16feef8d..da2ea18ab0b 100644 --- a/resource-manager/datadog/2023-01-01/createresource/model_createresourcesupportedresponselist.go +++ b/resource-manager/machinelearningservices/2024-10-01-preview/quota/model_availablequota.go @@ -1,8 +1,8 @@ -package createresource +package quota // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type CreateResourceSupportedResponseList struct { - Value *[]CreateResourceSupportedResponse `json:"value,omitempty"` +type AvailableQuota struct { + Properties *AvailableQuotaProperties `json:"properties,omitempty"` } diff --git a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/model_monitoredsubscriptionpropertieslist.go b/resource-manager/machinelearningservices/2024-10-01-preview/quota/model_availablequotaproperties.go similarity index 51% rename from resource-manager/datadog/2023-01-01/monitoredsubscriptions/model_monitoredsubscriptionpropertieslist.go rename to resource-manager/machinelearningservices/2024-10-01-preview/quota/model_availablequotaproperties.go index 7ca8845fac2..f75679ec4c0 100644 --- a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/model_monitoredsubscriptionpropertieslist.go +++ b/resource-manager/machinelearningservices/2024-10-01-preview/quota/model_availablequotaproperties.go @@ -1,8 +1,8 @@ -package monitoredsubscriptions +package quota // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type MonitoredSubscriptionPropertiesList struct { - Value *[]MonitoredSubscriptionProperties `json:"value,omitempty"` +type AvailableQuotaProperties struct { + Total *int64 `json:"total,omitempty"` } diff --git a/resource-manager/machinelearningservices/2024-10-01-preview/quota/model_ptudeploymentusage.go b/resource-manager/machinelearningservices/2024-10-01-preview/quota/model_ptudeploymentusage.go new file mode 100644 index 00000000000..52d6e5d4168 --- /dev/null +++ b/resource-manager/machinelearningservices/2024-10-01-preview/quota/model_ptudeploymentusage.go @@ -0,0 +1,12 @@ +package quota + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PTUDeploymentUsage struct { + CollectionQuotaUsage *int64 `json:"collectionQuotaUsage,omitempty"` + DeploymentName *string `json:"deploymentName,omitempty"` + ResourceGroup *string `json:"resourceGroup,omitempty"` + Usage *int64 `json:"usage,omitempty"` + WorkspaceName *string `json:"workspaceName,omitempty"` +} diff --git a/resource-manager/machinelearningservices/2024-10-01-preview/quota/model_usageandquotadetails.go b/resource-manager/machinelearningservices/2024-10-01-preview/quota/model_usageandquotadetails.go new file mode 100644 index 00000000000..306801dbefc --- /dev/null +++ b/resource-manager/machinelearningservices/2024-10-01-preview/quota/model_usageandquotadetails.go @@ -0,0 +1,10 @@ +package quota + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UsageAndQuotaDetails struct { + ModelCollection *string `json:"modelCollection,omitempty"` + Quota *int64 `json:"quota,omitempty"` + UsageDetails *[]PTUDeploymentUsage `json:"usageDetails,omitempty"` +} diff --git a/resource-manager/machinelearningservices/2024-10-01-preview/quota/predicates.go b/resource-manager/machinelearningservices/2024-10-01-preview/quota/predicates.go index db56a8407ce..a06e9862db5 100644 --- a/resource-manager/machinelearningservices/2024-10-01-preview/quota/predicates.go +++ b/resource-manager/machinelearningservices/2024-10-01-preview/quota/predicates.go @@ -3,6 +3,14 @@ package quota // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type AvailableQuotaOperationPredicate struct { +} + +func (p AvailableQuotaOperationPredicate) Matches(input AvailableQuota) bool { + + return true +} + type ResourceQuotaOperationPredicate struct { AmlWorkspaceLocation *string Id *string @@ -53,3 +61,21 @@ func (p UpdateWorkspaceQuotasOperationPredicate) Matches(input UpdateWorkspaceQu return true } + +type UsageAndQuotaDetailsOperationPredicate struct { + ModelCollection *string + Quota *int64 +} + +func (p UsageAndQuotaDetailsOperationPredicate) Matches(input UsageAndQuotaDetails) bool { + + if p.ModelCollection != nil && (input.ModelCollection == nil || *p.ModelCollection != *input.ModelCollection) { + return false + } + + if p.Quota != nil && (input.Quota == nil || *p.Quota != *input.Quota) { + return false + } + + return true +} diff --git a/resource-manager/machinelearningservices/2024-10-01-preview/registrymanagement/model_registry.go b/resource-manager/machinelearningservices/2024-10-01-preview/registrymanagement/model_registry.go index ff07ae4f321..60b07afa517 100644 --- a/resource-manager/machinelearningservices/2024-10-01-preview/registrymanagement/model_registry.go +++ b/resource-manager/machinelearningservices/2024-10-01-preview/registrymanagement/model_registry.go @@ -4,12 +4,13 @@ package registrymanagement // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Registry struct { - DiscoveryURL *string `json:"discoveryUrl,omitempty"` - IntellectualPropertyPublisher *string `json:"intellectualPropertyPublisher,omitempty"` - ManagedResourceGroup *ArmResourceId `json:"managedResourceGroup,omitempty"` - ManagedResourceGroupSettings *ManagedResourceGroupSettings `json:"managedResourceGroupSettings,omitempty"` - MlFlowRegistryUri *string `json:"mlFlowRegistryUri,omitempty"` - PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` - RegionDetails *[]RegistryRegionArmDetails `json:"regionDetails,omitempty"` - RegistryPrivateEndpointConnections *[]RegistryPrivateEndpointConnection `json:"registryPrivateEndpointConnections,omitempty"` + DiscoveryURL *string `json:"discoveryUrl,omitempty"` + IntellectualPropertyPublisher *string `json:"intellectualPropertyPublisher,omitempty"` + ManagedResourceGroup *ArmResourceId `json:"managedResourceGroup,omitempty"` + ManagedResourceGroupSettings *ManagedResourceGroupSettings `json:"managedResourceGroupSettings,omitempty"` + MlFlowRegistryUri *string `json:"mlFlowRegistryUri,omitempty"` + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + RegionDetails *[]RegistryRegionArmDetails `json:"regionDetails,omitempty"` + RegistryPrivateEndpointConnections *[]RegistryPrivateEndpointConnection `json:"registryPrivateEndpointConnections,omitempty"` + SyndicatedRegistries *[]RegistrySyndicatedRegistriesInlined `json:"syndicatedRegistries,omitempty"` } diff --git a/resource-manager/machinelearningservices/2024-10-01-preview/registrymanagement/model_registrysyndicatedregistriesinlined.go b/resource-manager/machinelearningservices/2024-10-01-preview/registrymanagement/model_registrysyndicatedregistriesinlined.go new file mode 100644 index 00000000000..3fb9d268fec --- /dev/null +++ b/resource-manager/machinelearningservices/2024-10-01-preview/registrymanagement/model_registrysyndicatedregistriesinlined.go @@ -0,0 +1,9 @@ +package registrymanagement + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RegistrySyndicatedRegistriesInlined struct { + SyndicatedRegistry *SyndicatedRegistry `json:"syndicatedRegistry,omitempty"` + SyndicatedRegistryGuid *string `json:"syndicatedRegistryGuid,omitempty"` +} diff --git a/resource-manager/machinelearningservices/2024-10-01-preview/registrymanagement/model_syndicatedregistry.go b/resource-manager/machinelearningservices/2024-10-01-preview/registrymanagement/model_syndicatedregistry.go new file mode 100644 index 00000000000..d947b380e1a --- /dev/null +++ b/resource-manager/machinelearningservices/2024-10-01-preview/registrymanagement/model_syndicatedregistry.go @@ -0,0 +1,8 @@ +package registrymanagement + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SyndicatedRegistry struct { + RegistryId *string `json:"registryId,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forcelinkparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forcelinkparameters.go index 7c8c1ecd012..8d9d8518ad1 100644 --- a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forcelinkparameters.go +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forcelinkparameters.go @@ -4,6 +4,5 @@ package databases // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ForceLinkParameters struct { - GroupNickname string `json:"groupNickname"` - LinkedDatabases []LinkedDatabase `json:"linkedDatabases"` + GeoReplication ForceLinkParametersGeoReplication `json:"geoReplication"` } diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forcelinkparametersgeoreplication.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forcelinkparametersgeoreplication.go new file mode 100644 index 00000000000..89772649f89 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forcelinkparametersgeoreplication.go @@ -0,0 +1,9 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForceLinkParametersGeoReplication struct { + GroupNickname *string `json:"groupNickname,omitempty"` + LinkedDatabases *[]LinkedDatabase `json:"linkedDatabases,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forcelinkparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forcelinkparameters.go index 32ca00618d3..b80b6aaf76b 100644 --- a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forcelinkparameters.go +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forcelinkparameters.go @@ -4,6 +4,5 @@ package redisenterprise // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ForceLinkParameters struct { - GroupNickname string `json:"groupNickname"` - LinkedDatabases []LinkedDatabase `json:"linkedDatabases"` + GeoReplication ForceLinkParametersGeoReplication `json:"geoReplication"` } diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forcelinkparametersgeoreplication.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forcelinkparametersgeoreplication.go new file mode 100644 index 00000000000..53242cf971b --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forcelinkparametersgeoreplication.go @@ -0,0 +1,9 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForceLinkParametersGeoReplication struct { + GroupNickname *string `json:"groupNickname,omitempty"` + LinkedDatabases *[]LinkedDatabase `json:"linkedDatabases,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-10-01/databases/model_forcelinkparameters.go b/resource-manager/redisenterprise/2024-10-01/databases/model_forcelinkparameters.go index 7c8c1ecd012..8d9d8518ad1 100644 --- a/resource-manager/redisenterprise/2024-10-01/databases/model_forcelinkparameters.go +++ b/resource-manager/redisenterprise/2024-10-01/databases/model_forcelinkparameters.go @@ -4,6 +4,5 @@ package databases // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ForceLinkParameters struct { - GroupNickname string `json:"groupNickname"` - LinkedDatabases []LinkedDatabase `json:"linkedDatabases"` + GeoReplication ForceLinkParametersGeoReplication `json:"geoReplication"` } diff --git a/resource-manager/redisenterprise/2024-10-01/databases/model_forcelinkparametersgeoreplication.go b/resource-manager/redisenterprise/2024-10-01/databases/model_forcelinkparametersgeoreplication.go new file mode 100644 index 00000000000..89772649f89 --- /dev/null +++ b/resource-manager/redisenterprise/2024-10-01/databases/model_forcelinkparametersgeoreplication.go @@ -0,0 +1,9 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForceLinkParametersGeoReplication struct { + GroupNickname *string `json:"groupNickname,omitempty"` + LinkedDatabases *[]LinkedDatabase `json:"linkedDatabases,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_forcelinkparameters.go b/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_forcelinkparameters.go index 32ca00618d3..b80b6aaf76b 100644 --- a/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_forcelinkparameters.go +++ b/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_forcelinkparameters.go @@ -4,6 +4,5 @@ package redisenterprise // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ForceLinkParameters struct { - GroupNickname string `json:"groupNickname"` - LinkedDatabases []LinkedDatabase `json:"linkedDatabases"` + GeoReplication ForceLinkParametersGeoReplication `json:"geoReplication"` } diff --git a/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_forcelinkparametersgeoreplication.go b/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_forcelinkparametersgeoreplication.go new file mode 100644 index 00000000000..53242cf971b --- /dev/null +++ b/resource-manager/redisenterprise/2024-10-01/redisenterprise/model_forcelinkparametersgeoreplication.go @@ -0,0 +1,9 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForceLinkParametersGeoReplication struct { + GroupNickname *string `json:"groupNickname,omitempty"` + LinkedDatabases *[]LinkedDatabase `json:"linkedDatabases,omitempty"` +}