Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
17,346 additions
and
0 deletions.
There are no files selected for viewing
1,615 changes: 1,615 additions & 0 deletions
1,615
apis/Google.Cloud.AutoML.V1/Google.Cloud.AutoML.V1.Snippets/AutoMlClientSnippets.g.cs
Large diffs are not rendered by default.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
...le.Cloud.AutoML.V1/Google.Cloud.AutoML.V1.Snippets/Google.Cloud.AutoML.V1.Snippets.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>netcoreapp2.1;net452</TargetFrameworks> | ||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.1</TargetFrameworks> | ||
<LangVersion>latest</LangVersion> | ||
<IsPackable>false</IsPackable> | ||
<AssemblyOriginatorKeyFile>../../GoogleApis.snk</AssemblyOriginatorKeyFile> | ||
<SignAssembly>true</SignAssembly> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<NoWarn>1701;1702;1705;xUnit2004;xUnit2013;AD0001</NoWarn> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Google.Cloud.AutoML.V1\Google.Cloud.AutoML.V1.csproj" /> | ||
<ProjectReference Include="..\..\..\tools\Google.Cloud.ClientTesting\Google.Cloud.ClientTesting.csproj" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" /> | ||
<PackageReference Include="Moq" Version="4.12.0" /> | ||
<PackageReference Include="xunit" Version="2.4.1" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" /> | ||
<PackageReference Include="Xunit.SkippableFact" Version="1.3.12" /> | ||
<Analyzer Condition="Exists('..\..\..\tools\Google.Cloud.Tools.Analyzers\bin\$(Configuration)\netstandard1.3\publish\Google.Cloud.Tools.Analyzers.dll')" Include="..\..\..\tools\Google.Cloud.Tools.Analyzers\bin\$(Configuration)\netstandard1.3\publish\Google.Cloud.Tools.Analyzers.dll" /> | ||
<Reference Condition="'$(TargetFramework)' == 'net452'" Include="Microsoft.CSharp" /> | ||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" /> | ||
</ItemGroup> | ||
</Project> |
103 changes: 103 additions & 0 deletions
103
...ogle.Cloud.AutoML.V1/Google.Cloud.AutoML.V1.Snippets/PredictionServiceClientSnippets.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
// Copyright 2019 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.AutoML.V1.Snippets | ||
{ | ||
using Google.Api.Gax; | ||
using Google.Api.Gax.Grpc; | ||
using apis = Google.Cloud.AutoML.V1; | ||
using Google.Protobuf; | ||
using Google.Protobuf.WellKnownTypes; | ||
using Grpc.Core; | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Linq; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary>Generated snippets</summary> | ||
public class GeneratedPredictionServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for PredictAsync</summary> | ||
public async Task PredictAsync() | ||
{ | ||
// Snippet: PredictAsync(ModelName,ExamplePayload,IDictionary<string, string>,CallSettings) | ||
// Additional: PredictAsync(ModelName,ExamplePayload,IDictionary<string, string>,CancellationToken) | ||
// Create client | ||
PredictionServiceClient predictionServiceClient = await PredictionServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
ModelName name = new ModelName("[PROJECT]", "[LOCATION]", "[MODEL]"); | ||
ExamplePayload payload = new ExamplePayload(); | ||
IDictionary<string, string> @params = new Dictionary<string, string>(); | ||
// Make the request | ||
PredictResponse response = await predictionServiceClient.PredictAsync(name, payload, @params); | ||
// End snippet | ||
} | ||
|
||
/// <summary>Snippet for Predict</summary> | ||
public void Predict() | ||
{ | ||
// Snippet: Predict(ModelName,ExamplePayload,IDictionary<string, string>,CallSettings) | ||
// Create client | ||
PredictionServiceClient predictionServiceClient = PredictionServiceClient.Create(); | ||
// Initialize request argument(s) | ||
ModelName name = new ModelName("[PROJECT]", "[LOCATION]", "[MODEL]"); | ||
ExamplePayload payload = new ExamplePayload(); | ||
IDictionary<string, string> @params = new Dictionary<string, string>(); | ||
// Make the request | ||
PredictResponse response = predictionServiceClient.Predict(name, payload, @params); | ||
// End snippet | ||
} | ||
|
||
/// <summary>Snippet for PredictAsync</summary> | ||
public async Task PredictAsync_RequestObject() | ||
{ | ||
// Snippet: PredictAsync(PredictRequest,CallSettings) | ||
// Additional: PredictAsync(PredictRequest,CancellationToken) | ||
// Create client | ||
PredictionServiceClient predictionServiceClient = await PredictionServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
PredictRequest request = new PredictRequest | ||
{ | ||
ModelName = new ModelName("[PROJECT]", "[LOCATION]", "[MODEL]"), | ||
Payload = new ExamplePayload(), | ||
}; | ||
// Make the request | ||
PredictResponse response = await predictionServiceClient.PredictAsync(request); | ||
// End snippet | ||
} | ||
|
||
/// <summary>Snippet for Predict</summary> | ||
public void Predict_RequestObject() | ||
{ | ||
// Snippet: Predict(PredictRequest,CallSettings) | ||
// Create client | ||
PredictionServiceClient predictionServiceClient = PredictionServiceClient.Create(); | ||
// Initialize request argument(s) | ||
PredictRequest request = new PredictRequest | ||
{ | ||
ModelName = new ModelName("[PROJECT]", "[LOCATION]", "[MODEL]"), | ||
Payload = new ExamplePayload(), | ||
}; | ||
// Make the request | ||
PredictResponse response = predictionServiceClient.Predict(request); | ||
// End snippet | ||
} | ||
|
||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
apis/Google.Cloud.AutoML.V1/Google.Cloud.AutoML.V1.Snippets/coverage.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<CoverageParams> | ||
<TargetExecutable>C:/Program Files/dotnet/dotnet.exe</TargetExecutable> | ||
<TargetArguments>test --no-build -c Release</TargetArguments> | ||
<Filters> | ||
<IncludeFilters> | ||
<FilterEntry> | ||
<ModuleMask>Google.Cloud.AutoML.V1</ModuleMask> | ||
</FilterEntry> | ||
</IncludeFilters> | ||
</Filters> | ||
<AttributeFilters> | ||
<AttributeFilterEntry>System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute</AttributeFilterEntry> | ||
<AttributeFilterEntry>System.Diagnostics.DebuggerNonUserCodeAttribute</AttributeFilterEntry> | ||
</AttributeFilters> | ||
<TargetWorkingDir>.</TargetWorkingDir> | ||
<Output>../../../coverage/Google.Cloud.AutoML.V1.Snippets.dvcr</Output> | ||
</CoverageParams> |
Oops, something went wrong.