diff --git a/resource-manager/apimanagement/2022-08-01/policyfragment/README.md b/resource-manager/apimanagement/2022-08-01/policyfragment/README.md index 66fbab3c651..5aaf6a77d0b 100644 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/README.md +++ b/resource-manager/apimanagement/2022-08-01/policyfragment/README.md @@ -108,11 +108,12 @@ for _, item := range items { ctx := context.TODO() id := policyfragment.NewPolicyFragmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "policyFragmentValue") -read, err := client.ListReferences(ctx, id, policyfragment.DefaultListReferencesOperationOptions()) +// alternatively `client.ListReferences(ctx, id, policyfragment.DefaultListReferencesOperationOptions())` can be used to do batched pagination +items, err := client.ListReferencesComplete(ctx, id, policyfragment.DefaultListReferencesOperationOptions()) 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/apimanagement/2022-08-01/policyfragment/method_listreferences.go b/resource-manager/apimanagement/2022-08-01/policyfragment/method_listreferences.go index 344d97de029..1ab0da61154 100644 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/method_listreferences.go +++ b/resource-manager/apimanagement/2022-08-01/policyfragment/method_listreferences.go @@ -15,7 +15,12 @@ import ( type ListReferencesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ResourceCollection + Model *[]Resource +} + +type ListReferencesCompleteResult struct { + LatestHttpResponse *http.Response + Items []Resource } type ListReferencesOperationOptions struct { @@ -67,7 +72,7 @@ func (c PolicyFragmentClient) ListReferences(ctx context.Context, id PolicyFragm } 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 @@ -76,12 +81,43 @@ func (c PolicyFragmentClient) ListReferences(ctx context.Context, id PolicyFragm return } - var model ResourceCollection - result.Model = &model + var values struct { + Values *[]Resource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListReferencesComplete retrieves all the results into a single object +func (c PolicyFragmentClient) ListReferencesComplete(ctx context.Context, id PolicyFragmentId, options ListReferencesOperationOptions) (ListReferencesCompleteResult, error) { + return c.ListReferencesCompleteMatchingPredicate(ctx, id, options, ResourceOperationPredicate{}) +} + +// ListReferencesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PolicyFragmentClient) ListReferencesCompleteMatchingPredicate(ctx context.Context, id PolicyFragmentId, options ListReferencesOperationOptions, predicate ResourceOperationPredicate) (result ListReferencesCompleteResult, err error) { + items := make([]Resource, 0) + + resp, err := c.ListReferences(ctx, id, options) + if err != nil { + 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 = ListReferencesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/apimanagement/2022-08-01/policyfragment/model_resourcecollection.go b/resource-manager/apimanagement/2022-08-01/policyfragment/model_resourcecollection.go deleted file mode 100644 index 642729949d6..00000000000 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/model_resourcecollection.go +++ /dev/null @@ -1,10 +0,0 @@ -package policyfragment - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceCollection struct { - Count *int64 `json:"count,omitempty"` - NextLink *string `json:"nextLink,omitempty"` - Value *[]Resource `json:"value,omitempty"` -} diff --git a/resource-manager/apimanagement/2022-08-01/policyfragment/predicates.go b/resource-manager/apimanagement/2022-08-01/policyfragment/predicates.go index 8bcfd6ee83c..2850f0aee3c 100644 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/predicates.go +++ b/resource-manager/apimanagement/2022-08-01/policyfragment/predicates.go @@ -25,3 +25,26 @@ func (p PolicyFragmentContractOperationPredicate) Matches(input PolicyFragmentCo return true } + +type ResourceOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ResourceOperationPredicate) Matches(input Resource) 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/apimanagement/2023-03-01-preview/policyfragment/README.md b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/README.md index 76d0cee8a52..e09b7965a83 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/README.md @@ -108,12 +108,13 @@ for _, item := range items { ctx := context.TODO() id := policyfragment.NewPolicyFragmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "policyFragmentValue") -read, err := client.ListReferences(ctx, id, policyfragment.DefaultListReferencesOperationOptions()) +// alternatively `client.ListReferences(ctx, id, policyfragment.DefaultListReferencesOperationOptions())` can be used to do batched pagination +items, err := client.ListReferencesComplete(ctx, id, policyfragment.DefaultListReferencesOperationOptions()) 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 } ``` @@ -206,11 +207,12 @@ for _, item := range items { ctx := context.TODO() id := policyfragment.NewWorkspacePolicyFragmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceIdValue", "policyFragmentValue") -read, err := client.WorkspacePolicyFragmentListReferences(ctx, id, policyfragment.DefaultWorkspacePolicyFragmentListReferencesOperationOptions()) +// alternatively `client.WorkspacePolicyFragmentListReferences(ctx, id, policyfragment.DefaultWorkspacePolicyFragmentListReferencesOperationOptions())` can be used to do batched pagination +items, err := client.WorkspacePolicyFragmentListReferencesComplete(ctx, id, policyfragment.DefaultWorkspacePolicyFragmentListReferencesOperationOptions()) 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/apimanagement/2023-03-01-preview/policyfragment/method_listreferences.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_listreferences.go index 344d97de029..1ab0da61154 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_listreferences.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_listreferences.go @@ -15,7 +15,12 @@ import ( type ListReferencesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ResourceCollection + Model *[]Resource +} + +type ListReferencesCompleteResult struct { + LatestHttpResponse *http.Response + Items []Resource } type ListReferencesOperationOptions struct { @@ -67,7 +72,7 @@ func (c PolicyFragmentClient) ListReferences(ctx context.Context, id PolicyFragm } 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 @@ -76,12 +81,43 @@ func (c PolicyFragmentClient) ListReferences(ctx context.Context, id PolicyFragm return } - var model ResourceCollection - result.Model = &model + var values struct { + Values *[]Resource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListReferencesComplete retrieves all the results into a single object +func (c PolicyFragmentClient) ListReferencesComplete(ctx context.Context, id PolicyFragmentId, options ListReferencesOperationOptions) (ListReferencesCompleteResult, error) { + return c.ListReferencesCompleteMatchingPredicate(ctx, id, options, ResourceOperationPredicate{}) +} + +// ListReferencesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PolicyFragmentClient) ListReferencesCompleteMatchingPredicate(ctx context.Context, id PolicyFragmentId, options ListReferencesOperationOptions, predicate ResourceOperationPredicate) (result ListReferencesCompleteResult, err error) { + items := make([]Resource, 0) + + resp, err := c.ListReferences(ctx, id, options) + if err != nil { + 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 = ListReferencesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go index 19e6a2f9d6f..d9a77423901 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go @@ -15,7 +15,12 @@ import ( type WorkspacePolicyFragmentListReferencesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ResourceCollection + Model *[]Resource +} + +type WorkspacePolicyFragmentListReferencesCompleteResult struct { + LatestHttpResponse *http.Response + Items []Resource } type WorkspacePolicyFragmentListReferencesOperationOptions struct { @@ -67,7 +72,7 @@ func (c PolicyFragmentClient) WorkspacePolicyFragmentListReferences(ctx context. } 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 @@ -76,12 +81,43 @@ func (c PolicyFragmentClient) WorkspacePolicyFragmentListReferences(ctx context. return } - var model ResourceCollection - result.Model = &model + var values struct { + Values *[]Resource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// WorkspacePolicyFragmentListReferencesComplete retrieves all the results into a single object +func (c PolicyFragmentClient) WorkspacePolicyFragmentListReferencesComplete(ctx context.Context, id WorkspacePolicyFragmentId, options WorkspacePolicyFragmentListReferencesOperationOptions) (WorkspacePolicyFragmentListReferencesCompleteResult, error) { + return c.WorkspacePolicyFragmentListReferencesCompleteMatchingPredicate(ctx, id, options, ResourceOperationPredicate{}) +} + +// WorkspacePolicyFragmentListReferencesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PolicyFragmentClient) WorkspacePolicyFragmentListReferencesCompleteMatchingPredicate(ctx context.Context, id WorkspacePolicyFragmentId, options WorkspacePolicyFragmentListReferencesOperationOptions, predicate ResourceOperationPredicate) (result WorkspacePolicyFragmentListReferencesCompleteResult, err error) { + items := make([]Resource, 0) + + resp, err := c.WorkspacePolicyFragmentListReferences(ctx, id, options) + if err != nil { + 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 = WorkspacePolicyFragmentListReferencesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/model_resourcecollection.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/model_resourcecollection.go deleted file mode 100644 index 642729949d6..00000000000 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/model_resourcecollection.go +++ /dev/null @@ -1,10 +0,0 @@ -package policyfragment - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceCollection struct { - Count *int64 `json:"count,omitempty"` - NextLink *string `json:"nextLink,omitempty"` - Value *[]Resource `json:"value,omitempty"` -} diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/predicates.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/predicates.go index 8bcfd6ee83c..2850f0aee3c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/predicates.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/predicates.go @@ -25,3 +25,26 @@ func (p PolicyFragmentContractOperationPredicate) Matches(input PolicyFragmentCo return true } + +type ResourceOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ResourceOperationPredicate) Matches(input Resource) 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/apimanagement/2023-05-01-preview/policyfragment/README.md b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/README.md index ec4dc59fbf5..fc80f2b3060 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/README.md @@ -108,12 +108,13 @@ for _, item := range items { ctx := context.TODO() id := policyfragment.NewPolicyFragmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "policyFragmentValue") -read, err := client.ListReferences(ctx, id, policyfragment.DefaultListReferencesOperationOptions()) +// alternatively `client.ListReferences(ctx, id, policyfragment.DefaultListReferencesOperationOptions())` can be used to do batched pagination +items, err := client.ListReferencesComplete(ctx, id, policyfragment.DefaultListReferencesOperationOptions()) 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 } ``` @@ -206,11 +207,12 @@ for _, item := range items { ctx := context.TODO() id := policyfragment.NewWorkspacePolicyFragmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceIdValue", "policyFragmentValue") -read, err := client.WorkspacePolicyFragmentListReferences(ctx, id, policyfragment.DefaultWorkspacePolicyFragmentListReferencesOperationOptions()) +// alternatively `client.WorkspacePolicyFragmentListReferences(ctx, id, policyfragment.DefaultWorkspacePolicyFragmentListReferencesOperationOptions())` can be used to do batched pagination +items, err := client.WorkspacePolicyFragmentListReferencesComplete(ctx, id, policyfragment.DefaultWorkspacePolicyFragmentListReferencesOperationOptions()) 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/apimanagement/2023-05-01-preview/policyfragment/method_listreferences.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_listreferences.go index 344d97de029..1ab0da61154 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_listreferences.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_listreferences.go @@ -15,7 +15,12 @@ import ( type ListReferencesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ResourceCollection + Model *[]Resource +} + +type ListReferencesCompleteResult struct { + LatestHttpResponse *http.Response + Items []Resource } type ListReferencesOperationOptions struct { @@ -67,7 +72,7 @@ func (c PolicyFragmentClient) ListReferences(ctx context.Context, id PolicyFragm } 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 @@ -76,12 +81,43 @@ func (c PolicyFragmentClient) ListReferences(ctx context.Context, id PolicyFragm return } - var model ResourceCollection - result.Model = &model + var values struct { + Values *[]Resource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListReferencesComplete retrieves all the results into a single object +func (c PolicyFragmentClient) ListReferencesComplete(ctx context.Context, id PolicyFragmentId, options ListReferencesOperationOptions) (ListReferencesCompleteResult, error) { + return c.ListReferencesCompleteMatchingPredicate(ctx, id, options, ResourceOperationPredicate{}) +} + +// ListReferencesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PolicyFragmentClient) ListReferencesCompleteMatchingPredicate(ctx context.Context, id PolicyFragmentId, options ListReferencesOperationOptions, predicate ResourceOperationPredicate) (result ListReferencesCompleteResult, err error) { + items := make([]Resource, 0) + + resp, err := c.ListReferences(ctx, id, options) + if err != nil { + 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 = ListReferencesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go index 19e6a2f9d6f..d9a77423901 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go @@ -15,7 +15,12 @@ import ( type WorkspacePolicyFragmentListReferencesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ResourceCollection + Model *[]Resource +} + +type WorkspacePolicyFragmentListReferencesCompleteResult struct { + LatestHttpResponse *http.Response + Items []Resource } type WorkspacePolicyFragmentListReferencesOperationOptions struct { @@ -67,7 +72,7 @@ func (c PolicyFragmentClient) WorkspacePolicyFragmentListReferences(ctx context. } 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 @@ -76,12 +81,43 @@ func (c PolicyFragmentClient) WorkspacePolicyFragmentListReferences(ctx context. return } - var model ResourceCollection - result.Model = &model + var values struct { + Values *[]Resource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// WorkspacePolicyFragmentListReferencesComplete retrieves all the results into a single object +func (c PolicyFragmentClient) WorkspacePolicyFragmentListReferencesComplete(ctx context.Context, id WorkspacePolicyFragmentId, options WorkspacePolicyFragmentListReferencesOperationOptions) (WorkspacePolicyFragmentListReferencesCompleteResult, error) { + return c.WorkspacePolicyFragmentListReferencesCompleteMatchingPredicate(ctx, id, options, ResourceOperationPredicate{}) +} + +// WorkspacePolicyFragmentListReferencesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PolicyFragmentClient) WorkspacePolicyFragmentListReferencesCompleteMatchingPredicate(ctx context.Context, id WorkspacePolicyFragmentId, options WorkspacePolicyFragmentListReferencesOperationOptions, predicate ResourceOperationPredicate) (result WorkspacePolicyFragmentListReferencesCompleteResult, err error) { + items := make([]Resource, 0) + + resp, err := c.WorkspacePolicyFragmentListReferences(ctx, id, options) + if err != nil { + 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 = WorkspacePolicyFragmentListReferencesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/model_resourcecollection.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/model_resourcecollection.go deleted file mode 100644 index 642729949d6..00000000000 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/model_resourcecollection.go +++ /dev/null @@ -1,10 +0,0 @@ -package policyfragment - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceCollection struct { - Count *int64 `json:"count,omitempty"` - NextLink *string `json:"nextLink,omitempty"` - Value *[]Resource `json:"value,omitempty"` -} diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/predicates.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/predicates.go index 8bcfd6ee83c..2850f0aee3c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/predicates.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/predicates.go @@ -25,3 +25,26 @@ func (p PolicyFragmentContractOperationPredicate) Matches(input PolicyFragmentCo return true } + +type ResourceOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ResourceOperationPredicate) Matches(input Resource) 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/appconfiguration/2023-03-01/configurationstores/method_listkeys.go b/resource-manager/appconfiguration/2023-03-01/configurationstores/method_listkeys.go index 33cf21d2329..a4da444d703 100644 --- a/resource-manager/appconfiguration/2023-03-01/configurationstores/method_listkeys.go +++ b/resource-manager/appconfiguration/2023-03-01/configurationstores/method_listkeys.go @@ -15,12 +15,12 @@ import ( type ListKeysOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ApiKeyListResult + Model *[]ApiKey } type ListKeysCompleteResult struct { LatestHttpResponse *http.Response - Items []ApiKeyListResult + Items []ApiKey } // ListKeys ... @@ -50,7 +50,7 @@ func (c ConfigurationStoresClient) ListKeys(ctx context.Context, id Configuratio } var values struct { - Values *[]ApiKeyListResult `json:"value"` + Values *[]ApiKey `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c ConfigurationStoresClient) ListKeys(ctx context.Context, id Configuratio // ListKeysComplete retrieves all the results into a single object func (c ConfigurationStoresClient) ListKeysComplete(ctx context.Context, id ConfigurationStoreId) (ListKeysCompleteResult, error) { - return c.ListKeysCompleteMatchingPredicate(ctx, id, ApiKeyListResultOperationPredicate{}) + return c.ListKeysCompleteMatchingPredicate(ctx, id, ApiKeyOperationPredicate{}) } // ListKeysCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ConfigurationStoresClient) ListKeysCompleteMatchingPredicate(ctx context.Context, id ConfigurationStoreId, predicate ApiKeyListResultOperationPredicate) (result ListKeysCompleteResult, err error) { - items := make([]ApiKeyListResult, 0) +func (c ConfigurationStoresClient) ListKeysCompleteMatchingPredicate(ctx context.Context, id ConfigurationStoreId, predicate ApiKeyOperationPredicate) (result ListKeysCompleteResult, err error) { + items := make([]ApiKey, 0) resp, err := c.ListKeys(ctx, id) if err != nil { diff --git a/resource-manager/appconfiguration/2023-03-01/configurationstores/model_apikeylistresult.go b/resource-manager/appconfiguration/2023-03-01/configurationstores/model_apikeylistresult.go deleted file mode 100644 index 6a8cfcd594e..00000000000 --- a/resource-manager/appconfiguration/2023-03-01/configurationstores/model_apikeylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package configurationstores - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApiKeyListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ApiKey `json:"value,omitempty"` -} diff --git a/resource-manager/appconfiguration/2023-03-01/configurationstores/predicates.go b/resource-manager/appconfiguration/2023-03-01/configurationstores/predicates.go index f438a14da46..8fad9c6bbf4 100644 --- a/resource-manager/appconfiguration/2023-03-01/configurationstores/predicates.go +++ b/resource-manager/appconfiguration/2023-03-01/configurationstores/predicates.go @@ -3,13 +3,38 @@ package configurationstores // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ApiKeyListResultOperationPredicate struct { - NextLink *string +type ApiKeyOperationPredicate struct { + ConnectionString *string + Id *string + LastModified *string + Name *string + ReadOnly *bool + Value *string } -func (p ApiKeyListResultOperationPredicate) Matches(input ApiKeyListResult) bool { +func (p ApiKeyOperationPredicate) Matches(input ApiKey) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ConnectionString != nil && (input.ConnectionString == nil || *p.ConnectionString != *input.ConnectionString) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.LastModified != nil && (input.LastModified == nil || *p.LastModified != *input.LastModified) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.ReadOnly != nil && (input.ReadOnly == nil || *p.ReadOnly != *input.ReadOnly) { + return false + } + + if p.Value != nil && (input.Value == nil || *p.Value != *input.Value) { return false } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/model_rolemanagementpolicyproperties.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/model_rolemanagementpolicyproperties.go index 72ed3037cbf..cf4da73066d 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/model_rolemanagementpolicyproperties.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/model_rolemanagementpolicyproperties.go @@ -66,7 +66,7 @@ func (s *RoleManagementPolicyProperties) UnmarshalJSON(bytes []byte) error { } output = append(output, impl) } - s.EffectiveRules = &output + s.EffectiveRules = output } if v, ok := temp["rules"]; ok { diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/model_rolemanagementpolicyassignmentproperties.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/model_rolemanagementpolicyassignmentproperties.go index a4a156831b0..20351b5e24a 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/model_rolemanagementpolicyassignmentproperties.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/model_rolemanagementpolicyassignmentproperties.go @@ -49,7 +49,7 @@ func (s *RoleManagementPolicyAssignmentProperties) UnmarshalJSON(bytes []byte) e } output = append(output, impl) } - s.EffectiveRules = &output + s.EffectiveRules = output } return nil } diff --git a/resource-manager/billing/2019-10-01-preview/billingaccounts/method_listinvoicesectionsbycreatesubscriptionpermission.go b/resource-manager/billing/2019-10-01-preview/billingaccounts/method_listinvoicesectionsbycreatesubscriptionpermission.go index 31a03f11161..495b1336dbb 100644 --- a/resource-manager/billing/2019-10-01-preview/billingaccounts/method_listinvoicesectionsbycreatesubscriptionpermission.go +++ b/resource-manager/billing/2019-10-01-preview/billingaccounts/method_listinvoicesectionsbycreatesubscriptionpermission.go @@ -15,12 +15,12 @@ import ( type ListInvoiceSectionsByCreateSubscriptionPermissionOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]InvoiceSectionListWithCreateSubPermissionResult + Model *[]InvoiceSectionWithCreateSubPermission } type ListInvoiceSectionsByCreateSubscriptionPermissionCompleteResult struct { LatestHttpResponse *http.Response - Items []InvoiceSectionListWithCreateSubPermissionResult + Items []InvoiceSectionWithCreateSubPermission } // ListInvoiceSectionsByCreateSubscriptionPermission ... @@ -50,7 +50,7 @@ func (c BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermission } var values struct { - Values *[]InvoiceSectionListWithCreateSubPermissionResult `json:"value"` + Values *[]InvoiceSectionWithCreateSubPermission `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermission // ListInvoiceSectionsByCreateSubscriptionPermissionComplete retrieves all the results into a single object func (c BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionComplete(ctx context.Context, id BillingAccountId) (ListInvoiceSectionsByCreateSubscriptionPermissionCompleteResult, error) { - return c.ListInvoiceSectionsByCreateSubscriptionPermissionCompleteMatchingPredicate(ctx, id, InvoiceSectionListWithCreateSubPermissionResultOperationPredicate{}) + return c.ListInvoiceSectionsByCreateSubscriptionPermissionCompleteMatchingPredicate(ctx, id, InvoiceSectionWithCreateSubPermissionOperationPredicate{}) } // ListInvoiceSectionsByCreateSubscriptionPermissionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionCompleteMatchingPredicate(ctx context.Context, id BillingAccountId, predicate InvoiceSectionListWithCreateSubPermissionResultOperationPredicate) (result ListInvoiceSectionsByCreateSubscriptionPermissionCompleteResult, err error) { - items := make([]InvoiceSectionListWithCreateSubPermissionResult, 0) +func (c BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionCompleteMatchingPredicate(ctx context.Context, id BillingAccountId, predicate InvoiceSectionWithCreateSubPermissionOperationPredicate) (result ListInvoiceSectionsByCreateSubscriptionPermissionCompleteResult, err error) { + items := make([]InvoiceSectionWithCreateSubPermission, 0) resp, err := c.ListInvoiceSectionsByCreateSubscriptionPermission(ctx, id) if err != nil { diff --git a/resource-manager/billing/2019-10-01-preview/billingaccounts/model_invoicesectionlistwithcreatesubpermissionresult.go b/resource-manager/billing/2019-10-01-preview/billingaccounts/model_invoicesectionlistwithcreatesubpermissionresult.go deleted file mode 100644 index ab01d400e2d..00000000000 --- a/resource-manager/billing/2019-10-01-preview/billingaccounts/model_invoicesectionlistwithcreatesubpermissionresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package billingaccounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InvoiceSectionListWithCreateSubPermissionResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]InvoiceSectionWithCreateSubPermission `json:"value,omitempty"` -} diff --git a/resource-manager/billing/2019-10-01-preview/billingaccounts/predicates.go b/resource-manager/billing/2019-10-01-preview/billingaccounts/predicates.go index 4694d5f5a0a..33a75dd9c30 100644 --- a/resource-manager/billing/2019-10-01-preview/billingaccounts/predicates.go +++ b/resource-manager/billing/2019-10-01-preview/billingaccounts/predicates.go @@ -26,13 +26,28 @@ func (p BillingAccountOperationPredicate) Matches(input BillingAccount) bool { return true } -type InvoiceSectionListWithCreateSubPermissionResultOperationPredicate struct { - NextLink *string +type InvoiceSectionWithCreateSubPermissionOperationPredicate struct { + BillingProfileDisplayName *string + BillingProfileId *string + InvoiceSectionDisplayName *string + InvoiceSectionId *string } -func (p InvoiceSectionListWithCreateSubPermissionResultOperationPredicate) Matches(input InvoiceSectionListWithCreateSubPermissionResult) bool { +func (p InvoiceSectionWithCreateSubPermissionOperationPredicate) Matches(input InvoiceSectionWithCreateSubPermission) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.BillingProfileDisplayName != nil && (input.BillingProfileDisplayName == nil || *p.BillingProfileDisplayName != *input.BillingProfileDisplayName) { + return false + } + + if p.BillingProfileId != nil && (input.BillingProfileId == nil || *p.BillingProfileId != *input.BillingProfileId) { + return false + } + + if p.InvoiceSectionDisplayName != nil && (input.InvoiceSectionDisplayName == nil || *p.InvoiceSectionDisplayName != *input.InvoiceSectionDisplayName) { + return false + } + + if p.InvoiceSectionId != nil && (input.InvoiceSectionId == nil || *p.InvoiceSectionId != *input.InvoiceSectionId) { return false } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/README.md b/resource-manager/billing/2019-10-01-preview/billingroleassignments/README.md index 4f7a8d19802..fc94f7ac63e 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/README.md +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/README.md @@ -31,12 +31,13 @@ payload := billingroleassignments.BillingRoleAssignmentPayload{ } -read, err := client.AddByBillingAccount(ctx, id, payload) +// alternatively `client.AddByBillingAccount(ctx, id, payload)` can be used to do batched pagination +items, err := client.AddByBillingAccountComplete(ctx, id, payload) 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 } ``` @@ -52,12 +53,13 @@ payload := billingroleassignments.BillingRoleAssignmentPayload{ } -read, err := client.AddByBillingProfile(ctx, id, payload) +// alternatively `client.AddByBillingProfile(ctx, id, payload)` can be used to do batched pagination +items, err := client.AddByBillingProfileComplete(ctx, id, payload) 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 } ``` @@ -73,12 +75,13 @@ payload := billingroleassignments.BillingRoleAssignmentPayload{ } -read, err := client.AddByInvoiceSection(ctx, id, payload) +// alternatively `client.AddByInvoiceSection(ctx, id, payload)` can be used to do batched pagination +items, err := client.AddByInvoiceSectionComplete(ctx, id, payload) 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/billing/2019-10-01-preview/billingroleassignments/method_addbybillingaccount.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_addbybillingaccount.go index a2059dbfa44..99e7a827f5c 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_addbybillingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_addbybillingaccount.go @@ -15,7 +15,12 @@ import ( type AddByBillingAccountOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *BillingRoleAssignmentListResult + Model *[]BillingRoleAssignment +} + +type AddByBillingAccountCompleteResult struct { + LatestHttpResponse *http.Response + Items []BillingRoleAssignment } // AddByBillingAccount ... @@ -34,12 +39,8 @@ func (c BillingRoleAssignmentsClient) AddByBillingAccount(ctx context.Context, i return } - if err = req.Marshal(input); err != nil { - return - } - 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 @@ -48,12 +49,43 @@ func (c BillingRoleAssignmentsClient) AddByBillingAccount(ctx context.Context, i return } - var model BillingRoleAssignmentListResult - result.Model = &model + var values struct { + Values *[]BillingRoleAssignment `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// AddByBillingAccountComplete retrieves all the results into a single object +func (c BillingRoleAssignmentsClient) AddByBillingAccountComplete(ctx context.Context, id BillingAccountId, input BillingRoleAssignmentPayload) (AddByBillingAccountCompleteResult, error) { + return c.AddByBillingAccountCompleteMatchingPredicate(ctx, id, input, BillingRoleAssignmentOperationPredicate{}) +} + +// AddByBillingAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BillingRoleAssignmentsClient) AddByBillingAccountCompleteMatchingPredicate(ctx context.Context, id BillingAccountId, input BillingRoleAssignmentPayload, predicate BillingRoleAssignmentOperationPredicate) (result AddByBillingAccountCompleteResult, err error) { + items := make([]BillingRoleAssignment, 0) + + resp, err := c.AddByBillingAccount(ctx, id, input) + if err != nil { + 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 = AddByBillingAccountCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_addbybillingprofile.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_addbybillingprofile.go index 033e5c22ef9..be0d9e7a92d 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_addbybillingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_addbybillingprofile.go @@ -15,7 +15,12 @@ import ( type AddByBillingProfileOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *BillingRoleAssignmentListResult + Model *[]BillingRoleAssignment +} + +type AddByBillingProfileCompleteResult struct { + LatestHttpResponse *http.Response + Items []BillingRoleAssignment } // AddByBillingProfile ... @@ -34,12 +39,8 @@ func (c BillingRoleAssignmentsClient) AddByBillingProfile(ctx context.Context, i return } - if err = req.Marshal(input); err != nil { - return - } - 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 @@ -48,12 +49,43 @@ func (c BillingRoleAssignmentsClient) AddByBillingProfile(ctx context.Context, i return } - var model BillingRoleAssignmentListResult - result.Model = &model + var values struct { + Values *[]BillingRoleAssignment `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// AddByBillingProfileComplete retrieves all the results into a single object +func (c BillingRoleAssignmentsClient) AddByBillingProfileComplete(ctx context.Context, id BillingProfileId, input BillingRoleAssignmentPayload) (AddByBillingProfileCompleteResult, error) { + return c.AddByBillingProfileCompleteMatchingPredicate(ctx, id, input, BillingRoleAssignmentOperationPredicate{}) +} + +// AddByBillingProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BillingRoleAssignmentsClient) AddByBillingProfileCompleteMatchingPredicate(ctx context.Context, id BillingProfileId, input BillingRoleAssignmentPayload, predicate BillingRoleAssignmentOperationPredicate) (result AddByBillingProfileCompleteResult, err error) { + items := make([]BillingRoleAssignment, 0) + + resp, err := c.AddByBillingProfile(ctx, id, input) + if err != nil { + 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 = AddByBillingProfileCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_addbyinvoicesection.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_addbyinvoicesection.go index 83bfad1a3c6..471b2c0718b 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_addbyinvoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_addbyinvoicesection.go @@ -15,7 +15,12 @@ import ( type AddByInvoiceSectionOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *BillingRoleAssignmentListResult + Model *[]BillingRoleAssignment +} + +type AddByInvoiceSectionCompleteResult struct { + LatestHttpResponse *http.Response + Items []BillingRoleAssignment } // AddByInvoiceSection ... @@ -34,12 +39,8 @@ func (c BillingRoleAssignmentsClient) AddByInvoiceSection(ctx context.Context, i return } - if err = req.Marshal(input); err != nil { - return - } - 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 @@ -48,12 +49,43 @@ func (c BillingRoleAssignmentsClient) AddByInvoiceSection(ctx context.Context, i return } - var model BillingRoleAssignmentListResult - result.Model = &model + var values struct { + Values *[]BillingRoleAssignment `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// AddByInvoiceSectionComplete retrieves all the results into a single object +func (c BillingRoleAssignmentsClient) AddByInvoiceSectionComplete(ctx context.Context, id InvoiceSectionId, input BillingRoleAssignmentPayload) (AddByInvoiceSectionCompleteResult, error) { + return c.AddByInvoiceSectionCompleteMatchingPredicate(ctx, id, input, BillingRoleAssignmentOperationPredicate{}) +} + +// AddByInvoiceSectionCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BillingRoleAssignmentsClient) AddByInvoiceSectionCompleteMatchingPredicate(ctx context.Context, id InvoiceSectionId, input BillingRoleAssignmentPayload, predicate BillingRoleAssignmentOperationPredicate) (result AddByInvoiceSectionCompleteResult, err error) { + items := make([]BillingRoleAssignment, 0) + + resp, err := c.AddByInvoiceSection(ctx, id, input) + if err != nil { + 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 = AddByInvoiceSectionCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/model_billingroleassignmentlistresult.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/model_billingroleassignmentlistresult.go deleted file mode 100644 index f0da7b1fa7f..00000000000 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/model_billingroleassignmentlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package billingroleassignments - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BillingRoleAssignmentListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BillingRoleAssignment `json:"value,omitempty"` -} diff --git a/resource-manager/billing/2020-05-01/billingaccounts/method_listinvoicesectionsbycreatesubscriptionpermission.go b/resource-manager/billing/2020-05-01/billingaccounts/method_listinvoicesectionsbycreatesubscriptionpermission.go index 31a03f11161..495b1336dbb 100644 --- a/resource-manager/billing/2020-05-01/billingaccounts/method_listinvoicesectionsbycreatesubscriptionpermission.go +++ b/resource-manager/billing/2020-05-01/billingaccounts/method_listinvoicesectionsbycreatesubscriptionpermission.go @@ -15,12 +15,12 @@ import ( type ListInvoiceSectionsByCreateSubscriptionPermissionOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]InvoiceSectionListWithCreateSubPermissionResult + Model *[]InvoiceSectionWithCreateSubPermission } type ListInvoiceSectionsByCreateSubscriptionPermissionCompleteResult struct { LatestHttpResponse *http.Response - Items []InvoiceSectionListWithCreateSubPermissionResult + Items []InvoiceSectionWithCreateSubPermission } // ListInvoiceSectionsByCreateSubscriptionPermission ... @@ -50,7 +50,7 @@ func (c BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermission } var values struct { - Values *[]InvoiceSectionListWithCreateSubPermissionResult `json:"value"` + Values *[]InvoiceSectionWithCreateSubPermission `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermission // ListInvoiceSectionsByCreateSubscriptionPermissionComplete retrieves all the results into a single object func (c BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionComplete(ctx context.Context, id BillingAccountId) (ListInvoiceSectionsByCreateSubscriptionPermissionCompleteResult, error) { - return c.ListInvoiceSectionsByCreateSubscriptionPermissionCompleteMatchingPredicate(ctx, id, InvoiceSectionListWithCreateSubPermissionResultOperationPredicate{}) + return c.ListInvoiceSectionsByCreateSubscriptionPermissionCompleteMatchingPredicate(ctx, id, InvoiceSectionWithCreateSubPermissionOperationPredicate{}) } // ListInvoiceSectionsByCreateSubscriptionPermissionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionCompleteMatchingPredicate(ctx context.Context, id BillingAccountId, predicate InvoiceSectionListWithCreateSubPermissionResultOperationPredicate) (result ListInvoiceSectionsByCreateSubscriptionPermissionCompleteResult, err error) { - items := make([]InvoiceSectionListWithCreateSubPermissionResult, 0) +func (c BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionCompleteMatchingPredicate(ctx context.Context, id BillingAccountId, predicate InvoiceSectionWithCreateSubPermissionOperationPredicate) (result ListInvoiceSectionsByCreateSubscriptionPermissionCompleteResult, err error) { + items := make([]InvoiceSectionWithCreateSubPermission, 0) resp, err := c.ListInvoiceSectionsByCreateSubscriptionPermission(ctx, id) if err != nil { diff --git a/resource-manager/billing/2020-05-01/billingaccounts/model_invoicesectionlistwithcreatesubpermissionresult.go b/resource-manager/billing/2020-05-01/billingaccounts/model_invoicesectionlistwithcreatesubpermissionresult.go deleted file mode 100644 index ab01d400e2d..00000000000 --- a/resource-manager/billing/2020-05-01/billingaccounts/model_invoicesectionlistwithcreatesubpermissionresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package billingaccounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InvoiceSectionListWithCreateSubPermissionResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]InvoiceSectionWithCreateSubPermission `json:"value,omitempty"` -} diff --git a/resource-manager/billing/2020-05-01/billingaccounts/predicates.go b/resource-manager/billing/2020-05-01/billingaccounts/predicates.go index 4694d5f5a0a..c88bb4b0590 100644 --- a/resource-manager/billing/2020-05-01/billingaccounts/predicates.go +++ b/resource-manager/billing/2020-05-01/billingaccounts/predicates.go @@ -26,13 +26,38 @@ func (p BillingAccountOperationPredicate) Matches(input BillingAccount) bool { return true } -type InvoiceSectionListWithCreateSubPermissionResultOperationPredicate struct { - NextLink *string +type InvoiceSectionWithCreateSubPermissionOperationPredicate struct { + BillingProfileDisplayName *string + BillingProfileId *string + BillingProfileSystemId *string + InvoiceSectionDisplayName *string + InvoiceSectionId *string + InvoiceSectionSystemId *string } -func (p InvoiceSectionListWithCreateSubPermissionResultOperationPredicate) Matches(input InvoiceSectionListWithCreateSubPermissionResult) bool { +func (p InvoiceSectionWithCreateSubPermissionOperationPredicate) Matches(input InvoiceSectionWithCreateSubPermission) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.BillingProfileDisplayName != nil && (input.BillingProfileDisplayName == nil || *p.BillingProfileDisplayName != *input.BillingProfileDisplayName) { + return false + } + + if p.BillingProfileId != nil && (input.BillingProfileId == nil || *p.BillingProfileId != *input.BillingProfileId) { + return false + } + + if p.BillingProfileSystemId != nil && (input.BillingProfileSystemId == nil || *p.BillingProfileSystemId != *input.BillingProfileSystemId) { + return false + } + + if p.InvoiceSectionDisplayName != nil && (input.InvoiceSectionDisplayName == nil || *p.InvoiceSectionDisplayName != *input.InvoiceSectionDisplayName) { + return false + } + + if p.InvoiceSectionId != nil && (input.InvoiceSectionId == nil || *p.InvoiceSectionId != *input.InvoiceSectionId) { + return false + } + + if p.InvoiceSectionSystemId != nil && (input.InvoiceSectionSystemId == nil || *p.InvoiceSectionSystemId != *input.InvoiceSectionSystemId) { return false } diff --git a/resource-manager/botservice/2022-09-15/listserviceproviders/README.md b/resource-manager/botservice/2022-09-15/listserviceproviders/README.md index 61ad525f43e..586208be76e 100644 --- a/resource-manager/botservice/2022-09-15/listserviceproviders/README.md +++ b/resource-manager/botservice/2022-09-15/listserviceproviders/README.md @@ -27,11 +27,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") -read, err := client.BotConnectionListServiceProviders(ctx, id) +// alternatively `client.BotConnectionListServiceProviders(ctx, id)` can be used to do batched pagination +items, err := client.BotConnectionListServiceProvidersComplete(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/botservice/2022-09-15/listserviceproviders/method_botconnectionlistserviceproviders.go b/resource-manager/botservice/2022-09-15/listserviceproviders/method_botconnectionlistserviceproviders.go index b722fbfdfc8..644a6bfa628 100644 --- a/resource-manager/botservice/2022-09-15/listserviceproviders/method_botconnectionlistserviceproviders.go +++ b/resource-manager/botservice/2022-09-15/listserviceproviders/method_botconnectionlistserviceproviders.go @@ -16,7 +16,12 @@ import ( type BotConnectionListServiceProvidersOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ServiceProviderResponseList + Model *[]ServiceProvider +} + +type BotConnectionListServiceProvidersCompleteResult struct { + LatestHttpResponse *http.Response + Items []ServiceProvider } // BotConnectionListServiceProviders ... @@ -36,7 +41,7 @@ func (c ListServiceProvidersClient) BotConnectionListServiceProviders(ctx contex } 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 @@ -45,12 +50,43 @@ func (c ListServiceProvidersClient) BotConnectionListServiceProviders(ctx contex return } - var model ServiceProviderResponseList - result.Model = &model + var values struct { + Values *[]ServiceProvider `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// BotConnectionListServiceProvidersComplete retrieves all the results into a single object +func (c ListServiceProvidersClient) BotConnectionListServiceProvidersComplete(ctx context.Context, id commonids.SubscriptionId) (BotConnectionListServiceProvidersCompleteResult, error) { + return c.BotConnectionListServiceProvidersCompleteMatchingPredicate(ctx, id, ServiceProviderOperationPredicate{}) +} + +// BotConnectionListServiceProvidersCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ListServiceProvidersClient) BotConnectionListServiceProvidersCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ServiceProviderOperationPredicate) (result BotConnectionListServiceProvidersCompleteResult, err error) { + items := make([]ServiceProvider, 0) + + resp, err := c.BotConnectionListServiceProviders(ctx, id) + if err != nil { + 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 = BotConnectionListServiceProvidersCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/botservice/2022-09-15/listserviceproviders/model_serviceproviderresponselist.go b/resource-manager/botservice/2022-09-15/listserviceproviders/predicates.go similarity index 55% rename from resource-manager/botservice/2022-09-15/listserviceproviders/model_serviceproviderresponselist.go rename to resource-manager/botservice/2022-09-15/listserviceproviders/predicates.go index 90dbd309025..bb5be8384d9 100644 --- a/resource-manager/botservice/2022-09-15/listserviceproviders/model_serviceproviderresponselist.go +++ b/resource-manager/botservice/2022-09-15/listserviceproviders/predicates.go @@ -3,7 +3,10 @@ package listserviceproviders // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ServiceProviderResponseList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ServiceProvider `json:"value,omitempty"` +type ServiceProviderOperationPredicate struct { +} + +func (p ServiceProviderOperationPredicate) Matches(input ServiceProvider) bool { + + return true } diff --git a/resource-manager/consumption/2019-10-01/charges/model_chargeslistresult.go b/resource-manager/consumption/2019-10-01/charges/model_chargeslistresult.go index 9e32e3f8fcb..21dc338d0c1 100644 --- a/resource-manager/consumption/2019-10-01/charges/model_chargeslistresult.go +++ b/resource-manager/consumption/2019-10-01/charges/model_chargeslistresult.go @@ -35,7 +35,7 @@ func (s *ChargesListResult) UnmarshalJSON(bytes []byte) error { } output = append(output, impl) } - s.Value = &output + s.Value = output } return nil } diff --git a/resource-manager/consumption/2021-10-01/charges/model_chargeslistresult.go b/resource-manager/consumption/2021-10-01/charges/model_chargeslistresult.go index 9e32e3f8fcb..21dc338d0c1 100644 --- a/resource-manager/consumption/2021-10-01/charges/model_chargeslistresult.go +++ b/resource-manager/consumption/2021-10-01/charges/model_chargeslistresult.go @@ -35,7 +35,7 @@ func (s *ChargesListResult) UnmarshalJSON(bytes []byte) error { } output = append(output, impl) } - s.Value = &output + s.Value = output } return nil } diff --git a/resource-manager/consumption/2022-09-01/charges/model_chargeslistresult.go b/resource-manager/consumption/2022-09-01/charges/model_chargeslistresult.go index 9e32e3f8fcb..21dc338d0c1 100644 --- a/resource-manager/consumption/2022-09-01/charges/model_chargeslistresult.go +++ b/resource-manager/consumption/2022-09-01/charges/model_chargeslistresult.go @@ -35,7 +35,7 @@ func (s *ChargesListResult) UnmarshalJSON(bytes []byte) error { } output = append(output, impl) } - s.Value = &output + s.Value = output } return nil } diff --git a/resource-manager/consumption/2023-05-01/charges/model_chargeslistresult.go b/resource-manager/consumption/2023-05-01/charges/model_chargeslistresult.go index 9e32e3f8fcb..21dc338d0c1 100644 --- a/resource-manager/consumption/2023-05-01/charges/model_chargeslistresult.go +++ b/resource-manager/consumption/2023-05-01/charges/model_chargeslistresult.go @@ -35,7 +35,7 @@ func (s *ChargesListResult) UnmarshalJSON(bytes []byte) error { } output = append(output, impl) } - s.Value = &output + s.Value = output } return nil } diff --git a/resource-manager/consumption/2023-11-01/charges/model_chargeslistresult.go b/resource-manager/consumption/2023-11-01/charges/model_chargeslistresult.go index 9e32e3f8fcb..21dc338d0c1 100644 --- a/resource-manager/consumption/2023-11-01/charges/model_chargeslistresult.go +++ b/resource-manager/consumption/2023-11-01/charges/model_chargeslistresult.go @@ -35,7 +35,7 @@ func (s *ChargesListResult) UnmarshalJSON(bytes []byte) error { } output = append(output, impl) } - s.Value = &output + s.Value = output } return nil } diff --git a/resource-manager/containerapps/2023-05-01/jobs/README.md b/resource-manager/containerapps/2023-05-01/jobs/README.md index 7e4d2d4b7c7..9ea27af9886 100644 --- a/resource-manager/containerapps/2023-05-01/jobs/README.md +++ b/resource-manager/containerapps/2023-05-01/jobs/README.md @@ -184,9 +184,14 @@ if err := client.StopExecutionThenPoll(ctx, id); err != nil { ctx := context.TODO() id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") -if err := client.StopMultipleExecutionsThenPoll(ctx, id); err != nil { +// alternatively `client.StopMultipleExecutions(ctx, id)` can be used to do batched pagination +items, err := client.StopMultipleExecutionsComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/containerapps/2023-05-01/jobs/method_stopmultipleexecutions.go b/resource-manager/containerapps/2023-05-01/jobs/method_stopmultipleexecutions.go index 639b11f016d..8f8ea6da61b 100644 --- a/resource-manager/containerapps/2023-05-01/jobs/method_stopmultipleexecutions.go +++ b/resource-manager/containerapps/2023-05-01/jobs/method_stopmultipleexecutions.go @@ -18,7 +18,12 @@ type StopMultipleExecutionsOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ContainerAppJobExecutions + Model *[]JobExecution +} + +type StopMultipleExecutionsCompleteResult struct { + LatestHttpResponse *http.Response + Items []JobExecution } // StopMultipleExecutions ... diff --git a/resource-manager/containerapps/2023-05-01/jobs/model_containerappjobexecutions.go b/resource-manager/containerapps/2023-05-01/jobs/model_containerappjobexecutions.go deleted file mode 100644 index f251e3a01d5..00000000000 --- a/resource-manager/containerapps/2023-05-01/jobs/model_containerappjobexecutions.go +++ /dev/null @@ -1,9 +0,0 @@ -package jobs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerAppJobExecutions struct { - NextLink *string `json:"nextLink,omitempty"` - Value []JobExecution `json:"value"` -} diff --git a/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_listevents.go b/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_listevents.go index 1b668691649..401daa1e86f 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_listevents.go +++ b/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_listevents.go @@ -15,12 +15,12 @@ import ( type ListEventsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]EventListResult + Model *[]Event } type ListEventsCompleteResult struct { LatestHttpResponse *http.Response - Items []EventListResult + Items []Event } // ListEvents ... @@ -50,7 +50,7 @@ func (c WebHooksClient) ListEvents(ctx context.Context, id WebHookId) (result Li } var values struct { - Values *[]EventListResult `json:"value"` + Values *[]Event `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c WebHooksClient) ListEvents(ctx context.Context, id WebHookId) (result Li // ListEventsComplete retrieves all the results into a single object func (c WebHooksClient) ListEventsComplete(ctx context.Context, id WebHookId) (ListEventsCompleteResult, error) { - return c.ListEventsCompleteMatchingPredicate(ctx, id, EventListResultOperationPredicate{}) + return c.ListEventsCompleteMatchingPredicate(ctx, id, EventOperationPredicate{}) } // ListEventsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebHooksClient) ListEventsCompleteMatchingPredicate(ctx context.Context, id WebHookId, predicate EventListResultOperationPredicate) (result ListEventsCompleteResult, err error) { - items := make([]EventListResult, 0) +func (c WebHooksClient) ListEventsCompleteMatchingPredicate(ctx context.Context, id WebHookId, predicate EventOperationPredicate) (result ListEventsCompleteResult, err error) { + items := make([]Event, 0) resp, err := c.ListEvents(ctx, id) if err != nil { diff --git a/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_eventlistresult.go b/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_eventlistresult.go deleted file mode 100644 index a108e84b1ce..00000000000 --- a/resource-manager/containerregistry/2021-08-01-preview/webhooks/model_eventlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package webhooks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EventListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]Event `json:"value,omitempty"` -} diff --git a/resource-manager/containerregistry/2021-08-01-preview/webhooks/predicates.go b/resource-manager/containerregistry/2021-08-01-preview/webhooks/predicates.go index 5c562d149cb..946905715c8 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/webhooks/predicates.go +++ b/resource-manager/containerregistry/2021-08-01-preview/webhooks/predicates.go @@ -3,13 +3,13 @@ package webhooks // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type EventListResultOperationPredicate struct { - NextLink *string +type EventOperationPredicate struct { + Id *string } -func (p EventListResultOperationPredicate) Matches(input EventListResult) bool { +func (p EventOperationPredicate) Matches(input Event) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } diff --git a/resource-manager/containerregistry/2022-12-01/webhooks/method_listevents.go b/resource-manager/containerregistry/2022-12-01/webhooks/method_listevents.go index 1b668691649..401daa1e86f 100644 --- a/resource-manager/containerregistry/2022-12-01/webhooks/method_listevents.go +++ b/resource-manager/containerregistry/2022-12-01/webhooks/method_listevents.go @@ -15,12 +15,12 @@ import ( type ListEventsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]EventListResult + Model *[]Event } type ListEventsCompleteResult struct { LatestHttpResponse *http.Response - Items []EventListResult + Items []Event } // ListEvents ... @@ -50,7 +50,7 @@ func (c WebHooksClient) ListEvents(ctx context.Context, id WebHookId) (result Li } var values struct { - Values *[]EventListResult `json:"value"` + Values *[]Event `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c WebHooksClient) ListEvents(ctx context.Context, id WebHookId) (result Li // ListEventsComplete retrieves all the results into a single object func (c WebHooksClient) ListEventsComplete(ctx context.Context, id WebHookId) (ListEventsCompleteResult, error) { - return c.ListEventsCompleteMatchingPredicate(ctx, id, EventListResultOperationPredicate{}) + return c.ListEventsCompleteMatchingPredicate(ctx, id, EventOperationPredicate{}) } // ListEventsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebHooksClient) ListEventsCompleteMatchingPredicate(ctx context.Context, id WebHookId, predicate EventListResultOperationPredicate) (result ListEventsCompleteResult, err error) { - items := make([]EventListResult, 0) +func (c WebHooksClient) ListEventsCompleteMatchingPredicate(ctx context.Context, id WebHookId, predicate EventOperationPredicate) (result ListEventsCompleteResult, err error) { + items := make([]Event, 0) resp, err := c.ListEvents(ctx, id) if err != nil { diff --git a/resource-manager/containerregistry/2022-12-01/webhooks/model_eventlistresult.go b/resource-manager/containerregistry/2022-12-01/webhooks/model_eventlistresult.go deleted file mode 100644 index a108e84b1ce..00000000000 --- a/resource-manager/containerregistry/2022-12-01/webhooks/model_eventlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package webhooks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EventListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]Event `json:"value,omitempty"` -} diff --git a/resource-manager/containerregistry/2022-12-01/webhooks/predicates.go b/resource-manager/containerregistry/2022-12-01/webhooks/predicates.go index 5c562d149cb..946905715c8 100644 --- a/resource-manager/containerregistry/2022-12-01/webhooks/predicates.go +++ b/resource-manager/containerregistry/2022-12-01/webhooks/predicates.go @@ -3,13 +3,13 @@ package webhooks // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type EventListResultOperationPredicate struct { - NextLink *string +type EventOperationPredicate struct { + Id *string } -func (p EventListResultOperationPredicate) Matches(input EventListResult) bool { +func (p EventOperationPredicate) Matches(input Event) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } diff --git a/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_listevents.go b/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_listevents.go index 1b668691649..401daa1e86f 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_listevents.go +++ b/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_listevents.go @@ -15,12 +15,12 @@ import ( type ListEventsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]EventListResult + Model *[]Event } type ListEventsCompleteResult struct { LatestHttpResponse *http.Response - Items []EventListResult + Items []Event } // ListEvents ... @@ -50,7 +50,7 @@ func (c WebHooksClient) ListEvents(ctx context.Context, id WebHookId) (result Li } var values struct { - Values *[]EventListResult `json:"value"` + Values *[]Event `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c WebHooksClient) ListEvents(ctx context.Context, id WebHookId) (result Li // ListEventsComplete retrieves all the results into a single object func (c WebHooksClient) ListEventsComplete(ctx context.Context, id WebHookId) (ListEventsCompleteResult, error) { - return c.ListEventsCompleteMatchingPredicate(ctx, id, EventListResultOperationPredicate{}) + return c.ListEventsCompleteMatchingPredicate(ctx, id, EventOperationPredicate{}) } // ListEventsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebHooksClient) ListEventsCompleteMatchingPredicate(ctx context.Context, id WebHookId, predicate EventListResultOperationPredicate) (result ListEventsCompleteResult, err error) { - items := make([]EventListResult, 0) +func (c WebHooksClient) ListEventsCompleteMatchingPredicate(ctx context.Context, id WebHookId, predicate EventOperationPredicate) (result ListEventsCompleteResult, err error) { + items := make([]Event, 0) resp, err := c.ListEvents(ctx, id) if err != nil { diff --git a/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_eventlistresult.go b/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_eventlistresult.go deleted file mode 100644 index a108e84b1ce..00000000000 --- a/resource-manager/containerregistry/2023-06-01-preview/webhooks/model_eventlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package webhooks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EventListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]Event `json:"value,omitempty"` -} diff --git a/resource-manager/containerregistry/2023-06-01-preview/webhooks/predicates.go b/resource-manager/containerregistry/2023-06-01-preview/webhooks/predicates.go index 5c562d149cb..946905715c8 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/webhooks/predicates.go +++ b/resource-manager/containerregistry/2023-06-01-preview/webhooks/predicates.go @@ -3,13 +3,13 @@ package webhooks // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type EventListResultOperationPredicate struct { - NextLink *string +type EventOperationPredicate struct { + Id *string } -func (p EventListResultOperationPredicate) Matches(input EventListResult) bool { +func (p EventOperationPredicate) Matches(input Event) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } diff --git a/resource-manager/containerregistry/2023-07-01/webhooks/method_listevents.go b/resource-manager/containerregistry/2023-07-01/webhooks/method_listevents.go index 1b668691649..401daa1e86f 100644 --- a/resource-manager/containerregistry/2023-07-01/webhooks/method_listevents.go +++ b/resource-manager/containerregistry/2023-07-01/webhooks/method_listevents.go @@ -15,12 +15,12 @@ import ( type ListEventsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]EventListResult + Model *[]Event } type ListEventsCompleteResult struct { LatestHttpResponse *http.Response - Items []EventListResult + Items []Event } // ListEvents ... @@ -50,7 +50,7 @@ func (c WebHooksClient) ListEvents(ctx context.Context, id WebHookId) (result Li } var values struct { - Values *[]EventListResult `json:"value"` + Values *[]Event `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c WebHooksClient) ListEvents(ctx context.Context, id WebHookId) (result Li // ListEventsComplete retrieves all the results into a single object func (c WebHooksClient) ListEventsComplete(ctx context.Context, id WebHookId) (ListEventsCompleteResult, error) { - return c.ListEventsCompleteMatchingPredicate(ctx, id, EventListResultOperationPredicate{}) + return c.ListEventsCompleteMatchingPredicate(ctx, id, EventOperationPredicate{}) } // ListEventsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebHooksClient) ListEventsCompleteMatchingPredicate(ctx context.Context, id WebHookId, predicate EventListResultOperationPredicate) (result ListEventsCompleteResult, err error) { - items := make([]EventListResult, 0) +func (c WebHooksClient) ListEventsCompleteMatchingPredicate(ctx context.Context, id WebHookId, predicate EventOperationPredicate) (result ListEventsCompleteResult, err error) { + items := make([]Event, 0) resp, err := c.ListEvents(ctx, id) if err != nil { diff --git a/resource-manager/containerregistry/2023-07-01/webhooks/model_eventlistresult.go b/resource-manager/containerregistry/2023-07-01/webhooks/model_eventlistresult.go deleted file mode 100644 index a108e84b1ce..00000000000 --- a/resource-manager/containerregistry/2023-07-01/webhooks/model_eventlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package webhooks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EventListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]Event `json:"value,omitempty"` -} diff --git a/resource-manager/containerregistry/2023-07-01/webhooks/predicates.go b/resource-manager/containerregistry/2023-07-01/webhooks/predicates.go index 5c562d149cb..946905715c8 100644 --- a/resource-manager/containerregistry/2023-07-01/webhooks/predicates.go +++ b/resource-manager/containerregistry/2023-07-01/webhooks/predicates.go @@ -3,13 +3,13 @@ package webhooks // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type EventListResultOperationPredicate struct { - NextLink *string +type EventOperationPredicate struct { + Id *string } -func (p EventListResultOperationPredicate) Matches(input EventListResult) bool { +func (p EventOperationPredicate) Matches(input Event) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } diff --git a/resource-manager/containerservice/2022-09-02-preview/fleets/model_fleethubprofile.go b/resource-manager/containerservice/2022-09-02-preview/fleets/model_fleethubprofile.go index 04ba31c71e7..dda498b252f 100644 --- a/resource-manager/containerservice/2022-09-02-preview/fleets/model_fleethubprofile.go +++ b/resource-manager/containerservice/2022-09-02-preview/fleets/model_fleethubprofile.go @@ -4,7 +4,7 @@ package fleets // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FleetHubProfile struct { - DnsPrefix *string `json:"dnsPrefix,omitempty"` + DnsPrefix string `json:"dnsPrefix"` Fqdn *string `json:"fqdn,omitempty"` KubernetesVersion *string `json:"kubernetesVersion,omitempty"` } diff --git a/resource-manager/costmanagement/2023-08-01/settings/model_settingslistresult.go b/resource-manager/costmanagement/2023-08-01/settings/model_settingslistresult.go index 8f112cedd41..c09794f524a 100644 --- a/resource-manager/costmanagement/2023-08-01/settings/model_settingslistresult.go +++ b/resource-manager/costmanagement/2023-08-01/settings/model_settingslistresult.go @@ -35,7 +35,7 @@ func (s *SettingsListResult) UnmarshalJSON(bytes []byte) error { } output = append(output, impl) } - s.Value = &output + s.Value = output } return nil } diff --git a/resource-manager/costmanagement/2023-11-01/settings/model_settingslistresult.go b/resource-manager/costmanagement/2023-11-01/settings/model_settingslistresult.go index 8f112cedd41..c09794f524a 100644 --- a/resource-manager/costmanagement/2023-11-01/settings/model_settingslistresult.go +++ b/resource-manager/costmanagement/2023-11-01/settings/model_settingslistresult.go @@ -35,7 +35,7 @@ func (s *SettingsListResult) UnmarshalJSON(bytes []byte) error { } output = append(output, impl) } - s.Value = &output + s.Value = output } return nil } diff --git a/resource-manager/dashboard/2023-09-01/grafanaplugin/README.md b/resource-manager/dashboard/2023-09-01/grafanaplugin/README.md index 069d210f897..44f5ead703a 100644 --- a/resource-manager/dashboard/2023-09-01/grafanaplugin/README.md +++ b/resource-manager/dashboard/2023-09-01/grafanaplugin/README.md @@ -26,11 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := grafanaplugin.NewGrafanaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "grafanaValue") -read, err := client.GrafanaFetchAvailablePlugins(ctx, id) +// alternatively `client.GrafanaFetchAvailablePlugins(ctx, id)` can be used to do batched pagination +items, err := client.GrafanaFetchAvailablePluginsComplete(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/dashboard/2023-09-01/grafanaplugin/method_grafanafetchavailableplugins.go b/resource-manager/dashboard/2023-09-01/grafanaplugin/method_grafanafetchavailableplugins.go index bd44f27b7a5..28ef83d9797 100644 --- a/resource-manager/dashboard/2023-09-01/grafanaplugin/method_grafanafetchavailableplugins.go +++ b/resource-manager/dashboard/2023-09-01/grafanaplugin/method_grafanafetchavailableplugins.go @@ -15,7 +15,12 @@ import ( type GrafanaFetchAvailablePluginsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *GrafanaAvailablePluginListResponse + Model *[]GrafanaAvailablePlugin +} + +type GrafanaFetchAvailablePluginsCompleteResult struct { + LatestHttpResponse *http.Response + Items []GrafanaAvailablePlugin } // GrafanaFetchAvailablePlugins ... @@ -35,7 +40,7 @@ func (c GrafanaPluginClient) GrafanaFetchAvailablePlugins(ctx context.Context, i } 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,12 +49,43 @@ func (c GrafanaPluginClient) GrafanaFetchAvailablePlugins(ctx context.Context, i return } - var model GrafanaAvailablePluginListResponse - result.Model = &model + var values struct { + Values *[]GrafanaAvailablePlugin `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// GrafanaFetchAvailablePluginsComplete retrieves all the results into a single object +func (c GrafanaPluginClient) GrafanaFetchAvailablePluginsComplete(ctx context.Context, id GrafanaId) (GrafanaFetchAvailablePluginsCompleteResult, error) { + return c.GrafanaFetchAvailablePluginsCompleteMatchingPredicate(ctx, id, GrafanaAvailablePluginOperationPredicate{}) +} + +// GrafanaFetchAvailablePluginsCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c GrafanaPluginClient) GrafanaFetchAvailablePluginsCompleteMatchingPredicate(ctx context.Context, id GrafanaId, predicate GrafanaAvailablePluginOperationPredicate) (result GrafanaFetchAvailablePluginsCompleteResult, err error) { + items := make([]GrafanaAvailablePlugin, 0) + + resp, err := c.GrafanaFetchAvailablePlugins(ctx, id) + if err != nil { + 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 = GrafanaFetchAvailablePluginsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/dashboard/2023-09-01/grafanaplugin/model_grafanaavailablepluginlistresponse.go b/resource-manager/dashboard/2023-09-01/grafanaplugin/model_grafanaavailablepluginlistresponse.go deleted file mode 100644 index 5863f7d8e89..00000000000 --- a/resource-manager/dashboard/2023-09-01/grafanaplugin/model_grafanaavailablepluginlistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package grafanaplugin - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GrafanaAvailablePluginListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]GrafanaAvailablePlugin `json:"value,omitempty"` -} diff --git a/resource-manager/dashboard/2023-09-01/grafanaplugin/predicates.go b/resource-manager/dashboard/2023-09-01/grafanaplugin/predicates.go new file mode 100644 index 00000000000..343481cd12b --- /dev/null +++ b/resource-manager/dashboard/2023-09-01/grafanaplugin/predicates.go @@ -0,0 +1,22 @@ +package grafanaplugin + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GrafanaAvailablePluginOperationPredicate struct { + Name *string + PluginId *string +} + +func (p GrafanaAvailablePluginOperationPredicate) Matches(input GrafanaAvailablePlugin) bool { + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.PluginId != nil && (input.PluginId == nil || *p.PluginId != *input.PluginId) { + return false + } + + return true +} diff --git a/resource-manager/datadog/2021-03-01/apikey/method_monitorslistapikeys.go b/resource-manager/datadog/2021-03-01/apikey/method_monitorslistapikeys.go index 994431ed409..30816be3339 100644 --- a/resource-manager/datadog/2021-03-01/apikey/method_monitorslistapikeys.go +++ b/resource-manager/datadog/2021-03-01/apikey/method_monitorslistapikeys.go @@ -15,12 +15,12 @@ import ( type MonitorsListApiKeysOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]DatadogApiKeyListResponse + Model *[]DatadogApiKey } type MonitorsListApiKeysCompleteResult struct { LatestHttpResponse *http.Response - Items []DatadogApiKeyListResponse + Items []DatadogApiKey } // MonitorsListApiKeys ... @@ -50,7 +50,7 @@ func (c ApiKeyClient) MonitorsListApiKeys(ctx context.Context, id MonitorId) (re } var values struct { - Values *[]DatadogApiKeyListResponse `json:"value"` + Values *[]DatadogApiKey `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c ApiKeyClient) MonitorsListApiKeys(ctx context.Context, id MonitorId) (re // MonitorsListApiKeysComplete retrieves all the results into a single object func (c ApiKeyClient) MonitorsListApiKeysComplete(ctx context.Context, id MonitorId) (MonitorsListApiKeysCompleteResult, error) { - return c.MonitorsListApiKeysCompleteMatchingPredicate(ctx, id, DatadogApiKeyListResponseOperationPredicate{}) + return c.MonitorsListApiKeysCompleteMatchingPredicate(ctx, id, DatadogApiKeyOperationPredicate{}) } // MonitorsListApiKeysCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApiKeyClient) MonitorsListApiKeysCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogApiKeyListResponseOperationPredicate) (result MonitorsListApiKeysCompleteResult, err error) { - items := make([]DatadogApiKeyListResponse, 0) +func (c ApiKeyClient) MonitorsListApiKeysCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogApiKeyOperationPredicate) (result MonitorsListApiKeysCompleteResult, err error) { + items := make([]DatadogApiKey, 0) resp, err := c.MonitorsListApiKeys(ctx, id) if err != nil { diff --git a/resource-manager/datadog/2021-03-01/apikey/model_datadogapikeylistresponse.go b/resource-manager/datadog/2021-03-01/apikey/model_datadogapikeylistresponse.go deleted file mode 100644 index ccffc10ac4a..00000000000 --- a/resource-manager/datadog/2021-03-01/apikey/model_datadogapikeylistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package apikey - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatadogApiKeyListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]DatadogApiKey `json:"value,omitempty"` -} diff --git a/resource-manager/datadog/2021-03-01/apikey/predicates.go b/resource-manager/datadog/2021-03-01/apikey/predicates.go index 87caaaeeeba..87f7ab5d1a2 100644 --- a/resource-manager/datadog/2021-03-01/apikey/predicates.go +++ b/resource-manager/datadog/2021-03-01/apikey/predicates.go @@ -3,13 +3,28 @@ package apikey // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type DatadogApiKeyListResponseOperationPredicate struct { - NextLink *string +type DatadogApiKeyOperationPredicate struct { + Created *string + CreatedBy *string + Key *string + Name *string } -func (p DatadogApiKeyListResponseOperationPredicate) Matches(input DatadogApiKeyListResponse) bool { +func (p DatadogApiKeyOperationPredicate) Matches(input DatadogApiKey) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Created != nil && (input.Created == nil || *p.Created != *input.Created) { + return false + } + + if p.CreatedBy != nil && (input.CreatedBy == nil || *p.CreatedBy != *input.CreatedBy) { + return false + } + + if p.Key != nil && *p.Key != input.Key { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { return false } diff --git a/resource-manager/datadog/2021-03-01/hosts/method_monitorslisthosts.go b/resource-manager/datadog/2021-03-01/hosts/method_monitorslisthosts.go index 6727cb3b291..e992cdf6999 100644 --- a/resource-manager/datadog/2021-03-01/hosts/method_monitorslisthosts.go +++ b/resource-manager/datadog/2021-03-01/hosts/method_monitorslisthosts.go @@ -15,12 +15,12 @@ import ( type MonitorsListHostsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]DatadogHostListResponse + Model *[]DatadogHost } type MonitorsListHostsCompleteResult struct { LatestHttpResponse *http.Response - Items []DatadogHostListResponse + Items []DatadogHost } // MonitorsListHosts ... @@ -50,7 +50,7 @@ func (c HostsClient) MonitorsListHosts(ctx context.Context, id MonitorId) (resul } var values struct { - Values *[]DatadogHostListResponse `json:"value"` + Values *[]DatadogHost `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c HostsClient) MonitorsListHosts(ctx context.Context, id MonitorId) (resul // MonitorsListHostsComplete retrieves all the results into a single object func (c HostsClient) MonitorsListHostsComplete(ctx context.Context, id MonitorId) (MonitorsListHostsCompleteResult, error) { - return c.MonitorsListHostsCompleteMatchingPredicate(ctx, id, DatadogHostListResponseOperationPredicate{}) + return c.MonitorsListHostsCompleteMatchingPredicate(ctx, id, DatadogHostOperationPredicate{}) } // MonitorsListHostsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HostsClient) MonitorsListHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogHostListResponseOperationPredicate) (result MonitorsListHostsCompleteResult, err error) { - items := make([]DatadogHostListResponse, 0) +func (c HostsClient) MonitorsListHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogHostOperationPredicate) (result MonitorsListHostsCompleteResult, err error) { + items := make([]DatadogHost, 0) resp, err := c.MonitorsListHosts(ctx, id) if err != nil { diff --git a/resource-manager/datadog/2021-03-01/hosts/model_datadoghostlistresponse.go b/resource-manager/datadog/2021-03-01/hosts/model_datadoghostlistresponse.go deleted file mode 100644 index 1b5e694a68c..00000000000 --- a/resource-manager/datadog/2021-03-01/hosts/model_datadoghostlistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package hosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatadogHostListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]DatadogHost `json:"value,omitempty"` -} diff --git a/resource-manager/datadog/2021-03-01/hosts/predicates.go b/resource-manager/datadog/2021-03-01/hosts/predicates.go index 5a2dca736ed..35bb78eed8b 100644 --- a/resource-manager/datadog/2021-03-01/hosts/predicates.go +++ b/resource-manager/datadog/2021-03-01/hosts/predicates.go @@ -3,13 +3,13 @@ package hosts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type DatadogHostListResponseOperationPredicate struct { - NextLink *string +type DatadogHostOperationPredicate struct { + Name *string } -func (p DatadogHostListResponseOperationPredicate) Matches(input DatadogHostListResponse) bool { +func (p DatadogHostOperationPredicate) Matches(input DatadogHost) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { return false } diff --git a/resource-manager/datadog/2021-03-01/linkedresources/method_monitorslistlinkedresources.go b/resource-manager/datadog/2021-03-01/linkedresources/method_monitorslistlinkedresources.go index 86940f340ec..da9073beae3 100644 --- a/resource-manager/datadog/2021-03-01/linkedresources/method_monitorslistlinkedresources.go +++ b/resource-manager/datadog/2021-03-01/linkedresources/method_monitorslistlinkedresources.go @@ -15,12 +15,12 @@ import ( type MonitorsListLinkedResourcesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]LinkedResourceListResponse + Model *[]LinkedResource } type MonitorsListLinkedResourcesCompleteResult struct { LatestHttpResponse *http.Response - Items []LinkedResourceListResponse + Items []LinkedResource } // MonitorsListLinkedResources ... @@ -50,7 +50,7 @@ func (c LinkedResourcesClient) MonitorsListLinkedResources(ctx context.Context, } var values struct { - Values *[]LinkedResourceListResponse `json:"value"` + Values *[]LinkedResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c LinkedResourcesClient) MonitorsListLinkedResources(ctx context.Context, // MonitorsListLinkedResourcesComplete retrieves all the results into a single object func (c LinkedResourcesClient) MonitorsListLinkedResourcesComplete(ctx context.Context, id MonitorId) (MonitorsListLinkedResourcesCompleteResult, error) { - return c.MonitorsListLinkedResourcesCompleteMatchingPredicate(ctx, id, LinkedResourceListResponseOperationPredicate{}) + return c.MonitorsListLinkedResourcesCompleteMatchingPredicate(ctx, id, LinkedResourceOperationPredicate{}) } // MonitorsListLinkedResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LinkedResourcesClient) MonitorsListLinkedResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate LinkedResourceListResponseOperationPredicate) (result MonitorsListLinkedResourcesCompleteResult, err error) { - items := make([]LinkedResourceListResponse, 0) +func (c LinkedResourcesClient) MonitorsListLinkedResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate LinkedResourceOperationPredicate) (result MonitorsListLinkedResourcesCompleteResult, err error) { + items := make([]LinkedResource, 0) resp, err := c.MonitorsListLinkedResources(ctx, id) if err != nil { diff --git a/resource-manager/datadog/2021-03-01/linkedresources/model_linkedresourcelistresponse.go b/resource-manager/datadog/2021-03-01/linkedresources/model_linkedresourcelistresponse.go deleted file mode 100644 index 62debf86251..00000000000 --- a/resource-manager/datadog/2021-03-01/linkedresources/model_linkedresourcelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package linkedresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LinkedResourceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]LinkedResource `json:"value,omitempty"` -} diff --git a/resource-manager/datadog/2021-03-01/linkedresources/predicates.go b/resource-manager/datadog/2021-03-01/linkedresources/predicates.go index 34fbccd9667..5cd8c05c33b 100644 --- a/resource-manager/datadog/2021-03-01/linkedresources/predicates.go +++ b/resource-manager/datadog/2021-03-01/linkedresources/predicates.go @@ -3,13 +3,13 @@ package linkedresources // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type LinkedResourceListResponseOperationPredicate struct { - NextLink *string +type LinkedResourceOperationPredicate struct { + Id *string } -func (p LinkedResourceListResponseOperationPredicate) Matches(input LinkedResourceListResponse) bool { +func (p LinkedResourceOperationPredicate) Matches(input LinkedResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } diff --git a/resource-manager/datadog/2021-03-01/monitoredresources/method_monitorslistmonitoredresources.go b/resource-manager/datadog/2021-03-01/monitoredresources/method_monitorslistmonitoredresources.go index 492558b81e2..2ef9fa02be8 100644 --- a/resource-manager/datadog/2021-03-01/monitoredresources/method_monitorslistmonitoredresources.go +++ b/resource-manager/datadog/2021-03-01/monitoredresources/method_monitorslistmonitoredresources.go @@ -15,12 +15,12 @@ import ( type MonitorsListMonitoredResourcesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]MonitoredResourceListResponse + Model *[]MonitoredResource } type MonitorsListMonitoredResourcesCompleteResult struct { LatestHttpResponse *http.Response - Items []MonitoredResourceListResponse + Items []MonitoredResource } // MonitorsListMonitoredResources ... @@ -50,7 +50,7 @@ func (c MonitoredResourcesClient) MonitorsListMonitoredResources(ctx context.Con } var values struct { - Values *[]MonitoredResourceListResponse `json:"value"` + Values *[]MonitoredResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitoredResourcesClient) MonitorsListMonitoredResources(ctx context.Con // MonitorsListMonitoredResourcesComplete retrieves all the results into a single object func (c MonitoredResourcesClient) MonitorsListMonitoredResourcesComplete(ctx context.Context, id MonitorId) (MonitorsListMonitoredResourcesCompleteResult, error) { - return c.MonitorsListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceListResponseOperationPredicate{}) + return c.MonitorsListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceOperationPredicate{}) } // MonitorsListMonitoredResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitoredResourcesClient) MonitorsListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceListResponseOperationPredicate) (result MonitorsListMonitoredResourcesCompleteResult, err error) { - items := make([]MonitoredResourceListResponse, 0) +func (c MonitoredResourcesClient) MonitorsListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceOperationPredicate) (result MonitorsListMonitoredResourcesCompleteResult, err error) { + items := make([]MonitoredResource, 0) resp, err := c.MonitorsListMonitoredResources(ctx, id) if err != nil { diff --git a/resource-manager/datadog/2021-03-01/monitoredresources/model_monitoredresourcelistresponse.go b/resource-manager/datadog/2021-03-01/monitoredresources/model_monitoredresourcelistresponse.go deleted file mode 100644 index 2cdbf7a85eb..00000000000 --- a/resource-manager/datadog/2021-03-01/monitoredresources/model_monitoredresourcelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitoredresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoredResourceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]MonitoredResource `json:"value,omitempty"` -} diff --git a/resource-manager/datadog/2021-03-01/monitoredresources/predicates.go b/resource-manager/datadog/2021-03-01/monitoredresources/predicates.go index 228d572c77f..0797c7a22d6 100644 --- a/resource-manager/datadog/2021-03-01/monitoredresources/predicates.go +++ b/resource-manager/datadog/2021-03-01/monitoredresources/predicates.go @@ -3,13 +3,33 @@ package monitoredresources // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type MonitoredResourceListResponseOperationPredicate struct { - NextLink *string +type MonitoredResourceOperationPredicate struct { + Id *string + ReasonForLogsStatus *string + ReasonForMetricsStatus *string + SendingLogs *bool + SendingMetrics *bool } -func (p MonitoredResourceListResponseOperationPredicate) Matches(input MonitoredResourceListResponse) bool { +func (p MonitoredResourceOperationPredicate) Matches(input MonitoredResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.ReasonForLogsStatus != nil && (input.ReasonForLogsStatus == nil || *p.ReasonForLogsStatus != *input.ReasonForLogsStatus) { + return false + } + + if p.ReasonForMetricsStatus != nil && (input.ReasonForMetricsStatus == nil || *p.ReasonForMetricsStatus != *input.ReasonForMetricsStatus) { + return false + } + + if p.SendingLogs != nil && (input.SendingLogs == nil || *p.SendingLogs != *input.SendingLogs) { + return false + } + + if p.SendingMetrics != nil && (input.SendingMetrics == nil || *p.SendingMetrics != *input.SendingMetrics) { return false } diff --git a/resource-manager/datadog/2022-06-01/apikey/method_monitorslistapikeys.go b/resource-manager/datadog/2022-06-01/apikey/method_monitorslistapikeys.go index 994431ed409..30816be3339 100644 --- a/resource-manager/datadog/2022-06-01/apikey/method_monitorslistapikeys.go +++ b/resource-manager/datadog/2022-06-01/apikey/method_monitorslistapikeys.go @@ -15,12 +15,12 @@ import ( type MonitorsListApiKeysOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]DatadogApiKeyListResponse + Model *[]DatadogApiKey } type MonitorsListApiKeysCompleteResult struct { LatestHttpResponse *http.Response - Items []DatadogApiKeyListResponse + Items []DatadogApiKey } // MonitorsListApiKeys ... @@ -50,7 +50,7 @@ func (c ApiKeyClient) MonitorsListApiKeys(ctx context.Context, id MonitorId) (re } var values struct { - Values *[]DatadogApiKeyListResponse `json:"value"` + Values *[]DatadogApiKey `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c ApiKeyClient) MonitorsListApiKeys(ctx context.Context, id MonitorId) (re // MonitorsListApiKeysComplete retrieves all the results into a single object func (c ApiKeyClient) MonitorsListApiKeysComplete(ctx context.Context, id MonitorId) (MonitorsListApiKeysCompleteResult, error) { - return c.MonitorsListApiKeysCompleteMatchingPredicate(ctx, id, DatadogApiKeyListResponseOperationPredicate{}) + return c.MonitorsListApiKeysCompleteMatchingPredicate(ctx, id, DatadogApiKeyOperationPredicate{}) } // MonitorsListApiKeysCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApiKeyClient) MonitorsListApiKeysCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogApiKeyListResponseOperationPredicate) (result MonitorsListApiKeysCompleteResult, err error) { - items := make([]DatadogApiKeyListResponse, 0) +func (c ApiKeyClient) MonitorsListApiKeysCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogApiKeyOperationPredicate) (result MonitorsListApiKeysCompleteResult, err error) { + items := make([]DatadogApiKey, 0) resp, err := c.MonitorsListApiKeys(ctx, id) if err != nil { diff --git a/resource-manager/datadog/2022-06-01/apikey/model_datadogapikeylistresponse.go b/resource-manager/datadog/2022-06-01/apikey/model_datadogapikeylistresponse.go deleted file mode 100644 index ccffc10ac4a..00000000000 --- a/resource-manager/datadog/2022-06-01/apikey/model_datadogapikeylistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package apikey - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatadogApiKeyListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]DatadogApiKey `json:"value,omitempty"` -} diff --git a/resource-manager/datadog/2022-06-01/apikey/predicates.go b/resource-manager/datadog/2022-06-01/apikey/predicates.go index 87caaaeeeba..87f7ab5d1a2 100644 --- a/resource-manager/datadog/2022-06-01/apikey/predicates.go +++ b/resource-manager/datadog/2022-06-01/apikey/predicates.go @@ -3,13 +3,28 @@ package apikey // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type DatadogApiKeyListResponseOperationPredicate struct { - NextLink *string +type DatadogApiKeyOperationPredicate struct { + Created *string + CreatedBy *string + Key *string + Name *string } -func (p DatadogApiKeyListResponseOperationPredicate) Matches(input DatadogApiKeyListResponse) bool { +func (p DatadogApiKeyOperationPredicate) Matches(input DatadogApiKey) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Created != nil && (input.Created == nil || *p.Created != *input.Created) { + return false + } + + if p.CreatedBy != nil && (input.CreatedBy == nil || *p.CreatedBy != *input.CreatedBy) { + return false + } + + if p.Key != nil && *p.Key != input.Key { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { return false } diff --git a/resource-manager/datadog/2022-06-01/hosts/method_monitorslisthosts.go b/resource-manager/datadog/2022-06-01/hosts/method_monitorslisthosts.go index 6727cb3b291..e992cdf6999 100644 --- a/resource-manager/datadog/2022-06-01/hosts/method_monitorslisthosts.go +++ b/resource-manager/datadog/2022-06-01/hosts/method_monitorslisthosts.go @@ -15,12 +15,12 @@ import ( type MonitorsListHostsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]DatadogHostListResponse + Model *[]DatadogHost } type MonitorsListHostsCompleteResult struct { LatestHttpResponse *http.Response - Items []DatadogHostListResponse + Items []DatadogHost } // MonitorsListHosts ... @@ -50,7 +50,7 @@ func (c HostsClient) MonitorsListHosts(ctx context.Context, id MonitorId) (resul } var values struct { - Values *[]DatadogHostListResponse `json:"value"` + Values *[]DatadogHost `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c HostsClient) MonitorsListHosts(ctx context.Context, id MonitorId) (resul // MonitorsListHostsComplete retrieves all the results into a single object func (c HostsClient) MonitorsListHostsComplete(ctx context.Context, id MonitorId) (MonitorsListHostsCompleteResult, error) { - return c.MonitorsListHostsCompleteMatchingPredicate(ctx, id, DatadogHostListResponseOperationPredicate{}) + return c.MonitorsListHostsCompleteMatchingPredicate(ctx, id, DatadogHostOperationPredicate{}) } // MonitorsListHostsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HostsClient) MonitorsListHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogHostListResponseOperationPredicate) (result MonitorsListHostsCompleteResult, err error) { - items := make([]DatadogHostListResponse, 0) +func (c HostsClient) MonitorsListHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogHostOperationPredicate) (result MonitorsListHostsCompleteResult, err error) { + items := make([]DatadogHost, 0) resp, err := c.MonitorsListHosts(ctx, id) if err != nil { diff --git a/resource-manager/datadog/2022-06-01/hosts/model_datadoghostlistresponse.go b/resource-manager/datadog/2022-06-01/hosts/model_datadoghostlistresponse.go deleted file mode 100644 index 1b5e694a68c..00000000000 --- a/resource-manager/datadog/2022-06-01/hosts/model_datadoghostlistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package hosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatadogHostListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]DatadogHost `json:"value,omitempty"` -} diff --git a/resource-manager/datadog/2022-06-01/hosts/predicates.go b/resource-manager/datadog/2022-06-01/hosts/predicates.go index 5a2dca736ed..35bb78eed8b 100644 --- a/resource-manager/datadog/2022-06-01/hosts/predicates.go +++ b/resource-manager/datadog/2022-06-01/hosts/predicates.go @@ -3,13 +3,13 @@ package hosts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type DatadogHostListResponseOperationPredicate struct { - NextLink *string +type DatadogHostOperationPredicate struct { + Name *string } -func (p DatadogHostListResponseOperationPredicate) Matches(input DatadogHostListResponse) bool { +func (p DatadogHostOperationPredicate) Matches(input DatadogHost) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { return false } diff --git a/resource-manager/datadog/2022-06-01/linkedresources/method_monitorslistlinkedresources.go b/resource-manager/datadog/2022-06-01/linkedresources/method_monitorslistlinkedresources.go index 86940f340ec..da9073beae3 100644 --- a/resource-manager/datadog/2022-06-01/linkedresources/method_monitorslistlinkedresources.go +++ b/resource-manager/datadog/2022-06-01/linkedresources/method_monitorslistlinkedresources.go @@ -15,12 +15,12 @@ import ( type MonitorsListLinkedResourcesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]LinkedResourceListResponse + Model *[]LinkedResource } type MonitorsListLinkedResourcesCompleteResult struct { LatestHttpResponse *http.Response - Items []LinkedResourceListResponse + Items []LinkedResource } // MonitorsListLinkedResources ... @@ -50,7 +50,7 @@ func (c LinkedResourcesClient) MonitorsListLinkedResources(ctx context.Context, } var values struct { - Values *[]LinkedResourceListResponse `json:"value"` + Values *[]LinkedResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c LinkedResourcesClient) MonitorsListLinkedResources(ctx context.Context, // MonitorsListLinkedResourcesComplete retrieves all the results into a single object func (c LinkedResourcesClient) MonitorsListLinkedResourcesComplete(ctx context.Context, id MonitorId) (MonitorsListLinkedResourcesCompleteResult, error) { - return c.MonitorsListLinkedResourcesCompleteMatchingPredicate(ctx, id, LinkedResourceListResponseOperationPredicate{}) + return c.MonitorsListLinkedResourcesCompleteMatchingPredicate(ctx, id, LinkedResourceOperationPredicate{}) } // MonitorsListLinkedResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LinkedResourcesClient) MonitorsListLinkedResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate LinkedResourceListResponseOperationPredicate) (result MonitorsListLinkedResourcesCompleteResult, err error) { - items := make([]LinkedResourceListResponse, 0) +func (c LinkedResourcesClient) MonitorsListLinkedResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate LinkedResourceOperationPredicate) (result MonitorsListLinkedResourcesCompleteResult, err error) { + items := make([]LinkedResource, 0) resp, err := c.MonitorsListLinkedResources(ctx, id) if err != nil { diff --git a/resource-manager/datadog/2022-06-01/linkedresources/model_linkedresourcelistresponse.go b/resource-manager/datadog/2022-06-01/linkedresources/model_linkedresourcelistresponse.go deleted file mode 100644 index 62debf86251..00000000000 --- a/resource-manager/datadog/2022-06-01/linkedresources/model_linkedresourcelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package linkedresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LinkedResourceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]LinkedResource `json:"value,omitempty"` -} diff --git a/resource-manager/datadog/2022-06-01/linkedresources/predicates.go b/resource-manager/datadog/2022-06-01/linkedresources/predicates.go index 34fbccd9667..5cd8c05c33b 100644 --- a/resource-manager/datadog/2022-06-01/linkedresources/predicates.go +++ b/resource-manager/datadog/2022-06-01/linkedresources/predicates.go @@ -3,13 +3,13 @@ package linkedresources // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type LinkedResourceListResponseOperationPredicate struct { - NextLink *string +type LinkedResourceOperationPredicate struct { + Id *string } -func (p LinkedResourceListResponseOperationPredicate) Matches(input LinkedResourceListResponse) bool { +func (p LinkedResourceOperationPredicate) Matches(input LinkedResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } diff --git a/resource-manager/datadog/2022-06-01/monitoredresources/method_monitorslistmonitoredresources.go b/resource-manager/datadog/2022-06-01/monitoredresources/method_monitorslistmonitoredresources.go index 492558b81e2..2ef9fa02be8 100644 --- a/resource-manager/datadog/2022-06-01/monitoredresources/method_monitorslistmonitoredresources.go +++ b/resource-manager/datadog/2022-06-01/monitoredresources/method_monitorslistmonitoredresources.go @@ -15,12 +15,12 @@ import ( type MonitorsListMonitoredResourcesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]MonitoredResourceListResponse + Model *[]MonitoredResource } type MonitorsListMonitoredResourcesCompleteResult struct { LatestHttpResponse *http.Response - Items []MonitoredResourceListResponse + Items []MonitoredResource } // MonitorsListMonitoredResources ... @@ -50,7 +50,7 @@ func (c MonitoredResourcesClient) MonitorsListMonitoredResources(ctx context.Con } var values struct { - Values *[]MonitoredResourceListResponse `json:"value"` + Values *[]MonitoredResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitoredResourcesClient) MonitorsListMonitoredResources(ctx context.Con // MonitorsListMonitoredResourcesComplete retrieves all the results into a single object func (c MonitoredResourcesClient) MonitorsListMonitoredResourcesComplete(ctx context.Context, id MonitorId) (MonitorsListMonitoredResourcesCompleteResult, error) { - return c.MonitorsListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceListResponseOperationPredicate{}) + return c.MonitorsListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceOperationPredicate{}) } // MonitorsListMonitoredResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitoredResourcesClient) MonitorsListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceListResponseOperationPredicate) (result MonitorsListMonitoredResourcesCompleteResult, err error) { - items := make([]MonitoredResourceListResponse, 0) +func (c MonitoredResourcesClient) MonitorsListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceOperationPredicate) (result MonitorsListMonitoredResourcesCompleteResult, err error) { + items := make([]MonitoredResource, 0) resp, err := c.MonitorsListMonitoredResources(ctx, id) if err != nil { diff --git a/resource-manager/datadog/2022-06-01/monitoredresources/model_monitoredresourcelistresponse.go b/resource-manager/datadog/2022-06-01/monitoredresources/model_monitoredresourcelistresponse.go deleted file mode 100644 index 2cdbf7a85eb..00000000000 --- a/resource-manager/datadog/2022-06-01/monitoredresources/model_monitoredresourcelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitoredresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoredResourceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]MonitoredResource `json:"value,omitempty"` -} diff --git a/resource-manager/datadog/2022-06-01/monitoredresources/predicates.go b/resource-manager/datadog/2022-06-01/monitoredresources/predicates.go index 228d572c77f..0797c7a22d6 100644 --- a/resource-manager/datadog/2022-06-01/monitoredresources/predicates.go +++ b/resource-manager/datadog/2022-06-01/monitoredresources/predicates.go @@ -3,13 +3,33 @@ package monitoredresources // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type MonitoredResourceListResponseOperationPredicate struct { - NextLink *string +type MonitoredResourceOperationPredicate struct { + Id *string + ReasonForLogsStatus *string + ReasonForMetricsStatus *string + SendingLogs *bool + SendingMetrics *bool } -func (p MonitoredResourceListResponseOperationPredicate) Matches(input MonitoredResourceListResponse) bool { +func (p MonitoredResourceOperationPredicate) Matches(input MonitoredResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.ReasonForLogsStatus != nil && (input.ReasonForLogsStatus == nil || *p.ReasonForLogsStatus != *input.ReasonForLogsStatus) { + return false + } + + if p.ReasonForMetricsStatus != nil && (input.ReasonForMetricsStatus == nil || *p.ReasonForMetricsStatus != *input.ReasonForMetricsStatus) { + return false + } + + if p.SendingLogs != nil && (input.SendingLogs == nil || *p.SendingLogs != *input.SendingLogs) { + return false + } + + if p.SendingMetrics != nil && (input.SendingMetrics == nil || *p.SendingMetrics != *input.SendingMetrics) { return false } diff --git a/resource-manager/datadog/2023-01-01/apikey/method_monitorslistapikeys.go b/resource-manager/datadog/2023-01-01/apikey/method_monitorslistapikeys.go index 994431ed409..30816be3339 100644 --- a/resource-manager/datadog/2023-01-01/apikey/method_monitorslistapikeys.go +++ b/resource-manager/datadog/2023-01-01/apikey/method_monitorslistapikeys.go @@ -15,12 +15,12 @@ import ( type MonitorsListApiKeysOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]DatadogApiKeyListResponse + Model *[]DatadogApiKey } type MonitorsListApiKeysCompleteResult struct { LatestHttpResponse *http.Response - Items []DatadogApiKeyListResponse + Items []DatadogApiKey } // MonitorsListApiKeys ... @@ -50,7 +50,7 @@ func (c ApiKeyClient) MonitorsListApiKeys(ctx context.Context, id MonitorId) (re } var values struct { - Values *[]DatadogApiKeyListResponse `json:"value"` + Values *[]DatadogApiKey `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c ApiKeyClient) MonitorsListApiKeys(ctx context.Context, id MonitorId) (re // MonitorsListApiKeysComplete retrieves all the results into a single object func (c ApiKeyClient) MonitorsListApiKeysComplete(ctx context.Context, id MonitorId) (MonitorsListApiKeysCompleteResult, error) { - return c.MonitorsListApiKeysCompleteMatchingPredicate(ctx, id, DatadogApiKeyListResponseOperationPredicate{}) + return c.MonitorsListApiKeysCompleteMatchingPredicate(ctx, id, DatadogApiKeyOperationPredicate{}) } // MonitorsListApiKeysCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApiKeyClient) MonitorsListApiKeysCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogApiKeyListResponseOperationPredicate) (result MonitorsListApiKeysCompleteResult, err error) { - items := make([]DatadogApiKeyListResponse, 0) +func (c ApiKeyClient) MonitorsListApiKeysCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogApiKeyOperationPredicate) (result MonitorsListApiKeysCompleteResult, err error) { + items := make([]DatadogApiKey, 0) resp, err := c.MonitorsListApiKeys(ctx, id) if err != nil { diff --git a/resource-manager/datadog/2023-01-01/apikey/model_datadogapikeylistresponse.go b/resource-manager/datadog/2023-01-01/apikey/model_datadogapikeylistresponse.go deleted file mode 100644 index ccffc10ac4a..00000000000 --- a/resource-manager/datadog/2023-01-01/apikey/model_datadogapikeylistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package apikey - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatadogApiKeyListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]DatadogApiKey `json:"value,omitempty"` -} diff --git a/resource-manager/datadog/2023-01-01/apikey/predicates.go b/resource-manager/datadog/2023-01-01/apikey/predicates.go index 87caaaeeeba..87f7ab5d1a2 100644 --- a/resource-manager/datadog/2023-01-01/apikey/predicates.go +++ b/resource-manager/datadog/2023-01-01/apikey/predicates.go @@ -3,13 +3,28 @@ package apikey // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type DatadogApiKeyListResponseOperationPredicate struct { - NextLink *string +type DatadogApiKeyOperationPredicate struct { + Created *string + CreatedBy *string + Key *string + Name *string } -func (p DatadogApiKeyListResponseOperationPredicate) Matches(input DatadogApiKeyListResponse) bool { +func (p DatadogApiKeyOperationPredicate) Matches(input DatadogApiKey) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Created != nil && (input.Created == nil || *p.Created != *input.Created) { + return false + } + + if p.CreatedBy != nil && (input.CreatedBy == nil || *p.CreatedBy != *input.CreatedBy) { + return false + } + + if p.Key != nil && *p.Key != input.Key { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { return false } diff --git a/resource-manager/datadog/2023-01-01/hosts/method_monitorslisthosts.go b/resource-manager/datadog/2023-01-01/hosts/method_monitorslisthosts.go index 6727cb3b291..e992cdf6999 100644 --- a/resource-manager/datadog/2023-01-01/hosts/method_monitorslisthosts.go +++ b/resource-manager/datadog/2023-01-01/hosts/method_monitorslisthosts.go @@ -15,12 +15,12 @@ import ( type MonitorsListHostsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]DatadogHostListResponse + Model *[]DatadogHost } type MonitorsListHostsCompleteResult struct { LatestHttpResponse *http.Response - Items []DatadogHostListResponse + Items []DatadogHost } // MonitorsListHosts ... @@ -50,7 +50,7 @@ func (c HostsClient) MonitorsListHosts(ctx context.Context, id MonitorId) (resul } var values struct { - Values *[]DatadogHostListResponse `json:"value"` + Values *[]DatadogHost `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c HostsClient) MonitorsListHosts(ctx context.Context, id MonitorId) (resul // MonitorsListHostsComplete retrieves all the results into a single object func (c HostsClient) MonitorsListHostsComplete(ctx context.Context, id MonitorId) (MonitorsListHostsCompleteResult, error) { - return c.MonitorsListHostsCompleteMatchingPredicate(ctx, id, DatadogHostListResponseOperationPredicate{}) + return c.MonitorsListHostsCompleteMatchingPredicate(ctx, id, DatadogHostOperationPredicate{}) } // MonitorsListHostsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HostsClient) MonitorsListHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogHostListResponseOperationPredicate) (result MonitorsListHostsCompleteResult, err error) { - items := make([]DatadogHostListResponse, 0) +func (c HostsClient) MonitorsListHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate DatadogHostOperationPredicate) (result MonitorsListHostsCompleteResult, err error) { + items := make([]DatadogHost, 0) resp, err := c.MonitorsListHosts(ctx, id) if err != nil { diff --git a/resource-manager/datadog/2023-01-01/hosts/model_datadoghostlistresponse.go b/resource-manager/datadog/2023-01-01/hosts/model_datadoghostlistresponse.go deleted file mode 100644 index 1b5e694a68c..00000000000 --- a/resource-manager/datadog/2023-01-01/hosts/model_datadoghostlistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package hosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatadogHostListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]DatadogHost `json:"value,omitempty"` -} diff --git a/resource-manager/datadog/2023-01-01/hosts/predicates.go b/resource-manager/datadog/2023-01-01/hosts/predicates.go index 5a2dca736ed..35bb78eed8b 100644 --- a/resource-manager/datadog/2023-01-01/hosts/predicates.go +++ b/resource-manager/datadog/2023-01-01/hosts/predicates.go @@ -3,13 +3,13 @@ package hosts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type DatadogHostListResponseOperationPredicate struct { - NextLink *string +type DatadogHostOperationPredicate struct { + Name *string } -func (p DatadogHostListResponseOperationPredicate) Matches(input DatadogHostListResponse) bool { +func (p DatadogHostOperationPredicate) Matches(input DatadogHost) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { return false } diff --git a/resource-manager/datadog/2023-01-01/linkedresources/method_monitorslistlinkedresources.go b/resource-manager/datadog/2023-01-01/linkedresources/method_monitorslistlinkedresources.go index 86940f340ec..da9073beae3 100644 --- a/resource-manager/datadog/2023-01-01/linkedresources/method_monitorslistlinkedresources.go +++ b/resource-manager/datadog/2023-01-01/linkedresources/method_monitorslistlinkedresources.go @@ -15,12 +15,12 @@ import ( type MonitorsListLinkedResourcesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]LinkedResourceListResponse + Model *[]LinkedResource } type MonitorsListLinkedResourcesCompleteResult struct { LatestHttpResponse *http.Response - Items []LinkedResourceListResponse + Items []LinkedResource } // MonitorsListLinkedResources ... @@ -50,7 +50,7 @@ func (c LinkedResourcesClient) MonitorsListLinkedResources(ctx context.Context, } var values struct { - Values *[]LinkedResourceListResponse `json:"value"` + Values *[]LinkedResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c LinkedResourcesClient) MonitorsListLinkedResources(ctx context.Context, // MonitorsListLinkedResourcesComplete retrieves all the results into a single object func (c LinkedResourcesClient) MonitorsListLinkedResourcesComplete(ctx context.Context, id MonitorId) (MonitorsListLinkedResourcesCompleteResult, error) { - return c.MonitorsListLinkedResourcesCompleteMatchingPredicate(ctx, id, LinkedResourceListResponseOperationPredicate{}) + return c.MonitorsListLinkedResourcesCompleteMatchingPredicate(ctx, id, LinkedResourceOperationPredicate{}) } // MonitorsListLinkedResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LinkedResourcesClient) MonitorsListLinkedResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate LinkedResourceListResponseOperationPredicate) (result MonitorsListLinkedResourcesCompleteResult, err error) { - items := make([]LinkedResourceListResponse, 0) +func (c LinkedResourcesClient) MonitorsListLinkedResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate LinkedResourceOperationPredicate) (result MonitorsListLinkedResourcesCompleteResult, err error) { + items := make([]LinkedResource, 0) resp, err := c.MonitorsListLinkedResources(ctx, id) if err != nil { diff --git a/resource-manager/datadog/2023-01-01/linkedresources/model_linkedresourcelistresponse.go b/resource-manager/datadog/2023-01-01/linkedresources/model_linkedresourcelistresponse.go deleted file mode 100644 index 62debf86251..00000000000 --- a/resource-manager/datadog/2023-01-01/linkedresources/model_linkedresourcelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package linkedresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LinkedResourceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]LinkedResource `json:"value,omitempty"` -} diff --git a/resource-manager/datadog/2023-01-01/linkedresources/predicates.go b/resource-manager/datadog/2023-01-01/linkedresources/predicates.go index 34fbccd9667..5cd8c05c33b 100644 --- a/resource-manager/datadog/2023-01-01/linkedresources/predicates.go +++ b/resource-manager/datadog/2023-01-01/linkedresources/predicates.go @@ -3,13 +3,13 @@ package linkedresources // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type LinkedResourceListResponseOperationPredicate struct { - NextLink *string +type LinkedResourceOperationPredicate struct { + Id *string } -func (p LinkedResourceListResponseOperationPredicate) Matches(input LinkedResourceListResponse) bool { +func (p LinkedResourceOperationPredicate) Matches(input LinkedResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } diff --git a/resource-manager/datadog/2023-01-01/monitoredresources/method_monitorslistmonitoredresources.go b/resource-manager/datadog/2023-01-01/monitoredresources/method_monitorslistmonitoredresources.go index 492558b81e2..2ef9fa02be8 100644 --- a/resource-manager/datadog/2023-01-01/monitoredresources/method_monitorslistmonitoredresources.go +++ b/resource-manager/datadog/2023-01-01/monitoredresources/method_monitorslistmonitoredresources.go @@ -15,12 +15,12 @@ import ( type MonitorsListMonitoredResourcesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]MonitoredResourceListResponse + Model *[]MonitoredResource } type MonitorsListMonitoredResourcesCompleteResult struct { LatestHttpResponse *http.Response - Items []MonitoredResourceListResponse + Items []MonitoredResource } // MonitorsListMonitoredResources ... @@ -50,7 +50,7 @@ func (c MonitoredResourcesClient) MonitorsListMonitoredResources(ctx context.Con } var values struct { - Values *[]MonitoredResourceListResponse `json:"value"` + Values *[]MonitoredResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitoredResourcesClient) MonitorsListMonitoredResources(ctx context.Con // MonitorsListMonitoredResourcesComplete retrieves all the results into a single object func (c MonitoredResourcesClient) MonitorsListMonitoredResourcesComplete(ctx context.Context, id MonitorId) (MonitorsListMonitoredResourcesCompleteResult, error) { - return c.MonitorsListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceListResponseOperationPredicate{}) + return c.MonitorsListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceOperationPredicate{}) } // MonitorsListMonitoredResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitoredResourcesClient) MonitorsListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceListResponseOperationPredicate) (result MonitorsListMonitoredResourcesCompleteResult, err error) { - items := make([]MonitoredResourceListResponse, 0) +func (c MonitoredResourcesClient) MonitorsListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceOperationPredicate) (result MonitorsListMonitoredResourcesCompleteResult, err error) { + items := make([]MonitoredResource, 0) resp, err := c.MonitorsListMonitoredResources(ctx, id) if err != nil { diff --git a/resource-manager/datadog/2023-01-01/monitoredresources/model_monitoredresourcelistresponse.go b/resource-manager/datadog/2023-01-01/monitoredresources/model_monitoredresourcelistresponse.go deleted file mode 100644 index 2cdbf7a85eb..00000000000 --- a/resource-manager/datadog/2023-01-01/monitoredresources/model_monitoredresourcelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitoredresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoredResourceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]MonitoredResource `json:"value,omitempty"` -} diff --git a/resource-manager/datadog/2023-01-01/monitoredresources/predicates.go b/resource-manager/datadog/2023-01-01/monitoredresources/predicates.go index 228d572c77f..0797c7a22d6 100644 --- a/resource-manager/datadog/2023-01-01/monitoredresources/predicates.go +++ b/resource-manager/datadog/2023-01-01/monitoredresources/predicates.go @@ -3,13 +3,33 @@ package monitoredresources // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type MonitoredResourceListResponseOperationPredicate struct { - NextLink *string +type MonitoredResourceOperationPredicate struct { + Id *string + ReasonForLogsStatus *string + ReasonForMetricsStatus *string + SendingLogs *bool + SendingMetrics *bool } -func (p MonitoredResourceListResponseOperationPredicate) Matches(input MonitoredResourceListResponse) bool { +func (p MonitoredResourceOperationPredicate) Matches(input MonitoredResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.ReasonForLogsStatus != nil && (input.ReasonForLogsStatus == nil || *p.ReasonForLogsStatus != *input.ReasonForLogsStatus) { + return false + } + + if p.ReasonForMetricsStatus != nil && (input.ReasonForMetricsStatus == nil || *p.ReasonForMetricsStatus != *input.ReasonForMetricsStatus) { + return false + } + + if p.SendingLogs != nil && (input.SendingLogs == nil || *p.SendingLogs != *input.SendingLogs) { + return false + } + + if p.SendingMetrics != nil && (input.SendingMetrics == nil || *p.SendingMetrics != *input.SendingMetrics) { return false } diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/method_querybyfactory.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/method_querybyfactory.go index 8867e1dbce4..22b8e96ad15 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/method_querybyfactory.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/method_querybyfactory.go @@ -15,12 +15,12 @@ import ( type QueryByFactoryOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]QueryDataFlowDebugSessionsResponse + Model *[]DataFlowDebugSessionInfo } type QueryByFactoryCompleteResult struct { LatestHttpResponse *http.Response - Items []QueryDataFlowDebugSessionsResponse + Items []DataFlowDebugSessionInfo } // QueryByFactory ... @@ -50,7 +50,7 @@ func (c DataFlowDebugSessionClient) QueryByFactory(ctx context.Context, id Facto } var values struct { - Values *[]QueryDataFlowDebugSessionsResponse `json:"value"` + Values *[]DataFlowDebugSessionInfo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c DataFlowDebugSessionClient) QueryByFactory(ctx context.Context, id Facto // QueryByFactoryComplete retrieves all the results into a single object func (c DataFlowDebugSessionClient) QueryByFactoryComplete(ctx context.Context, id FactoryId) (QueryByFactoryCompleteResult, error) { - return c.QueryByFactoryCompleteMatchingPredicate(ctx, id, QueryDataFlowDebugSessionsResponseOperationPredicate{}) + return c.QueryByFactoryCompleteMatchingPredicate(ctx, id, DataFlowDebugSessionInfoOperationPredicate{}) } // QueryByFactoryCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DataFlowDebugSessionClient) QueryByFactoryCompleteMatchingPredicate(ctx context.Context, id FactoryId, predicate QueryDataFlowDebugSessionsResponseOperationPredicate) (result QueryByFactoryCompleteResult, err error) { - items := make([]QueryDataFlowDebugSessionsResponse, 0) +func (c DataFlowDebugSessionClient) QueryByFactoryCompleteMatchingPredicate(ctx context.Context, id FactoryId, predicate DataFlowDebugSessionInfoOperationPredicate) (result QueryByFactoryCompleteResult, err error) { + items := make([]DataFlowDebugSessionInfo, 0) resp, err := c.QueryByFactory(ctx, id) if err != nil { diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_querydataflowdebugsessionsresponse.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_querydataflowdebugsessionsresponse.go deleted file mode 100644 index 54afc9560fe..00000000000 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_querydataflowdebugsessionsresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package dataflowdebugsession - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryDataFlowDebugSessionsResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]DataFlowDebugSessionInfo `json:"value,omitempty"` -} diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/predicates.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/predicates.go index 3727d9543c3..d9553acd46b 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/predicates.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/predicates.go @@ -3,13 +3,53 @@ package dataflowdebugsession // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type QueryDataFlowDebugSessionsResponseOperationPredicate struct { - NextLink *string +type DataFlowDebugSessionInfoOperationPredicate struct { + ComputeType *string + CoreCount *int64 + DataFlowName *string + IntegrationRuntimeName *string + LastActivityTime *string + NodeCount *int64 + SessionId *string + StartTime *string + TimeToLiveInMinutes *int64 } -func (p QueryDataFlowDebugSessionsResponseOperationPredicate) Matches(input QueryDataFlowDebugSessionsResponse) bool { +func (p DataFlowDebugSessionInfoOperationPredicate) Matches(input DataFlowDebugSessionInfo) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ComputeType != nil && (input.ComputeType == nil || *p.ComputeType != *input.ComputeType) { + return false + } + + if p.CoreCount != nil && (input.CoreCount == nil || *p.CoreCount != *input.CoreCount) { + return false + } + + if p.DataFlowName != nil && (input.DataFlowName == nil || *p.DataFlowName != *input.DataFlowName) { + return false + } + + if p.IntegrationRuntimeName != nil && (input.IntegrationRuntimeName == nil || *p.IntegrationRuntimeName != *input.IntegrationRuntimeName) { + return false + } + + if p.LastActivityTime != nil && (input.LastActivityTime == nil || *p.LastActivityTime != *input.LastActivityTime) { + return false + } + + if p.NodeCount != nil && (input.NodeCount == nil || *p.NodeCount != *input.NodeCount) { + return false + } + + if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { + return false + } + + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.TimeToLiveInMinutes != nil && (input.TimeToLiveInMinutes == nil || *p.TimeToLiveInMinutes != *input.TimeToLiveInMinutes) { return false } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/README.md b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/README.md index 6a3eb8cb0bd..922be3b8dfe 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/README.md +++ b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/README.md @@ -31,12 +31,13 @@ payload := integrationruntimeobjectmetadata.GetSsisObjectMetadataRequest{ } -read, err := client.Get(ctx, id, payload) +// alternatively `client.Get(ctx, id, payload)` can be used to do batched pagination +items, err := client.GetComplete(ctx, id, payload) 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/datafactory/2018-06-01/integrationruntimeobjectmetadata/method_get.go b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/method_get.go index 5ce756588b7..8729db07ee5 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/method_get.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/method_get.go @@ -15,7 +15,12 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SsisObjectMetadataListResponse + Model *[]SsisObjectMetadata +} + +type GetCompleteResult struct { + LatestHttpResponse *http.Response + Items []SsisObjectMetadata } // Get ... @@ -34,12 +39,8 @@ func (c IntegrationRuntimeObjectMetadataClient) Get(ctx context.Context, id Inte return } - if err = req.Marshal(input); err != nil { - return - } - 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 @@ -48,12 +49,43 @@ func (c IntegrationRuntimeObjectMetadataClient) Get(ctx context.Context, id Inte return } - var model SsisObjectMetadataListResponse - result.Model = &model + var values struct { + Values *[]SsisObjectMetadata `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// GetComplete retrieves all the results into a single object +func (c IntegrationRuntimeObjectMetadataClient) GetComplete(ctx context.Context, id IntegrationRuntimeId, input GetSsisObjectMetadataRequest) (GetCompleteResult, error) { + return c.GetCompleteMatchingPredicate(ctx, id, input, SsisObjectMetadataOperationPredicate{}) +} + +// GetCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c IntegrationRuntimeObjectMetadataClient) GetCompleteMatchingPredicate(ctx context.Context, id IntegrationRuntimeId, input GetSsisObjectMetadataRequest, predicate SsisObjectMetadataOperationPredicate) (result GetCompleteResult, err error) { + items := make([]SsisObjectMetadata, 0) + + resp, err := c.Get(ctx, id, input) + if err != nil { + 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 = GetCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/model_ssisobjectmetadatalistresponse.go b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/model_ssisobjectmetadatalistresponse.go deleted file mode 100644 index 8bf05982dc2..00000000000 --- a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/model_ssisobjectmetadatalistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package integrationruntimeobjectmetadata - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SsisObjectMetadataListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]SsisObjectMetadata `json:"value,omitempty"` -} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/predicates.go b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/predicates.go new file mode 100644 index 00000000000..460be444c09 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/predicates.go @@ -0,0 +1,27 @@ +package integrationruntimeobjectmetadata + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SsisObjectMetadataOperationPredicate struct { + Description *string + Id *int64 + Name *string +} + +func (p SsisObjectMetadataOperationPredicate) Matches(input SsisObjectMetadata) bool { + + if p.Description != nil && (input.Description == nil || *p.Description != *input.Description) { + return false + } + + 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 + } + + return true +} diff --git a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_listsastokens.go b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_listsastokens.go index 3749841f717..e3a519983e8 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_listsastokens.go +++ b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_listsastokens.go @@ -15,12 +15,12 @@ import ( type ListSasTokensOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SasTokenInformationListResult + Model *[]SasTokenInformation } type ListSasTokensCompleteResult struct { LatestHttpResponse *http.Response - Items []SasTokenInformationListResult + Items []SasTokenInformation } // ListSasTokens ... @@ -50,7 +50,7 @@ func (c StorageAccountsClient) ListSasTokens(ctx context.Context, id ContainerId } var values struct { - Values *[]SasTokenInformationListResult `json:"value"` + Values *[]SasTokenInformation `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c StorageAccountsClient) ListSasTokens(ctx context.Context, id ContainerId // ListSasTokensComplete retrieves all the results into a single object func (c StorageAccountsClient) ListSasTokensComplete(ctx context.Context, id ContainerId) (ListSasTokensCompleteResult, error) { - return c.ListSasTokensCompleteMatchingPredicate(ctx, id, SasTokenInformationListResultOperationPredicate{}) + return c.ListSasTokensCompleteMatchingPredicate(ctx, id, SasTokenInformationOperationPredicate{}) } // ListSasTokensCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StorageAccountsClient) ListSasTokensCompleteMatchingPredicate(ctx context.Context, id ContainerId, predicate SasTokenInformationListResultOperationPredicate) (result ListSasTokensCompleteResult, err error) { - items := make([]SasTokenInformationListResult, 0) +func (c StorageAccountsClient) ListSasTokensCompleteMatchingPredicate(ctx context.Context, id ContainerId, predicate SasTokenInformationOperationPredicate) (result ListSasTokensCompleteResult, err error) { + items := make([]SasTokenInformation, 0) resp, err := c.ListSasTokens(ctx, id) if err != nil { diff --git a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/model_sastokeninformationlistresult.go b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/model_sastokeninformationlistresult.go deleted file mode 100644 index 82880b76065..00000000000 --- a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/model_sastokeninformationlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package storageaccounts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SasTokenInformationListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]SasTokenInformation `json:"value,omitempty"` -} diff --git a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/predicates.go b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/predicates.go index d9019254661..e3d0203ec68 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/predicates.go +++ b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/predicates.go @@ -3,13 +3,13 @@ package storageaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type SasTokenInformationListResultOperationPredicate struct { - NextLink *string +type SasTokenInformationOperationPredicate struct { + AccessToken *string } -func (p SasTokenInformationListResultOperationPredicate) Matches(input SasTokenInformationListResult) bool { +func (p SasTokenInformationOperationPredicate) Matches(input SasTokenInformation) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.AccessToken != nil && (input.AccessToken == nil || *p.AccessToken != *input.AccessToken) { return false } diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskproperties.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskproperties.go index 153e30435eb..10c56764738 100644 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskproperties.go +++ b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskproperties.go @@ -79,7 +79,7 @@ func (s *MigrateSchemaSqlServerSqlDbTaskProperties) UnmarshalJSON(bytes []byte) } output = append(output, impl) } - s.Output = &output + s.Output = output } return nil } diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratemongodbtaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratemongodbtaskproperties.go index e033ce5c7bd..e4cb1bc4cdf 100644 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratemongodbtaskproperties.go +++ b/resource-manager/datamigration/2021-06-30/tasks/model_migratemongodbtaskproperties.go @@ -79,7 +79,7 @@ func (s *MigrateMongoDbTaskProperties) UnmarshalJSON(bytes []byte) error { } output = append(output, impl) } - s.Output = &output + s.Output = output } return nil } diff --git a/resource-manager/dataprotection/2023-11-01/dppjob/method_fetchcrossregionrestorejobslist.go b/resource-manager/dataprotection/2023-11-01/dppjob/method_fetchcrossregionrestorejobslist.go index c226b0f0c1e..533c244ffd8 100644 --- a/resource-manager/dataprotection/2023-11-01/dppjob/method_fetchcrossregionrestorejobslist.go +++ b/resource-manager/dataprotection/2023-11-01/dppjob/method_fetchcrossregionrestorejobslist.go @@ -15,12 +15,12 @@ import ( type FetchCrossRegionRestoreJobsListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]AzureBackupJobResourceList + Model *[]AzureBackupJobResource } type FetchCrossRegionRestoreJobsListCompleteResult struct { LatestHttpResponse *http.Response - Items []AzureBackupJobResourceList + Items []AzureBackupJobResource } type FetchCrossRegionRestoreJobsListOperationOptions struct { @@ -78,7 +78,7 @@ func (c DppJobClient) FetchCrossRegionRestoreJobsList(ctx context.Context, id Pr } var values struct { - Values *[]AzureBackupJobResourceList `json:"value"` + Values *[]AzureBackupJobResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -91,12 +91,12 @@ func (c DppJobClient) FetchCrossRegionRestoreJobsList(ctx context.Context, id Pr // FetchCrossRegionRestoreJobsListComplete retrieves all the results into a single object func (c DppJobClient) FetchCrossRegionRestoreJobsListComplete(ctx context.Context, id ProviderLocationId, input CrossRegionRestoreJobsRequest, options FetchCrossRegionRestoreJobsListOperationOptions) (FetchCrossRegionRestoreJobsListCompleteResult, error) { - return c.FetchCrossRegionRestoreJobsListCompleteMatchingPredicate(ctx, id, input, options, AzureBackupJobResourceListOperationPredicate{}) + return c.FetchCrossRegionRestoreJobsListCompleteMatchingPredicate(ctx, id, input, options, AzureBackupJobResourceOperationPredicate{}) } // FetchCrossRegionRestoreJobsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DppJobClient) FetchCrossRegionRestoreJobsListCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, input CrossRegionRestoreJobsRequest, options FetchCrossRegionRestoreJobsListOperationOptions, predicate AzureBackupJobResourceListOperationPredicate) (result FetchCrossRegionRestoreJobsListCompleteResult, err error) { - items := make([]AzureBackupJobResourceList, 0) +func (c DppJobClient) FetchCrossRegionRestoreJobsListCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, input CrossRegionRestoreJobsRequest, options FetchCrossRegionRestoreJobsListOperationOptions, predicate AzureBackupJobResourceOperationPredicate) (result FetchCrossRegionRestoreJobsListCompleteResult, err error) { + items := make([]AzureBackupJobResource, 0) resp, err := c.FetchCrossRegionRestoreJobsList(ctx, id, input, options) if err != nil { diff --git a/resource-manager/dataprotection/2023-11-01/dppjob/model_azurebackupjobresourcelist.go b/resource-manager/dataprotection/2023-11-01/dppjob/model_azurebackupjobresourcelist.go deleted file mode 100644 index 42d83d6214b..00000000000 --- a/resource-manager/dataprotection/2023-11-01/dppjob/model_azurebackupjobresourcelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package dppjob - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureBackupJobResourceList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]AzureBackupJobResource `json:"value,omitempty"` -} diff --git a/resource-manager/dataprotection/2023-11-01/dppjob/predicates.go b/resource-manager/dataprotection/2023-11-01/dppjob/predicates.go index 64dcc91b4b1..3a5fc03f205 100644 --- a/resource-manager/dataprotection/2023-11-01/dppjob/predicates.go +++ b/resource-manager/dataprotection/2023-11-01/dppjob/predicates.go @@ -3,13 +3,23 @@ package dppjob // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type AzureBackupJobResourceListOperationPredicate struct { - NextLink *string +type AzureBackupJobResourceOperationPredicate struct { + Id *string + Name *string + Type *string } -func (p AzureBackupJobResourceListOperationPredicate) Matches(input AzureBackupJobResourceList) bool { +func (p AzureBackupJobResourceOperationPredicate) Matches(input AzureBackupJobResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + 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 } diff --git a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/method_list.go b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/method_list.go index 89f3e628464..c12ef3ccd31 100644 --- a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/method_list.go +++ b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/method_list.go @@ -15,12 +15,12 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]AzureBackupRecoveryPointResourceList + Model *[]AzureBackupRecoveryPointResource } type ListCompleteResult struct { LatestHttpResponse *http.Response - Items []AzureBackupRecoveryPointResourceList + Items []AzureBackupRecoveryPointResource } type ListOperationOptions struct { @@ -78,7 +78,7 @@ func (c FetchSecondaryRecoveryPointsClient) List(ctx context.Context, id Provide } var values struct { - Values *[]AzureBackupRecoveryPointResourceList `json:"value"` + Values *[]AzureBackupRecoveryPointResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -91,12 +91,12 @@ func (c FetchSecondaryRecoveryPointsClient) List(ctx context.Context, id Provide // ListComplete retrieves all the results into a single object func (c FetchSecondaryRecoveryPointsClient) ListComplete(ctx context.Context, id ProviderLocationId, input FetchSecondaryRPsRequestParameters, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, input, options, AzureBackupRecoveryPointResourceListOperationPredicate{}) + return c.ListCompleteMatchingPredicate(ctx, id, input, options, AzureBackupRecoveryPointResourceOperationPredicate{}) } // ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c FetchSecondaryRecoveryPointsClient) ListCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, input FetchSecondaryRPsRequestParameters, options ListOperationOptions, predicate AzureBackupRecoveryPointResourceListOperationPredicate) (result ListCompleteResult, err error) { - items := make([]AzureBackupRecoveryPointResourceList, 0) +func (c FetchSecondaryRecoveryPointsClient) ListCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, input FetchSecondaryRPsRequestParameters, options ListOperationOptions, predicate AzureBackupRecoveryPointResourceOperationPredicate) (result ListCompleteResult, err error) { + items := make([]AzureBackupRecoveryPointResource, 0) resp, err := c.List(ctx, id, input, options) if err != nil { diff --git a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresourcelist.go b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresourcelist.go deleted file mode 100644 index 071778820f4..00000000000 --- a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresourcelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package fetchsecondaryrecoverypoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureBackupRecoveryPointResourceList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]AzureBackupRecoveryPointResource `json:"value,omitempty"` -} diff --git a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/predicates.go b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/predicates.go index 4c00f5ce375..b9a05d28a27 100644 --- a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/predicates.go +++ b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/predicates.go @@ -3,13 +3,23 @@ package fetchsecondaryrecoverypoints // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type AzureBackupRecoveryPointResourceListOperationPredicate struct { - NextLink *string +type AzureBackupRecoveryPointResourceOperationPredicate struct { + Id *string + Name *string + Type *string } -func (p AzureBackupRecoveryPointResourceListOperationPredicate) Matches(input AzureBackupRecoveryPointResourceList) bool { +func (p AzureBackupRecoveryPointResourceOperationPredicate) Matches(input AzureBackupRecoveryPointResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + 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 } diff --git a/resource-manager/dataprotection/2023-12-01/dppjob/method_fetchcrossregionrestorejobslist.go b/resource-manager/dataprotection/2023-12-01/dppjob/method_fetchcrossregionrestorejobslist.go index c226b0f0c1e..533c244ffd8 100644 --- a/resource-manager/dataprotection/2023-12-01/dppjob/method_fetchcrossregionrestorejobslist.go +++ b/resource-manager/dataprotection/2023-12-01/dppjob/method_fetchcrossregionrestorejobslist.go @@ -15,12 +15,12 @@ import ( type FetchCrossRegionRestoreJobsListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]AzureBackupJobResourceList + Model *[]AzureBackupJobResource } type FetchCrossRegionRestoreJobsListCompleteResult struct { LatestHttpResponse *http.Response - Items []AzureBackupJobResourceList + Items []AzureBackupJobResource } type FetchCrossRegionRestoreJobsListOperationOptions struct { @@ -78,7 +78,7 @@ func (c DppJobClient) FetchCrossRegionRestoreJobsList(ctx context.Context, id Pr } var values struct { - Values *[]AzureBackupJobResourceList `json:"value"` + Values *[]AzureBackupJobResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -91,12 +91,12 @@ func (c DppJobClient) FetchCrossRegionRestoreJobsList(ctx context.Context, id Pr // FetchCrossRegionRestoreJobsListComplete retrieves all the results into a single object func (c DppJobClient) FetchCrossRegionRestoreJobsListComplete(ctx context.Context, id ProviderLocationId, input CrossRegionRestoreJobsRequest, options FetchCrossRegionRestoreJobsListOperationOptions) (FetchCrossRegionRestoreJobsListCompleteResult, error) { - return c.FetchCrossRegionRestoreJobsListCompleteMatchingPredicate(ctx, id, input, options, AzureBackupJobResourceListOperationPredicate{}) + return c.FetchCrossRegionRestoreJobsListCompleteMatchingPredicate(ctx, id, input, options, AzureBackupJobResourceOperationPredicate{}) } // FetchCrossRegionRestoreJobsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DppJobClient) FetchCrossRegionRestoreJobsListCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, input CrossRegionRestoreJobsRequest, options FetchCrossRegionRestoreJobsListOperationOptions, predicate AzureBackupJobResourceListOperationPredicate) (result FetchCrossRegionRestoreJobsListCompleteResult, err error) { - items := make([]AzureBackupJobResourceList, 0) +func (c DppJobClient) FetchCrossRegionRestoreJobsListCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, input CrossRegionRestoreJobsRequest, options FetchCrossRegionRestoreJobsListOperationOptions, predicate AzureBackupJobResourceOperationPredicate) (result FetchCrossRegionRestoreJobsListCompleteResult, err error) { + items := make([]AzureBackupJobResource, 0) resp, err := c.FetchCrossRegionRestoreJobsList(ctx, id, input, options) if err != nil { diff --git a/resource-manager/dataprotection/2023-12-01/dppjob/model_azurebackupjobresourcelist.go b/resource-manager/dataprotection/2023-12-01/dppjob/model_azurebackupjobresourcelist.go deleted file mode 100644 index 42d83d6214b..00000000000 --- a/resource-manager/dataprotection/2023-12-01/dppjob/model_azurebackupjobresourcelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package dppjob - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureBackupJobResourceList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]AzureBackupJobResource `json:"value,omitempty"` -} diff --git a/resource-manager/dataprotection/2023-12-01/dppjob/predicates.go b/resource-manager/dataprotection/2023-12-01/dppjob/predicates.go index 64dcc91b4b1..3a5fc03f205 100644 --- a/resource-manager/dataprotection/2023-12-01/dppjob/predicates.go +++ b/resource-manager/dataprotection/2023-12-01/dppjob/predicates.go @@ -3,13 +3,23 @@ package dppjob // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type AzureBackupJobResourceListOperationPredicate struct { - NextLink *string +type AzureBackupJobResourceOperationPredicate struct { + Id *string + Name *string + Type *string } -func (p AzureBackupJobResourceListOperationPredicate) Matches(input AzureBackupJobResourceList) bool { +func (p AzureBackupJobResourceOperationPredicate) Matches(input AzureBackupJobResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + 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 } diff --git a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/method_list.go b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/method_list.go index 89f3e628464..c12ef3ccd31 100644 --- a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/method_list.go +++ b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/method_list.go @@ -15,12 +15,12 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]AzureBackupRecoveryPointResourceList + Model *[]AzureBackupRecoveryPointResource } type ListCompleteResult struct { LatestHttpResponse *http.Response - Items []AzureBackupRecoveryPointResourceList + Items []AzureBackupRecoveryPointResource } type ListOperationOptions struct { @@ -78,7 +78,7 @@ func (c FetchSecondaryRecoveryPointsClient) List(ctx context.Context, id Provide } var values struct { - Values *[]AzureBackupRecoveryPointResourceList `json:"value"` + Values *[]AzureBackupRecoveryPointResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -91,12 +91,12 @@ func (c FetchSecondaryRecoveryPointsClient) List(ctx context.Context, id Provide // ListComplete retrieves all the results into a single object func (c FetchSecondaryRecoveryPointsClient) ListComplete(ctx context.Context, id ProviderLocationId, input FetchSecondaryRPsRequestParameters, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, input, options, AzureBackupRecoveryPointResourceListOperationPredicate{}) + return c.ListCompleteMatchingPredicate(ctx, id, input, options, AzureBackupRecoveryPointResourceOperationPredicate{}) } // ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c FetchSecondaryRecoveryPointsClient) ListCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, input FetchSecondaryRPsRequestParameters, options ListOperationOptions, predicate AzureBackupRecoveryPointResourceListOperationPredicate) (result ListCompleteResult, err error) { - items := make([]AzureBackupRecoveryPointResourceList, 0) +func (c FetchSecondaryRecoveryPointsClient) ListCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, input FetchSecondaryRPsRequestParameters, options ListOperationOptions, predicate AzureBackupRecoveryPointResourceOperationPredicate) (result ListCompleteResult, err error) { + items := make([]AzureBackupRecoveryPointResource, 0) resp, err := c.List(ctx, id, input, options) if err != nil { diff --git a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresourcelist.go b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresourcelist.go deleted file mode 100644 index 071778820f4..00000000000 --- a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresourcelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package fetchsecondaryrecoverypoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureBackupRecoveryPointResourceList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]AzureBackupRecoveryPointResource `json:"value,omitempty"` -} diff --git a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/predicates.go b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/predicates.go index 4c00f5ce375..b9a05d28a27 100644 --- a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/predicates.go +++ b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/predicates.go @@ -3,13 +3,23 @@ package fetchsecondaryrecoverypoints // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type AzureBackupRecoveryPointResourceListOperationPredicate struct { - NextLink *string +type AzureBackupRecoveryPointResourceOperationPredicate struct { + Id *string + Name *string + Type *string } -func (p AzureBackupRecoveryPointResourceListOperationPredicate) Matches(input AzureBackupRecoveryPointResourceList) bool { +func (p AzureBackupRecoveryPointResourceOperationPredicate) Matches(input AzureBackupRecoveryPointResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + 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 } diff --git a/resource-manager/datashare/2019-11-01/share/method_listsynchronizationdetails.go b/resource-manager/datashare/2019-11-01/share/method_listsynchronizationdetails.go index ddb46c50dee..7ac41c0e6cb 100644 --- a/resource-manager/datashare/2019-11-01/share/method_listsynchronizationdetails.go +++ b/resource-manager/datashare/2019-11-01/share/method_listsynchronizationdetails.go @@ -15,12 +15,12 @@ import ( type ListSynchronizationDetailsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SynchronizationDetailsList + Model *[]SynchronizationDetails } type ListSynchronizationDetailsCompleteResult struct { LatestHttpResponse *http.Response - Items []SynchronizationDetailsList + Items []SynchronizationDetails } type ListSynchronizationDetailsOperationOptions struct { @@ -82,7 +82,7 @@ func (c ShareClient) ListSynchronizationDetails(ctx context.Context, id ShareId, } var values struct { - Values *[]SynchronizationDetailsList `json:"value"` + Values *[]SynchronizationDetails `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -95,12 +95,12 @@ func (c ShareClient) ListSynchronizationDetails(ctx context.Context, id ShareId, // ListSynchronizationDetailsComplete retrieves all the results into a single object func (c ShareClient) ListSynchronizationDetailsComplete(ctx context.Context, id ShareId, input ShareSynchronization, options ListSynchronizationDetailsOperationOptions) (ListSynchronizationDetailsCompleteResult, error) { - return c.ListSynchronizationDetailsCompleteMatchingPredicate(ctx, id, input, options, SynchronizationDetailsListOperationPredicate{}) + return c.ListSynchronizationDetailsCompleteMatchingPredicate(ctx, id, input, options, SynchronizationDetailsOperationPredicate{}) } // ListSynchronizationDetailsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ShareClient) ListSynchronizationDetailsCompleteMatchingPredicate(ctx context.Context, id ShareId, input ShareSynchronization, options ListSynchronizationDetailsOperationOptions, predicate SynchronizationDetailsListOperationPredicate) (result ListSynchronizationDetailsCompleteResult, err error) { - items := make([]SynchronizationDetailsList, 0) +func (c ShareClient) ListSynchronizationDetailsCompleteMatchingPredicate(ctx context.Context, id ShareId, input ShareSynchronization, options ListSynchronizationDetailsOperationOptions, predicate SynchronizationDetailsOperationPredicate) (result ListSynchronizationDetailsCompleteResult, err error) { + items := make([]SynchronizationDetails, 0) resp, err := c.ListSynchronizationDetails(ctx, id, input, options) if err != nil { diff --git a/resource-manager/datashare/2019-11-01/share/method_listsynchronizations.go b/resource-manager/datashare/2019-11-01/share/method_listsynchronizations.go index b9d1b5d79b0..e9eadeb82bb 100644 --- a/resource-manager/datashare/2019-11-01/share/method_listsynchronizations.go +++ b/resource-manager/datashare/2019-11-01/share/method_listsynchronizations.go @@ -15,12 +15,12 @@ import ( type ListSynchronizationsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ShareSynchronizationList + Model *[]ShareSynchronization } type ListSynchronizationsCompleteResult struct { LatestHttpResponse *http.Response - Items []ShareSynchronizationList + Items []ShareSynchronization } type ListSynchronizationsOperationOptions struct { @@ -82,7 +82,7 @@ func (c ShareClient) ListSynchronizations(ctx context.Context, id ShareId, optio } var values struct { - Values *[]ShareSynchronizationList `json:"value"` + Values *[]ShareSynchronization `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -95,12 +95,12 @@ func (c ShareClient) ListSynchronizations(ctx context.Context, id ShareId, optio // ListSynchronizationsComplete retrieves all the results into a single object func (c ShareClient) ListSynchronizationsComplete(ctx context.Context, id ShareId, options ListSynchronizationsOperationOptions) (ListSynchronizationsCompleteResult, error) { - return c.ListSynchronizationsCompleteMatchingPredicate(ctx, id, options, ShareSynchronizationListOperationPredicate{}) + return c.ListSynchronizationsCompleteMatchingPredicate(ctx, id, options, ShareSynchronizationOperationPredicate{}) } // ListSynchronizationsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ShareClient) ListSynchronizationsCompleteMatchingPredicate(ctx context.Context, id ShareId, options ListSynchronizationsOperationOptions, predicate ShareSynchronizationListOperationPredicate) (result ListSynchronizationsCompleteResult, err error) { - items := make([]ShareSynchronizationList, 0) +func (c ShareClient) ListSynchronizationsCompleteMatchingPredicate(ctx context.Context, id ShareId, options ListSynchronizationsOperationOptions, predicate ShareSynchronizationOperationPredicate) (result ListSynchronizationsCompleteResult, err error) { + items := make([]ShareSynchronization, 0) resp, err := c.ListSynchronizations(ctx, id, options) if err != nil { diff --git a/resource-manager/datashare/2019-11-01/share/model_sharesynchronizationlist.go b/resource-manager/datashare/2019-11-01/share/model_sharesynchronizationlist.go deleted file mode 100644 index f90c3473b77..00000000000 --- a/resource-manager/datashare/2019-11-01/share/model_sharesynchronizationlist.go +++ /dev/null @@ -1,9 +0,0 @@ -package share - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ShareSynchronizationList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []ShareSynchronization `json:"value"` -} diff --git a/resource-manager/datashare/2019-11-01/share/model_synchronizationdetailslist.go b/resource-manager/datashare/2019-11-01/share/model_synchronizationdetailslist.go deleted file mode 100644 index 826ad117ddf..00000000000 --- a/resource-manager/datashare/2019-11-01/share/model_synchronizationdetailslist.go +++ /dev/null @@ -1,9 +0,0 @@ -package share - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SynchronizationDetailsList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []SynchronizationDetails `json:"value"` -} diff --git a/resource-manager/datashare/2019-11-01/share/predicates.go b/resource-manager/datashare/2019-11-01/share/predicates.go index fc73f617c73..b2176d6514f 100644 --- a/resource-manager/datashare/2019-11-01/share/predicates.go +++ b/resource-manager/datashare/2019-11-01/share/predicates.go @@ -49,26 +49,131 @@ func (p ShareOperationPredicate) Matches(input Share) bool { return true } -type ShareSynchronizationListOperationPredicate struct { - NextLink *string +type ShareSynchronizationOperationPredicate struct { + ConsumerEmail *string + ConsumerName *string + ConsumerTenantName *string + DurationMs *int64 + EndTime *string + Message *string + StartTime *string + Status *string + SynchronizationId *string } -func (p ShareSynchronizationListOperationPredicate) Matches(input ShareSynchronizationList) bool { +func (p ShareSynchronizationOperationPredicate) Matches(input ShareSynchronization) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ConsumerEmail != nil && (input.ConsumerEmail == nil || *p.ConsumerEmail != *input.ConsumerEmail) { + return false + } + + if p.ConsumerName != nil && (input.ConsumerName == nil || *p.ConsumerName != *input.ConsumerName) { + return false + } + + if p.ConsumerTenantName != nil && (input.ConsumerTenantName == nil || *p.ConsumerTenantName != *input.ConsumerTenantName) { + return false + } + + if p.DurationMs != nil && (input.DurationMs == nil || *p.DurationMs != *input.DurationMs) { + return false + } + + if p.EndTime != nil && (input.EndTime == nil || *p.EndTime != *input.EndTime) { + return false + } + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } + + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.Status != nil && (input.Status == nil || *p.Status != *input.Status) { + return false + } + + if p.SynchronizationId != nil && (input.SynchronizationId == nil || *p.SynchronizationId != *input.SynchronizationId) { return false } return true } -type SynchronizationDetailsListOperationPredicate struct { - NextLink *string +type SynchronizationDetailsOperationPredicate struct { + DataSetId *string + DurationMs *int64 + EndTime *string + FilesRead *int64 + FilesWritten *int64 + Message *string + Name *string + RowsCopied *int64 + RowsRead *int64 + SizeRead *int64 + SizeWritten *int64 + StartTime *string + Status *string + VCore *int64 } -func (p SynchronizationDetailsListOperationPredicate) Matches(input SynchronizationDetailsList) bool { +func (p SynchronizationDetailsOperationPredicate) Matches(input SynchronizationDetails) bool { + + if p.DataSetId != nil && (input.DataSetId == nil || *p.DataSetId != *input.DataSetId) { + return false + } + + if p.DurationMs != nil && (input.DurationMs == nil || *p.DurationMs != *input.DurationMs) { + return false + } + + if p.EndTime != nil && (input.EndTime == nil || *p.EndTime != *input.EndTime) { + return false + } + + if p.FilesRead != nil && (input.FilesRead == nil || *p.FilesRead != *input.FilesRead) { + return false + } + + if p.FilesWritten != nil && (input.FilesWritten == nil || *p.FilesWritten != *input.FilesWritten) { + return false + } + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.RowsCopied != nil && (input.RowsCopied == nil || *p.RowsCopied != *input.RowsCopied) { + return false + } + + if p.RowsRead != nil && (input.RowsRead == nil || *p.RowsRead != *input.RowsRead) { + return false + } + + if p.SizeRead != nil && (input.SizeRead == nil || *p.SizeRead != *input.SizeRead) { + return false + } + + if p.SizeWritten != nil && (input.SizeWritten == nil || *p.SizeWritten != *input.SizeWritten) { + return false + } + + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.Status != nil && (input.Status == nil || *p.Status != *input.Status) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.VCore != nil && (input.VCore == nil || *p.VCore != *input.VCore) { return false } diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/method_listsourcesharesynchronizationsettings.go b/resource-manager/datashare/2019-11-01/sharesubscription/method_listsourcesharesynchronizationsettings.go index 1710c539581..87d98e79ce8 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/method_listsourcesharesynchronizationsettings.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/method_listsourcesharesynchronizationsettings.go @@ -2,6 +2,7 @@ package sharesubscription import ( "context" + "encoding/json" "fmt" "net/http" @@ -15,12 +16,12 @@ import ( type ListSourceShareSynchronizationSettingsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SourceShareSynchronizationSettingList + Model *[]SourceShareSynchronizationSetting } type ListSourceShareSynchronizationSettingsCompleteResult struct { LatestHttpResponse *http.Response - Items []SourceShareSynchronizationSettingList + Items []SourceShareSynchronizationSetting } // ListSourceShareSynchronizationSettings ... @@ -50,25 +51,36 @@ func (c ShareSubscriptionClient) ListSourceShareSynchronizationSettings(ctx cont } var values struct { - Values *[]SourceShareSynchronizationSettingList `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]SourceShareSynchronizationSetting, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalSourceShareSynchronizationSettingImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for SourceShareSynchronizationSetting (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } // ListSourceShareSynchronizationSettingsComplete retrieves all the results into a single object func (c ShareSubscriptionClient) ListSourceShareSynchronizationSettingsComplete(ctx context.Context, id ShareSubscriptionId) (ListSourceShareSynchronizationSettingsCompleteResult, error) { - return c.ListSourceShareSynchronizationSettingsCompleteMatchingPredicate(ctx, id, SourceShareSynchronizationSettingListOperationPredicate{}) + return c.ListSourceShareSynchronizationSettingsCompleteMatchingPredicate(ctx, id, SourceShareSynchronizationSettingOperationPredicate{}) } // ListSourceShareSynchronizationSettingsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ShareSubscriptionClient) ListSourceShareSynchronizationSettingsCompleteMatchingPredicate(ctx context.Context, id ShareSubscriptionId, predicate SourceShareSynchronizationSettingListOperationPredicate) (result ListSourceShareSynchronizationSettingsCompleteResult, err error) { - items := make([]SourceShareSynchronizationSettingList, 0) +func (c ShareSubscriptionClient) ListSourceShareSynchronizationSettingsCompleteMatchingPredicate(ctx context.Context, id ShareSubscriptionId, predicate SourceShareSynchronizationSettingOperationPredicate) (result ListSourceShareSynchronizationSettingsCompleteResult, err error) { + items := make([]SourceShareSynchronizationSetting, 0) resp, err := c.ListSourceShareSynchronizationSettings(ctx, id) if err != nil { diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizationdetails.go b/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizationdetails.go index 671adcce2ff..ae7ddc8b493 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizationdetails.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizationdetails.go @@ -15,12 +15,12 @@ import ( type ListSynchronizationDetailsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SynchronizationDetailsList + Model *[]SynchronizationDetails } type ListSynchronizationDetailsCompleteResult struct { LatestHttpResponse *http.Response - Items []SynchronizationDetailsList + Items []SynchronizationDetails } type ListSynchronizationDetailsOperationOptions struct { @@ -82,7 +82,7 @@ func (c ShareSubscriptionClient) ListSynchronizationDetails(ctx context.Context, } var values struct { - Values *[]SynchronizationDetailsList `json:"value"` + Values *[]SynchronizationDetails `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -95,12 +95,12 @@ func (c ShareSubscriptionClient) ListSynchronizationDetails(ctx context.Context, // ListSynchronizationDetailsComplete retrieves all the results into a single object func (c ShareSubscriptionClient) ListSynchronizationDetailsComplete(ctx context.Context, id ShareSubscriptionId, input ShareSubscriptionSynchronization, options ListSynchronizationDetailsOperationOptions) (ListSynchronizationDetailsCompleteResult, error) { - return c.ListSynchronizationDetailsCompleteMatchingPredicate(ctx, id, input, options, SynchronizationDetailsListOperationPredicate{}) + return c.ListSynchronizationDetailsCompleteMatchingPredicate(ctx, id, input, options, SynchronizationDetailsOperationPredicate{}) } // ListSynchronizationDetailsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ShareSubscriptionClient) ListSynchronizationDetailsCompleteMatchingPredicate(ctx context.Context, id ShareSubscriptionId, input ShareSubscriptionSynchronization, options ListSynchronizationDetailsOperationOptions, predicate SynchronizationDetailsListOperationPredicate) (result ListSynchronizationDetailsCompleteResult, err error) { - items := make([]SynchronizationDetailsList, 0) +func (c ShareSubscriptionClient) ListSynchronizationDetailsCompleteMatchingPredicate(ctx context.Context, id ShareSubscriptionId, input ShareSubscriptionSynchronization, options ListSynchronizationDetailsOperationOptions, predicate SynchronizationDetailsOperationPredicate) (result ListSynchronizationDetailsCompleteResult, err error) { + items := make([]SynchronizationDetails, 0) resp, err := c.ListSynchronizationDetails(ctx, id, input, options) if err != nil { diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizations.go b/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizations.go index d8c61917b43..eddaddf1867 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizations.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizations.go @@ -15,12 +15,12 @@ import ( type ListSynchronizationsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ShareSubscriptionSynchronizationList + Model *[]ShareSubscriptionSynchronization } type ListSynchronizationsCompleteResult struct { LatestHttpResponse *http.Response - Items []ShareSubscriptionSynchronizationList + Items []ShareSubscriptionSynchronization } type ListSynchronizationsOperationOptions struct { @@ -82,7 +82,7 @@ func (c ShareSubscriptionClient) ListSynchronizations(ctx context.Context, id Sh } var values struct { - Values *[]ShareSubscriptionSynchronizationList `json:"value"` + Values *[]ShareSubscriptionSynchronization `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -95,12 +95,12 @@ func (c ShareSubscriptionClient) ListSynchronizations(ctx context.Context, id Sh // ListSynchronizationsComplete retrieves all the results into a single object func (c ShareSubscriptionClient) ListSynchronizationsComplete(ctx context.Context, id ShareSubscriptionId, options ListSynchronizationsOperationOptions) (ListSynchronizationsCompleteResult, error) { - return c.ListSynchronizationsCompleteMatchingPredicate(ctx, id, options, ShareSubscriptionSynchronizationListOperationPredicate{}) + return c.ListSynchronizationsCompleteMatchingPredicate(ctx, id, options, ShareSubscriptionSynchronizationOperationPredicate{}) } // ListSynchronizationsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ShareSubscriptionClient) ListSynchronizationsCompleteMatchingPredicate(ctx context.Context, id ShareSubscriptionId, options ListSynchronizationsOperationOptions, predicate ShareSubscriptionSynchronizationListOperationPredicate) (result ListSynchronizationsCompleteResult, err error) { - items := make([]ShareSubscriptionSynchronizationList, 0) +func (c ShareSubscriptionClient) ListSynchronizationsCompleteMatchingPredicate(ctx context.Context, id ShareSubscriptionId, options ListSynchronizationsOperationOptions, predicate ShareSubscriptionSynchronizationOperationPredicate) (result ListSynchronizationsCompleteResult, err error) { + items := make([]ShareSubscriptionSynchronization, 0) resp, err := c.ListSynchronizations(ctx, id, options) if err != nil { diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/model_sharesubscriptionsynchronizationlist.go b/resource-manager/datashare/2019-11-01/sharesubscription/model_sharesubscriptionsynchronizationlist.go deleted file mode 100644 index 4575b4acc59..00000000000 --- a/resource-manager/datashare/2019-11-01/sharesubscription/model_sharesubscriptionsynchronizationlist.go +++ /dev/null @@ -1,9 +0,0 @@ -package sharesubscription - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ShareSubscriptionSynchronizationList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []ShareSubscriptionSynchronization `json:"value"` -} diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/model_sourcesharesynchronizationsettinglist.go b/resource-manager/datashare/2019-11-01/sharesubscription/model_sourcesharesynchronizationsettinglist.go deleted file mode 100644 index 4fc02cf5818..00000000000 --- a/resource-manager/datashare/2019-11-01/sharesubscription/model_sourcesharesynchronizationsettinglist.go +++ /dev/null @@ -1,49 +0,0 @@ -package sharesubscription - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SourceShareSynchronizationSettingList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []SourceShareSynchronizationSetting `json:"value"` -} - -var _ json.Unmarshaler = &SourceShareSynchronizationSettingList{} - -func (s *SourceShareSynchronizationSettingList) UnmarshalJSON(bytes []byte) error { - type alias SourceShareSynchronizationSettingList - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into SourceShareSynchronizationSettingList: %+v", err) - } - - s.NextLink = decoded.NextLink - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling SourceShareSynchronizationSettingList into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]SourceShareSynchronizationSetting, 0) - for i, val := range listTemp { - impl, err := unmarshalSourceShareSynchronizationSettingImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'SourceShareSynchronizationSettingList': %+v", i, err) - } - output = append(output, impl) - } - s.Value = output - } - return nil -} diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/model_synchronizationdetailslist.go b/resource-manager/datashare/2019-11-01/sharesubscription/model_synchronizationdetailslist.go deleted file mode 100644 index cfd3c1edcc4..00000000000 --- a/resource-manager/datashare/2019-11-01/sharesubscription/model_synchronizationdetailslist.go +++ /dev/null @@ -1,9 +0,0 @@ -package sharesubscription - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SynchronizationDetailsList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []SynchronizationDetails `json:"value"` -} diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/predicates.go b/resource-manager/datashare/2019-11-01/sharesubscription/predicates.go index 586eab1df08..403a5d60ca5 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/predicates.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/predicates.go @@ -49,39 +49,124 @@ func (p ShareSubscriptionOperationPredicate) Matches(input ShareSubscription) bo return true } -type ShareSubscriptionSynchronizationListOperationPredicate struct { - NextLink *string +type ShareSubscriptionSynchronizationOperationPredicate struct { + DurationMs *int64 + EndTime *string + Message *string + StartTime *string + Status *string + SynchronizationId *string } -func (p ShareSubscriptionSynchronizationListOperationPredicate) Matches(input ShareSubscriptionSynchronizationList) bool { +func (p ShareSubscriptionSynchronizationOperationPredicate) Matches(input ShareSubscriptionSynchronization) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.DurationMs != nil && (input.DurationMs == nil || *p.DurationMs != *input.DurationMs) { return false } - return true -} + if p.EndTime != nil && (input.EndTime == nil || *p.EndTime != *input.EndTime) { + return false + } -type SourceShareSynchronizationSettingListOperationPredicate struct { - NextLink *string -} + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } -func (p SourceShareSynchronizationSettingListOperationPredicate) Matches(input SourceShareSynchronizationSettingList) bool { + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.Status != nil && (input.Status == nil || *p.Status != *input.Status) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.SynchronizationId != nil && *p.SynchronizationId != input.SynchronizationId { return false } return true } -type SynchronizationDetailsListOperationPredicate struct { - NextLink *string +type SourceShareSynchronizationSettingOperationPredicate struct { } -func (p SynchronizationDetailsListOperationPredicate) Matches(input SynchronizationDetailsList) bool { +func (p SourceShareSynchronizationSettingOperationPredicate) Matches(input SourceShareSynchronizationSetting) bool { + + return true +} + +type SynchronizationDetailsOperationPredicate struct { + DataSetId *string + DurationMs *int64 + EndTime *string + FilesRead *int64 + FilesWritten *int64 + Message *string + Name *string + RowsCopied *int64 + RowsRead *int64 + SizeRead *int64 + SizeWritten *int64 + StartTime *string + Status *string + VCore *int64 +} + +func (p SynchronizationDetailsOperationPredicate) Matches(input SynchronizationDetails) bool { + + if p.DataSetId != nil && (input.DataSetId == nil || *p.DataSetId != *input.DataSetId) { + return false + } + + if p.DurationMs != nil && (input.DurationMs == nil || *p.DurationMs != *input.DurationMs) { + return false + } + + if p.EndTime != nil && (input.EndTime == nil || *p.EndTime != *input.EndTime) { + return false + } + + if p.FilesRead != nil && (input.FilesRead == nil || *p.FilesRead != *input.FilesRead) { + return false + } + + if p.FilesWritten != nil && (input.FilesWritten == nil || *p.FilesWritten != *input.FilesWritten) { + return false + } + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.RowsCopied != nil && (input.RowsCopied == nil || *p.RowsCopied != *input.RowsCopied) { + return false + } + + if p.RowsRead != nil && (input.RowsRead == nil || *p.RowsRead != *input.RowsRead) { + return false + } + + if p.SizeRead != nil && (input.SizeRead == nil || *p.SizeRead != *input.SizeRead) { + return false + } + + if p.SizeWritten != nil && (input.SizeWritten == nil || *p.SizeWritten != *input.SizeWritten) { + return false + } + + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.Status != nil && (input.Status == nil || *p.Status != *input.Status) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.VCore != nil && (input.VCore == nil || *p.VCore != *input.VCore) { return false } diff --git a/resource-manager/datashare/2021-08-01/share/method_listsynchronizationdetails.go b/resource-manager/datashare/2021-08-01/share/method_listsynchronizationdetails.go index ddb46c50dee..7ac41c0e6cb 100644 --- a/resource-manager/datashare/2021-08-01/share/method_listsynchronizationdetails.go +++ b/resource-manager/datashare/2021-08-01/share/method_listsynchronizationdetails.go @@ -15,12 +15,12 @@ import ( type ListSynchronizationDetailsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SynchronizationDetailsList + Model *[]SynchronizationDetails } type ListSynchronizationDetailsCompleteResult struct { LatestHttpResponse *http.Response - Items []SynchronizationDetailsList + Items []SynchronizationDetails } type ListSynchronizationDetailsOperationOptions struct { @@ -82,7 +82,7 @@ func (c ShareClient) ListSynchronizationDetails(ctx context.Context, id ShareId, } var values struct { - Values *[]SynchronizationDetailsList `json:"value"` + Values *[]SynchronizationDetails `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -95,12 +95,12 @@ func (c ShareClient) ListSynchronizationDetails(ctx context.Context, id ShareId, // ListSynchronizationDetailsComplete retrieves all the results into a single object func (c ShareClient) ListSynchronizationDetailsComplete(ctx context.Context, id ShareId, input ShareSynchronization, options ListSynchronizationDetailsOperationOptions) (ListSynchronizationDetailsCompleteResult, error) { - return c.ListSynchronizationDetailsCompleteMatchingPredicate(ctx, id, input, options, SynchronizationDetailsListOperationPredicate{}) + return c.ListSynchronizationDetailsCompleteMatchingPredicate(ctx, id, input, options, SynchronizationDetailsOperationPredicate{}) } // ListSynchronizationDetailsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ShareClient) ListSynchronizationDetailsCompleteMatchingPredicate(ctx context.Context, id ShareId, input ShareSynchronization, options ListSynchronizationDetailsOperationOptions, predicate SynchronizationDetailsListOperationPredicate) (result ListSynchronizationDetailsCompleteResult, err error) { - items := make([]SynchronizationDetailsList, 0) +func (c ShareClient) ListSynchronizationDetailsCompleteMatchingPredicate(ctx context.Context, id ShareId, input ShareSynchronization, options ListSynchronizationDetailsOperationOptions, predicate SynchronizationDetailsOperationPredicate) (result ListSynchronizationDetailsCompleteResult, err error) { + items := make([]SynchronizationDetails, 0) resp, err := c.ListSynchronizationDetails(ctx, id, input, options) if err != nil { diff --git a/resource-manager/datashare/2021-08-01/share/method_listsynchronizations.go b/resource-manager/datashare/2021-08-01/share/method_listsynchronizations.go index b9d1b5d79b0..e9eadeb82bb 100644 --- a/resource-manager/datashare/2021-08-01/share/method_listsynchronizations.go +++ b/resource-manager/datashare/2021-08-01/share/method_listsynchronizations.go @@ -15,12 +15,12 @@ import ( type ListSynchronizationsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ShareSynchronizationList + Model *[]ShareSynchronization } type ListSynchronizationsCompleteResult struct { LatestHttpResponse *http.Response - Items []ShareSynchronizationList + Items []ShareSynchronization } type ListSynchronizationsOperationOptions struct { @@ -82,7 +82,7 @@ func (c ShareClient) ListSynchronizations(ctx context.Context, id ShareId, optio } var values struct { - Values *[]ShareSynchronizationList `json:"value"` + Values *[]ShareSynchronization `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -95,12 +95,12 @@ func (c ShareClient) ListSynchronizations(ctx context.Context, id ShareId, optio // ListSynchronizationsComplete retrieves all the results into a single object func (c ShareClient) ListSynchronizationsComplete(ctx context.Context, id ShareId, options ListSynchronizationsOperationOptions) (ListSynchronizationsCompleteResult, error) { - return c.ListSynchronizationsCompleteMatchingPredicate(ctx, id, options, ShareSynchronizationListOperationPredicate{}) + return c.ListSynchronizationsCompleteMatchingPredicate(ctx, id, options, ShareSynchronizationOperationPredicate{}) } // ListSynchronizationsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ShareClient) ListSynchronizationsCompleteMatchingPredicate(ctx context.Context, id ShareId, options ListSynchronizationsOperationOptions, predicate ShareSynchronizationListOperationPredicate) (result ListSynchronizationsCompleteResult, err error) { - items := make([]ShareSynchronizationList, 0) +func (c ShareClient) ListSynchronizationsCompleteMatchingPredicate(ctx context.Context, id ShareId, options ListSynchronizationsOperationOptions, predicate ShareSynchronizationOperationPredicate) (result ListSynchronizationsCompleteResult, err error) { + items := make([]ShareSynchronization, 0) resp, err := c.ListSynchronizations(ctx, id, options) if err != nil { diff --git a/resource-manager/datashare/2021-08-01/share/model_sharesynchronizationlist.go b/resource-manager/datashare/2021-08-01/share/model_sharesynchronizationlist.go deleted file mode 100644 index f90c3473b77..00000000000 --- a/resource-manager/datashare/2021-08-01/share/model_sharesynchronizationlist.go +++ /dev/null @@ -1,9 +0,0 @@ -package share - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ShareSynchronizationList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []ShareSynchronization `json:"value"` -} diff --git a/resource-manager/datashare/2021-08-01/share/model_synchronizationdetailslist.go b/resource-manager/datashare/2021-08-01/share/model_synchronizationdetailslist.go deleted file mode 100644 index 826ad117ddf..00000000000 --- a/resource-manager/datashare/2021-08-01/share/model_synchronizationdetailslist.go +++ /dev/null @@ -1,9 +0,0 @@ -package share - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SynchronizationDetailsList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []SynchronizationDetails `json:"value"` -} diff --git a/resource-manager/datashare/2021-08-01/share/predicates.go b/resource-manager/datashare/2021-08-01/share/predicates.go index fc73f617c73..b2176d6514f 100644 --- a/resource-manager/datashare/2021-08-01/share/predicates.go +++ b/resource-manager/datashare/2021-08-01/share/predicates.go @@ -49,26 +49,131 @@ func (p ShareOperationPredicate) Matches(input Share) bool { return true } -type ShareSynchronizationListOperationPredicate struct { - NextLink *string +type ShareSynchronizationOperationPredicate struct { + ConsumerEmail *string + ConsumerName *string + ConsumerTenantName *string + DurationMs *int64 + EndTime *string + Message *string + StartTime *string + Status *string + SynchronizationId *string } -func (p ShareSynchronizationListOperationPredicate) Matches(input ShareSynchronizationList) bool { +func (p ShareSynchronizationOperationPredicate) Matches(input ShareSynchronization) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ConsumerEmail != nil && (input.ConsumerEmail == nil || *p.ConsumerEmail != *input.ConsumerEmail) { + return false + } + + if p.ConsumerName != nil && (input.ConsumerName == nil || *p.ConsumerName != *input.ConsumerName) { + return false + } + + if p.ConsumerTenantName != nil && (input.ConsumerTenantName == nil || *p.ConsumerTenantName != *input.ConsumerTenantName) { + return false + } + + if p.DurationMs != nil && (input.DurationMs == nil || *p.DurationMs != *input.DurationMs) { + return false + } + + if p.EndTime != nil && (input.EndTime == nil || *p.EndTime != *input.EndTime) { + return false + } + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } + + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.Status != nil && (input.Status == nil || *p.Status != *input.Status) { + return false + } + + if p.SynchronizationId != nil && (input.SynchronizationId == nil || *p.SynchronizationId != *input.SynchronizationId) { return false } return true } -type SynchronizationDetailsListOperationPredicate struct { - NextLink *string +type SynchronizationDetailsOperationPredicate struct { + DataSetId *string + DurationMs *int64 + EndTime *string + FilesRead *int64 + FilesWritten *int64 + Message *string + Name *string + RowsCopied *int64 + RowsRead *int64 + SizeRead *int64 + SizeWritten *int64 + StartTime *string + Status *string + VCore *int64 } -func (p SynchronizationDetailsListOperationPredicate) Matches(input SynchronizationDetailsList) bool { +func (p SynchronizationDetailsOperationPredicate) Matches(input SynchronizationDetails) bool { + + if p.DataSetId != nil && (input.DataSetId == nil || *p.DataSetId != *input.DataSetId) { + return false + } + + if p.DurationMs != nil && (input.DurationMs == nil || *p.DurationMs != *input.DurationMs) { + return false + } + + if p.EndTime != nil && (input.EndTime == nil || *p.EndTime != *input.EndTime) { + return false + } + + if p.FilesRead != nil && (input.FilesRead == nil || *p.FilesRead != *input.FilesRead) { + return false + } + + if p.FilesWritten != nil && (input.FilesWritten == nil || *p.FilesWritten != *input.FilesWritten) { + return false + } + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.RowsCopied != nil && (input.RowsCopied == nil || *p.RowsCopied != *input.RowsCopied) { + return false + } + + if p.RowsRead != nil && (input.RowsRead == nil || *p.RowsRead != *input.RowsRead) { + return false + } + + if p.SizeRead != nil && (input.SizeRead == nil || *p.SizeRead != *input.SizeRead) { + return false + } + + if p.SizeWritten != nil && (input.SizeWritten == nil || *p.SizeWritten != *input.SizeWritten) { + return false + } + + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.Status != nil && (input.Status == nil || *p.Status != *input.Status) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.VCore != nil && (input.VCore == nil || *p.VCore != *input.VCore) { return false } diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/method_listsourcesharesynchronizationsettings.go b/resource-manager/datashare/2021-08-01/sharesubscription/method_listsourcesharesynchronizationsettings.go index 1710c539581..87d98e79ce8 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/method_listsourcesharesynchronizationsettings.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/method_listsourcesharesynchronizationsettings.go @@ -2,6 +2,7 @@ package sharesubscription import ( "context" + "encoding/json" "fmt" "net/http" @@ -15,12 +16,12 @@ import ( type ListSourceShareSynchronizationSettingsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SourceShareSynchronizationSettingList + Model *[]SourceShareSynchronizationSetting } type ListSourceShareSynchronizationSettingsCompleteResult struct { LatestHttpResponse *http.Response - Items []SourceShareSynchronizationSettingList + Items []SourceShareSynchronizationSetting } // ListSourceShareSynchronizationSettings ... @@ -50,25 +51,36 @@ func (c ShareSubscriptionClient) ListSourceShareSynchronizationSettings(ctx cont } var values struct { - Values *[]SourceShareSynchronizationSettingList `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]SourceShareSynchronizationSetting, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalSourceShareSynchronizationSettingImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for SourceShareSynchronizationSetting (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } // ListSourceShareSynchronizationSettingsComplete retrieves all the results into a single object func (c ShareSubscriptionClient) ListSourceShareSynchronizationSettingsComplete(ctx context.Context, id ShareSubscriptionId) (ListSourceShareSynchronizationSettingsCompleteResult, error) { - return c.ListSourceShareSynchronizationSettingsCompleteMatchingPredicate(ctx, id, SourceShareSynchronizationSettingListOperationPredicate{}) + return c.ListSourceShareSynchronizationSettingsCompleteMatchingPredicate(ctx, id, SourceShareSynchronizationSettingOperationPredicate{}) } // ListSourceShareSynchronizationSettingsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ShareSubscriptionClient) ListSourceShareSynchronizationSettingsCompleteMatchingPredicate(ctx context.Context, id ShareSubscriptionId, predicate SourceShareSynchronizationSettingListOperationPredicate) (result ListSourceShareSynchronizationSettingsCompleteResult, err error) { - items := make([]SourceShareSynchronizationSettingList, 0) +func (c ShareSubscriptionClient) ListSourceShareSynchronizationSettingsCompleteMatchingPredicate(ctx context.Context, id ShareSubscriptionId, predicate SourceShareSynchronizationSettingOperationPredicate) (result ListSourceShareSynchronizationSettingsCompleteResult, err error) { + items := make([]SourceShareSynchronizationSetting, 0) resp, err := c.ListSourceShareSynchronizationSettings(ctx, id) if err != nil { diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizationdetails.go b/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizationdetails.go index 671adcce2ff..ae7ddc8b493 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizationdetails.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizationdetails.go @@ -15,12 +15,12 @@ import ( type ListSynchronizationDetailsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SynchronizationDetailsList + Model *[]SynchronizationDetails } type ListSynchronizationDetailsCompleteResult struct { LatestHttpResponse *http.Response - Items []SynchronizationDetailsList + Items []SynchronizationDetails } type ListSynchronizationDetailsOperationOptions struct { @@ -82,7 +82,7 @@ func (c ShareSubscriptionClient) ListSynchronizationDetails(ctx context.Context, } var values struct { - Values *[]SynchronizationDetailsList `json:"value"` + Values *[]SynchronizationDetails `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -95,12 +95,12 @@ func (c ShareSubscriptionClient) ListSynchronizationDetails(ctx context.Context, // ListSynchronizationDetailsComplete retrieves all the results into a single object func (c ShareSubscriptionClient) ListSynchronizationDetailsComplete(ctx context.Context, id ShareSubscriptionId, input ShareSubscriptionSynchronization, options ListSynchronizationDetailsOperationOptions) (ListSynchronizationDetailsCompleteResult, error) { - return c.ListSynchronizationDetailsCompleteMatchingPredicate(ctx, id, input, options, SynchronizationDetailsListOperationPredicate{}) + return c.ListSynchronizationDetailsCompleteMatchingPredicate(ctx, id, input, options, SynchronizationDetailsOperationPredicate{}) } // ListSynchronizationDetailsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ShareSubscriptionClient) ListSynchronizationDetailsCompleteMatchingPredicate(ctx context.Context, id ShareSubscriptionId, input ShareSubscriptionSynchronization, options ListSynchronizationDetailsOperationOptions, predicate SynchronizationDetailsListOperationPredicate) (result ListSynchronizationDetailsCompleteResult, err error) { - items := make([]SynchronizationDetailsList, 0) +func (c ShareSubscriptionClient) ListSynchronizationDetailsCompleteMatchingPredicate(ctx context.Context, id ShareSubscriptionId, input ShareSubscriptionSynchronization, options ListSynchronizationDetailsOperationOptions, predicate SynchronizationDetailsOperationPredicate) (result ListSynchronizationDetailsCompleteResult, err error) { + items := make([]SynchronizationDetails, 0) resp, err := c.ListSynchronizationDetails(ctx, id, input, options) if err != nil { diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizations.go b/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizations.go index d8c61917b43..eddaddf1867 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizations.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizations.go @@ -15,12 +15,12 @@ import ( type ListSynchronizationsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ShareSubscriptionSynchronizationList + Model *[]ShareSubscriptionSynchronization } type ListSynchronizationsCompleteResult struct { LatestHttpResponse *http.Response - Items []ShareSubscriptionSynchronizationList + Items []ShareSubscriptionSynchronization } type ListSynchronizationsOperationOptions struct { @@ -82,7 +82,7 @@ func (c ShareSubscriptionClient) ListSynchronizations(ctx context.Context, id Sh } var values struct { - Values *[]ShareSubscriptionSynchronizationList `json:"value"` + Values *[]ShareSubscriptionSynchronization `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -95,12 +95,12 @@ func (c ShareSubscriptionClient) ListSynchronizations(ctx context.Context, id Sh // ListSynchronizationsComplete retrieves all the results into a single object func (c ShareSubscriptionClient) ListSynchronizationsComplete(ctx context.Context, id ShareSubscriptionId, options ListSynchronizationsOperationOptions) (ListSynchronizationsCompleteResult, error) { - return c.ListSynchronizationsCompleteMatchingPredicate(ctx, id, options, ShareSubscriptionSynchronizationListOperationPredicate{}) + return c.ListSynchronizationsCompleteMatchingPredicate(ctx, id, options, ShareSubscriptionSynchronizationOperationPredicate{}) } // ListSynchronizationsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ShareSubscriptionClient) ListSynchronizationsCompleteMatchingPredicate(ctx context.Context, id ShareSubscriptionId, options ListSynchronizationsOperationOptions, predicate ShareSubscriptionSynchronizationListOperationPredicate) (result ListSynchronizationsCompleteResult, err error) { - items := make([]ShareSubscriptionSynchronizationList, 0) +func (c ShareSubscriptionClient) ListSynchronizationsCompleteMatchingPredicate(ctx context.Context, id ShareSubscriptionId, options ListSynchronizationsOperationOptions, predicate ShareSubscriptionSynchronizationOperationPredicate) (result ListSynchronizationsCompleteResult, err error) { + items := make([]ShareSubscriptionSynchronization, 0) resp, err := c.ListSynchronizations(ctx, id, options) if err != nil { diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/model_sharesubscriptionsynchronizationlist.go b/resource-manager/datashare/2021-08-01/sharesubscription/model_sharesubscriptionsynchronizationlist.go deleted file mode 100644 index 4575b4acc59..00000000000 --- a/resource-manager/datashare/2021-08-01/sharesubscription/model_sharesubscriptionsynchronizationlist.go +++ /dev/null @@ -1,9 +0,0 @@ -package sharesubscription - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ShareSubscriptionSynchronizationList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []ShareSubscriptionSynchronization `json:"value"` -} diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/model_sourcesharesynchronizationsettinglist.go b/resource-manager/datashare/2021-08-01/sharesubscription/model_sourcesharesynchronizationsettinglist.go deleted file mode 100644 index 4fc02cf5818..00000000000 --- a/resource-manager/datashare/2021-08-01/sharesubscription/model_sourcesharesynchronizationsettinglist.go +++ /dev/null @@ -1,49 +0,0 @@ -package sharesubscription - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SourceShareSynchronizationSettingList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []SourceShareSynchronizationSetting `json:"value"` -} - -var _ json.Unmarshaler = &SourceShareSynchronizationSettingList{} - -func (s *SourceShareSynchronizationSettingList) UnmarshalJSON(bytes []byte) error { - type alias SourceShareSynchronizationSettingList - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into SourceShareSynchronizationSettingList: %+v", err) - } - - s.NextLink = decoded.NextLink - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling SourceShareSynchronizationSettingList into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]SourceShareSynchronizationSetting, 0) - for i, val := range listTemp { - impl, err := unmarshalSourceShareSynchronizationSettingImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'SourceShareSynchronizationSettingList': %+v", i, err) - } - output = append(output, impl) - } - s.Value = output - } - return nil -} diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/model_synchronizationdetailslist.go b/resource-manager/datashare/2021-08-01/sharesubscription/model_synchronizationdetailslist.go deleted file mode 100644 index cfd3c1edcc4..00000000000 --- a/resource-manager/datashare/2021-08-01/sharesubscription/model_synchronizationdetailslist.go +++ /dev/null @@ -1,9 +0,0 @@ -package sharesubscription - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SynchronizationDetailsList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []SynchronizationDetails `json:"value"` -} diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/predicates.go b/resource-manager/datashare/2021-08-01/sharesubscription/predicates.go index 586eab1df08..403a5d60ca5 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/predicates.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/predicates.go @@ -49,39 +49,124 @@ func (p ShareSubscriptionOperationPredicate) Matches(input ShareSubscription) bo return true } -type ShareSubscriptionSynchronizationListOperationPredicate struct { - NextLink *string +type ShareSubscriptionSynchronizationOperationPredicate struct { + DurationMs *int64 + EndTime *string + Message *string + StartTime *string + Status *string + SynchronizationId *string } -func (p ShareSubscriptionSynchronizationListOperationPredicate) Matches(input ShareSubscriptionSynchronizationList) bool { +func (p ShareSubscriptionSynchronizationOperationPredicate) Matches(input ShareSubscriptionSynchronization) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.DurationMs != nil && (input.DurationMs == nil || *p.DurationMs != *input.DurationMs) { return false } - return true -} + if p.EndTime != nil && (input.EndTime == nil || *p.EndTime != *input.EndTime) { + return false + } -type SourceShareSynchronizationSettingListOperationPredicate struct { - NextLink *string -} + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } -func (p SourceShareSynchronizationSettingListOperationPredicate) Matches(input SourceShareSynchronizationSettingList) bool { + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.Status != nil && (input.Status == nil || *p.Status != *input.Status) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.SynchronizationId != nil && *p.SynchronizationId != input.SynchronizationId { return false } return true } -type SynchronizationDetailsListOperationPredicate struct { - NextLink *string +type SourceShareSynchronizationSettingOperationPredicate struct { } -func (p SynchronizationDetailsListOperationPredicate) Matches(input SynchronizationDetailsList) bool { +func (p SourceShareSynchronizationSettingOperationPredicate) Matches(input SourceShareSynchronizationSetting) bool { + + return true +} + +type SynchronizationDetailsOperationPredicate struct { + DataSetId *string + DurationMs *int64 + EndTime *string + FilesRead *int64 + FilesWritten *int64 + Message *string + Name *string + RowsCopied *int64 + RowsRead *int64 + SizeRead *int64 + SizeWritten *int64 + StartTime *string + Status *string + VCore *int64 +} + +func (p SynchronizationDetailsOperationPredicate) Matches(input SynchronizationDetails) bool { + + if p.DataSetId != nil && (input.DataSetId == nil || *p.DataSetId != *input.DataSetId) { + return false + } + + if p.DurationMs != nil && (input.DurationMs == nil || *p.DurationMs != *input.DurationMs) { + return false + } + + if p.EndTime != nil && (input.EndTime == nil || *p.EndTime != *input.EndTime) { + return false + } + + if p.FilesRead != nil && (input.FilesRead == nil || *p.FilesRead != *input.FilesRead) { + return false + } + + if p.FilesWritten != nil && (input.FilesWritten == nil || *p.FilesWritten != *input.FilesWritten) { + return false + } + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.RowsCopied != nil && (input.RowsCopied == nil || *p.RowsCopied != *input.RowsCopied) { + return false + } + + if p.RowsRead != nil && (input.RowsRead == nil || *p.RowsRead != *input.RowsRead) { + return false + } + + if p.SizeRead != nil && (input.SizeRead == nil || *p.SizeRead != *input.SizeRead) { + return false + } + + if p.SizeWritten != nil && (input.SizeWritten == nil || *p.SizeWritten != *input.SizeWritten) { + return false + } + + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.Status != nil && (input.Status == nil || *p.Status != *input.Status) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.VCore != nil && (input.VCore == nil || *p.VCore != *input.VCore) { return false } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/method_expand.go b/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/method_expand.go index 2099293b5bb..7ecdedf3fb5 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/method_expand.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/method_expand.go @@ -15,12 +15,12 @@ import ( type ExpandOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ExpandMsixImageList + Model *[]ExpandMsixImage } type ExpandCompleteResult struct { LatestHttpResponse *http.Response - Items []ExpandMsixImageList + Items []ExpandMsixImage } // Expand ... @@ -50,7 +50,7 @@ func (c MsixImageClient) Expand(ctx context.Context, id HostPoolId, input MSIXIm } var values struct { - Values *[]ExpandMsixImageList `json:"value"` + Values *[]ExpandMsixImage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MsixImageClient) Expand(ctx context.Context, id HostPoolId, input MSIXIm // ExpandComplete retrieves all the results into a single object func (c MsixImageClient) ExpandComplete(ctx context.Context, id HostPoolId, input MSIXImageURI) (ExpandCompleteResult, error) { - return c.ExpandCompleteMatchingPredicate(ctx, id, input, ExpandMsixImageListOperationPredicate{}) + return c.ExpandCompleteMatchingPredicate(ctx, id, input, ExpandMsixImageOperationPredicate{}) } // ExpandCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MsixImageClient) ExpandCompleteMatchingPredicate(ctx context.Context, id HostPoolId, input MSIXImageURI, predicate ExpandMsixImageListOperationPredicate) (result ExpandCompleteResult, err error) { - items := make([]ExpandMsixImageList, 0) +func (c MsixImageClient) ExpandCompleteMatchingPredicate(ctx context.Context, id HostPoolId, input MSIXImageURI, predicate ExpandMsixImageOperationPredicate) (result ExpandCompleteResult, err error) { + items := make([]ExpandMsixImage, 0) resp, err := c.Expand(ctx, id, input) if err != nil { diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/model_expandmsiximagelist.go b/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/model_expandmsiximagelist.go deleted file mode 100644 index 2a84c258bd6..00000000000 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/model_expandmsiximagelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package msiximage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpandMsixImageList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpandMsixImage `json:"value,omitempty"` -} diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/predicates.go b/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/predicates.go index c7bdaed1c05..a91fc8b3c1d 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/predicates.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/predicates.go @@ -3,13 +3,23 @@ package msiximage // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ExpandMsixImageListOperationPredicate struct { - NextLink *string +type ExpandMsixImageOperationPredicate struct { + Id *string + Name *string + Type *string } -func (p ExpandMsixImageListOperationPredicate) Matches(input ExpandMsixImageList) bool { +func (p ExpandMsixImageOperationPredicate) Matches(input ExpandMsixImage) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + 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 } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/method_expand.go b/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/method_expand.go index 2099293b5bb..7ecdedf3fb5 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/method_expand.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/method_expand.go @@ -15,12 +15,12 @@ import ( type ExpandOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ExpandMsixImageList + Model *[]ExpandMsixImage } type ExpandCompleteResult struct { LatestHttpResponse *http.Response - Items []ExpandMsixImageList + Items []ExpandMsixImage } // Expand ... @@ -50,7 +50,7 @@ func (c MsixImageClient) Expand(ctx context.Context, id HostPoolId, input MSIXIm } var values struct { - Values *[]ExpandMsixImageList `json:"value"` + Values *[]ExpandMsixImage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MsixImageClient) Expand(ctx context.Context, id HostPoolId, input MSIXIm // ExpandComplete retrieves all the results into a single object func (c MsixImageClient) ExpandComplete(ctx context.Context, id HostPoolId, input MSIXImageURI) (ExpandCompleteResult, error) { - return c.ExpandCompleteMatchingPredicate(ctx, id, input, ExpandMsixImageListOperationPredicate{}) + return c.ExpandCompleteMatchingPredicate(ctx, id, input, ExpandMsixImageOperationPredicate{}) } // ExpandCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MsixImageClient) ExpandCompleteMatchingPredicate(ctx context.Context, id HostPoolId, input MSIXImageURI, predicate ExpandMsixImageListOperationPredicate) (result ExpandCompleteResult, err error) { - items := make([]ExpandMsixImageList, 0) +func (c MsixImageClient) ExpandCompleteMatchingPredicate(ctx context.Context, id HostPoolId, input MSIXImageURI, predicate ExpandMsixImageOperationPredicate) (result ExpandCompleteResult, err error) { + items := make([]ExpandMsixImage, 0) resp, err := c.Expand(ctx, id, input) if err != nil { diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/model_expandmsiximagelist.go b/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/model_expandmsiximagelist.go deleted file mode 100644 index 2a84c258bd6..00000000000 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/model_expandmsiximagelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package msiximage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpandMsixImageList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpandMsixImage `json:"value,omitempty"` -} diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/predicates.go b/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/predicates.go index c7bdaed1c05..a91fc8b3c1d 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/predicates.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/predicates.go @@ -3,13 +3,23 @@ package msiximage // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ExpandMsixImageListOperationPredicate struct { - NextLink *string +type ExpandMsixImageOperationPredicate struct { + Id *string + Name *string + Type *string } -func (p ExpandMsixImageListOperationPredicate) Matches(input ExpandMsixImageList) bool { +func (p ExpandMsixImageOperationPredicate) Matches(input ExpandMsixImage) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + 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 } diff --git a/resource-manager/desktopvirtualization/2022-09-09/msiximage/method_expand.go b/resource-manager/desktopvirtualization/2022-09-09/msiximage/method_expand.go index 2099293b5bb..7ecdedf3fb5 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msiximage/method_expand.go +++ b/resource-manager/desktopvirtualization/2022-09-09/msiximage/method_expand.go @@ -15,12 +15,12 @@ import ( type ExpandOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ExpandMsixImageList + Model *[]ExpandMsixImage } type ExpandCompleteResult struct { LatestHttpResponse *http.Response - Items []ExpandMsixImageList + Items []ExpandMsixImage } // Expand ... @@ -50,7 +50,7 @@ func (c MsixImageClient) Expand(ctx context.Context, id HostPoolId, input MSIXIm } var values struct { - Values *[]ExpandMsixImageList `json:"value"` + Values *[]ExpandMsixImage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MsixImageClient) Expand(ctx context.Context, id HostPoolId, input MSIXIm // ExpandComplete retrieves all the results into a single object func (c MsixImageClient) ExpandComplete(ctx context.Context, id HostPoolId, input MSIXImageURI) (ExpandCompleteResult, error) { - return c.ExpandCompleteMatchingPredicate(ctx, id, input, ExpandMsixImageListOperationPredicate{}) + return c.ExpandCompleteMatchingPredicate(ctx, id, input, ExpandMsixImageOperationPredicate{}) } // ExpandCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MsixImageClient) ExpandCompleteMatchingPredicate(ctx context.Context, id HostPoolId, input MSIXImageURI, predicate ExpandMsixImageListOperationPredicate) (result ExpandCompleteResult, err error) { - items := make([]ExpandMsixImageList, 0) +func (c MsixImageClient) ExpandCompleteMatchingPredicate(ctx context.Context, id HostPoolId, input MSIXImageURI, predicate ExpandMsixImageOperationPredicate) (result ExpandCompleteResult, err error) { + items := make([]ExpandMsixImage, 0) resp, err := c.Expand(ctx, id, input) if err != nil { diff --git a/resource-manager/desktopvirtualization/2022-09-09/msiximage/model_expandmsiximagelist.go b/resource-manager/desktopvirtualization/2022-09-09/msiximage/model_expandmsiximagelist.go deleted file mode 100644 index 2a84c258bd6..00000000000 --- a/resource-manager/desktopvirtualization/2022-09-09/msiximage/model_expandmsiximagelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package msiximage - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpandMsixImageList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpandMsixImage `json:"value,omitempty"` -} diff --git a/resource-manager/desktopvirtualization/2022-09-09/msiximage/predicates.go b/resource-manager/desktopvirtualization/2022-09-09/msiximage/predicates.go index c7bdaed1c05..a91fc8b3c1d 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msiximage/predicates.go +++ b/resource-manager/desktopvirtualization/2022-09-09/msiximage/predicates.go @@ -3,13 +3,23 @@ package msiximage // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ExpandMsixImageListOperationPredicate struct { - NextLink *string +type ExpandMsixImageOperationPredicate struct { + Id *string + Name *string + Type *string } -func (p ExpandMsixImageListOperationPredicate) Matches(input ExpandMsixImageList) bool { +func (p ExpandMsixImageOperationPredicate) Matches(input ExpandMsixImage) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + 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 } diff --git a/resource-manager/devcenter/2023-04-01/projects/model_projectproperties.go b/resource-manager/devcenter/2023-04-01/projects/model_projectproperties.go index fbad04cf7d4..8db7e192d06 100644 --- a/resource-manager/devcenter/2023-04-01/projects/model_projectproperties.go +++ b/resource-manager/devcenter/2023-04-01/projects/model_projectproperties.go @@ -5,7 +5,7 @@ package projects type ProjectProperties struct { Description *string `json:"description,omitempty"` - DevCenterId *string `json:"devCenterId,omitempty"` + DevCenterId string `json:"devCenterId"` DevCenterUri *string `json:"devCenterUri,omitempty"` MaxDevBoxesPerUser *int64 `json:"maxDevBoxesPerUser,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeys.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeys.go index 4e35e5a5365..79df22c4a9f 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeys.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeys.go @@ -16,12 +16,12 @@ import ( type ListKeysOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SharedAccessSignatureAuthorizationRuleListResult + Model *[]SharedAccessSignatureAuthorizationRuleAccessRightsDescription } type ListKeysCompleteResult struct { LatestHttpResponse *http.Response - Items []SharedAccessSignatureAuthorizationRuleListResult + Items []SharedAccessSignatureAuthorizationRuleAccessRightsDescription } // ListKeys ... @@ -51,7 +51,7 @@ func (c IotDpsResourceClient) ListKeys(ctx context.Context, id commonids.Provisi } var values struct { - Values *[]SharedAccessSignatureAuthorizationRuleListResult `json:"value"` + Values *[]SharedAccessSignatureAuthorizationRuleAccessRightsDescription `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -64,12 +64,12 @@ func (c IotDpsResourceClient) ListKeys(ctx context.Context, id commonids.Provisi // ListKeysComplete retrieves all the results into a single object func (c IotDpsResourceClient) ListKeysComplete(ctx context.Context, id commonids.ProvisioningServiceId) (ListKeysCompleteResult, error) { - return c.ListKeysCompleteMatchingPredicate(ctx, id, SharedAccessSignatureAuthorizationRuleListResultOperationPredicate{}) + return c.ListKeysCompleteMatchingPredicate(ctx, id, SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionOperationPredicate{}) } // ListKeysCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c IotDpsResourceClient) ListKeysCompleteMatchingPredicate(ctx context.Context, id commonids.ProvisioningServiceId, predicate SharedAccessSignatureAuthorizationRuleListResultOperationPredicate) (result ListKeysCompleteResult, err error) { - items := make([]SharedAccessSignatureAuthorizationRuleListResult, 0) +func (c IotDpsResourceClient) ListKeysCompleteMatchingPredicate(ctx context.Context, id commonids.ProvisioningServiceId, predicate SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionOperationPredicate) (result ListKeysCompleteResult, err error) { + items := make([]SharedAccessSignatureAuthorizationRuleAccessRightsDescription, 0) resp, err := c.ListKeys(ctx, id) if err != nil { diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/model_sharedaccesssignatureauthorizationrulelistresult.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/model_sharedaccesssignatureauthorizationrulelistresult.go deleted file mode 100644 index 62c7f154b67..00000000000 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/model_sharedaccesssignatureauthorizationrulelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package iotdpsresource - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SharedAccessSignatureAuthorizationRuleListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]SharedAccessSignatureAuthorizationRuleAccessRightsDescription `json:"value,omitempty"` -} diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/predicates.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/predicates.go index 9a71886d440..16a003fcf7a 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/predicates.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/predicates.go @@ -44,13 +44,23 @@ func (p ProvisioningServiceDescriptionOperationPredicate) Matches(input Provisio return true } -type SharedAccessSignatureAuthorizationRuleListResultOperationPredicate struct { - NextLink *string +type SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionOperationPredicate struct { + KeyName *string + PrimaryKey *string + SecondaryKey *string } -func (p SharedAccessSignatureAuthorizationRuleListResultOperationPredicate) Matches(input SharedAccessSignatureAuthorizationRuleListResult) bool { +func (p SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionOperationPredicate) Matches(input SharedAccessSignatureAuthorizationRuleAccessRightsDescription) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.KeyName != nil && *p.KeyName != input.KeyName { + return false + } + + if p.PrimaryKey != nil && (input.PrimaryKey == nil || *p.PrimaryKey != *input.PrimaryKey) { + return false + } + + if p.SecondaryKey != nil && (input.SecondaryKey == nil || *p.SecondaryKey != *input.SecondaryKey) { return false } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listkeys.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listkeys.go index 4e35e5a5365..79df22c4a9f 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listkeys.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listkeys.go @@ -16,12 +16,12 @@ import ( type ListKeysOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SharedAccessSignatureAuthorizationRuleListResult + Model *[]SharedAccessSignatureAuthorizationRuleAccessRightsDescription } type ListKeysCompleteResult struct { LatestHttpResponse *http.Response - Items []SharedAccessSignatureAuthorizationRuleListResult + Items []SharedAccessSignatureAuthorizationRuleAccessRightsDescription } // ListKeys ... @@ -51,7 +51,7 @@ func (c IotDpsResourceClient) ListKeys(ctx context.Context, id commonids.Provisi } var values struct { - Values *[]SharedAccessSignatureAuthorizationRuleListResult `json:"value"` + Values *[]SharedAccessSignatureAuthorizationRuleAccessRightsDescription `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -64,12 +64,12 @@ func (c IotDpsResourceClient) ListKeys(ctx context.Context, id commonids.Provisi // ListKeysComplete retrieves all the results into a single object func (c IotDpsResourceClient) ListKeysComplete(ctx context.Context, id commonids.ProvisioningServiceId) (ListKeysCompleteResult, error) { - return c.ListKeysCompleteMatchingPredicate(ctx, id, SharedAccessSignatureAuthorizationRuleListResultOperationPredicate{}) + return c.ListKeysCompleteMatchingPredicate(ctx, id, SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionOperationPredicate{}) } // ListKeysCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c IotDpsResourceClient) ListKeysCompleteMatchingPredicate(ctx context.Context, id commonids.ProvisioningServiceId, predicate SharedAccessSignatureAuthorizationRuleListResultOperationPredicate) (result ListKeysCompleteResult, err error) { - items := make([]SharedAccessSignatureAuthorizationRuleListResult, 0) +func (c IotDpsResourceClient) ListKeysCompleteMatchingPredicate(ctx context.Context, id commonids.ProvisioningServiceId, predicate SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionOperationPredicate) (result ListKeysCompleteResult, err error) { + items := make([]SharedAccessSignatureAuthorizationRuleAccessRightsDescription, 0) resp, err := c.ListKeys(ctx, id) if err != nil { diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/model_sharedaccesssignatureauthorizationrulelistresult.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/model_sharedaccesssignatureauthorizationrulelistresult.go deleted file mode 100644 index 62c7f154b67..00000000000 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/model_sharedaccesssignatureauthorizationrulelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package iotdpsresource - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SharedAccessSignatureAuthorizationRuleListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]SharedAccessSignatureAuthorizationRuleAccessRightsDescription `json:"value,omitempty"` -} diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/predicates.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/predicates.go index 58c4c4767ed..74d02372e6b 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/predicates.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/predicates.go @@ -54,13 +54,23 @@ func (p ProvisioningServiceDescriptionOperationPredicate) Matches(input Provisio return true } -type SharedAccessSignatureAuthorizationRuleListResultOperationPredicate struct { - NextLink *string +type SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionOperationPredicate struct { + KeyName *string + PrimaryKey *string + SecondaryKey *string } -func (p SharedAccessSignatureAuthorizationRuleListResultOperationPredicate) Matches(input SharedAccessSignatureAuthorizationRuleListResult) bool { +func (p SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionOperationPredicate) Matches(input SharedAccessSignatureAuthorizationRuleAccessRightsDescription) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.KeyName != nil && *p.KeyName != input.KeyName { + return false + } + + if p.PrimaryKey != nil && (input.PrimaryKey == nil || *p.PrimaryKey != *input.PrimaryKey) { + return false + } + + if p.SecondaryKey != nil && (input.SecondaryKey == nil || *p.SecondaryKey != *input.SecondaryKey) { return false } diff --git a/resource-manager/devtestlab/2018-09-15/labs/method_listvhds.go b/resource-manager/devtestlab/2018-09-15/labs/method_listvhds.go index 0111f21a588..721b646e81d 100644 --- a/resource-manager/devtestlab/2018-09-15/labs/method_listvhds.go +++ b/resource-manager/devtestlab/2018-09-15/labs/method_listvhds.go @@ -15,12 +15,12 @@ import ( type ListVhdsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]LabVhdList + Model *[]LabVhd } type ListVhdsCompleteResult struct { LatestHttpResponse *http.Response - Items []LabVhdList + Items []LabVhd } // ListVhds ... @@ -50,7 +50,7 @@ func (c LabsClient) ListVhds(ctx context.Context, id LabId) (result ListVhdsOper } var values struct { - Values *[]LabVhdList `json:"value"` + Values *[]LabVhd `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c LabsClient) ListVhds(ctx context.Context, id LabId) (result ListVhdsOper // ListVhdsComplete retrieves all the results into a single object func (c LabsClient) ListVhdsComplete(ctx context.Context, id LabId) (ListVhdsCompleteResult, error) { - return c.ListVhdsCompleteMatchingPredicate(ctx, id, LabVhdListOperationPredicate{}) + return c.ListVhdsCompleteMatchingPredicate(ctx, id, LabVhdOperationPredicate{}) } // ListVhdsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LabsClient) ListVhdsCompleteMatchingPredicate(ctx context.Context, id LabId, predicate LabVhdListOperationPredicate) (result ListVhdsCompleteResult, err error) { - items := make([]LabVhdList, 0) +func (c LabsClient) ListVhdsCompleteMatchingPredicate(ctx context.Context, id LabId, predicate LabVhdOperationPredicate) (result ListVhdsCompleteResult, err error) { + items := make([]LabVhd, 0) resp, err := c.ListVhds(ctx, id) if err != nil { diff --git a/resource-manager/devtestlab/2018-09-15/labs/model_labvhdlist.go b/resource-manager/devtestlab/2018-09-15/labs/model_labvhdlist.go deleted file mode 100644 index 73b941c09ce..00000000000 --- a/resource-manager/devtestlab/2018-09-15/labs/model_labvhdlist.go +++ /dev/null @@ -1,9 +0,0 @@ -package labs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LabVhdList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]LabVhd `json:"value,omitempty"` -} diff --git a/resource-manager/devtestlab/2018-09-15/labs/predicates.go b/resource-manager/devtestlab/2018-09-15/labs/predicates.go index 5dfd9a1ba8b..690bddf0434 100644 --- a/resource-manager/devtestlab/2018-09-15/labs/predicates.go +++ b/resource-manager/devtestlab/2018-09-15/labs/predicates.go @@ -31,13 +31,13 @@ func (p LabOperationPredicate) Matches(input Lab) bool { return true } -type LabVhdListOperationPredicate struct { - NextLink *string +type LabVhdOperationPredicate struct { + Id *string } -func (p LabVhdListOperationPredicate) Matches(input LabVhdList) bool { +func (p LabVhdOperationPredicate) Matches(input LabVhd) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } diff --git a/resource-manager/devtestlab/2018-09-15/schedules/method_listapplicable.go b/resource-manager/devtestlab/2018-09-15/schedules/method_listapplicable.go index 0c83089e0a3..7eb825156a9 100644 --- a/resource-manager/devtestlab/2018-09-15/schedules/method_listapplicable.go +++ b/resource-manager/devtestlab/2018-09-15/schedules/method_listapplicable.go @@ -15,12 +15,12 @@ import ( type ListApplicableOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ScheduleList + Model *[]Schedule } type ListApplicableCompleteResult struct { LatestHttpResponse *http.Response - Items []ScheduleList + Items []Schedule } // ListApplicable ... @@ -50,7 +50,7 @@ func (c SchedulesClient) ListApplicable(ctx context.Context, id LabScheduleId) ( } var values struct { - Values *[]ScheduleList `json:"value"` + Values *[]Schedule `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c SchedulesClient) ListApplicable(ctx context.Context, id LabScheduleId) ( // ListApplicableComplete retrieves all the results into a single object func (c SchedulesClient) ListApplicableComplete(ctx context.Context, id LabScheduleId) (ListApplicableCompleteResult, error) { - return c.ListApplicableCompleteMatchingPredicate(ctx, id, ScheduleListOperationPredicate{}) + return c.ListApplicableCompleteMatchingPredicate(ctx, id, ScheduleOperationPredicate{}) } // ListApplicableCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SchedulesClient) ListApplicableCompleteMatchingPredicate(ctx context.Context, id LabScheduleId, predicate ScheduleListOperationPredicate) (result ListApplicableCompleteResult, err error) { - items := make([]ScheduleList, 0) +func (c SchedulesClient) ListApplicableCompleteMatchingPredicate(ctx context.Context, id LabScheduleId, predicate ScheduleOperationPredicate) (result ListApplicableCompleteResult, err error) { + items := make([]Schedule, 0) resp, err := c.ListApplicable(ctx, id) if err != nil { diff --git a/resource-manager/devtestlab/2018-09-15/schedules/model_schedulelist.go b/resource-manager/devtestlab/2018-09-15/schedules/model_schedulelist.go deleted file mode 100644 index 1e521be1398..00000000000 --- a/resource-manager/devtestlab/2018-09-15/schedules/model_schedulelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package schedules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScheduleList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]Schedule `json:"value,omitempty"` -} diff --git a/resource-manager/devtestlab/2018-09-15/schedules/predicates.go b/resource-manager/devtestlab/2018-09-15/schedules/predicates.go index b999790bb5d..52d77ea8869 100644 --- a/resource-manager/devtestlab/2018-09-15/schedules/predicates.go +++ b/resource-manager/devtestlab/2018-09-15/schedules/predicates.go @@ -30,16 +30,3 @@ func (p ScheduleOperationPredicate) Matches(input Schedule) bool { return true } - -type ScheduleListOperationPredicate struct { - NextLink *string -} - -func (p ScheduleListOperationPredicate) Matches(input ScheduleList) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_listbyvirtualnetwork.go b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_listbyvirtualnetwork.go index 8f428b60637..eaf97215604 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_listbyvirtualnetwork.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_listbyvirtualnetwork.go @@ -16,12 +16,12 @@ import ( type ListByVirtualNetworkOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]VirtualNetworkDnsForwardingRulesetListResult + Model *[]VirtualNetworkDnsForwardingRuleset } type ListByVirtualNetworkCompleteResult struct { LatestHttpResponse *http.Response - Items []VirtualNetworkDnsForwardingRulesetListResult + Items []VirtualNetworkDnsForwardingRuleset } type ListByVirtualNetworkOperationOptions struct { @@ -79,7 +79,7 @@ func (c DnsForwardingRulesetsClient) ListByVirtualNetwork(ctx context.Context, i } var values struct { - Values *[]VirtualNetworkDnsForwardingRulesetListResult `json:"value"` + Values *[]VirtualNetworkDnsForwardingRuleset `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -92,12 +92,12 @@ func (c DnsForwardingRulesetsClient) ListByVirtualNetwork(ctx context.Context, i // ListByVirtualNetworkComplete retrieves all the results into a single object func (c DnsForwardingRulesetsClient) ListByVirtualNetworkComplete(ctx context.Context, id commonids.VirtualNetworkId, options ListByVirtualNetworkOperationOptions) (ListByVirtualNetworkCompleteResult, error) { - return c.ListByVirtualNetworkCompleteMatchingPredicate(ctx, id, options, VirtualNetworkDnsForwardingRulesetListResultOperationPredicate{}) + return c.ListByVirtualNetworkCompleteMatchingPredicate(ctx, id, options, VirtualNetworkDnsForwardingRulesetOperationPredicate{}) } // ListByVirtualNetworkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DnsForwardingRulesetsClient) ListByVirtualNetworkCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualNetworkId, options ListByVirtualNetworkOperationOptions, predicate VirtualNetworkDnsForwardingRulesetListResultOperationPredicate) (result ListByVirtualNetworkCompleteResult, err error) { - items := make([]VirtualNetworkDnsForwardingRulesetListResult, 0) +func (c DnsForwardingRulesetsClient) ListByVirtualNetworkCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualNetworkId, options ListByVirtualNetworkOperationOptions, predicate VirtualNetworkDnsForwardingRulesetOperationPredicate) (result ListByVirtualNetworkCompleteResult, err error) { + items := make([]VirtualNetworkDnsForwardingRuleset, 0) resp, err := c.ListByVirtualNetwork(ctx, id, options) if err != nil { diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/model_virtualnetworkdnsforwardingrulesetlistresult.go b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/model_virtualnetworkdnsforwardingrulesetlistresult.go deleted file mode 100644 index dc12a6817f0..00000000000 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/model_virtualnetworkdnsforwardingrulesetlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package dnsforwardingrulesets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkDnsForwardingRulesetListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]VirtualNetworkDnsForwardingRuleset `json:"value,omitempty"` -} diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/predicates.go b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/predicates.go index 93d857171c7..c52c3230e2a 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/predicates.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/predicates.go @@ -36,13 +36,13 @@ func (p DnsForwardingRulesetOperationPredicate) Matches(input DnsForwardingRules return true } -type VirtualNetworkDnsForwardingRulesetListResultOperationPredicate struct { - NextLink *string +type VirtualNetworkDnsForwardingRulesetOperationPredicate struct { + Id *string } -func (p VirtualNetworkDnsForwardingRulesetListResultOperationPredicate) Matches(input VirtualNetworkDnsForwardingRulesetListResult) bool { +func (p VirtualNetworkDnsForwardingRulesetOperationPredicate) Matches(input VirtualNetworkDnsForwardingRuleset) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_listbyvirtualnetwork.go b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_listbyvirtualnetwork.go index 58076eb5c94..d705688ff47 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_listbyvirtualnetwork.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_listbyvirtualnetwork.go @@ -16,12 +16,12 @@ import ( type ListByVirtualNetworkOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SubResourceListResult + Model *[]SubResource } type ListByVirtualNetworkCompleteResult struct { LatestHttpResponse *http.Response - Items []SubResourceListResult + Items []SubResource } type ListByVirtualNetworkOperationOptions struct { @@ -79,7 +79,7 @@ func (c DnsResolversClient) ListByVirtualNetwork(ctx context.Context, id commoni } var values struct { - Values *[]SubResourceListResult `json:"value"` + Values *[]SubResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -92,12 +92,12 @@ func (c DnsResolversClient) ListByVirtualNetwork(ctx context.Context, id commoni // ListByVirtualNetworkComplete retrieves all the results into a single object func (c DnsResolversClient) ListByVirtualNetworkComplete(ctx context.Context, id commonids.VirtualNetworkId, options ListByVirtualNetworkOperationOptions) (ListByVirtualNetworkCompleteResult, error) { - return c.ListByVirtualNetworkCompleteMatchingPredicate(ctx, id, options, SubResourceListResultOperationPredicate{}) + return c.ListByVirtualNetworkCompleteMatchingPredicate(ctx, id, options, SubResourceOperationPredicate{}) } // ListByVirtualNetworkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DnsResolversClient) ListByVirtualNetworkCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualNetworkId, options ListByVirtualNetworkOperationOptions, predicate SubResourceListResultOperationPredicate) (result ListByVirtualNetworkCompleteResult, err error) { - items := make([]SubResourceListResult, 0) +func (c DnsResolversClient) ListByVirtualNetworkCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualNetworkId, options ListByVirtualNetworkOperationOptions, predicate SubResourceOperationPredicate) (result ListByVirtualNetworkCompleteResult, err error) { + items := make([]SubResource, 0) resp, err := c.ListByVirtualNetwork(ctx, id, options) if err != nil { diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/model_subresourcelistresult.go b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/model_subresourcelistresult.go deleted file mode 100644 index 4831b84a5ca..00000000000 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/model_subresourcelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package dnsresolvers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResourceListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]SubResource `json:"value,omitempty"` -} diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/predicates.go b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/predicates.go index d221696c1a6..f0c5d490d4a 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/predicates.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/predicates.go @@ -36,13 +36,13 @@ func (p DnsResolverOperationPredicate) Matches(input DnsResolver) bool { return true } -type SubResourceListResultOperationPredicate struct { - NextLink *string +type SubResourceOperationPredicate struct { + Id *string } -func (p SubResourceListResultOperationPredicate) Matches(input SubResourceListResult) bool { +func (p SubResourceOperationPredicate) Matches(input SubResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && *p.Id != input.Id { return false } diff --git a/resource-manager/dynatrace/2021-09-01/monitors/method_listappservices.go b/resource-manager/dynatrace/2021-09-01/monitors/method_listappservices.go index 11e5a3510f8..d9f83eb432e 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/method_listappservices.go +++ b/resource-manager/dynatrace/2021-09-01/monitors/method_listappservices.go @@ -15,12 +15,12 @@ import ( type ListAppServicesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]AppServiceListResponse + Model *[]AppServiceInfo } type ListAppServicesCompleteResult struct { LatestHttpResponse *http.Response - Items []AppServiceListResponse + Items []AppServiceInfo } // ListAppServices ... @@ -50,7 +50,7 @@ func (c MonitorsClient) ListAppServices(ctx context.Context, id MonitorId) (resu } var values struct { - Values *[]AppServiceListResponse `json:"value"` + Values *[]AppServiceInfo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitorsClient) ListAppServices(ctx context.Context, id MonitorId) (resu // ListAppServicesComplete retrieves all the results into a single object func (c MonitorsClient) ListAppServicesComplete(ctx context.Context, id MonitorId) (ListAppServicesCompleteResult, error) { - return c.ListAppServicesCompleteMatchingPredicate(ctx, id, AppServiceListResponseOperationPredicate{}) + return c.ListAppServicesCompleteMatchingPredicate(ctx, id, AppServiceInfoOperationPredicate{}) } // ListAppServicesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListAppServicesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate AppServiceListResponseOperationPredicate) (result ListAppServicesCompleteResult, err error) { - items := make([]AppServiceListResponse, 0) +func (c MonitorsClient) ListAppServicesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate AppServiceInfoOperationPredicate) (result ListAppServicesCompleteResult, err error) { + items := make([]AppServiceInfo, 0) resp, err := c.ListAppServices(ctx, id) if err != nil { diff --git a/resource-manager/dynatrace/2021-09-01/monitors/method_listhosts.go b/resource-manager/dynatrace/2021-09-01/monitors/method_listhosts.go index 2c6e0057af7..a796e19f017 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/method_listhosts.go +++ b/resource-manager/dynatrace/2021-09-01/monitors/method_listhosts.go @@ -15,12 +15,12 @@ import ( type ListHostsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]VMHostsListResponse + Model *[]VMInfo } type ListHostsCompleteResult struct { LatestHttpResponse *http.Response - Items []VMHostsListResponse + Items []VMInfo } // ListHosts ... @@ -50,7 +50,7 @@ func (c MonitorsClient) ListHosts(ctx context.Context, id MonitorId) (result Lis } var values struct { - Values *[]VMHostsListResponse `json:"value"` + Values *[]VMInfo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitorsClient) ListHosts(ctx context.Context, id MonitorId) (result Lis // ListHostsComplete retrieves all the results into a single object func (c MonitorsClient) ListHostsComplete(ctx context.Context, id MonitorId) (ListHostsCompleteResult, error) { - return c.ListHostsCompleteMatchingPredicate(ctx, id, VMHostsListResponseOperationPredicate{}) + return c.ListHostsCompleteMatchingPredicate(ctx, id, VMInfoOperationPredicate{}) } // ListHostsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate VMHostsListResponseOperationPredicate) (result ListHostsCompleteResult, err error) { - items := make([]VMHostsListResponse, 0) +func (c MonitorsClient) ListHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate VMInfoOperationPredicate) (result ListHostsCompleteResult, err error) { + items := make([]VMInfo, 0) resp, err := c.ListHosts(ctx, id) if err != nil { diff --git a/resource-manager/dynatrace/2021-09-01/monitors/method_listlinkableenvironments.go b/resource-manager/dynatrace/2021-09-01/monitors/method_listlinkableenvironments.go index 13572d2390d..17f695926ae 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/method_listlinkableenvironments.go +++ b/resource-manager/dynatrace/2021-09-01/monitors/method_listlinkableenvironments.go @@ -15,12 +15,12 @@ import ( type ListLinkableEnvironmentsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]LinkableEnvironmentListResponse + Model *[]LinkableEnvironmentResponse } type ListLinkableEnvironmentsCompleteResult struct { LatestHttpResponse *http.Response - Items []LinkableEnvironmentListResponse + Items []LinkableEnvironmentResponse } // ListLinkableEnvironments ... @@ -50,7 +50,7 @@ func (c MonitorsClient) ListLinkableEnvironments(ctx context.Context, id Monitor } var values struct { - Values *[]LinkableEnvironmentListResponse `json:"value"` + Values *[]LinkableEnvironmentResponse `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitorsClient) ListLinkableEnvironments(ctx context.Context, id Monitor // ListLinkableEnvironmentsComplete retrieves all the results into a single object func (c MonitorsClient) ListLinkableEnvironmentsComplete(ctx context.Context, id MonitorId, input LinkableEnvironmentRequest) (ListLinkableEnvironmentsCompleteResult, error) { - return c.ListLinkableEnvironmentsCompleteMatchingPredicate(ctx, id, input, LinkableEnvironmentListResponseOperationPredicate{}) + return c.ListLinkableEnvironmentsCompleteMatchingPredicate(ctx, id, input, LinkableEnvironmentResponseOperationPredicate{}) } // ListLinkableEnvironmentsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListLinkableEnvironmentsCompleteMatchingPredicate(ctx context.Context, id MonitorId, input LinkableEnvironmentRequest, predicate LinkableEnvironmentListResponseOperationPredicate) (result ListLinkableEnvironmentsCompleteResult, err error) { - items := make([]LinkableEnvironmentListResponse, 0) +func (c MonitorsClient) ListLinkableEnvironmentsCompleteMatchingPredicate(ctx context.Context, id MonitorId, input LinkableEnvironmentRequest, predicate LinkableEnvironmentResponseOperationPredicate) (result ListLinkableEnvironmentsCompleteResult, err error) { + items := make([]LinkableEnvironmentResponse, 0) resp, err := c.ListLinkableEnvironments(ctx, id, input) if err != nil { diff --git a/resource-manager/dynatrace/2021-09-01/monitors/method_listmonitoredresources.go b/resource-manager/dynatrace/2021-09-01/monitors/method_listmonitoredresources.go index 644fc894e34..0b0dee2112f 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/method_listmonitoredresources.go +++ b/resource-manager/dynatrace/2021-09-01/monitors/method_listmonitoredresources.go @@ -15,12 +15,12 @@ import ( type ListMonitoredResourcesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]MonitoredResourceListResponse + Model *[]MonitoredResource } type ListMonitoredResourcesCompleteResult struct { LatestHttpResponse *http.Response - Items []MonitoredResourceListResponse + Items []MonitoredResource } // ListMonitoredResources ... @@ -50,7 +50,7 @@ func (c MonitorsClient) ListMonitoredResources(ctx context.Context, id MonitorId } var values struct { - Values *[]MonitoredResourceListResponse `json:"value"` + Values *[]MonitoredResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitorsClient) ListMonitoredResources(ctx context.Context, id MonitorId // ListMonitoredResourcesComplete retrieves all the results into a single object func (c MonitorsClient) ListMonitoredResourcesComplete(ctx context.Context, id MonitorId) (ListMonitoredResourcesCompleteResult, error) { - return c.ListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceListResponseOperationPredicate{}) + return c.ListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceOperationPredicate{}) } // ListMonitoredResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceListResponseOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error) { - items := make([]MonitoredResourceListResponse, 0) +func (c MonitorsClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error) { + items := make([]MonitoredResource, 0) resp, err := c.ListMonitoredResources(ctx, id) if err != nil { diff --git a/resource-manager/dynatrace/2021-09-01/monitors/model_appservicelistresponse.go b/resource-manager/dynatrace/2021-09-01/monitors/model_appservicelistresponse.go deleted file mode 100644 index 2d03144d00b..00000000000 --- a/resource-manager/dynatrace/2021-09-01/monitors/model_appservicelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AppServiceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]AppServiceInfo `json:"value,omitempty"` -} diff --git a/resource-manager/dynatrace/2021-09-01/monitors/model_linkableenvironmentlistresponse.go b/resource-manager/dynatrace/2021-09-01/monitors/model_linkableenvironmentlistresponse.go deleted file mode 100644 index 0a27198567e..00000000000 --- a/resource-manager/dynatrace/2021-09-01/monitors/model_linkableenvironmentlistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LinkableEnvironmentListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]LinkableEnvironmentResponse `json:"value,omitempty"` -} diff --git a/resource-manager/dynatrace/2021-09-01/monitors/model_monitoredresourcelistresponse.go b/resource-manager/dynatrace/2021-09-01/monitors/model_monitoredresourcelistresponse.go deleted file mode 100644 index a85b7de4c67..00000000000 --- a/resource-manager/dynatrace/2021-09-01/monitors/model_monitoredresourcelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoredResourceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]MonitoredResource `json:"value,omitempty"` -} diff --git a/resource-manager/dynatrace/2021-09-01/monitors/model_vmhostslistresponse.go b/resource-manager/dynatrace/2021-09-01/monitors/model_vmhostslistresponse.go deleted file mode 100644 index dd1b8ff8a09..00000000000 --- a/resource-manager/dynatrace/2021-09-01/monitors/model_vmhostslistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VMHostsListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]VMInfo `json:"value,omitempty"` -} diff --git a/resource-manager/dynatrace/2021-09-01/monitors/predicates.go b/resource-manager/dynatrace/2021-09-01/monitors/predicates.go index 5d29ce11c26..0f71e7af6b1 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/predicates.go +++ b/resource-manager/dynatrace/2021-09-01/monitors/predicates.go @@ -3,26 +3,46 @@ package monitors // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type AppServiceListResponseOperationPredicate struct { - NextLink *string +type AppServiceInfoOperationPredicate struct { + HostGroup *string + HostName *string + ResourceId *string + Version *string } -func (p AppServiceListResponseOperationPredicate) Matches(input AppServiceListResponse) bool { +func (p AppServiceInfoOperationPredicate) Matches(input AppServiceInfo) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.HostGroup != nil && (input.HostGroup == nil || *p.HostGroup != *input.HostGroup) { + return false + } + + if p.HostName != nil && (input.HostName == nil || *p.HostName != *input.HostName) { + return false + } + + if p.ResourceId != nil && (input.ResourceId == nil || *p.ResourceId != *input.ResourceId) { + return false + } + + if p.Version != nil && (input.Version == nil || *p.Version != *input.Version) { return false } return true } -type LinkableEnvironmentListResponseOperationPredicate struct { - NextLink *string +type LinkableEnvironmentResponseOperationPredicate struct { + EnvironmentId *string + EnvironmentName *string } -func (p LinkableEnvironmentListResponseOperationPredicate) Matches(input LinkableEnvironmentListResponse) bool { +func (p LinkableEnvironmentResponseOperationPredicate) Matches(input LinkableEnvironmentResponse) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.EnvironmentId != nil && (input.EnvironmentId == nil || *p.EnvironmentId != *input.EnvironmentId) { + return false + } + + if p.EnvironmentName != nil && (input.EnvironmentName == nil || *p.EnvironmentName != *input.EnvironmentName) { return false } @@ -57,26 +77,51 @@ func (p MonitorResourceOperationPredicate) Matches(input MonitorResource) bool { return true } -type MonitoredResourceListResponseOperationPredicate struct { - NextLink *string +type MonitoredResourceOperationPredicate struct { + Id *string + ReasonForLogsStatus *string + ReasonForMetricsStatus *string } -func (p MonitoredResourceListResponseOperationPredicate) Matches(input MonitoredResourceListResponse) bool { +func (p MonitoredResourceOperationPredicate) Matches(input MonitoredResource) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.ReasonForLogsStatus != nil && (input.ReasonForLogsStatus == nil || *p.ReasonForLogsStatus != *input.ReasonForLogsStatus) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ReasonForMetricsStatus != nil && (input.ReasonForMetricsStatus == nil || *p.ReasonForMetricsStatus != *input.ReasonForMetricsStatus) { return false } return true } -type VMHostsListResponseOperationPredicate struct { - NextLink *string +type VMInfoOperationPredicate struct { + HostGroup *string + HostName *string + ResourceId *string + Version *string } -func (p VMHostsListResponseOperationPredicate) Matches(input VMHostsListResponse) bool { +func (p VMInfoOperationPredicate) Matches(input VMInfo) bool { + + if p.HostGroup != nil && (input.HostGroup == nil || *p.HostGroup != *input.HostGroup) { + return false + } + + if p.HostName != nil && (input.HostName == nil || *p.HostName != *input.HostName) { + return false + } + + if p.ResourceId != nil && (input.ResourceId == nil || *p.ResourceId != *input.ResourceId) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Version != nil && (input.Version == nil || *p.Version != *input.Version) { return false } diff --git a/resource-manager/dynatrace/2023-04-27/monitors/method_listappservices.go b/resource-manager/dynatrace/2023-04-27/monitors/method_listappservices.go index 11e5a3510f8..d9f83eb432e 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/method_listappservices.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/method_listappservices.go @@ -15,12 +15,12 @@ import ( type ListAppServicesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]AppServiceListResponse + Model *[]AppServiceInfo } type ListAppServicesCompleteResult struct { LatestHttpResponse *http.Response - Items []AppServiceListResponse + Items []AppServiceInfo } // ListAppServices ... @@ -50,7 +50,7 @@ func (c MonitorsClient) ListAppServices(ctx context.Context, id MonitorId) (resu } var values struct { - Values *[]AppServiceListResponse `json:"value"` + Values *[]AppServiceInfo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitorsClient) ListAppServices(ctx context.Context, id MonitorId) (resu // ListAppServicesComplete retrieves all the results into a single object func (c MonitorsClient) ListAppServicesComplete(ctx context.Context, id MonitorId) (ListAppServicesCompleteResult, error) { - return c.ListAppServicesCompleteMatchingPredicate(ctx, id, AppServiceListResponseOperationPredicate{}) + return c.ListAppServicesCompleteMatchingPredicate(ctx, id, AppServiceInfoOperationPredicate{}) } // ListAppServicesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListAppServicesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate AppServiceListResponseOperationPredicate) (result ListAppServicesCompleteResult, err error) { - items := make([]AppServiceListResponse, 0) +func (c MonitorsClient) ListAppServicesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate AppServiceInfoOperationPredicate) (result ListAppServicesCompleteResult, err error) { + items := make([]AppServiceInfo, 0) resp, err := c.ListAppServices(ctx, id) if err != nil { diff --git a/resource-manager/dynatrace/2023-04-27/monitors/method_listhosts.go b/resource-manager/dynatrace/2023-04-27/monitors/method_listhosts.go index 2c6e0057af7..a796e19f017 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/method_listhosts.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/method_listhosts.go @@ -15,12 +15,12 @@ import ( type ListHostsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]VMHostsListResponse + Model *[]VMInfo } type ListHostsCompleteResult struct { LatestHttpResponse *http.Response - Items []VMHostsListResponse + Items []VMInfo } // ListHosts ... @@ -50,7 +50,7 @@ func (c MonitorsClient) ListHosts(ctx context.Context, id MonitorId) (result Lis } var values struct { - Values *[]VMHostsListResponse `json:"value"` + Values *[]VMInfo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitorsClient) ListHosts(ctx context.Context, id MonitorId) (result Lis // ListHostsComplete retrieves all the results into a single object func (c MonitorsClient) ListHostsComplete(ctx context.Context, id MonitorId) (ListHostsCompleteResult, error) { - return c.ListHostsCompleteMatchingPredicate(ctx, id, VMHostsListResponseOperationPredicate{}) + return c.ListHostsCompleteMatchingPredicate(ctx, id, VMInfoOperationPredicate{}) } // ListHostsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate VMHostsListResponseOperationPredicate) (result ListHostsCompleteResult, err error) { - items := make([]VMHostsListResponse, 0) +func (c MonitorsClient) ListHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate VMInfoOperationPredicate) (result ListHostsCompleteResult, err error) { + items := make([]VMInfo, 0) resp, err := c.ListHosts(ctx, id) if err != nil { diff --git a/resource-manager/dynatrace/2023-04-27/monitors/method_listlinkableenvironments.go b/resource-manager/dynatrace/2023-04-27/monitors/method_listlinkableenvironments.go index 13572d2390d..17f695926ae 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/method_listlinkableenvironments.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/method_listlinkableenvironments.go @@ -15,12 +15,12 @@ import ( type ListLinkableEnvironmentsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]LinkableEnvironmentListResponse + Model *[]LinkableEnvironmentResponse } type ListLinkableEnvironmentsCompleteResult struct { LatestHttpResponse *http.Response - Items []LinkableEnvironmentListResponse + Items []LinkableEnvironmentResponse } // ListLinkableEnvironments ... @@ -50,7 +50,7 @@ func (c MonitorsClient) ListLinkableEnvironments(ctx context.Context, id Monitor } var values struct { - Values *[]LinkableEnvironmentListResponse `json:"value"` + Values *[]LinkableEnvironmentResponse `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitorsClient) ListLinkableEnvironments(ctx context.Context, id Monitor // ListLinkableEnvironmentsComplete retrieves all the results into a single object func (c MonitorsClient) ListLinkableEnvironmentsComplete(ctx context.Context, id MonitorId, input LinkableEnvironmentRequest) (ListLinkableEnvironmentsCompleteResult, error) { - return c.ListLinkableEnvironmentsCompleteMatchingPredicate(ctx, id, input, LinkableEnvironmentListResponseOperationPredicate{}) + return c.ListLinkableEnvironmentsCompleteMatchingPredicate(ctx, id, input, LinkableEnvironmentResponseOperationPredicate{}) } // ListLinkableEnvironmentsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListLinkableEnvironmentsCompleteMatchingPredicate(ctx context.Context, id MonitorId, input LinkableEnvironmentRequest, predicate LinkableEnvironmentListResponseOperationPredicate) (result ListLinkableEnvironmentsCompleteResult, err error) { - items := make([]LinkableEnvironmentListResponse, 0) +func (c MonitorsClient) ListLinkableEnvironmentsCompleteMatchingPredicate(ctx context.Context, id MonitorId, input LinkableEnvironmentRequest, predicate LinkableEnvironmentResponseOperationPredicate) (result ListLinkableEnvironmentsCompleteResult, err error) { + items := make([]LinkableEnvironmentResponse, 0) resp, err := c.ListLinkableEnvironments(ctx, id, input) if err != nil { diff --git a/resource-manager/dynatrace/2023-04-27/monitors/method_listmonitoredresources.go b/resource-manager/dynatrace/2023-04-27/monitors/method_listmonitoredresources.go index 644fc894e34..0b0dee2112f 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/method_listmonitoredresources.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/method_listmonitoredresources.go @@ -15,12 +15,12 @@ import ( type ListMonitoredResourcesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]MonitoredResourceListResponse + Model *[]MonitoredResource } type ListMonitoredResourcesCompleteResult struct { LatestHttpResponse *http.Response - Items []MonitoredResourceListResponse + Items []MonitoredResource } // ListMonitoredResources ... @@ -50,7 +50,7 @@ func (c MonitorsClient) ListMonitoredResources(ctx context.Context, id MonitorId } var values struct { - Values *[]MonitoredResourceListResponse `json:"value"` + Values *[]MonitoredResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitorsClient) ListMonitoredResources(ctx context.Context, id MonitorId // ListMonitoredResourcesComplete retrieves all the results into a single object func (c MonitorsClient) ListMonitoredResourcesComplete(ctx context.Context, id MonitorId) (ListMonitoredResourcesCompleteResult, error) { - return c.ListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceListResponseOperationPredicate{}) + return c.ListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceOperationPredicate{}) } // ListMonitoredResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceListResponseOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error) { - items := make([]MonitoredResourceListResponse, 0) +func (c MonitorsClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error) { + items := make([]MonitoredResource, 0) resp, err := c.ListMonitoredResources(ctx, id) if err != nil { diff --git a/resource-manager/dynatrace/2023-04-27/monitors/model_appservicelistresponse.go b/resource-manager/dynatrace/2023-04-27/monitors/model_appservicelistresponse.go deleted file mode 100644 index 2d03144d00b..00000000000 --- a/resource-manager/dynatrace/2023-04-27/monitors/model_appservicelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AppServiceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]AppServiceInfo `json:"value,omitempty"` -} diff --git a/resource-manager/dynatrace/2023-04-27/monitors/model_linkableenvironmentlistresponse.go b/resource-manager/dynatrace/2023-04-27/monitors/model_linkableenvironmentlistresponse.go deleted file mode 100644 index 0a27198567e..00000000000 --- a/resource-manager/dynatrace/2023-04-27/monitors/model_linkableenvironmentlistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LinkableEnvironmentListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]LinkableEnvironmentResponse `json:"value,omitempty"` -} diff --git a/resource-manager/dynatrace/2023-04-27/monitors/model_monitoredresourcelistresponse.go b/resource-manager/dynatrace/2023-04-27/monitors/model_monitoredresourcelistresponse.go deleted file mode 100644 index a85b7de4c67..00000000000 --- a/resource-manager/dynatrace/2023-04-27/monitors/model_monitoredresourcelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoredResourceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]MonitoredResource `json:"value,omitempty"` -} diff --git a/resource-manager/dynatrace/2023-04-27/monitors/model_vmhostslistresponse.go b/resource-manager/dynatrace/2023-04-27/monitors/model_vmhostslistresponse.go deleted file mode 100644 index dd1b8ff8a09..00000000000 --- a/resource-manager/dynatrace/2023-04-27/monitors/model_vmhostslistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VMHostsListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]VMInfo `json:"value,omitempty"` -} diff --git a/resource-manager/dynatrace/2023-04-27/monitors/predicates.go b/resource-manager/dynatrace/2023-04-27/monitors/predicates.go index 5d29ce11c26..0f71e7af6b1 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/predicates.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/predicates.go @@ -3,26 +3,46 @@ package monitors // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type AppServiceListResponseOperationPredicate struct { - NextLink *string +type AppServiceInfoOperationPredicate struct { + HostGroup *string + HostName *string + ResourceId *string + Version *string } -func (p AppServiceListResponseOperationPredicate) Matches(input AppServiceListResponse) bool { +func (p AppServiceInfoOperationPredicate) Matches(input AppServiceInfo) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.HostGroup != nil && (input.HostGroup == nil || *p.HostGroup != *input.HostGroup) { + return false + } + + if p.HostName != nil && (input.HostName == nil || *p.HostName != *input.HostName) { + return false + } + + if p.ResourceId != nil && (input.ResourceId == nil || *p.ResourceId != *input.ResourceId) { + return false + } + + if p.Version != nil && (input.Version == nil || *p.Version != *input.Version) { return false } return true } -type LinkableEnvironmentListResponseOperationPredicate struct { - NextLink *string +type LinkableEnvironmentResponseOperationPredicate struct { + EnvironmentId *string + EnvironmentName *string } -func (p LinkableEnvironmentListResponseOperationPredicate) Matches(input LinkableEnvironmentListResponse) bool { +func (p LinkableEnvironmentResponseOperationPredicate) Matches(input LinkableEnvironmentResponse) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.EnvironmentId != nil && (input.EnvironmentId == nil || *p.EnvironmentId != *input.EnvironmentId) { + return false + } + + if p.EnvironmentName != nil && (input.EnvironmentName == nil || *p.EnvironmentName != *input.EnvironmentName) { return false } @@ -57,26 +77,51 @@ func (p MonitorResourceOperationPredicate) Matches(input MonitorResource) bool { return true } -type MonitoredResourceListResponseOperationPredicate struct { - NextLink *string +type MonitoredResourceOperationPredicate struct { + Id *string + ReasonForLogsStatus *string + ReasonForMetricsStatus *string } -func (p MonitoredResourceListResponseOperationPredicate) Matches(input MonitoredResourceListResponse) bool { +func (p MonitoredResourceOperationPredicate) Matches(input MonitoredResource) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.ReasonForLogsStatus != nil && (input.ReasonForLogsStatus == nil || *p.ReasonForLogsStatus != *input.ReasonForLogsStatus) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ReasonForMetricsStatus != nil && (input.ReasonForMetricsStatus == nil || *p.ReasonForMetricsStatus != *input.ReasonForMetricsStatus) { return false } return true } -type VMHostsListResponseOperationPredicate struct { - NextLink *string +type VMInfoOperationPredicate struct { + HostGroup *string + HostName *string + ResourceId *string + Version *string } -func (p VMHostsListResponseOperationPredicate) Matches(input VMHostsListResponse) bool { +func (p VMInfoOperationPredicate) Matches(input VMInfo) bool { + + if p.HostGroup != nil && (input.HostGroup == nil || *p.HostGroup != *input.HostGroup) { + return false + } + + if p.HostName != nil && (input.HostName == nil || *p.HostName != *input.HostName) { + return false + } + + if p.ResourceId != nil && (input.ResourceId == nil || *p.ResourceId != *input.ResourceId) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Version != nil && (input.Version == nil || *p.Version != *input.Version) { return false } diff --git a/resource-manager/elastic/2023-06-01/monitoredresources/method_list.go b/resource-manager/elastic/2023-06-01/monitoredresources/method_list.go index db12cbec2c4..dff331981fb 100644 --- a/resource-manager/elastic/2023-06-01/monitoredresources/method_list.go +++ b/resource-manager/elastic/2023-06-01/monitoredresources/method_list.go @@ -15,12 +15,12 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]MonitoredResourceListResponse + Model *[]MonitoredResource } type ListCompleteResult struct { LatestHttpResponse *http.Response - Items []MonitoredResourceListResponse + Items []MonitoredResource } // List ... @@ -50,7 +50,7 @@ func (c MonitoredResourcesClient) List(ctx context.Context, id MonitorId) (resul } var values struct { - Values *[]MonitoredResourceListResponse `json:"value"` + Values *[]MonitoredResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitoredResourcesClient) List(ctx context.Context, id MonitorId) (resul // ListComplete retrieves all the results into a single object func (c MonitoredResourcesClient) ListComplete(ctx context.Context, id MonitorId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, MonitoredResourceListResponseOperationPredicate{}) + return c.ListCompleteMatchingPredicate(ctx, id, MonitoredResourceOperationPredicate{}) } // ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitoredResourcesClient) ListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceListResponseOperationPredicate) (result ListCompleteResult, err error) { - items := make([]MonitoredResourceListResponse, 0) +func (c MonitoredResourcesClient) ListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceOperationPredicate) (result ListCompleteResult, err error) { + items := make([]MonitoredResource, 0) resp, err := c.List(ctx, id) if err != nil { diff --git a/resource-manager/elastic/2023-06-01/monitoredresources/model_monitoredresourcelistresponse.go b/resource-manager/elastic/2023-06-01/monitoredresources/model_monitoredresourcelistresponse.go deleted file mode 100644 index 2cdbf7a85eb..00000000000 --- a/resource-manager/elastic/2023-06-01/monitoredresources/model_monitoredresourcelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitoredresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoredResourceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]MonitoredResource `json:"value,omitempty"` -} diff --git a/resource-manager/elastic/2023-06-01/monitoredresources/predicates.go b/resource-manager/elastic/2023-06-01/monitoredresources/predicates.go index 228d572c77f..a17892f2418 100644 --- a/resource-manager/elastic/2023-06-01/monitoredresources/predicates.go +++ b/resource-manager/elastic/2023-06-01/monitoredresources/predicates.go @@ -3,13 +3,18 @@ package monitoredresources // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type MonitoredResourceListResponseOperationPredicate struct { - NextLink *string +type MonitoredResourceOperationPredicate struct { + Id *string + ReasonForLogsStatus *string } -func (p MonitoredResourceListResponseOperationPredicate) Matches(input MonitoredResourceListResponse) bool { +func (p MonitoredResourceOperationPredicate) Matches(input MonitoredResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.ReasonForLogsStatus != nil && (input.ReasonForLogsStatus == nil || *p.ReasonForLogsStatus != *input.ReasonForLogsStatus) { return false } diff --git a/resource-manager/elastic/2023-06-01/vmhhostlist/method_vmhostlist.go b/resource-manager/elastic/2023-06-01/vmhhostlist/method_vmhostlist.go index 31e824a2220..9c4284f2295 100644 --- a/resource-manager/elastic/2023-06-01/vmhhostlist/method_vmhostlist.go +++ b/resource-manager/elastic/2023-06-01/vmhhostlist/method_vmhostlist.go @@ -15,12 +15,12 @@ import ( type VMHostListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]VMHostListResponse + Model *[]VMResources } type VMHostListCompleteResult struct { LatestHttpResponse *http.Response - Items []VMHostListResponse + Items []VMResources } // VMHostList ... @@ -50,7 +50,7 @@ func (c VMHHostListClient) VMHostList(ctx context.Context, id MonitorId) (result } var values struct { - Values *[]VMHostListResponse `json:"value"` + Values *[]VMResources `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c VMHHostListClient) VMHostList(ctx context.Context, id MonitorId) (result // VMHostListComplete retrieves all the results into a single object func (c VMHHostListClient) VMHostListComplete(ctx context.Context, id MonitorId) (VMHostListCompleteResult, error) { - return c.VMHostListCompleteMatchingPredicate(ctx, id, VMHostListResponseOperationPredicate{}) + return c.VMHostListCompleteMatchingPredicate(ctx, id, VMResourcesOperationPredicate{}) } // VMHostListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VMHHostListClient) VMHostListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate VMHostListResponseOperationPredicate) (result VMHostListCompleteResult, err error) { - items := make([]VMHostListResponse, 0) +func (c VMHHostListClient) VMHostListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate VMResourcesOperationPredicate) (result VMHostListCompleteResult, err error) { + items := make([]VMResources, 0) resp, err := c.VMHostList(ctx, id) if err != nil { diff --git a/resource-manager/elastic/2023-06-01/vmhhostlist/model_vmhostlistresponse.go b/resource-manager/elastic/2023-06-01/vmhhostlist/model_vmhostlistresponse.go deleted file mode 100644 index ac073bb6488..00000000000 --- a/resource-manager/elastic/2023-06-01/vmhhostlist/model_vmhostlistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmhhostlist - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VMHostListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]VMResources `json:"value,omitempty"` -} diff --git a/resource-manager/elastic/2023-06-01/vmhhostlist/predicates.go b/resource-manager/elastic/2023-06-01/vmhhostlist/predicates.go index 48504d68eed..e4f8073c70a 100644 --- a/resource-manager/elastic/2023-06-01/vmhhostlist/predicates.go +++ b/resource-manager/elastic/2023-06-01/vmhhostlist/predicates.go @@ -3,13 +3,13 @@ package vmhhostlist // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type VMHostListResponseOperationPredicate struct { - NextLink *string +type VMResourcesOperationPredicate struct { + VMResourceId *string } -func (p VMHostListResponseOperationPredicate) Matches(input VMHostListResponse) bool { +func (p VMResourcesOperationPredicate) Matches(input VMResources) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.VMResourceId != nil && (input.VMResourceId == nil || *p.VMResourceId != *input.VMResourceId) { return false } diff --git a/resource-manager/elastic/2024-03-01/connectedresources/method_connectedpartnerresourceslist.go b/resource-manager/elastic/2024-03-01/connectedresources/method_connectedpartnerresourceslist.go index b86fea32d14..69d118a0b87 100644 --- a/resource-manager/elastic/2024-03-01/connectedresources/method_connectedpartnerresourceslist.go +++ b/resource-manager/elastic/2024-03-01/connectedresources/method_connectedpartnerresourceslist.go @@ -15,12 +15,12 @@ import ( type ConnectedPartnerResourcesListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ConnectedPartnerResourcesListResponse + Model *[]ConnectedPartnerResourcesListFormat } type ConnectedPartnerResourcesListCompleteResult struct { LatestHttpResponse *http.Response - Items []ConnectedPartnerResourcesListResponse + Items []ConnectedPartnerResourcesListFormat } // ConnectedPartnerResourcesList ... @@ -50,7 +50,7 @@ func (c ConnectedResourcesClient) ConnectedPartnerResourcesList(ctx context.Cont } var values struct { - Values *[]ConnectedPartnerResourcesListResponse `json:"value"` + Values *[]ConnectedPartnerResourcesListFormat `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c ConnectedResourcesClient) ConnectedPartnerResourcesList(ctx context.Cont // ConnectedPartnerResourcesListComplete retrieves all the results into a single object func (c ConnectedResourcesClient) ConnectedPartnerResourcesListComplete(ctx context.Context, id MonitorId) (ConnectedPartnerResourcesListCompleteResult, error) { - return c.ConnectedPartnerResourcesListCompleteMatchingPredicate(ctx, id, ConnectedPartnerResourcesListResponseOperationPredicate{}) + return c.ConnectedPartnerResourcesListCompleteMatchingPredicate(ctx, id, ConnectedPartnerResourcesListFormatOperationPredicate{}) } // ConnectedPartnerResourcesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ConnectedResourcesClient) ConnectedPartnerResourcesListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate ConnectedPartnerResourcesListResponseOperationPredicate) (result ConnectedPartnerResourcesListCompleteResult, err error) { - items := make([]ConnectedPartnerResourcesListResponse, 0) +func (c ConnectedResourcesClient) ConnectedPartnerResourcesListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate ConnectedPartnerResourcesListFormatOperationPredicate) (result ConnectedPartnerResourcesListCompleteResult, err error) { + items := make([]ConnectedPartnerResourcesListFormat, 0) resp, err := c.ConnectedPartnerResourcesList(ctx, id) if err != nil { diff --git a/resource-manager/elastic/2024-03-01/connectedresources/model_connectedpartnerresourceslistresponse.go b/resource-manager/elastic/2024-03-01/connectedresources/model_connectedpartnerresourceslistresponse.go deleted file mode 100644 index dcf88750cdc..00000000000 --- a/resource-manager/elastic/2024-03-01/connectedresources/model_connectedpartnerresourceslistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectedresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectedPartnerResourcesListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ConnectedPartnerResourcesListFormat `json:"value,omitempty"` -} diff --git a/resource-manager/elastic/2024-03-01/connectedresources/predicates.go b/resource-manager/elastic/2024-03-01/connectedresources/predicates.go index bbe8ba5e24c..726b7b52190 100644 --- a/resource-manager/elastic/2024-03-01/connectedresources/predicates.go +++ b/resource-manager/elastic/2024-03-01/connectedresources/predicates.go @@ -3,15 +3,10 @@ package connectedresources // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ConnectedPartnerResourcesListResponseOperationPredicate struct { - NextLink *string +type ConnectedPartnerResourcesListFormatOperationPredicate struct { } -func (p ConnectedPartnerResourcesListResponseOperationPredicate) Matches(input ConnectedPartnerResourcesListResponse) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } +func (p ConnectedPartnerResourcesListFormatOperationPredicate) Matches(input ConnectedPartnerResourcesListFormat) bool { return true } diff --git a/resource-manager/elastic/2024-03-01/monitoredresources/method_list.go b/resource-manager/elastic/2024-03-01/monitoredresources/method_list.go index db12cbec2c4..dff331981fb 100644 --- a/resource-manager/elastic/2024-03-01/monitoredresources/method_list.go +++ b/resource-manager/elastic/2024-03-01/monitoredresources/method_list.go @@ -15,12 +15,12 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]MonitoredResourceListResponse + Model *[]MonitoredResource } type ListCompleteResult struct { LatestHttpResponse *http.Response - Items []MonitoredResourceListResponse + Items []MonitoredResource } // List ... @@ -50,7 +50,7 @@ func (c MonitoredResourcesClient) List(ctx context.Context, id MonitorId) (resul } var values struct { - Values *[]MonitoredResourceListResponse `json:"value"` + Values *[]MonitoredResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitoredResourcesClient) List(ctx context.Context, id MonitorId) (resul // ListComplete retrieves all the results into a single object func (c MonitoredResourcesClient) ListComplete(ctx context.Context, id MonitorId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, MonitoredResourceListResponseOperationPredicate{}) + return c.ListCompleteMatchingPredicate(ctx, id, MonitoredResourceOperationPredicate{}) } // ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitoredResourcesClient) ListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceListResponseOperationPredicate) (result ListCompleteResult, err error) { - items := make([]MonitoredResourceListResponse, 0) +func (c MonitoredResourcesClient) ListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceOperationPredicate) (result ListCompleteResult, err error) { + items := make([]MonitoredResource, 0) resp, err := c.List(ctx, id) if err != nil { diff --git a/resource-manager/elastic/2024-03-01/monitoredresources/model_monitoredresourcelistresponse.go b/resource-manager/elastic/2024-03-01/monitoredresources/model_monitoredresourcelistresponse.go deleted file mode 100644 index 2cdbf7a85eb..00000000000 --- a/resource-manager/elastic/2024-03-01/monitoredresources/model_monitoredresourcelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitoredresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoredResourceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]MonitoredResource `json:"value,omitempty"` -} diff --git a/resource-manager/elastic/2024-03-01/monitoredresources/predicates.go b/resource-manager/elastic/2024-03-01/monitoredresources/predicates.go index 228d572c77f..a17892f2418 100644 --- a/resource-manager/elastic/2024-03-01/monitoredresources/predicates.go +++ b/resource-manager/elastic/2024-03-01/monitoredresources/predicates.go @@ -3,13 +3,18 @@ package monitoredresources // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type MonitoredResourceListResponseOperationPredicate struct { - NextLink *string +type MonitoredResourceOperationPredicate struct { + Id *string + ReasonForLogsStatus *string } -func (p MonitoredResourceListResponseOperationPredicate) Matches(input MonitoredResourceListResponse) bool { +func (p MonitoredResourceOperationPredicate) Matches(input MonitoredResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.ReasonForLogsStatus != nil && (input.ReasonForLogsStatus == nil || *p.ReasonForLogsStatus != *input.ReasonForLogsStatus) { return false } diff --git a/resource-manager/elastic/2024-03-01/vmhhostlist/method_vmhostlist.go b/resource-manager/elastic/2024-03-01/vmhhostlist/method_vmhostlist.go index 31e824a2220..9c4284f2295 100644 --- a/resource-manager/elastic/2024-03-01/vmhhostlist/method_vmhostlist.go +++ b/resource-manager/elastic/2024-03-01/vmhhostlist/method_vmhostlist.go @@ -15,12 +15,12 @@ import ( type VMHostListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]VMHostListResponse + Model *[]VMResources } type VMHostListCompleteResult struct { LatestHttpResponse *http.Response - Items []VMHostListResponse + Items []VMResources } // VMHostList ... @@ -50,7 +50,7 @@ func (c VMHHostListClient) VMHostList(ctx context.Context, id MonitorId) (result } var values struct { - Values *[]VMHostListResponse `json:"value"` + Values *[]VMResources `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c VMHHostListClient) VMHostList(ctx context.Context, id MonitorId) (result // VMHostListComplete retrieves all the results into a single object func (c VMHHostListClient) VMHostListComplete(ctx context.Context, id MonitorId) (VMHostListCompleteResult, error) { - return c.VMHostListCompleteMatchingPredicate(ctx, id, VMHostListResponseOperationPredicate{}) + return c.VMHostListCompleteMatchingPredicate(ctx, id, VMResourcesOperationPredicate{}) } // VMHostListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VMHHostListClient) VMHostListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate VMHostListResponseOperationPredicate) (result VMHostListCompleteResult, err error) { - items := make([]VMHostListResponse, 0) +func (c VMHHostListClient) VMHostListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate VMResourcesOperationPredicate) (result VMHostListCompleteResult, err error) { + items := make([]VMResources, 0) resp, err := c.VMHostList(ctx, id) if err != nil { diff --git a/resource-manager/elastic/2024-03-01/vmhhostlist/model_vmhostlistresponse.go b/resource-manager/elastic/2024-03-01/vmhhostlist/model_vmhostlistresponse.go deleted file mode 100644 index ac073bb6488..00000000000 --- a/resource-manager/elastic/2024-03-01/vmhhostlist/model_vmhostlistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmhhostlist - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VMHostListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]VMResources `json:"value,omitempty"` -} diff --git a/resource-manager/elastic/2024-03-01/vmhhostlist/predicates.go b/resource-manager/elastic/2024-03-01/vmhhostlist/predicates.go index 48504d68eed..e4f8073c70a 100644 --- a/resource-manager/elastic/2024-03-01/vmhhostlist/predicates.go +++ b/resource-manager/elastic/2024-03-01/vmhhostlist/predicates.go @@ -3,13 +3,13 @@ package vmhhostlist // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type VMHostListResponseOperationPredicate struct { - NextLink *string +type VMResourcesOperationPredicate struct { + VMResourceId *string } -func (p VMHostListResponseOperationPredicate) Matches(input VMHostListResponse) bool { +func (p VMResourcesOperationPredicate) Matches(input VMResources) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.VMResourceId != nil && (input.VMResourceId == nil || *p.VMResourceId != *input.VMResourceId) { return false } diff --git a/resource-manager/iotcentral/2021-11-01-preview/apps/method_listtemplates.go b/resource-manager/iotcentral/2021-11-01-preview/apps/method_listtemplates.go index 4978a55ab6c..a6cdca1cdcf 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/apps/method_listtemplates.go +++ b/resource-manager/iotcentral/2021-11-01-preview/apps/method_listtemplates.go @@ -16,12 +16,12 @@ import ( type ListTemplatesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]AppTemplatesResult + Model *[]AppTemplate } type ListTemplatesCompleteResult struct { LatestHttpResponse *http.Response - Items []AppTemplatesResult + Items []AppTemplate } // ListTemplates ... @@ -51,7 +51,7 @@ func (c AppsClient) ListTemplates(ctx context.Context, id commonids.Subscription } var values struct { - Values *[]AppTemplatesResult `json:"value"` + Values *[]AppTemplate `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -64,12 +64,12 @@ func (c AppsClient) ListTemplates(ctx context.Context, id commonids.Subscription // ListTemplatesComplete retrieves all the results into a single object func (c AppsClient) ListTemplatesComplete(ctx context.Context, id commonids.SubscriptionId) (ListTemplatesCompleteResult, error) { - return c.ListTemplatesCompleteMatchingPredicate(ctx, id, AppTemplatesResultOperationPredicate{}) + return c.ListTemplatesCompleteMatchingPredicate(ctx, id, AppTemplateOperationPredicate{}) } // ListTemplatesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AppsClient) ListTemplatesCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AppTemplatesResultOperationPredicate) (result ListTemplatesCompleteResult, err error) { - items := make([]AppTemplatesResult, 0) +func (c AppsClient) ListTemplatesCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AppTemplateOperationPredicate) (result ListTemplatesCompleteResult, err error) { + items := make([]AppTemplate, 0) resp, err := c.ListTemplates(ctx, id) if err != nil { diff --git a/resource-manager/iotcentral/2021-11-01-preview/apps/model_apptemplatesresult.go b/resource-manager/iotcentral/2021-11-01-preview/apps/model_apptemplatesresult.go deleted file mode 100644 index f597b241770..00000000000 --- a/resource-manager/iotcentral/2021-11-01-preview/apps/model_apptemplatesresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package apps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AppTemplatesResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]AppTemplate `json:"value,omitempty"` -} diff --git a/resource-manager/iotcentral/2021-11-01-preview/apps/predicates.go b/resource-manager/iotcentral/2021-11-01-preview/apps/predicates.go index 06f887fd109..d527a493576 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/apps/predicates.go +++ b/resource-manager/iotcentral/2021-11-01-preview/apps/predicates.go @@ -31,13 +31,43 @@ func (p AppOperationPredicate) Matches(input App) bool { return true } -type AppTemplatesResultOperationPredicate struct { - NextLink *string +type AppTemplateOperationPredicate struct { + Description *string + Industry *string + ManifestId *string + ManifestVersion *string + Name *string + Order *float64 + Title *string } -func (p AppTemplatesResultOperationPredicate) Matches(input AppTemplatesResult) bool { +func (p AppTemplateOperationPredicate) Matches(input AppTemplate) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Description != nil && (input.Description == nil || *p.Description != *input.Description) { + return false + } + + if p.Industry != nil && (input.Industry == nil || *p.Industry != *input.Industry) { + return false + } + + if p.ManifestId != nil && (input.ManifestId == nil || *p.ManifestId != *input.ManifestId) { + return false + } + + if p.ManifestVersion != nil && (input.ManifestVersion == nil || *p.ManifestVersion != *input.ManifestVersion) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Order != nil && (input.Order == nil || *p.Order != *input.Order) { + return false + } + + if p.Title != nil && (input.Title == nil || *p.Title != *input.Title) { return false } diff --git a/resource-manager/logz/2020-10-01/monitors/method_listmonitoredresources.go b/resource-manager/logz/2020-10-01/monitors/method_listmonitoredresources.go index 644fc894e34..0b0dee2112f 100644 --- a/resource-manager/logz/2020-10-01/monitors/method_listmonitoredresources.go +++ b/resource-manager/logz/2020-10-01/monitors/method_listmonitoredresources.go @@ -15,12 +15,12 @@ import ( type ListMonitoredResourcesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]MonitoredResourceListResponse + Model *[]MonitoredResource } type ListMonitoredResourcesCompleteResult struct { LatestHttpResponse *http.Response - Items []MonitoredResourceListResponse + Items []MonitoredResource } // ListMonitoredResources ... @@ -50,7 +50,7 @@ func (c MonitorsClient) ListMonitoredResources(ctx context.Context, id MonitorId } var values struct { - Values *[]MonitoredResourceListResponse `json:"value"` + Values *[]MonitoredResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitorsClient) ListMonitoredResources(ctx context.Context, id MonitorId // ListMonitoredResourcesComplete retrieves all the results into a single object func (c MonitorsClient) ListMonitoredResourcesComplete(ctx context.Context, id MonitorId) (ListMonitoredResourcesCompleteResult, error) { - return c.ListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceListResponseOperationPredicate{}) + return c.ListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceOperationPredicate{}) } // ListMonitoredResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceListResponseOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error) { - items := make([]MonitoredResourceListResponse, 0) +func (c MonitorsClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error) { + items := make([]MonitoredResource, 0) resp, err := c.ListMonitoredResources(ctx, id) if err != nil { diff --git a/resource-manager/logz/2020-10-01/monitors/method_listuserroles.go b/resource-manager/logz/2020-10-01/monitors/method_listuserroles.go index b3a05349cad..5c1aad7119a 100644 --- a/resource-manager/logz/2020-10-01/monitors/method_listuserroles.go +++ b/resource-manager/logz/2020-10-01/monitors/method_listuserroles.go @@ -15,12 +15,12 @@ import ( type ListUserRolesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]UserRoleListResponse + Model *[]UserRoleResponse } type ListUserRolesCompleteResult struct { LatestHttpResponse *http.Response - Items []UserRoleListResponse + Items []UserRoleResponse } // ListUserRoles ... @@ -50,7 +50,7 @@ func (c MonitorsClient) ListUserRoles(ctx context.Context, id MonitorId, input U } var values struct { - Values *[]UserRoleListResponse `json:"value"` + Values *[]UserRoleResponse `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitorsClient) ListUserRoles(ctx context.Context, id MonitorId, input U // ListUserRolesComplete retrieves all the results into a single object func (c MonitorsClient) ListUserRolesComplete(ctx context.Context, id MonitorId, input UserRoleRequest) (ListUserRolesCompleteResult, error) { - return c.ListUserRolesCompleteMatchingPredicate(ctx, id, input, UserRoleListResponseOperationPredicate{}) + return c.ListUserRolesCompleteMatchingPredicate(ctx, id, input, UserRoleResponseOperationPredicate{}) } // ListUserRolesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListUserRolesCompleteMatchingPredicate(ctx context.Context, id MonitorId, input UserRoleRequest, predicate UserRoleListResponseOperationPredicate) (result ListUserRolesCompleteResult, err error) { - items := make([]UserRoleListResponse, 0) +func (c MonitorsClient) ListUserRolesCompleteMatchingPredicate(ctx context.Context, id MonitorId, input UserRoleRequest, predicate UserRoleResponseOperationPredicate) (result ListUserRolesCompleteResult, err error) { + items := make([]UserRoleResponse, 0) resp, err := c.ListUserRoles(ctx, id, input) if err != nil { diff --git a/resource-manager/logz/2020-10-01/monitors/model_monitoredresourcelistresponse.go b/resource-manager/logz/2020-10-01/monitors/model_monitoredresourcelistresponse.go deleted file mode 100644 index a85b7de4c67..00000000000 --- a/resource-manager/logz/2020-10-01/monitors/model_monitoredresourcelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoredResourceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]MonitoredResource `json:"value,omitempty"` -} diff --git a/resource-manager/logz/2020-10-01/monitors/model_userrolelistresponse.go b/resource-manager/logz/2020-10-01/monitors/model_userrolelistresponse.go deleted file mode 100644 index d69fe0042a9..00000000000 --- a/resource-manager/logz/2020-10-01/monitors/model_userrolelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserRoleListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]UserRoleResponse `json:"value,omitempty"` -} diff --git a/resource-manager/logz/2020-10-01/monitors/predicates.go b/resource-manager/logz/2020-10-01/monitors/predicates.go index 7483d375fc1..c717fd40c26 100644 --- a/resource-manager/logz/2020-10-01/monitors/predicates.go +++ b/resource-manager/logz/2020-10-01/monitors/predicates.go @@ -31,28 +31,43 @@ func (p LogzMonitorResourceOperationPredicate) Matches(input LogzMonitorResource return true } -type MonitoredResourceListResponseOperationPredicate struct { - NextLink *string +type MonitoredResourceOperationPredicate struct { + Id *string + ReasonForLogsStatus *string + ReasonForMetricsStatus *string + SendingLogs *bool + SendingMetrics *bool } -func (p MonitoredResourceListResponseOperationPredicate) Matches(input MonitoredResourceListResponse) bool { +func (p MonitoredResourceOperationPredicate) Matches(input MonitoredResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } - return true -} + if p.ReasonForLogsStatus != nil && (input.ReasonForLogsStatus == nil || *p.ReasonForLogsStatus != *input.ReasonForLogsStatus) { + return false + } -type UserRoleListResponseOperationPredicate struct { - NextLink *string -} + if p.ReasonForMetricsStatus != nil && (input.ReasonForMetricsStatus == nil || *p.ReasonForMetricsStatus != *input.ReasonForMetricsStatus) { + return false + } -func (p UserRoleListResponseOperationPredicate) Matches(input UserRoleListResponse) bool { + if p.SendingLogs != nil && (input.SendingLogs == nil || *p.SendingLogs != *input.SendingLogs) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.SendingMetrics != nil && (input.SendingMetrics == nil || *p.SendingMetrics != *input.SendingMetrics) { return false } return true } + +type UserRoleResponseOperationPredicate struct { +} + +func (p UserRoleResponseOperationPredicate) Matches(input UserRoleResponse) bool { + + return true +} diff --git a/resource-manager/logz/2020-10-01/subaccount/method_listmonitoredresources.go b/resource-manager/logz/2020-10-01/subaccount/method_listmonitoredresources.go index d8164a32070..3af444acba1 100644 --- a/resource-manager/logz/2020-10-01/subaccount/method_listmonitoredresources.go +++ b/resource-manager/logz/2020-10-01/subaccount/method_listmonitoredresources.go @@ -15,12 +15,12 @@ import ( type ListMonitoredResourcesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]MonitoredResourceListResponse + Model *[]MonitoredResource } type ListMonitoredResourcesCompleteResult struct { LatestHttpResponse *http.Response - Items []MonitoredResourceListResponse + Items []MonitoredResource } // ListMonitoredResources ... @@ -50,7 +50,7 @@ func (c SubAccountClient) ListMonitoredResources(ctx context.Context, id Account } var values struct { - Values *[]MonitoredResourceListResponse `json:"value"` + Values *[]MonitoredResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c SubAccountClient) ListMonitoredResources(ctx context.Context, id Account // ListMonitoredResourcesComplete retrieves all the results into a single object func (c SubAccountClient) ListMonitoredResourcesComplete(ctx context.Context, id AccountId) (ListMonitoredResourcesCompleteResult, error) { - return c.ListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceListResponseOperationPredicate{}) + return c.ListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceOperationPredicate{}) } // ListMonitoredResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SubAccountClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id AccountId, predicate MonitoredResourceListResponseOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error) { - items := make([]MonitoredResourceListResponse, 0) +func (c SubAccountClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id AccountId, predicate MonitoredResourceOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error) { + items := make([]MonitoredResource, 0) resp, err := c.ListMonitoredResources(ctx, id) if err != nil { diff --git a/resource-manager/logz/2020-10-01/subaccount/model_monitoredresourcelistresponse.go b/resource-manager/logz/2020-10-01/subaccount/model_monitoredresourcelistresponse.go deleted file mode 100644 index a2ef59e55ac..00000000000 --- a/resource-manager/logz/2020-10-01/subaccount/model_monitoredresourcelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package subaccount - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoredResourceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]MonitoredResource `json:"value,omitempty"` -} diff --git a/resource-manager/logz/2020-10-01/subaccount/predicates.go b/resource-manager/logz/2020-10-01/subaccount/predicates.go index 945866bad9b..70c789ddee2 100644 --- a/resource-manager/logz/2020-10-01/subaccount/predicates.go +++ b/resource-manager/logz/2020-10-01/subaccount/predicates.go @@ -31,13 +31,33 @@ func (p LogzMonitorResourceOperationPredicate) Matches(input LogzMonitorResource return true } -type MonitoredResourceListResponseOperationPredicate struct { - NextLink *string +type MonitoredResourceOperationPredicate struct { + Id *string + ReasonForLogsStatus *string + ReasonForMetricsStatus *string + SendingLogs *bool + SendingMetrics *bool } -func (p MonitoredResourceListResponseOperationPredicate) Matches(input MonitoredResourceListResponse) bool { +func (p MonitoredResourceOperationPredicate) Matches(input MonitoredResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.ReasonForLogsStatus != nil && (input.ReasonForLogsStatus == nil || *p.ReasonForLogsStatus != *input.ReasonForLogsStatus) { + return false + } + + if p.ReasonForMetricsStatus != nil && (input.ReasonForMetricsStatus == nil || *p.ReasonForMetricsStatus != *input.ReasonForMetricsStatus) { + return false + } + + if p.SendingLogs != nil && (input.SendingLogs == nil || *p.SendingLogs != *input.SendingLogs) { + return false + } + + if p.SendingMetrics != nil && (input.SendingMetrics == nil || *p.SendingMetrics != *input.SendingMetrics) { return false } diff --git a/resource-manager/logz/2020-10-01/vmhost/method_monitorlistvmhosts.go b/resource-manager/logz/2020-10-01/vmhost/method_monitorlistvmhosts.go index 9f885a0f3dc..ecf51d05e4f 100644 --- a/resource-manager/logz/2020-10-01/vmhost/method_monitorlistvmhosts.go +++ b/resource-manager/logz/2020-10-01/vmhost/method_monitorlistvmhosts.go @@ -15,12 +15,12 @@ import ( type MonitorListVMHostsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]VMResourcesListResponse + Model *[]VMResources } type MonitorListVMHostsCompleteResult struct { LatestHttpResponse *http.Response - Items []VMResourcesListResponse + Items []VMResources } // MonitorListVMHosts ... @@ -50,7 +50,7 @@ func (c VMHostClient) MonitorListVMHosts(ctx context.Context, id MonitorId) (res } var values struct { - Values *[]VMResourcesListResponse `json:"value"` + Values *[]VMResources `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c VMHostClient) MonitorListVMHosts(ctx context.Context, id MonitorId) (res // MonitorListVMHostsComplete retrieves all the results into a single object func (c VMHostClient) MonitorListVMHostsComplete(ctx context.Context, id MonitorId) (MonitorListVMHostsCompleteResult, error) { - return c.MonitorListVMHostsCompleteMatchingPredicate(ctx, id, VMResourcesListResponseOperationPredicate{}) + return c.MonitorListVMHostsCompleteMatchingPredicate(ctx, id, VMResourcesOperationPredicate{}) } // MonitorListVMHostsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VMHostClient) MonitorListVMHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate VMResourcesListResponseOperationPredicate) (result MonitorListVMHostsCompleteResult, err error) { - items := make([]VMResourcesListResponse, 0) +func (c VMHostClient) MonitorListVMHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate VMResourcesOperationPredicate) (result MonitorListVMHostsCompleteResult, err error) { + items := make([]VMResources, 0) resp, err := c.MonitorListVMHosts(ctx, id) if err != nil { diff --git a/resource-manager/logz/2020-10-01/vmhost/method_monitorlistvmhostupdate.go b/resource-manager/logz/2020-10-01/vmhost/method_monitorlistvmhostupdate.go index d2654073f5f..0ffd9855f6d 100644 --- a/resource-manager/logz/2020-10-01/vmhost/method_monitorlistvmhostupdate.go +++ b/resource-manager/logz/2020-10-01/vmhost/method_monitorlistvmhostupdate.go @@ -15,12 +15,12 @@ import ( type MonitorListVMHostUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]VMResourcesListResponse + Model *[]VMResources } type MonitorListVMHostUpdateCompleteResult struct { LatestHttpResponse *http.Response - Items []VMResourcesListResponse + Items []VMResources } // MonitorListVMHostUpdate ... @@ -50,7 +50,7 @@ func (c VMHostClient) MonitorListVMHostUpdate(ctx context.Context, id MonitorId, } var values struct { - Values *[]VMResourcesListResponse `json:"value"` + Values *[]VMResources `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c VMHostClient) MonitorListVMHostUpdate(ctx context.Context, id MonitorId, // MonitorListVMHostUpdateComplete retrieves all the results into a single object func (c VMHostClient) MonitorListVMHostUpdateComplete(ctx context.Context, id MonitorId, input VMHostUpdateRequest) (MonitorListVMHostUpdateCompleteResult, error) { - return c.MonitorListVMHostUpdateCompleteMatchingPredicate(ctx, id, input, VMResourcesListResponseOperationPredicate{}) + return c.MonitorListVMHostUpdateCompleteMatchingPredicate(ctx, id, input, VMResourcesOperationPredicate{}) } // MonitorListVMHostUpdateCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VMHostClient) MonitorListVMHostUpdateCompleteMatchingPredicate(ctx context.Context, id MonitorId, input VMHostUpdateRequest, predicate VMResourcesListResponseOperationPredicate) (result MonitorListVMHostUpdateCompleteResult, err error) { - items := make([]VMResourcesListResponse, 0) +func (c VMHostClient) MonitorListVMHostUpdateCompleteMatchingPredicate(ctx context.Context, id MonitorId, input VMHostUpdateRequest, predicate VMResourcesOperationPredicate) (result MonitorListVMHostUpdateCompleteResult, err error) { + items := make([]VMResources, 0) resp, err := c.MonitorListVMHostUpdate(ctx, id, input) if err != nil { diff --git a/resource-manager/logz/2020-10-01/vmhost/method_subaccountlistvmhosts.go b/resource-manager/logz/2020-10-01/vmhost/method_subaccountlistvmhosts.go index 6f23f2165bb..f15a56f544a 100644 --- a/resource-manager/logz/2020-10-01/vmhost/method_subaccountlistvmhosts.go +++ b/resource-manager/logz/2020-10-01/vmhost/method_subaccountlistvmhosts.go @@ -15,12 +15,12 @@ import ( type SubAccountListVMHostsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]VMResourcesListResponse + Model *[]VMResources } type SubAccountListVMHostsCompleteResult struct { LatestHttpResponse *http.Response - Items []VMResourcesListResponse + Items []VMResources } // SubAccountListVMHosts ... @@ -50,7 +50,7 @@ func (c VMHostClient) SubAccountListVMHosts(ctx context.Context, id AccountId) ( } var values struct { - Values *[]VMResourcesListResponse `json:"value"` + Values *[]VMResources `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c VMHostClient) SubAccountListVMHosts(ctx context.Context, id AccountId) ( // SubAccountListVMHostsComplete retrieves all the results into a single object func (c VMHostClient) SubAccountListVMHostsComplete(ctx context.Context, id AccountId) (SubAccountListVMHostsCompleteResult, error) { - return c.SubAccountListVMHostsCompleteMatchingPredicate(ctx, id, VMResourcesListResponseOperationPredicate{}) + return c.SubAccountListVMHostsCompleteMatchingPredicate(ctx, id, VMResourcesOperationPredicate{}) } // SubAccountListVMHostsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VMHostClient) SubAccountListVMHostsCompleteMatchingPredicate(ctx context.Context, id AccountId, predicate VMResourcesListResponseOperationPredicate) (result SubAccountListVMHostsCompleteResult, err error) { - items := make([]VMResourcesListResponse, 0) +func (c VMHostClient) SubAccountListVMHostsCompleteMatchingPredicate(ctx context.Context, id AccountId, predicate VMResourcesOperationPredicate) (result SubAccountListVMHostsCompleteResult, err error) { + items := make([]VMResources, 0) resp, err := c.SubAccountListVMHosts(ctx, id) if err != nil { diff --git a/resource-manager/logz/2020-10-01/vmhost/method_subaccountlistvmhostupdate.go b/resource-manager/logz/2020-10-01/vmhost/method_subaccountlistvmhostupdate.go index 8971ff466da..69a4c903a1f 100644 --- a/resource-manager/logz/2020-10-01/vmhost/method_subaccountlistvmhostupdate.go +++ b/resource-manager/logz/2020-10-01/vmhost/method_subaccountlistvmhostupdate.go @@ -15,12 +15,12 @@ import ( type SubAccountListVMHostUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]VMResourcesListResponse + Model *[]VMResources } type SubAccountListVMHostUpdateCompleteResult struct { LatestHttpResponse *http.Response - Items []VMResourcesListResponse + Items []VMResources } // SubAccountListVMHostUpdate ... @@ -50,7 +50,7 @@ func (c VMHostClient) SubAccountListVMHostUpdate(ctx context.Context, id Account } var values struct { - Values *[]VMResourcesListResponse `json:"value"` + Values *[]VMResources `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c VMHostClient) SubAccountListVMHostUpdate(ctx context.Context, id Account // SubAccountListVMHostUpdateComplete retrieves all the results into a single object func (c VMHostClient) SubAccountListVMHostUpdateComplete(ctx context.Context, id AccountId, input VMHostUpdateRequest) (SubAccountListVMHostUpdateCompleteResult, error) { - return c.SubAccountListVMHostUpdateCompleteMatchingPredicate(ctx, id, input, VMResourcesListResponseOperationPredicate{}) + return c.SubAccountListVMHostUpdateCompleteMatchingPredicate(ctx, id, input, VMResourcesOperationPredicate{}) } // SubAccountListVMHostUpdateCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VMHostClient) SubAccountListVMHostUpdateCompleteMatchingPredicate(ctx context.Context, id AccountId, input VMHostUpdateRequest, predicate VMResourcesListResponseOperationPredicate) (result SubAccountListVMHostUpdateCompleteResult, err error) { - items := make([]VMResourcesListResponse, 0) +func (c VMHostClient) SubAccountListVMHostUpdateCompleteMatchingPredicate(ctx context.Context, id AccountId, input VMHostUpdateRequest, predicate VMResourcesOperationPredicate) (result SubAccountListVMHostUpdateCompleteResult, err error) { + items := make([]VMResources, 0) resp, err := c.SubAccountListVMHostUpdate(ctx, id, input) if err != nil { diff --git a/resource-manager/logz/2020-10-01/vmhost/model_vmresourceslistresponse.go b/resource-manager/logz/2020-10-01/vmhost/model_vmresourceslistresponse.go deleted file mode 100644 index d76d5222c3c..00000000000 --- a/resource-manager/logz/2020-10-01/vmhost/model_vmresourceslistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmhost - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VMResourcesListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]VMResources `json:"value,omitempty"` -} diff --git a/resource-manager/logz/2020-10-01/vmhost/predicates.go b/resource-manager/logz/2020-10-01/vmhost/predicates.go index 2f4fc026481..1d53ebc8265 100644 --- a/resource-manager/logz/2020-10-01/vmhost/predicates.go +++ b/resource-manager/logz/2020-10-01/vmhost/predicates.go @@ -3,13 +3,18 @@ package vmhost // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type VMResourcesListResponseOperationPredicate struct { - NextLink *string +type VMResourcesOperationPredicate struct { + AgentVersion *string + Id *string } -func (p VMResourcesListResponseOperationPredicate) Matches(input VMResourcesListResponse) bool { +func (p VMResourcesOperationPredicate) Matches(input VMResources) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.AgentVersion != nil && (input.AgentVersion == nil || *p.AgentVersion != *input.AgentVersion) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } diff --git a/resource-manager/machinelearningservices/2023-10-01/quota/README.md b/resource-manager/machinelearningservices/2023-10-01/quota/README.md index 7efc310a881..09a6e3642e9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/quota/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/quota/README.md @@ -48,11 +48,12 @@ payload := quota.QuotaUpdateParameters{ } -read, err := client.Update(ctx, id, payload) +// alternatively `client.Update(ctx, id, payload)` can be used to do batched pagination +items, err := client.UpdateComplete(ctx, id, payload) 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/machinelearningservices/2023-10-01/quota/method_update.go b/resource-manager/machinelearningservices/2023-10-01/quota/method_update.go index 9ae60206cd6..dd98619a8df 100644 --- a/resource-manager/machinelearningservices/2023-10-01/quota/method_update.go +++ b/resource-manager/machinelearningservices/2023-10-01/quota/method_update.go @@ -15,7 +15,12 @@ import ( type UpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *UpdateWorkspaceQuotasResult + Model *[]UpdateWorkspaceQuotas +} + +type UpdateCompleteResult struct { + LatestHttpResponse *http.Response + Items []UpdateWorkspaceQuotas } // Update ... @@ -34,12 +39,8 @@ func (c QuotaClient) Update(ctx context.Context, id LocationId, input QuotaUpdat return } - if err = req.Marshal(input); err != nil { - return - } - 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 @@ -48,12 +49,43 @@ func (c QuotaClient) Update(ctx context.Context, id LocationId, input QuotaUpdat return } - var model UpdateWorkspaceQuotasResult - result.Model = &model + var values struct { + Values *[]UpdateWorkspaceQuotas `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// UpdateComplete retrieves all the results into a single object +func (c QuotaClient) UpdateComplete(ctx context.Context, id LocationId, input QuotaUpdateParameters) (UpdateCompleteResult, error) { + return c.UpdateCompleteMatchingPredicate(ctx, id, input, UpdateWorkspaceQuotasOperationPredicate{}) +} + +// UpdateCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c QuotaClient) UpdateCompleteMatchingPredicate(ctx context.Context, id LocationId, input QuotaUpdateParameters, predicate UpdateWorkspaceQuotasOperationPredicate) (result UpdateCompleteResult, err error) { + items := make([]UpdateWorkspaceQuotas, 0) + + resp, err := c.Update(ctx, id, input) + if err != nil { + 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 = UpdateCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/machinelearningservices/2023-10-01/quota/model_updateworkspacequotasresult.go b/resource-manager/machinelearningservices/2023-10-01/quota/model_updateworkspacequotasresult.go deleted file mode 100644 index ce4e424847e..00000000000 --- a/resource-manager/machinelearningservices/2023-10-01/quota/model_updateworkspacequotasresult.go +++ /dev/null @@ -1,9 +0,0 @@ -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 UpdateWorkspaceQuotasResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]UpdateWorkspaceQuotas `json:"value,omitempty"` -} diff --git a/resource-manager/machinelearningservices/2023-10-01/quota/predicates.go b/resource-manager/machinelearningservices/2023-10-01/quota/predicates.go index 958ceee8320..db56a8407ce 100644 --- a/resource-manager/machinelearningservices/2023-10-01/quota/predicates.go +++ b/resource-manager/machinelearningservices/2023-10-01/quota/predicates.go @@ -30,3 +30,26 @@ func (p ResourceQuotaOperationPredicate) Matches(input ResourceQuota) bool { return true } + +type UpdateWorkspaceQuotasOperationPredicate struct { + Id *string + Limit *int64 + Type *string +} + +func (p UpdateWorkspaceQuotasOperationPredicate) Matches(input UpdateWorkspaceQuotas) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Limit != nil && (input.Limit == nil || *p.Limit != *input.Limit) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/managementgroups/2020-05-01/entities/method_list.go b/resource-manager/managementgroups/2020-05-01/entities/method_list.go index 40ec65145a5..d97c3dcdb00 100644 --- a/resource-manager/managementgroups/2020-05-01/entities/method_list.go +++ b/resource-manager/managementgroups/2020-05-01/entities/method_list.go @@ -15,12 +15,12 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]EntityListResult + Model *[]EntityInfo } type ListCompleteResult struct { LatestHttpResponse *http.Response - Items []EntityListResult + Items []EntityInfo } type ListOperationOptions struct { @@ -105,7 +105,7 @@ func (c EntitiesClient) List(ctx context.Context, options ListOperationOptions) } var values struct { - Values *[]EntityListResult `json:"value"` + Values *[]EntityInfo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -118,12 +118,12 @@ func (c EntitiesClient) List(ctx context.Context, options ListOperationOptions) // ListComplete retrieves all the results into a single object func (c EntitiesClient) ListComplete(ctx context.Context, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, options, EntityListResultOperationPredicate{}) + return c.ListCompleteMatchingPredicate(ctx, options, EntityInfoOperationPredicate{}) } // ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c EntitiesClient) ListCompleteMatchingPredicate(ctx context.Context, options ListOperationOptions, predicate EntityListResultOperationPredicate) (result ListCompleteResult, err error) { - items := make([]EntityListResult, 0) +func (c EntitiesClient) ListCompleteMatchingPredicate(ctx context.Context, options ListOperationOptions, predicate EntityInfoOperationPredicate) (result ListCompleteResult, err error) { + items := make([]EntityInfo, 0) resp, err := c.List(ctx, options) if err != nil { diff --git a/resource-manager/managementgroups/2020-05-01/entities/model_entitylistresult.go b/resource-manager/managementgroups/2020-05-01/entities/model_entitylistresult.go deleted file mode 100644 index 681dc0411f5..00000000000 --- a/resource-manager/managementgroups/2020-05-01/entities/model_entitylistresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package entities - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EntityListResult struct { - Count *int64 `json:"count,omitempty"` - NextLink *string `json:"nextLink,omitempty"` - Value *[]EntityInfo `json:"value,omitempty"` -} diff --git a/resource-manager/managementgroups/2020-05-01/entities/predicates.go b/resource-manager/managementgroups/2020-05-01/entities/predicates.go index 1d82d9aef7e..65e94badaf5 100644 --- a/resource-manager/managementgroups/2020-05-01/entities/predicates.go +++ b/resource-manager/managementgroups/2020-05-01/entities/predicates.go @@ -3,18 +3,23 @@ package entities // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type EntityListResultOperationPredicate struct { - Count *int64 - NextLink *string +type EntityInfoOperationPredicate struct { + Id *string + Name *string + Type *string } -func (p EntityListResultOperationPredicate) Matches(input EntityListResult) bool { +func (p EntityInfoOperationPredicate) Matches(input EntityInfo) bool { - if p.Count != nil && (input.Count == nil || *p.Count != *input.Count) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + 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 } diff --git a/resource-manager/managementgroups/2021-04-01/entities/method_list.go b/resource-manager/managementgroups/2021-04-01/entities/method_list.go index 416a2b0408a..a0069d68b30 100644 --- a/resource-manager/managementgroups/2021-04-01/entities/method_list.go +++ b/resource-manager/managementgroups/2021-04-01/entities/method_list.go @@ -15,12 +15,12 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]EntityListResult + Model *[]EntityInfo } type ListCompleteResult struct { LatestHttpResponse *http.Response - Items []EntityListResult + Items []EntityInfo } type ListOperationOptions struct { @@ -105,7 +105,7 @@ func (c EntitiesClient) List(ctx context.Context, options ListOperationOptions) } var values struct { - Values *[]EntityListResult `json:"value"` + Values *[]EntityInfo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -118,12 +118,12 @@ func (c EntitiesClient) List(ctx context.Context, options ListOperationOptions) // ListComplete retrieves all the results into a single object func (c EntitiesClient) ListComplete(ctx context.Context, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, options, EntityListResultOperationPredicate{}) + return c.ListCompleteMatchingPredicate(ctx, options, EntityInfoOperationPredicate{}) } // ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c EntitiesClient) ListCompleteMatchingPredicate(ctx context.Context, options ListOperationOptions, predicate EntityListResultOperationPredicate) (result ListCompleteResult, err error) { - items := make([]EntityListResult, 0) +func (c EntitiesClient) ListCompleteMatchingPredicate(ctx context.Context, options ListOperationOptions, predicate EntityInfoOperationPredicate) (result ListCompleteResult, err error) { + items := make([]EntityInfo, 0) resp, err := c.List(ctx, options) if err != nil { diff --git a/resource-manager/managementgroups/2021-04-01/entities/model_entitylistresult.go b/resource-manager/managementgroups/2021-04-01/entities/model_entitylistresult.go deleted file mode 100644 index 681dc0411f5..00000000000 --- a/resource-manager/managementgroups/2021-04-01/entities/model_entitylistresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package entities - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EntityListResult struct { - Count *int64 `json:"count,omitempty"` - NextLink *string `json:"nextLink,omitempty"` - Value *[]EntityInfo `json:"value,omitempty"` -} diff --git a/resource-manager/managementgroups/2021-04-01/entities/predicates.go b/resource-manager/managementgroups/2021-04-01/entities/predicates.go index 1d82d9aef7e..65e94badaf5 100644 --- a/resource-manager/managementgroups/2021-04-01/entities/predicates.go +++ b/resource-manager/managementgroups/2021-04-01/entities/predicates.go @@ -3,18 +3,23 @@ package entities // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type EntityListResultOperationPredicate struct { - Count *int64 - NextLink *string +type EntityInfoOperationPredicate struct { + Id *string + Name *string + Type *string } -func (p EntityListResultOperationPredicate) Matches(input EntityListResult) bool { +func (p EntityInfoOperationPredicate) Matches(input EntityInfo) bool { - if p.Count != nil && (input.Count == nil || *p.Count != *input.Count) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + 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 } diff --git a/resource-manager/managementgroups/2023-04-01/entities/method_list.go b/resource-manager/managementgroups/2023-04-01/entities/method_list.go index 416a2b0408a..a0069d68b30 100644 --- a/resource-manager/managementgroups/2023-04-01/entities/method_list.go +++ b/resource-manager/managementgroups/2023-04-01/entities/method_list.go @@ -15,12 +15,12 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]EntityListResult + Model *[]EntityInfo } type ListCompleteResult struct { LatestHttpResponse *http.Response - Items []EntityListResult + Items []EntityInfo } type ListOperationOptions struct { @@ -105,7 +105,7 @@ func (c EntitiesClient) List(ctx context.Context, options ListOperationOptions) } var values struct { - Values *[]EntityListResult `json:"value"` + Values *[]EntityInfo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -118,12 +118,12 @@ func (c EntitiesClient) List(ctx context.Context, options ListOperationOptions) // ListComplete retrieves all the results into a single object func (c EntitiesClient) ListComplete(ctx context.Context, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, options, EntityListResultOperationPredicate{}) + return c.ListCompleteMatchingPredicate(ctx, options, EntityInfoOperationPredicate{}) } // ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c EntitiesClient) ListCompleteMatchingPredicate(ctx context.Context, options ListOperationOptions, predicate EntityListResultOperationPredicate) (result ListCompleteResult, err error) { - items := make([]EntityListResult, 0) +func (c EntitiesClient) ListCompleteMatchingPredicate(ctx context.Context, options ListOperationOptions, predicate EntityInfoOperationPredicate) (result ListCompleteResult, err error) { + items := make([]EntityInfo, 0) resp, err := c.List(ctx, options) if err != nil { diff --git a/resource-manager/managementgroups/2023-04-01/entities/model_entitylistresult.go b/resource-manager/managementgroups/2023-04-01/entities/model_entitylistresult.go deleted file mode 100644 index 681dc0411f5..00000000000 --- a/resource-manager/managementgroups/2023-04-01/entities/model_entitylistresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package entities - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EntityListResult struct { - Count *int64 `json:"count,omitempty"` - NextLink *string `json:"nextLink,omitempty"` - Value *[]EntityInfo `json:"value,omitempty"` -} diff --git a/resource-manager/managementgroups/2023-04-01/entities/predicates.go b/resource-manager/managementgroups/2023-04-01/entities/predicates.go index 1d82d9aef7e..65e94badaf5 100644 --- a/resource-manager/managementgroups/2023-04-01/entities/predicates.go +++ b/resource-manager/managementgroups/2023-04-01/entities/predicates.go @@ -3,18 +3,23 @@ package entities // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type EntityListResultOperationPredicate struct { - Count *int64 - NextLink *string +type EntityInfoOperationPredicate struct { + Id *string + Name *string + Type *string } -func (p EntityListResultOperationPredicate) Matches(input EntityListResult) bool { +func (p EntityInfoOperationPredicate) Matches(input EntityInfo) bool { - if p.Count != nil && (input.Count == nil || *p.Count != *input.Count) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { return false } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + 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 } diff --git a/resource-manager/migrate/2020-01-01/hypervsites/method_getsitehealthsummary.go b/resource-manager/migrate/2020-01-01/hypervsites/method_getsitehealthsummary.go index 9ade28c0a5a..117ff216e8f 100644 --- a/resource-manager/migrate/2020-01-01/hypervsites/method_getsitehealthsummary.go +++ b/resource-manager/migrate/2020-01-01/hypervsites/method_getsitehealthsummary.go @@ -15,12 +15,12 @@ import ( type GetSiteHealthSummaryOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SiteHealthSummaryCollection + Model *[]SiteHealthSummary } type GetSiteHealthSummaryCompleteResult struct { LatestHttpResponse *http.Response - Items []SiteHealthSummaryCollection + Items []SiteHealthSummary } // GetSiteHealthSummary ... @@ -50,7 +50,7 @@ func (c HyperVSitesClient) GetSiteHealthSummary(ctx context.Context, id HyperVSi } var values struct { - Values *[]SiteHealthSummaryCollection `json:"value"` + Values *[]SiteHealthSummary `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c HyperVSitesClient) GetSiteHealthSummary(ctx context.Context, id HyperVSi // GetSiteHealthSummaryComplete retrieves all the results into a single object func (c HyperVSitesClient) GetSiteHealthSummaryComplete(ctx context.Context, id HyperVSiteId) (GetSiteHealthSummaryCompleteResult, error) { - return c.GetSiteHealthSummaryCompleteMatchingPredicate(ctx, id, SiteHealthSummaryCollectionOperationPredicate{}) + return c.GetSiteHealthSummaryCompleteMatchingPredicate(ctx, id, SiteHealthSummaryOperationPredicate{}) } // GetSiteHealthSummaryCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HyperVSitesClient) GetSiteHealthSummaryCompleteMatchingPredicate(ctx context.Context, id HyperVSiteId, predicate SiteHealthSummaryCollectionOperationPredicate) (result GetSiteHealthSummaryCompleteResult, err error) { - items := make([]SiteHealthSummaryCollection, 0) +func (c HyperVSitesClient) GetSiteHealthSummaryCompleteMatchingPredicate(ctx context.Context, id HyperVSiteId, predicate SiteHealthSummaryOperationPredicate) (result GetSiteHealthSummaryCompleteResult, err error) { + items := make([]SiteHealthSummary, 0) resp, err := c.GetSiteHealthSummary(ctx, id) if err != nil { diff --git a/resource-manager/migrate/2020-01-01/hypervsites/model_sitehealthsummarycollection.go b/resource-manager/migrate/2020-01-01/hypervsites/model_sitehealthsummarycollection.go deleted file mode 100644 index 6645eaa8837..00000000000 --- a/resource-manager/migrate/2020-01-01/hypervsites/model_sitehealthsummarycollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package hypervsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SiteHealthSummaryCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]SiteHealthSummary `json:"value,omitempty"` -} diff --git a/resource-manager/migrate/2020-01-01/hypervsites/predicates.go b/resource-manager/migrate/2020-01-01/hypervsites/predicates.go index 5a2c26dcc2a..a6540a0ef24 100644 --- a/resource-manager/migrate/2020-01-01/hypervsites/predicates.go +++ b/resource-manager/migrate/2020-01-01/hypervsites/predicates.go @@ -3,13 +3,58 @@ package hypervsites // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type SiteHealthSummaryCollectionOperationPredicate struct { - NextLink *string +type SiteHealthSummaryOperationPredicate struct { + AffectedObjectsCount *int64 + AffectedResourceType *string + ApplianceName *string + ErrorCode *string + ErrorId *int64 + ErrorMessage *string + HitCount *int64 + RemediationGuidance *string + Severity *string + SummaryMessage *string } -func (p SiteHealthSummaryCollectionOperationPredicate) Matches(input SiteHealthSummaryCollection) bool { +func (p SiteHealthSummaryOperationPredicate) Matches(input SiteHealthSummary) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.AffectedObjectsCount != nil && (input.AffectedObjectsCount == nil || *p.AffectedObjectsCount != *input.AffectedObjectsCount) { + return false + } + + if p.AffectedResourceType != nil && (input.AffectedResourceType == nil || *p.AffectedResourceType != *input.AffectedResourceType) { + return false + } + + if p.ApplianceName != nil && (input.ApplianceName == nil || *p.ApplianceName != *input.ApplianceName) { + return false + } + + if p.ErrorCode != nil && (input.ErrorCode == nil || *p.ErrorCode != *input.ErrorCode) { + return false + } + + if p.ErrorId != nil && (input.ErrorId == nil || *p.ErrorId != *input.ErrorId) { + return false + } + + if p.ErrorMessage != nil && (input.ErrorMessage == nil || *p.ErrorMessage != *input.ErrorMessage) { + return false + } + + if p.HitCount != nil && (input.HitCount == nil || *p.HitCount != *input.HitCount) { + return false + } + + if p.RemediationGuidance != nil && (input.RemediationGuidance == nil || *p.RemediationGuidance != *input.RemediationGuidance) { + return false + } + + if p.Severity != nil && (input.Severity == nil || *p.Severity != *input.Severity) { + return false + } + + if p.SummaryMessage != nil && (input.SummaryMessage == nil || *p.SummaryMessage != *input.SummaryMessage) { return false } diff --git a/resource-manager/migrate/2020-01-01/sites/method_getsitehealthsummary.go b/resource-manager/migrate/2020-01-01/sites/method_getsitehealthsummary.go index 5b09ffd2350..bd37fb8f61b 100644 --- a/resource-manager/migrate/2020-01-01/sites/method_getsitehealthsummary.go +++ b/resource-manager/migrate/2020-01-01/sites/method_getsitehealthsummary.go @@ -15,12 +15,12 @@ import ( type GetSiteHealthSummaryOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SiteHealthSummaryCollection + Model *[]SiteHealthSummary } type GetSiteHealthSummaryCompleteResult struct { LatestHttpResponse *http.Response - Items []SiteHealthSummaryCollection + Items []SiteHealthSummary } // GetSiteHealthSummary ... @@ -50,7 +50,7 @@ func (c SitesClient) GetSiteHealthSummary(ctx context.Context, id VMwareSiteId) } var values struct { - Values *[]SiteHealthSummaryCollection `json:"value"` + Values *[]SiteHealthSummary `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c SitesClient) GetSiteHealthSummary(ctx context.Context, id VMwareSiteId) // GetSiteHealthSummaryComplete retrieves all the results into a single object func (c SitesClient) GetSiteHealthSummaryComplete(ctx context.Context, id VMwareSiteId) (GetSiteHealthSummaryCompleteResult, error) { - return c.GetSiteHealthSummaryCompleteMatchingPredicate(ctx, id, SiteHealthSummaryCollectionOperationPredicate{}) + return c.GetSiteHealthSummaryCompleteMatchingPredicate(ctx, id, SiteHealthSummaryOperationPredicate{}) } // GetSiteHealthSummaryCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SitesClient) GetSiteHealthSummaryCompleteMatchingPredicate(ctx context.Context, id VMwareSiteId, predicate SiteHealthSummaryCollectionOperationPredicate) (result GetSiteHealthSummaryCompleteResult, err error) { - items := make([]SiteHealthSummaryCollection, 0) +func (c SitesClient) GetSiteHealthSummaryCompleteMatchingPredicate(ctx context.Context, id VMwareSiteId, predicate SiteHealthSummaryOperationPredicate) (result GetSiteHealthSummaryCompleteResult, err error) { + items := make([]SiteHealthSummary, 0) resp, err := c.GetSiteHealthSummary(ctx, id) if err != nil { diff --git a/resource-manager/migrate/2020-01-01/sites/model_sitehealthsummarycollection.go b/resource-manager/migrate/2020-01-01/sites/model_sitehealthsummarycollection.go deleted file mode 100644 index 6fa6c0cac6b..00000000000 --- a/resource-manager/migrate/2020-01-01/sites/model_sitehealthsummarycollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package sites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SiteHealthSummaryCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]SiteHealthSummary `json:"value,omitempty"` -} diff --git a/resource-manager/migrate/2020-01-01/sites/predicates.go b/resource-manager/migrate/2020-01-01/sites/predicates.go index 88649174c20..67ac3baad91 100644 --- a/resource-manager/migrate/2020-01-01/sites/predicates.go +++ b/resource-manager/migrate/2020-01-01/sites/predicates.go @@ -3,13 +3,58 @@ package sites // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type SiteHealthSummaryCollectionOperationPredicate struct { - NextLink *string +type SiteHealthSummaryOperationPredicate struct { + AffectedObjectsCount *int64 + AffectedResourceType *string + ApplianceName *string + ErrorCode *string + ErrorId *int64 + ErrorMessage *string + HitCount *int64 + RemediationGuidance *string + Severity *string + SummaryMessage *string } -func (p SiteHealthSummaryCollectionOperationPredicate) Matches(input SiteHealthSummaryCollection) bool { +func (p SiteHealthSummaryOperationPredicate) Matches(input SiteHealthSummary) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.AffectedObjectsCount != nil && (input.AffectedObjectsCount == nil || *p.AffectedObjectsCount != *input.AffectedObjectsCount) { + return false + } + + if p.AffectedResourceType != nil && (input.AffectedResourceType == nil || *p.AffectedResourceType != *input.AffectedResourceType) { + return false + } + + if p.ApplianceName != nil && (input.ApplianceName == nil || *p.ApplianceName != *input.ApplianceName) { + return false + } + + if p.ErrorCode != nil && (input.ErrorCode == nil || *p.ErrorCode != *input.ErrorCode) { + return false + } + + if p.ErrorId != nil && (input.ErrorId == nil || *p.ErrorId != *input.ErrorId) { + return false + } + + if p.ErrorMessage != nil && (input.ErrorMessage == nil || *p.ErrorMessage != *input.ErrorMessage) { + return false + } + + if p.HitCount != nil && (input.HitCount == nil || *p.HitCount != *input.HitCount) { + return false + } + + if p.RemediationGuidance != nil && (input.RemediationGuidance == nil || *p.RemediationGuidance != *input.RemediationGuidance) { + return false + } + + if p.Severity != nil && (input.Severity == nil || *p.Severity != *input.Severity) { + return false + } + + if p.SummaryMessage != nil && (input.SummaryMessage == nil || *p.SummaryMessage != *input.SummaryMessage) { return false } diff --git a/resource-manager/migrate/2020-07-07/hypervsites/method_getsitehealthsummary.go b/resource-manager/migrate/2020-07-07/hypervsites/method_getsitehealthsummary.go index 9ade28c0a5a..117ff216e8f 100644 --- a/resource-manager/migrate/2020-07-07/hypervsites/method_getsitehealthsummary.go +++ b/resource-manager/migrate/2020-07-07/hypervsites/method_getsitehealthsummary.go @@ -15,12 +15,12 @@ import ( type GetSiteHealthSummaryOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SiteHealthSummaryCollection + Model *[]SiteHealthSummary } type GetSiteHealthSummaryCompleteResult struct { LatestHttpResponse *http.Response - Items []SiteHealthSummaryCollection + Items []SiteHealthSummary } // GetSiteHealthSummary ... @@ -50,7 +50,7 @@ func (c HyperVSitesClient) GetSiteHealthSummary(ctx context.Context, id HyperVSi } var values struct { - Values *[]SiteHealthSummaryCollection `json:"value"` + Values *[]SiteHealthSummary `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c HyperVSitesClient) GetSiteHealthSummary(ctx context.Context, id HyperVSi // GetSiteHealthSummaryComplete retrieves all the results into a single object func (c HyperVSitesClient) GetSiteHealthSummaryComplete(ctx context.Context, id HyperVSiteId) (GetSiteHealthSummaryCompleteResult, error) { - return c.GetSiteHealthSummaryCompleteMatchingPredicate(ctx, id, SiteHealthSummaryCollectionOperationPredicate{}) + return c.GetSiteHealthSummaryCompleteMatchingPredicate(ctx, id, SiteHealthSummaryOperationPredicate{}) } // GetSiteHealthSummaryCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HyperVSitesClient) GetSiteHealthSummaryCompleteMatchingPredicate(ctx context.Context, id HyperVSiteId, predicate SiteHealthSummaryCollectionOperationPredicate) (result GetSiteHealthSummaryCompleteResult, err error) { - items := make([]SiteHealthSummaryCollection, 0) +func (c HyperVSitesClient) GetSiteHealthSummaryCompleteMatchingPredicate(ctx context.Context, id HyperVSiteId, predicate SiteHealthSummaryOperationPredicate) (result GetSiteHealthSummaryCompleteResult, err error) { + items := make([]SiteHealthSummary, 0) resp, err := c.GetSiteHealthSummary(ctx, id) if err != nil { diff --git a/resource-manager/migrate/2020-07-07/hypervsites/model_sitehealthsummarycollection.go b/resource-manager/migrate/2020-07-07/hypervsites/model_sitehealthsummarycollection.go deleted file mode 100644 index 6645eaa8837..00000000000 --- a/resource-manager/migrate/2020-07-07/hypervsites/model_sitehealthsummarycollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package hypervsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SiteHealthSummaryCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]SiteHealthSummary `json:"value,omitempty"` -} diff --git a/resource-manager/migrate/2020-07-07/hypervsites/predicates.go b/resource-manager/migrate/2020-07-07/hypervsites/predicates.go index 5a2c26dcc2a..a6540a0ef24 100644 --- a/resource-manager/migrate/2020-07-07/hypervsites/predicates.go +++ b/resource-manager/migrate/2020-07-07/hypervsites/predicates.go @@ -3,13 +3,58 @@ package hypervsites // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type SiteHealthSummaryCollectionOperationPredicate struct { - NextLink *string +type SiteHealthSummaryOperationPredicate struct { + AffectedObjectsCount *int64 + AffectedResourceType *string + ApplianceName *string + ErrorCode *string + ErrorId *int64 + ErrorMessage *string + HitCount *int64 + RemediationGuidance *string + Severity *string + SummaryMessage *string } -func (p SiteHealthSummaryCollectionOperationPredicate) Matches(input SiteHealthSummaryCollection) bool { +func (p SiteHealthSummaryOperationPredicate) Matches(input SiteHealthSummary) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.AffectedObjectsCount != nil && (input.AffectedObjectsCount == nil || *p.AffectedObjectsCount != *input.AffectedObjectsCount) { + return false + } + + if p.AffectedResourceType != nil && (input.AffectedResourceType == nil || *p.AffectedResourceType != *input.AffectedResourceType) { + return false + } + + if p.ApplianceName != nil && (input.ApplianceName == nil || *p.ApplianceName != *input.ApplianceName) { + return false + } + + if p.ErrorCode != nil && (input.ErrorCode == nil || *p.ErrorCode != *input.ErrorCode) { + return false + } + + if p.ErrorId != nil && (input.ErrorId == nil || *p.ErrorId != *input.ErrorId) { + return false + } + + if p.ErrorMessage != nil && (input.ErrorMessage == nil || *p.ErrorMessage != *input.ErrorMessage) { + return false + } + + if p.HitCount != nil && (input.HitCount == nil || *p.HitCount != *input.HitCount) { + return false + } + + if p.RemediationGuidance != nil && (input.RemediationGuidance == nil || *p.RemediationGuidance != *input.RemediationGuidance) { + return false + } + + if p.Severity != nil && (input.Severity == nil || *p.Severity != *input.Severity) { + return false + } + + if p.SummaryMessage != nil && (input.SummaryMessage == nil || *p.SummaryMessage != *input.SummaryMessage) { return false } diff --git a/resource-manager/migrate/2020-07-07/sites/method_getsitehealthsummary.go b/resource-manager/migrate/2020-07-07/sites/method_getsitehealthsummary.go index 5b09ffd2350..bd37fb8f61b 100644 --- a/resource-manager/migrate/2020-07-07/sites/method_getsitehealthsummary.go +++ b/resource-manager/migrate/2020-07-07/sites/method_getsitehealthsummary.go @@ -15,12 +15,12 @@ import ( type GetSiteHealthSummaryOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SiteHealthSummaryCollection + Model *[]SiteHealthSummary } type GetSiteHealthSummaryCompleteResult struct { LatestHttpResponse *http.Response - Items []SiteHealthSummaryCollection + Items []SiteHealthSummary } // GetSiteHealthSummary ... @@ -50,7 +50,7 @@ func (c SitesClient) GetSiteHealthSummary(ctx context.Context, id VMwareSiteId) } var values struct { - Values *[]SiteHealthSummaryCollection `json:"value"` + Values *[]SiteHealthSummary `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c SitesClient) GetSiteHealthSummary(ctx context.Context, id VMwareSiteId) // GetSiteHealthSummaryComplete retrieves all the results into a single object func (c SitesClient) GetSiteHealthSummaryComplete(ctx context.Context, id VMwareSiteId) (GetSiteHealthSummaryCompleteResult, error) { - return c.GetSiteHealthSummaryCompleteMatchingPredicate(ctx, id, SiteHealthSummaryCollectionOperationPredicate{}) + return c.GetSiteHealthSummaryCompleteMatchingPredicate(ctx, id, SiteHealthSummaryOperationPredicate{}) } // GetSiteHealthSummaryCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SitesClient) GetSiteHealthSummaryCompleteMatchingPredicate(ctx context.Context, id VMwareSiteId, predicate SiteHealthSummaryCollectionOperationPredicate) (result GetSiteHealthSummaryCompleteResult, err error) { - items := make([]SiteHealthSummaryCollection, 0) +func (c SitesClient) GetSiteHealthSummaryCompleteMatchingPredicate(ctx context.Context, id VMwareSiteId, predicate SiteHealthSummaryOperationPredicate) (result GetSiteHealthSummaryCompleteResult, err error) { + items := make([]SiteHealthSummary, 0) resp, err := c.GetSiteHealthSummary(ctx, id) if err != nil { diff --git a/resource-manager/migrate/2020-07-07/sites/model_sitehealthsummarycollection.go b/resource-manager/migrate/2020-07-07/sites/model_sitehealthsummarycollection.go deleted file mode 100644 index 6fa6c0cac6b..00000000000 --- a/resource-manager/migrate/2020-07-07/sites/model_sitehealthsummarycollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package sites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SiteHealthSummaryCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]SiteHealthSummary `json:"value,omitempty"` -} diff --git a/resource-manager/migrate/2020-07-07/sites/predicates.go b/resource-manager/migrate/2020-07-07/sites/predicates.go index 88649174c20..67ac3baad91 100644 --- a/resource-manager/migrate/2020-07-07/sites/predicates.go +++ b/resource-manager/migrate/2020-07-07/sites/predicates.go @@ -3,13 +3,58 @@ package sites // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type SiteHealthSummaryCollectionOperationPredicate struct { - NextLink *string +type SiteHealthSummaryOperationPredicate struct { + AffectedObjectsCount *int64 + AffectedResourceType *string + ApplianceName *string + ErrorCode *string + ErrorId *int64 + ErrorMessage *string + HitCount *int64 + RemediationGuidance *string + Severity *string + SummaryMessage *string } -func (p SiteHealthSummaryCollectionOperationPredicate) Matches(input SiteHealthSummaryCollection) bool { +func (p SiteHealthSummaryOperationPredicate) Matches(input SiteHealthSummary) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.AffectedObjectsCount != nil && (input.AffectedObjectsCount == nil || *p.AffectedObjectsCount != *input.AffectedObjectsCount) { + return false + } + + if p.AffectedResourceType != nil && (input.AffectedResourceType == nil || *p.AffectedResourceType != *input.AffectedResourceType) { + return false + } + + if p.ApplianceName != nil && (input.ApplianceName == nil || *p.ApplianceName != *input.ApplianceName) { + return false + } + + if p.ErrorCode != nil && (input.ErrorCode == nil || *p.ErrorCode != *input.ErrorCode) { + return false + } + + if p.ErrorId != nil && (input.ErrorId == nil || *p.ErrorId != *input.ErrorId) { + return false + } + + if p.ErrorMessage != nil && (input.ErrorMessage == nil || *p.ErrorMessage != *input.ErrorMessage) { + return false + } + + if p.HitCount != nil && (input.HitCount == nil || *p.HitCount != *input.HitCount) { + return false + } + + if p.RemediationGuidance != nil && (input.RemediationGuidance == nil || *p.RemediationGuidance != *input.RemediationGuidance) { + return false + } + + if p.Severity != nil && (input.Severity == nil || *p.Severity != *input.Severity) { + return false + } + + if p.SummaryMessage != nil && (input.SummaryMessage == nil || *p.SummaryMessage != *input.SummaryMessage) { return false } diff --git a/resource-manager/mysql/2021-05-01/configurations/README.md b/resource-manager/mysql/2021-05-01/configurations/README.md index 67771a9be58..79ca2623452 100644 --- a/resource-manager/mysql/2021-05-01/configurations/README.md +++ b/resource-manager/mysql/2021-05-01/configurations/README.md @@ -31,9 +31,14 @@ payload := configurations.ConfigurationListForBatchUpdate{ } -if err := client.BatchUpdateThenPoll(ctx, id, payload); err != nil { +// alternatively `client.BatchUpdate(ctx, id, payload)` can be used to do batched pagination +items, err := client.BatchUpdateComplete(ctx, id, payload) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/mysql/2021-05-01/configurations/method_batchupdate.go b/resource-manager/mysql/2021-05-01/configurations/method_batchupdate.go index 1bf55f620d8..85e1ead0a01 100644 --- a/resource-manager/mysql/2021-05-01/configurations/method_batchupdate.go +++ b/resource-manager/mysql/2021-05-01/configurations/method_batchupdate.go @@ -18,7 +18,12 @@ type BatchUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ConfigurationListResult + Model *[]Configuration +} + +type BatchUpdateCompleteResult struct { + LatestHttpResponse *http.Response + Items []Configuration } // BatchUpdate ... diff --git a/resource-manager/mysql/2021-05-01/configurations/model_configurationlistresult.go b/resource-manager/mysql/2021-05-01/configurations/model_configurationlistresult.go deleted file mode 100644 index 175895f4548..00000000000 --- a/resource-manager/mysql/2021-05-01/configurations/model_configurationlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package configurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]Configuration `json:"value,omitempty"` -} diff --git a/resource-manager/mysql/2021-12-01-preview/configurations/README.md b/resource-manager/mysql/2021-12-01-preview/configurations/README.md index e96564f28d8..2fb853d786d 100644 --- a/resource-manager/mysql/2021-12-01-preview/configurations/README.md +++ b/resource-manager/mysql/2021-12-01-preview/configurations/README.md @@ -31,9 +31,14 @@ payload := configurations.ConfigurationListForBatchUpdate{ } -if err := client.BatchUpdateThenPoll(ctx, id, payload); err != nil { +// alternatively `client.BatchUpdate(ctx, id, payload)` can be used to do batched pagination +items, err := client.BatchUpdateComplete(ctx, id, payload) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/mysql/2021-12-01-preview/configurations/method_batchupdate.go b/resource-manager/mysql/2021-12-01-preview/configurations/method_batchupdate.go index 1bf55f620d8..85e1ead0a01 100644 --- a/resource-manager/mysql/2021-12-01-preview/configurations/method_batchupdate.go +++ b/resource-manager/mysql/2021-12-01-preview/configurations/method_batchupdate.go @@ -18,7 +18,12 @@ type BatchUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ConfigurationListResult + Model *[]Configuration +} + +type BatchUpdateCompleteResult struct { + LatestHttpResponse *http.Response + Items []Configuration } // BatchUpdate ... diff --git a/resource-manager/mysql/2021-12-01-preview/configurations/model_configurationlistresult.go b/resource-manager/mysql/2021-12-01-preview/configurations/model_configurationlistresult.go deleted file mode 100644 index 175895f4548..00000000000 --- a/resource-manager/mysql/2021-12-01-preview/configurations/model_configurationlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package configurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]Configuration `json:"value,omitempty"` -} diff --git a/resource-manager/mysql/2022-01-01/configurations/README.md b/resource-manager/mysql/2022-01-01/configurations/README.md index 867d4e86462..5cf4d68f5ce 100644 --- a/resource-manager/mysql/2022-01-01/configurations/README.md +++ b/resource-manager/mysql/2022-01-01/configurations/README.md @@ -31,9 +31,14 @@ payload := configurations.ConfigurationListForBatchUpdate{ } -if err := client.BatchUpdateThenPoll(ctx, id, payload); err != nil { +// alternatively `client.BatchUpdate(ctx, id, payload)` can be used to do batched pagination +items, err := client.BatchUpdateComplete(ctx, id, payload) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/mysql/2022-01-01/configurations/method_batchupdate.go b/resource-manager/mysql/2022-01-01/configurations/method_batchupdate.go index 1bf55f620d8..85e1ead0a01 100644 --- a/resource-manager/mysql/2022-01-01/configurations/method_batchupdate.go +++ b/resource-manager/mysql/2022-01-01/configurations/method_batchupdate.go @@ -18,7 +18,12 @@ type BatchUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ConfigurationListResult + Model *[]Configuration +} + +type BatchUpdateCompleteResult struct { + LatestHttpResponse *http.Response + Items []Configuration } // BatchUpdate ... diff --git a/resource-manager/mysql/2022-01-01/configurations/model_configurationlistresult.go b/resource-manager/mysql/2022-01-01/configurations/model_configurationlistresult.go deleted file mode 100644 index 175895f4548..00000000000 --- a/resource-manager/mysql/2022-01-01/configurations/model_configurationlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package configurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]Configuration `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/bastionhosts/method_disconnectactivesessions.go b/resource-manager/network/2023-04-01/bastionhosts/method_disconnectactivesessions.go index 5e04a28894d..3a130339543 100644 --- a/resource-manager/network/2023-04-01/bastionhosts/method_disconnectactivesessions.go +++ b/resource-manager/network/2023-04-01/bastionhosts/method_disconnectactivesessions.go @@ -15,12 +15,12 @@ import ( type DisconnectActiveSessionsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BastionSessionDeleteResult + Model *[]BastionSessionState } type DisconnectActiveSessionsCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionSessionDeleteResult + Items []BastionSessionState } // DisconnectActiveSessions ... @@ -50,7 +50,7 @@ func (c BastionHostsClient) DisconnectActiveSessions(ctx context.Context, id Bas } var values struct { - Values *[]BastionSessionDeleteResult `json:"value"` + Values *[]BastionSessionState `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BastionHostsClient) DisconnectActiveSessions(ctx context.Context, id Bas // DisconnectActiveSessionsComplete retrieves all the results into a single object func (c BastionHostsClient) DisconnectActiveSessionsComplete(ctx context.Context, id BastionHostId, input SessionIds) (DisconnectActiveSessionsCompleteResult, error) { - return c.DisconnectActiveSessionsCompleteMatchingPredicate(ctx, id, input, BastionSessionDeleteResultOperationPredicate{}) + return c.DisconnectActiveSessionsCompleteMatchingPredicate(ctx, id, input, BastionSessionStateOperationPredicate{}) } // DisconnectActiveSessionsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) DisconnectActiveSessionsCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input SessionIds, predicate BastionSessionDeleteResultOperationPredicate) (result DisconnectActiveSessionsCompleteResult, err error) { - items := make([]BastionSessionDeleteResult, 0) +func (c BastionHostsClient) DisconnectActiveSessionsCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input SessionIds, predicate BastionSessionStateOperationPredicate) (result DisconnectActiveSessionsCompleteResult, err error) { + items := make([]BastionSessionState, 0) resp, err := c.DisconnectActiveSessions(ctx, id, input) if err != nil { diff --git a/resource-manager/network/2023-04-01/bastionhosts/method_getactivesessions.go b/resource-manager/network/2023-04-01/bastionhosts/method_getactivesessions.go index 521be83f4a3..bc50f38fc50 100644 --- a/resource-manager/network/2023-04-01/bastionhosts/method_getactivesessions.go +++ b/resource-manager/network/2023-04-01/bastionhosts/method_getactivesessions.go @@ -18,12 +18,12 @@ type GetActiveSessionsOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]BastionActiveSessionListResult + Model *[]BastionActiveSession } type GetActiveSessionsCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionActiveSessionListResult + Items []BastionActiveSession } // GetActiveSessions ... diff --git a/resource-manager/network/2023-04-01/bastionhosts/method_getbastionshareablelink.go b/resource-manager/network/2023-04-01/bastionhosts/method_getbastionshareablelink.go index 361f8e95efd..1d277c1e88c 100644 --- a/resource-manager/network/2023-04-01/bastionhosts/method_getbastionshareablelink.go +++ b/resource-manager/network/2023-04-01/bastionhosts/method_getbastionshareablelink.go @@ -15,12 +15,12 @@ import ( type GetBastionShareableLinkOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type GetBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // GetBastionShareableLink ... @@ -50,7 +50,7 @@ func (c BastionHostsClient) GetBastionShareableLink(ctx context.Context, id Bast } var values struct { - Values *[]BastionShareableLinkListResult `json:"value"` + Values *[]BastionShareableLink `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BastionHostsClient) GetBastionShareableLink(ctx context.Context, id Bast // GetBastionShareableLinkComplete retrieves all the results into a single object func (c BastionHostsClient) GetBastionShareableLinkComplete(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (GetBastionShareableLinkCompleteResult, error) { - return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkListResultOperationPredicate{}) + return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkOperationPredicate{}) } // GetBastionShareableLinkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkListResultOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { - items := make([]BastionShareableLinkListResult, 0) +func (c BastionHostsClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { + items := make([]BastionShareableLink, 0) resp, err := c.GetBastionShareableLink(ctx, id, input) if err != nil { diff --git a/resource-manager/network/2023-04-01/bastionhosts/method_putbastionshareablelink.go b/resource-manager/network/2023-04-01/bastionhosts/method_putbastionshareablelink.go index 426b5e5ed0d..5f6e7438551 100644 --- a/resource-manager/network/2023-04-01/bastionhosts/method_putbastionshareablelink.go +++ b/resource-manager/network/2023-04-01/bastionhosts/method_putbastionshareablelink.go @@ -18,12 +18,12 @@ type PutBastionShareableLinkOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type PutBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // PutBastionShareableLink ... diff --git a/resource-manager/network/2023-04-01/bastionhosts/model_bastionactivesessionlistresult.go b/resource-manager/network/2023-04-01/bastionhosts/model_bastionactivesessionlistresult.go deleted file mode 100644 index 040f751576f..00000000000 --- a/resource-manager/network/2023-04-01/bastionhosts/model_bastionactivesessionlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionActiveSessionListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionActiveSession `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/bastionhosts/model_bastionsessiondeleteresult.go b/resource-manager/network/2023-04-01/bastionhosts/model_bastionsessiondeleteresult.go deleted file mode 100644 index 367468bd830..00000000000 --- a/resource-manager/network/2023-04-01/bastionhosts/model_bastionsessiondeleteresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionSessionDeleteResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionSessionState `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/bastionhosts/model_bastionshareablelinklistresult.go b/resource-manager/network/2023-04-01/bastionhosts/model_bastionshareablelinklistresult.go deleted file mode 100644 index d5263654771..00000000000 --- a/resource-manager/network/2023-04-01/bastionhosts/model_bastionshareablelinklistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionShareableLink `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/bastionhosts/predicates.go b/resource-manager/network/2023-04-01/bastionhosts/predicates.go index ce754ba4deb..3c3835a32d0 100644 --- a/resource-manager/network/2023-04-01/bastionhosts/predicates.go +++ b/resource-manager/network/2023-04-01/bastionhosts/predicates.go @@ -3,13 +3,58 @@ package bastionhosts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type BastionActiveSessionListResultOperationPredicate struct { - NextLink *string +type BastionActiveSessionOperationPredicate struct { + ResourceType *string + SessionDurationInMins *float64 + SessionId *string + StartTime *interface{} + TargetHostName *string + TargetIPAddress *string + TargetResourceGroup *string + TargetResourceId *string + TargetSubscriptionId *string + UserName *string } -func (p BastionActiveSessionListResultOperationPredicate) Matches(input BastionActiveSessionListResult) bool { +func (p BastionActiveSessionOperationPredicate) Matches(input BastionActiveSession) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ResourceType != nil && (input.ResourceType == nil || *p.ResourceType != *input.ResourceType) { + return false + } + + if p.SessionDurationInMins != nil && (input.SessionDurationInMins == nil || *p.SessionDurationInMins != *input.SessionDurationInMins) { + return false + } + + if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { + return false + } + + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.TargetHostName != nil && (input.TargetHostName == nil || *p.TargetHostName != *input.TargetHostName) { + return false + } + + if p.TargetIPAddress != nil && (input.TargetIPAddress == nil || *p.TargetIPAddress != *input.TargetIPAddress) { + return false + } + + if p.TargetResourceGroup != nil && (input.TargetResourceGroup == nil || *p.TargetResourceGroup != *input.TargetResourceGroup) { + return false + } + + if p.TargetResourceId != nil && (input.TargetResourceId == nil || *p.TargetResourceId != *input.TargetResourceId) { + return false + } + + if p.TargetSubscriptionId != nil && (input.TargetSubscriptionId == nil || *p.TargetSubscriptionId != *input.TargetSubscriptionId) { + return false + } + + if p.UserName != nil && (input.UserName == nil || *p.UserName != *input.UserName) { return false } @@ -49,26 +94,46 @@ func (p BastionHostOperationPredicate) Matches(input BastionHost) bool { return true } -type BastionSessionDeleteResultOperationPredicate struct { - NextLink *string +type BastionSessionStateOperationPredicate struct { + Message *string + SessionId *string + State *string } -func (p BastionSessionDeleteResultOperationPredicate) Matches(input BastionSessionDeleteResult) bool { +func (p BastionSessionStateOperationPredicate) Matches(input BastionSessionState) bool { + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { + return false + } + + if p.State != nil && (input.State == nil || *p.State != *input.State) { return false } return true } -type BastionShareableLinkListResultOperationPredicate struct { - NextLink *string +type BastionShareableLinkOperationPredicate struct { + Bsl *string + CreatedAt *string + Message *string } -func (p BastionShareableLinkListResultOperationPredicate) Matches(input BastionShareableLinkListResult) bool { +func (p BastionShareableLinkOperationPredicate) Matches(input BastionShareableLink) bool { + + if p.Bsl != nil && (input.Bsl == nil || *p.Bsl != *input.Bsl) { + return false + } + + if p.CreatedAt != nil && (input.CreatedAt == nil || *p.CreatedAt != *input.CreatedAt) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { return false } diff --git a/resource-manager/network/2023-04-01/bastionshareablelink/method_getbastionshareablelink.go b/resource-manager/network/2023-04-01/bastionshareablelink/method_getbastionshareablelink.go index 6c322a71e98..689ab2d57fc 100644 --- a/resource-manager/network/2023-04-01/bastionshareablelink/method_getbastionshareablelink.go +++ b/resource-manager/network/2023-04-01/bastionshareablelink/method_getbastionshareablelink.go @@ -15,12 +15,12 @@ import ( type GetBastionShareableLinkOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type GetBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // GetBastionShareableLink ... @@ -50,7 +50,7 @@ func (c BastionShareableLinkClient) GetBastionShareableLink(ctx context.Context, } var values struct { - Values *[]BastionShareableLinkListResult `json:"value"` + Values *[]BastionShareableLink `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BastionShareableLinkClient) GetBastionShareableLink(ctx context.Context, // GetBastionShareableLinkComplete retrieves all the results into a single object func (c BastionShareableLinkClient) GetBastionShareableLinkComplete(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (GetBastionShareableLinkCompleteResult, error) { - return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkListResultOperationPredicate{}) + return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkOperationPredicate{}) } // GetBastionShareableLinkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionShareableLinkClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkListResultOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { - items := make([]BastionShareableLinkListResult, 0) +func (c BastionShareableLinkClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { + items := make([]BastionShareableLink, 0) resp, err := c.GetBastionShareableLink(ctx, id, input) if err != nil { diff --git a/resource-manager/network/2023-04-01/bastionshareablelink/method_putbastionshareablelink.go b/resource-manager/network/2023-04-01/bastionshareablelink/method_putbastionshareablelink.go index e1d10e6ed89..bf85b28ee63 100644 --- a/resource-manager/network/2023-04-01/bastionshareablelink/method_putbastionshareablelink.go +++ b/resource-manager/network/2023-04-01/bastionshareablelink/method_putbastionshareablelink.go @@ -18,12 +18,12 @@ type PutBastionShareableLinkOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type PutBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // PutBastionShareableLink ... diff --git a/resource-manager/network/2023-04-01/bastionshareablelink/model_bastionshareablelinklistresult.go b/resource-manager/network/2023-04-01/bastionshareablelink/model_bastionshareablelinklistresult.go deleted file mode 100644 index 63c56da1ac2..00000000000 --- a/resource-manager/network/2023-04-01/bastionshareablelink/model_bastionshareablelinklistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionshareablelink - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionShareableLink `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/bastionshareablelink/predicates.go b/resource-manager/network/2023-04-01/bastionshareablelink/predicates.go index d301a4812ab..15f07095262 100644 --- a/resource-manager/network/2023-04-01/bastionshareablelink/predicates.go +++ b/resource-manager/network/2023-04-01/bastionshareablelink/predicates.go @@ -3,13 +3,23 @@ package bastionshareablelink // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type BastionShareableLinkListResultOperationPredicate struct { - NextLink *string +type BastionShareableLinkOperationPredicate struct { + Bsl *string + CreatedAt *string + Message *string } -func (p BastionShareableLinkListResultOperationPredicate) Matches(input BastionShareableLinkListResult) bool { +func (p BastionShareableLinkOperationPredicate) Matches(input BastionShareableLink) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Bsl != nil && (input.Bsl == nil || *p.Bsl != *input.Bsl) { + return false + } + + if p.CreatedAt != nil && (input.CreatedAt == nil || *p.CreatedAt != *input.CreatedAt) { + return false + } + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { return false } diff --git a/resource-manager/network/2023-04-01/expressroutecircuitarptable/README.md b/resource-manager/network/2023-04-01/expressroutecircuitarptable/README.md index 81115de5ff3..9b873ef493c 100644 --- a/resource-manager/network/2023-04-01/expressroutecircuitarptable/README.md +++ b/resource-manager/network/2023-04-01/expressroutecircuitarptable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecircuitarptable.NewArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "arpTableValue") -if err := client.ExpressRouteCircuitsListArpTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCircuitsListArpTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCircuitsListArpTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-04-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go b/resource-manager/network/2023-04-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go index f4fcf5e4935..6e9e9491ca8 100644 --- a/resource-manager/network/2023-04-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go +++ b/resource-manager/network/2023-04-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go @@ -18,7 +18,12 @@ type ExpressRouteCircuitsListArpTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsArpTableListResult + Model *[]ExpressRouteCircuitArpTable +} + +type ExpressRouteCircuitsListArpTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitArpTable } // ExpressRouteCircuitsListArpTable ... diff --git a/resource-manager/network/2023-04-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go b/resource-manager/network/2023-04-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go deleted file mode 100644 index a6f3b3f86f5..00000000000 --- a/resource-manager/network/2023-04-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsArpTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/expressroutecircuitarptable/predicates.go b/resource-manager/network/2023-04-01/expressroutecircuitarptable/predicates.go new file mode 100644 index 00000000000..4143b82875f --- /dev/null +++ b/resource-manager/network/2023-04-01/expressroutecircuitarptable/predicates.go @@ -0,0 +1,32 @@ +package expressroutecircuitarptable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitArpTableOperationPredicate struct { + Age *int64 + IPAddress *string + Interface *string + MacAddress *string +} + +func (p ExpressRouteCircuitArpTableOperationPredicate) Matches(input ExpressRouteCircuitArpTable) bool { + + if p.Age != nil && (input.Age == nil || *p.Age != *input.Age) { + return false + } + + if p.IPAddress != nil && (input.IPAddress == nil || *p.IPAddress != *input.IPAddress) { + return false + } + + if p.Interface != nil && (input.Interface == nil || *p.Interface != *input.Interface) { + return false + } + + if p.MacAddress != nil && (input.MacAddress == nil || *p.MacAddress != *input.MacAddress) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-04-01/expressroutecircuitroutestable/README.md b/resource-manager/network/2023-04-01/expressroutecircuitroutestable/README.md index 62567fd80c6..1102e80c134 100644 --- a/resource-manager/network/2023-04-01/expressroutecircuitroutestable/README.md +++ b/resource-manager/network/2023-04-01/expressroutecircuitroutestable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecircuitroutestable.NewPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTableValue") -if err := client.ExpressRouteCircuitsListRoutesTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCircuitsListRoutesTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCircuitsListRoutesTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-04-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go b/resource-manager/network/2023-04-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go index 2a47c72ab75..0d55eeb8353 100644 --- a/resource-manager/network/2023-04-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go +++ b/resource-manager/network/2023-04-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go @@ -18,7 +18,12 @@ type ExpressRouteCircuitsListRoutesTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsRoutesTableListResult + Model *[]ExpressRouteCircuitRoutesTable +} + +type ExpressRouteCircuitsListRoutesTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitRoutesTable } // ExpressRouteCircuitsListRoutesTable ... diff --git a/resource-manager/network/2023-04-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go b/resource-manager/network/2023-04-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go deleted file mode 100644 index 7ff773de0b1..00000000000 --- a/resource-manager/network/2023-04-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitroutestable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/expressroutecircuitroutestable/predicates.go b/resource-manager/network/2023-04-01/expressroutecircuitroutestable/predicates.go new file mode 100644 index 00000000000..81d29805310 --- /dev/null +++ b/resource-manager/network/2023-04-01/expressroutecircuitroutestable/predicates.go @@ -0,0 +1,37 @@ +package expressroutecircuitroutestable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitRoutesTableOperationPredicate struct { + LocPrf *string + Network *string + NextHop *string + Path *string + Weight *int64 +} + +func (p ExpressRouteCircuitRoutesTableOperationPredicate) Matches(input ExpressRouteCircuitRoutesTable) bool { + + if p.LocPrf != nil && (input.LocPrf == nil || *p.LocPrf != *input.LocPrf) { + return false + } + + if p.Network != nil && (input.Network == nil || *p.Network != *input.Network) { + return false + } + + if p.NextHop != nil && (input.NextHop == nil || *p.NextHop != *input.NextHop) { + return false + } + + if p.Path != nil && (input.Path == nil || *p.Path != *input.Path) { + return false + } + + if p.Weight != nil && (input.Weight == nil || *p.Weight != *input.Weight) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/README.md b/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/README.md index a4926a4ae83..8650bf63e35 100644 --- a/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/README.md +++ b/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecircuitroutestablesummary.NewRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTablesSummaryValue") -if err := client.ExpressRouteCircuitsListRoutesTableSummaryThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCircuitsListRoutesTableSummary(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCircuitsListRoutesTableSummaryComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go b/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go index b5f5dcefb38..200e1b6b1e8 100644 --- a/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go +++ b/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go @@ -18,7 +18,12 @@ type ExpressRouteCircuitsListRoutesTableSummaryOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsRoutesTableSummaryListResult + Model *[]ExpressRouteCircuitRoutesTableSummary +} + +type ExpressRouteCircuitsListRoutesTableSummaryCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitRoutesTableSummary } // ExpressRouteCircuitsListRoutesTableSummary ... diff --git a/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go b/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go deleted file mode 100644 index 819e27f860b..00000000000 --- a/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitroutestablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableSummaryListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/predicates.go b/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/predicates.go new file mode 100644 index 00000000000..1d9991e4b00 --- /dev/null +++ b/resource-manager/network/2023-04-01/expressroutecircuitroutestablesummary/predicates.go @@ -0,0 +1,37 @@ +package expressroutecircuitroutestablesummary + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitRoutesTableSummaryOperationPredicate struct { + As *int64 + Neighbor *string + StatePfxRcd *string + UpDown *string + V *int64 +} + +func (p ExpressRouteCircuitRoutesTableSummaryOperationPredicate) Matches(input ExpressRouteCircuitRoutesTableSummary) bool { + + if p.As != nil && (input.As == nil || *p.As != *input.As) { + return false + } + + if p.Neighbor != nil && (input.Neighbor == nil || *p.Neighbor != *input.Neighbor) { + return false + } + + if p.StatePfxRcd != nil && (input.StatePfxRcd == nil || *p.StatePfxRcd != *input.StatePfxRcd) { + return false + } + + if p.UpDown != nil && (input.UpDown == nil || *p.UpDown != *input.UpDown) { + return false + } + + if p.V != nil && (input.V == nil || *p.V != *input.V) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/README.md b/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/README.md index b82ee0e6a3b..da5a3895754 100644 --- a/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/README.md +++ b/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecrossconnectionarptable.NewPeeringArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "arpTableValue") -if err := client.ExpressRouteCrossConnectionsListArpTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCrossConnectionsListArpTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCrossConnectionsListArpTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go b/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go index df9b8956dd5..93cb5d74c61 100644 --- a/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go +++ b/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go @@ -18,7 +18,12 @@ type ExpressRouteCrossConnectionsListArpTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsArpTableListResult + Model *[]ExpressRouteCircuitArpTable +} + +type ExpressRouteCrossConnectionsListArpTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitArpTable } // ExpressRouteCrossConnectionsListArpTable ... diff --git a/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go b/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go deleted file mode 100644 index 67147d0690b..00000000000 --- a/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsArpTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/predicates.go b/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/predicates.go new file mode 100644 index 00000000000..75df45b22f9 --- /dev/null +++ b/resource-manager/network/2023-04-01/expressroutecrossconnectionarptable/predicates.go @@ -0,0 +1,32 @@ +package expressroutecrossconnectionarptable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitArpTableOperationPredicate struct { + Age *int64 + IPAddress *string + Interface *string + MacAddress *string +} + +func (p ExpressRouteCircuitArpTableOperationPredicate) Matches(input ExpressRouteCircuitArpTable) bool { + + if p.Age != nil && (input.Age == nil || *p.Age != *input.Age) { + return false + } + + if p.IPAddress != nil && (input.IPAddress == nil || *p.IPAddress != *input.IPAddress) { + return false + } + + if p.Interface != nil && (input.Interface == nil || *p.Interface != *input.Interface) { + return false + } + + if p.MacAddress != nil && (input.MacAddress == nil || *p.MacAddress != *input.MacAddress) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/README.md b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/README.md index 05dd2b77981..443d5694e25 100644 --- a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/README.md +++ b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecrossconnectionroutetable.NewExpressRouteCrossConnectionPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTableValue") -if err := client.ExpressRouteCrossConnectionsListRoutesTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCrossConnectionsListRoutesTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCrossConnectionsListRoutesTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go index ac9e91764e0..75e866bbea7 100644 --- a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go +++ b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go @@ -18,7 +18,12 @@ type ExpressRouteCrossConnectionsListRoutesTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsRoutesTableListResult + Model *[]ExpressRouteCircuitRoutesTable +} + +type ExpressRouteCrossConnectionsListRoutesTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitRoutesTable } // ExpressRouteCrossConnectionsListRoutesTable ... diff --git a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go deleted file mode 100644 index d42583463b3..00000000000 --- a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionroutetable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/predicates.go b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/predicates.go new file mode 100644 index 00000000000..2f1a6174bb4 --- /dev/null +++ b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetable/predicates.go @@ -0,0 +1,37 @@ +package expressroutecrossconnectionroutetable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitRoutesTableOperationPredicate struct { + LocPrf *string + Network *string + NextHop *string + Path *string + Weight *int64 +} + +func (p ExpressRouteCircuitRoutesTableOperationPredicate) Matches(input ExpressRouteCircuitRoutesTable) bool { + + if p.LocPrf != nil && (input.LocPrf == nil || *p.LocPrf != *input.LocPrf) { + return false + } + + if p.Network != nil && (input.Network == nil || *p.Network != *input.Network) { + return false + } + + if p.NextHop != nil && (input.NextHop == nil || *p.NextHop != *input.NextHop) { + return false + } + + if p.Path != nil && (input.Path == nil || *p.Path != *input.Path) { + return false + } + + if p.Weight != nil && (input.Weight == nil || *p.Weight != *input.Weight) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/README.md b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/README.md index ff111bd4f6c..79448848280 100644 --- a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/README.md +++ b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecrossconnectionroutetablesummary.NewPeeringRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTablesSummaryValue") -if err := client.ExpressRouteCrossConnectionsListRoutesTableSummaryThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCrossConnectionsListRoutesTableSummary(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCrossConnectionsListRoutesTableSummaryComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go index 43874ea0bb9..06c63e507a1 100644 --- a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go +++ b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go @@ -18,7 +18,12 @@ type ExpressRouteCrossConnectionsListRoutesTableSummaryOperationResponse struct Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCrossConnectionsRoutesTableSummaryListResult + Model *[]ExpressRouteCrossConnectionRoutesTableSummary +} + +type ExpressRouteCrossConnectionsListRoutesTableSummaryCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCrossConnectionRoutesTableSummary } // ExpressRouteCrossConnectionsListRoutesTableSummary ... diff --git a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go deleted file mode 100644 index 21d57c1911b..00000000000 --- a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/predicates.go b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/predicates.go new file mode 100644 index 00000000000..8399718cebc --- /dev/null +++ b/resource-manager/network/2023-04-01/expressroutecrossconnectionroutetablesummary/predicates.go @@ -0,0 +1,32 @@ +package expressroutecrossconnectionroutetablesummary + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCrossConnectionRoutesTableSummaryOperationPredicate struct { + Asn *int64 + Neighbor *string + StateOrPrefixesReceived *string + UpDown *string +} + +func (p ExpressRouteCrossConnectionRoutesTableSummaryOperationPredicate) Matches(input ExpressRouteCrossConnectionRoutesTableSummary) bool { + + if p.Asn != nil && (input.Asn == nil || *p.Asn != *input.Asn) { + return false + } + + if p.Neighbor != nil && (input.Neighbor == nil || *p.Neighbor != *input.Neighbor) { + return false + } + + if p.StateOrPrefixesReceived != nil && (input.StateOrPrefixesReceived == nil || *p.StateOrPrefixesReceived != *input.StateOrPrefixesReceived) { + return false + } + + if p.UpDown != nil && (input.UpDown == nil || *p.UpDown != *input.UpDown) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-04-01/networkinterfaces/README.md b/resource-manager/network/2023-04-01/networkinterfaces/README.md index 797598d75da..f075724ef8f 100644 --- a/resource-manager/network/2023-04-01/networkinterfaces/README.md +++ b/resource-manager/network/2023-04-01/networkinterfaces/README.md @@ -88,9 +88,14 @@ if model := read.Model; model != nil { ctx := context.TODO() id := commonids.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") -if err := client.GetEffectiveRouteTableThenPoll(ctx, id); err != nil { +// alternatively `client.GetEffectiveRouteTable(ctx, id)` can be used to do batched pagination +items, err := client.GetEffectiveRouteTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` @@ -200,9 +205,14 @@ for _, item := range items { ctx := context.TODO() id := commonids.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") -if err := client.ListEffectiveNetworkSecurityGroupsThenPoll(ctx, id); err != nil { +// alternatively `client.ListEffectiveNetworkSecurityGroups(ctx, id)` can be used to do batched pagination +items, err := client.ListEffectiveNetworkSecurityGroupsComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-04-01/networkinterfaces/method_geteffectiveroutetable.go b/resource-manager/network/2023-04-01/networkinterfaces/method_geteffectiveroutetable.go index 02c2c417a3c..e64977d2735 100644 --- a/resource-manager/network/2023-04-01/networkinterfaces/method_geteffectiveroutetable.go +++ b/resource-manager/network/2023-04-01/networkinterfaces/method_geteffectiveroutetable.go @@ -19,7 +19,12 @@ type GetEffectiveRouteTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *EffectiveRouteListResult + Model *[]EffectiveRoute +} + +type GetEffectiveRouteTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []EffectiveRoute } // GetEffectiveRouteTable ... diff --git a/resource-manager/network/2023-04-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go b/resource-manager/network/2023-04-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go index 19670227bf1..50661e67194 100644 --- a/resource-manager/network/2023-04-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go +++ b/resource-manager/network/2023-04-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go @@ -19,7 +19,12 @@ type ListEffectiveNetworkSecurityGroupsOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *EffectiveNetworkSecurityGroupListResult + Model *[]EffectiveNetworkSecurityGroup +} + +type ListEffectiveNetworkSecurityGroupsCompleteResult struct { + LatestHttpResponse *http.Response + Items []EffectiveNetworkSecurityGroup } // ListEffectiveNetworkSecurityGroups ... diff --git a/resource-manager/network/2023-04-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go b/resource-manager/network/2023-04-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go deleted file mode 100644 index b8111a10fff..00000000000 --- a/resource-manager/network/2023-04-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityGroupListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/networkinterfaces/model_effectiveroutelistresult.go b/resource-manager/network/2023-04-01/networkinterfaces/model_effectiveroutelistresult.go deleted file mode 100644 index a3a975a8636..00000000000 --- a/resource-manager/network/2023-04-01/networkinterfaces/model_effectiveroutelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveRouteListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]EffectiveRoute `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/networkinterfaces/predicates.go b/resource-manager/network/2023-04-01/networkinterfaces/predicates.go index 1bdf1a16800..c58ed4a328b 100644 --- a/resource-manager/network/2023-04-01/networkinterfaces/predicates.go +++ b/resource-manager/network/2023-04-01/networkinterfaces/predicates.go @@ -3,6 +3,32 @@ package networkinterfaces // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type EffectiveNetworkSecurityGroupOperationPredicate struct { +} + +func (p EffectiveNetworkSecurityGroupOperationPredicate) Matches(input EffectiveNetworkSecurityGroup) bool { + + return true +} + +type EffectiveRouteOperationPredicate struct { + DisableBgpRoutePropagation *bool + Name *string +} + +func (p EffectiveRouteOperationPredicate) Matches(input EffectiveRoute) bool { + + if p.DisableBgpRoutePropagation != nil && (input.DisableBgpRoutePropagation == nil || *p.DisableBgpRoutePropagation != *input.DisableBgpRoutePropagation) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + return true +} + type LoadBalancerOperationPredicate struct { Etag *string Id *string diff --git a/resource-manager/network/2023-04-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go b/resource-manager/network/2023-04-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go index 8e6bf7989a9..c0872952086 100644 --- a/resource-manager/network/2023-04-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go +++ b/resource-manager/network/2023-04-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go @@ -19,12 +19,12 @@ type VirtualNetworksListDdosProtectionStatusOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]VirtualNetworkDdosProtectionStatusResult + Model *[]PublicIPDdosProtectionStatusResult } type VirtualNetworksListDdosProtectionStatusCompleteResult struct { LatestHttpResponse *http.Response - Items []VirtualNetworkDdosProtectionStatusResult + Items []PublicIPDdosProtectionStatusResult } type VirtualNetworksListDdosProtectionStatusOperationOptions struct { diff --git a/resource-manager/network/2023-04-01/virtualnetworks/model_virtualnetworkddosprotectionstatusresult.go b/resource-manager/network/2023-04-01/virtualnetworks/model_virtualnetworkddosprotectionstatusresult.go deleted file mode 100644 index dec4e865313..00000000000 --- a/resource-manager/network/2023-04-01/virtualnetworks/model_virtualnetworkddosprotectionstatusresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkDdosProtectionStatusResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]PublicIPDdosProtectionStatusResult `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-04-01/virtualnetworks/predicates.go b/resource-manager/network/2023-04-01/virtualnetworks/predicates.go index 4e467e7af4c..ae976386154 100644 --- a/resource-manager/network/2023-04-01/virtualnetworks/predicates.go +++ b/resource-manager/network/2023-04-01/virtualnetworks/predicates.go @@ -3,6 +3,29 @@ package virtualnetworks // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type PublicIPDdosProtectionStatusResultOperationPredicate struct { + DdosProtectionPlanId *string + PublicIPAddress *string + PublicIPAddressId *string +} + +func (p PublicIPDdosProtectionStatusResultOperationPredicate) Matches(input PublicIPDdosProtectionStatusResult) bool { + + if p.DdosProtectionPlanId != nil && (input.DdosProtectionPlanId == nil || *p.DdosProtectionPlanId != *input.DdosProtectionPlanId) { + return false + } + + if p.PublicIPAddress != nil && (input.PublicIPAddress == nil || *p.PublicIPAddress != *input.PublicIPAddress) { + return false + } + + if p.PublicIPAddressId != nil && (input.PublicIPAddressId == nil || *p.PublicIPAddressId != *input.PublicIPAddressId) { + return false + } + + return true +} + type ResourceNavigationLinkOperationPredicate struct { Etag *string Id *string @@ -92,19 +115,6 @@ func (p VirtualNetworkOperationPredicate) Matches(input VirtualNetwork) bool { return true } -type VirtualNetworkDdosProtectionStatusResultOperationPredicate struct { - NextLink *string -} - -func (p VirtualNetworkDdosProtectionStatusResultOperationPredicate) Matches(input VirtualNetworkDdosProtectionStatusResult) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} - type VirtualNetworkUsageOperationPredicate struct { CurrentValue *float64 Id *string diff --git a/resource-manager/network/2023-05-01/bastionhosts/method_disconnectactivesessions.go b/resource-manager/network/2023-05-01/bastionhosts/method_disconnectactivesessions.go index 5e04a28894d..3a130339543 100644 --- a/resource-manager/network/2023-05-01/bastionhosts/method_disconnectactivesessions.go +++ b/resource-manager/network/2023-05-01/bastionhosts/method_disconnectactivesessions.go @@ -15,12 +15,12 @@ import ( type DisconnectActiveSessionsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BastionSessionDeleteResult + Model *[]BastionSessionState } type DisconnectActiveSessionsCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionSessionDeleteResult + Items []BastionSessionState } // DisconnectActiveSessions ... @@ -50,7 +50,7 @@ func (c BastionHostsClient) DisconnectActiveSessions(ctx context.Context, id Bas } var values struct { - Values *[]BastionSessionDeleteResult `json:"value"` + Values *[]BastionSessionState `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BastionHostsClient) DisconnectActiveSessions(ctx context.Context, id Bas // DisconnectActiveSessionsComplete retrieves all the results into a single object func (c BastionHostsClient) DisconnectActiveSessionsComplete(ctx context.Context, id BastionHostId, input SessionIds) (DisconnectActiveSessionsCompleteResult, error) { - return c.DisconnectActiveSessionsCompleteMatchingPredicate(ctx, id, input, BastionSessionDeleteResultOperationPredicate{}) + return c.DisconnectActiveSessionsCompleteMatchingPredicate(ctx, id, input, BastionSessionStateOperationPredicate{}) } // DisconnectActiveSessionsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) DisconnectActiveSessionsCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input SessionIds, predicate BastionSessionDeleteResultOperationPredicate) (result DisconnectActiveSessionsCompleteResult, err error) { - items := make([]BastionSessionDeleteResult, 0) +func (c BastionHostsClient) DisconnectActiveSessionsCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input SessionIds, predicate BastionSessionStateOperationPredicate) (result DisconnectActiveSessionsCompleteResult, err error) { + items := make([]BastionSessionState, 0) resp, err := c.DisconnectActiveSessions(ctx, id, input) if err != nil { diff --git a/resource-manager/network/2023-05-01/bastionhosts/method_getactivesessions.go b/resource-manager/network/2023-05-01/bastionhosts/method_getactivesessions.go index 521be83f4a3..bc50f38fc50 100644 --- a/resource-manager/network/2023-05-01/bastionhosts/method_getactivesessions.go +++ b/resource-manager/network/2023-05-01/bastionhosts/method_getactivesessions.go @@ -18,12 +18,12 @@ type GetActiveSessionsOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]BastionActiveSessionListResult + Model *[]BastionActiveSession } type GetActiveSessionsCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionActiveSessionListResult + Items []BastionActiveSession } // GetActiveSessions ... diff --git a/resource-manager/network/2023-05-01/bastionhosts/method_getbastionshareablelink.go b/resource-manager/network/2023-05-01/bastionhosts/method_getbastionshareablelink.go index 361f8e95efd..1d277c1e88c 100644 --- a/resource-manager/network/2023-05-01/bastionhosts/method_getbastionshareablelink.go +++ b/resource-manager/network/2023-05-01/bastionhosts/method_getbastionshareablelink.go @@ -15,12 +15,12 @@ import ( type GetBastionShareableLinkOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type GetBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // GetBastionShareableLink ... @@ -50,7 +50,7 @@ func (c BastionHostsClient) GetBastionShareableLink(ctx context.Context, id Bast } var values struct { - Values *[]BastionShareableLinkListResult `json:"value"` + Values *[]BastionShareableLink `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BastionHostsClient) GetBastionShareableLink(ctx context.Context, id Bast // GetBastionShareableLinkComplete retrieves all the results into a single object func (c BastionHostsClient) GetBastionShareableLinkComplete(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (GetBastionShareableLinkCompleteResult, error) { - return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkListResultOperationPredicate{}) + return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkOperationPredicate{}) } // GetBastionShareableLinkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkListResultOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { - items := make([]BastionShareableLinkListResult, 0) +func (c BastionHostsClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { + items := make([]BastionShareableLink, 0) resp, err := c.GetBastionShareableLink(ctx, id, input) if err != nil { diff --git a/resource-manager/network/2023-05-01/bastionhosts/method_putbastionshareablelink.go b/resource-manager/network/2023-05-01/bastionhosts/method_putbastionshareablelink.go index 426b5e5ed0d..5f6e7438551 100644 --- a/resource-manager/network/2023-05-01/bastionhosts/method_putbastionshareablelink.go +++ b/resource-manager/network/2023-05-01/bastionhosts/method_putbastionshareablelink.go @@ -18,12 +18,12 @@ type PutBastionShareableLinkOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type PutBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // PutBastionShareableLink ... diff --git a/resource-manager/network/2023-05-01/bastionhosts/model_bastionactivesessionlistresult.go b/resource-manager/network/2023-05-01/bastionhosts/model_bastionactivesessionlistresult.go deleted file mode 100644 index 040f751576f..00000000000 --- a/resource-manager/network/2023-05-01/bastionhosts/model_bastionactivesessionlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionActiveSessionListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionActiveSession `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-05-01/bastionhosts/model_bastionsessiondeleteresult.go b/resource-manager/network/2023-05-01/bastionhosts/model_bastionsessiondeleteresult.go deleted file mode 100644 index 367468bd830..00000000000 --- a/resource-manager/network/2023-05-01/bastionhosts/model_bastionsessiondeleteresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionSessionDeleteResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionSessionState `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-05-01/bastionhosts/model_bastionshareablelinklistresult.go b/resource-manager/network/2023-05-01/bastionhosts/model_bastionshareablelinklistresult.go deleted file mode 100644 index d5263654771..00000000000 --- a/resource-manager/network/2023-05-01/bastionhosts/model_bastionshareablelinklistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionShareableLink `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-05-01/bastionhosts/predicates.go b/resource-manager/network/2023-05-01/bastionhosts/predicates.go index ce754ba4deb..3c3835a32d0 100644 --- a/resource-manager/network/2023-05-01/bastionhosts/predicates.go +++ b/resource-manager/network/2023-05-01/bastionhosts/predicates.go @@ -3,13 +3,58 @@ package bastionhosts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type BastionActiveSessionListResultOperationPredicate struct { - NextLink *string +type BastionActiveSessionOperationPredicate struct { + ResourceType *string + SessionDurationInMins *float64 + SessionId *string + StartTime *interface{} + TargetHostName *string + TargetIPAddress *string + TargetResourceGroup *string + TargetResourceId *string + TargetSubscriptionId *string + UserName *string } -func (p BastionActiveSessionListResultOperationPredicate) Matches(input BastionActiveSessionListResult) bool { +func (p BastionActiveSessionOperationPredicate) Matches(input BastionActiveSession) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ResourceType != nil && (input.ResourceType == nil || *p.ResourceType != *input.ResourceType) { + return false + } + + if p.SessionDurationInMins != nil && (input.SessionDurationInMins == nil || *p.SessionDurationInMins != *input.SessionDurationInMins) { + return false + } + + if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { + return false + } + + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.TargetHostName != nil && (input.TargetHostName == nil || *p.TargetHostName != *input.TargetHostName) { + return false + } + + if p.TargetIPAddress != nil && (input.TargetIPAddress == nil || *p.TargetIPAddress != *input.TargetIPAddress) { + return false + } + + if p.TargetResourceGroup != nil && (input.TargetResourceGroup == nil || *p.TargetResourceGroup != *input.TargetResourceGroup) { + return false + } + + if p.TargetResourceId != nil && (input.TargetResourceId == nil || *p.TargetResourceId != *input.TargetResourceId) { + return false + } + + if p.TargetSubscriptionId != nil && (input.TargetSubscriptionId == nil || *p.TargetSubscriptionId != *input.TargetSubscriptionId) { + return false + } + + if p.UserName != nil && (input.UserName == nil || *p.UserName != *input.UserName) { return false } @@ -49,26 +94,46 @@ func (p BastionHostOperationPredicate) Matches(input BastionHost) bool { return true } -type BastionSessionDeleteResultOperationPredicate struct { - NextLink *string +type BastionSessionStateOperationPredicate struct { + Message *string + SessionId *string + State *string } -func (p BastionSessionDeleteResultOperationPredicate) Matches(input BastionSessionDeleteResult) bool { +func (p BastionSessionStateOperationPredicate) Matches(input BastionSessionState) bool { + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { + return false + } + + if p.State != nil && (input.State == nil || *p.State != *input.State) { return false } return true } -type BastionShareableLinkListResultOperationPredicate struct { - NextLink *string +type BastionShareableLinkOperationPredicate struct { + Bsl *string + CreatedAt *string + Message *string } -func (p BastionShareableLinkListResultOperationPredicate) Matches(input BastionShareableLinkListResult) bool { +func (p BastionShareableLinkOperationPredicate) Matches(input BastionShareableLink) bool { + + if p.Bsl != nil && (input.Bsl == nil || *p.Bsl != *input.Bsl) { + return false + } + + if p.CreatedAt != nil && (input.CreatedAt == nil || *p.CreatedAt != *input.CreatedAt) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { return false } diff --git a/resource-manager/network/2023-05-01/bastionshareablelink/method_getbastionshareablelink.go b/resource-manager/network/2023-05-01/bastionshareablelink/method_getbastionshareablelink.go index 6c322a71e98..689ab2d57fc 100644 --- a/resource-manager/network/2023-05-01/bastionshareablelink/method_getbastionshareablelink.go +++ b/resource-manager/network/2023-05-01/bastionshareablelink/method_getbastionshareablelink.go @@ -15,12 +15,12 @@ import ( type GetBastionShareableLinkOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type GetBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // GetBastionShareableLink ... @@ -50,7 +50,7 @@ func (c BastionShareableLinkClient) GetBastionShareableLink(ctx context.Context, } var values struct { - Values *[]BastionShareableLinkListResult `json:"value"` + Values *[]BastionShareableLink `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BastionShareableLinkClient) GetBastionShareableLink(ctx context.Context, // GetBastionShareableLinkComplete retrieves all the results into a single object func (c BastionShareableLinkClient) GetBastionShareableLinkComplete(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (GetBastionShareableLinkCompleteResult, error) { - return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkListResultOperationPredicate{}) + return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkOperationPredicate{}) } // GetBastionShareableLinkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionShareableLinkClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkListResultOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { - items := make([]BastionShareableLinkListResult, 0) +func (c BastionShareableLinkClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { + items := make([]BastionShareableLink, 0) resp, err := c.GetBastionShareableLink(ctx, id, input) if err != nil { diff --git a/resource-manager/network/2023-05-01/bastionshareablelink/method_putbastionshareablelink.go b/resource-manager/network/2023-05-01/bastionshareablelink/method_putbastionshareablelink.go index e1d10e6ed89..bf85b28ee63 100644 --- a/resource-manager/network/2023-05-01/bastionshareablelink/method_putbastionshareablelink.go +++ b/resource-manager/network/2023-05-01/bastionshareablelink/method_putbastionshareablelink.go @@ -18,12 +18,12 @@ type PutBastionShareableLinkOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type PutBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // PutBastionShareableLink ... diff --git a/resource-manager/network/2023-05-01/bastionshareablelink/model_bastionshareablelinklistresult.go b/resource-manager/network/2023-05-01/bastionshareablelink/model_bastionshareablelinklistresult.go deleted file mode 100644 index 63c56da1ac2..00000000000 --- a/resource-manager/network/2023-05-01/bastionshareablelink/model_bastionshareablelinklistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionshareablelink - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionShareableLink `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-05-01/bastionshareablelink/predicates.go b/resource-manager/network/2023-05-01/bastionshareablelink/predicates.go index d301a4812ab..15f07095262 100644 --- a/resource-manager/network/2023-05-01/bastionshareablelink/predicates.go +++ b/resource-manager/network/2023-05-01/bastionshareablelink/predicates.go @@ -3,13 +3,23 @@ package bastionshareablelink // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type BastionShareableLinkListResultOperationPredicate struct { - NextLink *string +type BastionShareableLinkOperationPredicate struct { + Bsl *string + CreatedAt *string + Message *string } -func (p BastionShareableLinkListResultOperationPredicate) Matches(input BastionShareableLinkListResult) bool { +func (p BastionShareableLinkOperationPredicate) Matches(input BastionShareableLink) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Bsl != nil && (input.Bsl == nil || *p.Bsl != *input.Bsl) { + return false + } + + if p.CreatedAt != nil && (input.CreatedAt == nil || *p.CreatedAt != *input.CreatedAt) { + return false + } + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { return false } diff --git a/resource-manager/network/2023-05-01/expressroutecircuitarptable/README.md b/resource-manager/network/2023-05-01/expressroutecircuitarptable/README.md index abd1ced2a63..e57bfd5e826 100644 --- a/resource-manager/network/2023-05-01/expressroutecircuitarptable/README.md +++ b/resource-manager/network/2023-05-01/expressroutecircuitarptable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecircuitarptable.NewArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "arpTableValue") -if err := client.ExpressRouteCircuitsListArpTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCircuitsListArpTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCircuitsListArpTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-05-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go b/resource-manager/network/2023-05-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go index f4fcf5e4935..6e9e9491ca8 100644 --- a/resource-manager/network/2023-05-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go +++ b/resource-manager/network/2023-05-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go @@ -18,7 +18,12 @@ type ExpressRouteCircuitsListArpTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsArpTableListResult + Model *[]ExpressRouteCircuitArpTable +} + +type ExpressRouteCircuitsListArpTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitArpTable } // ExpressRouteCircuitsListArpTable ... diff --git a/resource-manager/network/2023-05-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go b/resource-manager/network/2023-05-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go deleted file mode 100644 index a6f3b3f86f5..00000000000 --- a/resource-manager/network/2023-05-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsArpTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-05-01/expressroutecircuitarptable/predicates.go b/resource-manager/network/2023-05-01/expressroutecircuitarptable/predicates.go new file mode 100644 index 00000000000..4143b82875f --- /dev/null +++ b/resource-manager/network/2023-05-01/expressroutecircuitarptable/predicates.go @@ -0,0 +1,32 @@ +package expressroutecircuitarptable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitArpTableOperationPredicate struct { + Age *int64 + IPAddress *string + Interface *string + MacAddress *string +} + +func (p ExpressRouteCircuitArpTableOperationPredicate) Matches(input ExpressRouteCircuitArpTable) bool { + + if p.Age != nil && (input.Age == nil || *p.Age != *input.Age) { + return false + } + + if p.IPAddress != nil && (input.IPAddress == nil || *p.IPAddress != *input.IPAddress) { + return false + } + + if p.Interface != nil && (input.Interface == nil || *p.Interface != *input.Interface) { + return false + } + + if p.MacAddress != nil && (input.MacAddress == nil || *p.MacAddress != *input.MacAddress) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-05-01/expressroutecircuitroutestable/README.md b/resource-manager/network/2023-05-01/expressroutecircuitroutestable/README.md index 8335448770b..2ebf23973fb 100644 --- a/resource-manager/network/2023-05-01/expressroutecircuitroutestable/README.md +++ b/resource-manager/network/2023-05-01/expressroutecircuitroutestable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecircuitroutestable.NewPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTableValue") -if err := client.ExpressRouteCircuitsListRoutesTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCircuitsListRoutesTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCircuitsListRoutesTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-05-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go b/resource-manager/network/2023-05-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go index 2a47c72ab75..0d55eeb8353 100644 --- a/resource-manager/network/2023-05-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go +++ b/resource-manager/network/2023-05-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go @@ -18,7 +18,12 @@ type ExpressRouteCircuitsListRoutesTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsRoutesTableListResult + Model *[]ExpressRouteCircuitRoutesTable +} + +type ExpressRouteCircuitsListRoutesTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitRoutesTable } // ExpressRouteCircuitsListRoutesTable ... diff --git a/resource-manager/network/2023-05-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go b/resource-manager/network/2023-05-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go deleted file mode 100644 index 7ff773de0b1..00000000000 --- a/resource-manager/network/2023-05-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitroutestable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-05-01/expressroutecircuitroutestable/predicates.go b/resource-manager/network/2023-05-01/expressroutecircuitroutestable/predicates.go new file mode 100644 index 00000000000..81d29805310 --- /dev/null +++ b/resource-manager/network/2023-05-01/expressroutecircuitroutestable/predicates.go @@ -0,0 +1,37 @@ +package expressroutecircuitroutestable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitRoutesTableOperationPredicate struct { + LocPrf *string + Network *string + NextHop *string + Path *string + Weight *int64 +} + +func (p ExpressRouteCircuitRoutesTableOperationPredicate) Matches(input ExpressRouteCircuitRoutesTable) bool { + + if p.LocPrf != nil && (input.LocPrf == nil || *p.LocPrf != *input.LocPrf) { + return false + } + + if p.Network != nil && (input.Network == nil || *p.Network != *input.Network) { + return false + } + + if p.NextHop != nil && (input.NextHop == nil || *p.NextHop != *input.NextHop) { + return false + } + + if p.Path != nil && (input.Path == nil || *p.Path != *input.Path) { + return false + } + + if p.Weight != nil && (input.Weight == nil || *p.Weight != *input.Weight) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/README.md b/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/README.md index 1b4b4a8e41d..de21f04545e 100644 --- a/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/README.md +++ b/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecircuitroutestablesummary.NewRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTablesSummaryValue") -if err := client.ExpressRouteCircuitsListRoutesTableSummaryThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCircuitsListRoutesTableSummary(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCircuitsListRoutesTableSummaryComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go b/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go index b5f5dcefb38..200e1b6b1e8 100644 --- a/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go +++ b/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go @@ -18,7 +18,12 @@ type ExpressRouteCircuitsListRoutesTableSummaryOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsRoutesTableSummaryListResult + Model *[]ExpressRouteCircuitRoutesTableSummary +} + +type ExpressRouteCircuitsListRoutesTableSummaryCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitRoutesTableSummary } // ExpressRouteCircuitsListRoutesTableSummary ... diff --git a/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go b/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go deleted file mode 100644 index 819e27f860b..00000000000 --- a/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitroutestablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableSummaryListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/predicates.go b/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/predicates.go new file mode 100644 index 00000000000..1d9991e4b00 --- /dev/null +++ b/resource-manager/network/2023-05-01/expressroutecircuitroutestablesummary/predicates.go @@ -0,0 +1,37 @@ +package expressroutecircuitroutestablesummary + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitRoutesTableSummaryOperationPredicate struct { + As *int64 + Neighbor *string + StatePfxRcd *string + UpDown *string + V *int64 +} + +func (p ExpressRouteCircuitRoutesTableSummaryOperationPredicate) Matches(input ExpressRouteCircuitRoutesTableSummary) bool { + + if p.As != nil && (input.As == nil || *p.As != *input.As) { + return false + } + + if p.Neighbor != nil && (input.Neighbor == nil || *p.Neighbor != *input.Neighbor) { + return false + } + + if p.StatePfxRcd != nil && (input.StatePfxRcd == nil || *p.StatePfxRcd != *input.StatePfxRcd) { + return false + } + + if p.UpDown != nil && (input.UpDown == nil || *p.UpDown != *input.UpDown) { + return false + } + + if p.V != nil && (input.V == nil || *p.V != *input.V) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/README.md b/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/README.md index 144b816cbc8..c0e046a0deb 100644 --- a/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/README.md +++ b/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecrossconnectionarptable.NewPeeringArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "arpTableValue") -if err := client.ExpressRouteCrossConnectionsListArpTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCrossConnectionsListArpTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCrossConnectionsListArpTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go b/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go index df9b8956dd5..93cb5d74c61 100644 --- a/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go +++ b/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go @@ -18,7 +18,12 @@ type ExpressRouteCrossConnectionsListArpTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsArpTableListResult + Model *[]ExpressRouteCircuitArpTable +} + +type ExpressRouteCrossConnectionsListArpTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitArpTable } // ExpressRouteCrossConnectionsListArpTable ... diff --git a/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go b/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go deleted file mode 100644 index 67147d0690b..00000000000 --- a/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsArpTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/predicates.go b/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/predicates.go new file mode 100644 index 00000000000..75df45b22f9 --- /dev/null +++ b/resource-manager/network/2023-05-01/expressroutecrossconnectionarptable/predicates.go @@ -0,0 +1,32 @@ +package expressroutecrossconnectionarptable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitArpTableOperationPredicate struct { + Age *int64 + IPAddress *string + Interface *string + MacAddress *string +} + +func (p ExpressRouteCircuitArpTableOperationPredicate) Matches(input ExpressRouteCircuitArpTable) bool { + + if p.Age != nil && (input.Age == nil || *p.Age != *input.Age) { + return false + } + + if p.IPAddress != nil && (input.IPAddress == nil || *p.IPAddress != *input.IPAddress) { + return false + } + + if p.Interface != nil && (input.Interface == nil || *p.Interface != *input.Interface) { + return false + } + + if p.MacAddress != nil && (input.MacAddress == nil || *p.MacAddress != *input.MacAddress) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/README.md b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/README.md index 30d5fc66943..1d99716cd77 100644 --- a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/README.md +++ b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecrossconnectionroutetable.NewExpressRouteCrossConnectionPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTableValue") -if err := client.ExpressRouteCrossConnectionsListRoutesTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCrossConnectionsListRoutesTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCrossConnectionsListRoutesTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go index ac9e91764e0..75e866bbea7 100644 --- a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go +++ b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go @@ -18,7 +18,12 @@ type ExpressRouteCrossConnectionsListRoutesTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsRoutesTableListResult + Model *[]ExpressRouteCircuitRoutesTable +} + +type ExpressRouteCrossConnectionsListRoutesTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitRoutesTable } // ExpressRouteCrossConnectionsListRoutesTable ... diff --git a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go deleted file mode 100644 index d42583463b3..00000000000 --- a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionroutetable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/predicates.go b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/predicates.go new file mode 100644 index 00000000000..2f1a6174bb4 --- /dev/null +++ b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetable/predicates.go @@ -0,0 +1,37 @@ +package expressroutecrossconnectionroutetable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitRoutesTableOperationPredicate struct { + LocPrf *string + Network *string + NextHop *string + Path *string + Weight *int64 +} + +func (p ExpressRouteCircuitRoutesTableOperationPredicate) Matches(input ExpressRouteCircuitRoutesTable) bool { + + if p.LocPrf != nil && (input.LocPrf == nil || *p.LocPrf != *input.LocPrf) { + return false + } + + if p.Network != nil && (input.Network == nil || *p.Network != *input.Network) { + return false + } + + if p.NextHop != nil && (input.NextHop == nil || *p.NextHop != *input.NextHop) { + return false + } + + if p.Path != nil && (input.Path == nil || *p.Path != *input.Path) { + return false + } + + if p.Weight != nil && (input.Weight == nil || *p.Weight != *input.Weight) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/README.md b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/README.md index 6fceae11ea1..ba6a7e55226 100644 --- a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/README.md +++ b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecrossconnectionroutetablesummary.NewPeeringRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTablesSummaryValue") -if err := client.ExpressRouteCrossConnectionsListRoutesTableSummaryThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCrossConnectionsListRoutesTableSummary(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCrossConnectionsListRoutesTableSummaryComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go index 43874ea0bb9..06c63e507a1 100644 --- a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go +++ b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go @@ -18,7 +18,12 @@ type ExpressRouteCrossConnectionsListRoutesTableSummaryOperationResponse struct Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCrossConnectionsRoutesTableSummaryListResult + Model *[]ExpressRouteCrossConnectionRoutesTableSummary +} + +type ExpressRouteCrossConnectionsListRoutesTableSummaryCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCrossConnectionRoutesTableSummary } // ExpressRouteCrossConnectionsListRoutesTableSummary ... diff --git a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go deleted file mode 100644 index 21d57c1911b..00000000000 --- a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/predicates.go b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/predicates.go new file mode 100644 index 00000000000..8399718cebc --- /dev/null +++ b/resource-manager/network/2023-05-01/expressroutecrossconnectionroutetablesummary/predicates.go @@ -0,0 +1,32 @@ +package expressroutecrossconnectionroutetablesummary + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCrossConnectionRoutesTableSummaryOperationPredicate struct { + Asn *int64 + Neighbor *string + StateOrPrefixesReceived *string + UpDown *string +} + +func (p ExpressRouteCrossConnectionRoutesTableSummaryOperationPredicate) Matches(input ExpressRouteCrossConnectionRoutesTableSummary) bool { + + if p.Asn != nil && (input.Asn == nil || *p.Asn != *input.Asn) { + return false + } + + if p.Neighbor != nil && (input.Neighbor == nil || *p.Neighbor != *input.Neighbor) { + return false + } + + if p.StateOrPrefixesReceived != nil && (input.StateOrPrefixesReceived == nil || *p.StateOrPrefixesReceived != *input.StateOrPrefixesReceived) { + return false + } + + if p.UpDown != nil && (input.UpDown == nil || *p.UpDown != *input.UpDown) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-05-01/networkinterfaces/README.md b/resource-manager/network/2023-05-01/networkinterfaces/README.md index e9c704ef7d7..76c52440680 100644 --- a/resource-manager/network/2023-05-01/networkinterfaces/README.md +++ b/resource-manager/network/2023-05-01/networkinterfaces/README.md @@ -88,9 +88,14 @@ if model := read.Model; model != nil { ctx := context.TODO() id := commonids.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") -if err := client.GetEffectiveRouteTableThenPoll(ctx, id); err != nil { +// alternatively `client.GetEffectiveRouteTable(ctx, id)` can be used to do batched pagination +items, err := client.GetEffectiveRouteTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` @@ -200,9 +205,14 @@ for _, item := range items { ctx := context.TODO() id := commonids.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") -if err := client.ListEffectiveNetworkSecurityGroupsThenPoll(ctx, id); err != nil { +// alternatively `client.ListEffectiveNetworkSecurityGroups(ctx, id)` can be used to do batched pagination +items, err := client.ListEffectiveNetworkSecurityGroupsComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-05-01/networkinterfaces/method_geteffectiveroutetable.go b/resource-manager/network/2023-05-01/networkinterfaces/method_geteffectiveroutetable.go index 02c2c417a3c..e64977d2735 100644 --- a/resource-manager/network/2023-05-01/networkinterfaces/method_geteffectiveroutetable.go +++ b/resource-manager/network/2023-05-01/networkinterfaces/method_geteffectiveroutetable.go @@ -19,7 +19,12 @@ type GetEffectiveRouteTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *EffectiveRouteListResult + Model *[]EffectiveRoute +} + +type GetEffectiveRouteTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []EffectiveRoute } // GetEffectiveRouteTable ... diff --git a/resource-manager/network/2023-05-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go b/resource-manager/network/2023-05-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go index 19670227bf1..50661e67194 100644 --- a/resource-manager/network/2023-05-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go +++ b/resource-manager/network/2023-05-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go @@ -19,7 +19,12 @@ type ListEffectiveNetworkSecurityGroupsOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *EffectiveNetworkSecurityGroupListResult + Model *[]EffectiveNetworkSecurityGroup +} + +type ListEffectiveNetworkSecurityGroupsCompleteResult struct { + LatestHttpResponse *http.Response + Items []EffectiveNetworkSecurityGroup } // ListEffectiveNetworkSecurityGroups ... diff --git a/resource-manager/network/2023-05-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go b/resource-manager/network/2023-05-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go deleted file mode 100644 index b8111a10fff..00000000000 --- a/resource-manager/network/2023-05-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityGroupListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-05-01/networkinterfaces/model_effectiveroutelistresult.go b/resource-manager/network/2023-05-01/networkinterfaces/model_effectiveroutelistresult.go deleted file mode 100644 index a3a975a8636..00000000000 --- a/resource-manager/network/2023-05-01/networkinterfaces/model_effectiveroutelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveRouteListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]EffectiveRoute `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-05-01/networkinterfaces/predicates.go b/resource-manager/network/2023-05-01/networkinterfaces/predicates.go index 1bdf1a16800..c58ed4a328b 100644 --- a/resource-manager/network/2023-05-01/networkinterfaces/predicates.go +++ b/resource-manager/network/2023-05-01/networkinterfaces/predicates.go @@ -3,6 +3,32 @@ package networkinterfaces // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type EffectiveNetworkSecurityGroupOperationPredicate struct { +} + +func (p EffectiveNetworkSecurityGroupOperationPredicate) Matches(input EffectiveNetworkSecurityGroup) bool { + + return true +} + +type EffectiveRouteOperationPredicate struct { + DisableBgpRoutePropagation *bool + Name *string +} + +func (p EffectiveRouteOperationPredicate) Matches(input EffectiveRoute) bool { + + if p.DisableBgpRoutePropagation != nil && (input.DisableBgpRoutePropagation == nil || *p.DisableBgpRoutePropagation != *input.DisableBgpRoutePropagation) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + return true +} + type LoadBalancerOperationPredicate struct { Etag *string Id *string diff --git a/resource-manager/network/2023-05-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go b/resource-manager/network/2023-05-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go index 8e6bf7989a9..c0872952086 100644 --- a/resource-manager/network/2023-05-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go +++ b/resource-manager/network/2023-05-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go @@ -19,12 +19,12 @@ type VirtualNetworksListDdosProtectionStatusOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]VirtualNetworkDdosProtectionStatusResult + Model *[]PublicIPDdosProtectionStatusResult } type VirtualNetworksListDdosProtectionStatusCompleteResult struct { LatestHttpResponse *http.Response - Items []VirtualNetworkDdosProtectionStatusResult + Items []PublicIPDdosProtectionStatusResult } type VirtualNetworksListDdosProtectionStatusOperationOptions struct { diff --git a/resource-manager/network/2023-05-01/virtualnetworks/model_virtualnetworkddosprotectionstatusresult.go b/resource-manager/network/2023-05-01/virtualnetworks/model_virtualnetworkddosprotectionstatusresult.go deleted file mode 100644 index dec4e865313..00000000000 --- a/resource-manager/network/2023-05-01/virtualnetworks/model_virtualnetworkddosprotectionstatusresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkDdosProtectionStatusResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]PublicIPDdosProtectionStatusResult `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-05-01/virtualnetworks/predicates.go b/resource-manager/network/2023-05-01/virtualnetworks/predicates.go index 4e467e7af4c..ae976386154 100644 --- a/resource-manager/network/2023-05-01/virtualnetworks/predicates.go +++ b/resource-manager/network/2023-05-01/virtualnetworks/predicates.go @@ -3,6 +3,29 @@ package virtualnetworks // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type PublicIPDdosProtectionStatusResultOperationPredicate struct { + DdosProtectionPlanId *string + PublicIPAddress *string + PublicIPAddressId *string +} + +func (p PublicIPDdosProtectionStatusResultOperationPredicate) Matches(input PublicIPDdosProtectionStatusResult) bool { + + if p.DdosProtectionPlanId != nil && (input.DdosProtectionPlanId == nil || *p.DdosProtectionPlanId != *input.DdosProtectionPlanId) { + return false + } + + if p.PublicIPAddress != nil && (input.PublicIPAddress == nil || *p.PublicIPAddress != *input.PublicIPAddress) { + return false + } + + if p.PublicIPAddressId != nil && (input.PublicIPAddressId == nil || *p.PublicIPAddressId != *input.PublicIPAddressId) { + return false + } + + return true +} + type ResourceNavigationLinkOperationPredicate struct { Etag *string Id *string @@ -92,19 +115,6 @@ func (p VirtualNetworkOperationPredicate) Matches(input VirtualNetwork) bool { return true } -type VirtualNetworkDdosProtectionStatusResultOperationPredicate struct { - NextLink *string -} - -func (p VirtualNetworkDdosProtectionStatusResultOperationPredicate) Matches(input VirtualNetworkDdosProtectionStatusResult) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} - type VirtualNetworkUsageOperationPredicate struct { CurrentValue *float64 Id *string diff --git a/resource-manager/network/2023-06-01/bastionhosts/method_disconnectactivesessions.go b/resource-manager/network/2023-06-01/bastionhosts/method_disconnectactivesessions.go index 5e04a28894d..3a130339543 100644 --- a/resource-manager/network/2023-06-01/bastionhosts/method_disconnectactivesessions.go +++ b/resource-manager/network/2023-06-01/bastionhosts/method_disconnectactivesessions.go @@ -15,12 +15,12 @@ import ( type DisconnectActiveSessionsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BastionSessionDeleteResult + Model *[]BastionSessionState } type DisconnectActiveSessionsCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionSessionDeleteResult + Items []BastionSessionState } // DisconnectActiveSessions ... @@ -50,7 +50,7 @@ func (c BastionHostsClient) DisconnectActiveSessions(ctx context.Context, id Bas } var values struct { - Values *[]BastionSessionDeleteResult `json:"value"` + Values *[]BastionSessionState `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BastionHostsClient) DisconnectActiveSessions(ctx context.Context, id Bas // DisconnectActiveSessionsComplete retrieves all the results into a single object func (c BastionHostsClient) DisconnectActiveSessionsComplete(ctx context.Context, id BastionHostId, input SessionIds) (DisconnectActiveSessionsCompleteResult, error) { - return c.DisconnectActiveSessionsCompleteMatchingPredicate(ctx, id, input, BastionSessionDeleteResultOperationPredicate{}) + return c.DisconnectActiveSessionsCompleteMatchingPredicate(ctx, id, input, BastionSessionStateOperationPredicate{}) } // DisconnectActiveSessionsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) DisconnectActiveSessionsCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input SessionIds, predicate BastionSessionDeleteResultOperationPredicate) (result DisconnectActiveSessionsCompleteResult, err error) { - items := make([]BastionSessionDeleteResult, 0) +func (c BastionHostsClient) DisconnectActiveSessionsCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input SessionIds, predicate BastionSessionStateOperationPredicate) (result DisconnectActiveSessionsCompleteResult, err error) { + items := make([]BastionSessionState, 0) resp, err := c.DisconnectActiveSessions(ctx, id, input) if err != nil { diff --git a/resource-manager/network/2023-06-01/bastionhosts/method_getactivesessions.go b/resource-manager/network/2023-06-01/bastionhosts/method_getactivesessions.go index 521be83f4a3..bc50f38fc50 100644 --- a/resource-manager/network/2023-06-01/bastionhosts/method_getactivesessions.go +++ b/resource-manager/network/2023-06-01/bastionhosts/method_getactivesessions.go @@ -18,12 +18,12 @@ type GetActiveSessionsOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]BastionActiveSessionListResult + Model *[]BastionActiveSession } type GetActiveSessionsCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionActiveSessionListResult + Items []BastionActiveSession } // GetActiveSessions ... diff --git a/resource-manager/network/2023-06-01/bastionhosts/method_getbastionshareablelink.go b/resource-manager/network/2023-06-01/bastionhosts/method_getbastionshareablelink.go index 361f8e95efd..1d277c1e88c 100644 --- a/resource-manager/network/2023-06-01/bastionhosts/method_getbastionshareablelink.go +++ b/resource-manager/network/2023-06-01/bastionhosts/method_getbastionshareablelink.go @@ -15,12 +15,12 @@ import ( type GetBastionShareableLinkOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type GetBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // GetBastionShareableLink ... @@ -50,7 +50,7 @@ func (c BastionHostsClient) GetBastionShareableLink(ctx context.Context, id Bast } var values struct { - Values *[]BastionShareableLinkListResult `json:"value"` + Values *[]BastionShareableLink `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BastionHostsClient) GetBastionShareableLink(ctx context.Context, id Bast // GetBastionShareableLinkComplete retrieves all the results into a single object func (c BastionHostsClient) GetBastionShareableLinkComplete(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (GetBastionShareableLinkCompleteResult, error) { - return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkListResultOperationPredicate{}) + return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkOperationPredicate{}) } // GetBastionShareableLinkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkListResultOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { - items := make([]BastionShareableLinkListResult, 0) +func (c BastionHostsClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { + items := make([]BastionShareableLink, 0) resp, err := c.GetBastionShareableLink(ctx, id, input) if err != nil { diff --git a/resource-manager/network/2023-06-01/bastionhosts/method_putbastionshareablelink.go b/resource-manager/network/2023-06-01/bastionhosts/method_putbastionshareablelink.go index 426b5e5ed0d..5f6e7438551 100644 --- a/resource-manager/network/2023-06-01/bastionhosts/method_putbastionshareablelink.go +++ b/resource-manager/network/2023-06-01/bastionhosts/method_putbastionshareablelink.go @@ -18,12 +18,12 @@ type PutBastionShareableLinkOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type PutBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // PutBastionShareableLink ... diff --git a/resource-manager/network/2023-06-01/bastionhosts/model_bastionactivesessionlistresult.go b/resource-manager/network/2023-06-01/bastionhosts/model_bastionactivesessionlistresult.go deleted file mode 100644 index 040f751576f..00000000000 --- a/resource-manager/network/2023-06-01/bastionhosts/model_bastionactivesessionlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionActiveSessionListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionActiveSession `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-06-01/bastionhosts/model_bastionsessiondeleteresult.go b/resource-manager/network/2023-06-01/bastionhosts/model_bastionsessiondeleteresult.go deleted file mode 100644 index 367468bd830..00000000000 --- a/resource-manager/network/2023-06-01/bastionhosts/model_bastionsessiondeleteresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionSessionDeleteResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionSessionState `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-06-01/bastionhosts/model_bastionshareablelinklistresult.go b/resource-manager/network/2023-06-01/bastionhosts/model_bastionshareablelinklistresult.go deleted file mode 100644 index d5263654771..00000000000 --- a/resource-manager/network/2023-06-01/bastionhosts/model_bastionshareablelinklistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionShareableLink `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-06-01/bastionhosts/predicates.go b/resource-manager/network/2023-06-01/bastionhosts/predicates.go index ce754ba4deb..3c3835a32d0 100644 --- a/resource-manager/network/2023-06-01/bastionhosts/predicates.go +++ b/resource-manager/network/2023-06-01/bastionhosts/predicates.go @@ -3,13 +3,58 @@ package bastionhosts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type BastionActiveSessionListResultOperationPredicate struct { - NextLink *string +type BastionActiveSessionOperationPredicate struct { + ResourceType *string + SessionDurationInMins *float64 + SessionId *string + StartTime *interface{} + TargetHostName *string + TargetIPAddress *string + TargetResourceGroup *string + TargetResourceId *string + TargetSubscriptionId *string + UserName *string } -func (p BastionActiveSessionListResultOperationPredicate) Matches(input BastionActiveSessionListResult) bool { +func (p BastionActiveSessionOperationPredicate) Matches(input BastionActiveSession) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ResourceType != nil && (input.ResourceType == nil || *p.ResourceType != *input.ResourceType) { + return false + } + + if p.SessionDurationInMins != nil && (input.SessionDurationInMins == nil || *p.SessionDurationInMins != *input.SessionDurationInMins) { + return false + } + + if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { + return false + } + + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.TargetHostName != nil && (input.TargetHostName == nil || *p.TargetHostName != *input.TargetHostName) { + return false + } + + if p.TargetIPAddress != nil && (input.TargetIPAddress == nil || *p.TargetIPAddress != *input.TargetIPAddress) { + return false + } + + if p.TargetResourceGroup != nil && (input.TargetResourceGroup == nil || *p.TargetResourceGroup != *input.TargetResourceGroup) { + return false + } + + if p.TargetResourceId != nil && (input.TargetResourceId == nil || *p.TargetResourceId != *input.TargetResourceId) { + return false + } + + if p.TargetSubscriptionId != nil && (input.TargetSubscriptionId == nil || *p.TargetSubscriptionId != *input.TargetSubscriptionId) { + return false + } + + if p.UserName != nil && (input.UserName == nil || *p.UserName != *input.UserName) { return false } @@ -49,26 +94,46 @@ func (p BastionHostOperationPredicate) Matches(input BastionHost) bool { return true } -type BastionSessionDeleteResultOperationPredicate struct { - NextLink *string +type BastionSessionStateOperationPredicate struct { + Message *string + SessionId *string + State *string } -func (p BastionSessionDeleteResultOperationPredicate) Matches(input BastionSessionDeleteResult) bool { +func (p BastionSessionStateOperationPredicate) Matches(input BastionSessionState) bool { + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { + return false + } + + if p.State != nil && (input.State == nil || *p.State != *input.State) { return false } return true } -type BastionShareableLinkListResultOperationPredicate struct { - NextLink *string +type BastionShareableLinkOperationPredicate struct { + Bsl *string + CreatedAt *string + Message *string } -func (p BastionShareableLinkListResultOperationPredicate) Matches(input BastionShareableLinkListResult) bool { +func (p BastionShareableLinkOperationPredicate) Matches(input BastionShareableLink) bool { + + if p.Bsl != nil && (input.Bsl == nil || *p.Bsl != *input.Bsl) { + return false + } + + if p.CreatedAt != nil && (input.CreatedAt == nil || *p.CreatedAt != *input.CreatedAt) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { return false } diff --git a/resource-manager/network/2023-06-01/bastionshareablelink/method_getbastionshareablelink.go b/resource-manager/network/2023-06-01/bastionshareablelink/method_getbastionshareablelink.go index 6c322a71e98..689ab2d57fc 100644 --- a/resource-manager/network/2023-06-01/bastionshareablelink/method_getbastionshareablelink.go +++ b/resource-manager/network/2023-06-01/bastionshareablelink/method_getbastionshareablelink.go @@ -15,12 +15,12 @@ import ( type GetBastionShareableLinkOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type GetBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // GetBastionShareableLink ... @@ -50,7 +50,7 @@ func (c BastionShareableLinkClient) GetBastionShareableLink(ctx context.Context, } var values struct { - Values *[]BastionShareableLinkListResult `json:"value"` + Values *[]BastionShareableLink `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BastionShareableLinkClient) GetBastionShareableLink(ctx context.Context, // GetBastionShareableLinkComplete retrieves all the results into a single object func (c BastionShareableLinkClient) GetBastionShareableLinkComplete(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (GetBastionShareableLinkCompleteResult, error) { - return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkListResultOperationPredicate{}) + return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkOperationPredicate{}) } // GetBastionShareableLinkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionShareableLinkClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkListResultOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { - items := make([]BastionShareableLinkListResult, 0) +func (c BastionShareableLinkClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { + items := make([]BastionShareableLink, 0) resp, err := c.GetBastionShareableLink(ctx, id, input) if err != nil { diff --git a/resource-manager/network/2023-06-01/bastionshareablelink/method_putbastionshareablelink.go b/resource-manager/network/2023-06-01/bastionshareablelink/method_putbastionshareablelink.go index e1d10e6ed89..bf85b28ee63 100644 --- a/resource-manager/network/2023-06-01/bastionshareablelink/method_putbastionshareablelink.go +++ b/resource-manager/network/2023-06-01/bastionshareablelink/method_putbastionshareablelink.go @@ -18,12 +18,12 @@ type PutBastionShareableLinkOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type PutBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // PutBastionShareableLink ... diff --git a/resource-manager/network/2023-06-01/bastionshareablelink/model_bastionshareablelinklistresult.go b/resource-manager/network/2023-06-01/bastionshareablelink/model_bastionshareablelinklistresult.go deleted file mode 100644 index 63c56da1ac2..00000000000 --- a/resource-manager/network/2023-06-01/bastionshareablelink/model_bastionshareablelinklistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionshareablelink - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionShareableLink `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-06-01/bastionshareablelink/predicates.go b/resource-manager/network/2023-06-01/bastionshareablelink/predicates.go index d301a4812ab..15f07095262 100644 --- a/resource-manager/network/2023-06-01/bastionshareablelink/predicates.go +++ b/resource-manager/network/2023-06-01/bastionshareablelink/predicates.go @@ -3,13 +3,23 @@ package bastionshareablelink // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type BastionShareableLinkListResultOperationPredicate struct { - NextLink *string +type BastionShareableLinkOperationPredicate struct { + Bsl *string + CreatedAt *string + Message *string } -func (p BastionShareableLinkListResultOperationPredicate) Matches(input BastionShareableLinkListResult) bool { +func (p BastionShareableLinkOperationPredicate) Matches(input BastionShareableLink) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Bsl != nil && (input.Bsl == nil || *p.Bsl != *input.Bsl) { + return false + } + + if p.CreatedAt != nil && (input.CreatedAt == nil || *p.CreatedAt != *input.CreatedAt) { + return false + } + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { return false } diff --git a/resource-manager/network/2023-06-01/expressroutecircuitarptable/README.md b/resource-manager/network/2023-06-01/expressroutecircuitarptable/README.md index 018f4eb6d52..c6377a8210c 100644 --- a/resource-manager/network/2023-06-01/expressroutecircuitarptable/README.md +++ b/resource-manager/network/2023-06-01/expressroutecircuitarptable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecircuitarptable.NewArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "arpTableValue") -if err := client.ExpressRouteCircuitsListArpTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCircuitsListArpTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCircuitsListArpTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-06-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go b/resource-manager/network/2023-06-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go index f4fcf5e4935..6e9e9491ca8 100644 --- a/resource-manager/network/2023-06-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go +++ b/resource-manager/network/2023-06-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go @@ -18,7 +18,12 @@ type ExpressRouteCircuitsListArpTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsArpTableListResult + Model *[]ExpressRouteCircuitArpTable +} + +type ExpressRouteCircuitsListArpTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitArpTable } // ExpressRouteCircuitsListArpTable ... diff --git a/resource-manager/network/2023-06-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go b/resource-manager/network/2023-06-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go deleted file mode 100644 index a6f3b3f86f5..00000000000 --- a/resource-manager/network/2023-06-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsArpTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-06-01/expressroutecircuitarptable/predicates.go b/resource-manager/network/2023-06-01/expressroutecircuitarptable/predicates.go new file mode 100644 index 00000000000..4143b82875f --- /dev/null +++ b/resource-manager/network/2023-06-01/expressroutecircuitarptable/predicates.go @@ -0,0 +1,32 @@ +package expressroutecircuitarptable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitArpTableOperationPredicate struct { + Age *int64 + IPAddress *string + Interface *string + MacAddress *string +} + +func (p ExpressRouteCircuitArpTableOperationPredicate) Matches(input ExpressRouteCircuitArpTable) bool { + + if p.Age != nil && (input.Age == nil || *p.Age != *input.Age) { + return false + } + + if p.IPAddress != nil && (input.IPAddress == nil || *p.IPAddress != *input.IPAddress) { + return false + } + + if p.Interface != nil && (input.Interface == nil || *p.Interface != *input.Interface) { + return false + } + + if p.MacAddress != nil && (input.MacAddress == nil || *p.MacAddress != *input.MacAddress) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-06-01/expressroutecircuitroutestable/README.md b/resource-manager/network/2023-06-01/expressroutecircuitroutestable/README.md index 68b0a245362..d472d570ce1 100644 --- a/resource-manager/network/2023-06-01/expressroutecircuitroutestable/README.md +++ b/resource-manager/network/2023-06-01/expressroutecircuitroutestable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecircuitroutestable.NewPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTableValue") -if err := client.ExpressRouteCircuitsListRoutesTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCircuitsListRoutesTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCircuitsListRoutesTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-06-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go b/resource-manager/network/2023-06-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go index 2a47c72ab75..0d55eeb8353 100644 --- a/resource-manager/network/2023-06-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go +++ b/resource-manager/network/2023-06-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go @@ -18,7 +18,12 @@ type ExpressRouteCircuitsListRoutesTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsRoutesTableListResult + Model *[]ExpressRouteCircuitRoutesTable +} + +type ExpressRouteCircuitsListRoutesTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitRoutesTable } // ExpressRouteCircuitsListRoutesTable ... diff --git a/resource-manager/network/2023-06-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go b/resource-manager/network/2023-06-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go deleted file mode 100644 index 7ff773de0b1..00000000000 --- a/resource-manager/network/2023-06-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitroutestable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-06-01/expressroutecircuitroutestable/predicates.go b/resource-manager/network/2023-06-01/expressroutecircuitroutestable/predicates.go new file mode 100644 index 00000000000..81d29805310 --- /dev/null +++ b/resource-manager/network/2023-06-01/expressroutecircuitroutestable/predicates.go @@ -0,0 +1,37 @@ +package expressroutecircuitroutestable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitRoutesTableOperationPredicate struct { + LocPrf *string + Network *string + NextHop *string + Path *string + Weight *int64 +} + +func (p ExpressRouteCircuitRoutesTableOperationPredicate) Matches(input ExpressRouteCircuitRoutesTable) bool { + + if p.LocPrf != nil && (input.LocPrf == nil || *p.LocPrf != *input.LocPrf) { + return false + } + + if p.Network != nil && (input.Network == nil || *p.Network != *input.Network) { + return false + } + + if p.NextHop != nil && (input.NextHop == nil || *p.NextHop != *input.NextHop) { + return false + } + + if p.Path != nil && (input.Path == nil || *p.Path != *input.Path) { + return false + } + + if p.Weight != nil && (input.Weight == nil || *p.Weight != *input.Weight) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/README.md b/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/README.md index 55f5c8f4e82..1a3870ac01f 100644 --- a/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/README.md +++ b/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecircuitroutestablesummary.NewRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTablesSummaryValue") -if err := client.ExpressRouteCircuitsListRoutesTableSummaryThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCircuitsListRoutesTableSummary(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCircuitsListRoutesTableSummaryComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go b/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go index b5f5dcefb38..200e1b6b1e8 100644 --- a/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go +++ b/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go @@ -18,7 +18,12 @@ type ExpressRouteCircuitsListRoutesTableSummaryOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsRoutesTableSummaryListResult + Model *[]ExpressRouteCircuitRoutesTableSummary +} + +type ExpressRouteCircuitsListRoutesTableSummaryCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitRoutesTableSummary } // ExpressRouteCircuitsListRoutesTableSummary ... diff --git a/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go b/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go deleted file mode 100644 index 819e27f860b..00000000000 --- a/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitroutestablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableSummaryListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/predicates.go b/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/predicates.go new file mode 100644 index 00000000000..1d9991e4b00 --- /dev/null +++ b/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/predicates.go @@ -0,0 +1,37 @@ +package expressroutecircuitroutestablesummary + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitRoutesTableSummaryOperationPredicate struct { + As *int64 + Neighbor *string + StatePfxRcd *string + UpDown *string + V *int64 +} + +func (p ExpressRouteCircuitRoutesTableSummaryOperationPredicate) Matches(input ExpressRouteCircuitRoutesTableSummary) bool { + + if p.As != nil && (input.As == nil || *p.As != *input.As) { + return false + } + + if p.Neighbor != nil && (input.Neighbor == nil || *p.Neighbor != *input.Neighbor) { + return false + } + + if p.StatePfxRcd != nil && (input.StatePfxRcd == nil || *p.StatePfxRcd != *input.StatePfxRcd) { + return false + } + + if p.UpDown != nil && (input.UpDown == nil || *p.UpDown != *input.UpDown) { + return false + } + + if p.V != nil && (input.V == nil || *p.V != *input.V) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/README.md b/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/README.md index 9044b687486..2586a5023d4 100644 --- a/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/README.md +++ b/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecrossconnectionarptable.NewPeeringArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "arpTableValue") -if err := client.ExpressRouteCrossConnectionsListArpTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCrossConnectionsListArpTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCrossConnectionsListArpTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go b/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go index df9b8956dd5..93cb5d74c61 100644 --- a/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go +++ b/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go @@ -18,7 +18,12 @@ type ExpressRouteCrossConnectionsListArpTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsArpTableListResult + Model *[]ExpressRouteCircuitArpTable +} + +type ExpressRouteCrossConnectionsListArpTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitArpTable } // ExpressRouteCrossConnectionsListArpTable ... diff --git a/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go b/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go deleted file mode 100644 index 67147d0690b..00000000000 --- a/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsArpTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/predicates.go b/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/predicates.go new file mode 100644 index 00000000000..75df45b22f9 --- /dev/null +++ b/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/predicates.go @@ -0,0 +1,32 @@ +package expressroutecrossconnectionarptable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitArpTableOperationPredicate struct { + Age *int64 + IPAddress *string + Interface *string + MacAddress *string +} + +func (p ExpressRouteCircuitArpTableOperationPredicate) Matches(input ExpressRouteCircuitArpTable) bool { + + if p.Age != nil && (input.Age == nil || *p.Age != *input.Age) { + return false + } + + if p.IPAddress != nil && (input.IPAddress == nil || *p.IPAddress != *input.IPAddress) { + return false + } + + if p.Interface != nil && (input.Interface == nil || *p.Interface != *input.Interface) { + return false + } + + if p.MacAddress != nil && (input.MacAddress == nil || *p.MacAddress != *input.MacAddress) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/README.md b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/README.md index 30c9203af57..119d84f6ea6 100644 --- a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/README.md +++ b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecrossconnectionroutetable.NewExpressRouteCrossConnectionPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTableValue") -if err := client.ExpressRouteCrossConnectionsListRoutesTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCrossConnectionsListRoutesTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCrossConnectionsListRoutesTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go index ac9e91764e0..75e866bbea7 100644 --- a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go +++ b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go @@ -18,7 +18,12 @@ type ExpressRouteCrossConnectionsListRoutesTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsRoutesTableListResult + Model *[]ExpressRouteCircuitRoutesTable +} + +type ExpressRouteCrossConnectionsListRoutesTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitRoutesTable } // ExpressRouteCrossConnectionsListRoutesTable ... diff --git a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go deleted file mode 100644 index d42583463b3..00000000000 --- a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionroutetable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/predicates.go b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/predicates.go new file mode 100644 index 00000000000..2f1a6174bb4 --- /dev/null +++ b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/predicates.go @@ -0,0 +1,37 @@ +package expressroutecrossconnectionroutetable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitRoutesTableOperationPredicate struct { + LocPrf *string + Network *string + NextHop *string + Path *string + Weight *int64 +} + +func (p ExpressRouteCircuitRoutesTableOperationPredicate) Matches(input ExpressRouteCircuitRoutesTable) bool { + + if p.LocPrf != nil && (input.LocPrf == nil || *p.LocPrf != *input.LocPrf) { + return false + } + + if p.Network != nil && (input.Network == nil || *p.Network != *input.Network) { + return false + } + + if p.NextHop != nil && (input.NextHop == nil || *p.NextHop != *input.NextHop) { + return false + } + + if p.Path != nil && (input.Path == nil || *p.Path != *input.Path) { + return false + } + + if p.Weight != nil && (input.Weight == nil || *p.Weight != *input.Weight) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/README.md b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/README.md index e20f04edf38..5d1cd0fd863 100644 --- a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/README.md +++ b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecrossconnectionroutetablesummary.NewPeeringRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTablesSummaryValue") -if err := client.ExpressRouteCrossConnectionsListRoutesTableSummaryThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCrossConnectionsListRoutesTableSummary(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCrossConnectionsListRoutesTableSummaryComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go index 43874ea0bb9..06c63e507a1 100644 --- a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go +++ b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go @@ -18,7 +18,12 @@ type ExpressRouteCrossConnectionsListRoutesTableSummaryOperationResponse struct Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCrossConnectionsRoutesTableSummaryListResult + Model *[]ExpressRouteCrossConnectionRoutesTableSummary +} + +type ExpressRouteCrossConnectionsListRoutesTableSummaryCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCrossConnectionRoutesTableSummary } // ExpressRouteCrossConnectionsListRoutesTableSummary ... diff --git a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go deleted file mode 100644 index 21d57c1911b..00000000000 --- a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/predicates.go b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/predicates.go new file mode 100644 index 00000000000..8399718cebc --- /dev/null +++ b/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/predicates.go @@ -0,0 +1,32 @@ +package expressroutecrossconnectionroutetablesummary + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCrossConnectionRoutesTableSummaryOperationPredicate struct { + Asn *int64 + Neighbor *string + StateOrPrefixesReceived *string + UpDown *string +} + +func (p ExpressRouteCrossConnectionRoutesTableSummaryOperationPredicate) Matches(input ExpressRouteCrossConnectionRoutesTableSummary) bool { + + if p.Asn != nil && (input.Asn == nil || *p.Asn != *input.Asn) { + return false + } + + if p.Neighbor != nil && (input.Neighbor == nil || *p.Neighbor != *input.Neighbor) { + return false + } + + if p.StateOrPrefixesReceived != nil && (input.StateOrPrefixesReceived == nil || *p.StateOrPrefixesReceived != *input.StateOrPrefixesReceived) { + return false + } + + if p.UpDown != nil && (input.UpDown == nil || *p.UpDown != *input.UpDown) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-06-01/networkinterfaces/README.md b/resource-manager/network/2023-06-01/networkinterfaces/README.md index 828cb5f9beb..800f70a3438 100644 --- a/resource-manager/network/2023-06-01/networkinterfaces/README.md +++ b/resource-manager/network/2023-06-01/networkinterfaces/README.md @@ -88,9 +88,14 @@ if model := read.Model; model != nil { ctx := context.TODO() id := commonids.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") -if err := client.GetEffectiveRouteTableThenPoll(ctx, id); err != nil { +// alternatively `client.GetEffectiveRouteTable(ctx, id)` can be used to do batched pagination +items, err := client.GetEffectiveRouteTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` @@ -200,9 +205,14 @@ for _, item := range items { ctx := context.TODO() id := commonids.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") -if err := client.ListEffectiveNetworkSecurityGroupsThenPoll(ctx, id); err != nil { +// alternatively `client.ListEffectiveNetworkSecurityGroups(ctx, id)` can be used to do batched pagination +items, err := client.ListEffectiveNetworkSecurityGroupsComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-06-01/networkinterfaces/method_geteffectiveroutetable.go b/resource-manager/network/2023-06-01/networkinterfaces/method_geteffectiveroutetable.go index 02c2c417a3c..e64977d2735 100644 --- a/resource-manager/network/2023-06-01/networkinterfaces/method_geteffectiveroutetable.go +++ b/resource-manager/network/2023-06-01/networkinterfaces/method_geteffectiveroutetable.go @@ -19,7 +19,12 @@ type GetEffectiveRouteTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *EffectiveRouteListResult + Model *[]EffectiveRoute +} + +type GetEffectiveRouteTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []EffectiveRoute } // GetEffectiveRouteTable ... diff --git a/resource-manager/network/2023-06-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go b/resource-manager/network/2023-06-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go index 19670227bf1..50661e67194 100644 --- a/resource-manager/network/2023-06-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go +++ b/resource-manager/network/2023-06-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go @@ -19,7 +19,12 @@ type ListEffectiveNetworkSecurityGroupsOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *EffectiveNetworkSecurityGroupListResult + Model *[]EffectiveNetworkSecurityGroup +} + +type ListEffectiveNetworkSecurityGroupsCompleteResult struct { + LatestHttpResponse *http.Response + Items []EffectiveNetworkSecurityGroup } // ListEffectiveNetworkSecurityGroups ... diff --git a/resource-manager/network/2023-06-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go b/resource-manager/network/2023-06-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go deleted file mode 100644 index b8111a10fff..00000000000 --- a/resource-manager/network/2023-06-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityGroupListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-06-01/networkinterfaces/model_effectiveroutelistresult.go b/resource-manager/network/2023-06-01/networkinterfaces/model_effectiveroutelistresult.go deleted file mode 100644 index a3a975a8636..00000000000 --- a/resource-manager/network/2023-06-01/networkinterfaces/model_effectiveroutelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveRouteListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]EffectiveRoute `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-06-01/networkinterfaces/predicates.go b/resource-manager/network/2023-06-01/networkinterfaces/predicates.go index 1bdf1a16800..c58ed4a328b 100644 --- a/resource-manager/network/2023-06-01/networkinterfaces/predicates.go +++ b/resource-manager/network/2023-06-01/networkinterfaces/predicates.go @@ -3,6 +3,32 @@ package networkinterfaces // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type EffectiveNetworkSecurityGroupOperationPredicate struct { +} + +func (p EffectiveNetworkSecurityGroupOperationPredicate) Matches(input EffectiveNetworkSecurityGroup) bool { + + return true +} + +type EffectiveRouteOperationPredicate struct { + DisableBgpRoutePropagation *bool + Name *string +} + +func (p EffectiveRouteOperationPredicate) Matches(input EffectiveRoute) bool { + + if p.DisableBgpRoutePropagation != nil && (input.DisableBgpRoutePropagation == nil || *p.DisableBgpRoutePropagation != *input.DisableBgpRoutePropagation) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + return true +} + type LoadBalancerOperationPredicate struct { Etag *string Id *string diff --git a/resource-manager/network/2023-06-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go b/resource-manager/network/2023-06-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go index 8e6bf7989a9..c0872952086 100644 --- a/resource-manager/network/2023-06-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go +++ b/resource-manager/network/2023-06-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go @@ -19,12 +19,12 @@ type VirtualNetworksListDdosProtectionStatusOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]VirtualNetworkDdosProtectionStatusResult + Model *[]PublicIPDdosProtectionStatusResult } type VirtualNetworksListDdosProtectionStatusCompleteResult struct { LatestHttpResponse *http.Response - Items []VirtualNetworkDdosProtectionStatusResult + Items []PublicIPDdosProtectionStatusResult } type VirtualNetworksListDdosProtectionStatusOperationOptions struct { diff --git a/resource-manager/network/2023-06-01/virtualnetworks/model_virtualnetworkddosprotectionstatusresult.go b/resource-manager/network/2023-06-01/virtualnetworks/model_virtualnetworkddosprotectionstatusresult.go deleted file mode 100644 index dec4e865313..00000000000 --- a/resource-manager/network/2023-06-01/virtualnetworks/model_virtualnetworkddosprotectionstatusresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkDdosProtectionStatusResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]PublicIPDdosProtectionStatusResult `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-06-01/virtualnetworks/predicates.go b/resource-manager/network/2023-06-01/virtualnetworks/predicates.go index 4e467e7af4c..ae976386154 100644 --- a/resource-manager/network/2023-06-01/virtualnetworks/predicates.go +++ b/resource-manager/network/2023-06-01/virtualnetworks/predicates.go @@ -3,6 +3,29 @@ package virtualnetworks // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type PublicIPDdosProtectionStatusResultOperationPredicate struct { + DdosProtectionPlanId *string + PublicIPAddress *string + PublicIPAddressId *string +} + +func (p PublicIPDdosProtectionStatusResultOperationPredicate) Matches(input PublicIPDdosProtectionStatusResult) bool { + + if p.DdosProtectionPlanId != nil && (input.DdosProtectionPlanId == nil || *p.DdosProtectionPlanId != *input.DdosProtectionPlanId) { + return false + } + + if p.PublicIPAddress != nil && (input.PublicIPAddress == nil || *p.PublicIPAddress != *input.PublicIPAddress) { + return false + } + + if p.PublicIPAddressId != nil && (input.PublicIPAddressId == nil || *p.PublicIPAddressId != *input.PublicIPAddressId) { + return false + } + + return true +} + type ResourceNavigationLinkOperationPredicate struct { Etag *string Id *string @@ -92,19 +115,6 @@ func (p VirtualNetworkOperationPredicate) Matches(input VirtualNetwork) bool { return true } -type VirtualNetworkDdosProtectionStatusResultOperationPredicate struct { - NextLink *string -} - -func (p VirtualNetworkDdosProtectionStatusResultOperationPredicate) Matches(input VirtualNetworkDdosProtectionStatusResult) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} - type VirtualNetworkUsageOperationPredicate struct { CurrentValue *float64 Id *string diff --git a/resource-manager/network/2023-09-01/bastionhosts/method_disconnectactivesessions.go b/resource-manager/network/2023-09-01/bastionhosts/method_disconnectactivesessions.go index 5e04a28894d..3a130339543 100644 --- a/resource-manager/network/2023-09-01/bastionhosts/method_disconnectactivesessions.go +++ b/resource-manager/network/2023-09-01/bastionhosts/method_disconnectactivesessions.go @@ -15,12 +15,12 @@ import ( type DisconnectActiveSessionsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BastionSessionDeleteResult + Model *[]BastionSessionState } type DisconnectActiveSessionsCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionSessionDeleteResult + Items []BastionSessionState } // DisconnectActiveSessions ... @@ -50,7 +50,7 @@ func (c BastionHostsClient) DisconnectActiveSessions(ctx context.Context, id Bas } var values struct { - Values *[]BastionSessionDeleteResult `json:"value"` + Values *[]BastionSessionState `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BastionHostsClient) DisconnectActiveSessions(ctx context.Context, id Bas // DisconnectActiveSessionsComplete retrieves all the results into a single object func (c BastionHostsClient) DisconnectActiveSessionsComplete(ctx context.Context, id BastionHostId, input SessionIds) (DisconnectActiveSessionsCompleteResult, error) { - return c.DisconnectActiveSessionsCompleteMatchingPredicate(ctx, id, input, BastionSessionDeleteResultOperationPredicate{}) + return c.DisconnectActiveSessionsCompleteMatchingPredicate(ctx, id, input, BastionSessionStateOperationPredicate{}) } // DisconnectActiveSessionsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) DisconnectActiveSessionsCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input SessionIds, predicate BastionSessionDeleteResultOperationPredicate) (result DisconnectActiveSessionsCompleteResult, err error) { - items := make([]BastionSessionDeleteResult, 0) +func (c BastionHostsClient) DisconnectActiveSessionsCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input SessionIds, predicate BastionSessionStateOperationPredicate) (result DisconnectActiveSessionsCompleteResult, err error) { + items := make([]BastionSessionState, 0) resp, err := c.DisconnectActiveSessions(ctx, id, input) if err != nil { diff --git a/resource-manager/network/2023-09-01/bastionhosts/method_getactivesessions.go b/resource-manager/network/2023-09-01/bastionhosts/method_getactivesessions.go index 521be83f4a3..bc50f38fc50 100644 --- a/resource-manager/network/2023-09-01/bastionhosts/method_getactivesessions.go +++ b/resource-manager/network/2023-09-01/bastionhosts/method_getactivesessions.go @@ -18,12 +18,12 @@ type GetActiveSessionsOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]BastionActiveSessionListResult + Model *[]BastionActiveSession } type GetActiveSessionsCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionActiveSessionListResult + Items []BastionActiveSession } // GetActiveSessions ... diff --git a/resource-manager/network/2023-09-01/bastionhosts/method_getbastionshareablelink.go b/resource-manager/network/2023-09-01/bastionhosts/method_getbastionshareablelink.go index 361f8e95efd..1d277c1e88c 100644 --- a/resource-manager/network/2023-09-01/bastionhosts/method_getbastionshareablelink.go +++ b/resource-manager/network/2023-09-01/bastionhosts/method_getbastionshareablelink.go @@ -15,12 +15,12 @@ import ( type GetBastionShareableLinkOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type GetBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // GetBastionShareableLink ... @@ -50,7 +50,7 @@ func (c BastionHostsClient) GetBastionShareableLink(ctx context.Context, id Bast } var values struct { - Values *[]BastionShareableLinkListResult `json:"value"` + Values *[]BastionShareableLink `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BastionHostsClient) GetBastionShareableLink(ctx context.Context, id Bast // GetBastionShareableLinkComplete retrieves all the results into a single object func (c BastionHostsClient) GetBastionShareableLinkComplete(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (GetBastionShareableLinkCompleteResult, error) { - return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkListResultOperationPredicate{}) + return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkOperationPredicate{}) } // GetBastionShareableLinkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkListResultOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { - items := make([]BastionShareableLinkListResult, 0) +func (c BastionHostsClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { + items := make([]BastionShareableLink, 0) resp, err := c.GetBastionShareableLink(ctx, id, input) if err != nil { diff --git a/resource-manager/network/2023-09-01/bastionhosts/method_putbastionshareablelink.go b/resource-manager/network/2023-09-01/bastionhosts/method_putbastionshareablelink.go index 426b5e5ed0d..5f6e7438551 100644 --- a/resource-manager/network/2023-09-01/bastionhosts/method_putbastionshareablelink.go +++ b/resource-manager/network/2023-09-01/bastionhosts/method_putbastionshareablelink.go @@ -18,12 +18,12 @@ type PutBastionShareableLinkOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type PutBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // PutBastionShareableLink ... diff --git a/resource-manager/network/2023-09-01/bastionhosts/model_bastionactivesessionlistresult.go b/resource-manager/network/2023-09-01/bastionhosts/model_bastionactivesessionlistresult.go deleted file mode 100644 index 040f751576f..00000000000 --- a/resource-manager/network/2023-09-01/bastionhosts/model_bastionactivesessionlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionActiveSessionListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionActiveSession `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-09-01/bastionhosts/model_bastionsessiondeleteresult.go b/resource-manager/network/2023-09-01/bastionhosts/model_bastionsessiondeleteresult.go deleted file mode 100644 index 367468bd830..00000000000 --- a/resource-manager/network/2023-09-01/bastionhosts/model_bastionsessiondeleteresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionSessionDeleteResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionSessionState `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-09-01/bastionhosts/model_bastionshareablelinklistresult.go b/resource-manager/network/2023-09-01/bastionhosts/model_bastionshareablelinklistresult.go deleted file mode 100644 index d5263654771..00000000000 --- a/resource-manager/network/2023-09-01/bastionhosts/model_bastionshareablelinklistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionShareableLink `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-09-01/bastionhosts/predicates.go b/resource-manager/network/2023-09-01/bastionhosts/predicates.go index ce754ba4deb..3c3835a32d0 100644 --- a/resource-manager/network/2023-09-01/bastionhosts/predicates.go +++ b/resource-manager/network/2023-09-01/bastionhosts/predicates.go @@ -3,13 +3,58 @@ package bastionhosts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type BastionActiveSessionListResultOperationPredicate struct { - NextLink *string +type BastionActiveSessionOperationPredicate struct { + ResourceType *string + SessionDurationInMins *float64 + SessionId *string + StartTime *interface{} + TargetHostName *string + TargetIPAddress *string + TargetResourceGroup *string + TargetResourceId *string + TargetSubscriptionId *string + UserName *string } -func (p BastionActiveSessionListResultOperationPredicate) Matches(input BastionActiveSessionListResult) bool { +func (p BastionActiveSessionOperationPredicate) Matches(input BastionActiveSession) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ResourceType != nil && (input.ResourceType == nil || *p.ResourceType != *input.ResourceType) { + return false + } + + if p.SessionDurationInMins != nil && (input.SessionDurationInMins == nil || *p.SessionDurationInMins != *input.SessionDurationInMins) { + return false + } + + if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { + return false + } + + if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { + return false + } + + if p.TargetHostName != nil && (input.TargetHostName == nil || *p.TargetHostName != *input.TargetHostName) { + return false + } + + if p.TargetIPAddress != nil && (input.TargetIPAddress == nil || *p.TargetIPAddress != *input.TargetIPAddress) { + return false + } + + if p.TargetResourceGroup != nil && (input.TargetResourceGroup == nil || *p.TargetResourceGroup != *input.TargetResourceGroup) { + return false + } + + if p.TargetResourceId != nil && (input.TargetResourceId == nil || *p.TargetResourceId != *input.TargetResourceId) { + return false + } + + if p.TargetSubscriptionId != nil && (input.TargetSubscriptionId == nil || *p.TargetSubscriptionId != *input.TargetSubscriptionId) { + return false + } + + if p.UserName != nil && (input.UserName == nil || *p.UserName != *input.UserName) { return false } @@ -49,26 +94,46 @@ func (p BastionHostOperationPredicate) Matches(input BastionHost) bool { return true } -type BastionSessionDeleteResultOperationPredicate struct { - NextLink *string +type BastionSessionStateOperationPredicate struct { + Message *string + SessionId *string + State *string } -func (p BastionSessionDeleteResultOperationPredicate) Matches(input BastionSessionDeleteResult) bool { +func (p BastionSessionStateOperationPredicate) Matches(input BastionSessionState) bool { + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { + return false + } + + if p.State != nil && (input.State == nil || *p.State != *input.State) { return false } return true } -type BastionShareableLinkListResultOperationPredicate struct { - NextLink *string +type BastionShareableLinkOperationPredicate struct { + Bsl *string + CreatedAt *string + Message *string } -func (p BastionShareableLinkListResultOperationPredicate) Matches(input BastionShareableLinkListResult) bool { +func (p BastionShareableLinkOperationPredicate) Matches(input BastionShareableLink) bool { + + if p.Bsl != nil && (input.Bsl == nil || *p.Bsl != *input.Bsl) { + return false + } + + if p.CreatedAt != nil && (input.CreatedAt == nil || *p.CreatedAt != *input.CreatedAt) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { return false } diff --git a/resource-manager/network/2023-09-01/bastionshareablelink/method_getbastionshareablelink.go b/resource-manager/network/2023-09-01/bastionshareablelink/method_getbastionshareablelink.go index 6c322a71e98..689ab2d57fc 100644 --- a/resource-manager/network/2023-09-01/bastionshareablelink/method_getbastionshareablelink.go +++ b/resource-manager/network/2023-09-01/bastionshareablelink/method_getbastionshareablelink.go @@ -15,12 +15,12 @@ import ( type GetBastionShareableLinkOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type GetBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // GetBastionShareableLink ... @@ -50,7 +50,7 @@ func (c BastionShareableLinkClient) GetBastionShareableLink(ctx context.Context, } var values struct { - Values *[]BastionShareableLinkListResult `json:"value"` + Values *[]BastionShareableLink `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c BastionShareableLinkClient) GetBastionShareableLink(ctx context.Context, // GetBastionShareableLinkComplete retrieves all the results into a single object func (c BastionShareableLinkClient) GetBastionShareableLinkComplete(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (GetBastionShareableLinkCompleteResult, error) { - return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkListResultOperationPredicate{}) + return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkOperationPredicate{}) } // GetBastionShareableLinkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionShareableLinkClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkListResultOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { - items := make([]BastionShareableLinkListResult, 0) +func (c BastionShareableLinkClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { + items := make([]BastionShareableLink, 0) resp, err := c.GetBastionShareableLink(ctx, id, input) if err != nil { diff --git a/resource-manager/network/2023-09-01/bastionshareablelink/method_putbastionshareablelink.go b/resource-manager/network/2023-09-01/bastionshareablelink/method_putbastionshareablelink.go index e1d10e6ed89..bf85b28ee63 100644 --- a/resource-manager/network/2023-09-01/bastionshareablelink/method_putbastionshareablelink.go +++ b/resource-manager/network/2023-09-01/bastionshareablelink/method_putbastionshareablelink.go @@ -18,12 +18,12 @@ type PutBastionShareableLinkOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]BastionShareableLinkListResult + Model *[]BastionShareableLink } type PutBastionShareableLinkCompleteResult struct { LatestHttpResponse *http.Response - Items []BastionShareableLinkListResult + Items []BastionShareableLink } // PutBastionShareableLink ... diff --git a/resource-manager/network/2023-09-01/bastionshareablelink/model_bastionshareablelinklistresult.go b/resource-manager/network/2023-09-01/bastionshareablelink/model_bastionshareablelinklistresult.go deleted file mode 100644 index 63c56da1ac2..00000000000 --- a/resource-manager/network/2023-09-01/bastionshareablelink/model_bastionshareablelinklistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package bastionshareablelink - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]BastionShareableLink `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-09-01/bastionshareablelink/predicates.go b/resource-manager/network/2023-09-01/bastionshareablelink/predicates.go index d301a4812ab..15f07095262 100644 --- a/resource-manager/network/2023-09-01/bastionshareablelink/predicates.go +++ b/resource-manager/network/2023-09-01/bastionshareablelink/predicates.go @@ -3,13 +3,23 @@ package bastionshareablelink // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type BastionShareableLinkListResultOperationPredicate struct { - NextLink *string +type BastionShareableLinkOperationPredicate struct { + Bsl *string + CreatedAt *string + Message *string } -func (p BastionShareableLinkListResultOperationPredicate) Matches(input BastionShareableLinkListResult) bool { +func (p BastionShareableLinkOperationPredicate) Matches(input BastionShareableLink) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Bsl != nil && (input.Bsl == nil || *p.Bsl != *input.Bsl) { + return false + } + + if p.CreatedAt != nil && (input.CreatedAt == nil || *p.CreatedAt != *input.CreatedAt) { + return false + } + + if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { return false } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitarptable/README.md b/resource-manager/network/2023-09-01/expressroutecircuitarptable/README.md index 84ec5d2a14a..e6431732440 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitarptable/README.md +++ b/resource-manager/network/2023-09-01/expressroutecircuitarptable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecircuitarptable.NewArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "arpTableValue") -if err := client.ExpressRouteCircuitsListArpTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCircuitsListArpTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCircuitsListArpTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-09-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go b/resource-manager/network/2023-09-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go index f4fcf5e4935..6e9e9491ca8 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go @@ -18,7 +18,12 @@ type ExpressRouteCircuitsListArpTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsArpTableListResult + Model *[]ExpressRouteCircuitArpTable +} + +type ExpressRouteCircuitsListArpTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitArpTable } // ExpressRouteCircuitsListArpTable ... diff --git a/resource-manager/network/2023-09-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go b/resource-manager/network/2023-09-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go deleted file mode 100644 index a6f3b3f86f5..00000000000 --- a/resource-manager/network/2023-09-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsArpTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-09-01/expressroutecircuitarptable/predicates.go b/resource-manager/network/2023-09-01/expressroutecircuitarptable/predicates.go new file mode 100644 index 00000000000..4143b82875f --- /dev/null +++ b/resource-manager/network/2023-09-01/expressroutecircuitarptable/predicates.go @@ -0,0 +1,32 @@ +package expressroutecircuitarptable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitArpTableOperationPredicate struct { + Age *int64 + IPAddress *string + Interface *string + MacAddress *string +} + +func (p ExpressRouteCircuitArpTableOperationPredicate) Matches(input ExpressRouteCircuitArpTable) bool { + + if p.Age != nil && (input.Age == nil || *p.Age != *input.Age) { + return false + } + + if p.IPAddress != nil && (input.IPAddress == nil || *p.IPAddress != *input.IPAddress) { + return false + } + + if p.Interface != nil && (input.Interface == nil || *p.Interface != *input.Interface) { + return false + } + + if p.MacAddress != nil && (input.MacAddress == nil || *p.MacAddress != *input.MacAddress) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/README.md b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/README.md index fb122a2ba48..3511fb573c2 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/README.md +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecircuitroutestable.NewPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTableValue") -if err := client.ExpressRouteCircuitsListRoutesTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCircuitsListRoutesTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCircuitsListRoutesTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go index 2a47c72ab75..0d55eeb8353 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go @@ -18,7 +18,12 @@ type ExpressRouteCircuitsListRoutesTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsRoutesTableListResult + Model *[]ExpressRouteCircuitRoutesTable +} + +type ExpressRouteCircuitsListRoutesTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitRoutesTable } // ExpressRouteCircuitsListRoutesTable ... diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go deleted file mode 100644 index 7ff773de0b1..00000000000 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitroutestable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/predicates.go b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/predicates.go new file mode 100644 index 00000000000..81d29805310 --- /dev/null +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/predicates.go @@ -0,0 +1,37 @@ +package expressroutecircuitroutestable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitRoutesTableOperationPredicate struct { + LocPrf *string + Network *string + NextHop *string + Path *string + Weight *int64 +} + +func (p ExpressRouteCircuitRoutesTableOperationPredicate) Matches(input ExpressRouteCircuitRoutesTable) bool { + + if p.LocPrf != nil && (input.LocPrf == nil || *p.LocPrf != *input.LocPrf) { + return false + } + + if p.Network != nil && (input.Network == nil || *p.Network != *input.Network) { + return false + } + + if p.NextHop != nil && (input.NextHop == nil || *p.NextHop != *input.NextHop) { + return false + } + + if p.Path != nil && (input.Path == nil || *p.Path != *input.Path) { + return false + } + + if p.Weight != nil && (input.Weight == nil || *p.Weight != *input.Weight) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/README.md b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/README.md index 2c69d6f8d15..d30b56aa2bc 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/README.md +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecircuitroutestablesummary.NewRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTablesSummaryValue") -if err := client.ExpressRouteCircuitsListRoutesTableSummaryThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCircuitsListRoutesTableSummary(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCircuitsListRoutesTableSummaryComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go index b5f5dcefb38..200e1b6b1e8 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go @@ -18,7 +18,12 @@ type ExpressRouteCircuitsListRoutesTableSummaryOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsRoutesTableSummaryListResult + Model *[]ExpressRouteCircuitRoutesTableSummary +} + +type ExpressRouteCircuitsListRoutesTableSummaryCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitRoutesTableSummary } // ExpressRouteCircuitsListRoutesTableSummary ... diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go deleted file mode 100644 index 819e27f860b..00000000000 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitroutestablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableSummaryListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/predicates.go b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/predicates.go new file mode 100644 index 00000000000..1d9991e4b00 --- /dev/null +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/predicates.go @@ -0,0 +1,37 @@ +package expressroutecircuitroutestablesummary + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitRoutesTableSummaryOperationPredicate struct { + As *int64 + Neighbor *string + StatePfxRcd *string + UpDown *string + V *int64 +} + +func (p ExpressRouteCircuitRoutesTableSummaryOperationPredicate) Matches(input ExpressRouteCircuitRoutesTableSummary) bool { + + if p.As != nil && (input.As == nil || *p.As != *input.As) { + return false + } + + if p.Neighbor != nil && (input.Neighbor == nil || *p.Neighbor != *input.Neighbor) { + return false + } + + if p.StatePfxRcd != nil && (input.StatePfxRcd == nil || *p.StatePfxRcd != *input.StatePfxRcd) { + return false + } + + if p.UpDown != nil && (input.UpDown == nil || *p.UpDown != *input.UpDown) { + return false + } + + if p.V != nil && (input.V == nil || *p.V != *input.V) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/README.md b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/README.md index 19b63fa3c50..3b8bad8a686 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/README.md +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecrossconnectionarptable.NewPeeringArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "arpTableValue") -if err := client.ExpressRouteCrossConnectionsListArpTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCrossConnectionsListArpTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCrossConnectionsListArpTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go index df9b8956dd5..93cb5d74c61 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go @@ -18,7 +18,12 @@ type ExpressRouteCrossConnectionsListArpTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsArpTableListResult + Model *[]ExpressRouteCircuitArpTable +} + +type ExpressRouteCrossConnectionsListArpTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitArpTable } // ExpressRouteCrossConnectionsListArpTable ... diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go deleted file mode 100644 index 67147d0690b..00000000000 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsArpTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/predicates.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/predicates.go new file mode 100644 index 00000000000..75df45b22f9 --- /dev/null +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/predicates.go @@ -0,0 +1,32 @@ +package expressroutecrossconnectionarptable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitArpTableOperationPredicate struct { + Age *int64 + IPAddress *string + Interface *string + MacAddress *string +} + +func (p ExpressRouteCircuitArpTableOperationPredicate) Matches(input ExpressRouteCircuitArpTable) bool { + + if p.Age != nil && (input.Age == nil || *p.Age != *input.Age) { + return false + } + + if p.IPAddress != nil && (input.IPAddress == nil || *p.IPAddress != *input.IPAddress) { + return false + } + + if p.Interface != nil && (input.Interface == nil || *p.Interface != *input.Interface) { + return false + } + + if p.MacAddress != nil && (input.MacAddress == nil || *p.MacAddress != *input.MacAddress) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/README.md b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/README.md index b81f2335ba2..1b18a5f7b3b 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/README.md +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecrossconnectionroutetable.NewExpressRouteCrossConnectionPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTableValue") -if err := client.ExpressRouteCrossConnectionsListRoutesTableThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCrossConnectionsListRoutesTable(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCrossConnectionsListRoutesTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go index ac9e91764e0..75e866bbea7 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go @@ -18,7 +18,12 @@ type ExpressRouteCrossConnectionsListRoutesTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCircuitsRoutesTableListResult + Model *[]ExpressRouteCircuitRoutesTable +} + +type ExpressRouteCrossConnectionsListRoutesTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCircuitRoutesTable } // ExpressRouteCrossConnectionsListRoutesTable ... diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go deleted file mode 100644 index d42583463b3..00000000000 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionroutetable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/predicates.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/predicates.go new file mode 100644 index 00000000000..2f1a6174bb4 --- /dev/null +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/predicates.go @@ -0,0 +1,37 @@ +package expressroutecrossconnectionroutetable + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCircuitRoutesTableOperationPredicate struct { + LocPrf *string + Network *string + NextHop *string + Path *string + Weight *int64 +} + +func (p ExpressRouteCircuitRoutesTableOperationPredicate) Matches(input ExpressRouteCircuitRoutesTable) bool { + + if p.LocPrf != nil && (input.LocPrf == nil || *p.LocPrf != *input.LocPrf) { + return false + } + + if p.Network != nil && (input.Network == nil || *p.Network != *input.Network) { + return false + } + + if p.NextHop != nil && (input.NextHop == nil || *p.NextHop != *input.NextHop) { + return false + } + + if p.Path != nil && (input.Path == nil || *p.Path != *input.Path) { + return false + } + + if p.Weight != nil && (input.Weight == nil || *p.Weight != *input.Weight) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/README.md b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/README.md index 5a2b6b9d350..ad4913f4d9e 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/README.md +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/README.md @@ -26,7 +26,12 @@ client.Client.Authorizer = authorizer ctx := context.TODO() id := expressroutecrossconnectionroutetablesummary.NewPeeringRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTablesSummaryValue") -if err := client.ExpressRouteCrossConnectionsListRoutesTableSummaryThenPoll(ctx, id); err != nil { +// alternatively `client.ExpressRouteCrossConnectionsListRoutesTableSummary(ctx, id)` can be used to do batched pagination +items, err := client.ExpressRouteCrossConnectionsListRoutesTableSummaryComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go index 43874ea0bb9..06c63e507a1 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go @@ -18,7 +18,12 @@ type ExpressRouteCrossConnectionsListRoutesTableSummaryOperationResponse struct Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *ExpressRouteCrossConnectionsRoutesTableSummaryListResult + Model *[]ExpressRouteCrossConnectionRoutesTableSummary +} + +type ExpressRouteCrossConnectionsListRoutesTableSummaryCompleteResult struct { + LatestHttpResponse *http.Response + Items []ExpressRouteCrossConnectionRoutesTableSummary } // ExpressRouteCrossConnectionsListRoutesTableSummary ... diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go deleted file mode 100644 index 21d57c1911b..00000000000 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/predicates.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/predicates.go new file mode 100644 index 00000000000..8399718cebc --- /dev/null +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/predicates.go @@ -0,0 +1,32 @@ +package expressroutecrossconnectionroutetablesummary + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressRouteCrossConnectionRoutesTableSummaryOperationPredicate struct { + Asn *int64 + Neighbor *string + StateOrPrefixesReceived *string + UpDown *string +} + +func (p ExpressRouteCrossConnectionRoutesTableSummaryOperationPredicate) Matches(input ExpressRouteCrossConnectionRoutesTableSummary) bool { + + if p.Asn != nil && (input.Asn == nil || *p.Asn != *input.Asn) { + return false + } + + if p.Neighbor != nil && (input.Neighbor == nil || *p.Neighbor != *input.Neighbor) { + return false + } + + if p.StateOrPrefixesReceived != nil && (input.StateOrPrefixesReceived == nil || *p.StateOrPrefixesReceived != *input.StateOrPrefixesReceived) { + return false + } + + if p.UpDown != nil && (input.UpDown == nil || *p.UpDown != *input.UpDown) { + return false + } + + return true +} diff --git a/resource-manager/network/2023-09-01/networkinterfaces/README.md b/resource-manager/network/2023-09-01/networkinterfaces/README.md index 33a20f18404..dba7103c76f 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/README.md +++ b/resource-manager/network/2023-09-01/networkinterfaces/README.md @@ -88,9 +88,14 @@ if model := read.Model; model != nil { ctx := context.TODO() id := commonids.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") -if err := client.GetEffectiveRouteTableThenPoll(ctx, id); err != nil { +// alternatively `client.GetEffectiveRouteTable(ctx, id)` can be used to do batched pagination +items, err := client.GetEffectiveRouteTableComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` @@ -200,9 +205,14 @@ for _, item := range items { ctx := context.TODO() id := commonids.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") -if err := client.ListEffectiveNetworkSecurityGroupsThenPoll(ctx, id); err != nil { +// alternatively `client.ListEffectiveNetworkSecurityGroups(ctx, id)` can be used to do batched pagination +items, err := client.ListEffectiveNetworkSecurityGroupsComplete(ctx, id) +if err != nil { // handle the error } +for _, item := range items { + // do something +} ``` diff --git a/resource-manager/network/2023-09-01/networkinterfaces/method_geteffectiveroutetable.go b/resource-manager/network/2023-09-01/networkinterfaces/method_geteffectiveroutetable.go index 02c2c417a3c..e64977d2735 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/method_geteffectiveroutetable.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/method_geteffectiveroutetable.go @@ -19,7 +19,12 @@ type GetEffectiveRouteTableOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *EffectiveRouteListResult + Model *[]EffectiveRoute +} + +type GetEffectiveRouteTableCompleteResult struct { + LatestHttpResponse *http.Response + Items []EffectiveRoute } // GetEffectiveRouteTable ... diff --git a/resource-manager/network/2023-09-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go b/resource-manager/network/2023-09-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go index 19670227bf1..50661e67194 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go @@ -19,7 +19,12 @@ type ListEffectiveNetworkSecurityGroupsOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *EffectiveNetworkSecurityGroupListResult + Model *[]EffectiveNetworkSecurityGroup +} + +type ListEffectiveNetworkSecurityGroupsCompleteResult struct { + LatestHttpResponse *http.Response + Items []EffectiveNetworkSecurityGroup } // ListEffectiveNetworkSecurityGroups ... diff --git a/resource-manager/network/2023-09-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go b/resource-manager/network/2023-09-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go deleted file mode 100644 index b8111a10fff..00000000000 --- a/resource-manager/network/2023-09-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityGroupListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-09-01/networkinterfaces/model_effectiveroutelistresult.go b/resource-manager/network/2023-09-01/networkinterfaces/model_effectiveroutelistresult.go deleted file mode 100644 index a3a975a8636..00000000000 --- a/resource-manager/network/2023-09-01/networkinterfaces/model_effectiveroutelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveRouteListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]EffectiveRoute `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-09-01/networkinterfaces/predicates.go b/resource-manager/network/2023-09-01/networkinterfaces/predicates.go index 1bdf1a16800..c58ed4a328b 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/predicates.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/predicates.go @@ -3,6 +3,32 @@ package networkinterfaces // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type EffectiveNetworkSecurityGroupOperationPredicate struct { +} + +func (p EffectiveNetworkSecurityGroupOperationPredicate) Matches(input EffectiveNetworkSecurityGroup) bool { + + return true +} + +type EffectiveRouteOperationPredicate struct { + DisableBgpRoutePropagation *bool + Name *string +} + +func (p EffectiveRouteOperationPredicate) Matches(input EffectiveRoute) bool { + + if p.DisableBgpRoutePropagation != nil && (input.DisableBgpRoutePropagation == nil || *p.DisableBgpRoutePropagation != *input.DisableBgpRoutePropagation) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + return true +} + type LoadBalancerOperationPredicate struct { Etag *string Id *string diff --git a/resource-manager/network/2023-09-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go b/resource-manager/network/2023-09-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go index 8e6bf7989a9..c0872952086 100644 --- a/resource-manager/network/2023-09-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go +++ b/resource-manager/network/2023-09-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go @@ -19,12 +19,12 @@ type VirtualNetworksListDdosProtectionStatusOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]VirtualNetworkDdosProtectionStatusResult + Model *[]PublicIPDdosProtectionStatusResult } type VirtualNetworksListDdosProtectionStatusCompleteResult struct { LatestHttpResponse *http.Response - Items []VirtualNetworkDdosProtectionStatusResult + Items []PublicIPDdosProtectionStatusResult } type VirtualNetworksListDdosProtectionStatusOperationOptions struct { diff --git a/resource-manager/network/2023-09-01/virtualnetworks/model_virtualnetworkddosprotectionstatusresult.go b/resource-manager/network/2023-09-01/virtualnetworks/model_virtualnetworkddosprotectionstatusresult.go deleted file mode 100644 index dec4e865313..00000000000 --- a/resource-manager/network/2023-09-01/virtualnetworks/model_virtualnetworkddosprotectionstatusresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkDdosProtectionStatusResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]PublicIPDdosProtectionStatusResult `json:"value,omitempty"` -} diff --git a/resource-manager/network/2023-09-01/virtualnetworks/predicates.go b/resource-manager/network/2023-09-01/virtualnetworks/predicates.go index 4e467e7af4c..ae976386154 100644 --- a/resource-manager/network/2023-09-01/virtualnetworks/predicates.go +++ b/resource-manager/network/2023-09-01/virtualnetworks/predicates.go @@ -3,6 +3,29 @@ package virtualnetworks // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type PublicIPDdosProtectionStatusResultOperationPredicate struct { + DdosProtectionPlanId *string + PublicIPAddress *string + PublicIPAddressId *string +} + +func (p PublicIPDdosProtectionStatusResultOperationPredicate) Matches(input PublicIPDdosProtectionStatusResult) bool { + + if p.DdosProtectionPlanId != nil && (input.DdosProtectionPlanId == nil || *p.DdosProtectionPlanId != *input.DdosProtectionPlanId) { + return false + } + + if p.PublicIPAddress != nil && (input.PublicIPAddress == nil || *p.PublicIPAddress != *input.PublicIPAddress) { + return false + } + + if p.PublicIPAddressId != nil && (input.PublicIPAddressId == nil || *p.PublicIPAddressId != *input.PublicIPAddressId) { + return false + } + + return true +} + type ResourceNavigationLinkOperationPredicate struct { Etag *string Id *string @@ -92,19 +115,6 @@ func (p VirtualNetworkOperationPredicate) Matches(input VirtualNetwork) bool { return true } -type VirtualNetworkDdosProtectionStatusResultOperationPredicate struct { - NextLink *string -} - -func (p VirtualNetworkDdosProtectionStatusResultOperationPredicate) Matches(input VirtualNetworkDdosProtectionStatusResult) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} - type VirtualNetworkUsageOperationPredicate struct { CurrentValue *float64 Id *string diff --git a/resource-manager/newrelic/2022-07-01/monitors/method_listappservices.go b/resource-manager/newrelic/2022-07-01/monitors/method_listappservices.go index d60440e8cfa..8200b38dd56 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/method_listappservices.go +++ b/resource-manager/newrelic/2022-07-01/monitors/method_listappservices.go @@ -15,12 +15,12 @@ import ( type ListAppServicesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]AppServicesListResponse + Model *[]AppServiceInfo } type ListAppServicesCompleteResult struct { LatestHttpResponse *http.Response - Items []AppServicesListResponse + Items []AppServiceInfo } // ListAppServices ... @@ -50,7 +50,7 @@ func (c MonitorsClient) ListAppServices(ctx context.Context, id MonitorId, input } var values struct { - Values *[]AppServicesListResponse `json:"value"` + Values *[]AppServiceInfo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitorsClient) ListAppServices(ctx context.Context, id MonitorId, input // ListAppServicesComplete retrieves all the results into a single object func (c MonitorsClient) ListAppServicesComplete(ctx context.Context, id MonitorId, input AppServicesGetRequest) (ListAppServicesCompleteResult, error) { - return c.ListAppServicesCompleteMatchingPredicate(ctx, id, input, AppServicesListResponseOperationPredicate{}) + return c.ListAppServicesCompleteMatchingPredicate(ctx, id, input, AppServiceInfoOperationPredicate{}) } // ListAppServicesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListAppServicesCompleteMatchingPredicate(ctx context.Context, id MonitorId, input AppServicesGetRequest, predicate AppServicesListResponseOperationPredicate) (result ListAppServicesCompleteResult, err error) { - items := make([]AppServicesListResponse, 0) +func (c MonitorsClient) ListAppServicesCompleteMatchingPredicate(ctx context.Context, id MonitorId, input AppServicesGetRequest, predicate AppServiceInfoOperationPredicate) (result ListAppServicesCompleteResult, err error) { + items := make([]AppServiceInfo, 0) resp, err := c.ListAppServices(ctx, id, input) if err != nil { diff --git a/resource-manager/newrelic/2022-07-01/monitors/method_listhosts.go b/resource-manager/newrelic/2022-07-01/monitors/method_listhosts.go index 00865a8ef75..0c1dd3ac7d0 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/method_listhosts.go +++ b/resource-manager/newrelic/2022-07-01/monitors/method_listhosts.go @@ -15,12 +15,12 @@ import ( type ListHostsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]VMHostsListResponse + Model *[]VMInfo } type ListHostsCompleteResult struct { LatestHttpResponse *http.Response - Items []VMHostsListResponse + Items []VMInfo } // ListHosts ... @@ -50,7 +50,7 @@ func (c MonitorsClient) ListHosts(ctx context.Context, id MonitorId, input Hosts } var values struct { - Values *[]VMHostsListResponse `json:"value"` + Values *[]VMInfo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitorsClient) ListHosts(ctx context.Context, id MonitorId, input Hosts // ListHostsComplete retrieves all the results into a single object func (c MonitorsClient) ListHostsComplete(ctx context.Context, id MonitorId, input HostsGetRequest) (ListHostsCompleteResult, error) { - return c.ListHostsCompleteMatchingPredicate(ctx, id, input, VMHostsListResponseOperationPredicate{}) + return c.ListHostsCompleteMatchingPredicate(ctx, id, input, VMInfoOperationPredicate{}) } // ListHostsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, input HostsGetRequest, predicate VMHostsListResponseOperationPredicate) (result ListHostsCompleteResult, err error) { - items := make([]VMHostsListResponse, 0) +func (c MonitorsClient) ListHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, input HostsGetRequest, predicate VMInfoOperationPredicate) (result ListHostsCompleteResult, err error) { + items := make([]VMInfo, 0) resp, err := c.ListHosts(ctx, id, input) if err != nil { diff --git a/resource-manager/newrelic/2022-07-01/monitors/method_listmonitoredresources.go b/resource-manager/newrelic/2022-07-01/monitors/method_listmonitoredresources.go index f07487bed4f..4013a474495 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/method_listmonitoredresources.go +++ b/resource-manager/newrelic/2022-07-01/monitors/method_listmonitoredresources.go @@ -15,12 +15,12 @@ import ( type ListMonitoredResourcesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]MonitoredResourceListResponse + Model *[]MonitoredResource } type ListMonitoredResourcesCompleteResult struct { LatestHttpResponse *http.Response - Items []MonitoredResourceListResponse + Items []MonitoredResource } // ListMonitoredResources ... @@ -50,7 +50,7 @@ func (c MonitorsClient) ListMonitoredResources(ctx context.Context, id MonitorId } var values struct { - Values *[]MonitoredResourceListResponse `json:"value"` + Values *[]MonitoredResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c MonitorsClient) ListMonitoredResources(ctx context.Context, id MonitorId // ListMonitoredResourcesComplete retrieves all the results into a single object func (c MonitorsClient) ListMonitoredResourcesComplete(ctx context.Context, id MonitorId) (ListMonitoredResourcesCompleteResult, error) { - return c.ListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceListResponseOperationPredicate{}) + return c.ListMonitoredResourcesCompleteMatchingPredicate(ctx, id, MonitoredResourceOperationPredicate{}) } // ListMonitoredResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c MonitorsClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceListResponseOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error) { - items := make([]MonitoredResourceListResponse, 0) +func (c MonitorsClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error) { + items := make([]MonitoredResource, 0) resp, err := c.ListMonitoredResources(ctx, id) if err != nil { diff --git a/resource-manager/newrelic/2022-07-01/monitors/model_appserviceslistresponse.go b/resource-manager/newrelic/2022-07-01/monitors/model_appserviceslistresponse.go deleted file mode 100644 index 09f4d555ead..00000000000 --- a/resource-manager/newrelic/2022-07-01/monitors/model_appserviceslistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AppServicesListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []AppServiceInfo `json:"value"` -} diff --git a/resource-manager/newrelic/2022-07-01/monitors/model_monitoredresourcelistresponse.go b/resource-manager/newrelic/2022-07-01/monitors/model_monitoredresourcelistresponse.go deleted file mode 100644 index 021a5392972..00000000000 --- a/resource-manager/newrelic/2022-07-01/monitors/model_monitoredresourcelistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MonitoredResourceListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []MonitoredResource `json:"value"` -} diff --git a/resource-manager/newrelic/2022-07-01/monitors/model_vmhostslistresponse.go b/resource-manager/newrelic/2022-07-01/monitors/model_vmhostslistresponse.go deleted file mode 100644 index a1ff50863b8..00000000000 --- a/resource-manager/newrelic/2022-07-01/monitors/model_vmhostslistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package monitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VMHostsListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []VMInfo `json:"value"` -} diff --git a/resource-manager/newrelic/2022-07-01/monitors/predicates.go b/resource-manager/newrelic/2022-07-01/monitors/predicates.go index 62276a50904..1d292bb5e54 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/predicates.go +++ b/resource-manager/newrelic/2022-07-01/monitors/predicates.go @@ -3,26 +3,46 @@ package monitors // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type AppServicesListResponseOperationPredicate struct { - NextLink *string +type AppServiceInfoOperationPredicate struct { + AgentStatus *string + AgentVersion *string + AzureResourceId *string } -func (p AppServicesListResponseOperationPredicate) Matches(input AppServicesListResponse) bool { +func (p AppServiceInfoOperationPredicate) Matches(input AppServiceInfo) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.AgentStatus != nil && (input.AgentStatus == nil || *p.AgentStatus != *input.AgentStatus) { + return false + } + + if p.AgentVersion != nil && (input.AgentVersion == nil || *p.AgentVersion != *input.AgentVersion) { + return false + } + + if p.AzureResourceId != nil && (input.AzureResourceId == nil || *p.AzureResourceId != *input.AzureResourceId) { return false } return true } -type MonitoredResourceListResponseOperationPredicate struct { - NextLink *string +type MonitoredResourceOperationPredicate struct { + Id *string + ReasonForLogsStatus *string + ReasonForMetricsStatus *string } -func (p MonitoredResourceListResponseOperationPredicate) Matches(input MonitoredResourceListResponse) bool { +func (p MonitoredResourceOperationPredicate) Matches(input MonitoredResource) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ReasonForLogsStatus != nil && (input.ReasonForLogsStatus == nil || *p.ReasonForLogsStatus != *input.ReasonForLogsStatus) { + return false + } + + if p.ReasonForMetricsStatus != nil && (input.ReasonForMetricsStatus == nil || *p.ReasonForMetricsStatus != *input.ReasonForMetricsStatus) { return false } @@ -57,13 +77,23 @@ func (p NewRelicMonitorResourceOperationPredicate) Matches(input NewRelicMonitor return true } -type VMHostsListResponseOperationPredicate struct { - NextLink *string +type VMInfoOperationPredicate struct { + AgentStatus *string + AgentVersion *string + VMId *string } -func (p VMHostsListResponseOperationPredicate) Matches(input VMHostsListResponse) bool { +func (p VMInfoOperationPredicate) Matches(input VMInfo) bool { + + if p.AgentStatus != nil && (input.AgentStatus == nil || *p.AgentStatus != *input.AgentStatus) { + return false + } + + if p.AgentVersion != nil && (input.AgentVersion == nil || *p.AgentVersion != *input.AgentVersion) { + return false + } - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.VMId != nil && (input.VMId == nil || *p.VMId != *input.VMId) { return false } diff --git a/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriessearch.go b/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriessearch.go index 4384e141dc6..2c6b7b7d682 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriessearch.go +++ b/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriessearch.go @@ -15,12 +15,12 @@ import ( type QueriesSearchOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]LogAnalyticsQueryPackQueryListResult + Model *[]LogAnalyticsQueryPackQuery } type QueriesSearchCompleteResult struct { LatestHttpResponse *http.Response - Items []LogAnalyticsQueryPackQueryListResult + Items []LogAnalyticsQueryPackQuery } type QueriesSearchOperationOptions struct { @@ -82,7 +82,7 @@ func (c QueryPackQueriesClient) QueriesSearch(ctx context.Context, id QueryPackI } var values struct { - Values *[]LogAnalyticsQueryPackQueryListResult `json:"value"` + Values *[]LogAnalyticsQueryPackQuery `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -95,12 +95,12 @@ func (c QueryPackQueriesClient) QueriesSearch(ctx context.Context, id QueryPackI // QueriesSearchComplete retrieves all the results into a single object func (c QueryPackQueriesClient) QueriesSearchComplete(ctx context.Context, id QueryPackId, input LogAnalyticsQueryPackQuerySearchProperties, options QueriesSearchOperationOptions) (QueriesSearchCompleteResult, error) { - return c.QueriesSearchCompleteMatchingPredicate(ctx, id, input, options, LogAnalyticsQueryPackQueryListResultOperationPredicate{}) + return c.QueriesSearchCompleteMatchingPredicate(ctx, id, input, options, LogAnalyticsQueryPackQueryOperationPredicate{}) } // QueriesSearchCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c QueryPackQueriesClient) QueriesSearchCompleteMatchingPredicate(ctx context.Context, id QueryPackId, input LogAnalyticsQueryPackQuerySearchProperties, options QueriesSearchOperationOptions, predicate LogAnalyticsQueryPackQueryListResultOperationPredicate) (result QueriesSearchCompleteResult, err error) { - items := make([]LogAnalyticsQueryPackQueryListResult, 0) +func (c QueryPackQueriesClient) QueriesSearchCompleteMatchingPredicate(ctx context.Context, id QueryPackId, input LogAnalyticsQueryPackQuerySearchProperties, options QueriesSearchOperationOptions, predicate LogAnalyticsQueryPackQueryOperationPredicate) (result QueriesSearchCompleteResult, err error) { + items := make([]LogAnalyticsQueryPackQuery, 0) resp, err := c.QueriesSearch(ctx, id, input, options) if err != nil { diff --git a/resource-manager/operationalinsights/2019-09-01/querypackqueries/model_loganalyticsquerypackquerylistresult.go b/resource-manager/operationalinsights/2019-09-01/querypackqueries/model_loganalyticsquerypackquerylistresult.go deleted file mode 100644 index f66d06cc0da..00000000000 --- a/resource-manager/operationalinsights/2019-09-01/querypackqueries/model_loganalyticsquerypackquerylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package querypackqueries - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LogAnalyticsQueryPackQueryListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value []LogAnalyticsQueryPackQuery `json:"value"` -} diff --git a/resource-manager/operationalinsights/2019-09-01/querypackqueries/predicates.go b/resource-manager/operationalinsights/2019-09-01/querypackqueries/predicates.go index 0970db8c998..38fda83f51a 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypackqueries/predicates.go +++ b/resource-manager/operationalinsights/2019-09-01/querypackqueries/predicates.go @@ -25,16 +25,3 @@ func (p LogAnalyticsQueryPackQueryOperationPredicate) Matches(input LogAnalytics return true } - -type LogAnalyticsQueryPackQueryListResultOperationPredicate struct { - NextLink *string -} - -func (p LogAnalyticsQueryPackQueryListResultOperationPredicate) Matches(input LogAnalyticsQueryPackQueryListResult) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} diff --git a/resource-manager/orbital/2022-11-01/contact/method_spacecraftslistavailablecontacts.go b/resource-manager/orbital/2022-11-01/contact/method_spacecraftslistavailablecontacts.go index fe1ca8d51c9..f062347bb12 100644 --- a/resource-manager/orbital/2022-11-01/contact/method_spacecraftslistavailablecontacts.go +++ b/resource-manager/orbital/2022-11-01/contact/method_spacecraftslistavailablecontacts.go @@ -18,12 +18,12 @@ type SpacecraftsListAvailableContactsOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]AvailableContactsListResult + Model *[]AvailableContacts } type SpacecraftsListAvailableContactsCompleteResult struct { LatestHttpResponse *http.Response - Items []AvailableContactsListResult + Items []AvailableContacts } // SpacecraftsListAvailableContacts ... diff --git a/resource-manager/orbital/2022-11-01/contact/model_availablecontactslistresult.go b/resource-manager/orbital/2022-11-01/contact/model_availablecontactslistresult.go deleted file mode 100644 index cea3e3e0290..00000000000 --- a/resource-manager/orbital/2022-11-01/contact/model_availablecontactslistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package contact - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableContactsListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]AvailableContacts `json:"value,omitempty"` -} diff --git a/resource-manager/orbital/2022-11-01/contact/predicates.go b/resource-manager/orbital/2022-11-01/contact/predicates.go index e320b483ae9..03e7171175f 100644 --- a/resource-manager/orbital/2022-11-01/contact/predicates.go +++ b/resource-manager/orbital/2022-11-01/contact/predicates.go @@ -3,13 +3,13 @@ package contact // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type AvailableContactsListResultOperationPredicate struct { - NextLink *string +type AvailableContactsOperationPredicate struct { + GroundStationName *string } -func (p AvailableContactsListResultOperationPredicate) Matches(input AvailableContactsListResult) bool { +func (p AvailableContactsOperationPredicate) Matches(input AvailableContacts) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.GroundStationName != nil && (input.GroundStationName == nil || *p.GroundStationName != *input.GroundStationName) { return false } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/README.md b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/README.md index 95a66d46893..f8603bc901e 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/README.md @@ -116,12 +116,13 @@ for _, item := range items { ctx := context.TODO() id := globalrulestack.NewGlobalRulestackID("globalRulestackValue") -read, err := client.ListAdvancedSecurityObjects(ctx, id, globalrulestack.DefaultListAdvancedSecurityObjectsOperationOptions()) +// alternatively `client.ListAdvancedSecurityObjects(ctx, id, globalrulestack.DefaultListAdvancedSecurityObjectsOperationOptions())` can be used to do batched pagination +items, err := client.ListAdvancedSecurityObjectsComplete(ctx, id, globalrulestack.DefaultListAdvancedSecurityObjectsOperationOptions()) 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 } ``` @@ -132,12 +133,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := globalrulestack.NewGlobalRulestackID("globalRulestackValue") -read, err := client.ListAppIds(ctx, id, globalrulestack.DefaultListAppIdsOperationOptions()) +// alternatively `client.ListAppIds(ctx, id, globalrulestack.DefaultListAppIdsOperationOptions())` can be used to do batched pagination +items, err := client.ListAppIdsComplete(ctx, id, globalrulestack.DefaultListAppIdsOperationOptions()) 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 } ``` @@ -148,12 +150,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := globalrulestack.NewGlobalRulestackID("globalRulestackValue") -read, err := client.ListCountries(ctx, id, globalrulestack.DefaultListCountriesOperationOptions()) +// alternatively `client.ListCountries(ctx, id, globalrulestack.DefaultListCountriesOperationOptions())` can be used to do batched pagination +items, err := client.ListCountriesComplete(ctx, id, globalrulestack.DefaultListCountriesOperationOptions()) 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 } ``` @@ -164,12 +167,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := globalrulestack.NewGlobalRulestackID("globalRulestackValue") -read, err := client.ListFirewalls(ctx, id) +// alternatively `client.ListFirewalls(ctx, id)` can be used to do batched pagination +items, err := client.ListFirewallsComplete(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 } ``` @@ -180,12 +184,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := globalrulestack.NewGlobalRulestackID("globalRulestackValue") -read, err := client.ListPredefinedUrlCategories(ctx, id, globalrulestack.DefaultListPredefinedUrlCategoriesOperationOptions()) +// alternatively `client.ListPredefinedUrlCategories(ctx, id, globalrulestack.DefaultListPredefinedUrlCategoriesOperationOptions())` can be used to do batched pagination +items, err := client.ListPredefinedUrlCategoriesComplete(ctx, id, globalrulestack.DefaultListPredefinedUrlCategoriesOperationOptions()) 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 } ``` @@ -196,12 +201,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := globalrulestack.NewGlobalRulestackID("globalRulestackValue") -read, err := client.ListSecurityServices(ctx, id, globalrulestack.DefaultListSecurityServicesOperationOptions()) +// alternatively `client.ListSecurityServices(ctx, id, globalrulestack.DefaultListSecurityServicesOperationOptions())` can be used to do batched pagination +items, err := client.ListSecurityServicesComplete(ctx, id, globalrulestack.DefaultListSecurityServicesOperationOptions()) 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/paloaltonetworks/2022-08-29/globalrulestack/method_listadvancedsecurityobjects.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listadvancedsecurityobjects.go index b12b091468a..ce0529a5885 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listadvancedsecurityobjects.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listadvancedsecurityobjects.go @@ -15,7 +15,12 @@ import ( type ListAdvancedSecurityObjectsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AdvSecurityObjectListResponse + Model *[]AdvSecurityObjectModel +} + +type ListAdvancedSecurityObjectsCompleteResult struct { + LatestHttpResponse *http.Response + Items []AdvSecurityObjectModel } type ListAdvancedSecurityObjectsOperationOptions struct { @@ -71,7 +76,7 @@ func (c GlobalRulestackClient) ListAdvancedSecurityObjects(ctx context.Context, } 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 @@ -80,12 +85,43 @@ func (c GlobalRulestackClient) ListAdvancedSecurityObjects(ctx context.Context, return } - var model AdvSecurityObjectListResponse - result.Model = &model + var values struct { + Values *[]AdvSecurityObjectModel `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListAdvancedSecurityObjectsComplete retrieves all the results into a single object +func (c GlobalRulestackClient) ListAdvancedSecurityObjectsComplete(ctx context.Context, id GlobalRulestackId, options ListAdvancedSecurityObjectsOperationOptions) (ListAdvancedSecurityObjectsCompleteResult, error) { + return c.ListAdvancedSecurityObjectsCompleteMatchingPredicate(ctx, id, options, AdvSecurityObjectModelOperationPredicate{}) +} + +// ListAdvancedSecurityObjectsCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c GlobalRulestackClient) ListAdvancedSecurityObjectsCompleteMatchingPredicate(ctx context.Context, id GlobalRulestackId, options ListAdvancedSecurityObjectsOperationOptions, predicate AdvSecurityObjectModelOperationPredicate) (result ListAdvancedSecurityObjectsCompleteResult, err error) { + items := make([]AdvSecurityObjectModel, 0) + + resp, err := c.ListAdvancedSecurityObjects(ctx, id, options) + if err != nil { + 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 = ListAdvancedSecurityObjectsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listappids.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listappids.go index 7022114a714..e30c1a901ff 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listappids.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listappids.go @@ -15,7 +15,12 @@ import ( type ListAppIdsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ListAppIdResponse + Model *[]string +} + +type ListAppIdsCompleteResult struct { + LatestHttpResponse *http.Response + Items []string } type ListAppIdsOperationOptions struct { @@ -75,7 +80,7 @@ func (c GlobalRulestackClient) ListAppIds(ctx context.Context, id GlobalRulestac } 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 @@ -84,12 +89,36 @@ func (c GlobalRulestackClient) ListAppIds(ctx context.Context, id GlobalRulestac return } - var model ListAppIdResponse - result.Model = &model + var values struct { + Values *[]string `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListAppIdsComplete retrieves all the results into a single object +func (c GlobalRulestackClient) ListAppIdsComplete(ctx context.Context, id GlobalRulestackId, options ListAppIdsOperationOptions) (result ListAppIdsCompleteResult, err error) { + items := make([]string, 0) + + resp, err := c.ListAppIds(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) return } + if resp.Model != nil { + for _, v := range *resp.Model { + items = append(items, v) + } + } + result = ListAppIdsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listcountries.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listcountries.go index b5f21c03649..919c25a0722 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listcountries.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listcountries.go @@ -15,7 +15,12 @@ import ( type ListCountriesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *CountriesResponse + Model *[]Country +} + +type ListCountriesCompleteResult struct { + LatestHttpResponse *http.Response + Items []Country } type ListCountriesOperationOptions struct { @@ -67,7 +72,7 @@ func (c GlobalRulestackClient) ListCountries(ctx context.Context, id GlobalRules } 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 @@ -76,12 +81,43 @@ func (c GlobalRulestackClient) ListCountries(ctx context.Context, id GlobalRules return } - var model CountriesResponse - result.Model = &model + var values struct { + Values *[]Country `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListCountriesComplete retrieves all the results into a single object +func (c GlobalRulestackClient) ListCountriesComplete(ctx context.Context, id GlobalRulestackId, options ListCountriesOperationOptions) (ListCountriesCompleteResult, error) { + return c.ListCountriesCompleteMatchingPredicate(ctx, id, options, CountryOperationPredicate{}) +} + +// ListCountriesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c GlobalRulestackClient) ListCountriesCompleteMatchingPredicate(ctx context.Context, id GlobalRulestackId, options ListCountriesOperationOptions, predicate CountryOperationPredicate) (result ListCountriesCompleteResult, err error) { + items := make([]Country, 0) + + resp, err := c.ListCountries(ctx, id, options) + if err != nil { + 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 = ListCountriesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listfirewalls.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listfirewalls.go index 2047ead29e5..da258ebabca 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listfirewalls.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listfirewalls.go @@ -15,7 +15,12 @@ import ( type ListFirewallsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ListFirewallsResponse + Model *[]string +} + +type ListFirewallsCompleteResult struct { + LatestHttpResponse *http.Response + Items []string } // ListFirewalls ... @@ -35,7 +40,7 @@ func (c GlobalRulestackClient) ListFirewalls(ctx context.Context, id GlobalRules } 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,12 +49,36 @@ func (c GlobalRulestackClient) ListFirewalls(ctx context.Context, id GlobalRules return } - var model ListFirewallsResponse - result.Model = &model + var values struct { + Values *[]string `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListFirewallsComplete retrieves all the results into a single object +func (c GlobalRulestackClient) ListFirewallsComplete(ctx context.Context, id GlobalRulestackId) (result ListFirewallsCompleteResult, err error) { + items := make([]string, 0) + + resp, err := c.ListFirewalls(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) return } + if resp.Model != nil { + for _, v := range *resp.Model { + items = append(items, v) + } + } + result = ListFirewallsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listpredefinedurlcategories.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listpredefinedurlcategories.go index 5c71dce8d3b..45f47cf3d4e 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listpredefinedurlcategories.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listpredefinedurlcategories.go @@ -15,7 +15,12 @@ import ( type ListPredefinedUrlCategoriesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *PredefinedUrlCategoriesResponse + Model *[]PredefinedUrlCategory +} + +type ListPredefinedUrlCategoriesCompleteResult struct { + LatestHttpResponse *http.Response + Items []PredefinedUrlCategory } type ListPredefinedUrlCategoriesOperationOptions struct { @@ -67,7 +72,7 @@ func (c GlobalRulestackClient) ListPredefinedUrlCategories(ctx context.Context, } 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 @@ -76,12 +81,43 @@ func (c GlobalRulestackClient) ListPredefinedUrlCategories(ctx context.Context, return } - var model PredefinedUrlCategoriesResponse - result.Model = &model + var values struct { + Values *[]PredefinedUrlCategory `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListPredefinedUrlCategoriesComplete retrieves all the results into a single object +func (c GlobalRulestackClient) ListPredefinedUrlCategoriesComplete(ctx context.Context, id GlobalRulestackId, options ListPredefinedUrlCategoriesOperationOptions) (ListPredefinedUrlCategoriesCompleteResult, error) { + return c.ListPredefinedUrlCategoriesCompleteMatchingPredicate(ctx, id, options, PredefinedUrlCategoryOperationPredicate{}) +} + +// ListPredefinedUrlCategoriesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c GlobalRulestackClient) ListPredefinedUrlCategoriesCompleteMatchingPredicate(ctx context.Context, id GlobalRulestackId, options ListPredefinedUrlCategoriesOperationOptions, predicate PredefinedUrlCategoryOperationPredicate) (result ListPredefinedUrlCategoriesCompleteResult, err error) { + items := make([]PredefinedUrlCategory, 0) + + resp, err := c.ListPredefinedUrlCategories(ctx, id, options) + if err != nil { + 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 = ListPredefinedUrlCategoriesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listsecurityservices.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listsecurityservices.go index cc474d0ea89..d1f16b56ace 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listsecurityservices.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listsecurityservices.go @@ -15,7 +15,12 @@ import ( type ListSecurityServicesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityServicesResponse + Model *[]SecurityServicesTypeList +} + +type ListSecurityServicesCompleteResult struct { + LatestHttpResponse *http.Response + Items []SecurityServicesTypeList } type ListSecurityServicesOperationOptions struct { @@ -71,7 +76,7 @@ func (c GlobalRulestackClient) ListSecurityServices(ctx context.Context, id Glob } 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 @@ -80,12 +85,43 @@ func (c GlobalRulestackClient) ListSecurityServices(ctx context.Context, id Glob return } - var model SecurityServicesResponse - result.Model = &model + var values struct { + Values *[]SecurityServicesTypeList `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListSecurityServicesComplete retrieves all the results into a single object +func (c GlobalRulestackClient) ListSecurityServicesComplete(ctx context.Context, id GlobalRulestackId, options ListSecurityServicesOperationOptions) (ListSecurityServicesCompleteResult, error) { + return c.ListSecurityServicesCompleteMatchingPredicate(ctx, id, options, SecurityServicesTypeListOperationPredicate{}) +} + +// ListSecurityServicesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c GlobalRulestackClient) ListSecurityServicesCompleteMatchingPredicate(ctx context.Context, id GlobalRulestackId, options ListSecurityServicesOperationOptions, predicate SecurityServicesTypeListOperationPredicate) (result ListSecurityServicesCompleteResult, err error) { + items := make([]SecurityServicesTypeList, 0) + + resp, err := c.ListSecurityServices(ctx, id, options) + if err != nil { + 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 = ListSecurityServicesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_advsecurityobjectlistresponse.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_advsecurityobjectlistresponse.go deleted file mode 100644 index d3479336290..00000000000 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_advsecurityobjectlistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package globalrulestack - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdvSecurityObjectListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value AdvSecurityObjectModel `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_countriesresponse.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_countriesresponse.go deleted file mode 100644 index bbba6198fde..00000000000 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_countriesresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package globalrulestack - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CountriesResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []Country `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_listappidresponse.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_listappidresponse.go deleted file mode 100644 index 8108dc1d6e8..00000000000 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_listappidresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package globalrulestack - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAppIdResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []string `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_listfirewallsresponse.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_listfirewallsresponse.go deleted file mode 100644 index 834bc924529..00000000000 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_listfirewallsresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package globalrulestack - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListFirewallsResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []string `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_predefinedurlcategoriesresponse.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_predefinedurlcategoriesresponse.go deleted file mode 100644 index 6019172078d..00000000000 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_predefinedurlcategoriesresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package globalrulestack - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PredefinedUrlCategoriesResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []PredefinedUrlCategory `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_securityservicesresponse.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_securityservicesresponse.go deleted file mode 100644 index eba4c866545..00000000000 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/model_securityservicesresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package globalrulestack - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityServicesResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value SecurityServicesTypeList `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/predicates.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/predicates.go index 4def7f37ff9..7d929b1268a 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/predicates.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/predicates.go @@ -3,6 +3,37 @@ package globalrulestack // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type AdvSecurityObjectModelOperationPredicate struct { + Type *string +} + +func (p AdvSecurityObjectModelOperationPredicate) Matches(input AdvSecurityObjectModel) bool { + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type CountryOperationPredicate struct { + Code *string + Description *string +} + +func (p CountryOperationPredicate) Matches(input Country) bool { + + if p.Code != nil && *p.Code != input.Code { + return false + } + + if p.Description != nil && (input.Description == nil || *p.Description != *input.Description) { + return false + } + + return true +} + type GlobalRulestackResourceOperationPredicate struct { Id *string Location *string @@ -30,3 +61,34 @@ func (p GlobalRulestackResourceOperationPredicate) Matches(input GlobalRulestack return true } + +type PredefinedUrlCategoryOperationPredicate struct { + Action *string + Name *string +} + +func (p PredefinedUrlCategoryOperationPredicate) Matches(input PredefinedUrlCategory) bool { + + if p.Action != nil && *p.Action != input.Action { + return false + } + + if p.Name != nil && *p.Name != input.Name { + return false + } + + return true +} + +type SecurityServicesTypeListOperationPredicate struct { + Type *string +} + +func (p SecurityServicesTypeListOperationPredicate) Matches(input SecurityServicesTypeList) bool { + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/README.md b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/README.md index cdaf397cf29..04e98f282e2 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/README.md @@ -116,12 +116,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := localrulestacks.NewLocalRulestackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRulestackValue") -read, err := client.ListAdvancedSecurityObjects(ctx, id, localrulestacks.DefaultListAdvancedSecurityObjectsOperationOptions()) +// alternatively `client.ListAdvancedSecurityObjects(ctx, id, localrulestacks.DefaultListAdvancedSecurityObjectsOperationOptions())` can be used to do batched pagination +items, err := client.ListAdvancedSecurityObjectsComplete(ctx, id, localrulestacks.DefaultListAdvancedSecurityObjectsOperationOptions()) 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 } ``` @@ -132,12 +133,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := localrulestacks.NewLocalRulestackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRulestackValue") -read, err := client.ListAppIds(ctx, id, localrulestacks.DefaultListAppIdsOperationOptions()) +// alternatively `client.ListAppIds(ctx, id, localrulestacks.DefaultListAppIdsOperationOptions())` can be used to do batched pagination +items, err := client.ListAppIdsComplete(ctx, id, localrulestacks.DefaultListAppIdsOperationOptions()) 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 } ``` @@ -182,12 +184,13 @@ for _, item := range items { ctx := context.TODO() id := localrulestacks.NewLocalRulestackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRulestackValue") -read, err := client.ListCountries(ctx, id, localrulestacks.DefaultListCountriesOperationOptions()) +// alternatively `client.ListCountries(ctx, id, localrulestacks.DefaultListCountriesOperationOptions())` can be used to do batched pagination +items, err := client.ListCountriesComplete(ctx, id, localrulestacks.DefaultListCountriesOperationOptions()) 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 } ``` @@ -198,12 +201,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := localrulestacks.NewLocalRulestackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRulestackValue") -read, err := client.ListFirewalls(ctx, id) +// alternatively `client.ListFirewalls(ctx, id)` can be used to do batched pagination +items, err := client.ListFirewallsComplete(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 } ``` @@ -214,12 +218,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := localrulestacks.NewLocalRulestackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRulestackValue") -read, err := client.ListPredefinedUrlCategories(ctx, id, localrulestacks.DefaultListPredefinedUrlCategoriesOperationOptions()) +// alternatively `client.ListPredefinedUrlCategories(ctx, id, localrulestacks.DefaultListPredefinedUrlCategoriesOperationOptions())` can be used to do batched pagination +items, err := client.ListPredefinedUrlCategoriesComplete(ctx, id, localrulestacks.DefaultListPredefinedUrlCategoriesOperationOptions()) 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 } ``` @@ -230,12 +235,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := localrulestacks.NewLocalRulestackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRulestackValue") -read, err := client.ListSecurityServices(ctx, id, localrulestacks.DefaultListSecurityServicesOperationOptions()) +// alternatively `client.ListSecurityServices(ctx, id, localrulestacks.DefaultListSecurityServicesOperationOptions())` can be used to do batched pagination +items, err := client.ListSecurityServicesComplete(ctx, id, localrulestacks.DefaultListSecurityServicesOperationOptions()) 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/paloaltonetworks/2022-08-29/localrulestacks/method_listadvancedsecurityobjects.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listadvancedsecurityobjects.go index d685c0fd0f0..dcbd69ff588 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listadvancedsecurityobjects.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listadvancedsecurityobjects.go @@ -15,7 +15,12 @@ import ( type ListAdvancedSecurityObjectsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AdvSecurityObjectListResponse + Model *[]AdvSecurityObjectModel +} + +type ListAdvancedSecurityObjectsCompleteResult struct { + LatestHttpResponse *http.Response + Items []AdvSecurityObjectModel } type ListAdvancedSecurityObjectsOperationOptions struct { @@ -71,7 +76,7 @@ func (c LocalRulestacksClient) ListAdvancedSecurityObjects(ctx context.Context, } 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 @@ -80,12 +85,43 @@ func (c LocalRulestacksClient) ListAdvancedSecurityObjects(ctx context.Context, return } - var model AdvSecurityObjectListResponse - result.Model = &model + var values struct { + Values *[]AdvSecurityObjectModel `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListAdvancedSecurityObjectsComplete retrieves all the results into a single object +func (c LocalRulestacksClient) ListAdvancedSecurityObjectsComplete(ctx context.Context, id LocalRulestackId, options ListAdvancedSecurityObjectsOperationOptions) (ListAdvancedSecurityObjectsCompleteResult, error) { + return c.ListAdvancedSecurityObjectsCompleteMatchingPredicate(ctx, id, options, AdvSecurityObjectModelOperationPredicate{}) +} + +// ListAdvancedSecurityObjectsCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c LocalRulestacksClient) ListAdvancedSecurityObjectsCompleteMatchingPredicate(ctx context.Context, id LocalRulestackId, options ListAdvancedSecurityObjectsOperationOptions, predicate AdvSecurityObjectModelOperationPredicate) (result ListAdvancedSecurityObjectsCompleteResult, err error) { + items := make([]AdvSecurityObjectModel, 0) + + resp, err := c.ListAdvancedSecurityObjects(ctx, id, options) + if err != nil { + 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 = ListAdvancedSecurityObjectsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listappids.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listappids.go index 7ec3529e421..40184fe35aa 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listappids.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listappids.go @@ -15,7 +15,12 @@ import ( type ListAppIdsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ListAppIdResponse + Model *[]string +} + +type ListAppIdsCompleteResult struct { + LatestHttpResponse *http.Response + Items []string } type ListAppIdsOperationOptions struct { @@ -75,7 +80,7 @@ func (c LocalRulestacksClient) ListAppIds(ctx context.Context, id LocalRulestack } 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 @@ -84,12 +89,36 @@ func (c LocalRulestacksClient) ListAppIds(ctx context.Context, id LocalRulestack return } - var model ListAppIdResponse - result.Model = &model + var values struct { + Values *[]string `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListAppIdsComplete retrieves all the results into a single object +func (c LocalRulestacksClient) ListAppIdsComplete(ctx context.Context, id LocalRulestackId, options ListAppIdsOperationOptions) (result ListAppIdsCompleteResult, err error) { + items := make([]string, 0) + + resp, err := c.ListAppIds(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) return } + if resp.Model != nil { + for _, v := range *resp.Model { + items = append(items, v) + } + } + result = ListAppIdsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listcountries.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listcountries.go index 392a4e379fd..e6d06792a3f 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listcountries.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listcountries.go @@ -15,7 +15,12 @@ import ( type ListCountriesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *CountriesResponse + Model *[]Country +} + +type ListCountriesCompleteResult struct { + LatestHttpResponse *http.Response + Items []Country } type ListCountriesOperationOptions struct { @@ -67,7 +72,7 @@ func (c LocalRulestacksClient) ListCountries(ctx context.Context, id LocalRulest } 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 @@ -76,12 +81,43 @@ func (c LocalRulestacksClient) ListCountries(ctx context.Context, id LocalRulest return } - var model CountriesResponse - result.Model = &model + var values struct { + Values *[]Country `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListCountriesComplete retrieves all the results into a single object +func (c LocalRulestacksClient) ListCountriesComplete(ctx context.Context, id LocalRulestackId, options ListCountriesOperationOptions) (ListCountriesCompleteResult, error) { + return c.ListCountriesCompleteMatchingPredicate(ctx, id, options, CountryOperationPredicate{}) +} + +// ListCountriesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c LocalRulestacksClient) ListCountriesCompleteMatchingPredicate(ctx context.Context, id LocalRulestackId, options ListCountriesOperationOptions, predicate CountryOperationPredicate) (result ListCountriesCompleteResult, err error) { + items := make([]Country, 0) + + resp, err := c.ListCountries(ctx, id, options) + if err != nil { + 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 = ListCountriesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listfirewalls.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listfirewalls.go index 6fb93d86fb0..510f5a7de86 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listfirewalls.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listfirewalls.go @@ -15,7 +15,12 @@ import ( type ListFirewallsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ListFirewallsResponse + Model *[]string +} + +type ListFirewallsCompleteResult struct { + LatestHttpResponse *http.Response + Items []string } // ListFirewalls ... @@ -35,7 +40,7 @@ func (c LocalRulestacksClient) ListFirewalls(ctx context.Context, id LocalRulest } 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,12 +49,36 @@ func (c LocalRulestacksClient) ListFirewalls(ctx context.Context, id LocalRulest return } - var model ListFirewallsResponse - result.Model = &model + var values struct { + Values *[]string `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListFirewallsComplete retrieves all the results into a single object +func (c LocalRulestacksClient) ListFirewallsComplete(ctx context.Context, id LocalRulestackId) (result ListFirewallsCompleteResult, err error) { + items := make([]string, 0) + + resp, err := c.ListFirewalls(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) return } + if resp.Model != nil { + for _, v := range *resp.Model { + items = append(items, v) + } + } + result = ListFirewallsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listpredefinedurlcategories.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listpredefinedurlcategories.go index ef710ee1585..4382b0e2c42 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listpredefinedurlcategories.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listpredefinedurlcategories.go @@ -15,7 +15,12 @@ import ( type ListPredefinedUrlCategoriesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *PredefinedUrlCategoriesResponse + Model *[]PredefinedUrlCategory +} + +type ListPredefinedUrlCategoriesCompleteResult struct { + LatestHttpResponse *http.Response + Items []PredefinedUrlCategory } type ListPredefinedUrlCategoriesOperationOptions struct { @@ -67,7 +72,7 @@ func (c LocalRulestacksClient) ListPredefinedUrlCategories(ctx context.Context, } 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 @@ -76,12 +81,43 @@ func (c LocalRulestacksClient) ListPredefinedUrlCategories(ctx context.Context, return } - var model PredefinedUrlCategoriesResponse - result.Model = &model + var values struct { + Values *[]PredefinedUrlCategory `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListPredefinedUrlCategoriesComplete retrieves all the results into a single object +func (c LocalRulestacksClient) ListPredefinedUrlCategoriesComplete(ctx context.Context, id LocalRulestackId, options ListPredefinedUrlCategoriesOperationOptions) (ListPredefinedUrlCategoriesCompleteResult, error) { + return c.ListPredefinedUrlCategoriesCompleteMatchingPredicate(ctx, id, options, PredefinedUrlCategoryOperationPredicate{}) +} + +// ListPredefinedUrlCategoriesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c LocalRulestacksClient) ListPredefinedUrlCategoriesCompleteMatchingPredicate(ctx context.Context, id LocalRulestackId, options ListPredefinedUrlCategoriesOperationOptions, predicate PredefinedUrlCategoryOperationPredicate) (result ListPredefinedUrlCategoriesCompleteResult, err error) { + items := make([]PredefinedUrlCategory, 0) + + resp, err := c.ListPredefinedUrlCategories(ctx, id, options) + if err != nil { + 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 = ListPredefinedUrlCategoriesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listsecurityservices.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listsecurityservices.go index ff27121983a..2406a80dbf3 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listsecurityservices.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listsecurityservices.go @@ -15,7 +15,12 @@ import ( type ListSecurityServicesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityServicesResponse + Model *[]SecurityServicesTypeList +} + +type ListSecurityServicesCompleteResult struct { + LatestHttpResponse *http.Response + Items []SecurityServicesTypeList } type ListSecurityServicesOperationOptions struct { @@ -71,7 +76,7 @@ func (c LocalRulestacksClient) ListSecurityServices(ctx context.Context, id Loca } 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 @@ -80,12 +85,43 @@ func (c LocalRulestacksClient) ListSecurityServices(ctx context.Context, id Loca return } - var model SecurityServicesResponse - result.Model = &model + var values struct { + Values *[]SecurityServicesTypeList `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListSecurityServicesComplete retrieves all the results into a single object +func (c LocalRulestacksClient) ListSecurityServicesComplete(ctx context.Context, id LocalRulestackId, options ListSecurityServicesOperationOptions) (ListSecurityServicesCompleteResult, error) { + return c.ListSecurityServicesCompleteMatchingPredicate(ctx, id, options, SecurityServicesTypeListOperationPredicate{}) +} + +// ListSecurityServicesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c LocalRulestacksClient) ListSecurityServicesCompleteMatchingPredicate(ctx context.Context, id LocalRulestackId, options ListSecurityServicesOperationOptions, predicate SecurityServicesTypeListOperationPredicate) (result ListSecurityServicesCompleteResult, err error) { + items := make([]SecurityServicesTypeList, 0) + + resp, err := c.ListSecurityServices(ctx, id, options) + if err != nil { + 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 = ListSecurityServicesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_advsecurityobjectlistresponse.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_advsecurityobjectlistresponse.go deleted file mode 100644 index 7083081ce6a..00000000000 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_advsecurityobjectlistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package localrulestacks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdvSecurityObjectListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value AdvSecurityObjectModel `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_countriesresponse.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_countriesresponse.go deleted file mode 100644 index 999b9369521..00000000000 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_countriesresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package localrulestacks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CountriesResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []Country `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_listappidresponse.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_listappidresponse.go deleted file mode 100644 index ecd57332236..00000000000 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_listappidresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package localrulestacks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAppIdResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []string `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_listfirewallsresponse.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_listfirewallsresponse.go deleted file mode 100644 index 20317400492..00000000000 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_listfirewallsresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package localrulestacks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListFirewallsResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []string `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_predefinedurlcategoriesresponse.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_predefinedurlcategoriesresponse.go deleted file mode 100644 index 431ded3781f..00000000000 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_predefinedurlcategoriesresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package localrulestacks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PredefinedUrlCategoriesResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []PredefinedUrlCategory `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_securityservicesresponse.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_securityservicesresponse.go deleted file mode 100644 index f5518fa0252..00000000000 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/model_securityservicesresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package localrulestacks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityServicesResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value SecurityServicesTypeList `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/predicates.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/predicates.go index cd3ed0fbd13..82fa87587c5 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/predicates.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/predicates.go @@ -3,6 +3,37 @@ package localrulestacks // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type AdvSecurityObjectModelOperationPredicate struct { + Type *string +} + +func (p AdvSecurityObjectModelOperationPredicate) Matches(input AdvSecurityObjectModel) bool { + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type CountryOperationPredicate struct { + Code *string + Description *string +} + +func (p CountryOperationPredicate) Matches(input Country) bool { + + if p.Code != nil && *p.Code != input.Code { + return false + } + + if p.Description != nil && (input.Description == nil || *p.Description != *input.Description) { + return false + } + + return true +} + type LocalRulestackResourceOperationPredicate struct { Id *string Location *string @@ -30,3 +61,34 @@ func (p LocalRulestackResourceOperationPredicate) Matches(input LocalRulestackRe return true } + +type PredefinedUrlCategoryOperationPredicate struct { + Action *string + Name *string +} + +func (p PredefinedUrlCategoryOperationPredicate) Matches(input PredefinedUrlCategory) bool { + + if p.Action != nil && *p.Action != input.Action { + return false + } + + if p.Name != nil && *p.Name != input.Name { + return false + } + + return true +} + +type SecurityServicesTypeListOperationPredicate struct { + Type *string +} + +func (p SecurityServicesTypeListOperationPredicate) Matches(input SecurityServicesTypeList) bool { + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/README.md b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/README.md index 6726672781e..46abea79046 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/README.md @@ -116,12 +116,13 @@ for _, item := range items { ctx := context.TODO() id := globalrulestack.NewGlobalRulestackID("globalRulestackValue") -read, err := client.ListAdvancedSecurityObjects(ctx, id, globalrulestack.DefaultListAdvancedSecurityObjectsOperationOptions()) +// alternatively `client.ListAdvancedSecurityObjects(ctx, id, globalrulestack.DefaultListAdvancedSecurityObjectsOperationOptions())` can be used to do batched pagination +items, err := client.ListAdvancedSecurityObjectsComplete(ctx, id, globalrulestack.DefaultListAdvancedSecurityObjectsOperationOptions()) 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 } ``` @@ -132,12 +133,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := globalrulestack.NewGlobalRulestackID("globalRulestackValue") -read, err := client.ListAppIds(ctx, id, globalrulestack.DefaultListAppIdsOperationOptions()) +// alternatively `client.ListAppIds(ctx, id, globalrulestack.DefaultListAppIdsOperationOptions())` can be used to do batched pagination +items, err := client.ListAppIdsComplete(ctx, id, globalrulestack.DefaultListAppIdsOperationOptions()) 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 } ``` @@ -148,12 +150,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := globalrulestack.NewGlobalRulestackID("globalRulestackValue") -read, err := client.ListCountries(ctx, id, globalrulestack.DefaultListCountriesOperationOptions()) +// alternatively `client.ListCountries(ctx, id, globalrulestack.DefaultListCountriesOperationOptions())` can be used to do batched pagination +items, err := client.ListCountriesComplete(ctx, id, globalrulestack.DefaultListCountriesOperationOptions()) 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 } ``` @@ -164,12 +167,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := globalrulestack.NewGlobalRulestackID("globalRulestackValue") -read, err := client.ListFirewalls(ctx, id) +// alternatively `client.ListFirewalls(ctx, id)` can be used to do batched pagination +items, err := client.ListFirewallsComplete(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 } ``` @@ -180,12 +184,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := globalrulestack.NewGlobalRulestackID("globalRulestackValue") -read, err := client.ListPredefinedUrlCategories(ctx, id, globalrulestack.DefaultListPredefinedUrlCategoriesOperationOptions()) +// alternatively `client.ListPredefinedUrlCategories(ctx, id, globalrulestack.DefaultListPredefinedUrlCategoriesOperationOptions())` can be used to do batched pagination +items, err := client.ListPredefinedUrlCategoriesComplete(ctx, id, globalrulestack.DefaultListPredefinedUrlCategoriesOperationOptions()) 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 } ``` @@ -196,12 +201,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := globalrulestack.NewGlobalRulestackID("globalRulestackValue") -read, err := client.ListSecurityServices(ctx, id, globalrulestack.DefaultListSecurityServicesOperationOptions()) +// alternatively `client.ListSecurityServices(ctx, id, globalrulestack.DefaultListSecurityServicesOperationOptions())` can be used to do batched pagination +items, err := client.ListSecurityServicesComplete(ctx, id, globalrulestack.DefaultListSecurityServicesOperationOptions()) 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/paloaltonetworks/2023-09-01/globalrulestack/method_listadvancedsecurityobjects.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listadvancedsecurityobjects.go index b12b091468a..ce0529a5885 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listadvancedsecurityobjects.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listadvancedsecurityobjects.go @@ -15,7 +15,12 @@ import ( type ListAdvancedSecurityObjectsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AdvSecurityObjectListResponse + Model *[]AdvSecurityObjectModel +} + +type ListAdvancedSecurityObjectsCompleteResult struct { + LatestHttpResponse *http.Response + Items []AdvSecurityObjectModel } type ListAdvancedSecurityObjectsOperationOptions struct { @@ -71,7 +76,7 @@ func (c GlobalRulestackClient) ListAdvancedSecurityObjects(ctx context.Context, } 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 @@ -80,12 +85,43 @@ func (c GlobalRulestackClient) ListAdvancedSecurityObjects(ctx context.Context, return } - var model AdvSecurityObjectListResponse - result.Model = &model + var values struct { + Values *[]AdvSecurityObjectModel `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListAdvancedSecurityObjectsComplete retrieves all the results into a single object +func (c GlobalRulestackClient) ListAdvancedSecurityObjectsComplete(ctx context.Context, id GlobalRulestackId, options ListAdvancedSecurityObjectsOperationOptions) (ListAdvancedSecurityObjectsCompleteResult, error) { + return c.ListAdvancedSecurityObjectsCompleteMatchingPredicate(ctx, id, options, AdvSecurityObjectModelOperationPredicate{}) +} + +// ListAdvancedSecurityObjectsCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c GlobalRulestackClient) ListAdvancedSecurityObjectsCompleteMatchingPredicate(ctx context.Context, id GlobalRulestackId, options ListAdvancedSecurityObjectsOperationOptions, predicate AdvSecurityObjectModelOperationPredicate) (result ListAdvancedSecurityObjectsCompleteResult, err error) { + items := make([]AdvSecurityObjectModel, 0) + + resp, err := c.ListAdvancedSecurityObjects(ctx, id, options) + if err != nil { + 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 = ListAdvancedSecurityObjectsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listappids.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listappids.go index 7022114a714..e30c1a901ff 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listappids.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listappids.go @@ -15,7 +15,12 @@ import ( type ListAppIdsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ListAppIdResponse + Model *[]string +} + +type ListAppIdsCompleteResult struct { + LatestHttpResponse *http.Response + Items []string } type ListAppIdsOperationOptions struct { @@ -75,7 +80,7 @@ func (c GlobalRulestackClient) ListAppIds(ctx context.Context, id GlobalRulestac } 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 @@ -84,12 +89,36 @@ func (c GlobalRulestackClient) ListAppIds(ctx context.Context, id GlobalRulestac return } - var model ListAppIdResponse - result.Model = &model + var values struct { + Values *[]string `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListAppIdsComplete retrieves all the results into a single object +func (c GlobalRulestackClient) ListAppIdsComplete(ctx context.Context, id GlobalRulestackId, options ListAppIdsOperationOptions) (result ListAppIdsCompleteResult, err error) { + items := make([]string, 0) + + resp, err := c.ListAppIds(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) return } + if resp.Model != nil { + for _, v := range *resp.Model { + items = append(items, v) + } + } + result = ListAppIdsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listcountries.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listcountries.go index b5f21c03649..919c25a0722 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listcountries.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listcountries.go @@ -15,7 +15,12 @@ import ( type ListCountriesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *CountriesResponse + Model *[]Country +} + +type ListCountriesCompleteResult struct { + LatestHttpResponse *http.Response + Items []Country } type ListCountriesOperationOptions struct { @@ -67,7 +72,7 @@ func (c GlobalRulestackClient) ListCountries(ctx context.Context, id GlobalRules } 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 @@ -76,12 +81,43 @@ func (c GlobalRulestackClient) ListCountries(ctx context.Context, id GlobalRules return } - var model CountriesResponse - result.Model = &model + var values struct { + Values *[]Country `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListCountriesComplete retrieves all the results into a single object +func (c GlobalRulestackClient) ListCountriesComplete(ctx context.Context, id GlobalRulestackId, options ListCountriesOperationOptions) (ListCountriesCompleteResult, error) { + return c.ListCountriesCompleteMatchingPredicate(ctx, id, options, CountryOperationPredicate{}) +} + +// ListCountriesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c GlobalRulestackClient) ListCountriesCompleteMatchingPredicate(ctx context.Context, id GlobalRulestackId, options ListCountriesOperationOptions, predicate CountryOperationPredicate) (result ListCountriesCompleteResult, err error) { + items := make([]Country, 0) + + resp, err := c.ListCountries(ctx, id, options) + if err != nil { + 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 = ListCountriesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listfirewalls.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listfirewalls.go index 2047ead29e5..da258ebabca 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listfirewalls.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listfirewalls.go @@ -15,7 +15,12 @@ import ( type ListFirewallsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ListFirewallsResponse + Model *[]string +} + +type ListFirewallsCompleteResult struct { + LatestHttpResponse *http.Response + Items []string } // ListFirewalls ... @@ -35,7 +40,7 @@ func (c GlobalRulestackClient) ListFirewalls(ctx context.Context, id GlobalRules } 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,12 +49,36 @@ func (c GlobalRulestackClient) ListFirewalls(ctx context.Context, id GlobalRules return } - var model ListFirewallsResponse - result.Model = &model + var values struct { + Values *[]string `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListFirewallsComplete retrieves all the results into a single object +func (c GlobalRulestackClient) ListFirewallsComplete(ctx context.Context, id GlobalRulestackId) (result ListFirewallsCompleteResult, err error) { + items := make([]string, 0) + + resp, err := c.ListFirewalls(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) return } + if resp.Model != nil { + for _, v := range *resp.Model { + items = append(items, v) + } + } + result = ListFirewallsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listpredefinedurlcategories.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listpredefinedurlcategories.go index 5c71dce8d3b..45f47cf3d4e 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listpredefinedurlcategories.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listpredefinedurlcategories.go @@ -15,7 +15,12 @@ import ( type ListPredefinedUrlCategoriesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *PredefinedUrlCategoriesResponse + Model *[]PredefinedUrlCategory +} + +type ListPredefinedUrlCategoriesCompleteResult struct { + LatestHttpResponse *http.Response + Items []PredefinedUrlCategory } type ListPredefinedUrlCategoriesOperationOptions struct { @@ -67,7 +72,7 @@ func (c GlobalRulestackClient) ListPredefinedUrlCategories(ctx context.Context, } 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 @@ -76,12 +81,43 @@ func (c GlobalRulestackClient) ListPredefinedUrlCategories(ctx context.Context, return } - var model PredefinedUrlCategoriesResponse - result.Model = &model + var values struct { + Values *[]PredefinedUrlCategory `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListPredefinedUrlCategoriesComplete retrieves all the results into a single object +func (c GlobalRulestackClient) ListPredefinedUrlCategoriesComplete(ctx context.Context, id GlobalRulestackId, options ListPredefinedUrlCategoriesOperationOptions) (ListPredefinedUrlCategoriesCompleteResult, error) { + return c.ListPredefinedUrlCategoriesCompleteMatchingPredicate(ctx, id, options, PredefinedUrlCategoryOperationPredicate{}) +} + +// ListPredefinedUrlCategoriesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c GlobalRulestackClient) ListPredefinedUrlCategoriesCompleteMatchingPredicate(ctx context.Context, id GlobalRulestackId, options ListPredefinedUrlCategoriesOperationOptions, predicate PredefinedUrlCategoryOperationPredicate) (result ListPredefinedUrlCategoriesCompleteResult, err error) { + items := make([]PredefinedUrlCategory, 0) + + resp, err := c.ListPredefinedUrlCategories(ctx, id, options) + if err != nil { + 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 = ListPredefinedUrlCategoriesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listsecurityservices.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listsecurityservices.go index cc474d0ea89..d1f16b56ace 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listsecurityservices.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listsecurityservices.go @@ -15,7 +15,12 @@ import ( type ListSecurityServicesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityServicesResponse + Model *[]SecurityServicesTypeList +} + +type ListSecurityServicesCompleteResult struct { + LatestHttpResponse *http.Response + Items []SecurityServicesTypeList } type ListSecurityServicesOperationOptions struct { @@ -71,7 +76,7 @@ func (c GlobalRulestackClient) ListSecurityServices(ctx context.Context, id Glob } 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 @@ -80,12 +85,43 @@ func (c GlobalRulestackClient) ListSecurityServices(ctx context.Context, id Glob return } - var model SecurityServicesResponse - result.Model = &model + var values struct { + Values *[]SecurityServicesTypeList `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListSecurityServicesComplete retrieves all the results into a single object +func (c GlobalRulestackClient) ListSecurityServicesComplete(ctx context.Context, id GlobalRulestackId, options ListSecurityServicesOperationOptions) (ListSecurityServicesCompleteResult, error) { + return c.ListSecurityServicesCompleteMatchingPredicate(ctx, id, options, SecurityServicesTypeListOperationPredicate{}) +} + +// ListSecurityServicesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c GlobalRulestackClient) ListSecurityServicesCompleteMatchingPredicate(ctx context.Context, id GlobalRulestackId, options ListSecurityServicesOperationOptions, predicate SecurityServicesTypeListOperationPredicate) (result ListSecurityServicesCompleteResult, err error) { + items := make([]SecurityServicesTypeList, 0) + + resp, err := c.ListSecurityServices(ctx, id, options) + if err != nil { + 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 = ListSecurityServicesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_advsecurityobjectlistresponse.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_advsecurityobjectlistresponse.go deleted file mode 100644 index d3479336290..00000000000 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_advsecurityobjectlistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package globalrulestack - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdvSecurityObjectListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value AdvSecurityObjectModel `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_countriesresponse.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_countriesresponse.go deleted file mode 100644 index bbba6198fde..00000000000 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_countriesresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package globalrulestack - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CountriesResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []Country `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_listappidresponse.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_listappidresponse.go deleted file mode 100644 index 8108dc1d6e8..00000000000 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_listappidresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package globalrulestack - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAppIdResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []string `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_listfirewallsresponse.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_listfirewallsresponse.go deleted file mode 100644 index 834bc924529..00000000000 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_listfirewallsresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package globalrulestack - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListFirewallsResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []string `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_predefinedurlcategoriesresponse.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_predefinedurlcategoriesresponse.go deleted file mode 100644 index 6019172078d..00000000000 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_predefinedurlcategoriesresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package globalrulestack - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PredefinedUrlCategoriesResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []PredefinedUrlCategory `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_securityservicesresponse.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_securityservicesresponse.go deleted file mode 100644 index eba4c866545..00000000000 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/model_securityservicesresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package globalrulestack - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityServicesResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value SecurityServicesTypeList `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/predicates.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/predicates.go index 4def7f37ff9..7d929b1268a 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/predicates.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/predicates.go @@ -3,6 +3,37 @@ package globalrulestack // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type AdvSecurityObjectModelOperationPredicate struct { + Type *string +} + +func (p AdvSecurityObjectModelOperationPredicate) Matches(input AdvSecurityObjectModel) bool { + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type CountryOperationPredicate struct { + Code *string + Description *string +} + +func (p CountryOperationPredicate) Matches(input Country) bool { + + if p.Code != nil && *p.Code != input.Code { + return false + } + + if p.Description != nil && (input.Description == nil || *p.Description != *input.Description) { + return false + } + + return true +} + type GlobalRulestackResourceOperationPredicate struct { Id *string Location *string @@ -30,3 +61,34 @@ func (p GlobalRulestackResourceOperationPredicate) Matches(input GlobalRulestack return true } + +type PredefinedUrlCategoryOperationPredicate struct { + Action *string + Name *string +} + +func (p PredefinedUrlCategoryOperationPredicate) Matches(input PredefinedUrlCategory) bool { + + if p.Action != nil && *p.Action != input.Action { + return false + } + + if p.Name != nil && *p.Name != input.Name { + return false + } + + return true +} + +type SecurityServicesTypeListOperationPredicate struct { + Type *string +} + +func (p SecurityServicesTypeListOperationPredicate) Matches(input SecurityServicesTypeList) bool { + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/README.md b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/README.md index 7f4e9ce5203..44ee3bf0854 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/README.md @@ -116,12 +116,13 @@ if model := read.Model; model != nil { ctx := context.TODO() id := localrulestacks.NewLocalRulestackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRulestackValue") -read, err := client.ListAdvancedSecurityObjects(ctx, id, localrulestacks.DefaultListAdvancedSecurityObjectsOperationOptions()) +// alternatively `client.ListAdvancedSecurityObjects(ctx, id, localrulestacks.DefaultListAdvancedSecurityObjectsOperationOptions())` can be used to do batched pagination +items, err := client.ListAdvancedSecurityObjectsComplete(ctx, id, localrulestacks.DefaultListAdvancedSecurityObjectsOperationOptions()) 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 } ``` @@ -200,12 +201,13 @@ for _, item := range items { ctx := context.TODO() id := localrulestacks.NewLocalRulestackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRulestackValue") -read, err := client.ListFirewalls(ctx, id) +// alternatively `client.ListFirewalls(ctx, id)` can be used to do batched pagination +items, err := client.ListFirewallsComplete(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 } ``` @@ -233,12 +235,13 @@ for _, item := range items { ctx := context.TODO() id := localrulestacks.NewLocalRulestackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localRulestackValue") -read, err := client.ListSecurityServices(ctx, id, localrulestacks.DefaultListSecurityServicesOperationOptions()) +// alternatively `client.ListSecurityServices(ctx, id, localrulestacks.DefaultListSecurityServicesOperationOptions())` can be used to do batched pagination +items, err := client.ListSecurityServicesComplete(ctx, id, localrulestacks.DefaultListSecurityServicesOperationOptions()) 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/paloaltonetworks/2023-09-01/localrulestacks/method_listadvancedsecurityobjects.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listadvancedsecurityobjects.go index d685c0fd0f0..dcbd69ff588 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listadvancedsecurityobjects.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listadvancedsecurityobjects.go @@ -15,7 +15,12 @@ import ( type ListAdvancedSecurityObjectsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AdvSecurityObjectListResponse + Model *[]AdvSecurityObjectModel +} + +type ListAdvancedSecurityObjectsCompleteResult struct { + LatestHttpResponse *http.Response + Items []AdvSecurityObjectModel } type ListAdvancedSecurityObjectsOperationOptions struct { @@ -71,7 +76,7 @@ func (c LocalRulestacksClient) ListAdvancedSecurityObjects(ctx context.Context, } 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 @@ -80,12 +85,43 @@ func (c LocalRulestacksClient) ListAdvancedSecurityObjects(ctx context.Context, return } - var model AdvSecurityObjectListResponse - result.Model = &model + var values struct { + Values *[]AdvSecurityObjectModel `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListAdvancedSecurityObjectsComplete retrieves all the results into a single object +func (c LocalRulestacksClient) ListAdvancedSecurityObjectsComplete(ctx context.Context, id LocalRulestackId, options ListAdvancedSecurityObjectsOperationOptions) (ListAdvancedSecurityObjectsCompleteResult, error) { + return c.ListAdvancedSecurityObjectsCompleteMatchingPredicate(ctx, id, options, AdvSecurityObjectModelOperationPredicate{}) +} + +// ListAdvancedSecurityObjectsCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c LocalRulestacksClient) ListAdvancedSecurityObjectsCompleteMatchingPredicate(ctx context.Context, id LocalRulestackId, options ListAdvancedSecurityObjectsOperationOptions, predicate AdvSecurityObjectModelOperationPredicate) (result ListAdvancedSecurityObjectsCompleteResult, err error) { + items := make([]AdvSecurityObjectModel, 0) + + resp, err := c.ListAdvancedSecurityObjects(ctx, id, options) + if err != nil { + 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 = ListAdvancedSecurityObjectsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listappids.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listappids.go index 45ce8ea3d14..40184fe35aa 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listappids.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listappids.go @@ -15,12 +15,12 @@ import ( type ListAppIdsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ListAppIdResponse + Model *[]string } type ListAppIdsCompleteResult struct { LatestHttpResponse *http.Response - Items []ListAppIdResponse + Items []string } type ListAppIdsOperationOptions struct { @@ -90,7 +90,7 @@ func (c LocalRulestacksClient) ListAppIds(ctx context.Context, id LocalRulestack } var values struct { - Values *[]ListAppIdResponse `json:"value"` + Values *[]string `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -102,13 +102,8 @@ func (c LocalRulestacksClient) ListAppIds(ctx context.Context, id LocalRulestack } // ListAppIdsComplete retrieves all the results into a single object -func (c LocalRulestacksClient) ListAppIdsComplete(ctx context.Context, id LocalRulestackId, options ListAppIdsOperationOptions) (ListAppIdsCompleteResult, error) { - return c.ListAppIdsCompleteMatchingPredicate(ctx, id, options, ListAppIdResponseOperationPredicate{}) -} - -// ListAppIdsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LocalRulestacksClient) ListAppIdsCompleteMatchingPredicate(ctx context.Context, id LocalRulestackId, options ListAppIdsOperationOptions, predicate ListAppIdResponseOperationPredicate) (result ListAppIdsCompleteResult, err error) { - items := make([]ListAppIdResponse, 0) +func (c LocalRulestacksClient) ListAppIdsComplete(ctx context.Context, id LocalRulestackId, options ListAppIdsOperationOptions) (result ListAppIdsCompleteResult, err error) { + items := make([]string, 0) resp, err := c.ListAppIds(ctx, id, options) if err != nil { @@ -117,9 +112,7 @@ func (c LocalRulestacksClient) ListAppIdsCompleteMatchingPredicate(ctx context.C } if resp.Model != nil { for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } + items = append(items, v) } } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listcountries.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listcountries.go index f4bce79c5b8..e6d06792a3f 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listcountries.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listcountries.go @@ -15,12 +15,12 @@ import ( type ListCountriesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]CountriesResponse + Model *[]Country } type ListCountriesCompleteResult struct { LatestHttpResponse *http.Response - Items []CountriesResponse + Items []Country } type ListCountriesOperationOptions struct { @@ -82,7 +82,7 @@ func (c LocalRulestacksClient) ListCountries(ctx context.Context, id LocalRulest } var values struct { - Values *[]CountriesResponse `json:"value"` + Values *[]Country `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -95,12 +95,12 @@ func (c LocalRulestacksClient) ListCountries(ctx context.Context, id LocalRulest // ListCountriesComplete retrieves all the results into a single object func (c LocalRulestacksClient) ListCountriesComplete(ctx context.Context, id LocalRulestackId, options ListCountriesOperationOptions) (ListCountriesCompleteResult, error) { - return c.ListCountriesCompleteMatchingPredicate(ctx, id, options, CountriesResponseOperationPredicate{}) + return c.ListCountriesCompleteMatchingPredicate(ctx, id, options, CountryOperationPredicate{}) } // ListCountriesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LocalRulestacksClient) ListCountriesCompleteMatchingPredicate(ctx context.Context, id LocalRulestackId, options ListCountriesOperationOptions, predicate CountriesResponseOperationPredicate) (result ListCountriesCompleteResult, err error) { - items := make([]CountriesResponse, 0) +func (c LocalRulestacksClient) ListCountriesCompleteMatchingPredicate(ctx context.Context, id LocalRulestackId, options ListCountriesOperationOptions, predicate CountryOperationPredicate) (result ListCountriesCompleteResult, err error) { + items := make([]Country, 0) resp, err := c.ListCountries(ctx, id, options) if err != nil { diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listfirewalls.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listfirewalls.go index 6fb93d86fb0..510f5a7de86 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listfirewalls.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listfirewalls.go @@ -15,7 +15,12 @@ import ( type ListFirewallsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ListFirewallsResponse + Model *[]string +} + +type ListFirewallsCompleteResult struct { + LatestHttpResponse *http.Response + Items []string } // ListFirewalls ... @@ -35,7 +40,7 @@ func (c LocalRulestacksClient) ListFirewalls(ctx context.Context, id LocalRulest } 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,12 +49,36 @@ func (c LocalRulestacksClient) ListFirewalls(ctx context.Context, id LocalRulest return } - var model ListFirewallsResponse - result.Model = &model + var values struct { + Values *[]string `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListFirewallsComplete retrieves all the results into a single object +func (c LocalRulestacksClient) ListFirewallsComplete(ctx context.Context, id LocalRulestackId) (result ListFirewallsCompleteResult, err error) { + items := make([]string, 0) + + resp, err := c.ListFirewalls(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) return } + if resp.Model != nil { + for _, v := range *resp.Model { + items = append(items, v) + } + } + result = ListFirewallsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listpredefinedurlcategories.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listpredefinedurlcategories.go index e0be04798d1..4382b0e2c42 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listpredefinedurlcategories.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listpredefinedurlcategories.go @@ -15,12 +15,12 @@ import ( type ListPredefinedUrlCategoriesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]PredefinedUrlCategoriesResponse + Model *[]PredefinedUrlCategory } type ListPredefinedUrlCategoriesCompleteResult struct { LatestHttpResponse *http.Response - Items []PredefinedUrlCategoriesResponse + Items []PredefinedUrlCategory } type ListPredefinedUrlCategoriesOperationOptions struct { @@ -82,7 +82,7 @@ func (c LocalRulestacksClient) ListPredefinedUrlCategories(ctx context.Context, } var values struct { - Values *[]PredefinedUrlCategoriesResponse `json:"value"` + Values *[]PredefinedUrlCategory `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -95,12 +95,12 @@ func (c LocalRulestacksClient) ListPredefinedUrlCategories(ctx context.Context, // ListPredefinedUrlCategoriesComplete retrieves all the results into a single object func (c LocalRulestacksClient) ListPredefinedUrlCategoriesComplete(ctx context.Context, id LocalRulestackId, options ListPredefinedUrlCategoriesOperationOptions) (ListPredefinedUrlCategoriesCompleteResult, error) { - return c.ListPredefinedUrlCategoriesCompleteMatchingPredicate(ctx, id, options, PredefinedUrlCategoriesResponseOperationPredicate{}) + return c.ListPredefinedUrlCategoriesCompleteMatchingPredicate(ctx, id, options, PredefinedUrlCategoryOperationPredicate{}) } // ListPredefinedUrlCategoriesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LocalRulestacksClient) ListPredefinedUrlCategoriesCompleteMatchingPredicate(ctx context.Context, id LocalRulestackId, options ListPredefinedUrlCategoriesOperationOptions, predicate PredefinedUrlCategoriesResponseOperationPredicate) (result ListPredefinedUrlCategoriesCompleteResult, err error) { - items := make([]PredefinedUrlCategoriesResponse, 0) +func (c LocalRulestacksClient) ListPredefinedUrlCategoriesCompleteMatchingPredicate(ctx context.Context, id LocalRulestackId, options ListPredefinedUrlCategoriesOperationOptions, predicate PredefinedUrlCategoryOperationPredicate) (result ListPredefinedUrlCategoriesCompleteResult, err error) { + items := make([]PredefinedUrlCategory, 0) resp, err := c.ListPredefinedUrlCategories(ctx, id, options) if err != nil { diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listsecurityservices.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listsecurityservices.go index ff27121983a..2406a80dbf3 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listsecurityservices.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listsecurityservices.go @@ -15,7 +15,12 @@ import ( type ListSecurityServicesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityServicesResponse + Model *[]SecurityServicesTypeList +} + +type ListSecurityServicesCompleteResult struct { + LatestHttpResponse *http.Response + Items []SecurityServicesTypeList } type ListSecurityServicesOperationOptions struct { @@ -71,7 +76,7 @@ func (c LocalRulestacksClient) ListSecurityServices(ctx context.Context, id Loca } 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 @@ -80,12 +85,43 @@ func (c LocalRulestacksClient) ListSecurityServices(ctx context.Context, id Loca return } - var model SecurityServicesResponse - result.Model = &model + var values struct { + Values *[]SecurityServicesTypeList `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ListSecurityServicesComplete retrieves all the results into a single object +func (c LocalRulestacksClient) ListSecurityServicesComplete(ctx context.Context, id LocalRulestackId, options ListSecurityServicesOperationOptions) (ListSecurityServicesCompleteResult, error) { + return c.ListSecurityServicesCompleteMatchingPredicate(ctx, id, options, SecurityServicesTypeListOperationPredicate{}) +} + +// ListSecurityServicesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c LocalRulestacksClient) ListSecurityServicesCompleteMatchingPredicate(ctx context.Context, id LocalRulestackId, options ListSecurityServicesOperationOptions, predicate SecurityServicesTypeListOperationPredicate) (result ListSecurityServicesCompleteResult, err error) { + items := make([]SecurityServicesTypeList, 0) + + resp, err := c.ListSecurityServices(ctx, id, options) + if err != nil { + 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 = ListSecurityServicesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_advsecurityobjectlistresponse.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_advsecurityobjectlistresponse.go deleted file mode 100644 index 7083081ce6a..00000000000 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_advsecurityobjectlistresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package localrulestacks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdvSecurityObjectListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value AdvSecurityObjectModel `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_countriesresponse.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_countriesresponse.go deleted file mode 100644 index 999b9369521..00000000000 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_countriesresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package localrulestacks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CountriesResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []Country `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_listappidresponse.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_listappidresponse.go deleted file mode 100644 index ecd57332236..00000000000 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_listappidresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package localrulestacks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAppIdResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []string `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_listfirewallsresponse.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_listfirewallsresponse.go deleted file mode 100644 index 20317400492..00000000000 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_listfirewallsresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package localrulestacks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListFirewallsResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []string `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_predefinedurlcategoriesresponse.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_predefinedurlcategoriesresponse.go deleted file mode 100644 index 431ded3781f..00000000000 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_predefinedurlcategoriesresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package localrulestacks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PredefinedUrlCategoriesResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value []PredefinedUrlCategory `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_securityservicesresponse.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_securityservicesresponse.go deleted file mode 100644 index f5518fa0252..00000000000 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/model_securityservicesresponse.go +++ /dev/null @@ -1,9 +0,0 @@ -package localrulestacks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityServicesResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value SecurityServicesTypeList `json:"value"` -} diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/predicates.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/predicates.go index 407af177c23..82fa87587c5 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/predicates.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/predicates.go @@ -3,26 +3,31 @@ package localrulestacks // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type CountriesResponseOperationPredicate struct { - NextLink *string +type AdvSecurityObjectModelOperationPredicate struct { + Type *string } -func (p CountriesResponseOperationPredicate) Matches(input CountriesResponse) bool { +func (p AdvSecurityObjectModelOperationPredicate) Matches(input AdvSecurityObjectModel) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { return false } return true } -type ListAppIdResponseOperationPredicate struct { - NextLink *string +type CountryOperationPredicate struct { + Code *string + Description *string } -func (p ListAppIdResponseOperationPredicate) Matches(input ListAppIdResponse) bool { +func (p CountryOperationPredicate) Matches(input Country) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Code != nil && *p.Code != input.Code { + return false + } + + if p.Description != nil && (input.Description == nil || *p.Description != *input.Description) { return false } @@ -57,13 +62,31 @@ func (p LocalRulestackResourceOperationPredicate) Matches(input LocalRulestackRe return true } -type PredefinedUrlCategoriesResponseOperationPredicate struct { - NextLink *string +type PredefinedUrlCategoryOperationPredicate struct { + Action *string + Name *string } -func (p PredefinedUrlCategoriesResponseOperationPredicate) Matches(input PredefinedUrlCategoriesResponse) bool { +func (p PredefinedUrlCategoryOperationPredicate) Matches(input PredefinedUrlCategory) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Action != nil && *p.Action != input.Action { + return false + } + + if p.Name != nil && *p.Name != input.Name { + return false + } + + return true +} + +type SecurityServicesTypeListOperationPredicate struct { + Type *string +} + +func (p SecurityServicesTypeListOperationPredicate) Matches(input SecurityServicesTypeList) bool { + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { return false } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatmanagementgroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatmanagementgroup.go index 0079af0baab..d9b32820934 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatmanagementgroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatmanagementgroup.go @@ -15,12 +15,12 @@ import ( type ListDeploymentsAtManagementGroupOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]RemediationDeploymentsListResult + Model *[]RemediationDeployment } type ListDeploymentsAtManagementGroupCompleteResult struct { LatestHttpResponse *http.Response - Items []RemediationDeploymentsListResult + Items []RemediationDeployment } type ListDeploymentsAtManagementGroupOperationOptions struct { @@ -78,7 +78,7 @@ func (c RemediationsClient) ListDeploymentsAtManagementGroup(ctx context.Context } var values struct { - Values *[]RemediationDeploymentsListResult `json:"value"` + Values *[]RemediationDeployment `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -91,12 +91,12 @@ func (c RemediationsClient) ListDeploymentsAtManagementGroup(ctx context.Context // ListDeploymentsAtManagementGroupComplete retrieves all the results into a single object func (c RemediationsClient) ListDeploymentsAtManagementGroupComplete(ctx context.Context, id Providers2RemediationId, options ListDeploymentsAtManagementGroupOperationOptions) (ListDeploymentsAtManagementGroupCompleteResult, error) { - return c.ListDeploymentsAtManagementGroupCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentsListResultOperationPredicate{}) + return c.ListDeploymentsAtManagementGroupCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentOperationPredicate{}) } // ListDeploymentsAtManagementGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RemediationsClient) ListDeploymentsAtManagementGroupCompleteMatchingPredicate(ctx context.Context, id Providers2RemediationId, options ListDeploymentsAtManagementGroupOperationOptions, predicate RemediationDeploymentsListResultOperationPredicate) (result ListDeploymentsAtManagementGroupCompleteResult, err error) { - items := make([]RemediationDeploymentsListResult, 0) +func (c RemediationsClient) ListDeploymentsAtManagementGroupCompleteMatchingPredicate(ctx context.Context, id Providers2RemediationId, options ListDeploymentsAtManagementGroupOperationOptions, predicate RemediationDeploymentOperationPredicate) (result ListDeploymentsAtManagementGroupCompleteResult, err error) { + items := make([]RemediationDeployment, 0) resp, err := c.ListDeploymentsAtManagementGroup(ctx, id, options) if err != nil { diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresource.go b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresource.go index b9e26059cea..f2795a0f2b5 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresource.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresource.go @@ -15,12 +15,12 @@ import ( type ListDeploymentsAtResourceOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]RemediationDeploymentsListResult + Model *[]RemediationDeployment } type ListDeploymentsAtResourceCompleteResult struct { LatestHttpResponse *http.Response - Items []RemediationDeploymentsListResult + Items []RemediationDeployment } type ListDeploymentsAtResourceOperationOptions struct { @@ -78,7 +78,7 @@ func (c RemediationsClient) ListDeploymentsAtResource(ctx context.Context, id Sc } var values struct { - Values *[]RemediationDeploymentsListResult `json:"value"` + Values *[]RemediationDeployment `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -91,12 +91,12 @@ func (c RemediationsClient) ListDeploymentsAtResource(ctx context.Context, id Sc // ListDeploymentsAtResourceComplete retrieves all the results into a single object func (c RemediationsClient) ListDeploymentsAtResourceComplete(ctx context.Context, id ScopedRemediationId, options ListDeploymentsAtResourceOperationOptions) (ListDeploymentsAtResourceCompleteResult, error) { - return c.ListDeploymentsAtResourceCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentsListResultOperationPredicate{}) + return c.ListDeploymentsAtResourceCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentOperationPredicate{}) } // ListDeploymentsAtResourceCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RemediationsClient) ListDeploymentsAtResourceCompleteMatchingPredicate(ctx context.Context, id ScopedRemediationId, options ListDeploymentsAtResourceOperationOptions, predicate RemediationDeploymentsListResultOperationPredicate) (result ListDeploymentsAtResourceCompleteResult, err error) { - items := make([]RemediationDeploymentsListResult, 0) +func (c RemediationsClient) ListDeploymentsAtResourceCompleteMatchingPredicate(ctx context.Context, id ScopedRemediationId, options ListDeploymentsAtResourceOperationOptions, predicate RemediationDeploymentOperationPredicate) (result ListDeploymentsAtResourceCompleteResult, err error) { + items := make([]RemediationDeployment, 0) resp, err := c.ListDeploymentsAtResource(ctx, id, options) if err != nil { diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresourcegroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresourcegroup.go index e85d1cba253..9c3384b7085 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresourcegroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresourcegroup.go @@ -15,12 +15,12 @@ import ( type ListDeploymentsAtResourceGroupOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]RemediationDeploymentsListResult + Model *[]RemediationDeployment } type ListDeploymentsAtResourceGroupCompleteResult struct { LatestHttpResponse *http.Response - Items []RemediationDeploymentsListResult + Items []RemediationDeployment } type ListDeploymentsAtResourceGroupOperationOptions struct { @@ -78,7 +78,7 @@ func (c RemediationsClient) ListDeploymentsAtResourceGroup(ctx context.Context, } var values struct { - Values *[]RemediationDeploymentsListResult `json:"value"` + Values *[]RemediationDeployment `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -91,12 +91,12 @@ func (c RemediationsClient) ListDeploymentsAtResourceGroup(ctx context.Context, // ListDeploymentsAtResourceGroupComplete retrieves all the results into a single object func (c RemediationsClient) ListDeploymentsAtResourceGroupComplete(ctx context.Context, id ProviderRemediationId, options ListDeploymentsAtResourceGroupOperationOptions) (ListDeploymentsAtResourceGroupCompleteResult, error) { - return c.ListDeploymentsAtResourceGroupCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentsListResultOperationPredicate{}) + return c.ListDeploymentsAtResourceGroupCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentOperationPredicate{}) } // ListDeploymentsAtResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RemediationsClient) ListDeploymentsAtResourceGroupCompleteMatchingPredicate(ctx context.Context, id ProviderRemediationId, options ListDeploymentsAtResourceGroupOperationOptions, predicate RemediationDeploymentsListResultOperationPredicate) (result ListDeploymentsAtResourceGroupCompleteResult, err error) { - items := make([]RemediationDeploymentsListResult, 0) +func (c RemediationsClient) ListDeploymentsAtResourceGroupCompleteMatchingPredicate(ctx context.Context, id ProviderRemediationId, options ListDeploymentsAtResourceGroupOperationOptions, predicate RemediationDeploymentOperationPredicate) (result ListDeploymentsAtResourceGroupCompleteResult, err error) { + items := make([]RemediationDeployment, 0) resp, err := c.ListDeploymentsAtResourceGroup(ctx, id, options) if err != nil { diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatsubscription.go b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatsubscription.go index fe305aeac82..18091aa4ed4 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatsubscription.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatsubscription.go @@ -15,12 +15,12 @@ import ( type ListDeploymentsAtSubscriptionOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]RemediationDeploymentsListResult + Model *[]RemediationDeployment } type ListDeploymentsAtSubscriptionCompleteResult struct { LatestHttpResponse *http.Response - Items []RemediationDeploymentsListResult + Items []RemediationDeployment } type ListDeploymentsAtSubscriptionOperationOptions struct { @@ -78,7 +78,7 @@ func (c RemediationsClient) ListDeploymentsAtSubscription(ctx context.Context, i } var values struct { - Values *[]RemediationDeploymentsListResult `json:"value"` + Values *[]RemediationDeployment `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -91,12 +91,12 @@ func (c RemediationsClient) ListDeploymentsAtSubscription(ctx context.Context, i // ListDeploymentsAtSubscriptionComplete retrieves all the results into a single object func (c RemediationsClient) ListDeploymentsAtSubscriptionComplete(ctx context.Context, id RemediationId, options ListDeploymentsAtSubscriptionOperationOptions) (ListDeploymentsAtSubscriptionCompleteResult, error) { - return c.ListDeploymentsAtSubscriptionCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentsListResultOperationPredicate{}) + return c.ListDeploymentsAtSubscriptionCompleteMatchingPredicate(ctx, id, options, RemediationDeploymentOperationPredicate{}) } // ListDeploymentsAtSubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RemediationsClient) ListDeploymentsAtSubscriptionCompleteMatchingPredicate(ctx context.Context, id RemediationId, options ListDeploymentsAtSubscriptionOperationOptions, predicate RemediationDeploymentsListResultOperationPredicate) (result ListDeploymentsAtSubscriptionCompleteResult, err error) { - items := make([]RemediationDeploymentsListResult, 0) +func (c RemediationsClient) ListDeploymentsAtSubscriptionCompleteMatchingPredicate(ctx context.Context, id RemediationId, options ListDeploymentsAtSubscriptionOperationOptions, predicate RemediationDeploymentOperationPredicate) (result ListDeploymentsAtSubscriptionCompleteResult, err error) { + items := make([]RemediationDeployment, 0) resp, err := c.ListDeploymentsAtSubscription(ctx, id, options) if err != nil { diff --git a/resource-manager/policyinsights/2021-10-01/remediations/model_remediationdeploymentslistresult.go b/resource-manager/policyinsights/2021-10-01/remediations/model_remediationdeploymentslistresult.go deleted file mode 100644 index 688327d4144..00000000000 --- a/resource-manager/policyinsights/2021-10-01/remediations/model_remediationdeploymentslistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package remediations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RemediationDeploymentsListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]RemediationDeployment `json:"value,omitempty"` -} diff --git a/resource-manager/policyinsights/2021-10-01/remediations/predicates.go b/resource-manager/policyinsights/2021-10-01/remediations/predicates.go index 8b4c58c96c5..db9f8d3867f 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/predicates.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/predicates.go @@ -26,13 +26,38 @@ func (p RemediationOperationPredicate) Matches(input Remediation) bool { return true } -type RemediationDeploymentsListResultOperationPredicate struct { - NextLink *string +type RemediationDeploymentOperationPredicate struct { + CreatedOn *string + DeploymentId *string + LastUpdatedOn *string + RemediatedResourceId *string + ResourceLocation *string + Status *string } -func (p RemediationDeploymentsListResultOperationPredicate) Matches(input RemediationDeploymentsListResult) bool { +func (p RemediationDeploymentOperationPredicate) Matches(input RemediationDeployment) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.CreatedOn != nil && (input.CreatedOn == nil || *p.CreatedOn != *input.CreatedOn) { + return false + } + + if p.DeploymentId != nil && (input.DeploymentId == nil || *p.DeploymentId != *input.DeploymentId) { + return false + } + + if p.LastUpdatedOn != nil && (input.LastUpdatedOn == nil || *p.LastUpdatedOn != *input.LastUpdatedOn) { + return false + } + + if p.RemediatedResourceId != nil && (input.RemediatedResourceId == nil || *p.RemediatedResourceId != *input.RemediatedResourceId) { + return false + } + + if p.ResourceLocation != nil && (input.ResourceLocation == nil || *p.ResourceLocation != *input.ResourceLocation) { + return false + } + + if p.Status != nil && (input.Status == nil || *p.Status != *input.Status) { return false } diff --git a/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolations/method_list.go b/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolations/method_list.go index 77b82bdfdba..b72a977cc46 100644 --- a/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolations/method_list.go +++ b/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolations/method_list.go @@ -15,12 +15,12 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ViolationsList + Model *[]Violation } type ListCompleteResult struct { LatestHttpResponse *http.Response - Items []ViolationsList + Items []Violation } // List ... @@ -50,7 +50,7 @@ func (c ListTenantConfigurationViolationsClient) List(ctx context.Context) (resu } var values struct { - Values *[]ViolationsList `json:"value"` + Values *[]Violation `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c ListTenantConfigurationViolationsClient) List(ctx context.Context) (resu // ListComplete retrieves all the results into a single object func (c ListTenantConfigurationViolationsClient) ListComplete(ctx context.Context) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, ViolationsListOperationPredicate{}) + return c.ListCompleteMatchingPredicate(ctx, ViolationOperationPredicate{}) } // ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ListTenantConfigurationViolationsClient) ListCompleteMatchingPredicate(ctx context.Context, predicate ViolationsListOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ViolationsList, 0) +func (c ListTenantConfigurationViolationsClient) ListCompleteMatchingPredicate(ctx context.Context, predicate ViolationOperationPredicate) (result ListCompleteResult, err error) { + items := make([]Violation, 0) resp, err := c.List(ctx) if err != nil { diff --git a/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolations/model_violationslist.go b/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolations/model_violationslist.go deleted file mode 100644 index 143cf46d925..00000000000 --- a/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolations/model_violationslist.go +++ /dev/null @@ -1,9 +0,0 @@ -package listtenantconfigurationviolations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ViolationsList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]Violation `json:"value,omitempty"` -} diff --git a/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolations/predicates.go b/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolations/predicates.go index 26984e80ee1..fab1640a927 100644 --- a/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolations/predicates.go +++ b/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolations/predicates.go @@ -3,13 +3,23 @@ package listtenantconfigurationviolations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ViolationsListOperationPredicate struct { - NextLink *string +type ViolationOperationPredicate struct { + ErrorMessage *string + Id *string + UserId *string } -func (p ViolationsListOperationPredicate) Matches(input ViolationsList) bool { +func (p ViolationOperationPredicate) Matches(input Violation) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ErrorMessage != nil && (input.ErrorMessage == nil || *p.ErrorMessage != *input.ErrorMessage) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.UserId != nil && (input.UserId == nil || *p.UserId != *input.UserId) { return false } diff --git a/resource-manager/recoveryservicesbackup/2023-01-15/backupcrrjobs/method_list_autorest.go b/resource-manager/recoveryservicesbackup/2023-01-15/backupcrrjobs/method_list_autorest.go index 15b90da08ca..be538677c4d 100644 --- a/resource-manager/recoveryservicesbackup/2023-01-15/backupcrrjobs/method_list_autorest.go +++ b/resource-manager/recoveryservicesbackup/2023-01-15/backupcrrjobs/method_list_autorest.go @@ -15,14 +15,14 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response - Model *[]JobResourceList + Model *[]JobResource nextLink *string nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) } type ListCompleteResult struct { - Items []JobResourceList + Items []JobResource } func (r ListOperationResponse) HasMore() bool { @@ -133,8 +133,8 @@ func (c BackupCrrJobsClient) preparerForListWithNextLink(ctx context.Context, ne // closes the http.Response Body. func (c BackupCrrJobsClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { type page struct { - Values []JobResourceList `json:"value"` - NextLink *string `json:"nextLink"` + Values []JobResource `json:"value"` + NextLink *string `json:"nextLink"` } var respObj page err = autorest.Respond( @@ -173,12 +173,12 @@ func (c BackupCrrJobsClient) responderForList(resp *http.Response) (result ListO // ListComplete retrieves all of the results into a single object func (c BackupCrrJobsClient) ListComplete(ctx context.Context, id LocationId, input CrrJobRequest, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, input, options, JobResourceListOperationPredicate{}) + return c.ListCompleteMatchingPredicate(ctx, id, input, options, JobResourceOperationPredicate{}) } // ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c BackupCrrJobsClient) ListCompleteMatchingPredicate(ctx context.Context, id LocationId, input CrrJobRequest, options ListOperationOptions, predicate JobResourceListOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]JobResourceList, 0) +func (c BackupCrrJobsClient) ListCompleteMatchingPredicate(ctx context.Context, id LocationId, input CrrJobRequest, options ListOperationOptions, predicate JobResourceOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]JobResource, 0) page, err := c.List(ctx, id, input, options) if err != nil { diff --git a/resource-manager/recoveryservicesbackup/2023-01-15/backupcrrjobs/model_jobresourcelist.go b/resource-manager/recoveryservicesbackup/2023-01-15/backupcrrjobs/model_jobresourcelist.go deleted file mode 100644 index 442700470e2..00000000000 --- a/resource-manager/recoveryservicesbackup/2023-01-15/backupcrrjobs/model_jobresourcelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package backupcrrjobs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type JobResourceList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]JobResource `json:"value,omitempty"` -} diff --git a/resource-manager/recoveryservicesbackup/2023-01-15/backupcrrjobs/predicates.go b/resource-manager/recoveryservicesbackup/2023-01-15/backupcrrjobs/predicates.go index daf95277ebc..bd273e71b98 100644 --- a/resource-manager/recoveryservicesbackup/2023-01-15/backupcrrjobs/predicates.go +++ b/resource-manager/recoveryservicesbackup/2023-01-15/backupcrrjobs/predicates.go @@ -3,13 +3,33 @@ package backupcrrjobs // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type JobResourceListOperationPredicate struct { - NextLink *string +type JobResourceOperationPredicate struct { + ETag *string + Id *string + Location *string + Name *string + Type *string } -func (p JobResourceListOperationPredicate) Matches(input JobResourceList) bool { +func (p JobResourceOperationPredicate) Matches(input JobResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ETag != nil && (input.ETag == nil || *p.ETag != *input.ETag) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { return false } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/method_list_autorest.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/method_list_autorest.go index ba75a4ed3a3..71847a51411 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/method_list_autorest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/method_list_autorest.go @@ -15,14 +15,14 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response - Model *[]RecoveryPointResourceList + Model *[]RecoveryPointResource nextLink *string nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) } type ListCompleteResult struct { - Items []RecoveryPointResourceList + Items []RecoveryPointResource } func (r ListOperationResponse) HasMore() bool { @@ -104,8 +104,8 @@ func (c RecoveryPointsRecommendedForMoveClient) preparerForListWithNextLink(ctx // closes the http.Response Body. func (c RecoveryPointsRecommendedForMoveClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { type page struct { - Values []RecoveryPointResourceList `json:"value"` - NextLink *string `json:"nextLink"` + Values []RecoveryPointResource `json:"value"` + NextLink *string `json:"nextLink"` } var respObj page err = autorest.Respond( @@ -144,12 +144,12 @@ func (c RecoveryPointsRecommendedForMoveClient) responderForList(resp *http.Resp // ListComplete retrieves all of the results into a single object func (c RecoveryPointsRecommendedForMoveClient) ListComplete(ctx context.Context, id ProtectedItemId, input ListRecoveryPointsRecommendedForMoveRequest) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, input, RecoveryPointResourceListOperationPredicate{}) + return c.ListCompleteMatchingPredicate(ctx, id, input, RecoveryPointResourceOperationPredicate{}) } // ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c RecoveryPointsRecommendedForMoveClient) ListCompleteMatchingPredicate(ctx context.Context, id ProtectedItemId, input ListRecoveryPointsRecommendedForMoveRequest, predicate RecoveryPointResourceListOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]RecoveryPointResourceList, 0) +func (c RecoveryPointsRecommendedForMoveClient) ListCompleteMatchingPredicate(ctx context.Context, id ProtectedItemId, input ListRecoveryPointsRecommendedForMoveRequest, predicate RecoveryPointResourceOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]RecoveryPointResource, 0) page, err := c.List(ctx, id, input) if err != nil { diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_recoverypointresourcelist.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_recoverypointresourcelist.go deleted file mode 100644 index 46cdc80d6f8..00000000000 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_recoverypointresourcelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package recoverypointsrecommendedformove - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RecoveryPointResourceList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]RecoveryPointResource `json:"value,omitempty"` -} diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/predicates.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/predicates.go index d156b2fc300..9f73792f14b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/predicates.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/predicates.go @@ -3,13 +3,33 @@ package recoverypointsrecommendedformove // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type RecoveryPointResourceListOperationPredicate struct { - NextLink *string +type RecoveryPointResourceOperationPredicate struct { + ETag *string + Id *string + Location *string + Name *string + Type *string } -func (p RecoveryPointResourceListOperationPredicate) Matches(input RecoveryPointResourceList) bool { +func (p RecoveryPointResourceOperationPredicate) Matches(input RecoveryPointResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ETag != nil && (input.ETag == nil || *p.ETag != *input.ETag) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { return false } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/method_list_autorest.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/method_list_autorest.go index ba75a4ed3a3..71847a51411 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/method_list_autorest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/method_list_autorest.go @@ -15,14 +15,14 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response - Model *[]RecoveryPointResourceList + Model *[]RecoveryPointResource nextLink *string nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) } type ListCompleteResult struct { - Items []RecoveryPointResourceList + Items []RecoveryPointResource } func (r ListOperationResponse) HasMore() bool { @@ -104,8 +104,8 @@ func (c RecoveryPointsRecommendedForMoveClient) preparerForListWithNextLink(ctx // closes the http.Response Body. func (c RecoveryPointsRecommendedForMoveClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { type page struct { - Values []RecoveryPointResourceList `json:"value"` - NextLink *string `json:"nextLink"` + Values []RecoveryPointResource `json:"value"` + NextLink *string `json:"nextLink"` } var respObj page err = autorest.Respond( @@ -144,12 +144,12 @@ func (c RecoveryPointsRecommendedForMoveClient) responderForList(resp *http.Resp // ListComplete retrieves all of the results into a single object func (c RecoveryPointsRecommendedForMoveClient) ListComplete(ctx context.Context, id ProtectedItemId, input ListRecoveryPointsRecommendedForMoveRequest) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, input, RecoveryPointResourceListOperationPredicate{}) + return c.ListCompleteMatchingPredicate(ctx, id, input, RecoveryPointResourceOperationPredicate{}) } // ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c RecoveryPointsRecommendedForMoveClient) ListCompleteMatchingPredicate(ctx context.Context, id ProtectedItemId, input ListRecoveryPointsRecommendedForMoveRequest, predicate RecoveryPointResourceListOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]RecoveryPointResourceList, 0) +func (c RecoveryPointsRecommendedForMoveClient) ListCompleteMatchingPredicate(ctx context.Context, id ProtectedItemId, input ListRecoveryPointsRecommendedForMoveRequest, predicate RecoveryPointResourceOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]RecoveryPointResource, 0) page, err := c.List(ctx, id, input) if err != nil { diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_recoverypointresourcelist.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_recoverypointresourcelist.go deleted file mode 100644 index 46cdc80d6f8..00000000000 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_recoverypointresourcelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package recoverypointsrecommendedformove - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RecoveryPointResourceList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]RecoveryPointResource `json:"value,omitempty"` -} diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/predicates.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/predicates.go index d156b2fc300..9f73792f14b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/predicates.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/predicates.go @@ -3,13 +3,33 @@ package recoverypointsrecommendedformove // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type RecoveryPointResourceListOperationPredicate struct { - NextLink *string +type RecoveryPointResourceOperationPredicate struct { + ETag *string + Id *string + Location *string + Name *string + Type *string } -func (p RecoveryPointResourceListOperationPredicate) Matches(input RecoveryPointResourceList) bool { +func (p RecoveryPointResourceOperationPredicate) Matches(input RecoveryPointResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ETag != nil && (input.ETag == nil || *p.ETag != *input.ETag) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { return false } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/method_list_autorest.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/method_list_autorest.go index ba75a4ed3a3..71847a51411 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/method_list_autorest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/method_list_autorest.go @@ -15,14 +15,14 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response - Model *[]RecoveryPointResourceList + Model *[]RecoveryPointResource nextLink *string nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) } type ListCompleteResult struct { - Items []RecoveryPointResourceList + Items []RecoveryPointResource } func (r ListOperationResponse) HasMore() bool { @@ -104,8 +104,8 @@ func (c RecoveryPointsRecommendedForMoveClient) preparerForListWithNextLink(ctx // closes the http.Response Body. func (c RecoveryPointsRecommendedForMoveClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { type page struct { - Values []RecoveryPointResourceList `json:"value"` - NextLink *string `json:"nextLink"` + Values []RecoveryPointResource `json:"value"` + NextLink *string `json:"nextLink"` } var respObj page err = autorest.Respond( @@ -144,12 +144,12 @@ func (c RecoveryPointsRecommendedForMoveClient) responderForList(resp *http.Resp // ListComplete retrieves all of the results into a single object func (c RecoveryPointsRecommendedForMoveClient) ListComplete(ctx context.Context, id ProtectedItemId, input ListRecoveryPointsRecommendedForMoveRequest) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, input, RecoveryPointResourceListOperationPredicate{}) + return c.ListCompleteMatchingPredicate(ctx, id, input, RecoveryPointResourceOperationPredicate{}) } // ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c RecoveryPointsRecommendedForMoveClient) ListCompleteMatchingPredicate(ctx context.Context, id ProtectedItemId, input ListRecoveryPointsRecommendedForMoveRequest, predicate RecoveryPointResourceListOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]RecoveryPointResourceList, 0) +func (c RecoveryPointsRecommendedForMoveClient) ListCompleteMatchingPredicate(ctx context.Context, id ProtectedItemId, input ListRecoveryPointsRecommendedForMoveRequest, predicate RecoveryPointResourceOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]RecoveryPointResource, 0) page, err := c.List(ctx, id, input) if err != nil { diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_recoverypointresourcelist.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_recoverypointresourcelist.go deleted file mode 100644 index 46cdc80d6f8..00000000000 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_recoverypointresourcelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package recoverypointsrecommendedformove - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RecoveryPointResourceList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]RecoveryPointResource `json:"value,omitempty"` -} diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/predicates.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/predicates.go index d156b2fc300..9f73792f14b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/predicates.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/predicates.go @@ -3,13 +3,33 @@ package recoverypointsrecommendedformove // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type RecoveryPointResourceListOperationPredicate struct { - NextLink *string +type RecoveryPointResourceOperationPredicate struct { + ETag *string + Id *string + Location *string + Name *string + Type *string } -func (p RecoveryPointResourceListOperationPredicate) Matches(input RecoveryPointResourceList) bool { +func (p RecoveryPointResourceOperationPredicate) Matches(input RecoveryPointResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ETag != nil && (input.ETag == nil || *p.ETag != *input.ETag) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { return false } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/method_list_autorest.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/method_list_autorest.go index ba75a4ed3a3..71847a51411 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/method_list_autorest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/method_list_autorest.go @@ -15,14 +15,14 @@ import ( type ListOperationResponse struct { HttpResponse *http.Response - Model *[]RecoveryPointResourceList + Model *[]RecoveryPointResource nextLink *string nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) } type ListCompleteResult struct { - Items []RecoveryPointResourceList + Items []RecoveryPointResource } func (r ListOperationResponse) HasMore() bool { @@ -104,8 +104,8 @@ func (c RecoveryPointsRecommendedForMoveClient) preparerForListWithNextLink(ctx // closes the http.Response Body. func (c RecoveryPointsRecommendedForMoveClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { type page struct { - Values []RecoveryPointResourceList `json:"value"` - NextLink *string `json:"nextLink"` + Values []RecoveryPointResource `json:"value"` + NextLink *string `json:"nextLink"` } var respObj page err = autorest.Respond( @@ -144,12 +144,12 @@ func (c RecoveryPointsRecommendedForMoveClient) responderForList(resp *http.Resp // ListComplete retrieves all of the results into a single object func (c RecoveryPointsRecommendedForMoveClient) ListComplete(ctx context.Context, id ProtectedItemId, input ListRecoveryPointsRecommendedForMoveRequest) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, input, RecoveryPointResourceListOperationPredicate{}) + return c.ListCompleteMatchingPredicate(ctx, id, input, RecoveryPointResourceOperationPredicate{}) } // ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c RecoveryPointsRecommendedForMoveClient) ListCompleteMatchingPredicate(ctx context.Context, id ProtectedItemId, input ListRecoveryPointsRecommendedForMoveRequest, predicate RecoveryPointResourceListOperationPredicate) (resp ListCompleteResult, err error) { - items := make([]RecoveryPointResourceList, 0) +func (c RecoveryPointsRecommendedForMoveClient) ListCompleteMatchingPredicate(ctx context.Context, id ProtectedItemId, input ListRecoveryPointsRecommendedForMoveRequest, predicate RecoveryPointResourceOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]RecoveryPointResource, 0) page, err := c.List(ctx, id, input) if err != nil { diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_recoverypointresourcelist.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_recoverypointresourcelist.go deleted file mode 100644 index 46cdc80d6f8..00000000000 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_recoverypointresourcelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package recoverypointsrecommendedformove - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RecoveryPointResourceList struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]RecoveryPointResource `json:"value,omitempty"` -} diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/predicates.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/predicates.go index d156b2fc300..9f73792f14b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/predicates.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/predicates.go @@ -3,13 +3,33 @@ package recoverypointsrecommendedformove // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type RecoveryPointResourceListOperationPredicate struct { - NextLink *string +type RecoveryPointResourceOperationPredicate struct { + ETag *string + Id *string + Location *string + Name *string + Type *string } -func (p RecoveryPointResourceListOperationPredicate) Matches(input RecoveryPointResourceList) bool { +func (p RecoveryPointResourceOperationPredicate) Matches(input RecoveryPointResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.ETag != nil && (input.ETag == nil || *p.ETag != *input.ETag) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { return false } diff --git a/resource-manager/search/2022-09-01/querykeys/method_listbysearchservice.go b/resource-manager/search/2022-09-01/querykeys/method_listbysearchservice.go index bdc1223617b..1f6807db0c8 100644 --- a/resource-manager/search/2022-09-01/querykeys/method_listbysearchservice.go +++ b/resource-manager/search/2022-09-01/querykeys/method_listbysearchservice.go @@ -15,12 +15,12 @@ import ( type ListBySearchServiceOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ListQueryKeysResult + Model *[]QueryKey } type ListBySearchServiceCompleteResult struct { LatestHttpResponse *http.Response - Items []ListQueryKeysResult + Items []QueryKey } type ListBySearchServiceOperationOptions struct { @@ -78,7 +78,7 @@ func (c QueryKeysClient) ListBySearchService(ctx context.Context, id SearchServi } var values struct { - Values *[]ListQueryKeysResult `json:"value"` + Values *[]QueryKey `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -91,12 +91,12 @@ func (c QueryKeysClient) ListBySearchService(ctx context.Context, id SearchServi // ListBySearchServiceComplete retrieves all the results into a single object func (c QueryKeysClient) ListBySearchServiceComplete(ctx context.Context, id SearchServiceId, options ListBySearchServiceOperationOptions) (ListBySearchServiceCompleteResult, error) { - return c.ListBySearchServiceCompleteMatchingPredicate(ctx, id, options, ListQueryKeysResultOperationPredicate{}) + return c.ListBySearchServiceCompleteMatchingPredicate(ctx, id, options, QueryKeyOperationPredicate{}) } // ListBySearchServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c QueryKeysClient) ListBySearchServiceCompleteMatchingPredicate(ctx context.Context, id SearchServiceId, options ListBySearchServiceOperationOptions, predicate ListQueryKeysResultOperationPredicate) (result ListBySearchServiceCompleteResult, err error) { - items := make([]ListQueryKeysResult, 0) +func (c QueryKeysClient) ListBySearchServiceCompleteMatchingPredicate(ctx context.Context, id SearchServiceId, options ListBySearchServiceOperationOptions, predicate QueryKeyOperationPredicate) (result ListBySearchServiceCompleteResult, err error) { + items := make([]QueryKey, 0) resp, err := c.ListBySearchService(ctx, id, options) if err != nil { diff --git a/resource-manager/search/2022-09-01/querykeys/model_listquerykeysresult.go b/resource-manager/search/2022-09-01/querykeys/model_listquerykeysresult.go deleted file mode 100644 index dd860459232..00000000000 --- a/resource-manager/search/2022-09-01/querykeys/model_listquerykeysresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package querykeys - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListQueryKeysResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]QueryKey `json:"value,omitempty"` -} diff --git a/resource-manager/search/2022-09-01/querykeys/predicates.go b/resource-manager/search/2022-09-01/querykeys/predicates.go index 488b6d75c41..6287d6738be 100644 --- a/resource-manager/search/2022-09-01/querykeys/predicates.go +++ b/resource-manager/search/2022-09-01/querykeys/predicates.go @@ -3,13 +3,18 @@ package querykeys // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ListQueryKeysResultOperationPredicate struct { - NextLink *string +type QueryKeyOperationPredicate struct { + Key *string + Name *string } -func (p ListQueryKeysResultOperationPredicate) Matches(input ListQueryKeysResult) bool { +func (p QueryKeyOperationPredicate) Matches(input QueryKey) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Key != nil && (input.Key == nil || *p.Key != *input.Key) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { return false } diff --git a/resource-manager/search/2023-11-01/querykeys/method_listbysearchservice.go b/resource-manager/search/2023-11-01/querykeys/method_listbysearchservice.go index bdc1223617b..1f6807db0c8 100644 --- a/resource-manager/search/2023-11-01/querykeys/method_listbysearchservice.go +++ b/resource-manager/search/2023-11-01/querykeys/method_listbysearchservice.go @@ -15,12 +15,12 @@ import ( type ListBySearchServiceOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ListQueryKeysResult + Model *[]QueryKey } type ListBySearchServiceCompleteResult struct { LatestHttpResponse *http.Response - Items []ListQueryKeysResult + Items []QueryKey } type ListBySearchServiceOperationOptions struct { @@ -78,7 +78,7 @@ func (c QueryKeysClient) ListBySearchService(ctx context.Context, id SearchServi } var values struct { - Values *[]ListQueryKeysResult `json:"value"` + Values *[]QueryKey `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -91,12 +91,12 @@ func (c QueryKeysClient) ListBySearchService(ctx context.Context, id SearchServi // ListBySearchServiceComplete retrieves all the results into a single object func (c QueryKeysClient) ListBySearchServiceComplete(ctx context.Context, id SearchServiceId, options ListBySearchServiceOperationOptions) (ListBySearchServiceCompleteResult, error) { - return c.ListBySearchServiceCompleteMatchingPredicate(ctx, id, options, ListQueryKeysResultOperationPredicate{}) + return c.ListBySearchServiceCompleteMatchingPredicate(ctx, id, options, QueryKeyOperationPredicate{}) } // ListBySearchServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c QueryKeysClient) ListBySearchServiceCompleteMatchingPredicate(ctx context.Context, id SearchServiceId, options ListBySearchServiceOperationOptions, predicate ListQueryKeysResultOperationPredicate) (result ListBySearchServiceCompleteResult, err error) { - items := make([]ListQueryKeysResult, 0) +func (c QueryKeysClient) ListBySearchServiceCompleteMatchingPredicate(ctx context.Context, id SearchServiceId, options ListBySearchServiceOperationOptions, predicate QueryKeyOperationPredicate) (result ListBySearchServiceCompleteResult, err error) { + items := make([]QueryKey, 0) resp, err := c.ListBySearchService(ctx, id, options) if err != nil { diff --git a/resource-manager/search/2023-11-01/querykeys/model_listquerykeysresult.go b/resource-manager/search/2023-11-01/querykeys/model_listquerykeysresult.go deleted file mode 100644 index dd860459232..00000000000 --- a/resource-manager/search/2023-11-01/querykeys/model_listquerykeysresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package querykeys - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListQueryKeysResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]QueryKey `json:"value,omitempty"` -} diff --git a/resource-manager/search/2023-11-01/querykeys/predicates.go b/resource-manager/search/2023-11-01/querykeys/predicates.go index 488b6d75c41..6287d6738be 100644 --- a/resource-manager/search/2023-11-01/querykeys/predicates.go +++ b/resource-manager/search/2023-11-01/querykeys/predicates.go @@ -3,13 +3,18 @@ package querykeys // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ListQueryKeysResultOperationPredicate struct { - NextLink *string +type QueryKeyOperationPredicate struct { + Key *string + Name *string } -func (p ListQueryKeysResultOperationPredicate) Matches(input ListQueryKeysResult) bool { +func (p QueryKeyOperationPredicate) Matches(input QueryKey) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Key != nil && (input.Key == nil || *p.Key != *input.Key) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { return false } diff --git a/resource-manager/security/2020-01-01/alerts/model_alertproperties.go b/resource-manager/security/2020-01-01/alerts/model_alertproperties.go index 8d73925d9ec..563803ca341 100644 --- a/resource-manager/security/2020-01-01/alerts/model_alertproperties.go +++ b/resource-manager/security/2020-01-01/alerts/model_alertproperties.go @@ -116,7 +116,7 @@ func (s *AlertProperties) UnmarshalJSON(bytes []byte) error { } output = append(output, impl) } - s.ResourceIdentifiers = &output + s.ResourceIdentifiers = output } return nil } diff --git a/resource-manager/securityinsights/2021-09-01-preview/repositories/method_sourcecontrollistrepositories.go b/resource-manager/securityinsights/2021-09-01-preview/repositories/method_sourcecontrollistrepositories.go index 91275a893ab..3a007266273 100644 --- a/resource-manager/securityinsights/2021-09-01-preview/repositories/method_sourcecontrollistrepositories.go +++ b/resource-manager/securityinsights/2021-09-01-preview/repositories/method_sourcecontrollistrepositories.go @@ -15,12 +15,12 @@ import ( type SourceControllistRepositoriesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]RepoList + Model *[]Repo } type SourceControllistRepositoriesCompleteResult struct { LatestHttpResponse *http.Response - Items []RepoList + Items []Repo } // SourceControllistRepositories ... @@ -50,7 +50,7 @@ func (c RepositoriesClient) SourceControllistRepositories(ctx context.Context, i } var values struct { - Values *[]RepoList `json:"value"` + Values *[]Repo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c RepositoriesClient) SourceControllistRepositories(ctx context.Context, i // SourceControllistRepositoriesComplete retrieves all the results into a single object func (c RepositoriesClient) SourceControllistRepositoriesComplete(ctx context.Context, id WorkspaceId, input RepoType) (SourceControllistRepositoriesCompleteResult, error) { - return c.SourceControllistRepositoriesCompleteMatchingPredicate(ctx, id, input, RepoListOperationPredicate{}) + return c.SourceControllistRepositoriesCompleteMatchingPredicate(ctx, id, input, RepoOperationPredicate{}) } // SourceControllistRepositoriesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RepositoriesClient) SourceControllistRepositoriesCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input RepoType, predicate RepoListOperationPredicate) (result SourceControllistRepositoriesCompleteResult, err error) { - items := make([]RepoList, 0) +func (c RepositoriesClient) SourceControllistRepositoriesCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input RepoType, predicate RepoOperationPredicate) (result SourceControllistRepositoriesCompleteResult, err error) { + items := make([]Repo, 0) resp, err := c.SourceControllistRepositories(ctx, id, input) if err != nil { diff --git a/resource-manager/securityinsights/2021-09-01-preview/repositories/model_repolist.go b/resource-manager/securityinsights/2021-09-01-preview/repositories/model_repolist.go deleted file mode 100644 index c2b5c34b668..00000000000 --- a/resource-manager/securityinsights/2021-09-01-preview/repositories/model_repolist.go +++ /dev/null @@ -1,9 +0,0 @@ -package repositories - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RepoList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []Repo `json:"value"` -} diff --git a/resource-manager/securityinsights/2021-09-01-preview/repositories/predicates.go b/resource-manager/securityinsights/2021-09-01-preview/repositories/predicates.go index 1f9730d4db4..948d5824d0f 100644 --- a/resource-manager/securityinsights/2021-09-01-preview/repositories/predicates.go +++ b/resource-manager/securityinsights/2021-09-01-preview/repositories/predicates.go @@ -3,13 +3,18 @@ package repositories // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type RepoListOperationPredicate struct { - NextLink *string +type RepoOperationPredicate struct { + FullName *string + Url *string } -func (p RepoListOperationPredicate) Matches(input RepoList) bool { +func (p RepoOperationPredicate) Matches(input Repo) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.FullName != nil && (input.FullName == nil || *p.FullName != *input.FullName) { + return false + } + + if p.Url != nil && (input.Url == nil || *p.Url != *input.Url) { return false } diff --git a/resource-manager/securityinsights/2021-09-01-preview/threatintelligence/method_indicatorqueryindicators.go b/resource-manager/securityinsights/2021-09-01-preview/threatintelligence/method_indicatorqueryindicators.go index 6177b36e32a..8ce639f2623 100644 --- a/resource-manager/securityinsights/2021-09-01-preview/threatintelligence/method_indicatorqueryindicators.go +++ b/resource-manager/securityinsights/2021-09-01-preview/threatintelligence/method_indicatorqueryindicators.go @@ -2,6 +2,7 @@ package threatintelligence import ( "context" + "encoding/json" "fmt" "net/http" @@ -15,12 +16,12 @@ import ( type IndicatorQueryIndicatorsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ThreatIntelligenceInformationList + Model *[]ThreatIntelligenceInformation } type IndicatorQueryIndicatorsCompleteResult struct { LatestHttpResponse *http.Response - Items []ThreatIntelligenceInformationList + Items []ThreatIntelligenceInformation } // IndicatorQueryIndicators ... @@ -50,25 +51,36 @@ func (c ThreatIntelligenceClient) IndicatorQueryIndicators(ctx context.Context, } var values struct { - Values *[]ThreatIntelligenceInformationList `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]ThreatIntelligenceInformation, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalThreatIntelligenceInformationImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } // IndicatorQueryIndicatorsComplete retrieves all the results into a single object func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsComplete(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria) (IndicatorQueryIndicatorsCompleteResult, error) { - return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationListOperationPredicate{}) + return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationOperationPredicate{}) } // IndicatorQueryIndicatorsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationListOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { - items := make([]ThreatIntelligenceInformationList, 0) +func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { + items := make([]ThreatIntelligenceInformation, 0) resp, err := c.IndicatorQueryIndicators(ctx, id, input) if err != nil { diff --git a/resource-manager/securityinsights/2021-09-01-preview/threatintelligence/model_threatintelligenceinformationlist.go b/resource-manager/securityinsights/2021-09-01-preview/threatintelligence/model_threatintelligenceinformationlist.go deleted file mode 100644 index 5be60cfac3c..00000000000 --- a/resource-manager/securityinsights/2021-09-01-preview/threatintelligence/model_threatintelligenceinformationlist.go +++ /dev/null @@ -1,49 +0,0 @@ -package threatintelligence - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ThreatIntelligenceInformationList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []ThreatIntelligenceInformation `json:"value"` -} - -var _ json.Unmarshaler = &ThreatIntelligenceInformationList{} - -func (s *ThreatIntelligenceInformationList) UnmarshalJSON(bytes []byte) error { - type alias ThreatIntelligenceInformationList - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ThreatIntelligenceInformationList: %+v", err) - } - - s.NextLink = decoded.NextLink - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ThreatIntelligenceInformationList into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]ThreatIntelligenceInformation, 0) - for i, val := range listTemp { - impl, err := unmarshalThreatIntelligenceInformationImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'ThreatIntelligenceInformationList': %+v", i, err) - } - output = append(output, impl) - } - s.Value = output - } - return nil -} diff --git a/resource-manager/securityinsights/2021-09-01-preview/threatintelligence/predicates.go b/resource-manager/securityinsights/2021-09-01-preview/threatintelligence/predicates.go index a1bffbe8b0f..6020562ed4b 100644 --- a/resource-manager/securityinsights/2021-09-01-preview/threatintelligence/predicates.go +++ b/resource-manager/securityinsights/2021-09-01-preview/threatintelligence/predicates.go @@ -10,16 +10,3 @@ func (p ThreatIntelligenceInformationOperationPredicate) Matches(input ThreatInt return true } - -type ThreatIntelligenceInformationListOperationPredicate struct { - NextLink *string -} - -func (p ThreatIntelligenceInformationListOperationPredicate) Matches(input ThreatIntelligenceInformationList) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} diff --git a/resource-manager/securityinsights/2022-07-01-preview/repositories/method_sourcecontrollistrepositories.go b/resource-manager/securityinsights/2022-07-01-preview/repositories/method_sourcecontrollistrepositories.go index 91275a893ab..3a007266273 100644 --- a/resource-manager/securityinsights/2022-07-01-preview/repositories/method_sourcecontrollistrepositories.go +++ b/resource-manager/securityinsights/2022-07-01-preview/repositories/method_sourcecontrollistrepositories.go @@ -15,12 +15,12 @@ import ( type SourceControllistRepositoriesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]RepoList + Model *[]Repo } type SourceControllistRepositoriesCompleteResult struct { LatestHttpResponse *http.Response - Items []RepoList + Items []Repo } // SourceControllistRepositories ... @@ -50,7 +50,7 @@ func (c RepositoriesClient) SourceControllistRepositories(ctx context.Context, i } var values struct { - Values *[]RepoList `json:"value"` + Values *[]Repo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c RepositoriesClient) SourceControllistRepositories(ctx context.Context, i // SourceControllistRepositoriesComplete retrieves all the results into a single object func (c RepositoriesClient) SourceControllistRepositoriesComplete(ctx context.Context, id WorkspaceId, input RepoType) (SourceControllistRepositoriesCompleteResult, error) { - return c.SourceControllistRepositoriesCompleteMatchingPredicate(ctx, id, input, RepoListOperationPredicate{}) + return c.SourceControllistRepositoriesCompleteMatchingPredicate(ctx, id, input, RepoOperationPredicate{}) } // SourceControllistRepositoriesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RepositoriesClient) SourceControllistRepositoriesCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input RepoType, predicate RepoListOperationPredicate) (result SourceControllistRepositoriesCompleteResult, err error) { - items := make([]RepoList, 0) +func (c RepositoriesClient) SourceControllistRepositoriesCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input RepoType, predicate RepoOperationPredicate) (result SourceControllistRepositoriesCompleteResult, err error) { + items := make([]Repo, 0) resp, err := c.SourceControllistRepositories(ctx, id, input) if err != nil { diff --git a/resource-manager/securityinsights/2022-07-01-preview/repositories/model_repolist.go b/resource-manager/securityinsights/2022-07-01-preview/repositories/model_repolist.go deleted file mode 100644 index c2b5c34b668..00000000000 --- a/resource-manager/securityinsights/2022-07-01-preview/repositories/model_repolist.go +++ /dev/null @@ -1,9 +0,0 @@ -package repositories - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RepoList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []Repo `json:"value"` -} diff --git a/resource-manager/securityinsights/2022-07-01-preview/repositories/predicates.go b/resource-manager/securityinsights/2022-07-01-preview/repositories/predicates.go index 1f9730d4db4..948d5824d0f 100644 --- a/resource-manager/securityinsights/2022-07-01-preview/repositories/predicates.go +++ b/resource-manager/securityinsights/2022-07-01-preview/repositories/predicates.go @@ -3,13 +3,18 @@ package repositories // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type RepoListOperationPredicate struct { - NextLink *string +type RepoOperationPredicate struct { + FullName *string + Url *string } -func (p RepoListOperationPredicate) Matches(input RepoList) bool { +func (p RepoOperationPredicate) Matches(input Repo) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.FullName != nil && (input.FullName == nil || *p.FullName != *input.FullName) { + return false + } + + if p.Url != nil && (input.Url == nil || *p.Url != *input.Url) { return false } diff --git a/resource-manager/securityinsights/2022-07-01-preview/threatintelligence/method_indicatorqueryindicators.go b/resource-manager/securityinsights/2022-07-01-preview/threatintelligence/method_indicatorqueryindicators.go index 6177b36e32a..8ce639f2623 100644 --- a/resource-manager/securityinsights/2022-07-01-preview/threatintelligence/method_indicatorqueryindicators.go +++ b/resource-manager/securityinsights/2022-07-01-preview/threatintelligence/method_indicatorqueryindicators.go @@ -2,6 +2,7 @@ package threatintelligence import ( "context" + "encoding/json" "fmt" "net/http" @@ -15,12 +16,12 @@ import ( type IndicatorQueryIndicatorsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ThreatIntelligenceInformationList + Model *[]ThreatIntelligenceInformation } type IndicatorQueryIndicatorsCompleteResult struct { LatestHttpResponse *http.Response - Items []ThreatIntelligenceInformationList + Items []ThreatIntelligenceInformation } // IndicatorQueryIndicators ... @@ -50,25 +51,36 @@ func (c ThreatIntelligenceClient) IndicatorQueryIndicators(ctx context.Context, } var values struct { - Values *[]ThreatIntelligenceInformationList `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]ThreatIntelligenceInformation, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalThreatIntelligenceInformationImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } // IndicatorQueryIndicatorsComplete retrieves all the results into a single object func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsComplete(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria) (IndicatorQueryIndicatorsCompleteResult, error) { - return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationListOperationPredicate{}) + return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationOperationPredicate{}) } // IndicatorQueryIndicatorsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationListOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { - items := make([]ThreatIntelligenceInformationList, 0) +func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { + items := make([]ThreatIntelligenceInformation, 0) resp, err := c.IndicatorQueryIndicators(ctx, id, input) if err != nil { diff --git a/resource-manager/securityinsights/2022-07-01-preview/threatintelligence/model_threatintelligenceinformationlist.go b/resource-manager/securityinsights/2022-07-01-preview/threatintelligence/model_threatintelligenceinformationlist.go deleted file mode 100644 index 5be60cfac3c..00000000000 --- a/resource-manager/securityinsights/2022-07-01-preview/threatintelligence/model_threatintelligenceinformationlist.go +++ /dev/null @@ -1,49 +0,0 @@ -package threatintelligence - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ThreatIntelligenceInformationList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []ThreatIntelligenceInformation `json:"value"` -} - -var _ json.Unmarshaler = &ThreatIntelligenceInformationList{} - -func (s *ThreatIntelligenceInformationList) UnmarshalJSON(bytes []byte) error { - type alias ThreatIntelligenceInformationList - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ThreatIntelligenceInformationList: %+v", err) - } - - s.NextLink = decoded.NextLink - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ThreatIntelligenceInformationList into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]ThreatIntelligenceInformation, 0) - for i, val := range listTemp { - impl, err := unmarshalThreatIntelligenceInformationImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'ThreatIntelligenceInformationList': %+v", i, err) - } - output = append(output, impl) - } - s.Value = output - } - return nil -} diff --git a/resource-manager/securityinsights/2022-07-01-preview/threatintelligence/predicates.go b/resource-manager/securityinsights/2022-07-01-preview/threatintelligence/predicates.go index a1bffbe8b0f..6020562ed4b 100644 --- a/resource-manager/securityinsights/2022-07-01-preview/threatintelligence/predicates.go +++ b/resource-manager/securityinsights/2022-07-01-preview/threatintelligence/predicates.go @@ -10,16 +10,3 @@ func (p ThreatIntelligenceInformationOperationPredicate) Matches(input ThreatInt return true } - -type ThreatIntelligenceInformationListOperationPredicate struct { - NextLink *string -} - -func (p ThreatIntelligenceInformationListOperationPredicate) Matches(input ThreatIntelligenceInformationList) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} diff --git a/resource-manager/securityinsights/2022-08-01/threatintelligence/method_indicatorqueryindicators.go b/resource-manager/securityinsights/2022-08-01/threatintelligence/method_indicatorqueryindicators.go index 6177b36e32a..8ce639f2623 100644 --- a/resource-manager/securityinsights/2022-08-01/threatintelligence/method_indicatorqueryindicators.go +++ b/resource-manager/securityinsights/2022-08-01/threatintelligence/method_indicatorqueryindicators.go @@ -2,6 +2,7 @@ package threatintelligence import ( "context" + "encoding/json" "fmt" "net/http" @@ -15,12 +16,12 @@ import ( type IndicatorQueryIndicatorsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ThreatIntelligenceInformationList + Model *[]ThreatIntelligenceInformation } type IndicatorQueryIndicatorsCompleteResult struct { LatestHttpResponse *http.Response - Items []ThreatIntelligenceInformationList + Items []ThreatIntelligenceInformation } // IndicatorQueryIndicators ... @@ -50,25 +51,36 @@ func (c ThreatIntelligenceClient) IndicatorQueryIndicators(ctx context.Context, } var values struct { - Values *[]ThreatIntelligenceInformationList `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]ThreatIntelligenceInformation, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalThreatIntelligenceInformationImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } // IndicatorQueryIndicatorsComplete retrieves all the results into a single object func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsComplete(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria) (IndicatorQueryIndicatorsCompleteResult, error) { - return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationListOperationPredicate{}) + return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationOperationPredicate{}) } // IndicatorQueryIndicatorsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationListOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { - items := make([]ThreatIntelligenceInformationList, 0) +func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { + items := make([]ThreatIntelligenceInformation, 0) resp, err := c.IndicatorQueryIndicators(ctx, id, input) if err != nil { diff --git a/resource-manager/securityinsights/2022-08-01/threatintelligence/model_threatintelligenceinformationlist.go b/resource-manager/securityinsights/2022-08-01/threatintelligence/model_threatintelligenceinformationlist.go deleted file mode 100644 index 5be60cfac3c..00000000000 --- a/resource-manager/securityinsights/2022-08-01/threatintelligence/model_threatintelligenceinformationlist.go +++ /dev/null @@ -1,49 +0,0 @@ -package threatintelligence - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ThreatIntelligenceInformationList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []ThreatIntelligenceInformation `json:"value"` -} - -var _ json.Unmarshaler = &ThreatIntelligenceInformationList{} - -func (s *ThreatIntelligenceInformationList) UnmarshalJSON(bytes []byte) error { - type alias ThreatIntelligenceInformationList - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ThreatIntelligenceInformationList: %+v", err) - } - - s.NextLink = decoded.NextLink - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ThreatIntelligenceInformationList into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]ThreatIntelligenceInformation, 0) - for i, val := range listTemp { - impl, err := unmarshalThreatIntelligenceInformationImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'ThreatIntelligenceInformationList': %+v", i, err) - } - output = append(output, impl) - } - s.Value = output - } - return nil -} diff --git a/resource-manager/securityinsights/2022-08-01/threatintelligence/predicates.go b/resource-manager/securityinsights/2022-08-01/threatintelligence/predicates.go index a1bffbe8b0f..6020562ed4b 100644 --- a/resource-manager/securityinsights/2022-08-01/threatintelligence/predicates.go +++ b/resource-manager/securityinsights/2022-08-01/threatintelligence/predicates.go @@ -10,16 +10,3 @@ func (p ThreatIntelligenceInformationOperationPredicate) Matches(input ThreatInt return true } - -type ThreatIntelligenceInformationListOperationPredicate struct { - NextLink *string -} - -func (p ThreatIntelligenceInformationListOperationPredicate) Matches(input ThreatIntelligenceInformationList) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/repositories/method_sourcecontrollistrepositories.go b/resource-manager/securityinsights/2022-10-01-preview/repositories/method_sourcecontrollistrepositories.go index 91275a893ab..3a007266273 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/repositories/method_sourcecontrollistrepositories.go +++ b/resource-manager/securityinsights/2022-10-01-preview/repositories/method_sourcecontrollistrepositories.go @@ -15,12 +15,12 @@ import ( type SourceControllistRepositoriesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]RepoList + Model *[]Repo } type SourceControllistRepositoriesCompleteResult struct { LatestHttpResponse *http.Response - Items []RepoList + Items []Repo } // SourceControllistRepositories ... @@ -50,7 +50,7 @@ func (c RepositoriesClient) SourceControllistRepositories(ctx context.Context, i } var values struct { - Values *[]RepoList `json:"value"` + Values *[]Repo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c RepositoriesClient) SourceControllistRepositories(ctx context.Context, i // SourceControllistRepositoriesComplete retrieves all the results into a single object func (c RepositoriesClient) SourceControllistRepositoriesComplete(ctx context.Context, id WorkspaceId, input RepoType) (SourceControllistRepositoriesCompleteResult, error) { - return c.SourceControllistRepositoriesCompleteMatchingPredicate(ctx, id, input, RepoListOperationPredicate{}) + return c.SourceControllistRepositoriesCompleteMatchingPredicate(ctx, id, input, RepoOperationPredicate{}) } // SourceControllistRepositoriesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RepositoriesClient) SourceControllistRepositoriesCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input RepoType, predicate RepoListOperationPredicate) (result SourceControllistRepositoriesCompleteResult, err error) { - items := make([]RepoList, 0) +func (c RepositoriesClient) SourceControllistRepositoriesCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input RepoType, predicate RepoOperationPredicate) (result SourceControllistRepositoriesCompleteResult, err error) { + items := make([]Repo, 0) resp, err := c.SourceControllistRepositories(ctx, id, input) if err != nil { diff --git a/resource-manager/securityinsights/2022-10-01-preview/repositories/model_repolist.go b/resource-manager/securityinsights/2022-10-01-preview/repositories/model_repolist.go deleted file mode 100644 index c2b5c34b668..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/repositories/model_repolist.go +++ /dev/null @@ -1,9 +0,0 @@ -package repositories - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RepoList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []Repo `json:"value"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/repositories/predicates.go b/resource-manager/securityinsights/2022-10-01-preview/repositories/predicates.go index 1f9730d4db4..948d5824d0f 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/repositories/predicates.go +++ b/resource-manager/securityinsights/2022-10-01-preview/repositories/predicates.go @@ -3,13 +3,18 @@ package repositories // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type RepoListOperationPredicate struct { - NextLink *string +type RepoOperationPredicate struct { + FullName *string + Url *string } -func (p RepoListOperationPredicate) Matches(input RepoList) bool { +func (p RepoOperationPredicate) Matches(input Repo) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.FullName != nil && (input.FullName == nil || *p.FullName != *input.FullName) { + return false + } + + if p.Url != nil && (input.Url == nil || *p.Url != *input.Url) { return false } diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorqueryindicators.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorqueryindicators.go index 6177b36e32a..8ce639f2623 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorqueryindicators.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorqueryindicators.go @@ -2,6 +2,7 @@ package threatintelligence import ( "context" + "encoding/json" "fmt" "net/http" @@ -15,12 +16,12 @@ import ( type IndicatorQueryIndicatorsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ThreatIntelligenceInformationList + Model *[]ThreatIntelligenceInformation } type IndicatorQueryIndicatorsCompleteResult struct { LatestHttpResponse *http.Response - Items []ThreatIntelligenceInformationList + Items []ThreatIntelligenceInformation } // IndicatorQueryIndicators ... @@ -50,25 +51,36 @@ func (c ThreatIntelligenceClient) IndicatorQueryIndicators(ctx context.Context, } var values struct { - Values *[]ThreatIntelligenceInformationList `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]ThreatIntelligenceInformation, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalThreatIntelligenceInformationImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } // IndicatorQueryIndicatorsComplete retrieves all the results into a single object func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsComplete(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria) (IndicatorQueryIndicatorsCompleteResult, error) { - return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationListOperationPredicate{}) + return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationOperationPredicate{}) } // IndicatorQueryIndicatorsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationListOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { - items := make([]ThreatIntelligenceInformationList, 0) +func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { + items := make([]ThreatIntelligenceInformation, 0) resp, err := c.IndicatorQueryIndicators(ctx, id, input) if err != nil { diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/model_threatintelligenceinformationlist.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/model_threatintelligenceinformationlist.go deleted file mode 100644 index 5be60cfac3c..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/model_threatintelligenceinformationlist.go +++ /dev/null @@ -1,49 +0,0 @@ -package threatintelligence - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ThreatIntelligenceInformationList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []ThreatIntelligenceInformation `json:"value"` -} - -var _ json.Unmarshaler = &ThreatIntelligenceInformationList{} - -func (s *ThreatIntelligenceInformationList) UnmarshalJSON(bytes []byte) error { - type alias ThreatIntelligenceInformationList - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ThreatIntelligenceInformationList: %+v", err) - } - - s.NextLink = decoded.NextLink - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ThreatIntelligenceInformationList into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]ThreatIntelligenceInformation, 0) - for i, val := range listTemp { - impl, err := unmarshalThreatIntelligenceInformationImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'ThreatIntelligenceInformationList': %+v", i, err) - } - output = append(output, impl) - } - s.Value = output - } - return nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/predicates.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/predicates.go index a1bffbe8b0f..6020562ed4b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/predicates.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/predicates.go @@ -10,16 +10,3 @@ func (p ThreatIntelligenceInformationOperationPredicate) Matches(input ThreatInt return true } - -type ThreatIntelligenceInformationListOperationPredicate struct { - NextLink *string -} - -func (p ThreatIntelligenceInformationListOperationPredicate) Matches(input ThreatIntelligenceInformationList) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorqueryindicators.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorqueryindicators.go index 6177b36e32a..8ce639f2623 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorqueryindicators.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorqueryindicators.go @@ -2,6 +2,7 @@ package threatintelligence import ( "context" + "encoding/json" "fmt" "net/http" @@ -15,12 +16,12 @@ import ( type IndicatorQueryIndicatorsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ThreatIntelligenceInformationList + Model *[]ThreatIntelligenceInformation } type IndicatorQueryIndicatorsCompleteResult struct { LatestHttpResponse *http.Response - Items []ThreatIntelligenceInformationList + Items []ThreatIntelligenceInformation } // IndicatorQueryIndicators ... @@ -50,25 +51,36 @@ func (c ThreatIntelligenceClient) IndicatorQueryIndicators(ctx context.Context, } var values struct { - Values *[]ThreatIntelligenceInformationList `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]ThreatIntelligenceInformation, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalThreatIntelligenceInformationImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } // IndicatorQueryIndicatorsComplete retrieves all the results into a single object func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsComplete(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria) (IndicatorQueryIndicatorsCompleteResult, error) { - return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationListOperationPredicate{}) + return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationOperationPredicate{}) } // IndicatorQueryIndicatorsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationListOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { - items := make([]ThreatIntelligenceInformationList, 0) +func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { + items := make([]ThreatIntelligenceInformation, 0) resp, err := c.IndicatorQueryIndicators(ctx, id, input) if err != nil { diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/model_threatintelligenceinformationlist.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/model_threatintelligenceinformationlist.go deleted file mode 100644 index 5be60cfac3c..00000000000 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/model_threatintelligenceinformationlist.go +++ /dev/null @@ -1,49 +0,0 @@ -package threatintelligence - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ThreatIntelligenceInformationList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []ThreatIntelligenceInformation `json:"value"` -} - -var _ json.Unmarshaler = &ThreatIntelligenceInformationList{} - -func (s *ThreatIntelligenceInformationList) UnmarshalJSON(bytes []byte) error { - type alias ThreatIntelligenceInformationList - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ThreatIntelligenceInformationList: %+v", err) - } - - s.NextLink = decoded.NextLink - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ThreatIntelligenceInformationList into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]ThreatIntelligenceInformation, 0) - for i, val := range listTemp { - impl, err := unmarshalThreatIntelligenceInformationImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'ThreatIntelligenceInformationList': %+v", i, err) - } - output = append(output, impl) - } - s.Value = output - } - return nil -} diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/predicates.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/predicates.go index a1bffbe8b0f..6020562ed4b 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/predicates.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/predicates.go @@ -10,16 +10,3 @@ func (p ThreatIntelligenceInformationOperationPredicate) Matches(input ThreatInt return true } - -type ThreatIntelligenceInformationListOperationPredicate struct { - NextLink *string -} - -func (p ThreatIntelligenceInformationListOperationPredicate) Matches(input ThreatIntelligenceInformationList) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorqueryindicators.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorqueryindicators.go index 6177b36e32a..8ce639f2623 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorqueryindicators.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorqueryindicators.go @@ -2,6 +2,7 @@ package threatintelligence import ( "context" + "encoding/json" "fmt" "net/http" @@ -15,12 +16,12 @@ import ( type IndicatorQueryIndicatorsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ThreatIntelligenceInformationList + Model *[]ThreatIntelligenceInformation } type IndicatorQueryIndicatorsCompleteResult struct { LatestHttpResponse *http.Response - Items []ThreatIntelligenceInformationList + Items []ThreatIntelligenceInformation } // IndicatorQueryIndicators ... @@ -50,25 +51,36 @@ func (c ThreatIntelligenceClient) IndicatorQueryIndicators(ctx context.Context, } var values struct { - Values *[]ThreatIntelligenceInformationList `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]ThreatIntelligenceInformation, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalThreatIntelligenceInformationImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } // IndicatorQueryIndicatorsComplete retrieves all the results into a single object func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsComplete(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria) (IndicatorQueryIndicatorsCompleteResult, error) { - return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationListOperationPredicate{}) + return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationOperationPredicate{}) } // IndicatorQueryIndicatorsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationListOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { - items := make([]ThreatIntelligenceInformationList, 0) +func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { + items := make([]ThreatIntelligenceInformation, 0) resp, err := c.IndicatorQueryIndicators(ctx, id, input) if err != nil { diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/model_threatintelligenceinformationlist.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/model_threatintelligenceinformationlist.go deleted file mode 100644 index 5be60cfac3c..00000000000 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/model_threatintelligenceinformationlist.go +++ /dev/null @@ -1,49 +0,0 @@ -package threatintelligence - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ThreatIntelligenceInformationList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []ThreatIntelligenceInformation `json:"value"` -} - -var _ json.Unmarshaler = &ThreatIntelligenceInformationList{} - -func (s *ThreatIntelligenceInformationList) UnmarshalJSON(bytes []byte) error { - type alias ThreatIntelligenceInformationList - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ThreatIntelligenceInformationList: %+v", err) - } - - s.NextLink = decoded.NextLink - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ThreatIntelligenceInformationList into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]ThreatIntelligenceInformation, 0) - for i, val := range listTemp { - impl, err := unmarshalThreatIntelligenceInformationImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'ThreatIntelligenceInformationList': %+v", i, err) - } - output = append(output, impl) - } - s.Value = output - } - return nil -} diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/predicates.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/predicates.go index a1bffbe8b0f..6020562ed4b 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/predicates.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/predicates.go @@ -10,16 +10,3 @@ func (p ThreatIntelligenceInformationOperationPredicate) Matches(input ThreatInt return true } - -type ThreatIntelligenceInformationListOperationPredicate struct { - NextLink *string -} - -func (p ThreatIntelligenceInformationListOperationPredicate) Matches(input ThreatIntelligenceInformationList) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} diff --git a/resource-manager/securityinsights/2023-11-01/repositories/method_sourcecontrollistrepositories.go b/resource-manager/securityinsights/2023-11-01/repositories/method_sourcecontrollistrepositories.go index 61e852868f0..2ba9f22f421 100644 --- a/resource-manager/securityinsights/2023-11-01/repositories/method_sourcecontrollistrepositories.go +++ b/resource-manager/securityinsights/2023-11-01/repositories/method_sourcecontrollistrepositories.go @@ -15,12 +15,12 @@ import ( type SourceControllistRepositoriesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]RepoList + Model *[]Repo } type SourceControllistRepositoriesCompleteResult struct { LatestHttpResponse *http.Response - Items []RepoList + Items []Repo } // SourceControllistRepositories ... @@ -50,7 +50,7 @@ func (c RepositoriesClient) SourceControllistRepositories(ctx context.Context, i } var values struct { - Values *[]RepoList `json:"value"` + Values *[]Repo `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c RepositoriesClient) SourceControllistRepositories(ctx context.Context, i // SourceControllistRepositoriesComplete retrieves all the results into a single object func (c RepositoriesClient) SourceControllistRepositoriesComplete(ctx context.Context, id WorkspaceId, input RepositoryAccessProperties) (SourceControllistRepositoriesCompleteResult, error) { - return c.SourceControllistRepositoriesCompleteMatchingPredicate(ctx, id, input, RepoListOperationPredicate{}) + return c.SourceControllistRepositoriesCompleteMatchingPredicate(ctx, id, input, RepoOperationPredicate{}) } // SourceControllistRepositoriesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RepositoriesClient) SourceControllistRepositoriesCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input RepositoryAccessProperties, predicate RepoListOperationPredicate) (result SourceControllistRepositoriesCompleteResult, err error) { - items := make([]RepoList, 0) +func (c RepositoriesClient) SourceControllistRepositoriesCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input RepositoryAccessProperties, predicate RepoOperationPredicate) (result SourceControllistRepositoriesCompleteResult, err error) { + items := make([]Repo, 0) resp, err := c.SourceControllistRepositories(ctx, id, input) if err != nil { diff --git a/resource-manager/securityinsights/2023-11-01/repositories/model_repolist.go b/resource-manager/securityinsights/2023-11-01/repositories/model_repolist.go deleted file mode 100644 index c2b5c34b668..00000000000 --- a/resource-manager/securityinsights/2023-11-01/repositories/model_repolist.go +++ /dev/null @@ -1,9 +0,0 @@ -package repositories - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RepoList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []Repo `json:"value"` -} diff --git a/resource-manager/securityinsights/2023-11-01/repositories/predicates.go b/resource-manager/securityinsights/2023-11-01/repositories/predicates.go index 1f9730d4db4..da4546ad220 100644 --- a/resource-manager/securityinsights/2023-11-01/repositories/predicates.go +++ b/resource-manager/securityinsights/2023-11-01/repositories/predicates.go @@ -3,13 +3,23 @@ package repositories // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type RepoListOperationPredicate struct { - NextLink *string +type RepoOperationPredicate struct { + FullName *string + InstallationId *int64 + Url *string } -func (p RepoListOperationPredicate) Matches(input RepoList) bool { +func (p RepoOperationPredicate) Matches(input Repo) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.FullName != nil && (input.FullName == nil || *p.FullName != *input.FullName) { + return false + } + + if p.InstallationId != nil && (input.InstallationId == nil || *p.InstallationId != *input.InstallationId) { + return false + } + + if p.Url != nil && (input.Url == nil || *p.Url != *input.Url) { return false } diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorqueryindicators.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorqueryindicators.go index 6177b36e32a..8ce639f2623 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorqueryindicators.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorqueryindicators.go @@ -2,6 +2,7 @@ package threatintelligence import ( "context" + "encoding/json" "fmt" "net/http" @@ -15,12 +16,12 @@ import ( type IndicatorQueryIndicatorsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ThreatIntelligenceInformationList + Model *[]ThreatIntelligenceInformation } type IndicatorQueryIndicatorsCompleteResult struct { LatestHttpResponse *http.Response - Items []ThreatIntelligenceInformationList + Items []ThreatIntelligenceInformation } // IndicatorQueryIndicators ... @@ -50,25 +51,36 @@ func (c ThreatIntelligenceClient) IndicatorQueryIndicators(ctx context.Context, } var values struct { - Values *[]ThreatIntelligenceInformationList `json:"value"` + Values *[]json.RawMessage `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return } - result.Model = values.Values + temp := make([]ThreatIntelligenceInformation, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalThreatIntelligenceInformationImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp return } // IndicatorQueryIndicatorsComplete retrieves all the results into a single object func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsComplete(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria) (IndicatorQueryIndicatorsCompleteResult, error) { - return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationListOperationPredicate{}) + return c.IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx, id, input, ThreatIntelligenceInformationOperationPredicate{}) } // IndicatorQueryIndicatorsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationListOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { - items := make([]ThreatIntelligenceInformationList, 0) +func (c ThreatIntelligenceClient) IndicatorQueryIndicatorsCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, input ThreatIntelligenceFilteringCriteria, predicate ThreatIntelligenceInformationOperationPredicate) (result IndicatorQueryIndicatorsCompleteResult, err error) { + items := make([]ThreatIntelligenceInformation, 0) resp, err := c.IndicatorQueryIndicators(ctx, id, input) if err != nil { diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/model_threatintelligenceinformationlist.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/model_threatintelligenceinformationlist.go deleted file mode 100644 index 5be60cfac3c..00000000000 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/model_threatintelligenceinformationlist.go +++ /dev/null @@ -1,49 +0,0 @@ -package threatintelligence - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ThreatIntelligenceInformationList struct { - NextLink *string `json:"nextLink,omitempty"` - Value []ThreatIntelligenceInformation `json:"value"` -} - -var _ json.Unmarshaler = &ThreatIntelligenceInformationList{} - -func (s *ThreatIntelligenceInformationList) UnmarshalJSON(bytes []byte) error { - type alias ThreatIntelligenceInformationList - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ThreatIntelligenceInformationList: %+v", err) - } - - s.NextLink = decoded.NextLink - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ThreatIntelligenceInformationList into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]ThreatIntelligenceInformation, 0) - for i, val := range listTemp { - impl, err := unmarshalThreatIntelligenceInformationImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'ThreatIntelligenceInformationList': %+v", i, err) - } - output = append(output, impl) - } - s.Value = output - } - return nil -} diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/predicates.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/predicates.go index a1bffbe8b0f..6020562ed4b 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/predicates.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/predicates.go @@ -10,16 +10,3 @@ func (p ThreatIntelligenceInformationOperationPredicate) Matches(input ThreatInt return true } - -type ThreatIntelligenceInformationListOperationPredicate struct { - NextLink *string -} - -func (p ThreatIntelligenceInformationListOperationPredicate) Matches(input ThreatIntelligenceInformationList) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} diff --git a/resource-manager/streamanalytics/2020-03-01/clusters/method_liststreamingjobs.go b/resource-manager/streamanalytics/2020-03-01/clusters/method_liststreamingjobs.go index c6e5e0af69b..e31f18a1172 100644 --- a/resource-manager/streamanalytics/2020-03-01/clusters/method_liststreamingjobs.go +++ b/resource-manager/streamanalytics/2020-03-01/clusters/method_liststreamingjobs.go @@ -15,12 +15,12 @@ import ( type ListStreamingJobsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ClusterJobListResult + Model *[]ClusterJob } type ListStreamingJobsCompleteResult struct { LatestHttpResponse *http.Response - Items []ClusterJobListResult + Items []ClusterJob } // ListStreamingJobs ... @@ -50,7 +50,7 @@ func (c ClustersClient) ListStreamingJobs(ctx context.Context, id ClusterId) (re } var values struct { - Values *[]ClusterJobListResult `json:"value"` + Values *[]ClusterJob `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c ClustersClient) ListStreamingJobs(ctx context.Context, id ClusterId) (re // ListStreamingJobsComplete retrieves all the results into a single object func (c ClustersClient) ListStreamingJobsComplete(ctx context.Context, id ClusterId) (ListStreamingJobsCompleteResult, error) { - return c.ListStreamingJobsCompleteMatchingPredicate(ctx, id, ClusterJobListResultOperationPredicate{}) + return c.ListStreamingJobsCompleteMatchingPredicate(ctx, id, ClusterJobOperationPredicate{}) } // ListStreamingJobsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ClustersClient) ListStreamingJobsCompleteMatchingPredicate(ctx context.Context, id ClusterId, predicate ClusterJobListResultOperationPredicate) (result ListStreamingJobsCompleteResult, err error) { - items := make([]ClusterJobListResult, 0) +func (c ClustersClient) ListStreamingJobsCompleteMatchingPredicate(ctx context.Context, id ClusterId, predicate ClusterJobOperationPredicate) (result ListStreamingJobsCompleteResult, err error) { + items := make([]ClusterJob, 0) resp, err := c.ListStreamingJobs(ctx, id) if err != nil { diff --git a/resource-manager/streamanalytics/2020-03-01/clusters/model_clusterjoblistresult.go b/resource-manager/streamanalytics/2020-03-01/clusters/model_clusterjoblistresult.go deleted file mode 100644 index 97781823752..00000000000 --- a/resource-manager/streamanalytics/2020-03-01/clusters/model_clusterjoblistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package clusters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterJobListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ClusterJob `json:"value,omitempty"` -} diff --git a/resource-manager/streamanalytics/2020-03-01/clusters/predicates.go b/resource-manager/streamanalytics/2020-03-01/clusters/predicates.go index 405245c2954..cf7beef404e 100644 --- a/resource-manager/streamanalytics/2020-03-01/clusters/predicates.go +++ b/resource-manager/streamanalytics/2020-03-01/clusters/predicates.go @@ -36,13 +36,18 @@ func (p ClusterOperationPredicate) Matches(input Cluster) bool { return true } -type ClusterJobListResultOperationPredicate struct { - NextLink *string +type ClusterJobOperationPredicate struct { + Id *string + StreamingUnits *int64 } -func (p ClusterJobListResultOperationPredicate) Matches(input ClusterJobListResult) bool { +func (p ClusterJobOperationPredicate) Matches(input ClusterJob) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.StreamingUnits != nil && (input.StreamingUnits == nil || *p.StreamingUnits != *input.StreamingUnits) { return false } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/README.md b/resource-manager/synapse/2021-06-01/integrationruntime/README.md index 0421fdb8f29..eb10672b7d5 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/README.md +++ b/resource-manager/synapse/2021-06-01/integrationruntime/README.md @@ -271,12 +271,13 @@ payload := integrationruntime.GetSsisObjectMetadataRequest{ } -read, err := client.ObjectMetadataList(ctx, id, payload) +// alternatively `client.ObjectMetadataList(ctx, id, payload)` can be used to do batched pagination +items, err := client.ObjectMetadataListComplete(ctx, id, payload) 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/synapse/2021-06-01/integrationruntime/method_objectmetadatalist.go b/resource-manager/synapse/2021-06-01/integrationruntime/method_objectmetadatalist.go index ba3e892b8f9..6b3cb30d8ff 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/method_objectmetadatalist.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/method_objectmetadatalist.go @@ -2,6 +2,7 @@ package integrationruntime import ( "context" + "encoding/json" "fmt" "net/http" @@ -15,7 +16,12 @@ import ( type ObjectMetadataListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SsisObjectMetadataListResponse + Model *[]SsisObjectMetadata +} + +type ObjectMetadataListCompleteResult struct { + LatestHttpResponse *http.Response + Items []SsisObjectMetadata } // ObjectMetadataList ... @@ -34,12 +40,8 @@ func (c IntegrationRuntimeClient) ObjectMetadataList(ctx context.Context, id Int return } - if err = req.Marshal(input); err != nil { - return - } - 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 @@ -48,12 +50,54 @@ func (c IntegrationRuntimeClient) ObjectMetadataList(ctx context.Context, id Int return } - var model SsisObjectMetadataListResponse - result.Model = &model + var values struct { + Values *[]json.RawMessage `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + temp := make([]SsisObjectMetadata, 0) + if values.Values != nil { + for i, v := range *values.Values { + val, err := unmarshalSsisObjectMetadataImplementation(v) + if err != nil { + err = fmt.Errorf("unmarshalling item %d for SsisObjectMetadata (%q): %+v", i, v, err) + return result, err + } + temp = append(temp, val) + } + } + result.Model = &temp - if err = resp.Unmarshal(result.Model); err != nil { + return +} + +// ObjectMetadataListComplete retrieves all the results into a single object +func (c IntegrationRuntimeClient) ObjectMetadataListComplete(ctx context.Context, id IntegrationRuntimeId, input GetSsisObjectMetadataRequest) (ObjectMetadataListCompleteResult, error) { + return c.ObjectMetadataListCompleteMatchingPredicate(ctx, id, input, SsisObjectMetadataOperationPredicate{}) +} + +// ObjectMetadataListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c IntegrationRuntimeClient) ObjectMetadataListCompleteMatchingPredicate(ctx context.Context, id IntegrationRuntimeId, input GetSsisObjectMetadataRequest, predicate SsisObjectMetadataOperationPredicate) (result ObjectMetadataListCompleteResult, err error) { + items := make([]SsisObjectMetadata, 0) + + resp, err := c.ObjectMetadataList(ctx, id, input) + if err != nil { + 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 = ObjectMetadataListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } return } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisobjectmetadatalistresponse.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisobjectmetadatalistresponse.go deleted file mode 100644 index 36d25acd550..00000000000 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisobjectmetadatalistresponse.go +++ /dev/null @@ -1,49 +0,0 @@ -package integrationruntime - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SsisObjectMetadataListResponse struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]SsisObjectMetadata `json:"value,omitempty"` -} - -var _ json.Unmarshaler = &SsisObjectMetadataListResponse{} - -func (s *SsisObjectMetadataListResponse) UnmarshalJSON(bytes []byte) error { - type alias SsisObjectMetadataListResponse - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into SsisObjectMetadataListResponse: %+v", err) - } - - s.NextLink = decoded.NextLink - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling SsisObjectMetadataListResponse into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]SsisObjectMetadata, 0) - for i, val := range listTemp { - impl, err := unmarshalSsisObjectMetadataImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'SsisObjectMetadataListResponse': %+v", i, err) - } - output = append(output, impl) - } - s.Value = &output - } - return nil -} diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/predicates.go b/resource-manager/synapse/2021-06-01/integrationruntime/predicates.go index 5e5379af578..1dd302d55e4 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/predicates.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/predicates.go @@ -30,3 +30,11 @@ func (p IntegrationRuntimeResourceOperationPredicate) Matches(input IntegrationR return true } + +type SsisObjectMetadataOperationPredicate struct { +} + +func (p SsisObjectMetadataOperationPredicate) Matches(input SsisObjectMetadata) bool { + + return true +} diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_changevnet.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_changevnet.go index ab6359e687f..3c0aaf531fd 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_changevnet.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_changevnet.go @@ -19,12 +19,12 @@ type ChangeVnetOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]WebAppCollection + Model *[]Site } type ChangeVnetCompleteResult struct { LatestHttpResponse *http.Response - Items []WebAppCollection + Items []Site } // ChangeVnet ... diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_resume.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_resume.go index 72168224f8f..def906a3f1a 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_resume.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_resume.go @@ -19,12 +19,12 @@ type ResumeOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]WebAppCollection + Model *[]Site } type ResumeCompleteResult struct { LatestHttpResponse *http.Response - Items []WebAppCollection + Items []Site } // Resume ... diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_suspend.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_suspend.go index de5db4df0e6..5395b21b683 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_suspend.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_suspend.go @@ -19,12 +19,12 @@ type SuspendOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]WebAppCollection + Model *[]Site } type SuspendCompleteResult struct { LatestHttpResponse *http.Response - Items []WebAppCollection + Items []Site } // Suspend ... diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/model_webappcollection.go b/resource-manager/web/2022-09-01/appserviceenvironments/model_webappcollection.go deleted file mode 100644 index b18de2b2ac3..00000000000 --- a/resource-manager/web/2022-09-01/appserviceenvironments/model_webappcollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package appserviceenvironments - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebAppCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []Site `json:"value"` -} diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/predicates.go b/resource-manager/web/2022-09-01/appserviceenvironments/predicates.go index 7cb05884c3a..96a5324bde9 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/predicates.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/predicates.go @@ -306,19 +306,6 @@ func (p UsageOperationPredicate) Matches(input Usage) bool { return true } -type WebAppCollectionOperationPredicate struct { - NextLink *string -} - -func (p WebAppCollectionOperationPredicate) Matches(input WebAppCollection) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} - type WorkerPoolResourceOperationPredicate struct { Id *string Kind *string diff --git a/resource-manager/web/2022-09-01/domains/method_listrecommendations.go b/resource-manager/web/2022-09-01/domains/method_listrecommendations.go index ebfd4b06501..148c7af4de3 100644 --- a/resource-manager/web/2022-09-01/domains/method_listrecommendations.go +++ b/resource-manager/web/2022-09-01/domains/method_listrecommendations.go @@ -16,12 +16,12 @@ import ( type ListRecommendationsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]NameIdentifierCollection + Model *[]NameIdentifier } type ListRecommendationsCompleteResult struct { LatestHttpResponse *http.Response - Items []NameIdentifierCollection + Items []NameIdentifier } // ListRecommendations ... @@ -51,7 +51,7 @@ func (c DomainsClient) ListRecommendations(ctx context.Context, id commonids.Sub } var values struct { - Values *[]NameIdentifierCollection `json:"value"` + Values *[]NameIdentifier `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -64,12 +64,12 @@ func (c DomainsClient) ListRecommendations(ctx context.Context, id commonids.Sub // ListRecommendationsComplete retrieves all the results into a single object func (c DomainsClient) ListRecommendationsComplete(ctx context.Context, id commonids.SubscriptionId, input DomainRecommendationSearchParameters) (ListRecommendationsCompleteResult, error) { - return c.ListRecommendationsCompleteMatchingPredicate(ctx, id, input, NameIdentifierCollectionOperationPredicate{}) + return c.ListRecommendationsCompleteMatchingPredicate(ctx, id, input, NameIdentifierOperationPredicate{}) } // ListRecommendationsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DomainsClient) ListRecommendationsCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, input DomainRecommendationSearchParameters, predicate NameIdentifierCollectionOperationPredicate) (result ListRecommendationsCompleteResult, err error) { - items := make([]NameIdentifierCollection, 0) +func (c DomainsClient) ListRecommendationsCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, input DomainRecommendationSearchParameters, predicate NameIdentifierOperationPredicate) (result ListRecommendationsCompleteResult, err error) { + items := make([]NameIdentifier, 0) resp, err := c.ListRecommendations(ctx, id, input) if err != nil { diff --git a/resource-manager/web/2022-09-01/domains/model_nameidentifiercollection.go b/resource-manager/web/2022-09-01/domains/model_nameidentifiercollection.go deleted file mode 100644 index 25cc8a75f77..00000000000 --- a/resource-manager/web/2022-09-01/domains/model_nameidentifiercollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package domains - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NameIdentifierCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []NameIdentifier `json:"value"` -} diff --git a/resource-manager/web/2022-09-01/domains/predicates.go b/resource-manager/web/2022-09-01/domains/predicates.go index 0f1cd8764c5..dcd7e69873b 100644 --- a/resource-manager/web/2022-09-01/domains/predicates.go +++ b/resource-manager/web/2022-09-01/domains/predicates.go @@ -64,13 +64,13 @@ func (p DomainOwnershipIdentifierOperationPredicate) Matches(input DomainOwnersh return true } -type NameIdentifierCollectionOperationPredicate struct { - NextLink *string +type NameIdentifierOperationPredicate struct { + Name *string } -func (p NameIdentifierCollectionOperationPredicate) Matches(input NameIdentifierCollection) bool { +func (p NameIdentifierOperationPredicate) Matches(input NameIdentifier) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { return false } diff --git a/resource-manager/web/2022-09-01/resourceproviders/method_listsiteidentifiersassignedtohostname.go b/resource-manager/web/2022-09-01/resourceproviders/method_listsiteidentifiersassignedtohostname.go index 11881d211a0..ed3fb516578 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/method_listsiteidentifiersassignedtohostname.go +++ b/resource-manager/web/2022-09-01/resourceproviders/method_listsiteidentifiersassignedtohostname.go @@ -16,12 +16,12 @@ import ( type ListSiteIdentifiersAssignedToHostNameOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]IdentifierCollection + Model *[]Identifier } type ListSiteIdentifiersAssignedToHostNameCompleteResult struct { LatestHttpResponse *http.Response - Items []IdentifierCollection + Items []Identifier } // ListSiteIdentifiersAssignedToHostName ... @@ -51,7 +51,7 @@ func (c ResourceProvidersClient) ListSiteIdentifiersAssignedToHostName(ctx conte } var values struct { - Values *[]IdentifierCollection `json:"value"` + Values *[]Identifier `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -64,12 +64,12 @@ func (c ResourceProvidersClient) ListSiteIdentifiersAssignedToHostName(ctx conte // ListSiteIdentifiersAssignedToHostNameComplete retrieves all the results into a single object func (c ResourceProvidersClient) ListSiteIdentifiersAssignedToHostNameComplete(ctx context.Context, id commonids.SubscriptionId, input NameIdentifier) (ListSiteIdentifiersAssignedToHostNameCompleteResult, error) { - return c.ListSiteIdentifiersAssignedToHostNameCompleteMatchingPredicate(ctx, id, input, IdentifierCollectionOperationPredicate{}) + return c.ListSiteIdentifiersAssignedToHostNameCompleteMatchingPredicate(ctx, id, input, IdentifierOperationPredicate{}) } // ListSiteIdentifiersAssignedToHostNameCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ResourceProvidersClient) ListSiteIdentifiersAssignedToHostNameCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, input NameIdentifier, predicate IdentifierCollectionOperationPredicate) (result ListSiteIdentifiersAssignedToHostNameCompleteResult, err error) { - items := make([]IdentifierCollection, 0) +func (c ResourceProvidersClient) ListSiteIdentifiersAssignedToHostNameCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, input NameIdentifier, predicate IdentifierOperationPredicate) (result ListSiteIdentifiersAssignedToHostNameCompleteResult, err error) { + items := make([]Identifier, 0) resp, err := c.ListSiteIdentifiersAssignedToHostName(ctx, id, input) if err != nil { diff --git a/resource-manager/web/2022-09-01/resourceproviders/model_identifiercollection.go b/resource-manager/web/2022-09-01/resourceproviders/model_identifiercollection.go deleted file mode 100644 index 4a1a8d9b9ba..00000000000 --- a/resource-manager/web/2022-09-01/resourceproviders/model_identifiercollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package resourceproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IdentifierCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []Identifier `json:"value"` -} diff --git a/resource-manager/web/2022-09-01/resourceproviders/predicates.go b/resource-manager/web/2022-09-01/resourceproviders/predicates.go index 2b008445955..b7aa1094745 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/predicates.go +++ b/resource-manager/web/2022-09-01/resourceproviders/predicates.go @@ -87,13 +87,28 @@ func (p GeoRegionOperationPredicate) Matches(input GeoRegion) bool { return true } -type IdentifierCollectionOperationPredicate struct { - NextLink *string +type IdentifierOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string } -func (p IdentifierCollectionOperationPredicate) Matches(input IdentifierCollection) bool { +func (p IdentifierOperationPredicate) Matches(input Identifier) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + 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 } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getbuilddatabaseconnectionswithdetails.go b/resource-manager/web/2022-09-01/staticsites/method_getbuilddatabaseconnectionswithdetails.go index ad3ef9a5997..a32b0d4ac41 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getbuilddatabaseconnectionswithdetails.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getbuilddatabaseconnectionswithdetails.go @@ -15,12 +15,12 @@ import ( type GetBuildDatabaseConnectionsWithDetailsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]DatabaseConnectionCollection + Model *[]DatabaseConnection } type GetBuildDatabaseConnectionsWithDetailsCompleteResult struct { LatestHttpResponse *http.Response - Items []DatabaseConnectionCollection + Items []DatabaseConnection } // GetBuildDatabaseConnectionsWithDetails ... @@ -50,7 +50,7 @@ func (c StaticSitesClient) GetBuildDatabaseConnectionsWithDetails(ctx context.Co } var values struct { - Values *[]DatabaseConnectionCollection `json:"value"` + Values *[]DatabaseConnection `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c StaticSitesClient) GetBuildDatabaseConnectionsWithDetails(ctx context.Co // GetBuildDatabaseConnectionsWithDetailsComplete retrieves all the results into a single object func (c StaticSitesClient) GetBuildDatabaseConnectionsWithDetailsComplete(ctx context.Context, id BuildId) (GetBuildDatabaseConnectionsWithDetailsCompleteResult, error) { - return c.GetBuildDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx, id, DatabaseConnectionCollectionOperationPredicate{}) + return c.GetBuildDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx, id, DatabaseConnectionOperationPredicate{}) } // GetBuildDatabaseConnectionsWithDetailsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StaticSitesClient) GetBuildDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx context.Context, id BuildId, predicate DatabaseConnectionCollectionOperationPredicate) (result GetBuildDatabaseConnectionsWithDetailsCompleteResult, err error) { - items := make([]DatabaseConnectionCollection, 0) +func (c StaticSitesClient) GetBuildDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx context.Context, id BuildId, predicate DatabaseConnectionOperationPredicate) (result GetBuildDatabaseConnectionsWithDetailsCompleteResult, err error) { + items := make([]DatabaseConnection, 0) resp, err := c.GetBuildDatabaseConnectionsWithDetails(ctx, id) if err != nil { diff --git a/resource-manager/web/2022-09-01/staticsites/method_getdatabaseconnectionswithdetails.go b/resource-manager/web/2022-09-01/staticsites/method_getdatabaseconnectionswithdetails.go index 1f7571164f5..4c1fb498cae 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getdatabaseconnectionswithdetails.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getdatabaseconnectionswithdetails.go @@ -15,12 +15,12 @@ import ( type GetDatabaseConnectionsWithDetailsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]DatabaseConnectionCollection + Model *[]DatabaseConnection } type GetDatabaseConnectionsWithDetailsCompleteResult struct { LatestHttpResponse *http.Response - Items []DatabaseConnectionCollection + Items []DatabaseConnection } // GetDatabaseConnectionsWithDetails ... @@ -50,7 +50,7 @@ func (c StaticSitesClient) GetDatabaseConnectionsWithDetails(ctx context.Context } var values struct { - Values *[]DatabaseConnectionCollection `json:"value"` + Values *[]DatabaseConnection `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c StaticSitesClient) GetDatabaseConnectionsWithDetails(ctx context.Context // GetDatabaseConnectionsWithDetailsComplete retrieves all the results into a single object func (c StaticSitesClient) GetDatabaseConnectionsWithDetailsComplete(ctx context.Context, id StaticSiteId) (GetDatabaseConnectionsWithDetailsCompleteResult, error) { - return c.GetDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx, id, DatabaseConnectionCollectionOperationPredicate{}) + return c.GetDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx, id, DatabaseConnectionOperationPredicate{}) } // GetDatabaseConnectionsWithDetailsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StaticSitesClient) GetDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx context.Context, id StaticSiteId, predicate DatabaseConnectionCollectionOperationPredicate) (result GetDatabaseConnectionsWithDetailsCompleteResult, err error) { - items := make([]DatabaseConnectionCollection, 0) +func (c StaticSitesClient) GetDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx context.Context, id StaticSiteId, predicate DatabaseConnectionOperationPredicate) (result GetDatabaseConnectionsWithDetailsCompleteResult, err error) { + items := make([]DatabaseConnection, 0) resp, err := c.GetDatabaseConnectionsWithDetails(ctx, id) if err != nil { diff --git a/resource-manager/web/2022-09-01/staticsites/method_liststaticsiteusers.go b/resource-manager/web/2022-09-01/staticsites/method_liststaticsiteusers.go index d89541cd1c9..1c6904d7ecc 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_liststaticsiteusers.go +++ b/resource-manager/web/2022-09-01/staticsites/method_liststaticsiteusers.go @@ -15,12 +15,12 @@ import ( type ListStaticSiteUsersOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]StaticSiteUserCollection + Model *[]StaticSiteUserARMResource } type ListStaticSiteUsersCompleteResult struct { LatestHttpResponse *http.Response - Items []StaticSiteUserCollection + Items []StaticSiteUserARMResource } // ListStaticSiteUsers ... @@ -50,7 +50,7 @@ func (c StaticSitesClient) ListStaticSiteUsers(ctx context.Context, id AuthProvi } var values struct { - Values *[]StaticSiteUserCollection `json:"value"` + Values *[]StaticSiteUserARMResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c StaticSitesClient) ListStaticSiteUsers(ctx context.Context, id AuthProvi // ListStaticSiteUsersComplete retrieves all the results into a single object func (c StaticSitesClient) ListStaticSiteUsersComplete(ctx context.Context, id AuthProviderId) (ListStaticSiteUsersCompleteResult, error) { - return c.ListStaticSiteUsersCompleteMatchingPredicate(ctx, id, StaticSiteUserCollectionOperationPredicate{}) + return c.ListStaticSiteUsersCompleteMatchingPredicate(ctx, id, StaticSiteUserARMResourceOperationPredicate{}) } // ListStaticSiteUsersCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StaticSitesClient) ListStaticSiteUsersCompleteMatchingPredicate(ctx context.Context, id AuthProviderId, predicate StaticSiteUserCollectionOperationPredicate) (result ListStaticSiteUsersCompleteResult, err error) { - items := make([]StaticSiteUserCollection, 0) +func (c StaticSitesClient) ListStaticSiteUsersCompleteMatchingPredicate(ctx context.Context, id AuthProviderId, predicate StaticSiteUserARMResourceOperationPredicate) (result ListStaticSiteUsersCompleteResult, err error) { + items := make([]StaticSiteUserARMResource, 0) resp, err := c.ListStaticSiteUsers(ctx, id) if err != nil { diff --git a/resource-manager/web/2022-09-01/staticsites/model_databaseconnectioncollection.go b/resource-manager/web/2022-09-01/staticsites/model_databaseconnectioncollection.go deleted file mode 100644 index 6d0f58376bd..00000000000 --- a/resource-manager/web/2022-09-01/staticsites/model_databaseconnectioncollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package staticsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseConnectionCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []DatabaseConnection `json:"value"` -} diff --git a/resource-manager/web/2022-09-01/staticsites/model_staticsiteusercollection.go b/resource-manager/web/2022-09-01/staticsites/model_staticsiteusercollection.go deleted file mode 100644 index 000468b54f9..00000000000 --- a/resource-manager/web/2022-09-01/staticsites/model_staticsiteusercollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package staticsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticSiteUserCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []StaticSiteUserARMResource `json:"value"` -} diff --git a/resource-manager/web/2022-09-01/staticsites/predicates.go b/resource-manager/web/2022-09-01/staticsites/predicates.go index f2fc6b1832b..b27ed7b5388 100644 --- a/resource-manager/web/2022-09-01/staticsites/predicates.go +++ b/resource-manager/web/2022-09-01/staticsites/predicates.go @@ -31,19 +31,6 @@ func (p DatabaseConnectionOperationPredicate) Matches(input DatabaseConnection) return true } -type DatabaseConnectionCollectionOperationPredicate struct { - NextLink *string -} - -func (p DatabaseConnectionCollectionOperationPredicate) Matches(input DatabaseConnectionCollection) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} - type RemotePrivateEndpointConnectionARMResourceOperationPredicate struct { Id *string Kind *string @@ -245,13 +232,28 @@ func (p StaticSiteLinkedBackendARMResourceOperationPredicate) Matches(input Stat return true } -type StaticSiteUserCollectionOperationPredicate struct { - NextLink *string +type StaticSiteUserARMResourceOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string } -func (p StaticSiteUserCollectionOperationPredicate) Matches(input StaticSiteUserCollection) bool { +func (p StaticSiteUserARMResourceOperationPredicate) Matches(input StaticSiteUserARMResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + 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 } diff --git a/resource-manager/web/2022-09-01/topleveldomains/method_listagreements.go b/resource-manager/web/2022-09-01/topleveldomains/method_listagreements.go index c8f4e93dd34..d7f40d1d257 100644 --- a/resource-manager/web/2022-09-01/topleveldomains/method_listagreements.go +++ b/resource-manager/web/2022-09-01/topleveldomains/method_listagreements.go @@ -15,12 +15,12 @@ import ( type ListAgreementsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]TldLegalAgreementCollection + Model *[]TldLegalAgreement } type ListAgreementsCompleteResult struct { LatestHttpResponse *http.Response - Items []TldLegalAgreementCollection + Items []TldLegalAgreement } // ListAgreements ... @@ -50,7 +50,7 @@ func (c TopLevelDomainsClient) ListAgreements(ctx context.Context, id TopLevelDo } var values struct { - Values *[]TldLegalAgreementCollection `json:"value"` + Values *[]TldLegalAgreement `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c TopLevelDomainsClient) ListAgreements(ctx context.Context, id TopLevelDo // ListAgreementsComplete retrieves all the results into a single object func (c TopLevelDomainsClient) ListAgreementsComplete(ctx context.Context, id TopLevelDomainId, input TopLevelDomainAgreementOption) (ListAgreementsCompleteResult, error) { - return c.ListAgreementsCompleteMatchingPredicate(ctx, id, input, TldLegalAgreementCollectionOperationPredicate{}) + return c.ListAgreementsCompleteMatchingPredicate(ctx, id, input, TldLegalAgreementOperationPredicate{}) } // ListAgreementsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c TopLevelDomainsClient) ListAgreementsCompleteMatchingPredicate(ctx context.Context, id TopLevelDomainId, input TopLevelDomainAgreementOption, predicate TldLegalAgreementCollectionOperationPredicate) (result ListAgreementsCompleteResult, err error) { - items := make([]TldLegalAgreementCollection, 0) +func (c TopLevelDomainsClient) ListAgreementsCompleteMatchingPredicate(ctx context.Context, id TopLevelDomainId, input TopLevelDomainAgreementOption, predicate TldLegalAgreementOperationPredicate) (result ListAgreementsCompleteResult, err error) { + items := make([]TldLegalAgreement, 0) resp, err := c.ListAgreements(ctx, id, input) if err != nil { diff --git a/resource-manager/web/2022-09-01/topleveldomains/model_tldlegalagreementcollection.go b/resource-manager/web/2022-09-01/topleveldomains/model_tldlegalagreementcollection.go deleted file mode 100644 index b8707765fe3..00000000000 --- a/resource-manager/web/2022-09-01/topleveldomains/model_tldlegalagreementcollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package topleveldomains - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TldLegalAgreementCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []TldLegalAgreement `json:"value"` -} diff --git a/resource-manager/web/2022-09-01/topleveldomains/predicates.go b/resource-manager/web/2022-09-01/topleveldomains/predicates.go index 32d572f2e45..a85c5378eeb 100644 --- a/resource-manager/web/2022-09-01/topleveldomains/predicates.go +++ b/resource-manager/web/2022-09-01/topleveldomains/predicates.go @@ -3,13 +3,28 @@ package topleveldomains // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type TldLegalAgreementCollectionOperationPredicate struct { - NextLink *string +type TldLegalAgreementOperationPredicate struct { + AgreementKey *string + Content *string + Title *string + Url *string } -func (p TldLegalAgreementCollectionOperationPredicate) Matches(input TldLegalAgreementCollection) bool { +func (p TldLegalAgreementOperationPredicate) Matches(input TldLegalAgreement) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.AgreementKey != nil && *p.AgreementKey != input.AgreementKey { + return false + } + + if p.Content != nil && *p.Content != input.Content { + return false + } + + if p.Title != nil && *p.Title != input.Title { + return false + } + + if p.Url != nil && (input.Url == nil || *p.Url != *input.Url) { return false } diff --git a/resource-manager/web/2022-09-01/webapps/method_listsitebackups.go b/resource-manager/web/2022-09-01/webapps/method_listsitebackups.go index 8bca3e61995..2a0dfa9922d 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listsitebackups.go +++ b/resource-manager/web/2022-09-01/webapps/method_listsitebackups.go @@ -16,12 +16,12 @@ import ( type ListSiteBackupsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BackupItemCollection + Model *[]BackupItem } type ListSiteBackupsCompleteResult struct { LatestHttpResponse *http.Response - Items []BackupItemCollection + Items []BackupItem } // ListSiteBackups ... @@ -51,7 +51,7 @@ func (c WebAppsClient) ListSiteBackups(ctx context.Context, id commonids.AppServ } var values struct { - Values *[]BackupItemCollection `json:"value"` + Values *[]BackupItem `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -64,12 +64,12 @@ func (c WebAppsClient) ListSiteBackups(ctx context.Context, id commonids.AppServ // ListSiteBackupsComplete retrieves all the results into a single object func (c WebAppsClient) ListSiteBackupsComplete(ctx context.Context, id commonids.AppServiceId) (ListSiteBackupsCompleteResult, error) { - return c.ListSiteBackupsCompleteMatchingPredicate(ctx, id, BackupItemCollectionOperationPredicate{}) + return c.ListSiteBackupsCompleteMatchingPredicate(ctx, id, BackupItemOperationPredicate{}) } // ListSiteBackupsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebAppsClient) ListSiteBackupsCompleteMatchingPredicate(ctx context.Context, id commonids.AppServiceId, predicate BackupItemCollectionOperationPredicate) (result ListSiteBackupsCompleteResult, err error) { - items := make([]BackupItemCollection, 0) +func (c WebAppsClient) ListSiteBackupsCompleteMatchingPredicate(ctx context.Context, id commonids.AppServiceId, predicate BackupItemOperationPredicate) (result ListSiteBackupsCompleteResult, err error) { + items := make([]BackupItem, 0) resp, err := c.ListSiteBackups(ctx, id) if err != nil { diff --git a/resource-manager/web/2022-09-01/webapps/method_listsitebackupsslot.go b/resource-manager/web/2022-09-01/webapps/method_listsitebackupsslot.go index 18f42228f44..2d8dd37dbad 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listsitebackupsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listsitebackupsslot.go @@ -15,12 +15,12 @@ import ( type ListSiteBackupsSlotOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BackupItemCollection + Model *[]BackupItem } type ListSiteBackupsSlotCompleteResult struct { LatestHttpResponse *http.Response - Items []BackupItemCollection + Items []BackupItem } // ListSiteBackupsSlot ... @@ -50,7 +50,7 @@ func (c WebAppsClient) ListSiteBackupsSlot(ctx context.Context, id SlotId) (resu } var values struct { - Values *[]BackupItemCollection `json:"value"` + Values *[]BackupItem `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c WebAppsClient) ListSiteBackupsSlot(ctx context.Context, id SlotId) (resu // ListSiteBackupsSlotComplete retrieves all the results into a single object func (c WebAppsClient) ListSiteBackupsSlotComplete(ctx context.Context, id SlotId) (ListSiteBackupsSlotCompleteResult, error) { - return c.ListSiteBackupsSlotCompleteMatchingPredicate(ctx, id, BackupItemCollectionOperationPredicate{}) + return c.ListSiteBackupsSlotCompleteMatchingPredicate(ctx, id, BackupItemOperationPredicate{}) } // ListSiteBackupsSlotCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebAppsClient) ListSiteBackupsSlotCompleteMatchingPredicate(ctx context.Context, id SlotId, predicate BackupItemCollectionOperationPredicate) (result ListSiteBackupsSlotCompleteResult, err error) { - items := make([]BackupItemCollection, 0) +func (c WebAppsClient) ListSiteBackupsSlotCompleteMatchingPredicate(ctx context.Context, id SlotId, predicate BackupItemOperationPredicate) (result ListSiteBackupsSlotCompleteResult, err error) { + items := make([]BackupItem, 0) resp, err := c.ListSiteBackupsSlot(ctx, id) if err != nil { diff --git a/resource-manager/web/2022-09-01/webapps/method_listslotdifferencesfromproduction.go b/resource-manager/web/2022-09-01/webapps/method_listslotdifferencesfromproduction.go index 35e87a7493f..9f18e2a998c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listslotdifferencesfromproduction.go +++ b/resource-manager/web/2022-09-01/webapps/method_listslotdifferencesfromproduction.go @@ -16,12 +16,12 @@ import ( type ListSlotDifferencesFromProductionOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SlotDifferenceCollection + Model *[]SlotDifference } type ListSlotDifferencesFromProductionCompleteResult struct { LatestHttpResponse *http.Response - Items []SlotDifferenceCollection + Items []SlotDifference } // ListSlotDifferencesFromProduction ... @@ -51,7 +51,7 @@ func (c WebAppsClient) ListSlotDifferencesFromProduction(ctx context.Context, id } var values struct { - Values *[]SlotDifferenceCollection `json:"value"` + Values *[]SlotDifference `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -64,12 +64,12 @@ func (c WebAppsClient) ListSlotDifferencesFromProduction(ctx context.Context, id // ListSlotDifferencesFromProductionComplete retrieves all the results into a single object func (c WebAppsClient) ListSlotDifferencesFromProductionComplete(ctx context.Context, id commonids.AppServiceId, input CsmSlotEntity) (ListSlotDifferencesFromProductionCompleteResult, error) { - return c.ListSlotDifferencesFromProductionCompleteMatchingPredicate(ctx, id, input, SlotDifferenceCollectionOperationPredicate{}) + return c.ListSlotDifferencesFromProductionCompleteMatchingPredicate(ctx, id, input, SlotDifferenceOperationPredicate{}) } // ListSlotDifferencesFromProductionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebAppsClient) ListSlotDifferencesFromProductionCompleteMatchingPredicate(ctx context.Context, id commonids.AppServiceId, input CsmSlotEntity, predicate SlotDifferenceCollectionOperationPredicate) (result ListSlotDifferencesFromProductionCompleteResult, err error) { - items := make([]SlotDifferenceCollection, 0) +func (c WebAppsClient) ListSlotDifferencesFromProductionCompleteMatchingPredicate(ctx context.Context, id commonids.AppServiceId, input CsmSlotEntity, predicate SlotDifferenceOperationPredicate) (result ListSlotDifferencesFromProductionCompleteResult, err error) { + items := make([]SlotDifference, 0) resp, err := c.ListSlotDifferencesFromProduction(ctx, id, input) if err != nil { diff --git a/resource-manager/web/2022-09-01/webapps/method_listslotdifferencesslot.go b/resource-manager/web/2022-09-01/webapps/method_listslotdifferencesslot.go index 9211210cc59..c0c33b32a4a 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listslotdifferencesslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listslotdifferencesslot.go @@ -15,12 +15,12 @@ import ( type ListSlotDifferencesSlotOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SlotDifferenceCollection + Model *[]SlotDifference } type ListSlotDifferencesSlotCompleteResult struct { LatestHttpResponse *http.Response - Items []SlotDifferenceCollection + Items []SlotDifference } // ListSlotDifferencesSlot ... @@ -50,7 +50,7 @@ func (c WebAppsClient) ListSlotDifferencesSlot(ctx context.Context, id SlotId, i } var values struct { - Values *[]SlotDifferenceCollection `json:"value"` + Values *[]SlotDifference `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c WebAppsClient) ListSlotDifferencesSlot(ctx context.Context, id SlotId, i // ListSlotDifferencesSlotComplete retrieves all the results into a single object func (c WebAppsClient) ListSlotDifferencesSlotComplete(ctx context.Context, id SlotId, input CsmSlotEntity) (ListSlotDifferencesSlotCompleteResult, error) { - return c.ListSlotDifferencesSlotCompleteMatchingPredicate(ctx, id, input, SlotDifferenceCollectionOperationPredicate{}) + return c.ListSlotDifferencesSlotCompleteMatchingPredicate(ctx, id, input, SlotDifferenceOperationPredicate{}) } // ListSlotDifferencesSlotCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebAppsClient) ListSlotDifferencesSlotCompleteMatchingPredicate(ctx context.Context, id SlotId, input CsmSlotEntity, predicate SlotDifferenceCollectionOperationPredicate) (result ListSlotDifferencesSlotCompleteResult, err error) { - items := make([]SlotDifferenceCollection, 0) +func (c WebAppsClient) ListSlotDifferencesSlotCompleteMatchingPredicate(ctx context.Context, id SlotId, input CsmSlotEntity, predicate SlotDifferenceOperationPredicate) (result ListSlotDifferencesSlotCompleteResult, err error) { + items := make([]SlotDifference, 0) resp, err := c.ListSlotDifferencesSlot(ctx, id, input) if err != nil { diff --git a/resource-manager/web/2022-09-01/webapps/model_backupitemcollection.go b/resource-manager/web/2022-09-01/webapps/model_backupitemcollection.go deleted file mode 100644 index e3dea7f915f..00000000000 --- a/resource-manager/web/2022-09-01/webapps/model_backupitemcollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackupItemCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []BackupItem `json:"value"` -} diff --git a/resource-manager/web/2022-09-01/webapps/model_slotdifferencecollection.go b/resource-manager/web/2022-09-01/webapps/model_slotdifferencecollection.go deleted file mode 100644 index 776be4e9b92..00000000000 --- a/resource-manager/web/2022-09-01/webapps/model_slotdifferencecollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SlotDifferenceCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []SlotDifference `json:"value"` -} diff --git a/resource-manager/web/2022-09-01/webapps/predicates.go b/resource-manager/web/2022-09-01/webapps/predicates.go index e2d321d39a1..a1ca5255822 100644 --- a/resource-manager/web/2022-09-01/webapps/predicates.go +++ b/resource-manager/web/2022-09-01/webapps/predicates.go @@ -59,19 +59,6 @@ func (p BackupItemOperationPredicate) Matches(input BackupItem) bool { return true } -type BackupItemCollectionOperationPredicate struct { - NextLink *string -} - -func (p BackupItemCollectionOperationPredicate) Matches(input BackupItemCollection) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} - type ContinuousWebJobOperationPredicate struct { Id *string Kind *string @@ -571,13 +558,28 @@ func (p SiteExtensionInfoOperationPredicate) Matches(input SiteExtensionInfo) bo return true } -type SlotDifferenceCollectionOperationPredicate struct { - NextLink *string +type SlotDifferenceOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string } -func (p SlotDifferenceCollectionOperationPredicate) Matches(input SlotDifferenceCollection) bool { +func (p SlotDifferenceOperationPredicate) Matches(input SlotDifference) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + 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 } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/method_listexpressiontraces.go b/resource-manager/web/2022-09-01/workflowrunactions/method_listexpressiontraces.go index c4b0d103202..34db9faf0de 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/method_listexpressiontraces.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/method_listexpressiontraces.go @@ -15,12 +15,12 @@ import ( type ListExpressionTracesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ExpressionTraces + Model *[]interface{} } type ListExpressionTracesCompleteResult struct { LatestHttpResponse *http.Response - Items []ExpressionTraces + Items []interface{} } // ListExpressionTraces ... @@ -50,7 +50,7 @@ func (c WorkflowRunActionsClient) ListExpressionTraces(ctx context.Context, id A } var values struct { - Values *[]ExpressionTraces `json:"value"` + Values *[]interface{} `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -62,13 +62,8 @@ func (c WorkflowRunActionsClient) ListExpressionTraces(ctx context.Context, id A } // ListExpressionTracesComplete retrieves all the results into a single object -func (c WorkflowRunActionsClient) ListExpressionTracesComplete(ctx context.Context, id ActionId) (ListExpressionTracesCompleteResult, error) { - return c.ListExpressionTracesCompleteMatchingPredicate(ctx, id, ExpressionTracesOperationPredicate{}) -} - -// ListExpressionTracesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WorkflowRunActionsClient) ListExpressionTracesCompleteMatchingPredicate(ctx context.Context, id ActionId, predicate ExpressionTracesOperationPredicate) (result ListExpressionTracesCompleteResult, err error) { - items := make([]ExpressionTraces, 0) +func (c WorkflowRunActionsClient) ListExpressionTracesComplete(ctx context.Context, id ActionId) (result ListExpressionTracesCompleteResult, err error) { + items := make([]interface{}, 0) resp, err := c.ListExpressionTraces(ctx, id) if err != nil { @@ -77,9 +72,7 @@ func (c WorkflowRunActionsClient) ListExpressionTracesCompleteMatchingPredicate( } if resp.Model != nil { for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } + items = append(items, v) } } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces.go b/resource-manager/web/2022-09-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces.go index 50835737025..0e11efabe16 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces.go @@ -15,12 +15,12 @@ import ( type WorkflowRunActionRepetitionsListExpressionTracesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ExpressionTraces + Model *[]interface{} } type WorkflowRunActionRepetitionsListExpressionTracesCompleteResult struct { LatestHttpResponse *http.Response - Items []ExpressionTraces + Items []interface{} } // WorkflowRunActionRepetitionsListExpressionTraces ... @@ -50,7 +50,7 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTrac } var values struct { - Values *[]ExpressionTraces `json:"value"` + Values *[]interface{} `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -62,13 +62,8 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTrac } // WorkflowRunActionRepetitionsListExpressionTracesComplete retrieves all the results into a single object -func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTracesComplete(ctx context.Context, id RepetitionId) (WorkflowRunActionRepetitionsListExpressionTracesCompleteResult, error) { - return c.WorkflowRunActionRepetitionsListExpressionTracesCompleteMatchingPredicate(ctx, id, ExpressionTracesOperationPredicate{}) -} - -// WorkflowRunActionRepetitionsListExpressionTracesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTracesCompleteMatchingPredicate(ctx context.Context, id RepetitionId, predicate ExpressionTracesOperationPredicate) (result WorkflowRunActionRepetitionsListExpressionTracesCompleteResult, err error) { - items := make([]ExpressionTraces, 0) +func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTracesComplete(ctx context.Context, id RepetitionId) (result WorkflowRunActionRepetitionsListExpressionTracesCompleteResult, err error) { + items := make([]interface{}, 0) resp, err := c.WorkflowRunActionRepetitionsListExpressionTraces(ctx, id) if err != nil { @@ -77,9 +72,7 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTrac } if resp.Model != nil { for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } + items = append(items, v) } } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/model_azureresourceerrorinfo.go b/resource-manager/web/2022-09-01/workflowrunactions/model_azureresourceerrorinfo.go deleted file mode 100644 index 59c3c304adb..00000000000 --- a/resource-manager/web/2022-09-01/workflowrunactions/model_azureresourceerrorinfo.go +++ /dev/null @@ -1,10 +0,0 @@ -package workflowrunactions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureResourceErrorInfo struct { - Code string `json:"code"` - Details *[]AzureResourceErrorInfo `json:"details,omitempty"` - Message string `json:"message"` -} diff --git a/resource-manager/web/2022-09-01/workflowrunactions/model_expression.go b/resource-manager/web/2022-09-01/workflowrunactions/model_expression.go deleted file mode 100644 index a7689b2d49e..00000000000 --- a/resource-manager/web/2022-09-01/workflowrunactions/model_expression.go +++ /dev/null @@ -1,11 +0,0 @@ -package workflowrunactions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Expression struct { - Error *AzureResourceErrorInfo `json:"error,omitempty"` - Subexpressions *[]Expression `json:"subexpressions,omitempty"` - Text *string `json:"text,omitempty"` - Value *interface{} `json:"value,omitempty"` -} diff --git a/resource-manager/web/2022-09-01/workflowrunactions/model_expressionroot.go b/resource-manager/web/2022-09-01/workflowrunactions/model_expressionroot.go deleted file mode 100644 index 29e8bb99a41..00000000000 --- a/resource-manager/web/2022-09-01/workflowrunactions/model_expressionroot.go +++ /dev/null @@ -1,12 +0,0 @@ -package workflowrunactions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressionRoot struct { - Error *AzureResourceErrorInfo `json:"error,omitempty"` - Path *string `json:"path,omitempty"` - Subexpressions *[]Expression `json:"subexpressions,omitempty"` - Text *string `json:"text,omitempty"` - Value *interface{} `json:"value,omitempty"` -} diff --git a/resource-manager/web/2022-09-01/workflowrunactions/model_expressiontraces.go b/resource-manager/web/2022-09-01/workflowrunactions/model_expressiontraces.go deleted file mode 100644 index 913fc1bbd9b..00000000000 --- a/resource-manager/web/2022-09-01/workflowrunactions/model_expressiontraces.go +++ /dev/null @@ -1,10 +0,0 @@ -package workflowrunactions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressionTraces struct { - Inputs *[]ExpressionRoot `json:"inputs,omitempty"` - NextLink *string `json:"nextLink,omitempty"` - Value *interface{} `json:"value,omitempty"` -} diff --git a/resource-manager/web/2022-09-01/workflowrunactions/predicates.go b/resource-manager/web/2022-09-01/workflowrunactions/predicates.go index 21fd66034c2..fa466cf2c8e 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/predicates.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/predicates.go @@ -3,24 +3,6 @@ package workflowrunactions // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ExpressionTracesOperationPredicate struct { - NextLink *string - Value *interface{} -} - -func (p ExpressionTracesOperationPredicate) Matches(input ExpressionTraces) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - if p.Value != nil && (input.Value == nil || *p.Value != *input.Value) { - return false - } - - return true -} - type RequestHistoryOperationPredicate struct { Id *string Location *string diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_changevnet.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_changevnet.go index ab6359e687f..3c0aaf531fd 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_changevnet.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_changevnet.go @@ -19,12 +19,12 @@ type ChangeVnetOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]WebAppCollection + Model *[]Site } type ChangeVnetCompleteResult struct { LatestHttpResponse *http.Response - Items []WebAppCollection + Items []Site } // ChangeVnet ... diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_resume.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_resume.go index 72168224f8f..def906a3f1a 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_resume.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_resume.go @@ -19,12 +19,12 @@ type ResumeOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]WebAppCollection + Model *[]Site } type ResumeCompleteResult struct { LatestHttpResponse *http.Response - Items []WebAppCollection + Items []Site } // Resume ... diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_suspend.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_suspend.go index de5db4df0e6..5395b21b683 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_suspend.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_suspend.go @@ -19,12 +19,12 @@ type SuspendOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *[]WebAppCollection + Model *[]Site } type SuspendCompleteResult struct { LatestHttpResponse *http.Response - Items []WebAppCollection + Items []Site } // Suspend ... diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/model_webappcollection.go b/resource-manager/web/2023-01-01/appserviceenvironments/model_webappcollection.go deleted file mode 100644 index b18de2b2ac3..00000000000 --- a/resource-manager/web/2023-01-01/appserviceenvironments/model_webappcollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package appserviceenvironments - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebAppCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []Site `json:"value"` -} diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/predicates.go b/resource-manager/web/2023-01-01/appserviceenvironments/predicates.go index 7cb05884c3a..96a5324bde9 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/predicates.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/predicates.go @@ -306,19 +306,6 @@ func (p UsageOperationPredicate) Matches(input Usage) bool { return true } -type WebAppCollectionOperationPredicate struct { - NextLink *string -} - -func (p WebAppCollectionOperationPredicate) Matches(input WebAppCollection) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} - type WorkerPoolResourceOperationPredicate struct { Id *string Kind *string diff --git a/resource-manager/web/2023-01-01/domains/method_listrecommendations.go b/resource-manager/web/2023-01-01/domains/method_listrecommendations.go index ebfd4b06501..148c7af4de3 100644 --- a/resource-manager/web/2023-01-01/domains/method_listrecommendations.go +++ b/resource-manager/web/2023-01-01/domains/method_listrecommendations.go @@ -16,12 +16,12 @@ import ( type ListRecommendationsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]NameIdentifierCollection + Model *[]NameIdentifier } type ListRecommendationsCompleteResult struct { LatestHttpResponse *http.Response - Items []NameIdentifierCollection + Items []NameIdentifier } // ListRecommendations ... @@ -51,7 +51,7 @@ func (c DomainsClient) ListRecommendations(ctx context.Context, id commonids.Sub } var values struct { - Values *[]NameIdentifierCollection `json:"value"` + Values *[]NameIdentifier `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -64,12 +64,12 @@ func (c DomainsClient) ListRecommendations(ctx context.Context, id commonids.Sub // ListRecommendationsComplete retrieves all the results into a single object func (c DomainsClient) ListRecommendationsComplete(ctx context.Context, id commonids.SubscriptionId, input DomainRecommendationSearchParameters) (ListRecommendationsCompleteResult, error) { - return c.ListRecommendationsCompleteMatchingPredicate(ctx, id, input, NameIdentifierCollectionOperationPredicate{}) + return c.ListRecommendationsCompleteMatchingPredicate(ctx, id, input, NameIdentifierOperationPredicate{}) } // ListRecommendationsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DomainsClient) ListRecommendationsCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, input DomainRecommendationSearchParameters, predicate NameIdentifierCollectionOperationPredicate) (result ListRecommendationsCompleteResult, err error) { - items := make([]NameIdentifierCollection, 0) +func (c DomainsClient) ListRecommendationsCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, input DomainRecommendationSearchParameters, predicate NameIdentifierOperationPredicate) (result ListRecommendationsCompleteResult, err error) { + items := make([]NameIdentifier, 0) resp, err := c.ListRecommendations(ctx, id, input) if err != nil { diff --git a/resource-manager/web/2023-01-01/domains/model_nameidentifiercollection.go b/resource-manager/web/2023-01-01/domains/model_nameidentifiercollection.go deleted file mode 100644 index 25cc8a75f77..00000000000 --- a/resource-manager/web/2023-01-01/domains/model_nameidentifiercollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package domains - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NameIdentifierCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []NameIdentifier `json:"value"` -} diff --git a/resource-manager/web/2023-01-01/domains/predicates.go b/resource-manager/web/2023-01-01/domains/predicates.go index 0f1cd8764c5..dcd7e69873b 100644 --- a/resource-manager/web/2023-01-01/domains/predicates.go +++ b/resource-manager/web/2023-01-01/domains/predicates.go @@ -64,13 +64,13 @@ func (p DomainOwnershipIdentifierOperationPredicate) Matches(input DomainOwnersh return true } -type NameIdentifierCollectionOperationPredicate struct { - NextLink *string +type NameIdentifierOperationPredicate struct { + Name *string } -func (p NameIdentifierCollectionOperationPredicate) Matches(input NameIdentifierCollection) bool { +func (p NameIdentifierOperationPredicate) Matches(input NameIdentifier) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { return false } diff --git a/resource-manager/web/2023-01-01/resourceproviders/method_listsiteidentifiersassignedtohostname.go b/resource-manager/web/2023-01-01/resourceproviders/method_listsiteidentifiersassignedtohostname.go index 11881d211a0..ed3fb516578 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/method_listsiteidentifiersassignedtohostname.go +++ b/resource-manager/web/2023-01-01/resourceproviders/method_listsiteidentifiersassignedtohostname.go @@ -16,12 +16,12 @@ import ( type ListSiteIdentifiersAssignedToHostNameOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]IdentifierCollection + Model *[]Identifier } type ListSiteIdentifiersAssignedToHostNameCompleteResult struct { LatestHttpResponse *http.Response - Items []IdentifierCollection + Items []Identifier } // ListSiteIdentifiersAssignedToHostName ... @@ -51,7 +51,7 @@ func (c ResourceProvidersClient) ListSiteIdentifiersAssignedToHostName(ctx conte } var values struct { - Values *[]IdentifierCollection `json:"value"` + Values *[]Identifier `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -64,12 +64,12 @@ func (c ResourceProvidersClient) ListSiteIdentifiersAssignedToHostName(ctx conte // ListSiteIdentifiersAssignedToHostNameComplete retrieves all the results into a single object func (c ResourceProvidersClient) ListSiteIdentifiersAssignedToHostNameComplete(ctx context.Context, id commonids.SubscriptionId, input NameIdentifier) (ListSiteIdentifiersAssignedToHostNameCompleteResult, error) { - return c.ListSiteIdentifiersAssignedToHostNameCompleteMatchingPredicate(ctx, id, input, IdentifierCollectionOperationPredicate{}) + return c.ListSiteIdentifiersAssignedToHostNameCompleteMatchingPredicate(ctx, id, input, IdentifierOperationPredicate{}) } // ListSiteIdentifiersAssignedToHostNameCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ResourceProvidersClient) ListSiteIdentifiersAssignedToHostNameCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, input NameIdentifier, predicate IdentifierCollectionOperationPredicate) (result ListSiteIdentifiersAssignedToHostNameCompleteResult, err error) { - items := make([]IdentifierCollection, 0) +func (c ResourceProvidersClient) ListSiteIdentifiersAssignedToHostNameCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, input NameIdentifier, predicate IdentifierOperationPredicate) (result ListSiteIdentifiersAssignedToHostNameCompleteResult, err error) { + items := make([]Identifier, 0) resp, err := c.ListSiteIdentifiersAssignedToHostName(ctx, id, input) if err != nil { diff --git a/resource-manager/web/2023-01-01/resourceproviders/model_identifiercollection.go b/resource-manager/web/2023-01-01/resourceproviders/model_identifiercollection.go deleted file mode 100644 index 4a1a8d9b9ba..00000000000 --- a/resource-manager/web/2023-01-01/resourceproviders/model_identifiercollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package resourceproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IdentifierCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []Identifier `json:"value"` -} diff --git a/resource-manager/web/2023-01-01/resourceproviders/predicates.go b/resource-manager/web/2023-01-01/resourceproviders/predicates.go index 697481b7f24..c633f44ef01 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/predicates.go +++ b/resource-manager/web/2023-01-01/resourceproviders/predicates.go @@ -143,13 +143,28 @@ func (p GeoRegionOperationPredicate) Matches(input GeoRegion) bool { return true } -type IdentifierCollectionOperationPredicate struct { - NextLink *string +type IdentifierOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string } -func (p IdentifierCollectionOperationPredicate) Matches(input IdentifierCollection) bool { +func (p IdentifierOperationPredicate) Matches(input Identifier) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + 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 } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getbuilddatabaseconnectionswithdetails.go b/resource-manager/web/2023-01-01/staticsites/method_getbuilddatabaseconnectionswithdetails.go index ad3ef9a5997..a32b0d4ac41 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getbuilddatabaseconnectionswithdetails.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getbuilddatabaseconnectionswithdetails.go @@ -15,12 +15,12 @@ import ( type GetBuildDatabaseConnectionsWithDetailsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]DatabaseConnectionCollection + Model *[]DatabaseConnection } type GetBuildDatabaseConnectionsWithDetailsCompleteResult struct { LatestHttpResponse *http.Response - Items []DatabaseConnectionCollection + Items []DatabaseConnection } // GetBuildDatabaseConnectionsWithDetails ... @@ -50,7 +50,7 @@ func (c StaticSitesClient) GetBuildDatabaseConnectionsWithDetails(ctx context.Co } var values struct { - Values *[]DatabaseConnectionCollection `json:"value"` + Values *[]DatabaseConnection `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c StaticSitesClient) GetBuildDatabaseConnectionsWithDetails(ctx context.Co // GetBuildDatabaseConnectionsWithDetailsComplete retrieves all the results into a single object func (c StaticSitesClient) GetBuildDatabaseConnectionsWithDetailsComplete(ctx context.Context, id BuildId) (GetBuildDatabaseConnectionsWithDetailsCompleteResult, error) { - return c.GetBuildDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx, id, DatabaseConnectionCollectionOperationPredicate{}) + return c.GetBuildDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx, id, DatabaseConnectionOperationPredicate{}) } // GetBuildDatabaseConnectionsWithDetailsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StaticSitesClient) GetBuildDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx context.Context, id BuildId, predicate DatabaseConnectionCollectionOperationPredicate) (result GetBuildDatabaseConnectionsWithDetailsCompleteResult, err error) { - items := make([]DatabaseConnectionCollection, 0) +func (c StaticSitesClient) GetBuildDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx context.Context, id BuildId, predicate DatabaseConnectionOperationPredicate) (result GetBuildDatabaseConnectionsWithDetailsCompleteResult, err error) { + items := make([]DatabaseConnection, 0) resp, err := c.GetBuildDatabaseConnectionsWithDetails(ctx, id) if err != nil { diff --git a/resource-manager/web/2023-01-01/staticsites/method_getdatabaseconnectionswithdetails.go b/resource-manager/web/2023-01-01/staticsites/method_getdatabaseconnectionswithdetails.go index 1f7571164f5..4c1fb498cae 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getdatabaseconnectionswithdetails.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getdatabaseconnectionswithdetails.go @@ -15,12 +15,12 @@ import ( type GetDatabaseConnectionsWithDetailsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]DatabaseConnectionCollection + Model *[]DatabaseConnection } type GetDatabaseConnectionsWithDetailsCompleteResult struct { LatestHttpResponse *http.Response - Items []DatabaseConnectionCollection + Items []DatabaseConnection } // GetDatabaseConnectionsWithDetails ... @@ -50,7 +50,7 @@ func (c StaticSitesClient) GetDatabaseConnectionsWithDetails(ctx context.Context } var values struct { - Values *[]DatabaseConnectionCollection `json:"value"` + Values *[]DatabaseConnection `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c StaticSitesClient) GetDatabaseConnectionsWithDetails(ctx context.Context // GetDatabaseConnectionsWithDetailsComplete retrieves all the results into a single object func (c StaticSitesClient) GetDatabaseConnectionsWithDetailsComplete(ctx context.Context, id StaticSiteId) (GetDatabaseConnectionsWithDetailsCompleteResult, error) { - return c.GetDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx, id, DatabaseConnectionCollectionOperationPredicate{}) + return c.GetDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx, id, DatabaseConnectionOperationPredicate{}) } // GetDatabaseConnectionsWithDetailsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StaticSitesClient) GetDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx context.Context, id StaticSiteId, predicate DatabaseConnectionCollectionOperationPredicate) (result GetDatabaseConnectionsWithDetailsCompleteResult, err error) { - items := make([]DatabaseConnectionCollection, 0) +func (c StaticSitesClient) GetDatabaseConnectionsWithDetailsCompleteMatchingPredicate(ctx context.Context, id StaticSiteId, predicate DatabaseConnectionOperationPredicate) (result GetDatabaseConnectionsWithDetailsCompleteResult, err error) { + items := make([]DatabaseConnection, 0) resp, err := c.GetDatabaseConnectionsWithDetails(ctx, id) if err != nil { diff --git a/resource-manager/web/2023-01-01/staticsites/method_liststaticsiteusers.go b/resource-manager/web/2023-01-01/staticsites/method_liststaticsiteusers.go index d89541cd1c9..1c6904d7ecc 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_liststaticsiteusers.go +++ b/resource-manager/web/2023-01-01/staticsites/method_liststaticsiteusers.go @@ -15,12 +15,12 @@ import ( type ListStaticSiteUsersOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]StaticSiteUserCollection + Model *[]StaticSiteUserARMResource } type ListStaticSiteUsersCompleteResult struct { LatestHttpResponse *http.Response - Items []StaticSiteUserCollection + Items []StaticSiteUserARMResource } // ListStaticSiteUsers ... @@ -50,7 +50,7 @@ func (c StaticSitesClient) ListStaticSiteUsers(ctx context.Context, id AuthProvi } var values struct { - Values *[]StaticSiteUserCollection `json:"value"` + Values *[]StaticSiteUserARMResource `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c StaticSitesClient) ListStaticSiteUsers(ctx context.Context, id AuthProvi // ListStaticSiteUsersComplete retrieves all the results into a single object func (c StaticSitesClient) ListStaticSiteUsersComplete(ctx context.Context, id AuthProviderId) (ListStaticSiteUsersCompleteResult, error) { - return c.ListStaticSiteUsersCompleteMatchingPredicate(ctx, id, StaticSiteUserCollectionOperationPredicate{}) + return c.ListStaticSiteUsersCompleteMatchingPredicate(ctx, id, StaticSiteUserARMResourceOperationPredicate{}) } // ListStaticSiteUsersCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StaticSitesClient) ListStaticSiteUsersCompleteMatchingPredicate(ctx context.Context, id AuthProviderId, predicate StaticSiteUserCollectionOperationPredicate) (result ListStaticSiteUsersCompleteResult, err error) { - items := make([]StaticSiteUserCollection, 0) +func (c StaticSitesClient) ListStaticSiteUsersCompleteMatchingPredicate(ctx context.Context, id AuthProviderId, predicate StaticSiteUserARMResourceOperationPredicate) (result ListStaticSiteUsersCompleteResult, err error) { + items := make([]StaticSiteUserARMResource, 0) resp, err := c.ListStaticSiteUsers(ctx, id) if err != nil { diff --git a/resource-manager/web/2023-01-01/staticsites/model_databaseconnectioncollection.go b/resource-manager/web/2023-01-01/staticsites/model_databaseconnectioncollection.go deleted file mode 100644 index 6d0f58376bd..00000000000 --- a/resource-manager/web/2023-01-01/staticsites/model_databaseconnectioncollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package staticsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseConnectionCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []DatabaseConnection `json:"value"` -} diff --git a/resource-manager/web/2023-01-01/staticsites/model_staticsiteusercollection.go b/resource-manager/web/2023-01-01/staticsites/model_staticsiteusercollection.go deleted file mode 100644 index 000468b54f9..00000000000 --- a/resource-manager/web/2023-01-01/staticsites/model_staticsiteusercollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package staticsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticSiteUserCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []StaticSiteUserARMResource `json:"value"` -} diff --git a/resource-manager/web/2023-01-01/staticsites/predicates.go b/resource-manager/web/2023-01-01/staticsites/predicates.go index f2fc6b1832b..b27ed7b5388 100644 --- a/resource-manager/web/2023-01-01/staticsites/predicates.go +++ b/resource-manager/web/2023-01-01/staticsites/predicates.go @@ -31,19 +31,6 @@ func (p DatabaseConnectionOperationPredicate) Matches(input DatabaseConnection) return true } -type DatabaseConnectionCollectionOperationPredicate struct { - NextLink *string -} - -func (p DatabaseConnectionCollectionOperationPredicate) Matches(input DatabaseConnectionCollection) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} - type RemotePrivateEndpointConnectionARMResourceOperationPredicate struct { Id *string Kind *string @@ -245,13 +232,28 @@ func (p StaticSiteLinkedBackendARMResourceOperationPredicate) Matches(input Stat return true } -type StaticSiteUserCollectionOperationPredicate struct { - NextLink *string +type StaticSiteUserARMResourceOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string } -func (p StaticSiteUserCollectionOperationPredicate) Matches(input StaticSiteUserCollection) bool { +func (p StaticSiteUserARMResourceOperationPredicate) Matches(input StaticSiteUserARMResource) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + 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 } diff --git a/resource-manager/web/2023-01-01/topleveldomains/method_listagreements.go b/resource-manager/web/2023-01-01/topleveldomains/method_listagreements.go index c8f4e93dd34..d7f40d1d257 100644 --- a/resource-manager/web/2023-01-01/topleveldomains/method_listagreements.go +++ b/resource-manager/web/2023-01-01/topleveldomains/method_listagreements.go @@ -15,12 +15,12 @@ import ( type ListAgreementsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]TldLegalAgreementCollection + Model *[]TldLegalAgreement } type ListAgreementsCompleteResult struct { LatestHttpResponse *http.Response - Items []TldLegalAgreementCollection + Items []TldLegalAgreement } // ListAgreements ... @@ -50,7 +50,7 @@ func (c TopLevelDomainsClient) ListAgreements(ctx context.Context, id TopLevelDo } var values struct { - Values *[]TldLegalAgreementCollection `json:"value"` + Values *[]TldLegalAgreement `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c TopLevelDomainsClient) ListAgreements(ctx context.Context, id TopLevelDo // ListAgreementsComplete retrieves all the results into a single object func (c TopLevelDomainsClient) ListAgreementsComplete(ctx context.Context, id TopLevelDomainId, input TopLevelDomainAgreementOption) (ListAgreementsCompleteResult, error) { - return c.ListAgreementsCompleteMatchingPredicate(ctx, id, input, TldLegalAgreementCollectionOperationPredicate{}) + return c.ListAgreementsCompleteMatchingPredicate(ctx, id, input, TldLegalAgreementOperationPredicate{}) } // ListAgreementsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c TopLevelDomainsClient) ListAgreementsCompleteMatchingPredicate(ctx context.Context, id TopLevelDomainId, input TopLevelDomainAgreementOption, predicate TldLegalAgreementCollectionOperationPredicate) (result ListAgreementsCompleteResult, err error) { - items := make([]TldLegalAgreementCollection, 0) +func (c TopLevelDomainsClient) ListAgreementsCompleteMatchingPredicate(ctx context.Context, id TopLevelDomainId, input TopLevelDomainAgreementOption, predicate TldLegalAgreementOperationPredicate) (result ListAgreementsCompleteResult, err error) { + items := make([]TldLegalAgreement, 0) resp, err := c.ListAgreements(ctx, id, input) if err != nil { diff --git a/resource-manager/web/2023-01-01/topleveldomains/model_tldlegalagreementcollection.go b/resource-manager/web/2023-01-01/topleveldomains/model_tldlegalagreementcollection.go deleted file mode 100644 index b8707765fe3..00000000000 --- a/resource-manager/web/2023-01-01/topleveldomains/model_tldlegalagreementcollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package topleveldomains - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TldLegalAgreementCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []TldLegalAgreement `json:"value"` -} diff --git a/resource-manager/web/2023-01-01/topleveldomains/predicates.go b/resource-manager/web/2023-01-01/topleveldomains/predicates.go index 32d572f2e45..a85c5378eeb 100644 --- a/resource-manager/web/2023-01-01/topleveldomains/predicates.go +++ b/resource-manager/web/2023-01-01/topleveldomains/predicates.go @@ -3,13 +3,28 @@ package topleveldomains // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type TldLegalAgreementCollectionOperationPredicate struct { - NextLink *string +type TldLegalAgreementOperationPredicate struct { + AgreementKey *string + Content *string + Title *string + Url *string } -func (p TldLegalAgreementCollectionOperationPredicate) Matches(input TldLegalAgreementCollection) bool { +func (p TldLegalAgreementOperationPredicate) Matches(input TldLegalAgreement) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.AgreementKey != nil && *p.AgreementKey != input.AgreementKey { + return false + } + + if p.Content != nil && *p.Content != input.Content { + return false + } + + if p.Title != nil && *p.Title != input.Title { + return false + } + + if p.Url != nil && (input.Url == nil || *p.Url != *input.Url) { return false } diff --git a/resource-manager/web/2023-01-01/webapps/method_listsitebackups.go b/resource-manager/web/2023-01-01/webapps/method_listsitebackups.go index 8bca3e61995..2a0dfa9922d 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listsitebackups.go +++ b/resource-manager/web/2023-01-01/webapps/method_listsitebackups.go @@ -16,12 +16,12 @@ import ( type ListSiteBackupsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BackupItemCollection + Model *[]BackupItem } type ListSiteBackupsCompleteResult struct { LatestHttpResponse *http.Response - Items []BackupItemCollection + Items []BackupItem } // ListSiteBackups ... @@ -51,7 +51,7 @@ func (c WebAppsClient) ListSiteBackups(ctx context.Context, id commonids.AppServ } var values struct { - Values *[]BackupItemCollection `json:"value"` + Values *[]BackupItem `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -64,12 +64,12 @@ func (c WebAppsClient) ListSiteBackups(ctx context.Context, id commonids.AppServ // ListSiteBackupsComplete retrieves all the results into a single object func (c WebAppsClient) ListSiteBackupsComplete(ctx context.Context, id commonids.AppServiceId) (ListSiteBackupsCompleteResult, error) { - return c.ListSiteBackupsCompleteMatchingPredicate(ctx, id, BackupItemCollectionOperationPredicate{}) + return c.ListSiteBackupsCompleteMatchingPredicate(ctx, id, BackupItemOperationPredicate{}) } // ListSiteBackupsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebAppsClient) ListSiteBackupsCompleteMatchingPredicate(ctx context.Context, id commonids.AppServiceId, predicate BackupItemCollectionOperationPredicate) (result ListSiteBackupsCompleteResult, err error) { - items := make([]BackupItemCollection, 0) +func (c WebAppsClient) ListSiteBackupsCompleteMatchingPredicate(ctx context.Context, id commonids.AppServiceId, predicate BackupItemOperationPredicate) (result ListSiteBackupsCompleteResult, err error) { + items := make([]BackupItem, 0) resp, err := c.ListSiteBackups(ctx, id) if err != nil { diff --git a/resource-manager/web/2023-01-01/webapps/method_listsitebackupsslot.go b/resource-manager/web/2023-01-01/webapps/method_listsitebackupsslot.go index 18f42228f44..2d8dd37dbad 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listsitebackupsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listsitebackupsslot.go @@ -15,12 +15,12 @@ import ( type ListSiteBackupsSlotOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]BackupItemCollection + Model *[]BackupItem } type ListSiteBackupsSlotCompleteResult struct { LatestHttpResponse *http.Response - Items []BackupItemCollection + Items []BackupItem } // ListSiteBackupsSlot ... @@ -50,7 +50,7 @@ func (c WebAppsClient) ListSiteBackupsSlot(ctx context.Context, id SlotId) (resu } var values struct { - Values *[]BackupItemCollection `json:"value"` + Values *[]BackupItem `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c WebAppsClient) ListSiteBackupsSlot(ctx context.Context, id SlotId) (resu // ListSiteBackupsSlotComplete retrieves all the results into a single object func (c WebAppsClient) ListSiteBackupsSlotComplete(ctx context.Context, id SlotId) (ListSiteBackupsSlotCompleteResult, error) { - return c.ListSiteBackupsSlotCompleteMatchingPredicate(ctx, id, BackupItemCollectionOperationPredicate{}) + return c.ListSiteBackupsSlotCompleteMatchingPredicate(ctx, id, BackupItemOperationPredicate{}) } // ListSiteBackupsSlotCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebAppsClient) ListSiteBackupsSlotCompleteMatchingPredicate(ctx context.Context, id SlotId, predicate BackupItemCollectionOperationPredicate) (result ListSiteBackupsSlotCompleteResult, err error) { - items := make([]BackupItemCollection, 0) +func (c WebAppsClient) ListSiteBackupsSlotCompleteMatchingPredicate(ctx context.Context, id SlotId, predicate BackupItemOperationPredicate) (result ListSiteBackupsSlotCompleteResult, err error) { + items := make([]BackupItem, 0) resp, err := c.ListSiteBackupsSlot(ctx, id) if err != nil { diff --git a/resource-manager/web/2023-01-01/webapps/method_listslotdifferencesfromproduction.go b/resource-manager/web/2023-01-01/webapps/method_listslotdifferencesfromproduction.go index 35e87a7493f..9f18e2a998c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listslotdifferencesfromproduction.go +++ b/resource-manager/web/2023-01-01/webapps/method_listslotdifferencesfromproduction.go @@ -16,12 +16,12 @@ import ( type ListSlotDifferencesFromProductionOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SlotDifferenceCollection + Model *[]SlotDifference } type ListSlotDifferencesFromProductionCompleteResult struct { LatestHttpResponse *http.Response - Items []SlotDifferenceCollection + Items []SlotDifference } // ListSlotDifferencesFromProduction ... @@ -51,7 +51,7 @@ func (c WebAppsClient) ListSlotDifferencesFromProduction(ctx context.Context, id } var values struct { - Values *[]SlotDifferenceCollection `json:"value"` + Values *[]SlotDifference `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -64,12 +64,12 @@ func (c WebAppsClient) ListSlotDifferencesFromProduction(ctx context.Context, id // ListSlotDifferencesFromProductionComplete retrieves all the results into a single object func (c WebAppsClient) ListSlotDifferencesFromProductionComplete(ctx context.Context, id commonids.AppServiceId, input CsmSlotEntity) (ListSlotDifferencesFromProductionCompleteResult, error) { - return c.ListSlotDifferencesFromProductionCompleteMatchingPredicate(ctx, id, input, SlotDifferenceCollectionOperationPredicate{}) + return c.ListSlotDifferencesFromProductionCompleteMatchingPredicate(ctx, id, input, SlotDifferenceOperationPredicate{}) } // ListSlotDifferencesFromProductionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebAppsClient) ListSlotDifferencesFromProductionCompleteMatchingPredicate(ctx context.Context, id commonids.AppServiceId, input CsmSlotEntity, predicate SlotDifferenceCollectionOperationPredicate) (result ListSlotDifferencesFromProductionCompleteResult, err error) { - items := make([]SlotDifferenceCollection, 0) +func (c WebAppsClient) ListSlotDifferencesFromProductionCompleteMatchingPredicate(ctx context.Context, id commonids.AppServiceId, input CsmSlotEntity, predicate SlotDifferenceOperationPredicate) (result ListSlotDifferencesFromProductionCompleteResult, err error) { + items := make([]SlotDifference, 0) resp, err := c.ListSlotDifferencesFromProduction(ctx, id, input) if err != nil { diff --git a/resource-manager/web/2023-01-01/webapps/method_listslotdifferencesslot.go b/resource-manager/web/2023-01-01/webapps/method_listslotdifferencesslot.go index 9211210cc59..c0c33b32a4a 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listslotdifferencesslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listslotdifferencesslot.go @@ -15,12 +15,12 @@ import ( type ListSlotDifferencesSlotOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]SlotDifferenceCollection + Model *[]SlotDifference } type ListSlotDifferencesSlotCompleteResult struct { LatestHttpResponse *http.Response - Items []SlotDifferenceCollection + Items []SlotDifference } // ListSlotDifferencesSlot ... @@ -50,7 +50,7 @@ func (c WebAppsClient) ListSlotDifferencesSlot(ctx context.Context, id SlotId, i } var values struct { - Values *[]SlotDifferenceCollection `json:"value"` + Values *[]SlotDifference `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -63,12 +63,12 @@ func (c WebAppsClient) ListSlotDifferencesSlot(ctx context.Context, id SlotId, i // ListSlotDifferencesSlotComplete retrieves all the results into a single object func (c WebAppsClient) ListSlotDifferencesSlotComplete(ctx context.Context, id SlotId, input CsmSlotEntity) (ListSlotDifferencesSlotCompleteResult, error) { - return c.ListSlotDifferencesSlotCompleteMatchingPredicate(ctx, id, input, SlotDifferenceCollectionOperationPredicate{}) + return c.ListSlotDifferencesSlotCompleteMatchingPredicate(ctx, id, input, SlotDifferenceOperationPredicate{}) } // ListSlotDifferencesSlotCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebAppsClient) ListSlotDifferencesSlotCompleteMatchingPredicate(ctx context.Context, id SlotId, input CsmSlotEntity, predicate SlotDifferenceCollectionOperationPredicate) (result ListSlotDifferencesSlotCompleteResult, err error) { - items := make([]SlotDifferenceCollection, 0) +func (c WebAppsClient) ListSlotDifferencesSlotCompleteMatchingPredicate(ctx context.Context, id SlotId, input CsmSlotEntity, predicate SlotDifferenceOperationPredicate) (result ListSlotDifferencesSlotCompleteResult, err error) { + items := make([]SlotDifference, 0) resp, err := c.ListSlotDifferencesSlot(ctx, id, input) if err != nil { diff --git a/resource-manager/web/2023-01-01/webapps/model_backupitemcollection.go b/resource-manager/web/2023-01-01/webapps/model_backupitemcollection.go deleted file mode 100644 index e3dea7f915f..00000000000 --- a/resource-manager/web/2023-01-01/webapps/model_backupitemcollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackupItemCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []BackupItem `json:"value"` -} diff --git a/resource-manager/web/2023-01-01/webapps/model_slotdifferencecollection.go b/resource-manager/web/2023-01-01/webapps/model_slotdifferencecollection.go deleted file mode 100644 index 776be4e9b92..00000000000 --- a/resource-manager/web/2023-01-01/webapps/model_slotdifferencecollection.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SlotDifferenceCollection struct { - NextLink *string `json:"nextLink,omitempty"` - Value []SlotDifference `json:"value"` -} diff --git a/resource-manager/web/2023-01-01/webapps/predicates.go b/resource-manager/web/2023-01-01/webapps/predicates.go index e2d321d39a1..a1ca5255822 100644 --- a/resource-manager/web/2023-01-01/webapps/predicates.go +++ b/resource-manager/web/2023-01-01/webapps/predicates.go @@ -59,19 +59,6 @@ func (p BackupItemOperationPredicate) Matches(input BackupItem) bool { return true } -type BackupItemCollectionOperationPredicate struct { - NextLink *string -} - -func (p BackupItemCollectionOperationPredicate) Matches(input BackupItemCollection) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - return true -} - type ContinuousWebJobOperationPredicate struct { Id *string Kind *string @@ -571,13 +558,28 @@ func (p SiteExtensionInfoOperationPredicate) Matches(input SiteExtensionInfo) bo return true } -type SlotDifferenceCollectionOperationPredicate struct { - NextLink *string +type SlotDifferenceOperationPredicate struct { + Id *string + Kind *string + Name *string + Type *string } -func (p SlotDifferenceCollectionOperationPredicate) Matches(input SlotDifferenceCollection) bool { +func (p SlotDifferenceOperationPredicate) Matches(input SlotDifference) bool { - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + 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 } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/method_listexpressiontraces.go b/resource-manager/web/2023-01-01/workflowrunactions/method_listexpressiontraces.go index c4b0d103202..34db9faf0de 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/method_listexpressiontraces.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/method_listexpressiontraces.go @@ -15,12 +15,12 @@ import ( type ListExpressionTracesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ExpressionTraces + Model *[]interface{} } type ListExpressionTracesCompleteResult struct { LatestHttpResponse *http.Response - Items []ExpressionTraces + Items []interface{} } // ListExpressionTraces ... @@ -50,7 +50,7 @@ func (c WorkflowRunActionsClient) ListExpressionTraces(ctx context.Context, id A } var values struct { - Values *[]ExpressionTraces `json:"value"` + Values *[]interface{} `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -62,13 +62,8 @@ func (c WorkflowRunActionsClient) ListExpressionTraces(ctx context.Context, id A } // ListExpressionTracesComplete retrieves all the results into a single object -func (c WorkflowRunActionsClient) ListExpressionTracesComplete(ctx context.Context, id ActionId) (ListExpressionTracesCompleteResult, error) { - return c.ListExpressionTracesCompleteMatchingPredicate(ctx, id, ExpressionTracesOperationPredicate{}) -} - -// ListExpressionTracesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WorkflowRunActionsClient) ListExpressionTracesCompleteMatchingPredicate(ctx context.Context, id ActionId, predicate ExpressionTracesOperationPredicate) (result ListExpressionTracesCompleteResult, err error) { - items := make([]ExpressionTraces, 0) +func (c WorkflowRunActionsClient) ListExpressionTracesComplete(ctx context.Context, id ActionId) (result ListExpressionTracesCompleteResult, err error) { + items := make([]interface{}, 0) resp, err := c.ListExpressionTraces(ctx, id) if err != nil { @@ -77,9 +72,7 @@ func (c WorkflowRunActionsClient) ListExpressionTracesCompleteMatchingPredicate( } if resp.Model != nil { for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } + items = append(items, v) } } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces.go b/resource-manager/web/2023-01-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces.go index 50835737025..0e11efabe16 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces.go @@ -15,12 +15,12 @@ import ( type WorkflowRunActionRepetitionsListExpressionTracesOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *[]ExpressionTraces + Model *[]interface{} } type WorkflowRunActionRepetitionsListExpressionTracesCompleteResult struct { LatestHttpResponse *http.Response - Items []ExpressionTraces + Items []interface{} } // WorkflowRunActionRepetitionsListExpressionTraces ... @@ -50,7 +50,7 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTrac } var values struct { - Values *[]ExpressionTraces `json:"value"` + Values *[]interface{} `json:"value"` } if err = resp.Unmarshal(&values); err != nil { return @@ -62,13 +62,8 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTrac } // WorkflowRunActionRepetitionsListExpressionTracesComplete retrieves all the results into a single object -func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTracesComplete(ctx context.Context, id RepetitionId) (WorkflowRunActionRepetitionsListExpressionTracesCompleteResult, error) { - return c.WorkflowRunActionRepetitionsListExpressionTracesCompleteMatchingPredicate(ctx, id, ExpressionTracesOperationPredicate{}) -} - -// WorkflowRunActionRepetitionsListExpressionTracesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTracesCompleteMatchingPredicate(ctx context.Context, id RepetitionId, predicate ExpressionTracesOperationPredicate) (result WorkflowRunActionRepetitionsListExpressionTracesCompleteResult, err error) { - items := make([]ExpressionTraces, 0) +func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTracesComplete(ctx context.Context, id RepetitionId) (result WorkflowRunActionRepetitionsListExpressionTracesCompleteResult, err error) { + items := make([]interface{}, 0) resp, err := c.WorkflowRunActionRepetitionsListExpressionTraces(ctx, id) if err != nil { @@ -77,9 +72,7 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTrac } if resp.Model != nil { for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } + items = append(items, v) } } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/model_azureresourceerrorinfo.go b/resource-manager/web/2023-01-01/workflowrunactions/model_azureresourceerrorinfo.go deleted file mode 100644 index 59c3c304adb..00000000000 --- a/resource-manager/web/2023-01-01/workflowrunactions/model_azureresourceerrorinfo.go +++ /dev/null @@ -1,10 +0,0 @@ -package workflowrunactions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureResourceErrorInfo struct { - Code string `json:"code"` - Details *[]AzureResourceErrorInfo `json:"details,omitempty"` - Message string `json:"message"` -} diff --git a/resource-manager/web/2023-01-01/workflowrunactions/model_expression.go b/resource-manager/web/2023-01-01/workflowrunactions/model_expression.go deleted file mode 100644 index a7689b2d49e..00000000000 --- a/resource-manager/web/2023-01-01/workflowrunactions/model_expression.go +++ /dev/null @@ -1,11 +0,0 @@ -package workflowrunactions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Expression struct { - Error *AzureResourceErrorInfo `json:"error,omitempty"` - Subexpressions *[]Expression `json:"subexpressions,omitempty"` - Text *string `json:"text,omitempty"` - Value *interface{} `json:"value,omitempty"` -} diff --git a/resource-manager/web/2023-01-01/workflowrunactions/model_expressionroot.go b/resource-manager/web/2023-01-01/workflowrunactions/model_expressionroot.go deleted file mode 100644 index 29e8bb99a41..00000000000 --- a/resource-manager/web/2023-01-01/workflowrunactions/model_expressionroot.go +++ /dev/null @@ -1,12 +0,0 @@ -package workflowrunactions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressionRoot struct { - Error *AzureResourceErrorInfo `json:"error,omitempty"` - Path *string `json:"path,omitempty"` - Subexpressions *[]Expression `json:"subexpressions,omitempty"` - Text *string `json:"text,omitempty"` - Value *interface{} `json:"value,omitempty"` -} diff --git a/resource-manager/web/2023-01-01/workflowrunactions/model_expressiontraces.go b/resource-manager/web/2023-01-01/workflowrunactions/model_expressiontraces.go deleted file mode 100644 index 913fc1bbd9b..00000000000 --- a/resource-manager/web/2023-01-01/workflowrunactions/model_expressiontraces.go +++ /dev/null @@ -1,10 +0,0 @@ -package workflowrunactions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressionTraces struct { - Inputs *[]ExpressionRoot `json:"inputs,omitempty"` - NextLink *string `json:"nextLink,omitempty"` - Value *interface{} `json:"value,omitempty"` -} diff --git a/resource-manager/web/2023-01-01/workflowrunactions/predicates.go b/resource-manager/web/2023-01-01/workflowrunactions/predicates.go index 21fd66034c2..fa466cf2c8e 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/predicates.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/predicates.go @@ -3,24 +3,6 @@ package workflowrunactions // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ExpressionTracesOperationPredicate struct { - NextLink *string - Value *interface{} -} - -func (p ExpressionTracesOperationPredicate) Matches(input ExpressionTraces) bool { - - if p.NextLink != nil && (input.NextLink == nil || *p.NextLink != *input.NextLink) { - return false - } - - if p.Value != nil && (input.Value == nil || *p.Value != *input.Value) { - return false - } - - return true -} - type RequestHistoryOperationPredicate struct { Id *string Location *string