Skip to content

Commit

Permalink
feat: [Speech] Add adaptation proto for v1 api (#5264)
Browse files Browse the repository at this point in the history
* feat: Add adaptation proto for v1 api

PiperOrigin-RevId: 447561222

Source-Link: googleapis/googleapis@ec9193e

Source-Link: googleapis/googleapis-gen@cd279b0
Copy-Tag: eyJwIjoiU3BlZWNoLy5Pd2xCb3QueWFtbCIsImgiOiJjZDI3OWIwMDNlNDQ1NWM5YjgwNWYyMmZjM2I5OTc2YWQ4NjM5ZWU2In0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: Update client libraries for v1p1beta1 api

PiperOrigin-RevId: 447572837

Source-Link: googleapis/googleapis@10c88bb

Source-Link: googleapis/googleapis-gen@8a8244e
Copy-Tag: eyJwIjoiU3BlZWNoLy5Pd2xCb3QueWFtbCIsImgiOiI4YTgyNDRlZGI1Y2ZjM2Y2MjUzMDQxZGU4ZmUwYjFlN2M5ODYzZGVlIn0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored May 13, 2022
1 parent 15ab70d commit 2003c38
Show file tree
Hide file tree
Showing 41 changed files with 4,066 additions and 190 deletions.
Binary file modified Speech/metadata/V1/CloudSpeech.php
Binary file not shown.
91 changes: 91 additions & 0 deletions Speech/metadata/V1/CloudSpeechAdaptation.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Speech/metadata/V1P1Beta1/CloudSpeech.php
Binary file not shown.
6 changes: 2 additions & 4 deletions Speech/metadata/V1P1Beta1/Resource.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions Speech/src/V1/AdaptationClient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
/*
* 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 WARNING
* Generated by gapic-generator-php from the file
* https://github.com/googleapis/googleapis/blob/master/google/cloud/speech/v1/cloud_speech_adaptation.proto
* Updates to the above are reflected here through a refresh process.
*/

namespace Google\Cloud\Speech\V1;

use Google\Cloud\Speech\V1\Gapic\AdaptationGapicClient;

/** {@inheritdoc} */
class AdaptationClient extends AdaptationGapicClient
{
// This class is intentionally empty, and is intended to hold manual additions to
// the generated {@see AdaptationGapicClient} class.
}
187 changes: 187 additions & 0 deletions Speech/src/V1/AdaptationGrpcClient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
<?php
// GENERATED CODE -- DO NOT EDIT!

// Original file comments:
// 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
//
// http://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.
//
namespace Google\Cloud\Speech\V1;

/**
* Service that implements Google Cloud Speech Adaptation API.
*/
class AdaptationGrpcClient extends \Grpc\BaseStub {

/**
* @param string $hostname hostname
* @param array $opts channel options
* @param \Grpc\Channel $channel (optional) re-use channel object
*/
public function __construct($hostname, $opts, $channel = null) {
parent::__construct($hostname, $opts, $channel);
}

/**
* Create a set of phrase hints. Each item in the set can be a single word or
* a multi-word phrase. The items in the PhraseSet are favored by the
* recognition model when you send a call that includes the PhraseSet.
* @param \Google\Cloud\Speech\V1\CreatePhraseSetRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function CreatePhraseSet(\Google\Cloud\Speech\V1\CreatePhraseSetRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.speech.v1.Adaptation/CreatePhraseSet',
$argument,
['\Google\Cloud\Speech\V1\PhraseSet', 'decode'],
$metadata, $options);
}

/**
* Get a phrase set.
* @param \Google\Cloud\Speech\V1\GetPhraseSetRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function GetPhraseSet(\Google\Cloud\Speech\V1\GetPhraseSetRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.speech.v1.Adaptation/GetPhraseSet',
$argument,
['\Google\Cloud\Speech\V1\PhraseSet', 'decode'],
$metadata, $options);
}

/**
* List phrase sets.
* @param \Google\Cloud\Speech\V1\ListPhraseSetRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function ListPhraseSet(\Google\Cloud\Speech\V1\ListPhraseSetRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.speech.v1.Adaptation/ListPhraseSet',
$argument,
['\Google\Cloud\Speech\V1\ListPhraseSetResponse', 'decode'],
$metadata, $options);
}

/**
* Update a phrase set.
* @param \Google\Cloud\Speech\V1\UpdatePhraseSetRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function UpdatePhraseSet(\Google\Cloud\Speech\V1\UpdatePhraseSetRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.speech.v1.Adaptation/UpdatePhraseSet',
$argument,
['\Google\Cloud\Speech\V1\PhraseSet', 'decode'],
$metadata, $options);
}

/**
* Delete a phrase set.
* @param \Google\Cloud\Speech\V1\DeletePhraseSetRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function DeletePhraseSet(\Google\Cloud\Speech\V1\DeletePhraseSetRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.speech.v1.Adaptation/DeletePhraseSet',
$argument,
['\Google\Protobuf\GPBEmpty', 'decode'],
$metadata, $options);
}

/**
* Create a custom class.
* @param \Google\Cloud\Speech\V1\CreateCustomClassRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function CreateCustomClass(\Google\Cloud\Speech\V1\CreateCustomClassRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.speech.v1.Adaptation/CreateCustomClass',
$argument,
['\Google\Cloud\Speech\V1\CustomClass', 'decode'],
$metadata, $options);
}

/**
* Get a custom class.
* @param \Google\Cloud\Speech\V1\GetCustomClassRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function GetCustomClass(\Google\Cloud\Speech\V1\GetCustomClassRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.speech.v1.Adaptation/GetCustomClass',
$argument,
['\Google\Cloud\Speech\V1\CustomClass', 'decode'],
$metadata, $options);
}

/**
* List custom classes.
* @param \Google\Cloud\Speech\V1\ListCustomClassesRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function ListCustomClasses(\Google\Cloud\Speech\V1\ListCustomClassesRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.speech.v1.Adaptation/ListCustomClasses',
$argument,
['\Google\Cloud\Speech\V1\ListCustomClassesResponse', 'decode'],
$metadata, $options);
}

/**
* Update a custom class.
* @param \Google\Cloud\Speech\V1\UpdateCustomClassRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function UpdateCustomClass(\Google\Cloud\Speech\V1\UpdateCustomClassRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.speech.v1.Adaptation/UpdateCustomClass',
$argument,
['\Google\Cloud\Speech\V1\CustomClass', 'decode'],
$metadata, $options);
}

/**
* Delete a custom class.
* @param \Google\Cloud\Speech\V1\DeleteCustomClassRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function DeleteCustomClass(\Google\Cloud\Speech\V1\DeleteCustomClassRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.speech.v1.Adaptation/DeleteCustomClass',
$argument,
['\Google\Protobuf\GPBEmpty', 'decode'],
$metadata, $options);
}

}
Loading

0 comments on commit 2003c38

Please sign in to comment.