...

Source file src/github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2021-02-01/netapp/backuppolicies.go

Documentation: github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2021-02-01/netapp

     1  package netapp
     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  // BackupPoliciesClient is the microsoft NetApp Files Azure Resource Provider specification
    19  type BackupPoliciesClient struct {
    20  	BaseClient
    21  }
    22  
    23  // NewBackupPoliciesClient creates an instance of the BackupPoliciesClient client.
    24  func NewBackupPoliciesClient(subscriptionID string) BackupPoliciesClient {
    25  	return NewBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
    26  }
    27  
    28  // NewBackupPoliciesClientWithBaseURI creates an instance of the BackupPoliciesClient 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).
    30  func NewBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupPoliciesClient {
    31  	return BackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
    32  }
    33  
    34  // Create create a backup policy for Netapp Account
    35  // Parameters:
    36  // resourceGroupName - the name of the resource group.
    37  // accountName - the name of the NetApp account
    38  // backupPolicyName - backup policy Name which uniquely identify backup policy.
    39  // body - backup policy object supplied in the body of the operation.
    40  func (client BackupPoliciesClient) Create(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicy) (result BackupPoliciesCreateFuture, err error) {
    41  	if tracing.IsEnabled() {
    42  		ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.Create")
    43  		defer func() {
    44  			sc := -1
    45  			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
    46  				sc = result.FutureAPI.Response().StatusCode
    47  			}
    48  			tracing.EndSpan(ctx, sc, err)
    49  		}()
    50  	}
    51  	if err := validation.Validate([]validation.Validation{
    52  		{TargetValue: resourceGroupName,
    53  			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
    54  				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
    55  				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
    56  		{TargetValue: body,
    57  			Constraints: []validation.Constraint{{Target: "body.Location", Name: validation.Null, Rule: true, Chain: nil},
    58  				{Target: "body.BackupPolicyProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
    59  		return result, validation.NewError("netapp.BackupPoliciesClient", "Create", err.Error())
    60  	}
    61  
    62  	req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, backupPolicyName, body)
    63  	if err != nil {
    64  		err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Create", nil, "Failure preparing request")
    65  		return
    66  	}
    67  
    68  	result, err = client.CreateSender(req)
    69  	if err != nil {
    70  		err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Create", result.Response(), "Failure sending request")
    71  		return
    72  	}
    73  
    74  	return
    75  }
    76  
    77  // CreatePreparer prepares the Create request.
    78  func (client BackupPoliciesClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicy) (*http.Request, error) {
    79  	pathParameters := map[string]interface{}{
    80  		"accountName":       autorest.Encode("path", accountName),
    81  		"backupPolicyName":  autorest.Encode("path", backupPolicyName),
    82  		"resourceGroupName": autorest.Encode("path", resourceGroupName),
    83  		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
    84  	}
    85  
    86  	const APIVersion = "2021-02-01"
    87  	queryParameters := map[string]interface{}{
    88  		"api-version": APIVersion,
    89  	}
    90  
    91  	body.ID = nil
    92  	body.Name = nil
    93  	body.Type = nil
    94  	preparer := autorest.CreatePreparer(
    95  		autorest.AsContentType("application/json; charset=utf-8"),
    96  		autorest.AsPut(),
    97  		autorest.WithBaseURL(client.BaseURI),
    98  		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", pathParameters),
    99  		autorest.WithJSON(body),
   100  		autorest.WithQueryParameters(queryParameters))
   101  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   102  }
   103  
   104  // CreateSender sends the Create request. The method will close the
   105  // http.Response Body if it receives an error.
   106  func (client BackupPoliciesClient) CreateSender(req *http.Request) (future BackupPoliciesCreateFuture, err error) {
   107  	var resp *http.Response
   108  	future.FutureAPI = &azure.Future{}
   109  	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
   110  	if err != nil {
   111  		return
   112  	}
   113  	var azf azure.Future
   114  	azf, err = azure.NewFutureFromResponse(resp)
   115  	future.FutureAPI = &azf
   116  	future.Result = future.result
   117  	return
   118  }
   119  
   120  // CreateResponder handles the response to the Create request. The method always
   121  // closes the http.Response Body.
   122  func (client BackupPoliciesClient) CreateResponder(resp *http.Response) (result BackupPolicy, err error) {
   123  	err = autorest.Respond(
   124  		resp,
   125  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
   126  		autorest.ByUnmarshallingJSON(&result),
   127  		autorest.ByClosing())
   128  	result.Response = autorest.Response{Response: resp}
   129  	return
   130  }
   131  
   132  // Delete delete backup policy
   133  // Parameters:
   134  // resourceGroupName - the name of the resource group.
   135  // accountName - the name of the NetApp account
   136  // backupPolicyName - backup policy Name which uniquely identify backup policy.
   137  func (client BackupPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string) (result BackupPoliciesDeleteFuture, err error) {
   138  	if tracing.IsEnabled() {
   139  		ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.Delete")
   140  		defer func() {
   141  			sc := -1
   142  			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
   143  				sc = result.FutureAPI.Response().StatusCode
   144  			}
   145  			tracing.EndSpan(ctx, sc, err)
   146  		}()
   147  	}
   148  	if err := validation.Validate([]validation.Validation{
   149  		{TargetValue: resourceGroupName,
   150  			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
   151  				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
   152  				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
   153  		return result, validation.NewError("netapp.BackupPoliciesClient", "Delete", err.Error())
   154  	}
   155  
   156  	req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, backupPolicyName)
   157  	if err != nil {
   158  		err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Delete", nil, "Failure preparing request")
   159  		return
   160  	}
   161  
   162  	result, err = client.DeleteSender(req)
   163  	if err != nil {
   164  		err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Delete", result.Response(), "Failure sending request")
   165  		return
   166  	}
   167  
   168  	return
   169  }
   170  
   171  // DeletePreparer prepares the Delete request.
   172  func (client BackupPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string) (*http.Request, error) {
   173  	pathParameters := map[string]interface{}{
   174  		"accountName":       autorest.Encode("path", accountName),
   175  		"backupPolicyName":  autorest.Encode("path", backupPolicyName),
   176  		"resourceGroupName": autorest.Encode("path", resourceGroupName),
   177  		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
   178  	}
   179  
   180  	const APIVersion = "2021-02-01"
   181  	queryParameters := map[string]interface{}{
   182  		"api-version": APIVersion,
   183  	}
   184  
   185  	preparer := autorest.CreatePreparer(
   186  		autorest.AsDelete(),
   187  		autorest.WithBaseURL(client.BaseURI),
   188  		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", pathParameters),
   189  		autorest.WithQueryParameters(queryParameters))
   190  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   191  }
   192  
   193  // DeleteSender sends the Delete request. The method will close the
   194  // http.Response Body if it receives an error.
   195  func (client BackupPoliciesClient) DeleteSender(req *http.Request) (future BackupPoliciesDeleteFuture, err error) {
   196  	var resp *http.Response
   197  	future.FutureAPI = &azure.Future{}
   198  	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
   199  	if err != nil {
   200  		return
   201  	}
   202  	var azf azure.Future
   203  	azf, err = azure.NewFutureFromResponse(resp)
   204  	future.FutureAPI = &azf
   205  	future.Result = future.result
   206  	return
   207  }
   208  
   209  // DeleteResponder handles the response to the Delete request. The method always
   210  // closes the http.Response Body.
   211  func (client BackupPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
   212  	err = autorest.Respond(
   213  		resp,
   214  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
   215  		autorest.ByClosing())
   216  	result.Response = resp
   217  	return
   218  }
   219  
   220  // Get get a particular backup Policy
   221  // Parameters:
   222  // resourceGroupName - the name of the resource group.
   223  // accountName - the name of the NetApp account
   224  // backupPolicyName - backup policy Name which uniquely identify backup policy.
   225  func (client BackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string) (result BackupPolicy, err error) {
   226  	if tracing.IsEnabled() {
   227  		ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.Get")
   228  		defer func() {
   229  			sc := -1
   230  			if result.Response.Response != nil {
   231  				sc = result.Response.Response.StatusCode
   232  			}
   233  			tracing.EndSpan(ctx, sc, err)
   234  		}()
   235  	}
   236  	if err := validation.Validate([]validation.Validation{
   237  		{TargetValue: resourceGroupName,
   238  			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
   239  				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
   240  				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
   241  		return result, validation.NewError("netapp.BackupPoliciesClient", "Get", err.Error())
   242  	}
   243  
   244  	req, err := client.GetPreparer(ctx, resourceGroupName, accountName, backupPolicyName)
   245  	if err != nil {
   246  		err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Get", nil, "Failure preparing request")
   247  		return
   248  	}
   249  
   250  	resp, err := client.GetSender(req)
   251  	if err != nil {
   252  		result.Response = autorest.Response{Response: resp}
   253  		err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Get", resp, "Failure sending request")
   254  		return
   255  	}
   256  
   257  	result, err = client.GetResponder(resp)
   258  	if err != nil {
   259  		err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Get", resp, "Failure responding to request")
   260  		return
   261  	}
   262  
   263  	return
   264  }
   265  
   266  // GetPreparer prepares the Get request.
   267  func (client BackupPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string) (*http.Request, error) {
   268  	pathParameters := map[string]interface{}{
   269  		"accountName":       autorest.Encode("path", accountName),
   270  		"backupPolicyName":  autorest.Encode("path", backupPolicyName),
   271  		"resourceGroupName": autorest.Encode("path", resourceGroupName),
   272  		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
   273  	}
   274  
   275  	const APIVersion = "2021-02-01"
   276  	queryParameters := map[string]interface{}{
   277  		"api-version": APIVersion,
   278  	}
   279  
   280  	preparer := autorest.CreatePreparer(
   281  		autorest.AsGet(),
   282  		autorest.WithBaseURL(client.BaseURI),
   283  		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", pathParameters),
   284  		autorest.WithQueryParameters(queryParameters))
   285  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   286  }
   287  
   288  // GetSender sends the Get request. The method will close the
   289  // http.Response Body if it receives an error.
   290  func (client BackupPoliciesClient) GetSender(req *http.Request) (*http.Response, error) {
   291  	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
   292  }
   293  
   294  // GetResponder handles the response to the Get request. The method always
   295  // closes the http.Response Body.
   296  func (client BackupPoliciesClient) GetResponder(resp *http.Response) (result BackupPolicy, err error) {
   297  	err = autorest.Respond(
   298  		resp,
   299  		azure.WithErrorUnlessStatusCode(http.StatusOK),
   300  		autorest.ByUnmarshallingJSON(&result),
   301  		autorest.ByClosing())
   302  	result.Response = autorest.Response{Response: resp}
   303  	return
   304  }
   305  
   306  // List list backup policies for Netapp Account
   307  // Parameters:
   308  // resourceGroupName - the name of the resource group.
   309  // accountName - the name of the NetApp account
   310  func (client BackupPoliciesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result BackupPoliciesList, err error) {
   311  	if tracing.IsEnabled() {
   312  		ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.List")
   313  		defer func() {
   314  			sc := -1
   315  			if result.Response.Response != nil {
   316  				sc = result.Response.Response.StatusCode
   317  			}
   318  			tracing.EndSpan(ctx, sc, err)
   319  		}()
   320  	}
   321  	if err := validation.Validate([]validation.Validation{
   322  		{TargetValue: resourceGroupName,
   323  			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
   324  				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
   325  				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
   326  		return result, validation.NewError("netapp.BackupPoliciesClient", "List", err.Error())
   327  	}
   328  
   329  	req, err := client.ListPreparer(ctx, resourceGroupName, accountName)
   330  	if err != nil {
   331  		err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "List", nil, "Failure preparing request")
   332  		return
   333  	}
   334  
   335  	resp, err := client.ListSender(req)
   336  	if err != nil {
   337  		result.Response = autorest.Response{Response: resp}
   338  		err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "List", resp, "Failure sending request")
   339  		return
   340  	}
   341  
   342  	result, err = client.ListResponder(resp)
   343  	if err != nil {
   344  		err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "List", resp, "Failure responding to request")
   345  		return
   346  	}
   347  
   348  	return
   349  }
   350  
   351  // ListPreparer prepares the List request.
   352  func (client BackupPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) {
   353  	pathParameters := map[string]interface{}{
   354  		"accountName":       autorest.Encode("path", accountName),
   355  		"resourceGroupName": autorest.Encode("path", resourceGroupName),
   356  		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
   357  	}
   358  
   359  	const APIVersion = "2021-02-01"
   360  	queryParameters := map[string]interface{}{
   361  		"api-version": APIVersion,
   362  	}
   363  
   364  	preparer := autorest.CreatePreparer(
   365  		autorest.AsGet(),
   366  		autorest.WithBaseURL(client.BaseURI),
   367  		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies", pathParameters),
   368  		autorest.WithQueryParameters(queryParameters))
   369  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   370  }
   371  
   372  // ListSender sends the List request. The method will close the
   373  // http.Response Body if it receives an error.
   374  func (client BackupPoliciesClient) ListSender(req *http.Request) (*http.Response, error) {
   375  	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
   376  }
   377  
   378  // ListResponder handles the response to the List request. The method always
   379  // closes the http.Response Body.
   380  func (client BackupPoliciesClient) ListResponder(resp *http.Response) (result BackupPoliciesList, err error) {
   381  	err = autorest.Respond(
   382  		resp,
   383  		azure.WithErrorUnlessStatusCode(http.StatusOK),
   384  		autorest.ByUnmarshallingJSON(&result),
   385  		autorest.ByClosing())
   386  	result.Response = autorest.Response{Response: resp}
   387  	return
   388  }
   389  
   390  // Update patch a backup policy for Netapp Account
   391  // Parameters:
   392  // resourceGroupName - the name of the resource group.
   393  // accountName - the name of the NetApp account
   394  // backupPolicyName - backup policy Name which uniquely identify backup policy.
   395  // body - backup policy object supplied in the body of the operation.
   396  func (client BackupPoliciesClient) Update(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicyPatch) (result BackupPoliciesUpdateFuture, err error) {
   397  	if tracing.IsEnabled() {
   398  		ctx = tracing.StartSpan(ctx, fqdn+"/BackupPoliciesClient.Update")
   399  		defer func() {
   400  			sc := -1
   401  			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
   402  				sc = result.FutureAPI.Response().StatusCode
   403  			}
   404  			tracing.EndSpan(ctx, sc, err)
   405  		}()
   406  	}
   407  	if err := validation.Validate([]validation.Validation{
   408  		{TargetValue: resourceGroupName,
   409  			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
   410  				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
   411  				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
   412  		return result, validation.NewError("netapp.BackupPoliciesClient", "Update", err.Error())
   413  	}
   414  
   415  	req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, backupPolicyName, body)
   416  	if err != nil {
   417  		err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Update", nil, "Failure preparing request")
   418  		return
   419  	}
   420  
   421  	result, err = client.UpdateSender(req)
   422  	if err != nil {
   423  		err = autorest.NewErrorWithError(err, "netapp.BackupPoliciesClient", "Update", result.Response(), "Failure sending request")
   424  		return
   425  	}
   426  
   427  	return
   428  }
   429  
   430  // UpdatePreparer prepares the Update request.
   431  func (client BackupPoliciesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicyPatch) (*http.Request, error) {
   432  	pathParameters := map[string]interface{}{
   433  		"accountName":       autorest.Encode("path", accountName),
   434  		"backupPolicyName":  autorest.Encode("path", backupPolicyName),
   435  		"resourceGroupName": autorest.Encode("path", resourceGroupName),
   436  		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
   437  	}
   438  
   439  	const APIVersion = "2021-02-01"
   440  	queryParameters := map[string]interface{}{
   441  		"api-version": APIVersion,
   442  	}
   443  
   444  	body.ID = nil
   445  	body.Name = nil
   446  	body.Type = nil
   447  	preparer := autorest.CreatePreparer(
   448  		autorest.AsContentType("application/json; charset=utf-8"),
   449  		autorest.AsPatch(),
   450  		autorest.WithBaseURL(client.BaseURI),
   451  		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", pathParameters),
   452  		autorest.WithJSON(body),
   453  		autorest.WithQueryParameters(queryParameters))
   454  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   455  }
   456  
   457  // UpdateSender sends the Update request. The method will close the
   458  // http.Response Body if it receives an error.
   459  func (client BackupPoliciesClient) UpdateSender(req *http.Request) (future BackupPoliciesUpdateFuture, err error) {
   460  	var resp *http.Response
   461  	future.FutureAPI = &azure.Future{}
   462  	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
   463  	if err != nil {
   464  		return
   465  	}
   466  	var azf azure.Future
   467  	azf, err = azure.NewFutureFromResponse(resp)
   468  	future.FutureAPI = &azf
   469  	future.Result = future.result
   470  	return
   471  }
   472  
   473  // UpdateResponder handles the response to the Update request. The method always
   474  // closes the http.Response Body.
   475  func (client BackupPoliciesClient) UpdateResponder(resp *http.Response) (result BackupPolicy, err error) {
   476  	err = autorest.Respond(
   477  		resp,
   478  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
   479  		autorest.ByUnmarshallingJSON(&result),
   480  		autorest.ByClosing())
   481  	result.Response = autorest.Response{Response: resp}
   482  	return
   483  }
   484  

View as plain text