Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto PR: Regenerating the Go SDK (b48b49a6998f2a0482a974e31d9a1900b9649543) #860

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ client.Client.Authorizer = authorizer
ctx := context.TODO()
id := agentpools.NewAgentPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "agentPoolValue")

payload := agentpools.AgentPool{
payload := agentpools.SubResource{
// ...
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
type CreateOrUpdateOperationResponse struct {
Poller polling.LongRunningPoller
HttpResponse *http.Response
Model *AgentPool
Model *SubResource
}

// CreateOrUpdate ...
func (c AgentPoolsClient) CreateOrUpdate(ctx context.Context, id AgentPoolId, input AgentPool) (result CreateOrUpdateOperationResponse, err error) {
func (c AgentPoolsClient) CreateOrUpdate(ctx context.Context, id AgentPoolId, input SubResource) (result CreateOrUpdateOperationResponse, err error) {
req, err := c.preparerForCreateOrUpdate(ctx, id, input)
if err != nil {
err = autorest.NewErrorWithError(err, "agentpools.AgentPoolsClient", "CreateOrUpdate", nil, "Failure preparing request")
Expand All @@ -37,7 +37,7 @@ func (c AgentPoolsClient) CreateOrUpdate(ctx context.Context, id AgentPoolId, in
}

// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed
func (c AgentPoolsClient) CreateOrUpdateThenPoll(ctx context.Context, id AgentPoolId, input AgentPool) error {
func (c AgentPoolsClient) CreateOrUpdateThenPoll(ctx context.Context, id AgentPoolId, input SubResource) error {
result, err := c.CreateOrUpdate(ctx, id, input)
if err != nil {
return fmt.Errorf("performing CreateOrUpdate: %+v", err)
Expand All @@ -51,7 +51,7 @@ func (c AgentPoolsClient) CreateOrUpdateThenPoll(ctx context.Context, id AgentPo
}

// preparerForCreateOrUpdate prepares the CreateOrUpdate request.
func (c AgentPoolsClient) preparerForCreateOrUpdate(ctx context.Context, id AgentPoolId, input AgentPool) (*http.Request, error) {
func (c AgentPoolsClient) preparerForCreateOrUpdate(ctx context.Context, id AgentPoolId, input SubResource) (*http.Request, error) {
queryParameters := map[string]interface{}{
"api-version": defaultApiVersion,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

type GetOperationResponse struct {
HttpResponse *http.Response
Model *AgentPool
Model *SubResource
}

// Get ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import (

type ListOperationResponse struct {
HttpResponse *http.Response
Model *[]AgentPool
Model *[]SubResource

nextLink *string
nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error)
}

type ListCompleteResult struct {
Items []AgentPool
Items []SubResource
}

func (r ListOperationResponse) HasMore() bool {
Expand Down Expand Up @@ -104,8 +104,8 @@ func (c AgentPoolsClient) preparerForListWithNextLink(ctx context.Context, nextL
// closes the http.Response Body.
func (c AgentPoolsClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) {
type page struct {
Values []AgentPool `json:"value"`
NextLink *string `json:"nextLink"`
Values []SubResource `json:"value"`
NextLink *string `json:"nextLink"`
}
var respObj page
err = autorest.Respond(
Expand Down Expand Up @@ -144,12 +144,12 @@ func (c AgentPoolsClient) responderForList(resp *http.Response) (result ListOper

// ListComplete retrieves all of the results into a single object
func (c AgentPoolsClient) ListComplete(ctx context.Context, id commonids.KubernetesClusterId) (ListCompleteResult, error) {
return c.ListCompleteMatchingPredicate(ctx, id, AgentPoolOperationPredicate{})
return c.ListCompleteMatchingPredicate(ctx, id, SubResourceOperationPredicate{})
}

// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (c AgentPoolsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.KubernetesClusterId, predicate AgentPoolOperationPredicate) (resp ListCompleteResult, err error) {
items := make([]AgentPool, 0)
func (c AgentPoolsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.KubernetesClusterId, predicate SubResourceOperationPredicate) (resp ListCompleteResult, err error) {
items := make([]SubResource, 0)

page, err := c.List(ctx, id)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package agentpools
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type AgentPool struct {
type SubResource struct {
Id *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package agentpools
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type AgentPoolOperationPredicate struct {
type SubResourceOperationPredicate struct {
Id *string
Name *string
Type *string
}

func (p AgentPoolOperationPredicate) Matches(input AgentPool) bool {
func (p SubResourceOperationPredicate) Matches(input SubResource) bool {

if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ client.Client.Authorizer = authorizer
ctx := context.TODO()
id := managedclusters.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue")

payload := managedclusters.ManagedCluster{
payload := managedclusters.Resource{
// ...
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import (
type CreateOrUpdateOperationResponse struct {
Poller polling.LongRunningPoller
HttpResponse *http.Response
Model *ManagedCluster
Model *Resource
}

// CreateOrUpdate ...
func (c ManagedClustersClient) CreateOrUpdate(ctx context.Context, id commonids.KubernetesClusterId, input ManagedCluster) (result CreateOrUpdateOperationResponse, err error) {
func (c ManagedClustersClient) CreateOrUpdate(ctx context.Context, id commonids.KubernetesClusterId, input Resource) (result CreateOrUpdateOperationResponse, err error) {
req, err := c.preparerForCreateOrUpdate(ctx, id, input)
if err != nil {
err = autorest.NewErrorWithError(err, "managedclusters.ManagedClustersClient", "CreateOrUpdate", nil, "Failure preparing request")
Expand All @@ -38,7 +38,7 @@ func (c ManagedClustersClient) CreateOrUpdate(ctx context.Context, id commonids.
}

// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed
func (c ManagedClustersClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.KubernetesClusterId, input ManagedCluster) error {
func (c ManagedClustersClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.KubernetesClusterId, input Resource) error {
result, err := c.CreateOrUpdate(ctx, id, input)
if err != nil {
return fmt.Errorf("performing CreateOrUpdate: %+v", err)
Expand All @@ -52,7 +52,7 @@ func (c ManagedClustersClient) CreateOrUpdateThenPoll(ctx context.Context, id co
}

// preparerForCreateOrUpdate prepares the CreateOrUpdate request.
func (c ManagedClustersClient) preparerForCreateOrUpdate(ctx context.Context, id commonids.KubernetesClusterId, input ManagedCluster) (*http.Request, error) {
func (c ManagedClustersClient) preparerForCreateOrUpdate(ctx context.Context, id commonids.KubernetesClusterId, input Resource) (*http.Request, error) {
queryParameters := map[string]interface{}{
"api-version": defaultApiVersion,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

type GetOperationResponse struct {
HttpResponse *http.Response
Model *ManagedCluster
Model *Resource
}

// Get ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

type GetAccessProfileOperationResponse struct {
HttpResponse *http.Response
Model *ManagedClusterAccessProfile
Model *Resource
}

// GetAccessProfile ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import (

type ListOperationResponse struct {
HttpResponse *http.Response
Model *[]ManagedCluster
Model *[]Resource

nextLink *string
nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error)
}

type ListCompleteResult struct {
Items []ManagedCluster
Items []Resource
}

func (r ListOperationResponse) HasMore() bool {
Expand Down Expand Up @@ -104,8 +104,8 @@ func (c ManagedClustersClient) preparerForListWithNextLink(ctx context.Context,
// closes the http.Response Body.
func (c ManagedClustersClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) {
type page struct {
Values []ManagedCluster `json:"value"`
NextLink *string `json:"nextLink"`
Values []Resource `json:"value"`
NextLink *string `json:"nextLink"`
}
var respObj page
err = autorest.Respond(
Expand Down Expand Up @@ -144,12 +144,12 @@ func (c ManagedClustersClient) responderForList(resp *http.Response) (result Lis

// ListComplete retrieves all of the results into a single object
func (c ManagedClustersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) {
return c.ListCompleteMatchingPredicate(ctx, id, ManagedClusterOperationPredicate{})
return c.ListCompleteMatchingPredicate(ctx, id, ResourceOperationPredicate{})
}

// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (c ManagedClustersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ManagedClusterOperationPredicate) (resp ListCompleteResult, err error) {
items := make([]ManagedCluster, 0)
func (c ManagedClustersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ResourceOperationPredicate) (resp ListCompleteResult, err error) {
items := make([]Resource, 0)

page, err := c.List(ctx, id)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import (

type ListByResourceGroupOperationResponse struct {
HttpResponse *http.Response
Model *[]ManagedCluster
Model *[]Resource

nextLink *string
nextPageFunc func(ctx context.Context, nextLink string) (ListByResourceGroupOperationResponse, error)
}

type ListByResourceGroupCompleteResult struct {
Items []ManagedCluster
Items []Resource
}

func (r ListByResourceGroupOperationResponse) HasMore() bool {
Expand Down Expand Up @@ -104,8 +104,8 @@ func (c ManagedClustersClient) preparerForListByResourceGroupWithNextLink(ctx co
// closes the http.Response Body.
func (c ManagedClustersClient) responderForListByResourceGroup(resp *http.Response) (result ListByResourceGroupOperationResponse, err error) {
type page struct {
Values []ManagedCluster `json:"value"`
NextLink *string `json:"nextLink"`
Values []Resource `json:"value"`
NextLink *string `json:"nextLink"`
}
var respObj page
err = autorest.Respond(
Expand Down Expand Up @@ -144,12 +144,12 @@ func (c ManagedClustersClient) responderForListByResourceGroup(resp *http.Respon

// ListByResourceGroupComplete retrieves all of the results into a single object
func (c ManagedClustersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) {
return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ManagedClusterOperationPredicate{})
return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ResourceOperationPredicate{})
}

// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (c ManagedClustersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ManagedClusterOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) {
items := make([]ManagedCluster, 0)
func (c ManagedClustersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ResourceOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) {
items := make([]Resource, 0)

page, err := c.ListByResourceGroup(ctx, id)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
type UpdateTagsOperationResponse struct {
Poller polling.LongRunningPoller
HttpResponse *http.Response
Model *ManagedCluster
Model *Resource
}

// UpdateTags ...
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package managedclusters
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type ManagedCluster struct {
type Resource struct {
Id *string `json:"id,omitempty"`
Location string `json:"location"`
Name *string `json:"name,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package managedclusters
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type ManagedClusterOperationPredicate struct {
type ResourceOperationPredicate struct {
Id *string
Location *string
Name *string
Type *string
}

func (p ManagedClusterOperationPredicate) Matches(input ManagedCluster) bool {
func (p ResourceOperationPredicate) Matches(input Resource) bool {

if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import (
type ListByClusterOperationResponse struct {
HttpResponse *http.Response
OData *odata.OData
Model *[]RuntimeScriptActionDetail
Model *[]RuntimeScriptAction
}

type ListByClusterCompleteResult struct {
LatestHttpResponse *http.Response
Items []RuntimeScriptActionDetail
Items []RuntimeScriptAction
}

// ListByCluster ...
Expand Down Expand Up @@ -51,7 +51,7 @@ func (c ScriptActionsClient) ListByCluster(ctx context.Context, id commonids.HDI
}

var values struct {
Values *[]RuntimeScriptActionDetail `json:"value"`
Values *[]RuntimeScriptAction `json:"value"`
}
if err = resp.Unmarshal(&values); err != nil {
return
Expand All @@ -64,12 +64,12 @@ func (c ScriptActionsClient) ListByCluster(ctx context.Context, id commonids.HDI

// ListByClusterComplete retrieves all the results into a single object
func (c ScriptActionsClient) ListByClusterComplete(ctx context.Context, id commonids.HDInsightClusterId) (ListByClusterCompleteResult, error) {
return c.ListByClusterCompleteMatchingPredicate(ctx, id, RuntimeScriptActionDetailOperationPredicate{})
return c.ListByClusterCompleteMatchingPredicate(ctx, id, RuntimeScriptActionOperationPredicate{})
}

// ListByClusterCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (c ScriptActionsClient) ListByClusterCompleteMatchingPredicate(ctx context.Context, id commonids.HDInsightClusterId, predicate RuntimeScriptActionDetailOperationPredicate) (result ListByClusterCompleteResult, err error) {
items := make([]RuntimeScriptActionDetail, 0)
func (c ScriptActionsClient) ListByClusterCompleteMatchingPredicate(ctx context.Context, id commonids.HDInsightClusterId, predicate RuntimeScriptActionOperationPredicate) (result ListByClusterCompleteResult, err error) {
items := make([]RuntimeScriptAction, 0)

resp, err := c.ListByCluster(ctx, id)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package scriptactions
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type RuntimeScriptActionDetail struct {
type RuntimeScriptAction struct {
ApplicationName *string `json:"applicationName,omitempty"`
Name string `json:"name"`
Parameters *string `json:"parameters,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package scriptactions
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type RuntimeScriptActionDetailOperationPredicate struct {
type RuntimeScriptActionOperationPredicate struct {
ApplicationName *string
Name *string
Parameters *string
Uri *string
}

func (p RuntimeScriptActionDetailOperationPredicate) Matches(input RuntimeScriptActionDetail) bool {
func (p RuntimeScriptActionOperationPredicate) Matches(input RuntimeScriptAction) bool {

if p.ApplicationName != nil && (input.ApplicationName == nil || *p.ApplicationName != *input.ApplicationName) {
return false
Expand Down
Loading
Loading