Skip to content

Commit

Permalink
feat: Add adaptation proto for v1 api
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 447561222

Source-Link: googleapis/googleapis@ec9193e

Source-Link: googleapis/googleapis-gen@cd279b0
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU3BlZWNoLlYxLy5Pd2xCb3QueWFtbCIsImgiOiJjZDI3OWIwMDNlNDQ1NWM5YjgwNWYyMmZjM2I5OTc2YWQ4NjM5ZWU2In0=
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed May 10, 2022
1 parent f438701 commit 1c5ae72
Show file tree
Hide file tree
Showing 66 changed files with 13,019 additions and 81 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright 2022 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.Speech.V1.Snippets
{
// [START speech_v1_generated_Adaptation_CreateCustomClass_async_flattened]
using Google.Cloud.Speech.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedAdaptationClientSnippets
{
/// <summary>Snippet for CreateCustomClassAsync</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public async Task CreateCustomClassAsync()
{
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
CustomClass response = await adaptationClient.CreateCustomClassAsync(parent, customClass, customClassId);
}
}
// [END speech_v1_generated_Adaptation_CreateCustomClass_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Copyright 2022 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.Speech.V1.Snippets
{
// [START speech_v1_generated_Adaptation_CreateCustomClass_async]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Speech.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedAdaptationClientSnippets
{
/// <summary>Snippet for CreateCustomClassAsync</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public async Task CreateCustomClassRequestObjectAsync()
{
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
CreateCustomClassRequest request = new CreateCustomClassRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
CustomClassId = "",
CustomClass = new CustomClass(),
};
// Make the request
CustomClass response = await adaptationClient.CreateCustomClassAsync(request);
}
}
// [END speech_v1_generated_Adaptation_CreateCustomClass_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright 2022 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.Speech.V1.Snippets
{
// [START speech_v1_generated_Adaptation_CreateCustomClass_sync]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Speech.V1;

public sealed partial class GeneratedAdaptationClientSnippets
{
/// <summary>Snippet for CreateCustomClass</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public void CreateCustomClassRequestObject()
{
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
CreateCustomClassRequest request = new CreateCustomClassRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
CustomClassId = "",
CustomClass = new CustomClass(),
};
// Make the request
CustomClass response = adaptationClient.CreateCustomClass(request);
}
}
// [END speech_v1_generated_Adaptation_CreateCustomClass_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2022 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.Speech.V1.Snippets
{
// [START speech_v1_generated_Adaptation_CreateCustomClass_async_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Speech.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedAdaptationClientSnippets
{
/// <summary>Snippet for CreateCustomClassAsync</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public async Task CreateCustomClassResourceNamesAsync()
{
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
CustomClass response = await adaptationClient.CreateCustomClassAsync(parent, customClass, customClassId);
}
}
// [END speech_v1_generated_Adaptation_CreateCustomClass_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright 2022 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.Speech.V1.Snippets
{
// [START speech_v1_generated_Adaptation_CreateCustomClass_sync_flattened_resourceNames]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Speech.V1;

public sealed partial class GeneratedAdaptationClientSnippets
{
/// <summary>Snippet for CreateCustomClass</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public void CreateCustomClassResourceNames()
{
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
CustomClass response = adaptationClient.CreateCustomClass(parent, customClass, customClassId);
}
}
// [END speech_v1_generated_Adaptation_CreateCustomClass_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright 2022 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.Speech.V1.Snippets
{
// [START speech_v1_generated_Adaptation_CreateCustomClass_sync_flattened]
using Google.Cloud.Speech.V1;

public sealed partial class GeneratedAdaptationClientSnippets
{
/// <summary>Snippet for CreateCustomClass</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public void CreateCustomClass()
{
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
CustomClass response = adaptationClient.CreateCustomClass(parent, customClass, customClassId);
}
}
// [END speech_v1_generated_Adaptation_CreateCustomClass_sync_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright 2022 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.Speech.V1.Snippets
{
// [START speech_v1_generated_Adaptation_CreatePhraseSet_async_flattened]
using Google.Cloud.Speech.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedAdaptationClientSnippets
{
/// <summary>Snippet for CreatePhraseSetAsync</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public async Task CreatePhraseSetAsync()
{
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
PhraseSet phraseSet = new PhraseSet();
string phraseSetId = "";
// Make the request
PhraseSet response = await adaptationClient.CreatePhraseSetAsync(parent, phraseSet, phraseSetId);
}
}
// [END speech_v1_generated_Adaptation_CreatePhraseSet_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Copyright 2022 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.Speech.V1.Snippets
{
// [START speech_v1_generated_Adaptation_CreatePhraseSet_async]
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Speech.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedAdaptationClientSnippets
{
/// <summary>Snippet for CreatePhraseSetAsync</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public async Task CreatePhraseSetRequestObjectAsync()
{
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
CreatePhraseSetRequest request = new CreatePhraseSetRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
PhraseSetId = "",
PhraseSet = new PhraseSet(),
};
// Make the request
PhraseSet response = await adaptationClient.CreatePhraseSetAsync(request);
}
}
// [END speech_v1_generated_Adaptation_CreatePhraseSet_async]
}
Loading

0 comments on commit 1c5ae72

Please sign in to comment.