1package securityinsight 2 3// Copyright (c) Microsoft Corporation. All rights reserved. 4// Licensed under the MIT License. See License.txt in the project root for license information. 5// 6// Code generated by Microsoft (R) AutoRest Code Generator. 7// Changes may cause incorrect behavior and will be lost if the code is regenerated. 8 9import ( 10 "context" 11 "github.com/Azure/go-autorest/autorest" 12 "github.com/Azure/go-autorest/autorest/azure" 13 "github.com/Azure/go-autorest/autorest/validation" 14 "github.com/Azure/go-autorest/tracing" 15 "net/http" 16) 17 18// CaseRelationsClient is the API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider 19type CaseRelationsClient struct { 20 BaseClient 21} 22 23// NewCaseRelationsClient creates an instance of the CaseRelationsClient client. 24func NewCaseRelationsClient(subscriptionID string) CaseRelationsClient { 25 return NewCaseRelationsClientWithBaseURI(DefaultBaseURI, subscriptionID) 26} 27 28// NewCaseRelationsClientWithBaseURI creates an instance of the CaseRelationsClient client using a custom endpoint. 29// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). 30func NewCaseRelationsClientWithBaseURI(baseURI string, subscriptionID string) CaseRelationsClient { 31 return CaseRelationsClient{NewWithBaseURI(baseURI, subscriptionID)} 32} 33 34// CreateOrUpdateRelation creates or updates the case relation. 35// Parameters: 36// resourceGroupName - the name of the resource group within the user's subscription. The name is case 37// insensitive. 38// operationalInsightsResourceProvider - the namespace of workspaces resource provider- 39// Microsoft.OperationalInsights. 40// workspaceName - the name of the workspace. 41// caseID - case ID 42// relationName - relation Name 43// relationInputModel - the relation input model 44func (client CaseRelationsClient) CreateOrUpdateRelation(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, relationName string, relationInputModel RelationsModelInput) (result CaseRelation, err error) { 45 if tracing.IsEnabled() { 46 ctx = tracing.StartSpan(ctx, fqdn+"/CaseRelationsClient.CreateOrUpdateRelation") 47 defer func() { 48 sc := -1 49 if result.Response.Response != nil { 50 sc = result.Response.Response.StatusCode 51 } 52 tracing.EndSpan(ctx, sc, err) 53 }() 54 } 55 if err := validation.Validate([]validation.Validation{ 56 {TargetValue: client.SubscriptionID, 57 Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, 58 {TargetValue: resourceGroupName, 59 Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, 60 {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, 61 {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, 62 {TargetValue: workspaceName, 63 Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, 64 {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { 65 return result, validation.NewError("securityinsight.CaseRelationsClient", "CreateOrUpdateRelation", err.Error()) 66 } 67 68 req, err := client.CreateOrUpdateRelationPreparer(ctx, resourceGroupName, operationalInsightsResourceProvider, workspaceName, caseID, relationName, relationInputModel) 69 if err != nil { 70 err = autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "CreateOrUpdateRelation", nil, "Failure preparing request") 71 return 72 } 73 74 resp, err := client.CreateOrUpdateRelationSender(req) 75 if err != nil { 76 result.Response = autorest.Response{Response: resp} 77 err = autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "CreateOrUpdateRelation", resp, "Failure sending request") 78 return 79 } 80 81 result, err = client.CreateOrUpdateRelationResponder(resp) 82 if err != nil { 83 err = autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "CreateOrUpdateRelation", resp, "Failure responding to request") 84 return 85 } 86 87 return 88} 89 90// CreateOrUpdateRelationPreparer prepares the CreateOrUpdateRelation request. 91func (client CaseRelationsClient) CreateOrUpdateRelationPreparer(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, relationName string, relationInputModel RelationsModelInput) (*http.Request, error) { 92 pathParameters := map[string]interface{}{ 93 "caseId": autorest.Encode("path", caseID), 94 "operationalInsightsResourceProvider": autorest.Encode("path", operationalInsightsResourceProvider), 95 "relationName": autorest.Encode("path", relationName), 96 "resourceGroupName": autorest.Encode("path", resourceGroupName), 97 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 98 "workspaceName": autorest.Encode("path", workspaceName), 99 } 100 101 const APIVersion = "2019-01-01-preview" 102 queryParameters := map[string]interface{}{ 103 "api-version": APIVersion, 104 } 105 106 preparer := autorest.CreatePreparer( 107 autorest.AsContentType("application/json; charset=utf-8"), 108 autorest.AsPut(), 109 autorest.WithBaseURL(client.BaseURI), 110 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}/relations/{relationName}", pathParameters), 111 autorest.WithJSON(relationInputModel), 112 autorest.WithQueryParameters(queryParameters)) 113 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 114} 115 116// CreateOrUpdateRelationSender sends the CreateOrUpdateRelation request. The method will close the 117// http.Response Body if it receives an error. 118func (client CaseRelationsClient) CreateOrUpdateRelationSender(req *http.Request) (*http.Response, error) { 119 return client.Send(req, azure.DoRetryWithRegistration(client.Client)) 120} 121 122// CreateOrUpdateRelationResponder handles the response to the CreateOrUpdateRelation request. The method always 123// closes the http.Response Body. 124func (client CaseRelationsClient) CreateOrUpdateRelationResponder(resp *http.Response) (result CaseRelation, err error) { 125 err = autorest.Respond( 126 resp, 127 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), 128 autorest.ByUnmarshallingJSON(&result), 129 autorest.ByClosing()) 130 result.Response = autorest.Response{Response: resp} 131 return 132} 133 134// DeleteRelation delete the case relation. 135// Parameters: 136// resourceGroupName - the name of the resource group within the user's subscription. The name is case 137// insensitive. 138// operationalInsightsResourceProvider - the namespace of workspaces resource provider- 139// Microsoft.OperationalInsights. 140// workspaceName - the name of the workspace. 141// caseID - case ID 142// relationName - relation Name 143func (client CaseRelationsClient) DeleteRelation(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, relationName string) (result autorest.Response, err error) { 144 if tracing.IsEnabled() { 145 ctx = tracing.StartSpan(ctx, fqdn+"/CaseRelationsClient.DeleteRelation") 146 defer func() { 147 sc := -1 148 if result.Response != nil { 149 sc = result.Response.StatusCode 150 } 151 tracing.EndSpan(ctx, sc, err) 152 }() 153 } 154 if err := validation.Validate([]validation.Validation{ 155 {TargetValue: client.SubscriptionID, 156 Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, 157 {TargetValue: resourceGroupName, 158 Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, 159 {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, 160 {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, 161 {TargetValue: workspaceName, 162 Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, 163 {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { 164 return result, validation.NewError("securityinsight.CaseRelationsClient", "DeleteRelation", err.Error()) 165 } 166 167 req, err := client.DeleteRelationPreparer(ctx, resourceGroupName, operationalInsightsResourceProvider, workspaceName, caseID, relationName) 168 if err != nil { 169 err = autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "DeleteRelation", nil, "Failure preparing request") 170 return 171 } 172 173 resp, err := client.DeleteRelationSender(req) 174 if err != nil { 175 result.Response = resp 176 err = autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "DeleteRelation", resp, "Failure sending request") 177 return 178 } 179 180 result, err = client.DeleteRelationResponder(resp) 181 if err != nil { 182 err = autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "DeleteRelation", resp, "Failure responding to request") 183 return 184 } 185 186 return 187} 188 189// DeleteRelationPreparer prepares the DeleteRelation request. 190func (client CaseRelationsClient) DeleteRelationPreparer(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, relationName string) (*http.Request, error) { 191 pathParameters := map[string]interface{}{ 192 "caseId": autorest.Encode("path", caseID), 193 "operationalInsightsResourceProvider": autorest.Encode("path", operationalInsightsResourceProvider), 194 "relationName": autorest.Encode("path", relationName), 195 "resourceGroupName": autorest.Encode("path", resourceGroupName), 196 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 197 "workspaceName": autorest.Encode("path", workspaceName), 198 } 199 200 const APIVersion = "2019-01-01-preview" 201 queryParameters := map[string]interface{}{ 202 "api-version": APIVersion, 203 } 204 205 preparer := autorest.CreatePreparer( 206 autorest.AsDelete(), 207 autorest.WithBaseURL(client.BaseURI), 208 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}/relations/{relationName}", pathParameters), 209 autorest.WithQueryParameters(queryParameters)) 210 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 211} 212 213// DeleteRelationSender sends the DeleteRelation request. The method will close the 214// http.Response Body if it receives an error. 215func (client CaseRelationsClient) DeleteRelationSender(req *http.Request) (*http.Response, error) { 216 return client.Send(req, azure.DoRetryWithRegistration(client.Client)) 217} 218 219// DeleteRelationResponder handles the response to the DeleteRelation request. The method always 220// closes the http.Response Body. 221func (client CaseRelationsClient) DeleteRelationResponder(resp *http.Response) (result autorest.Response, err error) { 222 err = autorest.Respond( 223 resp, 224 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), 225 autorest.ByClosing()) 226 result.Response = resp 227 return 228} 229 230// GetRelation gets a case relation. 231// Parameters: 232// resourceGroupName - the name of the resource group within the user's subscription. The name is case 233// insensitive. 234// operationalInsightsResourceProvider - the namespace of workspaces resource provider- 235// Microsoft.OperationalInsights. 236// workspaceName - the name of the workspace. 237// caseID - case ID 238// relationName - relation Name 239func (client CaseRelationsClient) GetRelation(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, relationName string) (result CaseRelation, err error) { 240 if tracing.IsEnabled() { 241 ctx = tracing.StartSpan(ctx, fqdn+"/CaseRelationsClient.GetRelation") 242 defer func() { 243 sc := -1 244 if result.Response.Response != nil { 245 sc = result.Response.Response.StatusCode 246 } 247 tracing.EndSpan(ctx, sc, err) 248 }() 249 } 250 if err := validation.Validate([]validation.Validation{ 251 {TargetValue: client.SubscriptionID, 252 Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, 253 {TargetValue: resourceGroupName, 254 Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, 255 {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, 256 {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, 257 {TargetValue: workspaceName, 258 Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, 259 {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { 260 return result, validation.NewError("securityinsight.CaseRelationsClient", "GetRelation", err.Error()) 261 } 262 263 req, err := client.GetRelationPreparer(ctx, resourceGroupName, operationalInsightsResourceProvider, workspaceName, caseID, relationName) 264 if err != nil { 265 err = autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "GetRelation", nil, "Failure preparing request") 266 return 267 } 268 269 resp, err := client.GetRelationSender(req) 270 if err != nil { 271 result.Response = autorest.Response{Response: resp} 272 err = autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "GetRelation", resp, "Failure sending request") 273 return 274 } 275 276 result, err = client.GetRelationResponder(resp) 277 if err != nil { 278 err = autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "GetRelation", resp, "Failure responding to request") 279 return 280 } 281 282 return 283} 284 285// GetRelationPreparer prepares the GetRelation request. 286func (client CaseRelationsClient) GetRelationPreparer(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, relationName string) (*http.Request, error) { 287 pathParameters := map[string]interface{}{ 288 "caseId": autorest.Encode("path", caseID), 289 "operationalInsightsResourceProvider": autorest.Encode("path", operationalInsightsResourceProvider), 290 "relationName": autorest.Encode("path", relationName), 291 "resourceGroupName": autorest.Encode("path", resourceGroupName), 292 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 293 "workspaceName": autorest.Encode("path", workspaceName), 294 } 295 296 const APIVersion = "2019-01-01-preview" 297 queryParameters := map[string]interface{}{ 298 "api-version": APIVersion, 299 } 300 301 preparer := autorest.CreatePreparer( 302 autorest.AsGet(), 303 autorest.WithBaseURL(client.BaseURI), 304 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}/relations/{relationName}", pathParameters), 305 autorest.WithQueryParameters(queryParameters)) 306 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 307} 308 309// GetRelationSender sends the GetRelation request. The method will close the 310// http.Response Body if it receives an error. 311func (client CaseRelationsClient) GetRelationSender(req *http.Request) (*http.Response, error) { 312 return client.Send(req, azure.DoRetryWithRegistration(client.Client)) 313} 314 315// GetRelationResponder handles the response to the GetRelation request. The method always 316// closes the http.Response Body. 317func (client CaseRelationsClient) GetRelationResponder(resp *http.Response) (result CaseRelation, err error) { 318 err = autorest.Respond( 319 resp, 320 azure.WithErrorUnlessStatusCode(http.StatusOK), 321 autorest.ByUnmarshallingJSON(&result), 322 autorest.ByClosing()) 323 result.Response = autorest.Response{Response: resp} 324 return 325} 326 327// List gets all case relations. 328// Parameters: 329// resourceGroupName - the name of the resource group within the user's subscription. The name is case 330// insensitive. 331// operationalInsightsResourceProvider - the namespace of workspaces resource provider- 332// Microsoft.OperationalInsights. 333// workspaceName - the name of the workspace. 334// caseID - case ID 335// filter - filters the results, based on a Boolean condition. Optional. 336// orderby - sorts the results. Optional. 337// top - returns only the first n results. Optional. 338// skipToken - skiptoken is only used if a previous operation returned a partial result. If a previous response 339// contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that 340// specifies a starting point to use for subsequent calls. Optional. 341func (client CaseRelationsClient) List(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, filter string, orderby string, top *int32, skipToken string) (result CaseRelationListPage, err error) { 342 if tracing.IsEnabled() { 343 ctx = tracing.StartSpan(ctx, fqdn+"/CaseRelationsClient.List") 344 defer func() { 345 sc := -1 346 if result.crl.Response.Response != nil { 347 sc = result.crl.Response.Response.StatusCode 348 } 349 tracing.EndSpan(ctx, sc, err) 350 }() 351 } 352 if err := validation.Validate([]validation.Validation{ 353 {TargetValue: client.SubscriptionID, 354 Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, 355 {TargetValue: resourceGroupName, 356 Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, 357 {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, 358 {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, 359 {TargetValue: workspaceName, 360 Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 90, Chain: nil}, 361 {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { 362 return result, validation.NewError("securityinsight.CaseRelationsClient", "List", err.Error()) 363 } 364 365 result.fn = client.listNextResults 366 req, err := client.ListPreparer(ctx, resourceGroupName, operationalInsightsResourceProvider, workspaceName, caseID, filter, orderby, top, skipToken) 367 if err != nil { 368 err = autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "List", nil, "Failure preparing request") 369 return 370 } 371 372 resp, err := client.ListSender(req) 373 if err != nil { 374 result.crl.Response = autorest.Response{Response: resp} 375 err = autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "List", resp, "Failure sending request") 376 return 377 } 378 379 result.crl, err = client.ListResponder(resp) 380 if err != nil { 381 err = autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "List", resp, "Failure responding to request") 382 return 383 } 384 if result.crl.hasNextLink() && result.crl.IsEmpty() { 385 err = result.NextWithContext(ctx) 386 return 387 } 388 389 return 390} 391 392// ListPreparer prepares the List request. 393func (client CaseRelationsClient) ListPreparer(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, filter string, orderby string, top *int32, skipToken string) (*http.Request, error) { 394 pathParameters := map[string]interface{}{ 395 "caseId": autorest.Encode("path", caseID), 396 "operationalInsightsResourceProvider": autorest.Encode("path", operationalInsightsResourceProvider), 397 "resourceGroupName": autorest.Encode("path", resourceGroupName), 398 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 399 "workspaceName": autorest.Encode("path", workspaceName), 400 } 401 402 const APIVersion = "2019-01-01-preview" 403 queryParameters := map[string]interface{}{ 404 "api-version": APIVersion, 405 } 406 if len(filter) > 0 { 407 queryParameters["$filter"] = autorest.Encode("query", filter) 408 } 409 if len(orderby) > 0 { 410 queryParameters["$orderby"] = autorest.Encode("query", orderby) 411 } 412 if top != nil { 413 queryParameters["$top"] = autorest.Encode("query", *top) 414 } 415 if len(skipToken) > 0 { 416 queryParameters["$skipToken"] = autorest.Encode("query", skipToken) 417 } 418 419 preparer := autorest.CreatePreparer( 420 autorest.AsGet(), 421 autorest.WithBaseURL(client.BaseURI), 422 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}/relations", pathParameters), 423 autorest.WithQueryParameters(queryParameters)) 424 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 425} 426 427// ListSender sends the List request. The method will close the 428// http.Response Body if it receives an error. 429func (client CaseRelationsClient) ListSender(req *http.Request) (*http.Response, error) { 430 return client.Send(req, azure.DoRetryWithRegistration(client.Client)) 431} 432 433// ListResponder handles the response to the List request. The method always 434// closes the http.Response Body. 435func (client CaseRelationsClient) ListResponder(resp *http.Response) (result CaseRelationList, err error) { 436 err = autorest.Respond( 437 resp, 438 azure.WithErrorUnlessStatusCode(http.StatusOK), 439 autorest.ByUnmarshallingJSON(&result), 440 autorest.ByClosing()) 441 result.Response = autorest.Response{Response: resp} 442 return 443} 444 445// listNextResults retrieves the next set of results, if any. 446func (client CaseRelationsClient) listNextResults(ctx context.Context, lastResults CaseRelationList) (result CaseRelationList, err error) { 447 req, err := lastResults.caseRelationListPreparer(ctx) 448 if err != nil { 449 return result, autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "listNextResults", nil, "Failure preparing next results request") 450 } 451 if req == nil { 452 return 453 } 454 resp, err := client.ListSender(req) 455 if err != nil { 456 result.Response = autorest.Response{Response: resp} 457 return result, autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "listNextResults", resp, "Failure sending next results request") 458 } 459 result, err = client.ListResponder(resp) 460 if err != nil { 461 err = autorest.NewErrorWithError(err, "securityinsight.CaseRelationsClient", "listNextResults", resp, "Failure responding to next results request") 462 } 463 return 464} 465 466// ListComplete enumerates all values, automatically crossing page boundaries as required. 467func (client CaseRelationsClient) ListComplete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, filter string, orderby string, top *int32, skipToken string) (result CaseRelationListIterator, err error) { 468 if tracing.IsEnabled() { 469 ctx = tracing.StartSpan(ctx, fqdn+"/CaseRelationsClient.List") 470 defer func() { 471 sc := -1 472 if result.Response().Response.Response != nil { 473 sc = result.page.Response().Response.Response.StatusCode 474 } 475 tracing.EndSpan(ctx, sc, err) 476 }() 477 } 478 result.page, err = client.List(ctx, resourceGroupName, operationalInsightsResourceProvider, workspaceName, caseID, filter, orderby, top, skipToken) 479 return 480} 481