Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename modelStream to modelBody #21

Merged
merged 1 commit into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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