diff --git a/profiles/latest/appinsights/mgmt/insights/models.go b/profiles/latest/appinsights/mgmt/insights/models.go index f6c5ca747cd8..d49dfdf12ba6 100644 --- a/profiles/latest/appinsights/mgmt/insights/models.go +++ b/profiles/latest/appinsights/mgmt/insights/models.go @@ -190,7 +190,6 @@ type OperationListResultIterator = original.OperationListResultIterator type OperationListResultPage = original.OperationListResultPage type OperationsClient = original.OperationsClient type ProactiveDetectionConfigurationsClient = original.ProactiveDetectionConfigurationsClient -type SetObject = original.SetObject type TagsResource = original.TagsResource type WebTest = original.WebTest type WebTestGeolocation = original.WebTestGeolocation diff --git a/profiles/preview/appinsights/mgmt/insights/models.go b/profiles/preview/appinsights/mgmt/insights/models.go index 609896b561ec..a4390fd072bc 100644 --- a/profiles/preview/appinsights/mgmt/insights/models.go +++ b/profiles/preview/appinsights/mgmt/insights/models.go @@ -190,7 +190,6 @@ type OperationListResultIterator = original.OperationListResultIterator type OperationListResultPage = original.OperationListResultPage type OperationsClient = original.OperationsClient type ProactiveDetectionConfigurationsClient = original.ProactiveDetectionConfigurationsClient -type SetObject = original.SetObject type TagsResource = original.TagsResource type WebTest = original.WebTest type WebTestGeolocation = original.WebTestGeolocation diff --git a/services/appinsights/mgmt/2015-05-01/insights/annotations.go b/services/appinsights/mgmt/2015-05-01/insights/annotations.go index cc478c3a72ea..c6cbb32e7e91 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/annotations.go +++ b/services/appinsights/mgmt/2015-05-01/insights/annotations.go @@ -137,13 +137,13 @@ func (client AnnotationsClient) CreateResponder(resp *http.Response) (result Lis // resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the Application Insights component resource. // annotationID - the unique annotation ID. This is unique within a Application Insights component. -func (client AnnotationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, annotationID string) (result SetObject, err error) { +func (client AnnotationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, annotationID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AnnotationsClient.Delete") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -166,7 +166,7 @@ func (client AnnotationsClient) Delete(ctx context.Context, resourceGroupName st resp, err := client.DeleteSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} + result.Response = resp err = autorest.NewErrorWithError(err, "insights.AnnotationsClient", "Delete", resp, "Failure sending request") return } @@ -210,14 +210,13 @@ func (client AnnotationsClient) DeleteSender(req *http.Request) (*http.Response, // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client AnnotationsClient) DeleteResponder(resp *http.Response) (result SetObject, err error) { +func (client AnnotationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } diff --git a/services/appinsights/mgmt/2015-05-01/insights/insightsapi/interfaces.go b/services/appinsights/mgmt/2015-05-01/insights/insightsapi/interfaces.go index e7d2c7ad86a7..38f48876d203 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/insightsapi/interfaces.go +++ b/services/appinsights/mgmt/2015-05-01/insights/insightsapi/interfaces.go @@ -33,7 +33,7 @@ var _ OperationsClientAPI = (*insights.OperationsClient)(nil) // AnnotationsClientAPI contains the set of methods on the AnnotationsClient type. type AnnotationsClientAPI interface { Create(ctx context.Context, resourceGroupName string, resourceName string, annotationProperties insights.Annotation) (result insights.ListAnnotation, err error) - Delete(ctx context.Context, resourceGroupName string, resourceName string, annotationID string) (result insights.SetObject, err error) + Delete(ctx context.Context, resourceGroupName string, resourceName string, annotationID string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, resourceName string, annotationID string) (result insights.ListAnnotation, err error) List(ctx context.Context, resourceGroupName string, resourceName string, start string, end string) (result insights.AnnotationsListResult, err error) } @@ -116,7 +116,7 @@ var _ ComponentsClientAPI = (*insights.ComponentsClient)(nil) // WorkItemConfigurationsClientAPI contains the set of methods on the WorkItemConfigurationsClient type. type WorkItemConfigurationsClientAPI interface { Create(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigurationProperties insights.WorkItemCreateConfiguration) (result insights.WorkItemConfiguration, err error) - Delete(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigID string) (result insights.SetObject, err error) + Delete(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigID string) (result autorest.Response, err error) GetDefault(ctx context.Context, resourceGroupName string, resourceName string) (result insights.WorkItemConfiguration, err error) GetItem(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigID string) (result insights.WorkItemConfiguration, err error) List(ctx context.Context, resourceGroupName string, resourceName string) (result insights.WorkItemConfigurationsListResult, err error) diff --git a/services/appinsights/mgmt/2015-05-01/insights/models.go b/services/appinsights/mgmt/2015-05-01/insights/models.go index 93a0f7d8dc9e..3c63e3253c28 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/models.go +++ b/services/appinsights/mgmt/2015-05-01/insights/models.go @@ -1197,12 +1197,6 @@ func NewOperationListResultPage(getNextPage func(context.Context, OperationListR return OperationListResultPage{fn: getNextPage} } -// SetObject ... -type SetObject struct { - autorest.Response `json:"-"` - Value interface{} `json:"value,omitempty"` -} - // TagsResource a container holding only the Tags for a resource, allowing the user to update the tags on a // WebTest instance. type TagsResource struct { diff --git a/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go b/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go index e445f49da908..709f900b6ba5 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go +++ b/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go @@ -138,13 +138,13 @@ func (client WorkItemConfigurationsClient) CreateResponder(resp *http.Response) // resourceName - the name of the Application Insights component resource. // workItemConfigID - the unique work item configuration Id. This can be either friendly name of connector as // defined in connector configuration -func (client WorkItemConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigID string) (result SetObject, err error) { +func (client WorkItemConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/WorkItemConfigurationsClient.Delete") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -167,7 +167,7 @@ func (client WorkItemConfigurationsClient) Delete(ctx context.Context, resourceG resp, err := client.DeleteSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} + result.Response = resp err = autorest.NewErrorWithError(err, "insights.WorkItemConfigurationsClient", "Delete", resp, "Failure sending request") return } @@ -211,14 +211,13 @@ func (client WorkItemConfigurationsClient) DeleteSender(req *http.Request) (*htt // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client WorkItemConfigurationsClient) DeleteResponder(resp *http.Response) (result SetObject, err error) { +func (client WorkItemConfigurationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return }