Skip to content

Commit

Permalink
Rename modelStream to modelBody (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhuang01 authored Feb 25, 2022
1 parent cbac31f commit cee47a8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public PersonalizerAdministrationClient(System.Uri endpoint, Azure.Core.TokenCre
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Personalizer.PersonalizerPolicy>> GetPersonalizerPolicyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerServiceProperties> GetPersonalizerProperties(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Personalizer.PersonalizerServiceProperties>> GetPersonalizerPropertiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response ImportPersonalizerSignedModel(System.IO.Stream modelStream, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> ImportPersonalizerSignedModelAsync(System.IO.Stream modelStream, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response ImportPersonalizerSignedModel(System.IO.Stream modelBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> ImportPersonalizerSignedModelAsync(System.IO.Stream modelBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response ResetPersonalizerModel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> ResetPersonalizerModelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerPolicy> ResetPersonalizerPolicy(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,15 +341,15 @@ public virtual Response<Stream> ExportPersonalizerSignedModel(CancellationToken
}

/// <summary> Replace the current model used by Personalizer service with an updated model. </summary>
/// <param name="modelStream">Stream representing the digitally signed model zip archive.</param>
/// <param name="modelBody">Stream representing the digitally signed model zip archive.</param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
public virtual async Task<Response> ImportPersonalizerSignedModelAsync(Stream modelStream, CancellationToken cancellationToken = default)
public virtual async Task<Response> ImportPersonalizerSignedModelAsync(Stream modelBody, CancellationToken cancellationToken = default)
{
using var scope = _clientDiagnostics.CreateScope("PersonalizerAdministrationClient.ImportPersonalizerSignedModel");
scope.Start();
try
{
return await ModelRestClient.ImportAsync(modelStream, cancellationToken).ConfigureAwait(false);
return await ModelRestClient.ImportAsync(modelBody, cancellationToken).ConfigureAwait(false);
}
catch (Exception e)
{
Expand All @@ -359,15 +359,15 @@ public virtual async Task<Response> ImportPersonalizerSignedModelAsync(Stream mo
}

/// <summary> Replace the current model used by Personalizer service with an updated model. </summary>
/// <param name="modelStream">Stream representing the digitally signed model zip archive.</param>
/// <param name="modelBody">Stream representing the digitally signed model zip archive.</param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
public virtual Response ImportPersonalizerSignedModel(Stream modelStream, CancellationToken cancellationToken = default)
public virtual Response ImportPersonalizerSignedModel(Stream modelBody, CancellationToken cancellationToken = default)
{
using var scope = _clientDiagnostics.CreateScope("PersonalizerAdministrationClient.ImportPersonalizerSignedModel");
scope.Start();
try
{
return ModelRestClient.Import(modelStream, cancellationToken);
return ModelRestClient.Import(modelBody, cancellationToken);
}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ private async Task<Response<Stream>> ExportSignedModel(PersonalizerAdministratio
return await client.ExportPersonalizerSignedModelAsync();
}

private async Task<Response> ImportSignedModel(Stream modelStream, PersonalizerAdministrationClient client)
private async Task<Response> ImportSignedModel(Stream modelBody, PersonalizerAdministrationClient client)
{
return await client.ImportPersonalizerSignedModelAsync(modelStream);
return await client.ImportPersonalizerSignedModelAsync(modelBody);
}

private async Task ResetModel(PersonalizerAdministrationClient client)
Expand Down

0 comments on commit cee47a8

Please sign in to comment.