...

Source file src/github.com/Azure/azure-sdk-for-go/services/mediaservices/mgmt/2021-05-01/media/streamingpolicies.go

Documentation: github.com/Azure/azure-sdk-for-go/services/mediaservices/mgmt/2021-05-01/media

     1  package media
     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  
     9  import (
    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  // StreamingPoliciesClient is the client for the StreamingPolicies methods of the Media service.
    19  type StreamingPoliciesClient struct {
    20  	BaseClient
    21  }
    22  
    23  // NewStreamingPoliciesClient creates an instance of the StreamingPoliciesClient client.
    24  func NewStreamingPoliciesClient(subscriptionID string) StreamingPoliciesClient {
    25  	return NewStreamingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
    26  }
    27  
    28  // NewStreamingPoliciesClientWithBaseURI creates an instance of the StreamingPoliciesClient client using a custom
    29  // endpoint.  Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
    30  // stack).
    31  func NewStreamingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) StreamingPoliciesClient {
    32  	return StreamingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
    33  }
    34  
    35  // Create create a Streaming Policy in the Media Services account
    36  // Parameters:
    37  // resourceGroupName - the name of the resource group within the Azure subscription.
    38  // accountName - the Media Services account name.
    39  // streamingPolicyName - the Streaming Policy name.
    40  // parameters - the request parameters
    41  func (client StreamingPoliciesClient) Create(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string, parameters StreamingPolicy) (result StreamingPolicy, err error) {
    42  	if tracing.IsEnabled() {
    43  		ctx = tracing.StartSpan(ctx, fqdn+"/StreamingPoliciesClient.Create")
    44  		defer func() {
    45  			sc := -1
    46  			if result.Response.Response != nil {
    47  				sc = result.Response.Response.StatusCode
    48  			}
    49  			tracing.EndSpan(ctx, sc, err)
    50  		}()
    51  	}
    52  	if err := validation.Validate([]validation.Validation{
    53  		{TargetValue: parameters,
    54  			Constraints: []validation.Constraint{{Target: "parameters.StreamingPolicyProperties", Name: validation.Null, Rule: false,
    55  				Chain: []validation.Constraint{{Target: "parameters.StreamingPolicyProperties.EnvelopeEncryption", Name: validation.Null, Rule: false,
    56  					Chain: []validation.Constraint{{Target: "parameters.StreamingPolicyProperties.EnvelopeEncryption.EnabledProtocols", Name: validation.Null, Rule: false,
    57  						Chain: []validation.Constraint{{Target: "parameters.StreamingPolicyProperties.EnvelopeEncryption.EnabledProtocols.Download", Name: validation.Null, Rule: true, Chain: nil},
    58  							{Target: "parameters.StreamingPolicyProperties.EnvelopeEncryption.EnabledProtocols.Dash", Name: validation.Null, Rule: true, Chain: nil},
    59  							{Target: "parameters.StreamingPolicyProperties.EnvelopeEncryption.EnabledProtocols.Hls", Name: validation.Null, Rule: true, Chain: nil},
    60  							{Target: "parameters.StreamingPolicyProperties.EnvelopeEncryption.EnabledProtocols.SmoothStreaming", Name: validation.Null, Rule: true, Chain: nil},
    61  						}},
    62  					}},
    63  					{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCenc", Name: validation.Null, Rule: false,
    64  						Chain: []validation.Constraint{{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCenc.EnabledProtocols", Name: validation.Null, Rule: false,
    65  							Chain: []validation.Constraint{{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCenc.EnabledProtocols.Download", Name: validation.Null, Rule: true, Chain: nil},
    66  								{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCenc.EnabledProtocols.Dash", Name: validation.Null, Rule: true, Chain: nil},
    67  								{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCenc.EnabledProtocols.Hls", Name: validation.Null, Rule: true, Chain: nil},
    68  								{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCenc.EnabledProtocols.SmoothStreaming", Name: validation.Null, Rule: true, Chain: nil},
    69  							}},
    70  						}},
    71  					{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCbcs", Name: validation.Null, Rule: false,
    72  						Chain: []validation.Constraint{{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCbcs.EnabledProtocols", Name: validation.Null, Rule: false,
    73  							Chain: []validation.Constraint{{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCbcs.EnabledProtocols.Download", Name: validation.Null, Rule: true, Chain: nil},
    74  								{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCbcs.EnabledProtocols.Dash", Name: validation.Null, Rule: true, Chain: nil},
    75  								{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCbcs.EnabledProtocols.Hls", Name: validation.Null, Rule: true, Chain: nil},
    76  								{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCbcs.EnabledProtocols.SmoothStreaming", Name: validation.Null, Rule: true, Chain: nil},
    77  							}},
    78  							{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCbcs.Drm", Name: validation.Null, Rule: false,
    79  								Chain: []validation.Constraint{{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCbcs.Drm.FairPlay", Name: validation.Null, Rule: false,
    80  									Chain: []validation.Constraint{{Target: "parameters.StreamingPolicyProperties.CommonEncryptionCbcs.Drm.FairPlay.AllowPersistentLicense", Name: validation.Null, Rule: true, Chain: nil}}},
    81  								}},
    82  						}},
    83  					{Target: "parameters.StreamingPolicyProperties.NoEncryption", Name: validation.Null, Rule: false,
    84  						Chain: []validation.Constraint{{Target: "parameters.StreamingPolicyProperties.NoEncryption.EnabledProtocols", Name: validation.Null, Rule: false,
    85  							Chain: []validation.Constraint{{Target: "parameters.StreamingPolicyProperties.NoEncryption.EnabledProtocols.Download", Name: validation.Null, Rule: true, Chain: nil},
    86  								{Target: "parameters.StreamingPolicyProperties.NoEncryption.EnabledProtocols.Dash", Name: validation.Null, Rule: true, Chain: nil},
    87  								{Target: "parameters.StreamingPolicyProperties.NoEncryption.EnabledProtocols.Hls", Name: validation.Null, Rule: true, Chain: nil},
    88  								{Target: "parameters.StreamingPolicyProperties.NoEncryption.EnabledProtocols.SmoothStreaming", Name: validation.Null, Rule: true, Chain: nil},
    89  							}},
    90  						}},
    91  				}}}}}); err != nil {
    92  		return result, validation.NewError("media.StreamingPoliciesClient", "Create", err.Error())
    93  	}
    94  
    95  	req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, streamingPolicyName, parameters)
    96  	if err != nil {
    97  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Create", nil, "Failure preparing request")
    98  		return
    99  	}
   100  
   101  	resp, err := client.CreateSender(req)
   102  	if err != nil {
   103  		result.Response = autorest.Response{Response: resp}
   104  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Create", resp, "Failure sending request")
   105  		return
   106  	}
   107  
   108  	result, err = client.CreateResponder(resp)
   109  	if err != nil {
   110  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Create", resp, "Failure responding to request")
   111  		return
   112  	}
   113  
   114  	return
   115  }
   116  
   117  // CreatePreparer prepares the Create request.
   118  func (client StreamingPoliciesClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string, parameters StreamingPolicy) (*http.Request, error) {
   119  	pathParameters := map[string]interface{}{
   120  		"accountName":         autorest.Encode("path", accountName),
   121  		"resourceGroupName":   autorest.Encode("path", resourceGroupName),
   122  		"streamingPolicyName": autorest.Encode("path", streamingPolicyName),
   123  		"subscriptionId":      autorest.Encode("path", client.SubscriptionID),
   124  	}
   125  
   126  	const APIVersion = "2020-05-01"
   127  	queryParameters := map[string]interface{}{
   128  		"api-version": APIVersion,
   129  	}
   130  
   131  	parameters.SystemData = nil
   132  	preparer := autorest.CreatePreparer(
   133  		autorest.AsContentType("application/json; charset=utf-8"),
   134  		autorest.AsPut(),
   135  		autorest.WithBaseURL(client.BaseURI),
   136  		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies/{streamingPolicyName}", pathParameters),
   137  		autorest.WithJSON(parameters),
   138  		autorest.WithQueryParameters(queryParameters))
   139  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   140  }
   141  
   142  // CreateSender sends the Create request. The method will close the
   143  // http.Response Body if it receives an error.
   144  func (client StreamingPoliciesClient) CreateSender(req *http.Request) (*http.Response, error) {
   145  	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
   146  }
   147  
   148  // CreateResponder handles the response to the Create request. The method always
   149  // closes the http.Response Body.
   150  func (client StreamingPoliciesClient) CreateResponder(resp *http.Response) (result StreamingPolicy, err error) {
   151  	err = autorest.Respond(
   152  		resp,
   153  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
   154  		autorest.ByUnmarshallingJSON(&result),
   155  		autorest.ByClosing())
   156  	result.Response = autorest.Response{Response: resp}
   157  	return
   158  }
   159  
   160  // Delete deletes a Streaming Policy in the Media Services account
   161  // Parameters:
   162  // resourceGroupName - the name of the resource group within the Azure subscription.
   163  // accountName - the Media Services account name.
   164  // streamingPolicyName - the Streaming Policy name.
   165  func (client StreamingPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (result autorest.Response, err error) {
   166  	if tracing.IsEnabled() {
   167  		ctx = tracing.StartSpan(ctx, fqdn+"/StreamingPoliciesClient.Delete")
   168  		defer func() {
   169  			sc := -1
   170  			if result.Response != nil {
   171  				sc = result.Response.StatusCode
   172  			}
   173  			tracing.EndSpan(ctx, sc, err)
   174  		}()
   175  	}
   176  	req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, streamingPolicyName)
   177  	if err != nil {
   178  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Delete", nil, "Failure preparing request")
   179  		return
   180  	}
   181  
   182  	resp, err := client.DeleteSender(req)
   183  	if err != nil {
   184  		result.Response = resp
   185  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Delete", resp, "Failure sending request")
   186  		return
   187  	}
   188  
   189  	result, err = client.DeleteResponder(resp)
   190  	if err != nil {
   191  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Delete", resp, "Failure responding to request")
   192  		return
   193  	}
   194  
   195  	return
   196  }
   197  
   198  // DeletePreparer prepares the Delete request.
   199  func (client StreamingPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (*http.Request, error) {
   200  	pathParameters := map[string]interface{}{
   201  		"accountName":         autorest.Encode("path", accountName),
   202  		"resourceGroupName":   autorest.Encode("path", resourceGroupName),
   203  		"streamingPolicyName": autorest.Encode("path", streamingPolicyName),
   204  		"subscriptionId":      autorest.Encode("path", client.SubscriptionID),
   205  	}
   206  
   207  	const APIVersion = "2020-05-01"
   208  	queryParameters := map[string]interface{}{
   209  		"api-version": APIVersion,
   210  	}
   211  
   212  	preparer := autorest.CreatePreparer(
   213  		autorest.AsDelete(),
   214  		autorest.WithBaseURL(client.BaseURI),
   215  		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies/{streamingPolicyName}", pathParameters),
   216  		autorest.WithQueryParameters(queryParameters))
   217  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   218  }
   219  
   220  // DeleteSender sends the Delete request. The method will close the
   221  // http.Response Body if it receives an error.
   222  func (client StreamingPoliciesClient) DeleteSender(req *http.Request) (*http.Response, error) {
   223  	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
   224  }
   225  
   226  // DeleteResponder handles the response to the Delete request. The method always
   227  // closes the http.Response Body.
   228  func (client StreamingPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
   229  	err = autorest.Respond(
   230  		resp,
   231  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
   232  		autorest.ByClosing())
   233  	result.Response = resp
   234  	return
   235  }
   236  
   237  // Get get the details of a Streaming Policy in the Media Services account
   238  // Parameters:
   239  // resourceGroupName - the name of the resource group within the Azure subscription.
   240  // accountName - the Media Services account name.
   241  // streamingPolicyName - the Streaming Policy name.
   242  func (client StreamingPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (result StreamingPolicy, err error) {
   243  	if tracing.IsEnabled() {
   244  		ctx = tracing.StartSpan(ctx, fqdn+"/StreamingPoliciesClient.Get")
   245  		defer func() {
   246  			sc := -1
   247  			if result.Response.Response != nil {
   248  				sc = result.Response.Response.StatusCode
   249  			}
   250  			tracing.EndSpan(ctx, sc, err)
   251  		}()
   252  	}
   253  	req, err := client.GetPreparer(ctx, resourceGroupName, accountName, streamingPolicyName)
   254  	if err != nil {
   255  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Get", nil, "Failure preparing request")
   256  		return
   257  	}
   258  
   259  	resp, err := client.GetSender(req)
   260  	if err != nil {
   261  		result.Response = autorest.Response{Response: resp}
   262  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Get", resp, "Failure sending request")
   263  		return
   264  	}
   265  
   266  	result, err = client.GetResponder(resp)
   267  	if err != nil {
   268  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Get", resp, "Failure responding to request")
   269  		return
   270  	}
   271  
   272  	return
   273  }
   274  
   275  // GetPreparer prepares the Get request.
   276  func (client StreamingPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (*http.Request, error) {
   277  	pathParameters := map[string]interface{}{
   278  		"accountName":         autorest.Encode("path", accountName),
   279  		"resourceGroupName":   autorest.Encode("path", resourceGroupName),
   280  		"streamingPolicyName": autorest.Encode("path", streamingPolicyName),
   281  		"subscriptionId":      autorest.Encode("path", client.SubscriptionID),
   282  	}
   283  
   284  	const APIVersion = "2020-05-01"
   285  	queryParameters := map[string]interface{}{
   286  		"api-version": APIVersion,
   287  	}
   288  
   289  	preparer := autorest.CreatePreparer(
   290  		autorest.AsGet(),
   291  		autorest.WithBaseURL(client.BaseURI),
   292  		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies/{streamingPolicyName}", pathParameters),
   293  		autorest.WithQueryParameters(queryParameters))
   294  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   295  }
   296  
   297  // GetSender sends the Get request. The method will close the
   298  // http.Response Body if it receives an error.
   299  func (client StreamingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) {
   300  	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
   301  }
   302  
   303  // GetResponder handles the response to the Get request. The method always
   304  // closes the http.Response Body.
   305  func (client StreamingPoliciesClient) GetResponder(resp *http.Response) (result StreamingPolicy, err error) {
   306  	err = autorest.Respond(
   307  		resp,
   308  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
   309  		autorest.ByUnmarshallingJSON(&result),
   310  		autorest.ByClosing())
   311  	result.Response = autorest.Response{Response: resp}
   312  	return
   313  }
   314  
   315  // List lists the Streaming Policies in the account
   316  // Parameters:
   317  // resourceGroupName - the name of the resource group within the Azure subscription.
   318  // accountName - the Media Services account name.
   319  // filter - restricts the set of items returned.
   320  // top - specifies a non-negative integer n that limits the number of items returned from a collection. The
   321  // service returns the number of available items up to but not greater than the specified value n.
   322  // orderby - specifies the key by which the result collection should be ordered.
   323  func (client StreamingPoliciesClient) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result StreamingPolicyCollectionPage, err error) {
   324  	if tracing.IsEnabled() {
   325  		ctx = tracing.StartSpan(ctx, fqdn+"/StreamingPoliciesClient.List")
   326  		defer func() {
   327  			sc := -1
   328  			if result.spc.Response.Response != nil {
   329  				sc = result.spc.Response.Response.StatusCode
   330  			}
   331  			tracing.EndSpan(ctx, sc, err)
   332  		}()
   333  	}
   334  	result.fn = client.listNextResults
   335  	req, err := client.ListPreparer(ctx, resourceGroupName, accountName, filter, top, orderby)
   336  	if err != nil {
   337  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "List", nil, "Failure preparing request")
   338  		return
   339  	}
   340  
   341  	resp, err := client.ListSender(req)
   342  	if err != nil {
   343  		result.spc.Response = autorest.Response{Response: resp}
   344  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "List", resp, "Failure sending request")
   345  		return
   346  	}
   347  
   348  	result.spc, err = client.ListResponder(resp)
   349  	if err != nil {
   350  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "List", resp, "Failure responding to request")
   351  		return
   352  	}
   353  	if result.spc.hasNextLink() && result.spc.IsEmpty() {
   354  		err = result.NextWithContext(ctx)
   355  		return
   356  	}
   357  
   358  	return
   359  }
   360  
   361  // ListPreparer prepares the List request.
   362  func (client StreamingPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (*http.Request, error) {
   363  	pathParameters := map[string]interface{}{
   364  		"accountName":       autorest.Encode("path", accountName),
   365  		"resourceGroupName": autorest.Encode("path", resourceGroupName),
   366  		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
   367  	}
   368  
   369  	const APIVersion = "2020-05-01"
   370  	queryParameters := map[string]interface{}{
   371  		"api-version": APIVersion,
   372  	}
   373  	if len(filter) > 0 {
   374  		queryParameters["$filter"] = autorest.Encode("query", filter)
   375  	}
   376  	if top != nil {
   377  		queryParameters["$top"] = autorest.Encode("query", *top)
   378  	}
   379  	if len(orderby) > 0 {
   380  		queryParameters["$orderby"] = autorest.Encode("query", orderby)
   381  	}
   382  
   383  	preparer := autorest.CreatePreparer(
   384  		autorest.AsGet(),
   385  		autorest.WithBaseURL(client.BaseURI),
   386  		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies", pathParameters),
   387  		autorest.WithQueryParameters(queryParameters))
   388  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   389  }
   390  
   391  // ListSender sends the List request. The method will close the
   392  // http.Response Body if it receives an error.
   393  func (client StreamingPoliciesClient) ListSender(req *http.Request) (*http.Response, error) {
   394  	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
   395  }
   396  
   397  // ListResponder handles the response to the List request. The method always
   398  // closes the http.Response Body.
   399  func (client StreamingPoliciesClient) ListResponder(resp *http.Response) (result StreamingPolicyCollection, err error) {
   400  	err = autorest.Respond(
   401  		resp,
   402  		azure.WithErrorUnlessStatusCode(http.StatusOK),
   403  		autorest.ByUnmarshallingJSON(&result),
   404  		autorest.ByClosing())
   405  	result.Response = autorest.Response{Response: resp}
   406  	return
   407  }
   408  
   409  // listNextResults retrieves the next set of results, if any.
   410  func (client StreamingPoliciesClient) listNextResults(ctx context.Context, lastResults StreamingPolicyCollection) (result StreamingPolicyCollection, err error) {
   411  	req, err := lastResults.streamingPolicyCollectionPreparer(ctx)
   412  	if err != nil {
   413  		return result, autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "listNextResults", nil, "Failure preparing next results request")
   414  	}
   415  	if req == nil {
   416  		return
   417  	}
   418  	resp, err := client.ListSender(req)
   419  	if err != nil {
   420  		result.Response = autorest.Response{Response: resp}
   421  		return result, autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "listNextResults", resp, "Failure sending next results request")
   422  	}
   423  	result, err = client.ListResponder(resp)
   424  	if err != nil {
   425  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "listNextResults", resp, "Failure responding to next results request")
   426  	}
   427  	return
   428  }
   429  
   430  // ListComplete enumerates all values, automatically crossing page boundaries as required.
   431  func (client StreamingPoliciesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result StreamingPolicyCollectionIterator, err error) {
   432  	if tracing.IsEnabled() {
   433  		ctx = tracing.StartSpan(ctx, fqdn+"/StreamingPoliciesClient.List")
   434  		defer func() {
   435  			sc := -1
   436  			if result.Response().Response.Response != nil {
   437  				sc = result.page.Response().Response.Response.StatusCode
   438  			}
   439  			tracing.EndSpan(ctx, sc, err)
   440  		}()
   441  	}
   442  	result.page, err = client.List(ctx, resourceGroupName, accountName, filter, top, orderby)
   443  	return
   444  }
   445  

View as plain text