diff --git a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/machinelearningservicesapi/interfaces.go b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/machinelearningservicesapi/interfaces.go index 1e2cdfbfa484..4512c69f7c38 100644 --- a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/machinelearningservicesapi/interfaces.go +++ b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/machinelearningservicesapi/interfaces.go @@ -46,7 +46,7 @@ var _ WorkspacesClientAPI = (*machinelearningservices.WorkspacesClient)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { - List(ctx context.Context, location string) (result machinelearningservices.ListUsagesResultPage, err error) + List(ctx context.Context, location string, expandChildren string) (result machinelearningservices.ListUsagesResultPage, err error) } var _ UsagesClientAPI = (*machinelearningservices.UsagesClient)(nil) diff --git a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/usages.go b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/usages.go index 5617427c6421..e1c426c6a935 100644 --- a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/usages.go +++ b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/usages.go @@ -44,7 +44,8 @@ func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesCli // List gets the current usage information as well as limits for AML resources for given subscription and location. // Parameters: // location - the location for which resource usage is queried. -func (client UsagesClient) List(ctx context.Context, location string) (result ListUsagesResultPage, err error) { +// expandChildren - specifies if detailed usages of child resources are required. +func (client UsagesClient) List(ctx context.Context, location string, expandChildren string) (result ListUsagesResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.List") defer func() { @@ -62,7 +63,7 @@ func (client UsagesClient) List(ctx context.Context, location string) (result Li } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, location) + req, err := client.ListPreparer(ctx, location, expandChildren) if err != nil { err = autorest.NewErrorWithError(err, "machinelearningservices.UsagesClient", "List", nil, "Failure preparing request") return @@ -84,7 +85,7 @@ func (client UsagesClient) List(ctx context.Context, location string) (result Li } // ListPreparer prepares the List request. -func (client UsagesClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) { +func (client UsagesClient) ListPreparer(ctx context.Context, location string, expandChildren string) (*http.Request, error) { pathParameters := map[string]interface{}{ "location": autorest.Encode("path", location), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -94,6 +95,9 @@ func (client UsagesClient) ListPreparer(ctx context.Context, location string) (* queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(expandChildren) > 0 { + queryParameters["expandChildren"] = autorest.Encode("query", expandChildren) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -145,7 +149,7 @@ func (client UsagesClient) listNextResults(ctx context.Context, lastResults List } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client UsagesClient) ListComplete(ctx context.Context, location string) (result ListUsagesResultIterator, err error) { +func (client UsagesClient) ListComplete(ctx context.Context, location string, expandChildren string) (result ListUsagesResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.List") defer func() { @@ -156,6 +160,6 @@ func (client UsagesClient) ListComplete(ctx context.Context, location string) (r tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, location) + result.page, err = client.List(ctx, location, expandChildren) return }