...

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

Documentation: github.com/Azure/azure-sdk-for-go/services/preview/mediaservices/mgmt/2019-05-01-preview/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 = "2018-07-01"
   127  	queryParameters := map[string]interface{}{
   128  		"api-version": APIVersion,
   129  	}
   130  
   131  	preparer := autorest.CreatePreparer(
   132  		autorest.AsContentType("application/json; charset=utf-8"),
   133  		autorest.AsPut(),
   134  		autorest.WithBaseURL(client.BaseURI),
   135  		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies/{streamingPolicyName}", pathParameters),
   136  		autorest.WithJSON(parameters),
   137  		autorest.WithQueryParameters(queryParameters))
   138  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   139  }
   140  
   141  // CreateSender sends the Create request. The method will close the
   142  // http.Response Body if it receives an error.
   143  func (client StreamingPoliciesClient) CreateSender(req *http.Request) (*http.Response, error) {
   144  	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
   145  }
   146  
   147  // CreateResponder handles the response to the Create request. The method always
   148  // closes the http.Response Body.
   149  func (client StreamingPoliciesClient) CreateResponder(resp *http.Response) (result StreamingPolicy, err error) {
   150  	err = autorest.Respond(
   151  		resp,
   152  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
   153  		autorest.ByUnmarshallingJSON(&result),
   154  		autorest.ByClosing())
   155  	result.Response = autorest.Response{Response: resp}
   156  	return
   157  }
   158  
   159  // Delete deletes a Streaming Policy in the Media Services account
   160  // Parameters:
   161  // resourceGroupName - the name of the resource group within the Azure subscription.
   162  // accountName - the Media Services account name.
   163  // streamingPolicyName - the Streaming Policy name.
   164  func (client StreamingPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (result autorest.Response, err error) {
   165  	if tracing.IsEnabled() {
   166  		ctx = tracing.StartSpan(ctx, fqdn+"/StreamingPoliciesClient.Delete")
   167  		defer func() {
   168  			sc := -1
   169  			if result.Response != nil {
   170  				sc = result.Response.StatusCode
   171  			}
   172  			tracing.EndSpan(ctx, sc, err)
   173  		}()
   174  	}
   175  	req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, streamingPolicyName)
   176  	if err != nil {
   177  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Delete", nil, "Failure preparing request")
   178  		return
   179  	}
   180  
   181  	resp, err := client.DeleteSender(req)
   182  	if err != nil {
   183  		result.Response = resp
   184  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Delete", resp, "Failure sending request")
   185  		return
   186  	}
   187  
   188  	result, err = client.DeleteResponder(resp)
   189  	if err != nil {
   190  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Delete", resp, "Failure responding to request")
   191  		return
   192  	}
   193  
   194  	return
   195  }
   196  
   197  // DeletePreparer prepares the Delete request.
   198  func (client StreamingPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (*http.Request, error) {
   199  	pathParameters := map[string]interface{}{
   200  		"accountName":         autorest.Encode("path", accountName),
   201  		"resourceGroupName":   autorest.Encode("path", resourceGroupName),
   202  		"streamingPolicyName": autorest.Encode("path", streamingPolicyName),
   203  		"subscriptionId":      autorest.Encode("path", client.SubscriptionID),
   204  	}
   205  
   206  	const APIVersion = "2018-07-01"
   207  	queryParameters := map[string]interface{}{
   208  		"api-version": APIVersion,
   209  	}
   210  
   211  	preparer := autorest.CreatePreparer(
   212  		autorest.AsDelete(),
   213  		autorest.WithBaseURL(client.BaseURI),
   214  		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies/{streamingPolicyName}", pathParameters),
   215  		autorest.WithQueryParameters(queryParameters))
   216  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   217  }
   218  
   219  // DeleteSender sends the Delete request. The method will close the
   220  // http.Response Body if it receives an error.
   221  func (client StreamingPoliciesClient) DeleteSender(req *http.Request) (*http.Response, error) {
   222  	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
   223  }
   224  
   225  // DeleteResponder handles the response to the Delete request. The method always
   226  // closes the http.Response Body.
   227  func (client StreamingPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
   228  	err = autorest.Respond(
   229  		resp,
   230  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
   231  		autorest.ByClosing())
   232  	result.Response = resp
   233  	return
   234  }
   235  
   236  // Get get the details of a Streaming Policy in the Media Services account
   237  // Parameters:
   238  // resourceGroupName - the name of the resource group within the Azure subscription.
   239  // accountName - the Media Services account name.
   240  // streamingPolicyName - the Streaming Policy name.
   241  func (client StreamingPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (result StreamingPolicy, err error) {
   242  	if tracing.IsEnabled() {
   243  		ctx = tracing.StartSpan(ctx, fqdn+"/StreamingPoliciesClient.Get")
   244  		defer func() {
   245  			sc := -1
   246  			if result.Response.Response != nil {
   247  				sc = result.Response.Response.StatusCode
   248  			}
   249  			tracing.EndSpan(ctx, sc, err)
   250  		}()
   251  	}
   252  	req, err := client.GetPreparer(ctx, resourceGroupName, accountName, streamingPolicyName)
   253  	if err != nil {
   254  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Get", nil, "Failure preparing request")
   255  		return
   256  	}
   257  
   258  	resp, err := client.GetSender(req)
   259  	if err != nil {
   260  		result.Response = autorest.Response{Response: resp}
   261  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Get", resp, "Failure sending request")
   262  		return
   263  	}
   264  
   265  	result, err = client.GetResponder(resp)
   266  	if err != nil {
   267  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "Get", resp, "Failure responding to request")
   268  		return
   269  	}
   270  
   271  	return
   272  }
   273  
   274  // GetPreparer prepares the Get request.
   275  func (client StreamingPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (*http.Request, error) {
   276  	pathParameters := map[string]interface{}{
   277  		"accountName":         autorest.Encode("path", accountName),
   278  		"resourceGroupName":   autorest.Encode("path", resourceGroupName),
   279  		"streamingPolicyName": autorest.Encode("path", streamingPolicyName),
   280  		"subscriptionId":      autorest.Encode("path", client.SubscriptionID),
   281  	}
   282  
   283  	const APIVersion = "2018-07-01"
   284  	queryParameters := map[string]interface{}{
   285  		"api-version": APIVersion,
   286  	}
   287  
   288  	preparer := autorest.CreatePreparer(
   289  		autorest.AsGet(),
   290  		autorest.WithBaseURL(client.BaseURI),
   291  		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies/{streamingPolicyName}", pathParameters),
   292  		autorest.WithQueryParameters(queryParameters))
   293  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   294  }
   295  
   296  // GetSender sends the Get request. The method will close the
   297  // http.Response Body if it receives an error.
   298  func (client StreamingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) {
   299  	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
   300  }
   301  
   302  // GetResponder handles the response to the Get request. The method always
   303  // closes the http.Response Body.
   304  func (client StreamingPoliciesClient) GetResponder(resp *http.Response) (result StreamingPolicy, err error) {
   305  	err = autorest.Respond(
   306  		resp,
   307  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
   308  		autorest.ByUnmarshallingJSON(&result),
   309  		autorest.ByClosing())
   310  	result.Response = autorest.Response{Response: resp}
   311  	return
   312  }
   313  
   314  // List lists the Streaming Policies in the account
   315  // Parameters:
   316  // resourceGroupName - the name of the resource group within the Azure subscription.
   317  // accountName - the Media Services account name.
   318  // filter - restricts the set of items returned.
   319  // top - specifies a non-negative integer n that limits the number of items returned from a collection. The
   320  // service returns the number of available items up to but not greater than the specified value n.
   321  // orderby - specifies the key by which the result collection should be ordered.
   322  func (client StreamingPoliciesClient) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result StreamingPolicyCollectionPage, err error) {
   323  	if tracing.IsEnabled() {
   324  		ctx = tracing.StartSpan(ctx, fqdn+"/StreamingPoliciesClient.List")
   325  		defer func() {
   326  			sc := -1
   327  			if result.spc.Response.Response != nil {
   328  				sc = result.spc.Response.Response.StatusCode
   329  			}
   330  			tracing.EndSpan(ctx, sc, err)
   331  		}()
   332  	}
   333  	result.fn = client.listNextResults
   334  	req, err := client.ListPreparer(ctx, resourceGroupName, accountName, filter, top, orderby)
   335  	if err != nil {
   336  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "List", nil, "Failure preparing request")
   337  		return
   338  	}
   339  
   340  	resp, err := client.ListSender(req)
   341  	if err != nil {
   342  		result.spc.Response = autorest.Response{Response: resp}
   343  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "List", resp, "Failure sending request")
   344  		return
   345  	}
   346  
   347  	result.spc, err = client.ListResponder(resp)
   348  	if err != nil {
   349  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "List", resp, "Failure responding to request")
   350  		return
   351  	}
   352  	if result.spc.hasNextLink() && result.spc.IsEmpty() {
   353  		err = result.NextWithContext(ctx)
   354  		return
   355  	}
   356  
   357  	return
   358  }
   359  
   360  // ListPreparer prepares the List request.
   361  func (client StreamingPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (*http.Request, error) {
   362  	pathParameters := map[string]interface{}{
   363  		"accountName":       autorest.Encode("path", accountName),
   364  		"resourceGroupName": autorest.Encode("path", resourceGroupName),
   365  		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
   366  	}
   367  
   368  	const APIVersion = "2018-07-01"
   369  	queryParameters := map[string]interface{}{
   370  		"api-version": APIVersion,
   371  	}
   372  	if len(filter) > 0 {
   373  		queryParameters["$filter"] = autorest.Encode("query", filter)
   374  	}
   375  	if top != nil {
   376  		queryParameters["$top"] = autorest.Encode("query", *top)
   377  	}
   378  	if len(orderby) > 0 {
   379  		queryParameters["$orderby"] = autorest.Encode("query", orderby)
   380  	}
   381  
   382  	preparer := autorest.CreatePreparer(
   383  		autorest.AsGet(),
   384  		autorest.WithBaseURL(client.BaseURI),
   385  		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies", pathParameters),
   386  		autorest.WithQueryParameters(queryParameters))
   387  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   388  }
   389  
   390  // ListSender sends the List request. The method will close the
   391  // http.Response Body if it receives an error.
   392  func (client StreamingPoliciesClient) ListSender(req *http.Request) (*http.Response, error) {
   393  	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
   394  }
   395  
   396  // ListResponder handles the response to the List request. The method always
   397  // closes the http.Response Body.
   398  func (client StreamingPoliciesClient) ListResponder(resp *http.Response) (result StreamingPolicyCollection, err error) {
   399  	err = autorest.Respond(
   400  		resp,
   401  		azure.WithErrorUnlessStatusCode(http.StatusOK),
   402  		autorest.ByUnmarshallingJSON(&result),
   403  		autorest.ByClosing())
   404  	result.Response = autorest.Response{Response: resp}
   405  	return
   406  }
   407  
   408  // listNextResults retrieves the next set of results, if any.
   409  func (client StreamingPoliciesClient) listNextResults(ctx context.Context, lastResults StreamingPolicyCollection) (result StreamingPolicyCollection, err error) {
   410  	req, err := lastResults.streamingPolicyCollectionPreparer(ctx)
   411  	if err != nil {
   412  		return result, autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "listNextResults", nil, "Failure preparing next results request")
   413  	}
   414  	if req == nil {
   415  		return
   416  	}
   417  	resp, err := client.ListSender(req)
   418  	if err != nil {
   419  		result.Response = autorest.Response{Response: resp}
   420  		return result, autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "listNextResults", resp, "Failure sending next results request")
   421  	}
   422  	result, err = client.ListResponder(resp)
   423  	if err != nil {
   424  		err = autorest.NewErrorWithError(err, "media.StreamingPoliciesClient", "listNextResults", resp, "Failure responding to next results request")
   425  	}
   426  	return
   427  }
   428  
   429  // ListComplete enumerates all values, automatically crossing page boundaries as required.
   430  func (client StreamingPoliciesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result StreamingPolicyCollectionIterator, err error) {
   431  	if tracing.IsEnabled() {
   432  		ctx = tracing.StartSpan(ctx, fqdn+"/StreamingPoliciesClient.List")
   433  		defer func() {
   434  			sc := -1
   435  			if result.Response().Response.Response != nil {
   436  				sc = result.page.Response().Response.Response.StatusCode
   437  			}
   438  			tracing.EndSpan(ctx, sc, err)
   439  		}()
   440  	}
   441  	result.page, err = client.List(ctx, resourceGroupName, accountName, filter, top, orderby)
   442  	return
   443  }
   444  

View as plain text