From abf312e57cc273539e691b4c5dc961a568c2b4ce Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 15:58:56 -0800 Subject: [PATCH 1/9] feat: [AiPlatform] add service_account to UploadModelRequest in aiplatform v1 model_service.proto (#5688) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add service_account to UploadModelRequest in aiplatform v1 model_service.proto PiperOrigin-RevId: 493943349 Source-Link: https://github.com/googleapis/googleapis/commit/9df383800509d1fb24fe961123011bb7cc8de450 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7345a78ad33b449f45d7d676ff0af93411ceae94 Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiNzM0NWE3OGFkMzNiNDQ5ZjQ1ZDdkNjc2ZmYwYWY5MzQxMWNlYWU5NCJ9 * 🦉 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 --- AiPlatform/metadata/V1/ModelService.php | 7 ++- .../src/V1/Gapic/ModelServiceGapicClient.php | 12 ++++ AiPlatform/src/V1/UploadModelRequest.php | 58 +++++++++++++++++++ 3 files changed, 74 insertions(+), 3 deletions(-) diff --git a/AiPlatform/metadata/V1/ModelService.php b/AiPlatform/metadata/V1/ModelService.php index a8aed375c22b..d9d7c31165aa 100644 --- a/AiPlatform/metadata/V1/ModelService.php +++ b/AiPlatform/metadata/V1/ModelService.php @@ -27,14 +27,15 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' -: -.google/cloud/aiplatform/v1/model_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto#google/cloud/aiplatform/v1/io.proto&google/cloud/aiplatform/v1/model.proto1google/cloud/aiplatform/v1/model_evaluation.proto7google/cloud/aiplatform/v1/model_evaluation_slice.proto*google/cloud/aiplatform/v1/operation.proto#google/longrunning/operations.proto google/protobuf/field_mask.proto" +: +.google/cloud/aiplatform/v1/model_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto#google/cloud/aiplatform/v1/io.proto&google/cloud/aiplatform/v1/model.proto1google/cloud/aiplatform/v1/model_evaluation.proto7google/cloud/aiplatform/v1/model_evaluation_slice.proto*google/cloud/aiplatform/v1/operation.proto#google/longrunning/operations.proto google/protobuf/field_mask.proto" UploadModelRequest9 parent ( B)AA# !locations.googleapis.com/Location parent_model ( BA model_id ( BA5 -model ( 2!.google.cloud.aiplatform.v1.ModelBA"n +model ( 2!.google.cloud.aiplatform.v1.ModelBA +service_account ( BA"n UploadModelOperationMetadataN generic_metadata ( 24.google.cloud.aiplatform.v1.GenericOperationMetadata"i UploadModelResponse3 diff --git a/AiPlatform/src/V1/Gapic/ModelServiceGapicClient.php b/AiPlatform/src/V1/Gapic/ModelServiceGapicClient.php index e9756f1c7b06..8af5c37a88f9 100644 --- a/AiPlatform/src/V1/Gapic/ModelServiceGapicClient.php +++ b/AiPlatform/src/V1/Gapic/ModelServiceGapicClient.php @@ -1578,6 +1578,14 @@ public function updateModel($model, $updateMask, array $optionalArgs = []) * * This value may be up to 63 characters, and valid characters are * `[a-z0-9_-]`. The first character cannot be a number or hyphen. + * @type string $serviceAccount + * Optional. The user-provided custom service account to use to do the model + * upload. If empty, [Vertex AI Service + * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) + * will be used. Users uploading the Model must have the + * `iam.serviceAccounts.actAs` permission on this service account. Also, this + * account must belong to the project specified in the `parent` field and have + * all necessary read permissions. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -1603,6 +1611,10 @@ public function uploadModel($parent, $model, array $optionalArgs = []) $request->setModelId($optionalArgs['modelId']); } + if (isset($optionalArgs['serviceAccount'])) { + $request->setServiceAccount($optionalArgs['serviceAccount']); + } + $requestParams = new RequestParamsHeaderDescriptor( $requestParamHeaders ); diff --git a/AiPlatform/src/V1/UploadModelRequest.php b/AiPlatform/src/V1/UploadModelRequest.php index f2a762fb0665..b4af7a051ff0 100644 --- a/AiPlatform/src/V1/UploadModelRequest.php +++ b/AiPlatform/src/V1/UploadModelRequest.php @@ -44,6 +44,18 @@ class UploadModelRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $model = null; + /** + * Optional. The user-provided custom service account to use to do the model + * upload. If empty, [Vertex AI Service + * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) + * will be used. Users uploading the Model must have the + * `iam.serviceAccounts.actAs` permission on this service account. Also, this + * account must belong to the project specified in the `parent` field and have + * all necessary read permissions. + * + * Generated from protobuf field string service_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $service_account = ''; /** * Constructor. @@ -64,6 +76,14 @@ class UploadModelRequest extends \Google\Protobuf\Internal\Message * `[a-z0-9_-]`. The first character cannot be a number or hyphen. * @type \Google\Cloud\AIPlatform\V1\Model $model * Required. The Model to create. + * @type string $service_account + * Optional. The user-provided custom service account to use to do the model + * upload. If empty, [Vertex AI Service + * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) + * will be used. Users uploading the Model must have the + * `iam.serviceAccounts.actAs` permission on this service account. Also, this + * account must belong to the project specified in the `parent` field and have + * all necessary read permissions. * } */ public function __construct($data = NULL) { @@ -195,5 +215,43 @@ public function setModel($var) return $this; } + /** + * Optional. The user-provided custom service account to use to do the model + * upload. If empty, [Vertex AI Service + * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) + * will be used. Users uploading the Model must have the + * `iam.serviceAccounts.actAs` permission on this service account. Also, this + * account must belong to the project specified in the `parent` field and have + * all necessary read permissions. + * + * Generated from protobuf field string service_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. The user-provided custom service account to use to do the model + * upload. If empty, [Vertex AI Service + * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) + * will be used. Users uploading the Model must have the + * `iam.serviceAccounts.actAs` permission on this service account. Also, this + * account must belong to the project specified in the `parent` field and have + * all necessary read permissions. + * + * Generated from protobuf field string service_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + } From d03de88eb13e18f7abc88a407991cfa75ae80661 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 8 Dec 2022 15:59:25 -0800 Subject: [PATCH 2/9] chore(docs): escape HTML entities (#5687) --- dev/src/DocFx/Node/DocblockTrait.php | 1 + dev/tests/fixtures/docfx/V1.ProductSearchClient.yml | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dev/src/DocFx/Node/DocblockTrait.php b/dev/src/DocFx/Node/DocblockTrait.php index c83bdb011138..16e388dca147 100644 --- a/dev/src/DocFx/Node/DocblockTrait.php +++ b/dev/src/DocFx/Node/DocblockTrait.php @@ -37,6 +37,7 @@ public function getContent(): string $content .= $longDescription; } + $content = html_entity_decode($content); $content = $this->replaceSeeTag($content); $content = $this->replaceProtoRef($content); $content = $this->stripSnippetTag($content); diff --git a/dev/tests/fixtures/docfx/V1.ProductSearchClient.yml b/dev/tests/fixtures/docfx/V1.ProductSearchClient.yml index 0d444e7a31c1..0efbe3460b3f 100644 --- a/dev/tests/fixtures/docfx/V1.ProductSearchClient.yml +++ b/dev/tests/fixtures/docfx/V1.ProductSearchClient.yml @@ -10,16 +10,16 @@ items: search. It uses the following resource model: - The API has a collection of ProductSet resources, named - `projects/*/locations/*/productSets/*`, which acts as a way to put different + `projects/*/locations/*/productSets/*`, which acts as a way to put different products into groups to limit identification. In parallel, - The API has a collection of Product resources, named - `projects/*/locations/*/products/*` + `projects/*/locations/*/products/*` - Each Product has a collection of ReferenceImage resources, named - `projects/*/locations/*/products/*/referenceImages/*` + `projects/*/locations/*/products/*/referenceImages/*` This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started: From 7ebae6c3de78015842d5f83f3208cb3c464c7a93 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 16:33:35 -0800 Subject: [PATCH 3/9] feat: [TextToSpeech] add LRS API (#5680) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add LRS API PiperOrigin-RevId: 493606501 Source-Link: https://github.com/googleapis/googleapis/commit/a1b5429eec257c4f3a8425b20d4689d1df5812bc Source-Link: https://github.com/googleapis/googleapis-gen/commit/ea4e7802b7da7db3a2f422a5dbf4e3f4f8c6067d Copy-Tag: eyJwIjoiVGV4dFRvU3BlZWNoLy5Pd2xCb3QueWFtbCIsImgiOiJlYTRlNzgwMmI3ZGE3ZGIzYTJmNDIyYTVkYmY0ZTNmNGY4YzYwNjdkIn0= * 🦉 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 --- TextToSpeech/metadata/V1/CloudTtsLrs.php | 49 +++ .../TextToSpeechClient/synthesize_speech.php | 6 +- .../synthesize_long_audio.php | 85 +++++ TextToSpeech/src/V1/AudioConfig.php | 8 +- TextToSpeech/src/V1/AudioEncoding.php | 3 +- ...ToSpeechLongAudioSynthesizeGapicClient.php | 331 ++++++++++++++++++ TextToSpeech/src/V1/SynthesisInput.php | 13 +- .../src/V1/SynthesizeLongAudioMetadata.php | 155 ++++++++ .../src/V1/SynthesizeLongAudioRequest.php | 246 +++++++++++++ .../src/V1/SynthesizeLongAudioResponse.php | 33 ++ .../TextToSpeechLongAudioSynthesizeClient.php | 34 ++ ...tToSpeechLongAudioSynthesizeGrpcClient.php | 50 +++ TextToSpeech/src/V1/VoiceSelectionParams.php | 24 +- TextToSpeech/src/V1/gapic_metadata.json | 14 + .../text_to_speech_client_config.json | 12 +- ...h_long_audio_synthesize_client_config.json | 37 ++ ...ong_audio_synthesize_descriptor_config.php | 18 + ...ng_audio_synthesize_rest_client_config.php | 20 ++ ...tToSpeechLongAudioSynthesizeClientTest.php | 193 ++++++++++ 19 files changed, 1305 insertions(+), 26 deletions(-) create mode 100644 TextToSpeech/metadata/V1/CloudTtsLrs.php create mode 100644 TextToSpeech/samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php create mode 100644 TextToSpeech/src/V1/Gapic/TextToSpeechLongAudioSynthesizeGapicClient.php create mode 100644 TextToSpeech/src/V1/SynthesizeLongAudioMetadata.php create mode 100644 TextToSpeech/src/V1/SynthesizeLongAudioRequest.php create mode 100644 TextToSpeech/src/V1/SynthesizeLongAudioResponse.php create mode 100644 TextToSpeech/src/V1/TextToSpeechLongAudioSynthesizeClient.php create mode 100644 TextToSpeech/src/V1/TextToSpeechLongAudioSynthesizeGrpcClient.php create mode 100644 TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_client_config.json create mode 100644 TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php create mode 100644 TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php create mode 100644 TextToSpeech/tests/Unit/V1/TextToSpeechLongAudioSynthesizeClientTest.php diff --git a/TextToSpeech/metadata/V1/CloudTtsLrs.php b/TextToSpeech/metadata/V1/CloudTtsLrs.php new file mode 100644 index 000000000000..2e7febaca567 --- /dev/null +++ b/TextToSpeech/metadata/V1/CloudTtsLrs.php @@ -0,0 +1,49 @@ +internalAddGeneratedFile( + ' + + +0google/cloud/texttospeech/v1/cloud_tts_lrs.protogoogle.cloud.texttospeech.v1google/api/client.protogoogle/api/field_behavior.proto,google/cloud/texttospeech/v1/cloud_tts.proto#google/longrunning/operations.protogoogle/protobuf/timestamp.proto" +SynthesizeLongAudioRequest +parent ( @ +input ( 2,.google.cloud.texttospeech.v1.SynthesisInputBAD + audio_config ( 2).google.cloud.texttospeech.v1.AudioConfigBA +output_gcs_uri ( A +voice ( 22.google.cloud.texttospeech.v1.VoiceSelectionParams" +SynthesizeLongAudioResponse" +SynthesizeLongAudioMetadata. + +start_time ( 2.google.protobuf.Timestamp4 +last_update_time ( 2.google.protobuf.Timestamp +progress_percentage (2 +TextToSpeechLongAudioSynthesize +SynthesizeLongAudio8.google.cloud.texttospeech.v1.SynthesizeLongAudioRequest.google.longrunning.Operation"E"@/v1/{parent=projects/*/locations/*/voices/*}:SynthesizeLongAudio:*A: +SynthesizeLongAudioResponseSynthesizeLongAudioMetadataOAtexttospeech.googleapis.comA.https://www.googleapis.com/auth/cloud-platformB + com.google.cloud.texttospeech.v1B#TextToSpeechLongAudioSynthesisProtoPZHgoogle.golang.org/genproto/googleapis/cloud/texttospeech/v1;texttospeechGoogle.Cloud.TextToSpeech.V1Google\\Cloud\\TextToSpeech\\V1Google::Cloud::TextToSpeech::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/TextToSpeech/samples/V1/TextToSpeechClient/synthesize_speech.php b/TextToSpeech/samples/V1/TextToSpeechClient/synthesize_speech.php index 0a702aae6c55..7af449763fad 100644 --- a/TextToSpeech/samples/V1/TextToSpeechClient/synthesize_speech.php +++ b/TextToSpeech/samples/V1/TextToSpeechClient/synthesize_speech.php @@ -35,9 +35,9 @@ * Synthesizes speech synchronously: receive results after all text input * has been processed. * - * @param string $voiceLanguageCode The language (and potentially also the region) of the voice expressed as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. - * "en-US". This should not include a script tag (e.g. use + * @param string $voiceLanguageCode The language (and potentially also the region) of the voice + * expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag, e.g. "en-US". This should not include a script tag (e.g. use * "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred * from the input provided in the SynthesisInput. The TTS service * will use this parameter to help choose an appropriate voice. Note that diff --git a/TextToSpeech/samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php b/TextToSpeech/samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php new file mode 100644 index 000000000000..1898a6dceab3 --- /dev/null +++ b/TextToSpeech/samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php @@ -0,0 +1,85 @@ +setAudioEncoding($audioConfigAudioEncoding); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $textToSpeechLongAudioSynthesizeClient->synthesizeLongAudio($input, $audioConfig); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var SynthesizeLongAudioResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + + synthesize_long_audio_sample($audioConfigAudioEncoding); +} +// [END texttospeech_v1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync] diff --git a/TextToSpeech/src/V1/AudioConfig.php b/TextToSpeech/src/V1/AudioConfig.php index 5e59b254f4e0..49a0532fadb7 100644 --- a/TextToSpeech/src/V1/AudioConfig.php +++ b/TextToSpeech/src/V1/AudioConfig.php @@ -58,7 +58,7 @@ class AudioConfig extends \Google\Protobuf\Internal\Message * converting to the desired sample rate (which might result in worse audio * quality), unless the specified sample rate is not supported for the * encoding chosen, in which case it will fail the request and return - * [google.rpc.Code.INVALID_ARGUMENT][]. + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. * * Generated from protobuf field int32 sample_rate_hertz = 5 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -108,7 +108,7 @@ class AudioConfig extends \Google\Protobuf\Internal\Message * converting to the desired sample rate (which might result in worse audio * quality), unless the specified sample rate is not supported for the * encoding chosen, in which case it will fail the request and return - * [google.rpc.Code.INVALID_ARGUMENT][]. + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. * @type array|\Google\Protobuf\Internal\RepeatedField $effects_profile_id * Optional. Input only. An identifier which selects 'audio effects' profiles * that are applied on (post synthesized) text to speech. Effects are applied @@ -258,7 +258,7 @@ public function setVolumeGainDb($var) * converting to the desired sample rate (which might result in worse audio * quality), unless the specified sample rate is not supported for the * encoding chosen, in which case it will fail the request and return - * [google.rpc.Code.INVALID_ARGUMENT][]. + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. * * Generated from protobuf field int32 sample_rate_hertz = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -275,7 +275,7 @@ public function getSampleRateHertz() * converting to the desired sample rate (which might result in worse audio * quality), unless the specified sample rate is not supported for the * encoding chosen, in which case it will fail the request and return - * [google.rpc.Code.INVALID_ARGUMENT][]. + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. * * Generated from protobuf field int32 sample_rate_hertz = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/TextToSpeech/src/V1/AudioEncoding.php b/TextToSpeech/src/V1/AudioEncoding.php index b74fb619a4fb..1a3ee8800a95 100644 --- a/TextToSpeech/src/V1/AudioEncoding.php +++ b/TextToSpeech/src/V1/AudioEncoding.php @@ -15,7 +15,8 @@ class AudioEncoding { /** - * Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][]. + * Not specified. Will return result + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. * * Generated from protobuf enum AUDIO_ENCODING_UNSPECIFIED = 0; */ diff --git a/TextToSpeech/src/V1/Gapic/TextToSpeechLongAudioSynthesizeGapicClient.php b/TextToSpeech/src/V1/Gapic/TextToSpeechLongAudioSynthesizeGapicClient.php new file mode 100644 index 000000000000..a49bb319dd4f --- /dev/null +++ b/TextToSpeech/src/V1/Gapic/TextToSpeechLongAudioSynthesizeGapicClient.php @@ -0,0 +1,331 @@ +synthesizeLongAudio($input, $audioConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $textToSpeechLongAudioSynthesizeClient->synthesizeLongAudio($input, $audioConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $textToSpeechLongAudioSynthesizeClient->resumeOperation($operationName, 'synthesizeLongAudio'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $textToSpeechLongAudioSynthesizeClient->close(); + * } + * ``` + */ +class TextToSpeechLongAudioSynthesizeGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'texttospeech.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => + self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => + __DIR__ . + '/../resources/text_to_speech_long_audio_synthesize_client_config.json', + 'descriptorsConfigPath' => + __DIR__ . + '/../resources/text_to_speech_long_audio_synthesize_descriptor_config.php', + 'gcpApiConfigPath' => + __DIR__ . + '/../resources/text_to_speech_long_audio_synthesize_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . + '/../resources/text_to_speech_long_audio_synthesize_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) + ? $this->descriptors[$methodName]['longRunning'] + : []; + $operation = new OperationResponse( + $operationName, + $this->getOperationsClient(), + $options + ); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'texttospeech.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Synthesizes long form text asynchronously. + * + * Sample code: + * ``` + * $textToSpeechLongAudioSynthesizeClient = new TextToSpeechLongAudioSynthesizeClient(); + * try { + * $input = new SynthesisInput(); + * $audioConfig = new AudioConfig(); + * $operationResponse = $textToSpeechLongAudioSynthesizeClient->synthesizeLongAudio($input, $audioConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $textToSpeechLongAudioSynthesizeClient->synthesizeLongAudio($input, $audioConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $textToSpeechLongAudioSynthesizeClient->resumeOperation($operationName, 'synthesizeLongAudio'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $textToSpeechLongAudioSynthesizeClient->close(); + * } + * ``` + * + * @param SynthesisInput $input Required. The Synthesizer requires either plain text or SSML as input. + * @param AudioConfig $audioConfig Required. The configuration of the synthesized audio. + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * The resource states of the request in the form of + * `projects/*/locations/*/voices/*`. + * @type string $outputGcsUri + * Specifies a Cloud Storage URI for the synthesis results. Must be + * specified in the format: `gs://bucket_name/object_name`, and the bucket + * must already exist. + * @type VoiceSelectionParams $voice + * The desired voice of the synthesized audio. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function synthesizeLongAudio( + $input, + $audioConfig, + array $optionalArgs = [] + ) { + $request = new SynthesizeLongAudioRequest(); + $requestParamHeaders = []; + $request->setInput($input); + $request->setAudioConfig($audioConfig); + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + if (isset($optionalArgs['outputGcsUri'])) { + $request->setOutputGcsUri($optionalArgs['outputGcsUri']); + } + + if (isset($optionalArgs['voice'])) { + $request->setVoice($optionalArgs['voice']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'SynthesizeLongAudio', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } +} diff --git a/TextToSpeech/src/V1/SynthesisInput.php b/TextToSpeech/src/V1/SynthesisInput.php index fd3fc0e0666f..4e8f0065c3c2 100644 --- a/TextToSpeech/src/V1/SynthesisInput.php +++ b/TextToSpeech/src/V1/SynthesisInput.php @@ -11,8 +11,8 @@ /** * Contains text input to be synthesized. Either `text` or `ssml` must be * supplied. Supplying both or neither returns - * [google.rpc.Code.INVALID_ARGUMENT][]. The input size is limited to 5000 - * characters. + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. The + * input size is limited to 5000 bytes. * * Generated from protobuf message google.cloud.texttospeech.v1.SynthesisInput */ @@ -31,7 +31,8 @@ class SynthesisInput extends \Google\Protobuf\Internal\Message * @type string $ssml * The SSML document to be synthesized. The SSML document must be valid * and well-formed. Otherwise the RPC will fail and return - * [google.rpc.Code.INVALID_ARGUMENT][]. For more information, see + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For + * more information, see * [SSML](https://cloud.google.com/text-to-speech/docs/ssml). * } */ @@ -74,7 +75,8 @@ public function setText($var) /** * The SSML document to be synthesized. The SSML document must be valid * and well-formed. Otherwise the RPC will fail and return - * [google.rpc.Code.INVALID_ARGUMENT][]. For more information, see + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For + * more information, see * [SSML](https://cloud.google.com/text-to-speech/docs/ssml). * * Generated from protobuf field string ssml = 2; @@ -93,7 +95,8 @@ public function hasSsml() /** * The SSML document to be synthesized. The SSML document must be valid * and well-formed. Otherwise the RPC will fail and return - * [google.rpc.Code.INVALID_ARGUMENT][]. For more information, see + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For + * more information, see * [SSML](https://cloud.google.com/text-to-speech/docs/ssml). * * Generated from protobuf field string ssml = 2; diff --git a/TextToSpeech/src/V1/SynthesizeLongAudioMetadata.php b/TextToSpeech/src/V1/SynthesizeLongAudioMetadata.php new file mode 100644 index 000000000000..7f23aab7200c --- /dev/null +++ b/TextToSpeech/src/V1/SynthesizeLongAudioMetadata.php @@ -0,0 +1,155 @@ +google.cloud.texttospeech.v1.SynthesizeLongAudioMetadata + */ +class SynthesizeLongAudioMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Time when the request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + private $start_time = null; + /** + * Time of the most recent processing update. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2; + */ + private $last_update_time = null; + /** + * The progress of the most recent processing update in percentage, ie. 70.0%. + * + * Generated from protobuf field double progress_percentage = 3; + */ + private $progress_percentage = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Time when the request was received. + * @type \Google\Protobuf\Timestamp $last_update_time + * Time of the most recent processing update. + * @type float $progress_percentage + * The progress of the most recent processing update in percentage, ie. 70.0%. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTtsLrs::initOnce(); + parent::__construct($data); + } + + /** + * Time when the request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Time when the request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Time of the most recent processing update. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastUpdateTime() + { + return $this->last_update_time; + } + + public function hasLastUpdateTime() + { + return isset($this->last_update_time); + } + + public function clearLastUpdateTime() + { + unset($this->last_update_time); + } + + /** + * Time of the most recent processing update. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_update_time = $var; + + return $this; + } + + /** + * The progress of the most recent processing update in percentage, ie. 70.0%. + * + * Generated from protobuf field double progress_percentage = 3; + * @return float + */ + public function getProgressPercentage() + { + return $this->progress_percentage; + } + + /** + * The progress of the most recent processing update in percentage, ie. 70.0%. + * + * Generated from protobuf field double progress_percentage = 3; + * @param float $var + * @return $this + */ + public function setProgressPercentage($var) + { + GPBUtil::checkDouble($var); + $this->progress_percentage = $var; + + return $this; + } + +} + diff --git a/TextToSpeech/src/V1/SynthesizeLongAudioRequest.php b/TextToSpeech/src/V1/SynthesizeLongAudioRequest.php new file mode 100644 index 000000000000..7b1cac4128dd --- /dev/null +++ b/TextToSpeech/src/V1/SynthesizeLongAudioRequest.php @@ -0,0 +1,246 @@ +google.cloud.texttospeech.v1.SynthesizeLongAudioRequest + */ +class SynthesizeLongAudioRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource states of the request in the form of + * `projects/*/locations/*/voices/*`. + * + * Generated from protobuf field string parent = 1; + */ + private $parent = ''; + /** + * Required. The Synthesizer requires either plain text or SSML as input. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $input = null; + /** + * Required. The configuration of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $audio_config = null; + /** + * Specifies a Cloud Storage URI for the synthesis results. Must be + * specified in the format: `gs://bucket_name/object_name`, and the bucket + * must already exist. + * + * Generated from protobuf field string output_gcs_uri = 4; + */ + private $output_gcs_uri = ''; + /** + * The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 5; + */ + private $voice = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The resource states of the request in the form of + * `projects/*/locations/*/voices/*`. + * @type \Google\Cloud\TextToSpeech\V1\SynthesisInput $input + * Required. The Synthesizer requires either plain text or SSML as input. + * @type \Google\Cloud\TextToSpeech\V1\AudioConfig $audio_config + * Required. The configuration of the synthesized audio. + * @type string $output_gcs_uri + * Specifies a Cloud Storage URI for the synthesis results. Must be + * specified in the format: `gs://bucket_name/object_name`, and the bucket + * must already exist. + * @type \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $voice + * The desired voice of the synthesized audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTtsLrs::initOnce(); + parent::__construct($data); + } + + /** + * The resource states of the request in the form of + * `projects/*/locations/*/voices/*`. + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The resource states of the request in the form of + * `projects/*/locations/*/voices/*`. + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The Synthesizer requires either plain text or SSML as input. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TextToSpeech\V1\SynthesisInput|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Required. The Synthesizer requires either plain text or SSML as input. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TextToSpeech\V1\SynthesisInput $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\SynthesisInput::class); + $this->input = $var; + + return $this; + } + + /** + * Required. The configuration of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TextToSpeech\V1\AudioConfig|null + */ + public function getAudioConfig() + { + return $this->audio_config; + } + + public function hasAudioConfig() + { + return isset($this->audio_config); + } + + public function clearAudioConfig() + { + unset($this->audio_config); + } + + /** + * Required. The configuration of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TextToSpeech\V1\AudioConfig $var + * @return $this + */ + public function setAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\AudioConfig::class); + $this->audio_config = $var; + + return $this; + } + + /** + * Specifies a Cloud Storage URI for the synthesis results. Must be + * specified in the format: `gs://bucket_name/object_name`, and the bucket + * must already exist. + * + * Generated from protobuf field string output_gcs_uri = 4; + * @return string + */ + public function getOutputGcsUri() + { + return $this->output_gcs_uri; + } + + /** + * Specifies a Cloud Storage URI for the synthesis results. Must be + * specified in the format: `gs://bucket_name/object_name`, and the bucket + * must already exist. + * + * Generated from protobuf field string output_gcs_uri = 4; + * @param string $var + * @return $this + */ + public function setOutputGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->output_gcs_uri = $var; + + return $this; + } + + /** + * The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 5; + * @return \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams|null + */ + public function getVoice() + { + return $this->voice; + } + + public function hasVoice() + { + return isset($this->voice); + } + + public function clearVoice() + { + unset($this->voice); + } + + /** + * The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 5; + * @param \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $var + * @return $this + */ + public function setVoice($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams::class); + $this->voice = $var; + + return $this; + } + +} + diff --git a/TextToSpeech/src/V1/SynthesizeLongAudioResponse.php b/TextToSpeech/src/V1/SynthesizeLongAudioResponse.php new file mode 100644 index 000000000000..e1a3d25b4131 --- /dev/null +++ b/TextToSpeech/src/V1/SynthesizeLongAudioResponse.php @@ -0,0 +1,33 @@ +google.cloud.texttospeech.v1.SynthesizeLongAudioResponse + */ +class SynthesizeLongAudioResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTtsLrs::initOnce(); + parent::__construct($data); + } + +} + diff --git a/TextToSpeech/src/V1/TextToSpeechLongAudioSynthesizeClient.php b/TextToSpeech/src/V1/TextToSpeechLongAudioSynthesizeClient.php new file mode 100644 index 000000000000..8f5aff29208a --- /dev/null +++ b/TextToSpeech/src/V1/TextToSpeechLongAudioSynthesizeClient.php @@ -0,0 +1,34 @@ +_simpleRequest('/google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize/SynthesizeLongAudio', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/TextToSpeech/src/V1/VoiceSelectionParams.php b/TextToSpeech/src/V1/VoiceSelectionParams.php index 5e3724d6110e..f16860365f08 100644 --- a/TextToSpeech/src/V1/VoiceSelectionParams.php +++ b/TextToSpeech/src/V1/VoiceSelectionParams.php @@ -16,9 +16,9 @@ class VoiceSelectionParams extends \Google\Protobuf\Internal\Message { /** - * Required. The language (and potentially also the region) of the voice expressed as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. - * "en-US". This should not include a script tag (e.g. use + * Required. The language (and potentially also the region) of the voice + * expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag, e.g. "en-US". This should not include a script tag (e.g. use * "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred * from the input provided in the SynthesisInput. The TTS service * will use this parameter to help choose an appropriate voice. Note that @@ -64,9 +64,9 @@ class VoiceSelectionParams extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $language_code - * Required. The language (and potentially also the region) of the voice expressed as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. - * "en-US". This should not include a script tag (e.g. use + * Required. The language (and potentially also the region) of the voice + * expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag, e.g. "en-US". This should not include a script tag (e.g. use * "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred * from the input provided in the SynthesisInput. The TTS service * will use this parameter to help choose an appropriate voice. Note that @@ -96,9 +96,9 @@ public function __construct($data = NULL) { } /** - * Required. The language (and potentially also the region) of the voice expressed as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. - * "en-US". This should not include a script tag (e.g. use + * Required. The language (and potentially also the region) of the voice + * expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag, e.g. "en-US". This should not include a script tag (e.g. use * "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred * from the input provided in the SynthesisInput. The TTS service * will use this parameter to help choose an appropriate voice. Note that @@ -117,9 +117,9 @@ public function getLanguageCode() } /** - * Required. The language (and potentially also the region) of the voice expressed as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. - * "en-US". This should not include a script tag (e.g. use + * Required. The language (and potentially also the region) of the voice + * expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag, e.g. "en-US". This should not include a script tag (e.g. use * "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred * from the input provided in the SynthesisInput. The TTS service * will use this parameter to help choose an appropriate voice. Note that diff --git a/TextToSpeech/src/V1/gapic_metadata.json b/TextToSpeech/src/V1/gapic_metadata.json index b54cabd9089f..a81769c36b81 100644 --- a/TextToSpeech/src/V1/gapic_metadata.json +++ b/TextToSpeech/src/V1/gapic_metadata.json @@ -23,6 +23,20 @@ } } } + }, + "TextToSpeechLongAudioSynthesize": { + "clients": { + "grpc": { + "libraryClient": "TextToSpeechLongAudioSynthesizeGapicClient", + "rpcs": { + "SynthesizeLongAudio": { + "methods": [ + "synthesizeLongAudio" + ] + } + } + } + } } } } \ No newline at end of file diff --git a/TextToSpeech/src/V1/resources/text_to_speech_client_config.json b/TextToSpeech/src/V1/resources/text_to_speech_client_config.json index b06f59136930..819663a1f52c 100644 --- a/TextToSpeech/src/V1/resources/text_to_speech_client_config.json +++ b/TextToSpeech/src/V1/resources/text_to_speech_client_config.json @@ -6,7 +6,8 @@ "retry_policy_1_codes": [ "UNAVAILABLE", "DEADLINE_EXCEEDED" - ] + ], + "no_retry_1_codes": [] }, "retry_params": { "no_retry_params": { @@ -26,6 +27,15 @@ "rpc_timeout_multiplier": 1.0, "max_rpc_timeout_millis": 300000, "total_timeout_millis": 300000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 5000000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 5000000, + "total_timeout_millis": 5000000 } }, "methods": { diff --git a/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_client_config.json b/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_client_config.json new file mode 100644 index 000000000000..1f2cda4e7cf5 --- /dev/null +++ b/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 5000000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 5000000, + "total_timeout_millis": 5000000 + } + }, + "methods": { + "SynthesizeLongAudio": { + "timeout_millis": 5000000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php b/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php new file mode 100644 index 000000000000..9b9262bbc125 --- /dev/null +++ b/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php @@ -0,0 +1,18 @@ + [ + 'google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize' => [ + 'SynthesizeLongAudio' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\TextToSpeech\V1\SynthesizeLongAudioResponse', + 'metadataReturnType' => '\Google\Cloud\TextToSpeech\V1\SynthesizeLongAudioMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + ], + ], +]; diff --git a/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php b/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php new file mode 100644 index 000000000000..d8108479e29a --- /dev/null +++ b/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php @@ -0,0 +1,20 @@ + [ + 'google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize' => [ + 'SynthesizeLongAudio' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/voices/*}:SynthesizeLongAudio', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], +]; diff --git a/TextToSpeech/tests/Unit/V1/TextToSpeechLongAudioSynthesizeClientTest.php b/TextToSpeech/tests/Unit/V1/TextToSpeechLongAudioSynthesizeClientTest.php new file mode 100644 index 000000000000..c691205c1191 --- /dev/null +++ b/TextToSpeech/tests/Unit/V1/TextToSpeechLongAudioSynthesizeClientTest.php @@ -0,0 +1,193 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TextToSpeechLongAudioSynthesizeClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TextToSpeechLongAudioSynthesizeClient($options); + } + + /** @test */ + public function synthesizeLongAudioTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/synthesizeLongAudioTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new SynthesizeLongAudioResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/synthesizeLongAudioTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $input = new SynthesisInput(); + $audioConfig = new AudioConfig(); + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + $audioConfig->setAudioEncoding($audioConfigAudioEncoding); + $response = $gapicClient->synthesizeLongAudio($input, $audioConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize/SynthesizeLongAudio', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInput(); + $this->assertProtobufEquals($input, $actualValue); + $actualValue = $actualApiRequestObject->getAudioConfig(); + $this->assertProtobufEquals($audioConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/synthesizeLongAudioTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function synthesizeLongAudioExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/synthesizeLongAudioTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $input = new SynthesisInput(); + $audioConfig = new AudioConfig(); + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + $audioConfig->setAudioEncoding($audioConfigAudioEncoding); + $response = $gapicClient->synthesizeLongAudio($input, $audioConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/synthesizeLongAudioTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} From 31996f1cc2cb7440898530209224dab5a8a59fd9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 16:35:07 -0800 Subject: [PATCH 4/9] feat: [Compute] introduce network attachments client (#757) (#5679) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Update Compute Engine API to revision 20221126 (#757) Source-Link: https://github.com/googleapis/googleapis/commit/385f34abf42e2ef1dced8eec4c032d1045706f4c Source-Link: https://github.com/googleapis/googleapis-gen/commit/9dcab2c5544013a6010c3b1a8af84c44b4729f37 Copy-Tag: eyJwIjoiQ29tcHV0ZS8uT3dsQm90LnlhbWwiLCJoIjoiOWRjYWIyYzU1NDQwMTNhNjAxMGMzYjFhOGFmODRjNDRiNDcyOWYzNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 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 --- Compute/metadata/V1/Compute.php | Bin 564236 -> 572020 bytes .../samples/V1/InterconnectsClient/delete.php | 2 +- .../samples/V1/InterconnectsClient/get.php | 2 +- .../InterconnectsClient/get_diagnostics.php | 2 +- .../samples/V1/InterconnectsClient/insert.php | 2 +- .../samples/V1/InterconnectsClient/list.php | 2 +- .../samples/V1/InterconnectsClient/patch.php | 2 +- .../aggregated_list.php | 68 ++ .../V1/NetworkAttachmentsClient/delete.php | 78 ++ .../V1/NetworkAttachmentsClient/get.php | 69 ++ .../get_iam_policy.php | 69 ++ .../V1/NetworkAttachmentsClient/insert.php | 80 ++ .../V1/NetworkAttachmentsClient/list.php | 70 ++ .../set_iam_policy.php | 78 ++ .../test_iam_permissions.php | 78 ++ ...ggregatedListNetworkAttachmentsRequest.php | 331 ++++++++ Compute/src/V1/Backend.php | 8 +- .../src/V1/DeleteNetworkAttachmentRequest.php | 179 ++++ .../BundleAggregationType.php | 40 + .../BundleOperationalStatus.php | 40 + .../OperationalStatus.php | 40 + .../ConnectionPreference.php | 41 + .../Status.php | 46 ++ Compute/src/V1/Enums/Project/VmDnsSetting.php | 42 + Compute/src/V1/Enums/Quota/Metric.php | 16 + Compute/src/V1/ErrorInfo.php | 8 +- Compute/src/V1/FirewallPolicy.php | 8 +- Compute/src/V1/ForwardingRule.php | 24 +- Compute/src/V1/Gapic/InstancesGapicClient.php | 12 + .../src/V1/Gapic/InterconnectsGapicClient.php | 12 +- .../Gapic/NetworkAttachmentsGapicClient.php | 774 ++++++++++++++++++ .../GetIamPolicyNetworkAttachmentRequest.php | 179 ++++ .../src/V1/GetNetworkAttachmentRequest.php | 135 +++ Compute/src/V1/HealthCheckService.php | 24 +- .../HealthStatusAggregationPolicy.php | 2 +- .../src/V1/InsertNetworkAttachmentRequest.php | 189 +++++ Compute/src/V1/InterconnectDiagnostics.php | 96 +++ .../BundleAggregationType.php | 62 ++ .../BundleOperationalStatus.php | 62 ++ .../V1/InterconnectDiagnosticsLinkStatus.php | 48 ++ .../OperationalStatus.php | 62 ++ .../src/V1/ListNetworkAttachmentsRequest.php | 321 ++++++++ Compute/src/V1/NetworkAttachment.php | 657 +++++++++++++++ .../ConnectionPreference.php | 62 ++ .../V1/NetworkAttachmentAggregatedList.php | 280 +++++++ .../V1/NetworkAttachmentConnectedEndpoint.php | 247 ++++++ .../Status.php | 88 ++ Compute/src/V1/NetworkAttachmentList.php | 279 +++++++ Compute/src/V1/NetworkAttachmentsClient.php | 34 + .../src/V1/NetworkAttachmentsScopedList.php | 110 +++ .../V1/NotificationEndpointGrpcSettings.php | 8 +- Compute/src/V1/Project.php | 48 ++ Compute/src/V1/Project/VmDnsSetting.php | 68 ++ Compute/src/V1/Quota/Metric.php | 40 + Compute/src/V1/Reservation.php | 34 + Compute/src/V1/ResourceCommitment.php | 8 +- Compute/src/V1/ResourceCommitment/Type.php | 2 +- .../ServiceAttachmentConsumerProjectLimit.php | 44 + .../SetIamPolicyNetworkAttachmentRequest.php | 179 ++++ Compute/src/V1/StopInstanceRequest.php | 44 + Compute/src/V1/SuspendInstanceRequest.php | 44 + ...IamPermissionsNetworkAttachmentRequest.php | 179 ++++ Compute/src/V1/gapic_metadata.json | 49 ++ .../network_attachments_client_config.json | 85 ++ .../network_attachments_descriptor_config.php | 60 ++ ...network_attachments_rest_client_config.php | 240 ++++++ .../Unit/V1/NetworkAttachmentsClientTest.php | 769 +++++++++++++++++ Compute/tests/Unit/V1/ProjectsClientTest.php | 4 + 68 files changed, 7007 insertions(+), 58 deletions(-) create mode 100644 Compute/samples/V1/NetworkAttachmentsClient/aggregated_list.php create mode 100644 Compute/samples/V1/NetworkAttachmentsClient/delete.php create mode 100644 Compute/samples/V1/NetworkAttachmentsClient/get.php create mode 100644 Compute/samples/V1/NetworkAttachmentsClient/get_iam_policy.php create mode 100644 Compute/samples/V1/NetworkAttachmentsClient/insert.php create mode 100644 Compute/samples/V1/NetworkAttachmentsClient/list.php create mode 100644 Compute/samples/V1/NetworkAttachmentsClient/set_iam_policy.php create mode 100644 Compute/samples/V1/NetworkAttachmentsClient/test_iam_permissions.php create mode 100644 Compute/src/V1/AggregatedListNetworkAttachmentsRequest.php create mode 100644 Compute/src/V1/DeleteNetworkAttachmentRequest.php create mode 100644 Compute/src/V1/Enums/InterconnectDiagnostics/BundleAggregationType.php create mode 100644 Compute/src/V1/Enums/InterconnectDiagnostics/BundleOperationalStatus.php create mode 100644 Compute/src/V1/Enums/InterconnectDiagnosticsLinkStatus/OperationalStatus.php create mode 100644 Compute/src/V1/Enums/NetworkAttachment/ConnectionPreference.php create mode 100644 Compute/src/V1/Enums/NetworkAttachmentConnectedEndpoint/Status.php create mode 100644 Compute/src/V1/Enums/Project/VmDnsSetting.php create mode 100644 Compute/src/V1/Gapic/NetworkAttachmentsGapicClient.php create mode 100644 Compute/src/V1/GetIamPolicyNetworkAttachmentRequest.php create mode 100644 Compute/src/V1/GetNetworkAttachmentRequest.php create mode 100644 Compute/src/V1/InsertNetworkAttachmentRequest.php create mode 100644 Compute/src/V1/InterconnectDiagnostics/BundleAggregationType.php create mode 100644 Compute/src/V1/InterconnectDiagnostics/BundleOperationalStatus.php create mode 100644 Compute/src/V1/InterconnectDiagnosticsLinkStatus/OperationalStatus.php create mode 100644 Compute/src/V1/ListNetworkAttachmentsRequest.php create mode 100644 Compute/src/V1/NetworkAttachment.php create mode 100644 Compute/src/V1/NetworkAttachment/ConnectionPreference.php create mode 100644 Compute/src/V1/NetworkAttachmentAggregatedList.php create mode 100644 Compute/src/V1/NetworkAttachmentConnectedEndpoint.php create mode 100644 Compute/src/V1/NetworkAttachmentConnectedEndpoint/Status.php create mode 100644 Compute/src/V1/NetworkAttachmentList.php create mode 100644 Compute/src/V1/NetworkAttachmentsClient.php create mode 100644 Compute/src/V1/NetworkAttachmentsScopedList.php create mode 100644 Compute/src/V1/Project/VmDnsSetting.php create mode 100644 Compute/src/V1/SetIamPolicyNetworkAttachmentRequest.php create mode 100644 Compute/src/V1/TestIamPermissionsNetworkAttachmentRequest.php create mode 100644 Compute/src/V1/resources/network_attachments_client_config.json create mode 100644 Compute/src/V1/resources/network_attachments_descriptor_config.php create mode 100644 Compute/src/V1/resources/network_attachments_rest_client_config.php create mode 100644 Compute/tests/Unit/V1/NetworkAttachmentsClientTest.php diff --git a/Compute/metadata/V1/Compute.php b/Compute/metadata/V1/Compute.php index 04b3df3c2db0dcba80c2f5d56239d269de9b166f..7cdba9008cfaafa43e28d5e28b1974c6bad0e34f 100644 GIT binary patch delta 2980 zcmb_ee^8V68SnRf-y|>JD1?^~-h>z+h(HSnWvx>?X+k3AhzasTVC(KBCa*La68649 z=Ijl{VI8*}bf}Nj8~&c%Tx%z-ucwu{cI#bl-MPD2Q8%5v%~4me?Ty>)oON%00X1^% z?e^cBJik7l=Y5{f`~2XPd2-VH>c0r$^$$lrCGIX8`ekc|%EgDfL&EwIOH~~jnY8@l zHK3Hw7qF1)dmXLr1F;ylVlMJX#D*^UrXjP-HPP$w@${X79q412;|BKs$} z{&>_C$*wTgM?Bj@$WP{egfp$t{FdqTjdFIT0OvKiZ1&|2m)*u$`KmRSckg7)0|;lu(72~5 zG(;IN&lKYPBtY&udwmp+#TiZ1)F4AzFjXzt%-P({E=}JnuU%?GGq69zv8hfoy7g11 z)qq)UmN#HEVnf1~+;gdV8zB(XfD-3Hu#d=s-)|@W35UCh97MvK-zU}~3QGHlpi&We z5k2tjO~jKc=3}GN;i}~x0w{|7-d}&R4au`_n9WOuee&eQ3ozVIRHkL(3~mN6>79Op zx1`ClHqYr76H_~6sVX@-_$Gm*vUiDM;qjwNoSw89%r~*t8wv(_Z*>0npszFJ4~9kd z>cP>y;CTt<#wL2#UdjggP2_x7ID$-2a2m1j+!Znl1}jks++3#6FU!T5okGah<>dv= z2l>NPK$C`54%cdn(_zz$-JSRkf>Xnk6>=6TiXpd!oCDp56ndbaCUxpFB+iMG zh2#6E<`|2d%|!Q5oq7q3?WgRqzm{wvS{Cdiu{o(V)v>nlK6|_=aPDVv`hjhP0#Xi9 z`33Tvu_7;b&*u>~a{f-v>-Pzq;0d<#BD>?n$BQDQ;Xs(wA_C5RgEFef$VBWwuxdS( z1Nwv1hSa%O9f|b#d;%|uU^ztT%B?9_72j`b#4dKNiHnVSgut0eK;c(!pe*>_A*v)s z>FyR{Onm}jW1<1Kw-UPSTAUHjGDBBIcHgy&cffKz@t!|9Ox07rCb41HHKjr7T1Fn& zL5!qG>>tPvkbI-FYLbX(>_v>!gjL2>GE+5w-hQT=YzuV<()r_Bh>yGsHdt@PE(s3I1 zc@omCi{woW@pChbjgxDMy?IjA2jp(5d?7B1qq4U&+Up}lR$5$^nuu&#s%z~on@pj8 zwWHeJpn3o0H(YS>7Fk(Qfr}rEs;hUmv~o^sa@bEVPmF?Uf}Fo}x|qZDMa7N}zVaPr zF|LT$fu7r>L6-#S!nFf?ko4#Tc|+;1z>muME~~rD;fu*!z12%FPvFwz5SP8N*@(J; z3s@?sd7yX#8Q}f`O06ra=fzN$;N|N=0l(MJi}qkx*a!oK$S4u{R3XYREW()&I1T-x zyAW0tki0Z7pDOz<`VEX8q-yoqSe;m#E+N2P8~EFr*!LC`vIZ1KKDO2joX*V<(SX0h zAGW6AIoym$NnUL+1DeiK(}&COk5M(0pP@EOubreWdC>*Cgu3QWYBS4)M;t^mrb%)OIJ_PnPBNkU^C+opf!{BL+70Yw)+Xg zOl(U&cOSyKl}dH0eC5eEUP%I{d^oz{BZW!@W4c5a)LHb3C`6bztDFbNS$Yxd|4gnV zLkPwU#&b#owB1!;cri!ifvVfeEci@MmrS9pFwi|QSII!%d;Z8(rF7(~s(tjo^o{p? delta 364 zcmV-y0h9jp^dgM7BCz)Y0@ALt`2zbsvtC2m*kHEW&s12OOOI? z0|bZxmpzdJGq;D40$oA3AJhUVasj$@V z;{)pfmw)909{~!NpXCFkx7p?cB>}e)=mY2w0+An=`}hN90)QU3WBCJ^1eYxS12UJ9 z{sSVnAO8d72A6FH1S+@q1_S{v0<#8}`!ocrmo*Lr8@C%a1SbKPK`jGjx8XMgE`9-+ zmk_oDOP6#@10xke6ABSuV{dM5Wn*+{Z*E^~X>DnAx4^apa}&1>%LLeC2$}&36H|0= zaF=oX1ZkJRwgW7;ye|b$4*{K*3_k@Lmmuf_8k0TrYq#Y;1zJ0Y9()D29()EfcZUu9 K2Dc6T2WP%S(}{in diff --git a/Compute/samples/V1/InterconnectsClient/delete.php b/Compute/samples/V1/InterconnectsClient/delete.php index 2d1cf9e9e4a4..23e6cf75cb10 100644 --- a/Compute/samples/V1/InterconnectsClient/delete.php +++ b/Compute/samples/V1/InterconnectsClient/delete.php @@ -29,7 +29,7 @@ use Google\Rpc\Status; /** - * Deletes the specified interconnect. + * Deletes the specified Interconnect. * * @param string $interconnect Name of the interconnect to delete. * @param string $project Project ID for this request. diff --git a/Compute/samples/V1/InterconnectsClient/get.php b/Compute/samples/V1/InterconnectsClient/get.php index 3ee87ad7b4fa..e84cd5f538e0 100644 --- a/Compute/samples/V1/InterconnectsClient/get.php +++ b/Compute/samples/V1/InterconnectsClient/get.php @@ -28,7 +28,7 @@ use Google\Cloud\Compute\V1\InterconnectsClient; /** - * Returns the specified interconnect. Get a list of available interconnects by making a list() request. + * Returns the specified Interconnect. Get a list of available Interconnects by making a list() request. * * @param string $interconnect Name of the interconnect to return. * @param string $project Project ID for this request. diff --git a/Compute/samples/V1/InterconnectsClient/get_diagnostics.php b/Compute/samples/V1/InterconnectsClient/get_diagnostics.php index 724f8ccac34d..e917b74cc887 100644 --- a/Compute/samples/V1/InterconnectsClient/get_diagnostics.php +++ b/Compute/samples/V1/InterconnectsClient/get_diagnostics.php @@ -28,7 +28,7 @@ use Google\Cloud\Compute\V1\InterconnectsGetDiagnosticsResponse; /** - * Returns the interconnectDiagnostics for the specified interconnect. + * Returns the interconnectDiagnostics for the specified Interconnect. * * @param string $interconnect Name of the interconnect resource to query. * @param string $project Project ID for this request. diff --git a/Compute/samples/V1/InterconnectsClient/insert.php b/Compute/samples/V1/InterconnectsClient/insert.php index ab93f882a268..6dcf68d04b98 100644 --- a/Compute/samples/V1/InterconnectsClient/insert.php +++ b/Compute/samples/V1/InterconnectsClient/insert.php @@ -30,7 +30,7 @@ use Google\Rpc\Status; /** - * Creates a Interconnect in the specified project using the data included in the request. + * Creates an Interconnect in the specified project using the data included in the request. * * @param string $project Project ID for this request. */ diff --git a/Compute/samples/V1/InterconnectsClient/list.php b/Compute/samples/V1/InterconnectsClient/list.php index 7ca5d8d1e341..60803f79d106 100644 --- a/Compute/samples/V1/InterconnectsClient/list.php +++ b/Compute/samples/V1/InterconnectsClient/list.php @@ -28,7 +28,7 @@ use Google\Cloud\Compute\V1\InterconnectsClient; /** - * Retrieves the list of interconnect available to the specified project. + * Retrieves the list of Interconnects available to the specified project. * * @param string $project Project ID for this request. */ diff --git a/Compute/samples/V1/InterconnectsClient/patch.php b/Compute/samples/V1/InterconnectsClient/patch.php index 1ddeeb0428eb..8f154bbd0a04 100644 --- a/Compute/samples/V1/InterconnectsClient/patch.php +++ b/Compute/samples/V1/InterconnectsClient/patch.php @@ -30,7 +30,7 @@ use Google\Rpc\Status; /** - * Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * Updates the specified Interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. * * @param string $interconnect Name of the interconnect to update. * @param string $project Project ID for this request. diff --git a/Compute/samples/V1/NetworkAttachmentsClient/aggregated_list.php b/Compute/samples/V1/NetworkAttachmentsClient/aggregated_list.php new file mode 100644 index 000000000000..da9cfb0d57e3 --- /dev/null +++ b/Compute/samples/V1/NetworkAttachmentsClient/aggregated_list.php @@ -0,0 +1,68 @@ +aggregatedList($project); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + + aggregated_list_sample($project); +} +// [END compute_v1_generated_NetworkAttachments_AggregatedList_sync] diff --git a/Compute/samples/V1/NetworkAttachmentsClient/delete.php b/Compute/samples/V1/NetworkAttachmentsClient/delete.php new file mode 100644 index 000000000000..7fcfaee16fc3 --- /dev/null +++ b/Compute/samples/V1/NetworkAttachmentsClient/delete.php @@ -0,0 +1,78 @@ +delete($networkAttachment, $project, $region); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $networkAttachment = '[NETWORK_ATTACHMENT]'; + $project = '[PROJECT]'; + $region = '[REGION]'; + + delete_sample($networkAttachment, $project, $region); +} +// [END compute_v1_generated_NetworkAttachments_Delete_sync] diff --git a/Compute/samples/V1/NetworkAttachmentsClient/get.php b/Compute/samples/V1/NetworkAttachmentsClient/get.php new file mode 100644 index 000000000000..03e108f5ff0c --- /dev/null +++ b/Compute/samples/V1/NetworkAttachmentsClient/get.php @@ -0,0 +1,69 @@ +get($networkAttachment, $project, $region); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $networkAttachment = '[NETWORK_ATTACHMENT]'; + $project = '[PROJECT]'; + $region = '[REGION]'; + + get_sample($networkAttachment, $project, $region); +} +// [END compute_v1_generated_NetworkAttachments_Get_sync] diff --git a/Compute/samples/V1/NetworkAttachmentsClient/get_iam_policy.php b/Compute/samples/V1/NetworkAttachmentsClient/get_iam_policy.php new file mode 100644 index 000000000000..61c1acf625d6 --- /dev/null +++ b/Compute/samples/V1/NetworkAttachmentsClient/get_iam_policy.php @@ -0,0 +1,69 @@ +getIamPolicy($project, $region, $resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $region = '[REGION]'; + $resource = '[RESOURCE]'; + + get_iam_policy_sample($project, $region, $resource); +} +// [END compute_v1_generated_NetworkAttachments_GetIamPolicy_sync] diff --git a/Compute/samples/V1/NetworkAttachmentsClient/insert.php b/Compute/samples/V1/NetworkAttachmentsClient/insert.php new file mode 100644 index 000000000000..2654052d7b24 --- /dev/null +++ b/Compute/samples/V1/NetworkAttachmentsClient/insert.php @@ -0,0 +1,80 @@ +insert($networkAttachmentResource, $project, $region); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $region = '[REGION]'; + + insert_sample($project, $region); +} +// [END compute_v1_generated_NetworkAttachments_Insert_sync] diff --git a/Compute/samples/V1/NetworkAttachmentsClient/list.php b/Compute/samples/V1/NetworkAttachmentsClient/list.php new file mode 100644 index 000000000000..87aa457ba419 --- /dev/null +++ b/Compute/samples/V1/NetworkAttachmentsClient/list.php @@ -0,0 +1,70 @@ +list($project, $region); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $region = '[REGION]'; + + list_sample($project, $region); +} +// [END compute_v1_generated_NetworkAttachments_List_sync] diff --git a/Compute/samples/V1/NetworkAttachmentsClient/set_iam_policy.php b/Compute/samples/V1/NetworkAttachmentsClient/set_iam_policy.php new file mode 100644 index 000000000000..bbf7cc01084e --- /dev/null +++ b/Compute/samples/V1/NetworkAttachmentsClient/set_iam_policy.php @@ -0,0 +1,78 @@ +setIamPolicy( + $project, + $region, + $regionSetPolicyRequestResource, + $resource + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $region = '[REGION]'; + $resource = '[RESOURCE]'; + + set_iam_policy_sample($project, $region, $resource); +} +// [END compute_v1_generated_NetworkAttachments_SetIamPolicy_sync] diff --git a/Compute/samples/V1/NetworkAttachmentsClient/test_iam_permissions.php b/Compute/samples/V1/NetworkAttachmentsClient/test_iam_permissions.php new file mode 100644 index 000000000000..49d8ac1c09ca --- /dev/null +++ b/Compute/samples/V1/NetworkAttachmentsClient/test_iam_permissions.php @@ -0,0 +1,78 @@ +testIamPermissions( + $project, + $region, + $resource, + $testPermissionsRequestResource + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $region = '[REGION]'; + $resource = '[RESOURCE]'; + + test_iam_permissions_sample($project, $region, $resource); +} +// [END compute_v1_generated_NetworkAttachments_TestIamPermissions_sync] diff --git a/Compute/src/V1/AggregatedListNetworkAttachmentsRequest.php b/Compute/src/V1/AggregatedListNetworkAttachmentsRequest.php new file mode 100644 index 000000000000..03bb5248444f --- /dev/null +++ b/Compute/src/V1/AggregatedListNetworkAttachmentsRequest.php @@ -0,0 +1,331 @@ +google.cloud.compute.v1.AggregatedListNetworkAttachmentsRequest + */ +class AggregatedListNetworkAttachmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + * + * Generated from protobuf field optional string filter = 336120696; + */ + private $filter = null; + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * + * Generated from protobuf field optional bool include_all_scopes = 391327988; + */ + private $include_all_scopes = null; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + */ + private $max_results = null; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + */ + private $order_by = null; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + */ + private $page_token = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + */ + private $return_partial_success = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + * @type bool $include_all_scopes + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * @type int $max_results + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $order_by + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $page_token + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * @type string $project + * Project ID for this request. + * @type bool $return_partial_success + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + * + * Generated from protobuf field optional string filter = 336120696; + * @return string + */ + public function getFilter() + { + return isset($this->filter) ? $this->filter : ''; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + * + * Generated from protobuf field optional string filter = 336120696; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * + * Generated from protobuf field optional bool include_all_scopes = 391327988; + * @return bool + */ + public function getIncludeAllScopes() + { + return isset($this->include_all_scopes) ? $this->include_all_scopes : false; + } + + public function hasIncludeAllScopes() + { + return isset($this->include_all_scopes); + } + + public function clearIncludeAllScopes() + { + unset($this->include_all_scopes); + } + + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * + * Generated from protobuf field optional bool include_all_scopes = 391327988; + * @param bool $var + * @return $this + */ + public function setIncludeAllScopes($var) + { + GPBUtil::checkBool($var); + $this->include_all_scopes = $var; + + return $this; + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @return int + */ + public function getMaxResults() + { + return isset($this->max_results) ? $this->max_results : 0; + } + + public function hasMaxResults() + { + return isset($this->max_results); + } + + public function clearMaxResults() + { + unset($this->max_results); + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @return string + */ + public function getOrderBy() + { + return isset($this->order_by) ? $this->order_by : ''; + } + + public function hasOrderBy() + { + return isset($this->order_by); + } + + public function clearOrderBy() + { + unset($this->order_by); + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @return string + */ + public function getPageToken() + { + return isset($this->page_token) ? $this->page_token : ''; + } + + public function hasPageToken() + { + return isset($this->page_token); + } + + public function clearPageToken() + { + unset($this->page_token); + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @return bool + */ + public function getReturnPartialSuccess() + { + return isset($this->return_partial_success) ? $this->return_partial_success : false; + } + + public function hasReturnPartialSuccess() + { + return isset($this->return_partial_success); + } + + public function clearReturnPartialSuccess() + { + unset($this->return_partial_success); + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/Backend.php b/Compute/src/V1/Backend.php index 9daa68e1918e..5ac45523174f 100644 --- a/Compute/src/V1/Backend.php +++ b/Compute/src/V1/Backend.php @@ -23,7 +23,7 @@ class Backend extends \Google\Protobuf\Internal\Message */ private $balancing_mode = null; /** - * A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service. + * A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service. Not available with backends that don't support using a balancingMode. This includes backends such as global internet NEGs, regional serverless NEGs, and PSC NEGs. * * Generated from protobuf field optional float capacity_scaler = 315958157; */ @@ -99,7 +99,7 @@ class Backend extends \Google\Protobuf\Internal\Message * Specifies how to determine whether the backend of a load balancer can handle additional traffic or is fully loaded. For usage guidelines, see Connection balancing mode. Backends must use compatible balancing modes. For more information, see Supported balancing modes and target capacity settings and Restrictions and guidance for instance groups. Note: Currently, if you use the API to configure incompatible balancing modes, the configuration might be accepted even though it has no impact and is ignored. Specifically, Backend.maxUtilization is ignored when Backend.balancingMode is RATE. In the future, this incompatible combination will be rejected. * Check the BalancingMode enum for the list of possible values. * @type float $capacity_scaler - * A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service. + * A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service. Not available with backends that don't support using a balancingMode. This includes backends such as global internet NEGs, regional serverless NEGs, and PSC NEGs. * @type string $description * An optional description of this resource. Provide this property when you create the resource. * @type bool $failover @@ -166,7 +166,7 @@ public function setBalancingMode($var) } /** - * A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service. + * A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service. Not available with backends that don't support using a balancingMode. This includes backends such as global internet NEGs, regional serverless NEGs, and PSC NEGs. * * Generated from protobuf field optional float capacity_scaler = 315958157; * @return float @@ -187,7 +187,7 @@ public function clearCapacityScaler() } /** - * A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service. + * A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service. Not available with backends that don't support using a balancingMode. This includes backends such as global internet NEGs, regional serverless NEGs, and PSC NEGs. * * Generated from protobuf field optional float capacity_scaler = 315958157; * @param float $var diff --git a/Compute/src/V1/DeleteNetworkAttachmentRequest.php b/Compute/src/V1/DeleteNetworkAttachmentRequest.php new file mode 100644 index 000000000000..7759a1f44113 --- /dev/null +++ b/Compute/src/V1/DeleteNetworkAttachmentRequest.php @@ -0,0 +1,179 @@ +google.cloud.compute.v1.DeleteNetworkAttachmentRequest + */ +class DeleteNetworkAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the NetworkAttachment resource to delete. + * + * Generated from protobuf field string network_attachment = 224644052 [(.google.api.field_behavior) = REQUIRED]; + */ + private $network_attachment = ''; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + */ + private $project = ''; + /** + * Name of the region of this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "region"]; + */ + private $region = ''; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + * + * Generated from protobuf field optional string request_id = 37109963; + */ + private $request_id = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_attachment + * Name of the NetworkAttachment resource to delete. + * @type string $project + * Project ID for this request. + * @type string $region + * Name of the region of this request. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Name of the NetworkAttachment resource to delete. + * + * Generated from protobuf field string network_attachment = 224644052 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetworkAttachment() + { + return $this->network_attachment; + } + + /** + * Name of the NetworkAttachment resource to delete. + * + * Generated from protobuf field string network_attachment = 224644052 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetworkAttachment($var) + { + GPBUtil::checkString($var, True); + $this->network_attachment = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Name of the region of this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "region"]; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Name of the region of this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "region"]; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + * + * Generated from protobuf field optional string request_id = 37109963; + * @return string + */ + public function getRequestId() + { + return isset($this->request_id) ? $this->request_id : ''; + } + + public function hasRequestId() + { + return isset($this->request_id); + } + + public function clearRequestId() + { + unset($this->request_id); + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + * + * Generated from protobuf field optional string request_id = 37109963; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/Enums/InterconnectDiagnostics/BundleAggregationType.php b/Compute/src/V1/Enums/InterconnectDiagnostics/BundleAggregationType.php new file mode 100644 index 000000000000..23b9b33ad233 --- /dev/null +++ b/Compute/src/V1/Enums/InterconnectDiagnostics/BundleAggregationType.php @@ -0,0 +1,40 @@ +optional string reason = 138777156; */ @@ -45,7 +45,7 @@ class ErrorInfo extends \Google\Protobuf\Internal\Message * @type array|\Google\Protobuf\Internal\MapField $metadatas * Additional structured details about this error. Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request. * @type string $reason - * The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match /[A-Z0-9_]+/. + * The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE. * } */ public function __construct($data = NULL) { @@ -116,7 +116,7 @@ public function setMetadatas($var) } /** - * The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match /[A-Z0-9_]+/. + * The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE. * * Generated from protobuf field optional string reason = 138777156; * @return string @@ -137,7 +137,7 @@ public function clearReason() } /** - * The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match /[A-Z0-9_]+/. + * The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE. * * Generated from protobuf field optional string reason = 138777156; * @param string $var diff --git a/Compute/src/V1/FirewallPolicy.php b/Compute/src/V1/FirewallPolicy.php index 015da838c0b7..2bd7e3e14e05 100644 --- a/Compute/src/V1/FirewallPolicy.php +++ b/Compute/src/V1/FirewallPolicy.php @@ -58,7 +58,7 @@ class FirewallPolicy extends \Google\Protobuf\Internal\Message */ private $kind = null; /** - * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by GCP which uniquely identifies the Organization Firewall Policy. + * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. * * Generated from protobuf field optional string name = 3373707; */ @@ -127,7 +127,7 @@ class FirewallPolicy extends \Google\Protobuf\Internal\Message * @type string $kind * [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies * @type string $name - * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by GCP which uniquely identifies the Organization Firewall Policy. + * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. * @type string $parent * [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies. * @type string $region @@ -392,7 +392,7 @@ public function setKind($var) } /** - * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by GCP which uniquely identifies the Organization Firewall Policy. + * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. * * Generated from protobuf field optional string name = 3373707; * @return string @@ -413,7 +413,7 @@ public function clearName() } /** - * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by GCP which uniquely identifies the Organization Firewall Policy. + * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. * * Generated from protobuf field optional string name = 3373707; * @param string $var diff --git a/Compute/src/V1/ForwardingRule.php b/Compute/src/V1/ForwardingRule.php index 1e8fd84d047e..252455eb15d2 100644 --- a/Compute/src/V1/ForwardingRule.php +++ b/Compute/src/V1/ForwardingRule.php @@ -29,7 +29,7 @@ class ForwardingRule extends \Google\Protobuf\Internal\Message */ private $I_p_protocol = null; /** - * This field is used along with the backend_service field for Internal TCP/UDP Load Balancing or Network Load Balancing, or with the target field for internal and external TargetInstance. You can only use one of ports and port_range, or allPorts. The three are mutually exclusive. For TCP, UDP and SCTP traffic, packets addressed to any ports will be forwarded to the target or backendService. + * This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By internal TCP/UDP load balancers, backend service-based network load balancers, and internal and external protocol forwarding. Set this field to true to allow packets addressed to any port or packets lacking destination port information (for example, UDP fragments after the first fragment) to be forwarded to the backends configured with this forwarding rule. The ports, port_range, and allPorts fields are mutually exclusive. * * Generated from protobuf field optional bool all_ports = 445175796; */ @@ -140,13 +140,13 @@ class ForwardingRule extends \Google\Protobuf\Internal\Message */ private $no_automate_dns_zone = null; /** - * This field can be used only if: - Load balancing scheme is one of EXTERNAL, INTERNAL_SELF_MANAGED or INTERNAL_MANAGED - IPProtocol is one of TCP, UDP, or SCTP. Packets addressed to ports in the specified range will be forwarded to target or backend_service. You can only use one of ports, port_range, or allPorts. The three are mutually exclusive. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint ports. Some types of forwarding target have constraints on the acceptable ports. For more information, see [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#port_specifications). @pattern: \\d+(?:-\\d+)? + * This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By backend service-based network load balancers, target pool-based network load balancers, internal proxy load balancers, external proxy load balancers, Traffic Director, external protocol forwarding, and Classic VPN. Some products have restrictions on what ports can be used. See port specifications for details. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this forwarding rule. The ports, port_range, and allPorts fields are mutually exclusive. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. @pattern: \\d+(?:-\\d+)? * * Generated from protobuf field optional string port_range = 217518079; */ private $port_range = null; /** - * The ports field is only supported when the forwarding rule references a backend_service directly. Only packets addressed to the [specified list of ports]((https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#port_specifications)) are forwarded to backends. You can only use one of ports and port_range, or allPorts. The three are mutually exclusive. You can specify a list of up to five ports, which can be non-contiguous. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint ports. @pattern: \\d+(?:-\\d+)? + * This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By internal TCP/UDP load balancers, backend service-based network load balancers, and internal protocol forwarding. You can specify a list of up to five ports by number, separated by commas. The ports can be contiguous or discontiguous. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot share any values defined in ports. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot share any values defined in ports. The ports, port_range, and allPorts fields are mutually exclusive. @pattern: \\d+(?:-\\d+)? * * Generated from protobuf field repeated string ports = 106854418; */ @@ -219,7 +219,7 @@ class ForwardingRule extends \Google\Protobuf\Internal\Message * The IP protocol to which this rule applies. For protocol forwarding, valid options are TCP, UDP, ESP, AH, SCTP, ICMP and L3_DEFAULT. The valid IP protocols are different for different load balancing products as described in [Load balancing features](https://cloud.google.com/load-balancing/docs/features#protocols_from_the_load_balancer_to_the_backends). * Check the IPProtocolEnum enum for the list of possible values. * @type bool $all_ports - * This field is used along with the backend_service field for Internal TCP/UDP Load Balancing or Network Load Balancing, or with the target field for internal and external TargetInstance. You can only use one of ports and port_range, or allPorts. The three are mutually exclusive. For TCP, UDP and SCTP traffic, packets addressed to any ports will be forwarded to the target or backendService. + * This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By internal TCP/UDP load balancers, backend service-based network load balancers, and internal and external protocol forwarding. Set this field to true to allow packets addressed to any port or packets lacking destination port information (for example, UDP fragments after the first fragment) to be forwarded to the backends configured with this forwarding rule. The ports, port_range, and allPorts fields are mutually exclusive. * @type bool $allow_global_access * This field is used along with the backend_service field for internal load balancing or with the target field for internal TargetInstance. If the field is set to TRUE, clients can access ILB from all regions. Otherwise only allows access from clients in the same region as the internal load balancer. * @type string $backend_service @@ -258,9 +258,9 @@ class ForwardingRule extends \Google\Protobuf\Internal\Message * @type bool $no_automate_dns_zone * This is used in PSC consumer ForwardingRule to control whether it should try to auto-generate a DNS zone or not. Non-PSC forwarding rules do not use this field. * @type string $port_range - * This field can be used only if: - Load balancing scheme is one of EXTERNAL, INTERNAL_SELF_MANAGED or INTERNAL_MANAGED - IPProtocol is one of TCP, UDP, or SCTP. Packets addressed to ports in the specified range will be forwarded to target or backend_service. You can only use one of ports, port_range, or allPorts. The three are mutually exclusive. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint ports. Some types of forwarding target have constraints on the acceptable ports. For more information, see [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#port_specifications). @pattern: \\d+(?:-\\d+)? + * This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By backend service-based network load balancers, target pool-based network load balancers, internal proxy load balancers, external proxy load balancers, Traffic Director, external protocol forwarding, and Classic VPN. Some products have restrictions on what ports can be used. See port specifications for details. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this forwarding rule. The ports, port_range, and allPorts fields are mutually exclusive. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. @pattern: \\d+(?:-\\d+)? * @type array|\Google\Protobuf\Internal\RepeatedField $ports - * The ports field is only supported when the forwarding rule references a backend_service directly. Only packets addressed to the [specified list of ports]((https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#port_specifications)) are forwarded to backends. You can only use one of ports and port_range, or allPorts. The three are mutually exclusive. You can specify a list of up to five ports, which can be non-contiguous. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint ports. @pattern: \\d+(?:-\\d+)? + * This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By internal TCP/UDP load balancers, backend service-based network load balancers, and internal protocol forwarding. You can specify a list of up to five ports by number, separated by commas. The ports can be contiguous or discontiguous. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot share any values defined in ports. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot share any values defined in ports. The ports, port_range, and allPorts fields are mutually exclusive. @pattern: \\d+(?:-\\d+)? * @type int|string $psc_connection_id * [Output Only] The PSC connection id of the PSC Forwarding Rule. * @type string $psc_connection_status @@ -362,7 +362,7 @@ public function setIPProtocol($var) } /** - * This field is used along with the backend_service field for Internal TCP/UDP Load Balancing or Network Load Balancing, or with the target field for internal and external TargetInstance. You can only use one of ports and port_range, or allPorts. The three are mutually exclusive. For TCP, UDP and SCTP traffic, packets addressed to any ports will be forwarded to the target or backendService. + * This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By internal TCP/UDP load balancers, backend service-based network load balancers, and internal and external protocol forwarding. Set this field to true to allow packets addressed to any port or packets lacking destination port information (for example, UDP fragments after the first fragment) to be forwarded to the backends configured with this forwarding rule. The ports, port_range, and allPorts fields are mutually exclusive. * * Generated from protobuf field optional bool all_ports = 445175796; * @return bool @@ -383,7 +383,7 @@ public function clearAllPorts() } /** - * This field is used along with the backend_service field for Internal TCP/UDP Load Balancing or Network Load Balancing, or with the target field for internal and external TargetInstance. You can only use one of ports and port_range, or allPorts. The three are mutually exclusive. For TCP, UDP and SCTP traffic, packets addressed to any ports will be forwarded to the target or backendService. + * This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By internal TCP/UDP load balancers, backend service-based network load balancers, and internal and external protocol forwarding. Set this field to true to allow packets addressed to any port or packets lacking destination port information (for example, UDP fragments after the first fragment) to be forwarded to the backends configured with this forwarding rule. The ports, port_range, and allPorts fields are mutually exclusive. * * Generated from protobuf field optional bool all_ports = 445175796; * @param bool $var @@ -996,7 +996,7 @@ public function setNoAutomateDnsZone($var) } /** - * This field can be used only if: - Load balancing scheme is one of EXTERNAL, INTERNAL_SELF_MANAGED or INTERNAL_MANAGED - IPProtocol is one of TCP, UDP, or SCTP. Packets addressed to ports in the specified range will be forwarded to target or backend_service. You can only use one of ports, port_range, or allPorts. The three are mutually exclusive. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint ports. Some types of forwarding target have constraints on the acceptable ports. For more information, see [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#port_specifications). @pattern: \\d+(?:-\\d+)? + * This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By backend service-based network load balancers, target pool-based network load balancers, internal proxy load balancers, external proxy load balancers, Traffic Director, external protocol forwarding, and Classic VPN. Some products have restrictions on what ports can be used. See port specifications for details. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this forwarding rule. The ports, port_range, and allPorts fields are mutually exclusive. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. @pattern: \\d+(?:-\\d+)? * * Generated from protobuf field optional string port_range = 217518079; * @return string @@ -1017,7 +1017,7 @@ public function clearPortRange() } /** - * This field can be used only if: - Load balancing scheme is one of EXTERNAL, INTERNAL_SELF_MANAGED or INTERNAL_MANAGED - IPProtocol is one of TCP, UDP, or SCTP. Packets addressed to ports in the specified range will be forwarded to target or backend_service. You can only use one of ports, port_range, or allPorts. The three are mutually exclusive. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint ports. Some types of forwarding target have constraints on the acceptable ports. For more information, see [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#port_specifications). @pattern: \\d+(?:-\\d+)? + * This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By backend service-based network load balancers, target pool-based network load balancers, internal proxy load balancers, external proxy load balancers, Traffic Director, external protocol forwarding, and Classic VPN. Some products have restrictions on what ports can be used. See port specifications for details. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this forwarding rule. The ports, port_range, and allPorts fields are mutually exclusive. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. @pattern: \\d+(?:-\\d+)? * * Generated from protobuf field optional string port_range = 217518079; * @param string $var @@ -1032,7 +1032,7 @@ public function setPortRange($var) } /** - * The ports field is only supported when the forwarding rule references a backend_service directly. Only packets addressed to the [specified list of ports]((https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#port_specifications)) are forwarded to backends. You can only use one of ports and port_range, or allPorts. The three are mutually exclusive. You can specify a list of up to five ports, which can be non-contiguous. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint ports. @pattern: \\d+(?:-\\d+)? + * This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By internal TCP/UDP load balancers, backend service-based network load balancers, and internal protocol forwarding. You can specify a list of up to five ports by number, separated by commas. The ports can be contiguous or discontiguous. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot share any values defined in ports. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot share any values defined in ports. The ports, port_range, and allPorts fields are mutually exclusive. @pattern: \\d+(?:-\\d+)? * * Generated from protobuf field repeated string ports = 106854418; * @return \Google\Protobuf\Internal\RepeatedField @@ -1043,7 +1043,7 @@ public function getPorts() } /** - * The ports field is only supported when the forwarding rule references a backend_service directly. Only packets addressed to the [specified list of ports]((https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#port_specifications)) are forwarded to backends. You can only use one of ports and port_range, or allPorts. The three are mutually exclusive. You can specify a list of up to five ports, which can be non-contiguous. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint ports. @pattern: \\d+(?:-\\d+)? + * This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By internal TCP/UDP load balancers, backend service-based network load balancers, and internal protocol forwarding. You can specify a list of up to five ports by number, separated by commas. The ports can be contiguous or discontiguous. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot share any values defined in ports. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot share any values defined in ports. The ports, port_range, and allPorts fields are mutually exclusive. @pattern: \\d+(?:-\\d+)? * * Generated from protobuf field repeated string ports = 106854418; * @param array|\Google\Protobuf\Internal\RepeatedField $var diff --git a/Compute/src/V1/Gapic/InstancesGapicClient.php b/Compute/src/V1/Gapic/InstancesGapicClient.php index b3a91a474225..fb5f5b9a2047 100644 --- a/Compute/src/V1/Gapic/InstancesGapicClient.php +++ b/Compute/src/V1/Gapic/InstancesGapicClient.php @@ -3070,6 +3070,8 @@ public function startWithEncryptionKey($instance, $instancesStartWithEncryptionK * @param array $optionalArgs { * Optional. * + * @type bool $discardLocalSsd + * If true, discard the contents of any attached localSSD partitions. Default value is false. * @type string $requestId * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). * @type RetrySettings|array $retrySettings @@ -3092,6 +3094,10 @@ public function stop($instance, $project, $zone, array $optionalArgs = []) $requestParamHeaders['instance'] = $instance; $requestParamHeaders['project'] = $project; $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['discardLocalSsd'])) { + $request->setDiscardLocalSsd($optionalArgs['discardLocalSsd']); + } + if (isset($optionalArgs['requestId'])) { $request->setRequestId($optionalArgs['requestId']); } @@ -3146,6 +3152,8 @@ public function stop($instance, $project, $zone, array $optionalArgs = []) * @param array $optionalArgs { * Optional. * + * @type bool $discardLocalSsd + * If true, discard the contents of any attached localSSD partitions. Default value is false. * @type string $requestId * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). * @type RetrySettings|array $retrySettings @@ -3168,6 +3176,10 @@ public function suspend($instance, $project, $zone, array $optionalArgs = []) $requestParamHeaders['instance'] = $instance; $requestParamHeaders['project'] = $project; $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['discardLocalSsd'])) { + $request->setDiscardLocalSsd($optionalArgs['discardLocalSsd']); + } + if (isset($optionalArgs['requestId'])) { $request->setRequestId($optionalArgs['requestId']); } diff --git a/Compute/src/V1/Gapic/InterconnectsGapicClient.php b/Compute/src/V1/Gapic/InterconnectsGapicClient.php index 16ffb9e09384..421fc60ab5d6 100644 --- a/Compute/src/V1/Gapic/InterconnectsGapicClient.php +++ b/Compute/src/V1/Gapic/InterconnectsGapicClient.php @@ -251,7 +251,7 @@ public function __construct(array $options = []) } /** - * Deletes the specified interconnect. + * Deletes the specified Interconnect. * * Sample code: * ``` @@ -323,7 +323,7 @@ public function delete($interconnect, $project, array $optionalArgs = []) } /** - * Returns the specified interconnect. Get a list of available interconnects by making a list() request. + * Returns the specified Interconnect. Get a list of available Interconnects by making a list() request. * * Sample code: * ``` @@ -366,7 +366,7 @@ public function get($interconnect, $project, array $optionalArgs = []) } /** - * Returns the interconnectDiagnostics for the specified interconnect. + * Returns the interconnectDiagnostics for the specified Interconnect. * * Sample code: * ``` @@ -409,7 +409,7 @@ public function getDiagnostics($interconnect, $project, array $optionalArgs = [] } /** - * Creates a Interconnect in the specified project using the data included in the request. + * Creates an Interconnect in the specified project using the data included in the request. * * Sample code: * ``` @@ -480,7 +480,7 @@ public function insert($interconnectResource, $project, array $optionalArgs = [] } /** - * Retrieves the list of interconnect available to the specified project. + * Retrieves the list of Interconnects available to the specified project. * * Sample code: * ``` @@ -564,7 +564,7 @@ public function list($project, array $optionalArgs = []) } /** - * Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * Updates the specified Interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. * * Sample code: * ``` diff --git a/Compute/src/V1/Gapic/NetworkAttachmentsGapicClient.php b/Compute/src/V1/Gapic/NetworkAttachmentsGapicClient.php new file mode 100644 index 000000000000..7d0afde80284 --- /dev/null +++ b/Compute/src/V1/Gapic/NetworkAttachmentsGapicClient.php @@ -0,0 +1,774 @@ +aggregatedList($project); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $key => $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $networkAttachmentsClient->aggregatedList($project); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $networkAttachmentsClient->close(); + * } + * ``` + */ +class NetworkAttachmentsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.compute.v1.NetworkAttachments'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'compute.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/compute', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/network_attachments_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/network_attachments_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/network_attachments_rest_client_config.php', + ], + ], + 'operationsClientClass' => RegionOperationsClient::class, + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements GapicClientTrait::getSupportedTransports. */ + private static function getSupportedTransports() + { + return [ + 'rest', + ]; + } + + /** + * Return an RegionOperationsClient object with the same endpoint as $this. + * + * @return RegionOperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** Return the default longrunning operation descriptor config. */ + private function getDefaultOperationDescriptor() + { + return [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getRegion', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ]; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : $this->getDefaultOperationDescriptor(); + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'compute.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Retrieves the list of all NetworkAttachment resources, regional and global, available to the specified project. + * + * Sample code: + * ``` + * $networkAttachmentsClient = new NetworkAttachmentsClient(); + * try { + * $project = 'project'; + * // Iterate over pages of elements + * $pagedResponse = $networkAttachmentsClient->aggregatedList($project); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $key => $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $networkAttachmentsClient->aggregatedList($project); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $networkAttachmentsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + * @type bool $includeAllScopes + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * @type int $maxResults + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $orderBy + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type bool $returnPartialSuccess + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function aggregatedList($project, array $optionalArgs = []) + { + $request = new AggregatedListNetworkAttachmentsRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $requestParamHeaders['project'] = $project; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['includeAllScopes'])) { + $request->setIncludeAllScopes($optionalArgs['includeAllScopes']); + } + + if (isset($optionalArgs['maxResults'])) { + $request->setMaxResults($optionalArgs['maxResults']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['returnPartialSuccess'])) { + $request->setReturnPartialSuccess($optionalArgs['returnPartialSuccess']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('AggregatedList', $optionalArgs, NetworkAttachmentAggregatedList::class, $request); + } + + /** + * Deletes the specified NetworkAttachment in the given scope + * + * Sample code: + * ``` + * $networkAttachmentsClient = new NetworkAttachmentsClient(); + * try { + * $networkAttachment = 'network_attachment'; + * $project = 'project'; + * $region = 'region'; + * $operationResponse = $networkAttachmentsClient->delete($networkAttachment, $project, $region); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $networkAttachmentsClient->delete($networkAttachment, $project, $region); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $networkAttachmentsClient->resumeOperation($operationName, 'delete'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $networkAttachmentsClient->close(); + * } + * ``` + * + * @param string $networkAttachment Name of the NetworkAttachment resource to delete. + * @param string $project Project ID for this request. + * @param string $region Name of the region of this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function delete($networkAttachment, $project, $region, array $optionalArgs = []) + { + $request = new DeleteNetworkAttachmentRequest(); + $requestParamHeaders = []; + $request->setNetworkAttachment($networkAttachment); + $request->setProject($project); + $request->setRegion($region); + $requestParamHeaders['network_attachment'] = $networkAttachment; + $requestParamHeaders['project'] = $project; + $requestParamHeaders['region'] = $region; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('Delete', $optionalArgs, $request, $this->getOperationsClient(), null, Operation::class)->wait(); + } + + /** + * Returns the specified NetworkAttachment resource in the given scope. + * + * Sample code: + * ``` + * $networkAttachmentsClient = new NetworkAttachmentsClient(); + * try { + * $networkAttachment = 'network_attachment'; + * $project = 'project'; + * $region = 'region'; + * $response = $networkAttachmentsClient->get($networkAttachment, $project, $region); + * } finally { + * $networkAttachmentsClient->close(); + * } + * ``` + * + * @param string $networkAttachment Name of the NetworkAttachment resource to return. + * @param string $project Project ID for this request. + * @param string $region Name of the region of this request. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Compute\V1\NetworkAttachment + * + * @throws ApiException if the remote call fails + */ + public function get($networkAttachment, $project, $region, array $optionalArgs = []) + { + $request = new GetNetworkAttachmentRequest(); + $requestParamHeaders = []; + $request->setNetworkAttachment($networkAttachment); + $request->setProject($project); + $request->setRegion($region); + $requestParamHeaders['network_attachment'] = $networkAttachment; + $requestParamHeaders['project'] = $project; + $requestParamHeaders['region'] = $region; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Get', NetworkAttachment::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the access control policy for a resource. May be empty if no such policy or resource exists. + * + * Sample code: + * ``` + * $networkAttachmentsClient = new NetworkAttachmentsClient(); + * try { + * $project = 'project'; + * $region = 'region'; + * $resource = 'resource'; + * $response = $networkAttachmentsClient->getIamPolicy($project, $region, $resource); + * } finally { + * $networkAttachmentsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $region The name of the region for this request. + * @param string $resource Name or id of the resource for this request. + * @param array $optionalArgs { + * Optional. + * + * @type int $optionsRequestedPolicyVersion + * Requested IAM Policy version. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Compute\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($project, $region, $resource, array $optionalArgs = []) + { + $request = new GetIamPolicyNetworkAttachmentRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setRegion($region); + $request->setResource($resource); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['region'] = $region; + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['optionsRequestedPolicyVersion'])) { + $request->setOptionsRequestedPolicyVersion($optionalArgs['optionsRequestedPolicyVersion']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a NetworkAttachment in the specified project in the given scope using the parameters that are included in the request. + * + * Sample code: + * ``` + * $networkAttachmentsClient = new NetworkAttachmentsClient(); + * try { + * $networkAttachmentResource = new NetworkAttachment(); + * $project = 'project'; + * $region = 'region'; + * $operationResponse = $networkAttachmentsClient->insert($networkAttachmentResource, $project, $region); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $networkAttachmentsClient->insert($networkAttachmentResource, $project, $region); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $networkAttachmentsClient->resumeOperation($operationName, 'insert'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $networkAttachmentsClient->close(); + * } + * ``` + * + * @param NetworkAttachment $networkAttachmentResource The body resource for this request + * @param string $project Project ID for this request. + * @param string $region Name of the region of this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function insert($networkAttachmentResource, $project, $region, array $optionalArgs = []) + { + $request = new InsertNetworkAttachmentRequest(); + $requestParamHeaders = []; + $request->setNetworkAttachmentResource($networkAttachmentResource); + $request->setProject($project); + $request->setRegion($region); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['region'] = $region; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('Insert', $optionalArgs, $request, $this->getOperationsClient(), null, Operation::class)->wait(); + } + + /** + * Lists the NetworkAttachments for a project in the given scope. + * + * Sample code: + * ``` + * $networkAttachmentsClient = new NetworkAttachmentsClient(); + * try { + * $project = 'project'; + * $region = 'region'; + * // Iterate over pages of elements + * $pagedResponse = $networkAttachmentsClient->list($project, $region); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $networkAttachmentsClient->list($project, $region); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $networkAttachmentsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $region Name of the region of this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + * @type int $maxResults + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $orderBy + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type bool $returnPartialSuccess + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function list($project, $region, array $optionalArgs = []) + { + $request = new ListNetworkAttachmentsRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setRegion($region); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['region'] = $region; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['maxResults'])) { + $request->setMaxResults($optionalArgs['maxResults']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['returnPartialSuccess'])) { + $request->setReturnPartialSuccess($optionalArgs['returnPartialSuccess']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('List', $optionalArgs, NetworkAttachmentList::class, $request); + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. + * + * Sample code: + * ``` + * $networkAttachmentsClient = new NetworkAttachmentsClient(); + * try { + * $project = 'project'; + * $region = 'region'; + * $regionSetPolicyRequestResource = new RegionSetPolicyRequest(); + * $resource = 'resource'; + * $response = $networkAttachmentsClient->setIamPolicy($project, $region, $regionSetPolicyRequestResource, $resource); + * } finally { + * $networkAttachmentsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $region The name of the region for this request. + * @param RegionSetPolicyRequest $regionSetPolicyRequestResource The body resource for this request + * @param string $resource Name or id of the resource for this request. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Compute\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($project, $region, $regionSetPolicyRequestResource, $resource, array $optionalArgs = []) + { + $request = new SetIamPolicyNetworkAttachmentRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setRegion($region); + $request->setRegionSetPolicyRequestResource($regionSetPolicyRequestResource); + $request->setResource($resource); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['region'] = $region; + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. + * + * Sample code: + * ``` + * $networkAttachmentsClient = new NetworkAttachmentsClient(); + * try { + * $project = 'project'; + * $region = 'region'; + * $resource = 'resource'; + * $testPermissionsRequestResource = new TestPermissionsRequest(); + * $response = $networkAttachmentsClient->testIamPermissions($project, $region, $resource, $testPermissionsRequestResource); + * } finally { + * $networkAttachmentsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $region The name of the region for this request. + * @param string $resource Name or id of the resource for this request. + * @param TestPermissionsRequest $testPermissionsRequestResource The body resource for this request + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Compute\V1\TestPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($project, $region, $resource, $testPermissionsRequestResource, array $optionalArgs = []) + { + $request = new TestIamPermissionsNetworkAttachmentRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setRegion($region); + $request->setResource($resource); + $request->setTestPermissionsRequestResource($testPermissionsRequestResource); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['region'] = $region; + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestPermissionsResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/Compute/src/V1/GetIamPolicyNetworkAttachmentRequest.php b/Compute/src/V1/GetIamPolicyNetworkAttachmentRequest.php new file mode 100644 index 000000000000..580dc5c4155c --- /dev/null +++ b/Compute/src/V1/GetIamPolicyNetworkAttachmentRequest.php @@ -0,0 +1,179 @@ +google.cloud.compute.v1.GetIamPolicyNetworkAttachmentRequest + */ +class GetIamPolicyNetworkAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Requested IAM Policy version. + * + * Generated from protobuf field optional int32 options_requested_policy_version = 499220029; + */ + private $options_requested_policy_version = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * The name of the region for this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + */ + private $region = ''; + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resource = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $options_requested_policy_version + * Requested IAM Policy version. + * @type string $project + * Project ID for this request. + * @type string $region + * The name of the region for this request. + * @type string $resource + * Name or id of the resource for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Requested IAM Policy version. + * + * Generated from protobuf field optional int32 options_requested_policy_version = 499220029; + * @return int + */ + public function getOptionsRequestedPolicyVersion() + { + return isset($this->options_requested_policy_version) ? $this->options_requested_policy_version : 0; + } + + public function hasOptionsRequestedPolicyVersion() + { + return isset($this->options_requested_policy_version); + } + + public function clearOptionsRequestedPolicyVersion() + { + unset($this->options_requested_policy_version); + } + + /** + * Requested IAM Policy version. + * + * Generated from protobuf field optional int32 options_requested_policy_version = 499220029; + * @param int $var + * @return $this + */ + public function setOptionsRequestedPolicyVersion($var) + { + GPBUtil::checkInt32($var); + $this->options_requested_policy_version = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The name of the region for this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The name of the region for this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/GetNetworkAttachmentRequest.php b/Compute/src/V1/GetNetworkAttachmentRequest.php new file mode 100644 index 000000000000..349db1744a3b --- /dev/null +++ b/Compute/src/V1/GetNetworkAttachmentRequest.php @@ -0,0 +1,135 @@ +google.cloud.compute.v1.GetNetworkAttachmentRequest + */ +class GetNetworkAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the NetworkAttachment resource to return. + * + * Generated from protobuf field string network_attachment = 224644052 [(.google.api.field_behavior) = REQUIRED]; + */ + private $network_attachment = ''; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Name of the region of this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + */ + private $region = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_attachment + * Name of the NetworkAttachment resource to return. + * @type string $project + * Project ID for this request. + * @type string $region + * Name of the region of this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Name of the NetworkAttachment resource to return. + * + * Generated from protobuf field string network_attachment = 224644052 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetworkAttachment() + { + return $this->network_attachment; + } + + /** + * Name of the NetworkAttachment resource to return. + * + * Generated from protobuf field string network_attachment = 224644052 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetworkAttachment($var) + { + GPBUtil::checkString($var, True); + $this->network_attachment = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Name of the region of this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Name of the region of this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/HealthCheckService.php b/Compute/src/V1/HealthCheckService.php index 8e3fd95d4f17..3ef8103c13a4 100644 --- a/Compute/src/V1/HealthCheckService.php +++ b/Compute/src/V1/HealthCheckService.php @@ -34,13 +34,13 @@ class HealthCheckService extends \Google\Protobuf\Internal\Message */ private $fingerprint = null; /** - * A list of URLs to the HealthCheck resources. Must have at least one HealthCheck, and not more than 10. HealthCheck resources must have portSpecification=USE_SERVING_PORT or portSpecification=USE_FIXED_PORT. For regional HealthCheckService, the HealthCheck must be regional and in the same region. For global HealthCheckService, HealthCheck must be global. Mix of regional and global HealthChecks is not supported. Multiple regional HealthChecks must belong to the same region. Regional HealthChecks must belong to the same region as zones of NEGs. + * A list of URLs to the HealthCheck resources. Must have at least one HealthCheck, and not more than 10 for regional HealthCheckService, and not more than 1 for global HealthCheckService. HealthCheck resources must have portSpecification=USE_SERVING_PORT or portSpecification=USE_FIXED_PORT. For regional HealthCheckService, the HealthCheck must be regional and in the same region. For global HealthCheckService, HealthCheck must be global. Mix of regional and global HealthChecks is not supported. Multiple regional HealthChecks must belong to the same region. Regional HealthChecks must belong to the same region as zones of NetworkEndpointGroups. For global HealthCheckService using global INTERNET_IP_PORT NetworkEndpointGroups, the global HealthChecks must specify sourceRegions, and HealthChecks that specify sourceRegions can only be used with global INTERNET_IP_PORT NetworkEndpointGroups. * * Generated from protobuf field repeated string health_checks = 448370606; */ private $health_checks; /** - * Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if unspecified. - NO_AGGREGATION. An EndpointHealth message is returned for each pair in the health check service. - AND. If any health check of an endpoint reports UNHEALTHY, then UNHEALTHY is the HealthState of the endpoint. If all health checks report HEALTHY, the HealthState of the endpoint is HEALTHY. . + * Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if unspecified. - NO_AGGREGATION. An EndpointHealth message is returned for each pair in the health check service. - AND. If any health check of an endpoint reports UNHEALTHY, then UNHEALTHY is the HealthState of the endpoint. If all health checks report HEALTHY, the HealthState of the endpoint is HEALTHY. . This is only allowed with regional HealthCheckService. * Check the HealthStatusAggregationPolicy enum for the list of possible values. * * Generated from protobuf field optional string health_status_aggregation_policy = 253163129; @@ -65,7 +65,7 @@ class HealthCheckService extends \Google\Protobuf\Internal\Message */ private $name = null; /** - * A list of URLs to the NetworkEndpointGroup resources. Must not have more than 100. For regional HealthCheckService, NEGs must be in zones in the region of the HealthCheckService. + * A list of URLs to the NetworkEndpointGroup resources. Must not have more than 100. For regional HealthCheckService, NEGs must be in zones in the region of the HealthCheckService. For global HealthCheckServices, the NetworkEndpointGroups must be global INTERNET_IP_PORT. * * Generated from protobuf field repeated string network_endpoint_groups = 29346733; */ @@ -102,9 +102,9 @@ class HealthCheckService extends \Google\Protobuf\Internal\Message * @type string $fingerprint * Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a HealthCheckService. An up-to-date fingerprint must be provided in order to patch/update the HealthCheckService; Otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the HealthCheckService. * @type array|\Google\Protobuf\Internal\RepeatedField $health_checks - * A list of URLs to the HealthCheck resources. Must have at least one HealthCheck, and not more than 10. HealthCheck resources must have portSpecification=USE_SERVING_PORT or portSpecification=USE_FIXED_PORT. For regional HealthCheckService, the HealthCheck must be regional and in the same region. For global HealthCheckService, HealthCheck must be global. Mix of regional and global HealthChecks is not supported. Multiple regional HealthChecks must belong to the same region. Regional HealthChecks must belong to the same region as zones of NEGs. + * A list of URLs to the HealthCheck resources. Must have at least one HealthCheck, and not more than 10 for regional HealthCheckService, and not more than 1 for global HealthCheckService. HealthCheck resources must have portSpecification=USE_SERVING_PORT or portSpecification=USE_FIXED_PORT. For regional HealthCheckService, the HealthCheck must be regional and in the same region. For global HealthCheckService, HealthCheck must be global. Mix of regional and global HealthChecks is not supported. Multiple regional HealthChecks must belong to the same region. Regional HealthChecks must belong to the same region as zones of NetworkEndpointGroups. For global HealthCheckService using global INTERNET_IP_PORT NetworkEndpointGroups, the global HealthChecks must specify sourceRegions, and HealthChecks that specify sourceRegions can only be used with global INTERNET_IP_PORT NetworkEndpointGroups. * @type string $health_status_aggregation_policy - * Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if unspecified. - NO_AGGREGATION. An EndpointHealth message is returned for each pair in the health check service. - AND. If any health check of an endpoint reports UNHEALTHY, then UNHEALTHY is the HealthState of the endpoint. If all health checks report HEALTHY, the HealthState of the endpoint is HEALTHY. . + * Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if unspecified. - NO_AGGREGATION. An EndpointHealth message is returned for each pair in the health check service. - AND. If any health check of an endpoint reports UNHEALTHY, then UNHEALTHY is the HealthState of the endpoint. If all health checks report HEALTHY, the HealthState of the endpoint is HEALTHY. . This is only allowed with regional HealthCheckService. * Check the HealthStatusAggregationPolicy enum for the list of possible values. * @type int|string $id * [Output Only] The unique identifier for the resource. This identifier is defined by the server. @@ -113,7 +113,7 @@ class HealthCheckService extends \Google\Protobuf\Internal\Message * @type string $name * Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * @type array|\Google\Protobuf\Internal\RepeatedField $network_endpoint_groups - * A list of URLs to the NetworkEndpointGroup resources. Must not have more than 100. For regional HealthCheckService, NEGs must be in zones in the region of the HealthCheckService. + * A list of URLs to the NetworkEndpointGroup resources. Must not have more than 100. For regional HealthCheckService, NEGs must be in zones in the region of the HealthCheckService. For global HealthCheckServices, the NetworkEndpointGroups must be global INTERNET_IP_PORT. * @type array|\Google\Protobuf\Internal\RepeatedField $notification_endpoints * A list of URLs to the NotificationEndpoint resources. Must not have more than 10. A list of endpoints for receiving notifications of change in health status. For regional HealthCheckService, NotificationEndpoint must be regional and in the same region. For global HealthCheckService, NotificationEndpoint must be global. * @type string $region @@ -236,7 +236,7 @@ public function setFingerprint($var) } /** - * A list of URLs to the HealthCheck resources. Must have at least one HealthCheck, and not more than 10. HealthCheck resources must have portSpecification=USE_SERVING_PORT or portSpecification=USE_FIXED_PORT. For regional HealthCheckService, the HealthCheck must be regional and in the same region. For global HealthCheckService, HealthCheck must be global. Mix of regional and global HealthChecks is not supported. Multiple regional HealthChecks must belong to the same region. Regional HealthChecks must belong to the same region as zones of NEGs. + * A list of URLs to the HealthCheck resources. Must have at least one HealthCheck, and not more than 10 for regional HealthCheckService, and not more than 1 for global HealthCheckService. HealthCheck resources must have portSpecification=USE_SERVING_PORT or portSpecification=USE_FIXED_PORT. For regional HealthCheckService, the HealthCheck must be regional and in the same region. For global HealthCheckService, HealthCheck must be global. Mix of regional and global HealthChecks is not supported. Multiple regional HealthChecks must belong to the same region. Regional HealthChecks must belong to the same region as zones of NetworkEndpointGroups. For global HealthCheckService using global INTERNET_IP_PORT NetworkEndpointGroups, the global HealthChecks must specify sourceRegions, and HealthChecks that specify sourceRegions can only be used with global INTERNET_IP_PORT NetworkEndpointGroups. * * Generated from protobuf field repeated string health_checks = 448370606; * @return \Google\Protobuf\Internal\RepeatedField @@ -247,7 +247,7 @@ public function getHealthChecks() } /** - * A list of URLs to the HealthCheck resources. Must have at least one HealthCheck, and not more than 10. HealthCheck resources must have portSpecification=USE_SERVING_PORT or portSpecification=USE_FIXED_PORT. For regional HealthCheckService, the HealthCheck must be regional and in the same region. For global HealthCheckService, HealthCheck must be global. Mix of regional and global HealthChecks is not supported. Multiple regional HealthChecks must belong to the same region. Regional HealthChecks must belong to the same region as zones of NEGs. + * A list of URLs to the HealthCheck resources. Must have at least one HealthCheck, and not more than 10 for regional HealthCheckService, and not more than 1 for global HealthCheckService. HealthCheck resources must have portSpecification=USE_SERVING_PORT or portSpecification=USE_FIXED_PORT. For regional HealthCheckService, the HealthCheck must be regional and in the same region. For global HealthCheckService, HealthCheck must be global. Mix of regional and global HealthChecks is not supported. Multiple regional HealthChecks must belong to the same region. Regional HealthChecks must belong to the same region as zones of NetworkEndpointGroups. For global HealthCheckService using global INTERNET_IP_PORT NetworkEndpointGroups, the global HealthChecks must specify sourceRegions, and HealthChecks that specify sourceRegions can only be used with global INTERNET_IP_PORT NetworkEndpointGroups. * * Generated from protobuf field repeated string health_checks = 448370606; * @param array|\Google\Protobuf\Internal\RepeatedField $var @@ -262,7 +262,7 @@ public function setHealthChecks($var) } /** - * Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if unspecified. - NO_AGGREGATION. An EndpointHealth message is returned for each pair in the health check service. - AND. If any health check of an endpoint reports UNHEALTHY, then UNHEALTHY is the HealthState of the endpoint. If all health checks report HEALTHY, the HealthState of the endpoint is HEALTHY. . + * Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if unspecified. - NO_AGGREGATION. An EndpointHealth message is returned for each pair in the health check service. - AND. If any health check of an endpoint reports UNHEALTHY, then UNHEALTHY is the HealthState of the endpoint. If all health checks report HEALTHY, the HealthState of the endpoint is HEALTHY. . This is only allowed with regional HealthCheckService. * Check the HealthStatusAggregationPolicy enum for the list of possible values. * * Generated from protobuf field optional string health_status_aggregation_policy = 253163129; @@ -284,7 +284,7 @@ public function clearHealthStatusAggregationPolicy() } /** - * Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if unspecified. - NO_AGGREGATION. An EndpointHealth message is returned for each pair in the health check service. - AND. If any health check of an endpoint reports UNHEALTHY, then UNHEALTHY is the HealthState of the endpoint. If all health checks report HEALTHY, the HealthState of the endpoint is HEALTHY. . + * Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if unspecified. - NO_AGGREGATION. An EndpointHealth message is returned for each pair in the health check service. - AND. If any health check of an endpoint reports UNHEALTHY, then UNHEALTHY is the HealthState of the endpoint. If all health checks report HEALTHY, the HealthState of the endpoint is HEALTHY. . This is only allowed with regional HealthCheckService. * Check the HealthStatusAggregationPolicy enum for the list of possible values. * * Generated from protobuf field optional string health_status_aggregation_policy = 253163129; @@ -408,7 +408,7 @@ public function setName($var) } /** - * A list of URLs to the NetworkEndpointGroup resources. Must not have more than 100. For regional HealthCheckService, NEGs must be in zones in the region of the HealthCheckService. + * A list of URLs to the NetworkEndpointGroup resources. Must not have more than 100. For regional HealthCheckService, NEGs must be in zones in the region of the HealthCheckService. For global HealthCheckServices, the NetworkEndpointGroups must be global INTERNET_IP_PORT. * * Generated from protobuf field repeated string network_endpoint_groups = 29346733; * @return \Google\Protobuf\Internal\RepeatedField @@ -419,7 +419,7 @@ public function getNetworkEndpointGroups() } /** - * A list of URLs to the NetworkEndpointGroup resources. Must not have more than 100. For regional HealthCheckService, NEGs must be in zones in the region of the HealthCheckService. + * A list of URLs to the NetworkEndpointGroup resources. Must not have more than 100. For regional HealthCheckService, NEGs must be in zones in the region of the HealthCheckService. For global HealthCheckServices, the NetworkEndpointGroups must be global INTERNET_IP_PORT. * * Generated from protobuf field repeated string network_endpoint_groups = 29346733; * @param array|\Google\Protobuf\Internal\RepeatedField $var diff --git a/Compute/src/V1/HealthCheckService/HealthStatusAggregationPolicy.php b/Compute/src/V1/HealthCheckService/HealthStatusAggregationPolicy.php index 278cff434ff2..ee96adc4a9d2 100644 --- a/Compute/src/V1/HealthCheckService/HealthStatusAggregationPolicy.php +++ b/Compute/src/V1/HealthCheckService/HealthStatusAggregationPolicy.php @@ -7,7 +7,7 @@ use UnexpectedValueException; /** - * Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if unspecified. - NO_AGGREGATION. An EndpointHealth message is returned for each pair in the health check service. - AND. If any health check of an endpoint reports UNHEALTHY, then UNHEALTHY is the HealthState of the endpoint. If all health checks report HEALTHY, the HealthState of the endpoint is HEALTHY. . + * Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if unspecified. - NO_AGGREGATION. An EndpointHealth message is returned for each pair in the health check service. - AND. If any health check of an endpoint reports UNHEALTHY, then UNHEALTHY is the HealthState of the endpoint. If all health checks report HEALTHY, the HealthState of the endpoint is HEALTHY. . This is only allowed with regional HealthCheckService. * * Protobuf type google.cloud.compute.v1.HealthCheckService.HealthStatusAggregationPolicy */ diff --git a/Compute/src/V1/InsertNetworkAttachmentRequest.php b/Compute/src/V1/InsertNetworkAttachmentRequest.php new file mode 100644 index 000000000000..b8515a0e8ec5 --- /dev/null +++ b/Compute/src/V1/InsertNetworkAttachmentRequest.php @@ -0,0 +1,189 @@ +google.cloud.compute.v1.InsertNetworkAttachmentRequest + */ +class InsertNetworkAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.NetworkAttachment network_attachment_resource = 210974745 [(.google.api.field_behavior) = REQUIRED]; + */ + private $network_attachment_resource = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + */ + private $project = ''; + /** + * Name of the region of this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "region"]; + */ + private $region = ''; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + * + * Generated from protobuf field optional string request_id = 37109963; + */ + private $request_id = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Compute\V1\NetworkAttachment $network_attachment_resource + * The body resource for this request + * @type string $project + * Project ID for this request. + * @type string $region + * Name of the region of this request. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.NetworkAttachment network_attachment_resource = 210974745 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Compute\V1\NetworkAttachment|null + */ + public function getNetworkAttachmentResource() + { + return $this->network_attachment_resource; + } + + public function hasNetworkAttachmentResource() + { + return isset($this->network_attachment_resource); + } + + public function clearNetworkAttachmentResource() + { + unset($this->network_attachment_resource); + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.NetworkAttachment network_attachment_resource = 210974745 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Compute\V1\NetworkAttachment $var + * @return $this + */ + public function setNetworkAttachmentResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\NetworkAttachment::class); + $this->network_attachment_resource = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Name of the region of this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "region"]; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Name of the region of this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "region"]; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + * + * Generated from protobuf field optional string request_id = 37109963; + * @return string + */ + public function getRequestId() + { + return isset($this->request_id) ? $this->request_id : ''; + } + + public function hasRequestId() + { + return isset($this->request_id); + } + + public function clearRequestId() + { + unset($this->request_id); + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder + * + * Generated from protobuf field optional string request_id = 37109963; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/InterconnectDiagnostics.php b/Compute/src/V1/InterconnectDiagnostics.php index e235d888c65c..0032779953c6 100644 --- a/Compute/src/V1/InterconnectDiagnostics.php +++ b/Compute/src/V1/InterconnectDiagnostics.php @@ -21,6 +21,20 @@ class InterconnectDiagnostics extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.compute.v1.InterconnectDiagnosticsARPEntry arp_caches = 414591761; */ private $arp_caches; + /** + * The aggregation type of the bundle interface. + * Check the BundleAggregationType enum for the list of possible values. + * + * Generated from protobuf field optional string bundle_aggregation_type = 434939028; + */ + private $bundle_aggregation_type = null; + /** + * The operational status of the bundle interface. + * Check the BundleOperationalStatus enum for the list of possible values. + * + * Generated from protobuf field optional string bundle_operational_status = 106433500; + */ + private $bundle_operational_status = null; /** * A list of InterconnectDiagnostics.LinkStatus objects, describing the status for each link on the Interconnect. * @@ -42,6 +56,12 @@ class InterconnectDiagnostics extends \Google\Protobuf\Internal\Message * * @type array<\Google\Cloud\Compute\V1\InterconnectDiagnosticsARPEntry>|\Google\Protobuf\Internal\RepeatedField $arp_caches * A list of InterconnectDiagnostics.ARPEntry objects, describing individual neighbors currently seen by the Google router in the ARP cache for the Interconnect. This will be empty when the Interconnect is not bundled. + * @type string $bundle_aggregation_type + * The aggregation type of the bundle interface. + * Check the BundleAggregationType enum for the list of possible values. + * @type string $bundle_operational_status + * The operational status of the bundle interface. + * Check the BundleOperationalStatus enum for the list of possible values. * @type array<\Google\Cloud\Compute\V1\InterconnectDiagnosticsLinkStatus>|\Google\Protobuf\Internal\RepeatedField $links * A list of InterconnectDiagnostics.LinkStatus objects, describing the status for each link on the Interconnect. * @type string $mac_address @@ -79,6 +99,82 @@ public function setArpCaches($var) return $this; } + /** + * The aggregation type of the bundle interface. + * Check the BundleAggregationType enum for the list of possible values. + * + * Generated from protobuf field optional string bundle_aggregation_type = 434939028; + * @return string + */ + public function getBundleAggregationType() + { + return isset($this->bundle_aggregation_type) ? $this->bundle_aggregation_type : ''; + } + + public function hasBundleAggregationType() + { + return isset($this->bundle_aggregation_type); + } + + public function clearBundleAggregationType() + { + unset($this->bundle_aggregation_type); + } + + /** + * The aggregation type of the bundle interface. + * Check the BundleAggregationType enum for the list of possible values. + * + * Generated from protobuf field optional string bundle_aggregation_type = 434939028; + * @param string $var + * @return $this + */ + public function setBundleAggregationType($var) + { + GPBUtil::checkString($var, True); + $this->bundle_aggregation_type = $var; + + return $this; + } + + /** + * The operational status of the bundle interface. + * Check the BundleOperationalStatus enum for the list of possible values. + * + * Generated from protobuf field optional string bundle_operational_status = 106433500; + * @return string + */ + public function getBundleOperationalStatus() + { + return isset($this->bundle_operational_status) ? $this->bundle_operational_status : ''; + } + + public function hasBundleOperationalStatus() + { + return isset($this->bundle_operational_status); + } + + public function clearBundleOperationalStatus() + { + unset($this->bundle_operational_status); + } + + /** + * The operational status of the bundle interface. + * Check the BundleOperationalStatus enum for the list of possible values. + * + * Generated from protobuf field optional string bundle_operational_status = 106433500; + * @param string $var + * @return $this + */ + public function setBundleOperationalStatus($var) + { + GPBUtil::checkString($var, True); + $this->bundle_operational_status = $var; + + return $this; + } + /** * A list of InterconnectDiagnostics.LinkStatus objects, describing the status for each link on the Interconnect. * diff --git a/Compute/src/V1/InterconnectDiagnostics/BundleAggregationType.php b/Compute/src/V1/InterconnectDiagnostics/BundleAggregationType.php new file mode 100644 index 000000000000..a6566cb74685 --- /dev/null +++ b/Compute/src/V1/InterconnectDiagnostics/BundleAggregationType.php @@ -0,0 +1,62 @@ +google.cloud.compute.v1.InterconnectDiagnostics.BundleAggregationType + */ +class BundleAggregationType +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_BUNDLE_AGGREGATION_TYPE = 0; + */ + const UNDEFINED_BUNDLE_AGGREGATION_TYPE = 0; + /** + * LACP is enabled. + * + * Generated from protobuf enum BUNDLE_AGGREGATION_TYPE_LACP = 27758925; + */ + const BUNDLE_AGGREGATION_TYPE_LACP = 27758925; + /** + * LACP is disabled. + * + * Generated from protobuf enum BUNDLE_AGGREGATION_TYPE_STATIC = 50678873; + */ + const BUNDLE_AGGREGATION_TYPE_STATIC = 50678873; + + private static $valueToName = [ + self::UNDEFINED_BUNDLE_AGGREGATION_TYPE => 'UNDEFINED_BUNDLE_AGGREGATION_TYPE', + self::BUNDLE_AGGREGATION_TYPE_LACP => 'BUNDLE_AGGREGATION_TYPE_LACP', + self::BUNDLE_AGGREGATION_TYPE_STATIC => 'BUNDLE_AGGREGATION_TYPE_STATIC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/InterconnectDiagnostics/BundleOperationalStatus.php b/Compute/src/V1/InterconnectDiagnostics/BundleOperationalStatus.php new file mode 100644 index 000000000000..a161c67c7d61 --- /dev/null +++ b/Compute/src/V1/InterconnectDiagnostics/BundleOperationalStatus.php @@ -0,0 +1,62 @@ +google.cloud.compute.v1.InterconnectDiagnostics.BundleOperationalStatus + */ +class BundleOperationalStatus +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_BUNDLE_OPERATIONAL_STATUS = 0; + */ + const UNDEFINED_BUNDLE_OPERATIONAL_STATUS = 0; + /** + * If bundleAggregationType is LACP: LACP is not established and/or all links in the bundle have DOWN operational status. If bundleAggregationType is STATIC: one or more links in the bundle has DOWN operational status. + * + * Generated from protobuf enum BUNDLE_OPERATIONAL_STATUS_DOWN = 453842693; + */ + const BUNDLE_OPERATIONAL_STATUS_DOWN = 453842693; + /** + * If bundleAggregationType is LACP: LACP is established and at least one link in the bundle has UP operational status. If bundleAggregationType is STATIC: all links in the bundle (typically just one) have UP operational status. + * + * Generated from protobuf enum BUNDLE_OPERATIONAL_STATUS_UP = 161366462; + */ + const BUNDLE_OPERATIONAL_STATUS_UP = 161366462; + + private static $valueToName = [ + self::UNDEFINED_BUNDLE_OPERATIONAL_STATUS => 'UNDEFINED_BUNDLE_OPERATIONAL_STATUS', + self::BUNDLE_OPERATIONAL_STATUS_DOWN => 'BUNDLE_OPERATIONAL_STATUS_DOWN', + self::BUNDLE_OPERATIONAL_STATUS_UP => 'BUNDLE_OPERATIONAL_STATUS_UP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/InterconnectDiagnosticsLinkStatus.php b/Compute/src/V1/InterconnectDiagnosticsLinkStatus.php index 4396ef0783a3..2c4c27fb6214 100644 --- a/Compute/src/V1/InterconnectDiagnosticsLinkStatus.php +++ b/Compute/src/V1/InterconnectDiagnosticsLinkStatus.php @@ -36,6 +36,13 @@ class InterconnectDiagnosticsLinkStatus extends \Google\Protobuf\Internal\Messag * Generated from protobuf field optional .google.cloud.compute.v1.InterconnectDiagnosticsLinkLACPStatus lacp_status = 361210415; */ private $lacp_status = null; + /** + * The operational status of the link. + * Check the OperationalStatus enum for the list of possible values. + * + * Generated from protobuf field optional string operational_status = 201070847; + */ + private $operational_status = null; /** * An InterconnectDiagnostics.LinkOpticalPower object, describing the current value and status of the received light level. * @@ -62,6 +69,9 @@ class InterconnectDiagnosticsLinkStatus extends \Google\Protobuf\Internal\Messag * @type string $google_demarc * The Demarc address assigned by Google and provided in the LoA. * @type \Google\Cloud\Compute\V1\InterconnectDiagnosticsLinkLACPStatus $lacp_status + * @type string $operational_status + * The operational status of the link. + * Check the OperationalStatus enum for the list of possible values. * @type \Google\Cloud\Compute\V1\InterconnectDiagnosticsLinkOpticalPower $receiving_optical_power * An InterconnectDiagnostics.LinkOpticalPower object, describing the current value and status of the received light level. * @type \Google\Cloud\Compute\V1\InterconnectDiagnosticsLinkOpticalPower $transmitting_optical_power @@ -203,6 +213,44 @@ public function setLacpStatus($var) return $this; } + /** + * The operational status of the link. + * Check the OperationalStatus enum for the list of possible values. + * + * Generated from protobuf field optional string operational_status = 201070847; + * @return string + */ + public function getOperationalStatus() + { + return isset($this->operational_status) ? $this->operational_status : ''; + } + + public function hasOperationalStatus() + { + return isset($this->operational_status); + } + + public function clearOperationalStatus() + { + unset($this->operational_status); + } + + /** + * The operational status of the link. + * Check the OperationalStatus enum for the list of possible values. + * + * Generated from protobuf field optional string operational_status = 201070847; + * @param string $var + * @return $this + */ + public function setOperationalStatus($var) + { + GPBUtil::checkString($var, True); + $this->operational_status = $var; + + return $this; + } + /** * An InterconnectDiagnostics.LinkOpticalPower object, describing the current value and status of the received light level. * diff --git a/Compute/src/V1/InterconnectDiagnosticsLinkStatus/OperationalStatus.php b/Compute/src/V1/InterconnectDiagnosticsLinkStatus/OperationalStatus.php new file mode 100644 index 000000000000..5573bae2a685 --- /dev/null +++ b/Compute/src/V1/InterconnectDiagnosticsLinkStatus/OperationalStatus.php @@ -0,0 +1,62 @@ +google.cloud.compute.v1.InterconnectDiagnosticsLinkStatus.OperationalStatus + */ +class OperationalStatus +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_OPERATIONAL_STATUS = 0; + */ + const UNDEFINED_OPERATIONAL_STATUS = 0; + /** + * The interface is unable to communicate with the remote end. + * + * Generated from protobuf enum LINK_OPERATIONAL_STATUS_DOWN = 281653885; + */ + const LINK_OPERATIONAL_STATUS_DOWN = 281653885; + /** + * The interface has low level communication with the remote end. + * + * Generated from protobuf enum LINK_OPERATIONAL_STATUS_UP = 305879862; + */ + const LINK_OPERATIONAL_STATUS_UP = 305879862; + + private static $valueToName = [ + self::UNDEFINED_OPERATIONAL_STATUS => 'UNDEFINED_OPERATIONAL_STATUS', + self::LINK_OPERATIONAL_STATUS_DOWN => 'LINK_OPERATIONAL_STATUS_DOWN', + self::LINK_OPERATIONAL_STATUS_UP => 'LINK_OPERATIONAL_STATUS_UP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/ListNetworkAttachmentsRequest.php b/Compute/src/V1/ListNetworkAttachmentsRequest.php new file mode 100644 index 000000000000..05751d2abf64 --- /dev/null +++ b/Compute/src/V1/ListNetworkAttachmentsRequest.php @@ -0,0 +1,321 @@ +google.cloud.compute.v1.ListNetworkAttachmentsRequest + */ +class ListNetworkAttachmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + * + * Generated from protobuf field optional string filter = 336120696; + */ + private $filter = null; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + */ + private $max_results = null; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + */ + private $order_by = null; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + */ + private $page_token = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Name of the region of this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + */ + private $region = ''; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + */ + private $return_partial_success = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + * @type int $max_results + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $order_by + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $page_token + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * @type string $project + * Project ID for this request. + * @type string $region + * Name of the region of this request. + * @type bool $return_partial_success + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + * + * Generated from protobuf field optional string filter = 336120696; + * @return string + */ + public function getFilter() + { + return isset($this->filter) ? $this->filter : ''; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + * + * Generated from protobuf field optional string filter = 336120696; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @return int + */ + public function getMaxResults() + { + return isset($this->max_results) ? $this->max_results : 0; + } + + public function hasMaxResults() + { + return isset($this->max_results); + } + + public function clearMaxResults() + { + unset($this->max_results); + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @return string + */ + public function getOrderBy() + { + return isset($this->order_by) ? $this->order_by : ''; + } + + public function hasOrderBy() + { + return isset($this->order_by); + } + + public function clearOrderBy() + { + unset($this->order_by); + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @return string + */ + public function getPageToken() + { + return isset($this->page_token) ? $this->page_token : ''; + } + + public function hasPageToken() + { + return isset($this->page_token); + } + + public function clearPageToken() + { + unset($this->page_token); + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Name of the region of this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Name of the region of this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @return bool + */ + public function getReturnPartialSuccess() + { + return isset($this->return_partial_success) ? $this->return_partial_success : false; + } + + public function hasReturnPartialSuccess() + { + return isset($this->return_partial_success); + } + + public function clearReturnPartialSuccess() + { + unset($this->return_partial_success); + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/NetworkAttachment.php b/Compute/src/V1/NetworkAttachment.php new file mode 100644 index 000000000000..5e3b5d9d7f7d --- /dev/null +++ b/Compute/src/V1/NetworkAttachment.php @@ -0,0 +1,657 @@ +google.cloud.compute.v1.NetworkAttachment + */ +class NetworkAttachment extends \Google\Protobuf\Internal\Message +{ + /** + * [Output Only] An array of connections for all the producers connected to this network attachment. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.NetworkAttachmentConnectedEndpoint connection_endpoints = 326078813; + */ + private $connection_endpoints; + /** + * + * Check the ConnectionPreference enum for the list of possible values. + * + * Generated from protobuf field optional string connection_preference = 285818076; + */ + private $connection_preference = null; + /** + * [Output Only] Creation timestamp in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + */ + private $creation_timestamp = null; + /** + * An optional description of this resource. Provide this property when you create the resource. + * + * Generated from protobuf field optional string description = 422937596; + */ + private $description = null; + /** + * [Output Only] Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. An up-to-date fingerprint must be provided in order to patch. + * + * Generated from protobuf field optional string fingerprint = 234678500; + */ + private $fingerprint = null; + /** + * [Output Only] The unique identifier for the resource type. The server generates this identifier. + * + * Generated from protobuf field optional uint64 id = 3355; + */ + private $id = null; + /** + * [Output Only] Type of the resource. + * + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + * + * Generated from protobuf field optional string name = 3373707; + */ + private $name = null; + /** + * [Output Only] The URL of the network which the Network Attachment belongs to. + * + * Generated from protobuf field optional string network = 232872494; + */ + private $network = null; + /** + * Projects that are allowed to connect to this network attachment. The project can be specified using its id or number. + * + * Generated from protobuf field repeated string producer_accept_lists = 202804523; + */ + private $producer_accept_lists; + /** + * Projects that are not allowed to connect to this network attachment. The project can be specified using its id or number. + * + * Generated from protobuf field repeated string producer_reject_lists = 4112002; + */ + private $producer_reject_lists; + /** + * [Output Only] URL of the region where the network attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * + * Generated from protobuf field optional string region = 138946292; + */ + private $region = null; + /** + * [Output Only] Server-defined URL for the resource. + * + * Generated from protobuf field optional string self_link = 456214797; + */ + private $self_link = null; + /** + * [Output Only] Server-defined URL for this resource's resource id. + * + * Generated from protobuf field optional string self_link_with_id = 44520962; + */ + private $self_link_with_id = null; + /** + * An array of URLs where each entry is the URL of a subnet provided by the service consumer to use for endpoints in the producers that connect to this network attachment. + * + * Generated from protobuf field repeated string subnetworks = 415853125; + */ + private $subnetworks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Compute\V1\NetworkAttachmentConnectedEndpoint>|\Google\Protobuf\Internal\RepeatedField $connection_endpoints + * [Output Only] An array of connections for all the producers connected to this network attachment. + * @type string $connection_preference + * + * Check the ConnectionPreference enum for the list of possible values. + * @type string $creation_timestamp + * [Output Only] Creation timestamp in RFC3339 text format. + * @type string $description + * An optional description of this resource. Provide this property when you create the resource. + * @type string $fingerprint + * [Output Only] Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. An up-to-date fingerprint must be provided in order to patch. + * @type int|string $id + * [Output Only] The unique identifier for the resource type. The server generates this identifier. + * @type string $kind + * [Output Only] Type of the resource. + * @type string $name + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + * @type string $network + * [Output Only] The URL of the network which the Network Attachment belongs to. + * @type array|\Google\Protobuf\Internal\RepeatedField $producer_accept_lists + * Projects that are allowed to connect to this network attachment. The project can be specified using its id or number. + * @type array|\Google\Protobuf\Internal\RepeatedField $producer_reject_lists + * Projects that are not allowed to connect to this network attachment. The project can be specified using its id or number. + * @type string $region + * [Output Only] URL of the region where the network attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * @type string $self_link + * [Output Only] Server-defined URL for the resource. + * @type string $self_link_with_id + * [Output Only] Server-defined URL for this resource's resource id. + * @type array|\Google\Protobuf\Internal\RepeatedField $subnetworks + * An array of URLs where each entry is the URL of a subnet provided by the service consumer to use for endpoints in the producers that connect to this network attachment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output Only] An array of connections for all the producers connected to this network attachment. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.NetworkAttachmentConnectedEndpoint connection_endpoints = 326078813; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConnectionEndpoints() + { + return $this->connection_endpoints; + } + + /** + * [Output Only] An array of connections for all the producers connected to this network attachment. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.NetworkAttachmentConnectedEndpoint connection_endpoints = 326078813; + * @param array<\Google\Cloud\Compute\V1\NetworkAttachmentConnectedEndpoint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConnectionEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\NetworkAttachmentConnectedEndpoint::class); + $this->connection_endpoints = $arr; + + return $this; + } + + /** + * + * Check the ConnectionPreference enum for the list of possible values. + * + * Generated from protobuf field optional string connection_preference = 285818076; + * @return string + */ + public function getConnectionPreference() + { + return isset($this->connection_preference) ? $this->connection_preference : ''; + } + + public function hasConnectionPreference() + { + return isset($this->connection_preference); + } + + public function clearConnectionPreference() + { + unset($this->connection_preference); + } + + /** + * + * Check the ConnectionPreference enum for the list of possible values. + * + * Generated from protobuf field optional string connection_preference = 285818076; + * @param string $var + * @return $this + */ + public function setConnectionPreference($var) + { + GPBUtil::checkString($var, True); + $this->connection_preference = $var; + + return $this; + } + + /** + * [Output Only] Creation timestamp in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + * @return string + */ + public function getCreationTimestamp() + { + return isset($this->creation_timestamp) ? $this->creation_timestamp : ''; + } + + public function hasCreationTimestamp() + { + return isset($this->creation_timestamp); + } + + public function clearCreationTimestamp() + { + unset($this->creation_timestamp); + } + + /** + * [Output Only] Creation timestamp in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + * @param string $var + * @return $this + */ + public function setCreationTimestamp($var) + { + GPBUtil::checkString($var, True); + $this->creation_timestamp = $var; + + return $this; + } + + /** + * An optional description of this resource. Provide this property when you create the resource. + * + * Generated from protobuf field optional string description = 422937596; + * @return string + */ + public function getDescription() + { + return isset($this->description) ? $this->description : ''; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * An optional description of this resource. Provide this property when you create the resource. + * + * Generated from protobuf field optional string description = 422937596; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * [Output Only] Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. An up-to-date fingerprint must be provided in order to patch. + * + * Generated from protobuf field optional string fingerprint = 234678500; + * @return string + */ + public function getFingerprint() + { + return isset($this->fingerprint) ? $this->fingerprint : ''; + } + + public function hasFingerprint() + { + return isset($this->fingerprint); + } + + public function clearFingerprint() + { + unset($this->fingerprint); + } + + /** + * [Output Only] Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. An up-to-date fingerprint must be provided in order to patch. + * + * Generated from protobuf field optional string fingerprint = 234678500; + * @param string $var + * @return $this + */ + public function setFingerprint($var) + { + GPBUtil::checkString($var, True); + $this->fingerprint = $var; + + return $this; + } + + /** + * [Output Only] The unique identifier for the resource type. The server generates this identifier. + * + * Generated from protobuf field optional uint64 id = 3355; + * @return int|string + */ + public function getId() + { + return isset($this->id) ? $this->id : 0; + } + + public function hasId() + { + return isset($this->id); + } + + public function clearId() + { + unset($this->id); + } + + /** + * [Output Only] The unique identifier for the resource type. The server generates this identifier. + * + * Generated from protobuf field optional uint64 id = 3355; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkUint64($var); + $this->id = $var; + + return $this; + } + + /** + * [Output Only] Type of the resource. + * + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * [Output Only] Type of the resource. + * + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + * + * Generated from protobuf field optional string name = 3373707; + * @return string + */ + public function getName() + { + return isset($this->name) ? $this->name : ''; + } + + public function hasName() + { + return isset($this->name); + } + + public function clearName() + { + unset($this->name); + } + + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + * + * Generated from protobuf field optional string name = 3373707; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * [Output Only] The URL of the network which the Network Attachment belongs to. + * + * Generated from protobuf field optional string network = 232872494; + * @return string + */ + public function getNetwork() + { + return isset($this->network) ? $this->network : ''; + } + + public function hasNetwork() + { + return isset($this->network); + } + + public function clearNetwork() + { + unset($this->network); + } + + /** + * [Output Only] The URL of the network which the Network Attachment belongs to. + * + * Generated from protobuf field optional string network = 232872494; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Projects that are allowed to connect to this network attachment. The project can be specified using its id or number. + * + * Generated from protobuf field repeated string producer_accept_lists = 202804523; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProducerAcceptLists() + { + return $this->producer_accept_lists; + } + + /** + * Projects that are allowed to connect to this network attachment. The project can be specified using its id or number. + * + * Generated from protobuf field repeated string producer_accept_lists = 202804523; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProducerAcceptLists($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->producer_accept_lists = $arr; + + return $this; + } + + /** + * Projects that are not allowed to connect to this network attachment. The project can be specified using its id or number. + * + * Generated from protobuf field repeated string producer_reject_lists = 4112002; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProducerRejectLists() + { + return $this->producer_reject_lists; + } + + /** + * Projects that are not allowed to connect to this network attachment. The project can be specified using its id or number. + * + * Generated from protobuf field repeated string producer_reject_lists = 4112002; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProducerRejectLists($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->producer_reject_lists = $arr; + + return $this; + } + + /** + * [Output Only] URL of the region where the network attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * + * Generated from protobuf field optional string region = 138946292; + * @return string + */ + public function getRegion() + { + return isset($this->region) ? $this->region : ''; + } + + public function hasRegion() + { + return isset($this->region); + } + + public function clearRegion() + { + unset($this->region); + } + + /** + * [Output Only] URL of the region where the network attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * + * Generated from protobuf field optional string region = 138946292; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for the resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @return string + */ + public function getSelfLink() + { + return isset($this->self_link) ? $this->self_link : ''; + } + + public function hasSelfLink() + { + return isset($this->self_link); + } + + public function clearSelfLink() + { + unset($this->self_link); + } + + /** + * [Output Only] Server-defined URL for the resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for this resource's resource id. + * + * Generated from protobuf field optional string self_link_with_id = 44520962; + * @return string + */ + public function getSelfLinkWithId() + { + return isset($this->self_link_with_id) ? $this->self_link_with_id : ''; + } + + public function hasSelfLinkWithId() + { + return isset($this->self_link_with_id); + } + + public function clearSelfLinkWithId() + { + unset($this->self_link_with_id); + } + + /** + * [Output Only] Server-defined URL for this resource's resource id. + * + * Generated from protobuf field optional string self_link_with_id = 44520962; + * @param string $var + * @return $this + */ + public function setSelfLinkWithId($var) + { + GPBUtil::checkString($var, True); + $this->self_link_with_id = $var; + + return $this; + } + + /** + * An array of URLs where each entry is the URL of a subnet provided by the service consumer to use for endpoints in the producers that connect to this network attachment. + * + * Generated from protobuf field repeated string subnetworks = 415853125; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubnetworks() + { + return $this->subnetworks; + } + + /** + * An array of URLs where each entry is the URL of a subnet provided by the service consumer to use for endpoints in the producers that connect to this network attachment. + * + * Generated from protobuf field repeated string subnetworks = 415853125; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubnetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->subnetworks = $arr; + + return $this; + } + +} + diff --git a/Compute/src/V1/NetworkAttachment/ConnectionPreference.php b/Compute/src/V1/NetworkAttachment/ConnectionPreference.php new file mode 100644 index 000000000000..e78a2160a8ac --- /dev/null +++ b/Compute/src/V1/NetworkAttachment/ConnectionPreference.php @@ -0,0 +1,62 @@ +google.cloud.compute.v1.NetworkAttachment.ConnectionPreference + */ +class ConnectionPreference +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_CONNECTION_PREFERENCE = 0; + */ + const UNDEFINED_CONNECTION_PREFERENCE = 0; + /** + * Generated from protobuf enum ACCEPT_AUTOMATIC = 75250580; + */ + const ACCEPT_AUTOMATIC = 75250580; + /** + * Generated from protobuf enum ACCEPT_MANUAL = 373061341; + */ + const ACCEPT_MANUAL = 373061341; + /** + * Generated from protobuf enum INVALID = 530283991; + */ + const INVALID = 530283991; + + private static $valueToName = [ + self::UNDEFINED_CONNECTION_PREFERENCE => 'UNDEFINED_CONNECTION_PREFERENCE', + self::ACCEPT_AUTOMATIC => 'ACCEPT_AUTOMATIC', + self::ACCEPT_MANUAL => 'ACCEPT_MANUAL', + self::INVALID => 'INVALID', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/NetworkAttachmentAggregatedList.php b/Compute/src/V1/NetworkAttachmentAggregatedList.php new file mode 100644 index 000000000000..508c0cb18e44 --- /dev/null +++ b/Compute/src/V1/NetworkAttachmentAggregatedList.php @@ -0,0 +1,280 @@ +google.cloud.compute.v1.NetworkAttachmentAggregatedList + */ +class NetworkAttachmentAggregatedList extends \Google\Protobuf\Internal\Message +{ + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + */ + private $id = null; + /** + * A list of NetworkAttachmentsScopedList resources. + * + * Generated from protobuf field map items = 100526016; + */ + private $items; + /** + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + */ + private $next_page_token = null; + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + */ + private $self_link = null; + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + */ + private $warning = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * [Output Only] Unique identifier for the resource; defined by the server. + * @type array|\Google\Protobuf\Internal\MapField $items + * A list of NetworkAttachmentsScopedList resources. + * @type string $kind + * @type string $next_page_token + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * @type string $self_link + * [Output Only] Server-defined URL for this resource. + * @type \Google\Cloud\Compute\V1\Warning $warning + * [Output Only] Informational warning message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @return string + */ + public function getId() + { + return isset($this->id) ? $this->id : ''; + } + + public function hasId() + { + return isset($this->id); + } + + public function clearId() + { + unset($this->id); + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * A list of NetworkAttachmentsScopedList resources. + * + * Generated from protobuf field map items = 100526016; + * @return \Google\Protobuf\Internal\MapField + */ + public function getItems() + { + return $this->items; + } + + /** + * A list of NetworkAttachmentsScopedList resources. + * + * Generated from protobuf field map items = 100526016; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\NetworkAttachmentsScopedList::class); + $this->items = $arr; + + return $this; + } + + /** + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @return string + */ + public function getNextPageToken() + { + return isset($this->next_page_token) ? $this->next_page_token : ''; + } + + public function hasNextPageToken() + { + return isset($this->next_page_token); + } + + public function clearNextPageToken() + { + unset($this->next_page_token); + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @return string + */ + public function getSelfLink() + { + return isset($this->self_link) ? $this->self_link : ''; + } + + public function hasSelfLink() + { + return isset($this->self_link); + } + + public function clearSelfLink() + { + unset($this->self_link); + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @return \Google\Cloud\Compute\V1\Warning|null + */ + public function getWarning() + { + return $this->warning; + } + + public function hasWarning() + { + return isset($this->warning); + } + + public function clearWarning() + { + unset($this->warning); + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @param \Google\Cloud\Compute\V1\Warning $var + * @return $this + */ + public function setWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Warning::class); + $this->warning = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/NetworkAttachmentConnectedEndpoint.php b/Compute/src/V1/NetworkAttachmentConnectedEndpoint.php new file mode 100644 index 000000000000..738ba9867457 --- /dev/null +++ b/Compute/src/V1/NetworkAttachmentConnectedEndpoint.php @@ -0,0 +1,247 @@ +google.cloud.compute.v1.NetworkAttachmentConnectedEndpoint + */ +class NetworkAttachmentConnectedEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * The IP address assigned to the producer instance network interface. This value will be a range in case of Serverless. + * + * Generated from protobuf field optional string ip_address = 406272220; + */ + private $ip_address = null; + /** + * The project id or number of the interface to which the IP was assigned. + * + * Generated from protobuf field optional string project_id_or_num = 349783336; + */ + private $project_id_or_num = null; + /** + * Alias IP ranges from the same subnetwork + * + * Generated from protobuf field repeated string secondary_ip_cidr_ranges = 117184788; + */ + private $secondary_ip_cidr_ranges; + /** + * The status of a connected endpoint to this network attachment. + * Check the Status enum for the list of possible values. + * + * Generated from protobuf field optional string status = 181260274; + */ + private $status = null; + /** + * The subnetwork used to assign the IP to the producer instance network interface. + * + * Generated from protobuf field optional string subnetwork = 307827694; + */ + private $subnetwork = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ip_address + * The IP address assigned to the producer instance network interface. This value will be a range in case of Serverless. + * @type string $project_id_or_num + * The project id or number of the interface to which the IP was assigned. + * @type array|\Google\Protobuf\Internal\RepeatedField $secondary_ip_cidr_ranges + * Alias IP ranges from the same subnetwork + * @type string $status + * The status of a connected endpoint to this network attachment. + * Check the Status enum for the list of possible values. + * @type string $subnetwork + * The subnetwork used to assign the IP to the producer instance network interface. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * The IP address assigned to the producer instance network interface. This value will be a range in case of Serverless. + * + * Generated from protobuf field optional string ip_address = 406272220; + * @return string + */ + public function getIpAddress() + { + return isset($this->ip_address) ? $this->ip_address : ''; + } + + public function hasIpAddress() + { + return isset($this->ip_address); + } + + public function clearIpAddress() + { + unset($this->ip_address); + } + + /** + * The IP address assigned to the producer instance network interface. This value will be a range in case of Serverless. + * + * Generated from protobuf field optional string ip_address = 406272220; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * The project id or number of the interface to which the IP was assigned. + * + * Generated from protobuf field optional string project_id_or_num = 349783336; + * @return string + */ + public function getProjectIdOrNum() + { + return isset($this->project_id_or_num) ? $this->project_id_or_num : ''; + } + + public function hasProjectIdOrNum() + { + return isset($this->project_id_or_num); + } + + public function clearProjectIdOrNum() + { + unset($this->project_id_or_num); + } + + /** + * The project id or number of the interface to which the IP was assigned. + * + * Generated from protobuf field optional string project_id_or_num = 349783336; + * @param string $var + * @return $this + */ + public function setProjectIdOrNum($var) + { + GPBUtil::checkString($var, True); + $this->project_id_or_num = $var; + + return $this; + } + + /** + * Alias IP ranges from the same subnetwork + * + * Generated from protobuf field repeated string secondary_ip_cidr_ranges = 117184788; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecondaryIpCidrRanges() + { + return $this->secondary_ip_cidr_ranges; + } + + /** + * Alias IP ranges from the same subnetwork + * + * Generated from protobuf field repeated string secondary_ip_cidr_ranges = 117184788; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecondaryIpCidrRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->secondary_ip_cidr_ranges = $arr; + + return $this; + } + + /** + * The status of a connected endpoint to this network attachment. + * Check the Status enum for the list of possible values. + * + * Generated from protobuf field optional string status = 181260274; + * @return string + */ + public function getStatus() + { + return isset($this->status) ? $this->status : ''; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * The status of a connected endpoint to this network attachment. + * Check the Status enum for the list of possible values. + * + * Generated from protobuf field optional string status = 181260274; + * @param string $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkString($var, True); + $this->status = $var; + + return $this; + } + + /** + * The subnetwork used to assign the IP to the producer instance network interface. + * + * Generated from protobuf field optional string subnetwork = 307827694; + * @return string + */ + public function getSubnetwork() + { + return isset($this->subnetwork) ? $this->subnetwork : ''; + } + + public function hasSubnetwork() + { + return isset($this->subnetwork); + } + + public function clearSubnetwork() + { + unset($this->subnetwork); + } + + /** + * The subnetwork used to assign the IP to the producer instance network interface. + * + * Generated from protobuf field optional string subnetwork = 307827694; + * @param string $var + * @return $this + */ + public function setSubnetwork($var) + { + GPBUtil::checkString($var, True); + $this->subnetwork = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/NetworkAttachmentConnectedEndpoint/Status.php b/Compute/src/V1/NetworkAttachmentConnectedEndpoint/Status.php new file mode 100644 index 000000000000..c58a1d1e2a52 --- /dev/null +++ b/Compute/src/V1/NetworkAttachmentConnectedEndpoint/Status.php @@ -0,0 +1,88 @@ +google.cloud.compute.v1.NetworkAttachmentConnectedEndpoint.Status + */ +class Status +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_STATUS = 0; + */ + const UNDEFINED_STATUS = 0; + /** + * The consumer allows traffic from the producer to reach its VPC. + * + * Generated from protobuf enum ACCEPTED = 246714279; + */ + const ACCEPTED = 246714279; + /** + * The consumer network attachment no longer exists. + * + * Generated from protobuf enum CLOSED = 380163436; + */ + const CLOSED = 380163436; + /** + * The consumer needs to take further action before traffic can be served. + * + * Generated from protobuf enum NEEDS_ATTENTION = 344491452; + */ + const NEEDS_ATTENTION = 344491452; + /** + * The consumer neither allows nor prohibits traffic from the producer to reach its VPC. + * + * Generated from protobuf enum PENDING = 35394935; + */ + const PENDING = 35394935; + /** + * The consumer prohibits traffic from the producer to reach its VPC. + * + * Generated from protobuf enum REJECTED = 174130302; + */ + const REJECTED = 174130302; + /** + * Generated from protobuf enum STATUS_UNSPECIFIED = 42133066; + */ + const STATUS_UNSPECIFIED = 42133066; + + private static $valueToName = [ + self::UNDEFINED_STATUS => 'UNDEFINED_STATUS', + self::ACCEPTED => 'ACCEPTED', + self::CLOSED => 'CLOSED', + self::NEEDS_ATTENTION => 'NEEDS_ATTENTION', + self::PENDING => 'PENDING', + self::REJECTED => 'REJECTED', + self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/NetworkAttachmentList.php b/Compute/src/V1/NetworkAttachmentList.php new file mode 100644 index 000000000000..fc2f089a39c5 --- /dev/null +++ b/Compute/src/V1/NetworkAttachmentList.php @@ -0,0 +1,279 @@ +google.cloud.compute.v1.NetworkAttachmentList + */ +class NetworkAttachmentList extends \Google\Protobuf\Internal\Message +{ + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + */ + private $id = null; + /** + * A list of NetworkAttachment resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.NetworkAttachment items = 100526016; + */ + private $items; + /** + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + */ + private $next_page_token = null; + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + */ + private $self_link = null; + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + */ + private $warning = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * [Output Only] Unique identifier for the resource; defined by the server. + * @type array<\Google\Cloud\Compute\V1\NetworkAttachment>|\Google\Protobuf\Internal\RepeatedField $items + * A list of NetworkAttachment resources. + * @type string $kind + * @type string $next_page_token + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * @type string $self_link + * [Output Only] Server-defined URL for this resource. + * @type \Google\Cloud\Compute\V1\Warning $warning + * [Output Only] Informational warning message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @return string + */ + public function getId() + { + return isset($this->id) ? $this->id : ''; + } + + public function hasId() + { + return isset($this->id); + } + + public function clearId() + { + unset($this->id); + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * A list of NetworkAttachment resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.NetworkAttachment items = 100526016; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * A list of NetworkAttachment resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.NetworkAttachment items = 100526016; + * @param array<\Google\Cloud\Compute\V1\NetworkAttachment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\NetworkAttachment::class); + $this->items = $arr; + + return $this; + } + + /** + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @return string + */ + public function getNextPageToken() + { + return isset($this->next_page_token) ? $this->next_page_token : ''; + } + + public function hasNextPageToken() + { + return isset($this->next_page_token); + } + + public function clearNextPageToken() + { + unset($this->next_page_token); + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @return string + */ + public function getSelfLink() + { + return isset($this->self_link) ? $this->self_link : ''; + } + + public function hasSelfLink() + { + return isset($this->self_link); + } + + public function clearSelfLink() + { + unset($this->self_link); + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @return \Google\Cloud\Compute\V1\Warning|null + */ + public function getWarning() + { + return $this->warning; + } + + public function hasWarning() + { + return isset($this->warning); + } + + public function clearWarning() + { + unset($this->warning); + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @param \Google\Cloud\Compute\V1\Warning $var + * @return $this + */ + public function setWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Warning::class); + $this->warning = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/NetworkAttachmentsClient.php b/Compute/src/V1/NetworkAttachmentsClient.php new file mode 100644 index 000000000000..5afd75077fb1 --- /dev/null +++ b/Compute/src/V1/NetworkAttachmentsClient.php @@ -0,0 +1,34 @@ +google.cloud.compute.v1.NetworkAttachmentsScopedList + */ +class NetworkAttachmentsScopedList extends \Google\Protobuf\Internal\Message +{ + /** + * A list of NetworkAttachments contained in this scope. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.NetworkAttachment network_attachments = 521514783; + */ + private $network_attachments; + /** + * Informational warning which replaces the list of network attachments when the list is empty. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + */ + private $warning = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Compute\V1\NetworkAttachment>|\Google\Protobuf\Internal\RepeatedField $network_attachments + * A list of NetworkAttachments contained in this scope. + * @type \Google\Cloud\Compute\V1\Warning $warning + * Informational warning which replaces the list of network attachments when the list is empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * A list of NetworkAttachments contained in this scope. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.NetworkAttachment network_attachments = 521514783; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkAttachments() + { + return $this->network_attachments; + } + + /** + * A list of NetworkAttachments contained in this scope. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.NetworkAttachment network_attachments = 521514783; + * @param array<\Google\Cloud\Compute\V1\NetworkAttachment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkAttachments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\NetworkAttachment::class); + $this->network_attachments = $arr; + + return $this; + } + + /** + * Informational warning which replaces the list of network attachments when the list is empty. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @return \Google\Cloud\Compute\V1\Warning|null + */ + public function getWarning() + { + return $this->warning; + } + + public function hasWarning() + { + return isset($this->warning); + } + + public function clearWarning() + { + unset($this->warning); + } + + /** + * Informational warning which replaces the list of network attachments when the list is empty. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @param \Google\Cloud\Compute\V1\Warning $var + * @return $this + */ + public function setWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Warning::class); + $this->warning = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/NotificationEndpointGrpcSettings.php b/Compute/src/V1/NotificationEndpointGrpcSettings.php index 2e23feb2ebf4..765fd21d2ea6 100644 --- a/Compute/src/V1/NotificationEndpointGrpcSettings.php +++ b/Compute/src/V1/NotificationEndpointGrpcSettings.php @@ -34,7 +34,7 @@ class NotificationEndpointGrpcSettings extends \Google\Protobuf\Internal\Message */ private $payload_name = null; /** - * Optional. This field is used to configure how often to send a full update of all non-healthy backends. If unspecified, full updates are not sent. If specified, must be in the range between 600 seconds to 3600 seconds. Nanos are disallowed. + * Optional. This field is used to configure how often to send a full update of all non-healthy backends. If unspecified, full updates are not sent. If specified, must be in the range between 600 seconds to 3600 seconds. Nanos are disallowed. Can only be set for regional notification endpoints. * * Generated from protobuf field optional .google.cloud.compute.v1.Duration resend_interval = 478288969; */ @@ -59,7 +59,7 @@ class NotificationEndpointGrpcSettings extends \Google\Protobuf\Internal\Message * @type string $payload_name * Optional. If specified, this field is used to populate the "name" field in gRPC requests. * @type \Google\Cloud\Compute\V1\Duration $resend_interval - * Optional. This field is used to configure how often to send a full update of all non-healthy backends. If unspecified, full updates are not sent. If specified, must be in the range between 600 seconds to 3600 seconds. Nanos are disallowed. + * Optional. This field is used to configure how often to send a full update of all non-healthy backends. If unspecified, full updates are not sent. If specified, must be in the range between 600 seconds to 3600 seconds. Nanos are disallowed. Can only be set for regional notification endpoints. * @type int $retry_duration_sec * How much time (in seconds) is spent attempting notification retries until a successful response is received. Default is 30s. Limit is 20m (1200s). Must be a positive number. * } @@ -178,7 +178,7 @@ public function setPayloadName($var) } /** - * Optional. This field is used to configure how often to send a full update of all non-healthy backends. If unspecified, full updates are not sent. If specified, must be in the range between 600 seconds to 3600 seconds. Nanos are disallowed. + * Optional. This field is used to configure how often to send a full update of all non-healthy backends. If unspecified, full updates are not sent. If specified, must be in the range between 600 seconds to 3600 seconds. Nanos are disallowed. Can only be set for regional notification endpoints. * * Generated from protobuf field optional .google.cloud.compute.v1.Duration resend_interval = 478288969; * @return \Google\Cloud\Compute\V1\Duration|null @@ -199,7 +199,7 @@ public function clearResendInterval() } /** - * Optional. This field is used to configure how often to send a full update of all non-healthy backends. If unspecified, full updates are not sent. If specified, must be in the range between 600 seconds to 3600 seconds. Nanos are disallowed. + * Optional. This field is used to configure how often to send a full update of all non-healthy backends. If unspecified, full updates are not sent. If specified, must be in the range between 600 seconds to 3600 seconds. Nanos are disallowed. Can only be set for regional notification endpoints. * * Generated from protobuf field optional .google.cloud.compute.v1.Duration resend_interval = 478288969; * @param \Google\Cloud\Compute\V1\Duration $var diff --git a/Compute/src/V1/Project.php b/Compute/src/V1/Project.php index 0762dc98c1f4..6eebcd008e8f 100644 --- a/Compute/src/V1/Project.php +++ b/Compute/src/V1/Project.php @@ -88,6 +88,13 @@ class Project extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional .google.cloud.compute.v1.UsageExportLocation usage_export_location = 347543874; */ private $usage_export_location = null; + /** + * [Output Only] Default internal DNS setting used by VMs running in this project. + * Check the VmDnsSetting enum for the list of possible values. + * + * Generated from protobuf field optional string vm_dns_setting = 58856370; + */ + private $vm_dns_setting = null; /** * [Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated. * Check the XpnProjectStatus enum for the list of possible values. @@ -127,6 +134,9 @@ class Project extends \Google\Protobuf\Internal\Message * [Output Only] Server-defined URL for the resource. * @type \Google\Cloud\Compute\V1\UsageExportLocation $usage_export_location * The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored. + * @type string $vm_dns_setting + * [Output Only] Default internal DNS setting used by VMs running in this project. + * Check the VmDnsSetting enum for the list of possible values. * @type string $xpn_project_status * [Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated. * Check the XpnProjectStatus enum for the list of possible values. @@ -551,6 +561,44 @@ public function setUsageExportLocation($var) return $this; } + /** + * [Output Only] Default internal DNS setting used by VMs running in this project. + * Check the VmDnsSetting enum for the list of possible values. + * + * Generated from protobuf field optional string vm_dns_setting = 58856370; + * @return string + */ + public function getVmDnsSetting() + { + return isset($this->vm_dns_setting) ? $this->vm_dns_setting : ''; + } + + public function hasVmDnsSetting() + { + return isset($this->vm_dns_setting); + } + + public function clearVmDnsSetting() + { + unset($this->vm_dns_setting); + } + + /** + * [Output Only] Default internal DNS setting used by VMs running in this project. + * Check the VmDnsSetting enum for the list of possible values. + * + * Generated from protobuf field optional string vm_dns_setting = 58856370; + * @param string $var + * @return $this + */ + public function setVmDnsSetting($var) + { + GPBUtil::checkString($var, True); + $this->vm_dns_setting = $var; + + return $this; + } + /** * [Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated. * Check the XpnProjectStatus enum for the list of possible values. diff --git a/Compute/src/V1/Project/VmDnsSetting.php b/Compute/src/V1/Project/VmDnsSetting.php new file mode 100644 index 000000000000..7247d9015444 --- /dev/null +++ b/Compute/src/V1/Project/VmDnsSetting.php @@ -0,0 +1,68 @@ +google.cloud.compute.v1.Project.VmDnsSetting + */ +class VmDnsSetting +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_VM_DNS_SETTING = 0; + */ + const UNDEFINED_VM_DNS_SETTING = 0; + /** + * Generated from protobuf enum GLOBAL_DEFAULT = 345419141; + */ + const GLOBAL_DEFAULT = 345419141; + /** + * Generated from protobuf enum UNSPECIFIED_VM_DNS_SETTING = 35691930; + */ + const UNSPECIFIED_VM_DNS_SETTING = 35691930; + /** + * Generated from protobuf enum ZONAL_DEFAULT = 368475782; + */ + const ZONAL_DEFAULT = 368475782; + /** + * Generated from protobuf enum ZONAL_ONLY = 521198951; + */ + const ZONAL_ONLY = 521198951; + + private static $valueToName = [ + self::UNDEFINED_VM_DNS_SETTING => 'UNDEFINED_VM_DNS_SETTING', + self::GLOBAL_DEFAULT => 'GLOBAL_DEFAULT', + self::UNSPECIFIED_VM_DNS_SETTING => 'UNSPECIFIED_VM_DNS_SETTING', + self::ZONAL_DEFAULT => 'ZONAL_DEFAULT', + self::ZONAL_ONLY => 'ZONAL_ONLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/Quota/Metric.php b/Compute/src/V1/Quota/Metric.php index b6e74461da2f..399eddae9817 100644 --- a/Compute/src/V1/Quota/Metric.php +++ b/Compute/src/V1/Quota/Metric.php @@ -185,14 +185,30 @@ class Metric * Generated from protobuf enum FORWARDING_RULES = 432668949; */ const FORWARDING_RULES = 432668949; + /** + * Generated from protobuf enum GLOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES = 164566753; + */ + const GLOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES = 164566753; /** * Generated from protobuf enum GLOBAL_EXTERNAL_MANAGED_FORWARDING_RULES = 327611949; */ const GLOBAL_EXTERNAL_MANAGED_FORWARDING_RULES = 327611949; + /** + * Generated from protobuf enum GLOBAL_EXTERNAL_PROXY_LB_BACKEND_SERVICES = 400256169; + */ + const GLOBAL_EXTERNAL_PROXY_LB_BACKEND_SERVICES = 400256169; /** * Generated from protobuf enum GLOBAL_INTERNAL_ADDRESSES = 42738332; */ const GLOBAL_INTERNAL_ADDRESSES = 42738332; + /** + * Generated from protobuf enum GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES = 256608303; + */ + const GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES = 256608303; + /** + * Generated from protobuf enum GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES = 323514196; + */ + const GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES = 323514196; /** * Generated from protobuf enum GPUS_ALL_REGIONS = 39387177; */ @@ -429,10 +445,26 @@ class Metric * Generated from protobuf enum REGIONAL_AUTOSCALERS = 29363772; */ const REGIONAL_AUTOSCALERS = 29363772; + /** + * Generated from protobuf enum REGIONAL_EXTERNAL_MANAGED_BACKEND_SERVICES = 4240989; + */ + const REGIONAL_EXTERNAL_MANAGED_BACKEND_SERVICES = 4240989; + /** + * Generated from protobuf enum REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SERVICES = 409564525; + */ + const REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SERVICES = 409564525; /** * Generated from protobuf enum REGIONAL_INSTANCE_GROUP_MANAGERS = 37543696; */ const REGIONAL_INSTANCE_GROUP_MANAGERS = 37543696; + /** + * Generated from protobuf enum REGIONAL_INTERNAL_LB_BACKEND_SERVICES = 137983760; + */ + const REGIONAL_INTERNAL_LB_BACKEND_SERVICES = 137983760; + /** + * Generated from protobuf enum REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES = 96282539; + */ + const REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES = 96282539; /** * Generated from protobuf enum RESERVATIONS = 32644647; */ @@ -599,8 +631,12 @@ class Metric self::EXTERNAL_VPN_GATEWAYS => 'EXTERNAL_VPN_GATEWAYS', self::FIREWALLS => 'FIREWALLS', self::FORWARDING_RULES => 'FORWARDING_RULES', + self::GLOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES => 'GLOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES', self::GLOBAL_EXTERNAL_MANAGED_FORWARDING_RULES => 'GLOBAL_EXTERNAL_MANAGED_FORWARDING_RULES', + self::GLOBAL_EXTERNAL_PROXY_LB_BACKEND_SERVICES => 'GLOBAL_EXTERNAL_PROXY_LB_BACKEND_SERVICES', self::GLOBAL_INTERNAL_ADDRESSES => 'GLOBAL_INTERNAL_ADDRESSES', + self::GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES => 'GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES', + self::GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES => 'GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES', self::GPUS_ALL_REGIONS => 'GPUS_ALL_REGIONS', self::HEALTH_CHECKS => 'HEALTH_CHECKS', self::IMAGES => 'IMAGES', @@ -660,7 +696,11 @@ class Metric self::PUBLIC_ADVERTISED_PREFIXES => 'PUBLIC_ADVERTISED_PREFIXES', self::PUBLIC_DELEGATED_PREFIXES => 'PUBLIC_DELEGATED_PREFIXES', self::REGIONAL_AUTOSCALERS => 'REGIONAL_AUTOSCALERS', + self::REGIONAL_EXTERNAL_MANAGED_BACKEND_SERVICES => 'REGIONAL_EXTERNAL_MANAGED_BACKEND_SERVICES', + self::REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SERVICES => 'REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SERVICES', self::REGIONAL_INSTANCE_GROUP_MANAGERS => 'REGIONAL_INSTANCE_GROUP_MANAGERS', + self::REGIONAL_INTERNAL_LB_BACKEND_SERVICES => 'REGIONAL_INTERNAL_LB_BACKEND_SERVICES', + self::REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES => 'REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES', self::RESERVATIONS => 'RESERVATIONS', self::RESOURCE_POLICIES => 'RESOURCE_POLICIES', self::ROUTERS => 'ROUTERS', diff --git a/Compute/src/V1/Reservation.php b/Compute/src/V1/Reservation.php index 4a1fbe083f17..27d4d4833bf5 100644 --- a/Compute/src/V1/Reservation.php +++ b/Compute/src/V1/Reservation.php @@ -51,6 +51,12 @@ class Reservation extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional string name = 3373707; */ private $name = null; + /** + * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation. + * + * Generated from protobuf field map resource_policies = 22220385; + */ + private $resource_policies; /** * [Output Only] Reserved for future use. * @@ -113,6 +119,8 @@ class Reservation extends \Google\Protobuf\Internal\Message * [Output Only] Type of the resource. Always compute#reservations for reservations. * @type string $name * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + * @type array|\Google\Protobuf\Internal\MapField $resource_policies + * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation. * @type bool $satisfies_pzs * [Output Only] Reserved for future use. * @type string $self_link @@ -351,6 +359,32 @@ public function setName($var) return $this; } + /** + * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation. + * + * Generated from protobuf field map resource_policies = 22220385; + * @return \Google\Protobuf\Internal\MapField + */ + public function getResourcePolicies() + { + return $this->resource_policies; + } + + /** + * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation. + * + * Generated from protobuf field map resource_policies = 22220385; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setResourcePolicies($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->resource_policies = $arr; + + return $this; + } + /** * [Output Only] Reserved for future use. * diff --git a/Compute/src/V1/ResourceCommitment.php b/Compute/src/V1/ResourceCommitment.php index 47ce8c1790f8..72e0fe4719fe 100644 --- a/Compute/src/V1/ResourceCommitment.php +++ b/Compute/src/V1/ResourceCommitment.php @@ -28,7 +28,7 @@ class ResourceCommitment extends \Google\Protobuf\Internal\Message */ private $amount = null; /** - * Type of resource for which this commitment applies. Possible values are VCPU and MEMORY + * Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR. * Check the Type enum for the list of possible values. * * Generated from protobuf field optional string type = 3575610; @@ -46,7 +46,7 @@ class ResourceCommitment extends \Google\Protobuf\Internal\Message * @type int|string $amount * The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU. * @type string $type - * Type of resource for which this commitment applies. Possible values are VCPU and MEMORY + * Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR. * Check the Type enum for the list of possible values. * } */ @@ -128,7 +128,7 @@ public function setAmount($var) } /** - * Type of resource for which this commitment applies. Possible values are VCPU and MEMORY + * Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR. * Check the Type enum for the list of possible values. * * Generated from protobuf field optional string type = 3575610; @@ -150,7 +150,7 @@ public function clearType() } /** - * Type of resource for which this commitment applies. Possible values are VCPU and MEMORY + * Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR. * Check the Type enum for the list of possible values. * * Generated from protobuf field optional string type = 3575610; diff --git a/Compute/src/V1/ResourceCommitment/Type.php b/Compute/src/V1/ResourceCommitment/Type.php index a4ddcc0e6b2c..7cceb6234dc1 100644 --- a/Compute/src/V1/ResourceCommitment/Type.php +++ b/Compute/src/V1/ResourceCommitment/Type.php @@ -7,7 +7,7 @@ use UnexpectedValueException; /** - * Type of resource for which this commitment applies. Possible values are VCPU and MEMORY + * Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR. * * Protobuf type google.cloud.compute.v1.ResourceCommitment.Type */ diff --git a/Compute/src/V1/ServiceAttachmentConsumerProjectLimit.php b/Compute/src/V1/ServiceAttachmentConsumerProjectLimit.php index 6ae1ca951d98..db10b6a59654 100644 --- a/Compute/src/V1/ServiceAttachmentConsumerProjectLimit.php +++ b/Compute/src/V1/ServiceAttachmentConsumerProjectLimit.php @@ -20,6 +20,12 @@ class ServiceAttachmentConsumerProjectLimit extends \Google\Protobuf\Internal\Me * Generated from protobuf field optional uint32 connection_limit = 131403546; */ private $connection_limit = null; + /** + * The network URL for the network to set the limit for. + * + * Generated from protobuf field optional string network_url = 207194078; + */ + private $network_url = null; /** * The project id or number for the project to set the limit for. * @@ -35,6 +41,8 @@ class ServiceAttachmentConsumerProjectLimit extends \Google\Protobuf\Internal\Me * * @type int $connection_limit * The value of the limit to set. + * @type string $network_url + * The network URL for the network to set the limit for. * @type string $project_id_or_num * The project id or number for the project to set the limit for. * } @@ -80,6 +88,42 @@ public function setConnectionLimit($var) return $this; } + /** + * The network URL for the network to set the limit for. + * + * Generated from protobuf field optional string network_url = 207194078; + * @return string + */ + public function getNetworkUrl() + { + return isset($this->network_url) ? $this->network_url : ''; + } + + public function hasNetworkUrl() + { + return isset($this->network_url); + } + + public function clearNetworkUrl() + { + unset($this->network_url); + } + + /** + * The network URL for the network to set the limit for. + * + * Generated from protobuf field optional string network_url = 207194078; + * @param string $var + * @return $this + */ + public function setNetworkUrl($var) + { + GPBUtil::checkString($var, True); + $this->network_url = $var; + + return $this; + } + /** * The project id or number for the project to set the limit for. * diff --git a/Compute/src/V1/SetIamPolicyNetworkAttachmentRequest.php b/Compute/src/V1/SetIamPolicyNetworkAttachmentRequest.php new file mode 100644 index 000000000000..453df145f96d --- /dev/null +++ b/Compute/src/V1/SetIamPolicyNetworkAttachmentRequest.php @@ -0,0 +1,179 @@ +google.cloud.compute.v1.SetIamPolicyNetworkAttachmentRequest + */ +class SetIamPolicyNetworkAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * The name of the region for this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + */ + private $region = ''; + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.RegionSetPolicyRequest region_set_policy_request_resource = 276489091 [(.google.api.field_behavior) = REQUIRED]; + */ + private $region_set_policy_request_resource = null; + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resource = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID for this request. + * @type string $region + * The name of the region for this request. + * @type \Google\Cloud\Compute\V1\RegionSetPolicyRequest $region_set_policy_request_resource + * The body resource for this request + * @type string $resource + * Name or id of the resource for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The name of the region for this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The name of the region for this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.RegionSetPolicyRequest region_set_policy_request_resource = 276489091 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Compute\V1\RegionSetPolicyRequest|null + */ + public function getRegionSetPolicyRequestResource() + { + return $this->region_set_policy_request_resource; + } + + public function hasRegionSetPolicyRequestResource() + { + return isset($this->region_set_policy_request_resource); + } + + public function clearRegionSetPolicyRequestResource() + { + unset($this->region_set_policy_request_resource); + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.RegionSetPolicyRequest region_set_policy_request_resource = 276489091 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Compute\V1\RegionSetPolicyRequest $var + * @return $this + */ + public function setRegionSetPolicyRequestResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\RegionSetPolicyRequest::class); + $this->region_set_policy_request_resource = $var; + + return $this; + } + + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/StopInstanceRequest.php b/Compute/src/V1/StopInstanceRequest.php index f9ec4ea974d1..72c235604291 100644 --- a/Compute/src/V1/StopInstanceRequest.php +++ b/Compute/src/V1/StopInstanceRequest.php @@ -15,6 +15,12 @@ */ class StopInstanceRequest extends \Google\Protobuf\Internal\Message { + /** + * If true, discard the contents of any attached localSSD partitions. Default value is false. + * + * Generated from protobuf field optional bool discard_local_ssd = 319517903; + */ + private $discard_local_ssd = null; /** * Name of the instance resource to stop. * @@ -46,6 +52,8 @@ class StopInstanceRequest extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * + * @type bool $discard_local_ssd + * If true, discard the contents of any attached localSSD partitions. Default value is false. * @type string $instance * Name of the instance resource to stop. * @type string $project @@ -61,6 +69,42 @@ public function __construct($data = NULL) { parent::__construct($data); } + /** + * If true, discard the contents of any attached localSSD partitions. Default value is false. + * + * Generated from protobuf field optional bool discard_local_ssd = 319517903; + * @return bool + */ + public function getDiscardLocalSsd() + { + return isset($this->discard_local_ssd) ? $this->discard_local_ssd : false; + } + + public function hasDiscardLocalSsd() + { + return isset($this->discard_local_ssd); + } + + public function clearDiscardLocalSsd() + { + unset($this->discard_local_ssd); + } + + /** + * If true, discard the contents of any attached localSSD partitions. Default value is false. + * + * Generated from protobuf field optional bool discard_local_ssd = 319517903; + * @param bool $var + * @return $this + */ + public function setDiscardLocalSsd($var) + { + GPBUtil::checkBool($var); + $this->discard_local_ssd = $var; + + return $this; + } + /** * Name of the instance resource to stop. * diff --git a/Compute/src/V1/SuspendInstanceRequest.php b/Compute/src/V1/SuspendInstanceRequest.php index 2b804fb69577..78782474fb91 100644 --- a/Compute/src/V1/SuspendInstanceRequest.php +++ b/Compute/src/V1/SuspendInstanceRequest.php @@ -15,6 +15,12 @@ */ class SuspendInstanceRequest extends \Google\Protobuf\Internal\Message { + /** + * If true, discard the contents of any attached localSSD partitions. Default value is false. + * + * Generated from protobuf field optional bool discard_local_ssd = 319517903; + */ + private $discard_local_ssd = null; /** * Name of the instance resource to suspend. * @@ -46,6 +52,8 @@ class SuspendInstanceRequest extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * + * @type bool $discard_local_ssd + * If true, discard the contents of any attached localSSD partitions. Default value is false. * @type string $instance * Name of the instance resource to suspend. * @type string $project @@ -61,6 +69,42 @@ public function __construct($data = NULL) { parent::__construct($data); } + /** + * If true, discard the contents of any attached localSSD partitions. Default value is false. + * + * Generated from protobuf field optional bool discard_local_ssd = 319517903; + * @return bool + */ + public function getDiscardLocalSsd() + { + return isset($this->discard_local_ssd) ? $this->discard_local_ssd : false; + } + + public function hasDiscardLocalSsd() + { + return isset($this->discard_local_ssd); + } + + public function clearDiscardLocalSsd() + { + unset($this->discard_local_ssd); + } + + /** + * If true, discard the contents of any attached localSSD partitions. Default value is false. + * + * Generated from protobuf field optional bool discard_local_ssd = 319517903; + * @param bool $var + * @return $this + */ + public function setDiscardLocalSsd($var) + { + GPBUtil::checkBool($var); + $this->discard_local_ssd = $var; + + return $this; + } + /** * Name of the instance resource to suspend. * diff --git a/Compute/src/V1/TestIamPermissionsNetworkAttachmentRequest.php b/Compute/src/V1/TestIamPermissionsNetworkAttachmentRequest.php new file mode 100644 index 000000000000..12c1569ac2a2 --- /dev/null +++ b/Compute/src/V1/TestIamPermissionsNetworkAttachmentRequest.php @@ -0,0 +1,179 @@ +google.cloud.compute.v1.TestIamPermissionsNetworkAttachmentRequest + */ +class TestIamPermissionsNetworkAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * The name of the region for this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + */ + private $region = ''; + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resource = ''; + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.TestPermissionsRequest test_permissions_request_resource = 439214758 [(.google.api.field_behavior) = REQUIRED]; + */ + private $test_permissions_request_resource = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID for this request. + * @type string $region + * The name of the region for this request. + * @type string $resource + * Name or id of the resource for this request. + * @type \Google\Cloud\Compute\V1\TestPermissionsRequest $test_permissions_request_resource + * The body resource for this request + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The name of the region for this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The name of the region for this request. + * + * Generated from protobuf field string region = 138946292 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.TestPermissionsRequest test_permissions_request_resource = 439214758 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Compute\V1\TestPermissionsRequest|null + */ + public function getTestPermissionsRequestResource() + { + return $this->test_permissions_request_resource; + } + + public function hasTestPermissionsRequestResource() + { + return isset($this->test_permissions_request_resource); + } + + public function clearTestPermissionsRequestResource() + { + unset($this->test_permissions_request_resource); + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.TestPermissionsRequest test_permissions_request_resource = 439214758 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Compute\V1\TestPermissionsRequest $var + * @return $this + */ + public function setTestPermissionsRequestResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\TestPermissionsRequest::class); + $this->test_permissions_request_resource = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/gapic_metadata.json b/Compute/src/V1/gapic_metadata.json index 449e7b29365e..6b181d2ff795 100644 --- a/Compute/src/V1/gapic_metadata.json +++ b/Compute/src/V1/gapic_metadata.json @@ -1584,6 +1584,55 @@ } } }, + "NetworkAttachments": { + "clients": { + "grpc": { + "libraryClient": "NetworkAttachmentsGapicClient", + "rpcs": { + "AggregatedList": { + "methods": [ + "aggregatedList" + ] + }, + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, "NetworkEdgeSecurityServices": { "clients": { "grpc": { diff --git a/Compute/src/V1/resources/network_attachments_client_config.json b/Compute/src/V1/resources/network_attachments_client_config.json new file mode 100644 index 000000000000..aa993a541b69 --- /dev/null +++ b/Compute/src/V1/resources/network_attachments_client_config.json @@ -0,0 +1,85 @@ +{ + "interfaces": { + "google.cloud.compute.v1.NetworkAttachments": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "AggregatedList": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "Delete": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "Insert": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/Compute/src/V1/resources/network_attachments_descriptor_config.php b/Compute/src/V1/resources/network_attachments_descriptor_config.php new file mode 100644 index 000000000000..7d2206b77c87 --- /dev/null +++ b/Compute/src/V1/resources/network_attachments_descriptor_config.php @@ -0,0 +1,60 @@ + [ + 'google.cloud.compute.v1.NetworkAttachments' => [ + 'Delete' => [ + 'longRunning' => [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getRegion', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ], + ], + 'Insert' => [ + 'longRunning' => [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getRegion', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ], + ], + 'AggregatedList' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getMaxResults', + 'requestPageSizeSetMethod' => 'setMaxResults', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getItems', + ], + ], + 'List' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getMaxResults', + 'requestPageSizeSetMethod' => 'setMaxResults', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getItems', + ], + ], + ], + ], +]; diff --git a/Compute/src/V1/resources/network_attachments_rest_client_config.php b/Compute/src/V1/resources/network_attachments_rest_client_config.php new file mode 100644 index 000000000000..090684726909 --- /dev/null +++ b/Compute/src/V1/resources/network_attachments_rest_client_config.php @@ -0,0 +1,240 @@ + [ + 'google.cloud.compute.v1.NetworkAttachments' => [ + 'AggregatedList' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/aggregated/networkAttachments', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/compute/v1/projects/{project}/regions/{region}/networkAttachments/{network_attachment}', + 'placeholders' => [ + 'network_attachment' => [ + 'getters' => [ + 'getNetworkAttachment', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'region' => [ + 'getters' => [ + 'getRegion', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/regions/{region}/networkAttachments/{network_attachment}', + 'placeholders' => [ + 'network_attachment' => [ + 'getters' => [ + 'getNetworkAttachment', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'region' => [ + 'getters' => [ + 'getRegion', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/regions/{region}/networkAttachments/{resource}/getIamPolicy', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'region' => [ + 'getters' => [ + 'getRegion', + ], + ], + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/compute/v1/projects/{project}/regions/{region}/networkAttachments', + 'body' => 'network_attachment_resource', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'region' => [ + 'getters' => [ + 'getRegion', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/regions/{region}/networkAttachments', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'region' => [ + 'getters' => [ + 'getRegion', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/compute/v1/projects/{project}/regions/{region}/networkAttachments/{resource}/setIamPolicy', + 'body' => 'region_set_policy_request_resource', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'region' => [ + 'getters' => [ + 'getRegion', + ], + ], + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/compute/v1/projects/{project}/regions/{region}/networkAttachments/{resource}/testIamPermissions', + 'body' => 'test_permissions_request_resource', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'region' => [ + 'getters' => [ + 'getRegion', + ], + ], + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.cloud.compute.v1.RegionOperations' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/compute/v1/projects/{project}/regions/{region}/operations/{operation}', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'region' => [ + 'getters' => [ + 'getRegion', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/regions/{region}/operations/{operation}', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'region' => [ + 'getters' => [ + 'getRegion', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/regions/{region}/operations', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'region' => [ + 'getters' => [ + 'getRegion', + ], + ], + ], + ], + 'Wait' => [ + 'method' => 'post', + 'uriTemplate' => '/compute/v1/projects/{project}/regions/{region}/operations/{operation}/wait', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'region' => [ + 'getters' => [ + 'getRegion', + ], + ], + ], + ], + ], + ], +]; diff --git a/Compute/tests/Unit/V1/NetworkAttachmentsClientTest.php b/Compute/tests/Unit/V1/NetworkAttachmentsClientTest.php new file mode 100644 index 000000000000..4bb8c8a26c42 --- /dev/null +++ b/Compute/tests/Unit/V1/NetworkAttachmentsClientTest.php @@ -0,0 +1,769 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return NetworkAttachmentsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NetworkAttachmentsClient($options); + } + + /** @test */ + public function aggregatedListTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = ''; + $selfLink = 'selfLink-1691268851'; + $items = [ + 'itemsKey' => new NetworkAttachmentsScopedList(), + ]; + $expectedResponse = new NetworkAttachmentAggregatedList(); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setItems($items); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $response = $gapicClient->aggregatedList($project); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertArrayHasKey('itemsKey', $expectedResponse->getItems()); + $this->assertArrayHasKey('itemsKey', $resources); + $this->assertEquals($expectedResponse->getItems()['itemsKey'], $resources['itemsKey']); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.NetworkAttachments/AggregatedList', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function aggregatedListExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + try { + $gapicClient->aggregatedList($project); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new RegionOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/deleteTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/deleteTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $networkAttachment = 'networkAttachment1835256788'; + $project = 'project-309310695'; + $region = 'region-934795532'; + $response = $gapicClient->delete($networkAttachment, $project, $region); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.NetworkAttachments/Delete', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getNetworkAttachment(); + $this->assertProtobufEquals($networkAttachment, $actualValue); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getRegion(); + $this->assertProtobufEquals($region, $actualValue); + $expectedOperationsRequestObject = new GetRegionOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setRegion($region); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.RegionOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new RegionOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/deleteExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $networkAttachment = 'networkAttachment1835256788'; + $project = 'project-309310695'; + $region = 'region-934795532'; + $response = $gapicClient->delete($networkAttachment, $project, $region); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $connectionPreference = 'connectionPreference822688988'; + $creationTimestamp = 'creationTimestamp567396278'; + $description = 'description-1724546052'; + $fingerprint = 'fingerprint-1375934236'; + $id = 3355; + $kind = 'kind3292052'; + $name = 'name3373707'; + $network = 'network1843485230'; + $region2 = 'region2-690338393'; + $selfLink = 'selfLink-1691268851'; + $selfLinkWithId = 'selfLinkWithId-1029220862'; + $expectedResponse = new NetworkAttachment(); + $expectedResponse->setConnectionPreference($connectionPreference); + $expectedResponse->setCreationTimestamp($creationTimestamp); + $expectedResponse->setDescription($description); + $expectedResponse->setFingerprint($fingerprint); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setName($name); + $expectedResponse->setNetwork($network); + $expectedResponse->setRegion($region2); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setSelfLinkWithId($selfLinkWithId); + $transport->addResponse($expectedResponse); + // Mock request + $networkAttachment = 'networkAttachment1835256788'; + $project = 'project-309310695'; + $region = 'region-934795532'; + $response = $gapicClient->get($networkAttachment, $project, $region); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.NetworkAttachments/Get', $actualFuncCall); + $actualValue = $actualRequestObject->getNetworkAttachment(); + $this->assertProtobufEquals($networkAttachment, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getRegion(); + $this->assertProtobufEquals($region, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $networkAttachment = 'networkAttachment1835256788'; + $project = 'project-309310695'; + $region = 'region-934795532'; + try { + $gapicClient->get($networkAttachment, $project, $region); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $iamOwned = false; + $version = 351608024; + $expectedResponse = new Policy(); + $expectedResponse->setEtag($etag); + $expectedResponse->setIamOwned($iamOwned); + $expectedResponse->setVersion($version); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $region = 'region-934795532'; + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($project, $region, $resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.NetworkAttachments/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getRegion(); + $this->assertProtobufEquals($region, $actualValue); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $region = 'region-934795532'; + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($project, $region, $resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new RegionOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/insertTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/insertTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $networkAttachmentResource = new NetworkAttachment(); + $project = 'project-309310695'; + $region = 'region-934795532'; + $response = $gapicClient->insert($networkAttachmentResource, $project, $region); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.NetworkAttachments/Insert', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getNetworkAttachmentResource(); + $this->assertProtobufEquals($networkAttachmentResource, $actualValue); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getRegion(); + $this->assertProtobufEquals($region, $actualValue); + $expectedOperationsRequestObject = new GetRegionOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setRegion($region); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.RegionOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new RegionOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/insertExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $networkAttachmentResource = new NetworkAttachment(); + $project = 'project-309310695'; + $region = 'region-934795532'; + $response = $gapicClient->insert($networkAttachmentResource, $project, $region); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = ''; + $selfLink = 'selfLink-1691268851'; + $itemsElement = new NetworkAttachment(); + $items = [ + $itemsElement, + ]; + $expectedResponse = new NetworkAttachmentList(); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setItems($items); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $region = 'region-934795532'; + $response = $gapicClient->list($project, $region); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getItems()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.NetworkAttachments/List', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getRegion(); + $this->assertProtobufEquals($region, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $region = 'region-934795532'; + try { + $gapicClient->list($project, $region); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $iamOwned = false; + $version = 351608024; + $expectedResponse = new Policy(); + $expectedResponse->setEtag($etag); + $expectedResponse->setIamOwned($iamOwned); + $expectedResponse->setVersion($version); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $region = 'region-934795532'; + $regionSetPolicyRequestResource = new RegionSetPolicyRequest(); + $resource = 'resource-341064690'; + $response = $gapicClient->setIamPolicy($project, $region, $regionSetPolicyRequestResource, $resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.NetworkAttachments/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getRegion(); + $this->assertProtobufEquals($region, $actualValue); + $actualValue = $actualRequestObject->getRegionSetPolicyRequestResource(); + $this->assertProtobufEquals($regionSetPolicyRequestResource, $actualValue); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $region = 'region-934795532'; + $regionSetPolicyRequestResource = new RegionSetPolicyRequest(); + $resource = 'resource-341064690'; + try { + $gapicClient->setIamPolicy($project, $region, $regionSetPolicyRequestResource, $resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $region = 'region-934795532'; + $resource = 'resource-341064690'; + $testPermissionsRequestResource = new TestPermissionsRequest(); + $response = $gapicClient->testIamPermissions($project, $region, $resource, $testPermissionsRequestResource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.NetworkAttachments/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getRegion(); + $this->assertProtobufEquals($region, $actualValue); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getTestPermissionsRequestResource(); + $this->assertProtobufEquals($testPermissionsRequestResource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $region = 'region-934795532'; + $resource = 'resource-341064690'; + $testPermissionsRequestResource = new TestPermissionsRequest(); + try { + $gapicClient->testIamPermissions($project, $region, $resource, $testPermissionsRequestResource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/Compute/tests/Unit/V1/ProjectsClientTest.php b/Compute/tests/Unit/V1/ProjectsClientTest.php index bcd35fa4f297..002944417b24 100644 --- a/Compute/tests/Unit/V1/ProjectsClientTest.php +++ b/Compute/tests/Unit/V1/ProjectsClientTest.php @@ -539,6 +539,7 @@ public function getTest() $kind = 'kind3292052'; $name = 'name3373707'; $selfLink = 'selfLink-1691268851'; + $vmDnsSetting = 'vmDnsSetting1132598194'; $xpnProjectStatus = 'xpnProjectStatus-308451647'; $expectedResponse = new Project(); $expectedResponse->setCreationTimestamp($creationTimestamp); @@ -549,6 +550,7 @@ public function getTest() $expectedResponse->setKind($kind); $expectedResponse->setName($name); $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setVmDnsSetting($vmDnsSetting); $expectedResponse->setXpnProjectStatus($xpnProjectStatus); $transport->addResponse($expectedResponse); // Mock request @@ -615,6 +617,7 @@ public function getXpnHostTest() $kind = 'kind3292052'; $name = 'name3373707'; $selfLink = 'selfLink-1691268851'; + $vmDnsSetting = 'vmDnsSetting1132598194'; $xpnProjectStatus = 'xpnProjectStatus-308451647'; $expectedResponse = new Project(); $expectedResponse->setCreationTimestamp($creationTimestamp); @@ -625,6 +628,7 @@ public function getXpnHostTest() $expectedResponse->setKind($kind); $expectedResponse->setName($name); $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setVmDnsSetting($vmDnsSetting); $expectedResponse->setXpnProjectStatus($xpnProjectStatus); $transport->addResponse($expectedResponse); // Mock request From 44bb316b4fa658b8349646729e820fa38cc5c426 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 16:37:42 -0800 Subject: [PATCH 5/9] docs: [Translate] fix minor docstring formatting (#5677) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: fix minor docstring formatting PiperOrigin-RevId: 493589316 Source-Link: https://github.com/googleapis/googleapis/commit/02e385025d20dc2aea7b1ffa7a1d4e6133534d85 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab49dcf5608e7159d07f53bd888f97d2092035e7 Copy-Tag: eyJwIjoiVHJhbnNsYXRlLy5Pd2xCb3QueWFtbCIsImgiOiJhYjQ5ZGNmNTYwOGU3MTU5ZDA3ZjUzYmQ4ODhmOTdkMjA5MjAzNWU3In0= * 🦉 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 --- Translate/src/V3/OutputConfig.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Translate/src/V3/OutputConfig.php b/Translate/src/V3/OutputConfig.php index 36699ec7d1e8..e6b91925abc1 100644 --- a/Translate/src/V3/OutputConfig.php +++ b/Translate/src/V3/OutputConfig.php @@ -55,7 +55,7 @@ class OutputConfig extends \Google\Protobuf\Internal\Message * that may avoid file updating. * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) * The format of translations_file (for target language code 'trg') is: - * gs://translation_test/a_b_c_'trg'_translations.[extension] + * `gs://translation_test/a_b_c_'trg'_translations.[extension]` * If the input file extension is tsv, the output has the following * columns: * Column 1: ID of the request provided in the input, if it's not @@ -122,7 +122,7 @@ public function __construct($data = NULL) { * that may avoid file updating. * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) * The format of translations_file (for target language code 'trg') is: - * gs://translation_test/a_b_c_'trg'_translations.[extension] + * `gs://translation_test/a_b_c_'trg'_translations.[extension]` * If the input file extension is tsv, the output has the following * columns: * Column 1: ID of the request provided in the input, if it's not @@ -196,7 +196,7 @@ public function hasGcsDestination() * that may avoid file updating. * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) * The format of translations_file (for target language code 'trg') is: - * gs://translation_test/a_b_c_'trg'_translations.[extension] + * `gs://translation_test/a_b_c_'trg'_translations.[extension]` * If the input file extension is tsv, the output has the following * columns: * Column 1: ID of the request provided in the input, if it's not From 42e734c699d5b7224a84c518c35a729be172637f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 16:46:52 -0800 Subject: [PATCH 6/9] feat: [Speech] Added new fields to facilitate debugging (#5668) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Added new fields to facilitate debugging * Added new field to Speech response proto, to give more information to indicate whether, or not, Biasing was applied (eg. did Biasing application timed out). * Added request_id to Speech response protos. PiperOrigin-RevId: 492276727 Source-Link: https://github.com/googleapis/googleapis/commit/4c253358b1d4add3bf74707d5f58d44e044c5da8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f15b9aca7ac2bd40b20e6715188732d08fc7fe21 Copy-Tag: eyJwIjoiU3BlZWNoLy5Pd2xCb3QueWFtbCIsImgiOiJmMTViOWFjYTdhYzJiZDQwYjIwZTY3MTUxODg3MzJkMDhmYzdmZTIxIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore(bazel): update gapic-generator-php to v1.6.2 PiperOrigin-RevId: 493134713 Source-Link: https://github.com/googleapis/googleapis/commit/83d92bdcb2b923097dc9a23cba8a347def413df5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/223117b72af12c6b9ab611f310729c3a2f493f2f Copy-Tag: eyJwIjoiU3BlZWNoLy5Pd2xCb3QueWFtbCIsImgiOiIyMjMxMTdiNzJhZjEyYzZiOWFiNjExZjMxMDcyOWMzYTJmNDkzZjJmIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Added new fields to facilitate debugging * Added new field to Speech response proto, to give more information to indicate whether, or not, Biasing was applied (eg. did Biasing application timed out). * Added request_id to Speech response protos. PiperOrigin-RevId: 493311906 Source-Link: https://github.com/googleapis/googleapis/commit/c9b244b4f64f3841be796762e6f2c5f219c443f8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d63ac840dec854ee7acab7b52b15deaf819eae07 Copy-Tag: eyJwIjoiU3BlZWNoLy5Pd2xCb3QueWFtbCIsImgiOiJkNjNhYzg0MGRlYzg1NGVlN2FjYWI3YjUyYjE1ZGVhZjgxOWVhZTA3In0= * 🦉 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 --- Speech/metadata/V1/CloudSpeech.php | Bin 6882 -> 7253 bytes Speech/metadata/V1P1Beta1/CloudSpeech.php | Bin 7446 -> 7838 bytes .../AdaptationClient/create_custom_class.php | 83 ++++++ .../V1/AdaptationClient/create_phrase_set.php | 85 ++++++ .../AdaptationClient/delete_custom_class.php | 72 +++++ .../V1/AdaptationClient/delete_phrase_set.php | 66 +++++ .../V1/AdaptationClient/get_custom_class.php | 68 +++++ .../V1/AdaptationClient/get_phrase_set.php | 74 +++++ .../AdaptationClient/list_custom_classes.php | 79 ++++++ .../V1/AdaptationClient/list_phrase_set.php | 79 ++++++ .../AdaptationClient/update_custom_class.php | 56 ++++ .../V1/AdaptationClient/update_phrase_set.php | 56 ++++ .../SpeechClient/long_running_recognize.php | 94 +++++++ Speech/samples/V1/SpeechClient/recognize.php | 78 ++++++ .../V1/SpeechClient/streaming_recognize.php | 64 +++++ .../AdaptationClient/create_custom_class.php | 83 ++++++ .../AdaptationClient/create_phrase_set.php | 85 ++++++ .../AdaptationClient/delete_custom_class.php | 72 +++++ .../AdaptationClient/delete_phrase_set.php | 66 +++++ .../AdaptationClient/get_custom_class.php | 68 +++++ .../AdaptationClient/get_phrase_set.php | 74 +++++ .../AdaptationClient/list_custom_classes.php | 79 ++++++ .../AdaptationClient/list_phrase_set.php | 79 ++++++ .../AdaptationClient/update_custom_class.php | 56 ++++ .../AdaptationClient/update_phrase_set.php | 56 ++++ .../SpeechClient/long_running_recognize.php | 94 +++++++ .../V1p1beta1/SpeechClient/recognize.php | 78 ++++++ .../SpeechClient/streaming_recognize.php | 64 +++++ .../V2/SpeechClient/batch_recognize.php | 80 ++++++ .../V2/SpeechClient/create_custom_class.php | 82 ++++++ .../V2/SpeechClient/create_phrase_set.php | 82 ++++++ .../V2/SpeechClient/create_recognizer.php | 126 +++++++++ .../V2/SpeechClient/delete_custom_class.php | 80 ++++++ .../V2/SpeechClient/delete_phrase_set.php | 79 ++++++ .../V2/SpeechClient/delete_recognizer.php | 79 ++++++ Speech/samples/V2/SpeechClient/get_config.php | 68 +++++ .../V2/SpeechClient/get_custom_class.php | 68 +++++ .../V2/SpeechClient/get_phrase_set.php | 68 +++++ .../V2/SpeechClient/get_recognizer.php | 70 +++++ .../V2/SpeechClient/list_custom_classes.php | 72 +++++ .../V2/SpeechClient/list_phrase_sets.php | 72 +++++ .../V2/SpeechClient/list_recognizers.php | 72 +++++ Speech/samples/V2/SpeechClient/recognize.php | 69 +++++ .../V2/SpeechClient/streaming_recognize.php | 83 ++++++ .../V2/SpeechClient/undelete_custom_class.php | 80 ++++++ .../V2/SpeechClient/undelete_phrase_set.php | 79 ++++++ .../V2/SpeechClient/undelete_recognizer.php | 79 ++++++ .../samples/V2/SpeechClient/update_config.php | 56 ++++ .../V2/SpeechClient/update_custom_class.php | 68 +++++ .../V2/SpeechClient/update_phrase_set.php | 68 +++++ .../V2/SpeechClient/update_recognizer.php | 121 +++++++++ Speech/src/V1/Gapic/AdaptationGapicClient.php | 26 +- Speech/src/V1/Gapic/SpeechGapicClient.php | 27 +- .../src/V1/LongRunningRecognizeResponse.php | 82 ++++++ Speech/src/V1/RecognitionConfig.php | 12 +- Speech/src/V1/RecognizeResponse.php | 82 ++++++ Speech/src/V1/SpeechAdaptationInfo.php | 109 ++++++++ Speech/src/V1/StreamingRecognizeResponse.php | 82 ++++++ .../V1p1beta1/Gapic/AdaptationGapicClient.php | 26 +- .../src/V1p1beta1/Gapic/SpeechGapicClient.php | 27 +- .../LongRunningRecognizeResponse.php | 82 ++++++ Speech/src/V1p1beta1/RecognitionConfig.php | 12 +- Speech/src/V1p1beta1/RecognizeResponse.php | 82 ++++++ Speech/src/V1p1beta1/SpeechAdaptationInfo.php | 109 ++++++++ .../V1p1beta1/StreamingRecognizeResponse.php | 82 ++++++ Speech/src/V2/Gapic/SpeechGapicClient.php | 29 +- Speech/tests/Unit/V1/AdaptationClientTest.php | 94 ++----- Speech/tests/Unit/V1/SpeechClientTest.php | 53 ++-- .../Unit/V1p1beta1/AdaptationClientTest.php | 94 ++----- .../tests/Unit/V1p1beta1/SpeechClientTest.php | 53 ++-- Speech/tests/Unit/V2/SpeechClientTest.php | 254 ++++++------------ 71 files changed, 4622 insertions(+), 504 deletions(-) create mode 100644 Speech/samples/V1/AdaptationClient/create_custom_class.php create mode 100644 Speech/samples/V1/AdaptationClient/create_phrase_set.php create mode 100644 Speech/samples/V1/AdaptationClient/delete_custom_class.php create mode 100644 Speech/samples/V1/AdaptationClient/delete_phrase_set.php create mode 100644 Speech/samples/V1/AdaptationClient/get_custom_class.php create mode 100644 Speech/samples/V1/AdaptationClient/get_phrase_set.php create mode 100644 Speech/samples/V1/AdaptationClient/list_custom_classes.php create mode 100644 Speech/samples/V1/AdaptationClient/list_phrase_set.php create mode 100644 Speech/samples/V1/AdaptationClient/update_custom_class.php create mode 100644 Speech/samples/V1/AdaptationClient/update_phrase_set.php create mode 100644 Speech/samples/V1/SpeechClient/long_running_recognize.php create mode 100644 Speech/samples/V1/SpeechClient/recognize.php create mode 100644 Speech/samples/V1/SpeechClient/streaming_recognize.php create mode 100644 Speech/samples/V1p1beta1/AdaptationClient/create_custom_class.php create mode 100644 Speech/samples/V1p1beta1/AdaptationClient/create_phrase_set.php create mode 100644 Speech/samples/V1p1beta1/AdaptationClient/delete_custom_class.php create mode 100644 Speech/samples/V1p1beta1/AdaptationClient/delete_phrase_set.php create mode 100644 Speech/samples/V1p1beta1/AdaptationClient/get_custom_class.php create mode 100644 Speech/samples/V1p1beta1/AdaptationClient/get_phrase_set.php create mode 100644 Speech/samples/V1p1beta1/AdaptationClient/list_custom_classes.php create mode 100644 Speech/samples/V1p1beta1/AdaptationClient/list_phrase_set.php create mode 100644 Speech/samples/V1p1beta1/AdaptationClient/update_custom_class.php create mode 100644 Speech/samples/V1p1beta1/AdaptationClient/update_phrase_set.php create mode 100644 Speech/samples/V1p1beta1/SpeechClient/long_running_recognize.php create mode 100644 Speech/samples/V1p1beta1/SpeechClient/recognize.php create mode 100644 Speech/samples/V1p1beta1/SpeechClient/streaming_recognize.php create mode 100644 Speech/samples/V2/SpeechClient/batch_recognize.php create mode 100644 Speech/samples/V2/SpeechClient/create_custom_class.php create mode 100644 Speech/samples/V2/SpeechClient/create_phrase_set.php create mode 100644 Speech/samples/V2/SpeechClient/create_recognizer.php create mode 100644 Speech/samples/V2/SpeechClient/delete_custom_class.php create mode 100644 Speech/samples/V2/SpeechClient/delete_phrase_set.php create mode 100644 Speech/samples/V2/SpeechClient/delete_recognizer.php create mode 100644 Speech/samples/V2/SpeechClient/get_config.php create mode 100644 Speech/samples/V2/SpeechClient/get_custom_class.php create mode 100644 Speech/samples/V2/SpeechClient/get_phrase_set.php create mode 100644 Speech/samples/V2/SpeechClient/get_recognizer.php create mode 100644 Speech/samples/V2/SpeechClient/list_custom_classes.php create mode 100644 Speech/samples/V2/SpeechClient/list_phrase_sets.php create mode 100644 Speech/samples/V2/SpeechClient/list_recognizers.php create mode 100644 Speech/samples/V2/SpeechClient/recognize.php create mode 100644 Speech/samples/V2/SpeechClient/streaming_recognize.php create mode 100644 Speech/samples/V2/SpeechClient/undelete_custom_class.php create mode 100644 Speech/samples/V2/SpeechClient/undelete_phrase_set.php create mode 100644 Speech/samples/V2/SpeechClient/undelete_recognizer.php create mode 100644 Speech/samples/V2/SpeechClient/update_config.php create mode 100644 Speech/samples/V2/SpeechClient/update_custom_class.php create mode 100644 Speech/samples/V2/SpeechClient/update_phrase_set.php create mode 100644 Speech/samples/V2/SpeechClient/update_recognizer.php create mode 100644 Speech/src/V1/SpeechAdaptationInfo.php create mode 100644 Speech/src/V1p1beta1/SpeechAdaptationInfo.php diff --git a/Speech/metadata/V1/CloudSpeech.php b/Speech/metadata/V1/CloudSpeech.php index 23e2bd7b0593eedfab77b458c8c71277e439e207..e5311095829abe62685bc0c268cb419be7810df5 100644 GIT binary patch delta 347 zcmaE4devgXJ7%W&2Ae-Hd-5{Aoopr8qa@_RC01OJnwp#upO}(ZP?A`ZnV%P*nU|I? z!LGol!EK~7IZ;q}sDxSRB@>s-q)XtUM&0vpTQtq1PtZ^8N7MEh#s@A zk~fz~FxbnEa36!6BE=Mah_}tXu;>7e+2^OFP=jOBG GqRaqN=W5LW delta 77 zcmca=@yK+;J7%Uex|=^Rd-5`NPqq^5VO45p;*yyxC?z)8L$H4GA)x|Rr45W=5s}Gj fg=e!oXX28Y{ENQzwXig`xFkL^MS=q;&8+lqvcHJB!R^wPLN5PeMQ(AS?)1&NljiTEi(DNG~4DPQEocreateCustomClass($formattedParent, $customClassId, $customClass); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]'); + $customClassId = '[CUSTOM_CLASS_ID]'; + + create_custom_class_sample($formattedParent, $customClassId); +} +// [END speech_v1_generated_Adaptation_CreateCustomClass_sync] diff --git a/Speech/samples/V1/AdaptationClient/create_phrase_set.php b/Speech/samples/V1/AdaptationClient/create_phrase_set.php new file mode 100644 index 000000000000..b80945708f93 --- /dev/null +++ b/Speech/samples/V1/AdaptationClient/create_phrase_set.php @@ -0,0 +1,85 @@ +createPhraseSet($formattedParent, $phraseSetId, $phraseSet); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]'); + $phraseSetId = '[PHRASE_SET_ID]'; + + create_phrase_set_sample($formattedParent, $phraseSetId); +} +// [END speech_v1_generated_Adaptation_CreatePhraseSet_sync] diff --git a/Speech/samples/V1/AdaptationClient/delete_custom_class.php b/Speech/samples/V1/AdaptationClient/delete_custom_class.php new file mode 100644 index 000000000000..759bfb2ac363 --- /dev/null +++ b/Speech/samples/V1/AdaptationClient/delete_custom_class.php @@ -0,0 +1,72 @@ +deleteCustomClass($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AdaptationClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]'); + + delete_custom_class_sample($formattedName); +} +// [END speech_v1_generated_Adaptation_DeleteCustomClass_sync] diff --git a/Speech/samples/V1/AdaptationClient/delete_phrase_set.php b/Speech/samples/V1/AdaptationClient/delete_phrase_set.php new file mode 100644 index 000000000000..bd5258137a94 --- /dev/null +++ b/Speech/samples/V1/AdaptationClient/delete_phrase_set.php @@ -0,0 +1,66 @@ +deletePhraseSet($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AdaptationClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]'); + + delete_phrase_set_sample($formattedName); +} +// [END speech_v1_generated_Adaptation_DeletePhraseSet_sync] diff --git a/Speech/samples/V1/AdaptationClient/get_custom_class.php b/Speech/samples/V1/AdaptationClient/get_custom_class.php new file mode 100644 index 000000000000..febf338fd587 --- /dev/null +++ b/Speech/samples/V1/AdaptationClient/get_custom_class.php @@ -0,0 +1,68 @@ +getCustomClass($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AdaptationClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]'); + + get_custom_class_sample($formattedName); +} +// [END speech_v1_generated_Adaptation_GetCustomClass_sync] diff --git a/Speech/samples/V1/AdaptationClient/get_phrase_set.php b/Speech/samples/V1/AdaptationClient/get_phrase_set.php new file mode 100644 index 000000000000..8e8ebe4d3113 --- /dev/null +++ b/Speech/samples/V1/AdaptationClient/get_phrase_set.php @@ -0,0 +1,74 @@ +getPhraseSet($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AdaptationClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]'); + + get_phrase_set_sample($formattedName); +} +// [END speech_v1_generated_Adaptation_GetPhraseSet_sync] diff --git a/Speech/samples/V1/AdaptationClient/list_custom_classes.php b/Speech/samples/V1/AdaptationClient/list_custom_classes.php new file mode 100644 index 000000000000..f703a24a89dc --- /dev/null +++ b/Speech/samples/V1/AdaptationClient/list_custom_classes.php @@ -0,0 +1,79 @@ +listCustomClasses($formattedParent); + + /** @var CustomClass $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]'); + + list_custom_classes_sample($formattedParent); +} +// [END speech_v1_generated_Adaptation_ListCustomClasses_sync] diff --git a/Speech/samples/V1/AdaptationClient/list_phrase_set.php b/Speech/samples/V1/AdaptationClient/list_phrase_set.php new file mode 100644 index 000000000000..f055fcf6eb19 --- /dev/null +++ b/Speech/samples/V1/AdaptationClient/list_phrase_set.php @@ -0,0 +1,79 @@ +listPhraseSet($formattedParent); + + /** @var PhraseSet $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]'); + + list_phrase_set_sample($formattedParent); +} +// [END speech_v1_generated_Adaptation_ListPhraseSet_sync] diff --git a/Speech/samples/V1/AdaptationClient/update_custom_class.php b/Speech/samples/V1/AdaptationClient/update_custom_class.php new file mode 100644 index 000000000000..a8a280ee846e --- /dev/null +++ b/Speech/samples/V1/AdaptationClient/update_custom_class.php @@ -0,0 +1,56 @@ +updateCustomClass($customClass); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END speech_v1_generated_Adaptation_UpdateCustomClass_sync] diff --git a/Speech/samples/V1/AdaptationClient/update_phrase_set.php b/Speech/samples/V1/AdaptationClient/update_phrase_set.php new file mode 100644 index 000000000000..b5ee842c09c3 --- /dev/null +++ b/Speech/samples/V1/AdaptationClient/update_phrase_set.php @@ -0,0 +1,56 @@ +updatePhraseSet($phraseSet); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END speech_v1_generated_Adaptation_UpdatePhraseSet_sync] diff --git a/Speech/samples/V1/SpeechClient/long_running_recognize.php b/Speech/samples/V1/SpeechClient/long_running_recognize.php new file mode 100644 index 000000000000..9187f2df9774 --- /dev/null +++ b/Speech/samples/V1/SpeechClient/long_running_recognize.php @@ -0,0 +1,94 @@ +setLanguageCode($configLanguageCode); + $audio = new RecognitionAudio(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $speechClient->longRunningRecognize($config, $audio); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LongRunningRecognizeResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $configLanguageCode = '[LANGUAGE_CODE]'; + + long_running_recognize_sample($configLanguageCode); +} +// [END speech_v1_generated_Speech_LongRunningRecognize_sync] diff --git a/Speech/samples/V1/SpeechClient/recognize.php b/Speech/samples/V1/SpeechClient/recognize.php new file mode 100644 index 000000000000..aaaa2960b4e3 --- /dev/null +++ b/Speech/samples/V1/SpeechClient/recognize.php @@ -0,0 +1,78 @@ +setLanguageCode($configLanguageCode); + $audio = new RecognitionAudio(); + + // Call the API and handle any network failures. + try { + /** @var RecognizeResponse $response */ + $response = $speechClient->recognize($config, $audio); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $configLanguageCode = '[LANGUAGE_CODE]'; + + recognize_sample($configLanguageCode); +} +// [END speech_v1_generated_Speech_Recognize_sync] diff --git a/Speech/samples/V1/SpeechClient/streaming_recognize.php b/Speech/samples/V1/SpeechClient/streaming_recognize.php new file mode 100644 index 000000000000..65e577c10183 --- /dev/null +++ b/Speech/samples/V1/SpeechClient/streaming_recognize.php @@ -0,0 +1,64 @@ +streamingRecognize(); + $stream->writeAll([$request,]); + + /** @var StreamingRecognizeResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END speech_v1_generated_Speech_StreamingRecognize_sync] diff --git a/Speech/samples/V1p1beta1/AdaptationClient/create_custom_class.php b/Speech/samples/V1p1beta1/AdaptationClient/create_custom_class.php new file mode 100644 index 000000000000..19dc739949b5 --- /dev/null +++ b/Speech/samples/V1p1beta1/AdaptationClient/create_custom_class.php @@ -0,0 +1,83 @@ +createCustomClass($formattedParent, $customClassId, $customClass); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]'); + $customClassId = '[CUSTOM_CLASS_ID]'; + + create_custom_class_sample($formattedParent, $customClassId); +} +// [END speech_v1p1beta1_generated_Adaptation_CreateCustomClass_sync] diff --git a/Speech/samples/V1p1beta1/AdaptationClient/create_phrase_set.php b/Speech/samples/V1p1beta1/AdaptationClient/create_phrase_set.php new file mode 100644 index 000000000000..b1486237883e --- /dev/null +++ b/Speech/samples/V1p1beta1/AdaptationClient/create_phrase_set.php @@ -0,0 +1,85 @@ +createPhraseSet($formattedParent, $phraseSetId, $phraseSet); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]'); + $phraseSetId = '[PHRASE_SET_ID]'; + + create_phrase_set_sample($formattedParent, $phraseSetId); +} +// [END speech_v1p1beta1_generated_Adaptation_CreatePhraseSet_sync] diff --git a/Speech/samples/V1p1beta1/AdaptationClient/delete_custom_class.php b/Speech/samples/V1p1beta1/AdaptationClient/delete_custom_class.php new file mode 100644 index 000000000000..f6072b426f5f --- /dev/null +++ b/Speech/samples/V1p1beta1/AdaptationClient/delete_custom_class.php @@ -0,0 +1,72 @@ +deleteCustomClass($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AdaptationClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]'); + + delete_custom_class_sample($formattedName); +} +// [END speech_v1p1beta1_generated_Adaptation_DeleteCustomClass_sync] diff --git a/Speech/samples/V1p1beta1/AdaptationClient/delete_phrase_set.php b/Speech/samples/V1p1beta1/AdaptationClient/delete_phrase_set.php new file mode 100644 index 000000000000..2856cfa44ea6 --- /dev/null +++ b/Speech/samples/V1p1beta1/AdaptationClient/delete_phrase_set.php @@ -0,0 +1,66 @@ +deletePhraseSet($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AdaptationClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]'); + + delete_phrase_set_sample($formattedName); +} +// [END speech_v1p1beta1_generated_Adaptation_DeletePhraseSet_sync] diff --git a/Speech/samples/V1p1beta1/AdaptationClient/get_custom_class.php b/Speech/samples/V1p1beta1/AdaptationClient/get_custom_class.php new file mode 100644 index 000000000000..be37118462a6 --- /dev/null +++ b/Speech/samples/V1p1beta1/AdaptationClient/get_custom_class.php @@ -0,0 +1,68 @@ +getCustomClass($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AdaptationClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]'); + + get_custom_class_sample($formattedName); +} +// [END speech_v1p1beta1_generated_Adaptation_GetCustomClass_sync] diff --git a/Speech/samples/V1p1beta1/AdaptationClient/get_phrase_set.php b/Speech/samples/V1p1beta1/AdaptationClient/get_phrase_set.php new file mode 100644 index 000000000000..2943e8ad490b --- /dev/null +++ b/Speech/samples/V1p1beta1/AdaptationClient/get_phrase_set.php @@ -0,0 +1,74 @@ +getPhraseSet($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AdaptationClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]'); + + get_phrase_set_sample($formattedName); +} +// [END speech_v1p1beta1_generated_Adaptation_GetPhraseSet_sync] diff --git a/Speech/samples/V1p1beta1/AdaptationClient/list_custom_classes.php b/Speech/samples/V1p1beta1/AdaptationClient/list_custom_classes.php new file mode 100644 index 000000000000..0c048c13a492 --- /dev/null +++ b/Speech/samples/V1p1beta1/AdaptationClient/list_custom_classes.php @@ -0,0 +1,79 @@ +listCustomClasses($formattedParent); + + /** @var CustomClass $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]'); + + list_custom_classes_sample($formattedParent); +} +// [END speech_v1p1beta1_generated_Adaptation_ListCustomClasses_sync] diff --git a/Speech/samples/V1p1beta1/AdaptationClient/list_phrase_set.php b/Speech/samples/V1p1beta1/AdaptationClient/list_phrase_set.php new file mode 100644 index 000000000000..3c6877f7d98f --- /dev/null +++ b/Speech/samples/V1p1beta1/AdaptationClient/list_phrase_set.php @@ -0,0 +1,79 @@ +listPhraseSet($formattedParent); + + /** @var PhraseSet $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]'); + + list_phrase_set_sample($formattedParent); +} +// [END speech_v1p1beta1_generated_Adaptation_ListPhraseSet_sync] diff --git a/Speech/samples/V1p1beta1/AdaptationClient/update_custom_class.php b/Speech/samples/V1p1beta1/AdaptationClient/update_custom_class.php new file mode 100644 index 000000000000..58960d08bbe8 --- /dev/null +++ b/Speech/samples/V1p1beta1/AdaptationClient/update_custom_class.php @@ -0,0 +1,56 @@ +updateCustomClass($customClass); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END speech_v1p1beta1_generated_Adaptation_UpdateCustomClass_sync] diff --git a/Speech/samples/V1p1beta1/AdaptationClient/update_phrase_set.php b/Speech/samples/V1p1beta1/AdaptationClient/update_phrase_set.php new file mode 100644 index 000000000000..781ec8fa9a6e --- /dev/null +++ b/Speech/samples/V1p1beta1/AdaptationClient/update_phrase_set.php @@ -0,0 +1,56 @@ +updatePhraseSet($phraseSet); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END speech_v1p1beta1_generated_Adaptation_UpdatePhraseSet_sync] diff --git a/Speech/samples/V1p1beta1/SpeechClient/long_running_recognize.php b/Speech/samples/V1p1beta1/SpeechClient/long_running_recognize.php new file mode 100644 index 000000000000..b2c2ce5c4428 --- /dev/null +++ b/Speech/samples/V1p1beta1/SpeechClient/long_running_recognize.php @@ -0,0 +1,94 @@ +setLanguageCode($configLanguageCode); + $audio = new RecognitionAudio(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $speechClient->longRunningRecognize($config, $audio); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LongRunningRecognizeResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $configLanguageCode = '[LANGUAGE_CODE]'; + + long_running_recognize_sample($configLanguageCode); +} +// [END speech_v1p1beta1_generated_Speech_LongRunningRecognize_sync] diff --git a/Speech/samples/V1p1beta1/SpeechClient/recognize.php b/Speech/samples/V1p1beta1/SpeechClient/recognize.php new file mode 100644 index 000000000000..1dcd0be97ee7 --- /dev/null +++ b/Speech/samples/V1p1beta1/SpeechClient/recognize.php @@ -0,0 +1,78 @@ +setLanguageCode($configLanguageCode); + $audio = new RecognitionAudio(); + + // Call the API and handle any network failures. + try { + /** @var RecognizeResponse $response */ + $response = $speechClient->recognize($config, $audio); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $configLanguageCode = '[LANGUAGE_CODE]'; + + recognize_sample($configLanguageCode); +} +// [END speech_v1p1beta1_generated_Speech_Recognize_sync] diff --git a/Speech/samples/V1p1beta1/SpeechClient/streaming_recognize.php b/Speech/samples/V1p1beta1/SpeechClient/streaming_recognize.php new file mode 100644 index 000000000000..19ba8ce80e0d --- /dev/null +++ b/Speech/samples/V1p1beta1/SpeechClient/streaming_recognize.php @@ -0,0 +1,64 @@ +streamingRecognize(); + $stream->writeAll([$request,]); + + /** @var StreamingRecognizeResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END speech_v1p1beta1_generated_Speech_StreamingRecognize_sync] diff --git a/Speech/samples/V2/SpeechClient/batch_recognize.php b/Speech/samples/V2/SpeechClient/batch_recognize.php new file mode 100644 index 000000000000..41c95d8ad3e0 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/batch_recognize.php @@ -0,0 +1,80 @@ +batchRecognize($formattedRecognizer); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchRecognizeResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRecognizer = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]'); + + batch_recognize_sample($formattedRecognizer); +} +// [END speech_v2_generated_Speech_BatchRecognize_sync] diff --git a/Speech/samples/V2/SpeechClient/create_custom_class.php b/Speech/samples/V2/SpeechClient/create_custom_class.php new file mode 100644 index 000000000000..a1352d3e290d --- /dev/null +++ b/Speech/samples/V2/SpeechClient/create_custom_class.php @@ -0,0 +1,82 @@ +createCustomClass($customClass, $formattedParent); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CustomClass $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]'); + + create_custom_class_sample($formattedParent); +} +// [END speech_v2_generated_Speech_CreateCustomClass_sync] diff --git a/Speech/samples/V2/SpeechClient/create_phrase_set.php b/Speech/samples/V2/SpeechClient/create_phrase_set.php new file mode 100644 index 000000000000..3f6b66a8546c --- /dev/null +++ b/Speech/samples/V2/SpeechClient/create_phrase_set.php @@ -0,0 +1,82 @@ +createPhraseSet($phraseSet, $formattedParent); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PhraseSet $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]'); + + create_phrase_set_sample($formattedParent); +} +// [END speech_v2_generated_Speech_CreatePhraseSet_sync] diff --git a/Speech/samples/V2/SpeechClient/create_recognizer.php b/Speech/samples/V2/SpeechClient/create_recognizer.php new file mode 100644 index 000000000000..a73007361091 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/create_recognizer.php @@ -0,0 +1,126 @@ +setModel($recognizerModel) + ->setLanguageCodes($recognizerLanguageCodes); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $speechClient->createRecognizer($recognizer, $formattedParent); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Recognizer $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $recognizerModel = '[MODEL]'; + $recognizerLanguageCodesElement = '[LANGUAGE_CODES]'; + $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]'); + + create_recognizer_sample($recognizerModel, $recognizerLanguageCodesElement, $formattedParent); +} +// [END speech_v2_generated_Speech_CreateRecognizer_sync] diff --git a/Speech/samples/V2/SpeechClient/delete_custom_class.php b/Speech/samples/V2/SpeechClient/delete_custom_class.php new file mode 100644 index 000000000000..beb8f22fcd83 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/delete_custom_class.php @@ -0,0 +1,80 @@ +deleteCustomClass($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CustomClass $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SpeechClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]'); + + delete_custom_class_sample($formattedName); +} +// [END speech_v2_generated_Speech_DeleteCustomClass_sync] diff --git a/Speech/samples/V2/SpeechClient/delete_phrase_set.php b/Speech/samples/V2/SpeechClient/delete_phrase_set.php new file mode 100644 index 000000000000..a36cd010a9d4 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/delete_phrase_set.php @@ -0,0 +1,79 @@ +deletePhraseSet($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PhraseSet $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SpeechClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]'); + + delete_phrase_set_sample($formattedName); +} +// [END speech_v2_generated_Speech_DeletePhraseSet_sync] diff --git a/Speech/samples/V2/SpeechClient/delete_recognizer.php b/Speech/samples/V2/SpeechClient/delete_recognizer.php new file mode 100644 index 000000000000..24c70de46681 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/delete_recognizer.php @@ -0,0 +1,79 @@ +deleteRecognizer($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Recognizer $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]'); + + delete_recognizer_sample($formattedName); +} +// [END speech_v2_generated_Speech_DeleteRecognizer_sync] diff --git a/Speech/samples/V2/SpeechClient/get_config.php b/Speech/samples/V2/SpeechClient/get_config.php new file mode 100644 index 000000000000..506640c1da87 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/get_config.php @@ -0,0 +1,68 @@ +getConfig($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SpeechClient::configName('[PROJECT]', '[LOCATION]'); + + get_config_sample($formattedName); +} +// [END speech_v2_generated_Speech_GetConfig_sync] diff --git a/Speech/samples/V2/SpeechClient/get_custom_class.php b/Speech/samples/V2/SpeechClient/get_custom_class.php new file mode 100644 index 000000000000..1665e6c65b17 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/get_custom_class.php @@ -0,0 +1,68 @@ +getCustomClass($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SpeechClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]'); + + get_custom_class_sample($formattedName); +} +// [END speech_v2_generated_Speech_GetCustomClass_sync] diff --git a/Speech/samples/V2/SpeechClient/get_phrase_set.php b/Speech/samples/V2/SpeechClient/get_phrase_set.php new file mode 100644 index 000000000000..8669545cd64b --- /dev/null +++ b/Speech/samples/V2/SpeechClient/get_phrase_set.php @@ -0,0 +1,68 @@ +getPhraseSet($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SpeechClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]'); + + get_phrase_set_sample($formattedName); +} +// [END speech_v2_generated_Speech_GetPhraseSet_sync] diff --git a/Speech/samples/V2/SpeechClient/get_recognizer.php b/Speech/samples/V2/SpeechClient/get_recognizer.php new file mode 100644 index 000000000000..9e1e0a9349f0 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/get_recognizer.php @@ -0,0 +1,70 @@ +getRecognizer($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]'); + + get_recognizer_sample($formattedName); +} +// [END speech_v2_generated_Speech_GetRecognizer_sync] diff --git a/Speech/samples/V2/SpeechClient/list_custom_classes.php b/Speech/samples/V2/SpeechClient/list_custom_classes.php new file mode 100644 index 000000000000..52b96d802100 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/list_custom_classes.php @@ -0,0 +1,72 @@ +listCustomClasses($formattedParent); + + /** @var CustomClass $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]'); + + list_custom_classes_sample($formattedParent); +} +// [END speech_v2_generated_Speech_ListCustomClasses_sync] diff --git a/Speech/samples/V2/SpeechClient/list_phrase_sets.php b/Speech/samples/V2/SpeechClient/list_phrase_sets.php new file mode 100644 index 000000000000..f6903a65284e --- /dev/null +++ b/Speech/samples/V2/SpeechClient/list_phrase_sets.php @@ -0,0 +1,72 @@ +listPhraseSets($formattedParent); + + /** @var PhraseSet $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]'); + + list_phrase_sets_sample($formattedParent); +} +// [END speech_v2_generated_Speech_ListPhraseSets_sync] diff --git a/Speech/samples/V2/SpeechClient/list_recognizers.php b/Speech/samples/V2/SpeechClient/list_recognizers.php new file mode 100644 index 000000000000..c0584f43adb8 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/list_recognizers.php @@ -0,0 +1,72 @@ +listRecognizers($formattedParent); + + /** @var Recognizer $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]'); + + list_recognizers_sample($formattedParent); +} +// [END speech_v2_generated_Speech_ListRecognizers_sync] diff --git a/Speech/samples/V2/SpeechClient/recognize.php b/Speech/samples/V2/SpeechClient/recognize.php new file mode 100644 index 000000000000..b7a73f6240b7 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/recognize.php @@ -0,0 +1,69 @@ +recognize($formattedRecognizer); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRecognizer = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]'); + + recognize_sample($formattedRecognizer); +} +// [END speech_v2_generated_Speech_Recognize_sync] diff --git a/Speech/samples/V2/SpeechClient/streaming_recognize.php b/Speech/samples/V2/SpeechClient/streaming_recognize.php new file mode 100644 index 000000000000..1f4eeb0154a6 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/streaming_recognize.php @@ -0,0 +1,83 @@ +setRecognizer($formattedRecognizer); + + // Call the API and handle any network failures. + try { + /** @var BidiStream $stream */ + $stream = $speechClient->streamingRecognize(); + $stream->writeAll([$request,]); + + /** @var StreamingRecognizeResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRecognizer = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]'); + + streaming_recognize_sample($formattedRecognizer); +} +// [END speech_v2_generated_Speech_StreamingRecognize_sync] diff --git a/Speech/samples/V2/SpeechClient/undelete_custom_class.php b/Speech/samples/V2/SpeechClient/undelete_custom_class.php new file mode 100644 index 000000000000..e357cfa3d43e --- /dev/null +++ b/Speech/samples/V2/SpeechClient/undelete_custom_class.php @@ -0,0 +1,80 @@ +undeleteCustomClass($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CustomClass $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SpeechClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]'); + + undelete_custom_class_sample($formattedName); +} +// [END speech_v2_generated_Speech_UndeleteCustomClass_sync] diff --git a/Speech/samples/V2/SpeechClient/undelete_phrase_set.php b/Speech/samples/V2/SpeechClient/undelete_phrase_set.php new file mode 100644 index 000000000000..90d6edc1abca --- /dev/null +++ b/Speech/samples/V2/SpeechClient/undelete_phrase_set.php @@ -0,0 +1,79 @@ +undeletePhraseSet($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PhraseSet $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SpeechClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]'); + + undelete_phrase_set_sample($formattedName); +} +// [END speech_v2_generated_Speech_UndeletePhraseSet_sync] diff --git a/Speech/samples/V2/SpeechClient/undelete_recognizer.php b/Speech/samples/V2/SpeechClient/undelete_recognizer.php new file mode 100644 index 000000000000..d4c59b0833c2 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/undelete_recognizer.php @@ -0,0 +1,79 @@ +undeleteRecognizer($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Recognizer $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]'); + + undelete_recognizer_sample($formattedName); +} +// [END speech_v2_generated_Speech_UndeleteRecognizer_sync] diff --git a/Speech/samples/V2/SpeechClient/update_config.php b/Speech/samples/V2/SpeechClient/update_config.php new file mode 100644 index 000000000000..6ea72ba34eaa --- /dev/null +++ b/Speech/samples/V2/SpeechClient/update_config.php @@ -0,0 +1,56 @@ +updateConfig($config); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END speech_v2_generated_Speech_UpdateConfig_sync] diff --git a/Speech/samples/V2/SpeechClient/update_custom_class.php b/Speech/samples/V2/SpeechClient/update_custom_class.php new file mode 100644 index 000000000000..fe02f073be0c --- /dev/null +++ b/Speech/samples/V2/SpeechClient/update_custom_class.php @@ -0,0 +1,68 @@ +updateCustomClass($customClass); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CustomClass $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END speech_v2_generated_Speech_UpdateCustomClass_sync] diff --git a/Speech/samples/V2/SpeechClient/update_phrase_set.php b/Speech/samples/V2/SpeechClient/update_phrase_set.php new file mode 100644 index 000000000000..7579817a7fe1 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/update_phrase_set.php @@ -0,0 +1,68 @@ +updatePhraseSet($phraseSet); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PhraseSet $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END speech_v2_generated_Speech_UpdatePhraseSet_sync] diff --git a/Speech/samples/V2/SpeechClient/update_recognizer.php b/Speech/samples/V2/SpeechClient/update_recognizer.php new file mode 100644 index 000000000000..842aec5081d5 --- /dev/null +++ b/Speech/samples/V2/SpeechClient/update_recognizer.php @@ -0,0 +1,121 @@ +setModel($recognizerModel) + ->setLanguageCodes($recognizerLanguageCodes); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $speechClient->updateRecognizer($recognizer); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Recognizer $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $recognizerModel = '[MODEL]'; + $recognizerLanguageCodesElement = '[LANGUAGE_CODES]'; + + update_recognizer_sample($recognizerModel, $recognizerLanguageCodesElement); +} +// [END speech_v2_generated_Speech_UpdateRecognizer_sync] diff --git a/Speech/src/V1/Gapic/AdaptationGapicClient.php b/Speech/src/V1/Gapic/AdaptationGapicClient.php index b9be0fbe8b9d..739d0fd03497 100644 --- a/Speech/src/V1/Gapic/AdaptationGapicClient.php +++ b/Speech/src/V1/Gapic/AdaptationGapicClient.php @@ -27,7 +27,6 @@ use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\GapicClientTrait; - use Google\ApiCore\PathTemplate; use Google\ApiCore\RequestParamsHeaderDescriptor; use Google\ApiCore\RetrySettings; @@ -78,29 +77,19 @@ class AdaptationGapicClient { use GapicClientTrait; - /** - * The name of the service. - */ + /** The name of the service. */ const SERVICE_NAME = 'google.cloud.speech.v1.Adaptation'; - /** - * The default address of the service. - */ + /** The default address of the service. */ const SERVICE_ADDRESS = 'speech.googleapis.com'; - /** - * The default port of the service. - */ + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; - /** - * The name of the code generator, to be included in the agent header. - */ + /** The name of the code generator, to be included in the agent header. */ const CODEGEN_NAME = 'gapic'; - /** - * The default scopes required by the service. - */ + /** The default scopes required by the service. */ public static $serviceScopes = [ 'https://www.googleapis.com/auth/cloud-platform', ]; @@ -276,9 +265,6 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress - * **Deprecated**. This option will be removed in a future major release. Please - * utilize the `$apiEndpoint` option instead. * @type string $apiEndpoint * The address of the API remote host. May optionally include the port, formatted * as ":". Default 'speech.googleapis.com:443'. @@ -308,7 +294,7 @@ public static function parseName($formattedName, $template = null) * *Advanced usage*: Additionally, it is possible to pass in an already * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note * that when this object is provided, any settings in $transportConfig, and any - * $serviceAddress setting, will be ignored. + * $apiEndpoint setting, will be ignored. * @type array $transportConfig * Configuration options that will be used to construct the transport. Options for * each supported transport type should be passed in a key for that transport. For diff --git a/Speech/src/V1/Gapic/SpeechGapicClient.php b/Speech/src/V1/Gapic/SpeechGapicClient.php index 7d4faef2f2f5..92a57b9478ec 100644 --- a/Speech/src/V1/Gapic/SpeechGapicClient.php +++ b/Speech/src/V1/Gapic/SpeechGapicClient.php @@ -25,10 +25,8 @@ namespace Google\Cloud\Speech\V1\Gapic; use Google\ApiCore\ApiException; - use Google\ApiCore\Call; use Google\ApiCore\CredentialsWrapper; - use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; @@ -93,29 +91,19 @@ class SpeechGapicClient { use GapicClientTrait; - /** - * The name of the service. - */ + /** The name of the service. */ const SERVICE_NAME = 'google.cloud.speech.v1.Speech'; - /** - * The default address of the service. - */ + /** The default address of the service. */ const SERVICE_ADDRESS = 'speech.googleapis.com'; - /** - * The default port of the service. - */ + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; - /** - * The name of the code generator, to be included in the agent header. - */ + /** The name of the code generator, to be included in the agent header. */ const CODEGEN_NAME = 'gapic'; - /** - * The default scopes required by the service. - */ + /** The default scopes required by the service. */ public static $serviceScopes = [ 'https://www.googleapis.com/auth/cloud-platform', ]; @@ -176,9 +164,6 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress - * **Deprecated**. This option will be removed in a future major release. Please - * utilize the `$apiEndpoint` option instead. * @type string $apiEndpoint * The address of the API remote host. May optionally include the port, formatted * as ":". Default 'speech.googleapis.com:443'. @@ -208,7 +193,7 @@ public function resumeOperation($operationName, $methodName = null) * *Advanced usage*: Additionally, it is possible to pass in an already * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note * that when this object is provided, any settings in $transportConfig, and any - * $serviceAddress setting, will be ignored. + * $apiEndpoint setting, will be ignored. * @type array $transportConfig * Configuration options that will be used to construct the transport. Options for * each supported transport type should be passed in a key for that transport. For diff --git a/Speech/src/V1/LongRunningRecognizeResponse.php b/Speech/src/V1/LongRunningRecognizeResponse.php index 4206b07318ed..6428b3e9b3d8 100644 --- a/Speech/src/V1/LongRunningRecognizeResponse.php +++ b/Speech/src/V1/LongRunningRecognizeResponse.php @@ -44,6 +44,19 @@ class LongRunningRecognizeResponse extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.rpc.Status output_error = 7; */ private $output_error = null; + /** + * Provides information on speech adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8; + */ + private $speech_adaptation_info = null; + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 9; + */ + private $request_id = 0; /** * Constructor. @@ -60,6 +73,11 @@ class LongRunningRecognizeResponse extends \Google\Protobuf\Internal\Message * Original output config if present in the request. * @type \Google\Rpc\Status $output_error * If the transcript output fails this field contains the relevant error. + * @type \Google\Cloud\Speech\V1\SpeechAdaptationInfo $speech_adaptation_info + * Provides information on speech adaptation behavior in response + * @type int|string $request_id + * The ID associated with the request. This is a unique ID specific only to + * the given request. * } */ public function __construct($data = NULL) { @@ -203,5 +221,69 @@ public function setOutputError($var) return $this; } + /** + * Provides information on speech adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8; + * @return \Google\Cloud\Speech\V1\SpeechAdaptationInfo|null + */ + public function getSpeechAdaptationInfo() + { + return $this->speech_adaptation_info; + } + + public function hasSpeechAdaptationInfo() + { + return isset($this->speech_adaptation_info); + } + + public function clearSpeechAdaptationInfo() + { + unset($this->speech_adaptation_info); + } + + /** + * Provides information on speech adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8; + * @param \Google\Cloud\Speech\V1\SpeechAdaptationInfo $var + * @return $this + */ + public function setSpeechAdaptationInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\SpeechAdaptationInfo::class); + $this->speech_adaptation_info = $var; + + return $this; + } + + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 9; + * @return int|string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 9; + * @param int|string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkInt64($var); + $this->request_id = $var; + + return $this; + } + } diff --git a/Speech/src/V1/RecognitionConfig.php b/Speech/src/V1/RecognitionConfig.php index 1a4706c00772..50046a951708 100644 --- a/Speech/src/V1/RecognitionConfig.php +++ b/Speech/src/V1/RecognitionConfig.php @@ -39,8 +39,7 @@ class RecognitionConfig extends \Google\Protobuf\Internal\Message /** * The number of channels in the input audio data. * ONLY set this for MULTI-CHANNEL recognition. - * Valid values for LINEAR16 and FLAC are `1`-`8`. - * Valid values for OGG_OPUS are '1'-'254'. + * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. * If `0` or omitted, defaults to one channel (mono). * Note: We only recognize the first channel by default. @@ -286,8 +285,7 @@ class RecognitionConfig extends \Google\Protobuf\Internal\Message * @type int $audio_channel_count * The number of channels in the input audio data. * ONLY set this for MULTI-CHANNEL recognition. - * Valid values for LINEAR16 and FLAC are `1`-`8`. - * Valid values for OGG_OPUS are '1'-'254'. + * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. * If `0` or omitted, defaults to one channel (mono). * Note: We only recognize the first channel by default. @@ -521,8 +519,7 @@ public function setSampleRateHertz($var) /** * The number of channels in the input audio data. * ONLY set this for MULTI-CHANNEL recognition. - * Valid values for LINEAR16 and FLAC are `1`-`8`. - * Valid values for OGG_OPUS are '1'-'254'. + * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. * If `0` or omitted, defaults to one channel (mono). * Note: We only recognize the first channel by default. @@ -540,8 +537,7 @@ public function getAudioChannelCount() /** * The number of channels in the input audio data. * ONLY set this for MULTI-CHANNEL recognition. - * Valid values for LINEAR16 and FLAC are `1`-`8`. - * Valid values for OGG_OPUS are '1'-'254'. + * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. * If `0` or omitted, defaults to one channel (mono). * Note: We only recognize the first channel by default. diff --git a/Speech/src/V1/RecognizeResponse.php b/Speech/src/V1/RecognizeResponse.php index 40f21898c96d..b8af0d23d80d 100644 --- a/Speech/src/V1/RecognizeResponse.php +++ b/Speech/src/V1/RecognizeResponse.php @@ -30,6 +30,19 @@ class RecognizeResponse extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3; */ private $total_billed_time = null; + /** + * Provides information on adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; + */ + private $speech_adaptation_info = null; + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 8; + */ + private $request_id = 0; /** * Constructor. @@ -42,6 +55,11 @@ class RecognizeResponse extends \Google\Protobuf\Internal\Message * sequential portions of audio. * @type \Google\Protobuf\Duration $total_billed_time * When available, billed audio seconds for the corresponding request. + * @type \Google\Cloud\Speech\V1\SpeechAdaptationInfo $speech_adaptation_info + * Provides information on adaptation behavior in response + * @type int|string $request_id + * The ID associated with the request. This is a unique ID specific only to + * the given request. * } */ public function __construct($data = NULL) { @@ -113,5 +131,69 @@ public function setTotalBilledTime($var) return $this; } + /** + * Provides information on adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; + * @return \Google\Cloud\Speech\V1\SpeechAdaptationInfo|null + */ + public function getSpeechAdaptationInfo() + { + return $this->speech_adaptation_info; + } + + public function hasSpeechAdaptationInfo() + { + return isset($this->speech_adaptation_info); + } + + public function clearSpeechAdaptationInfo() + { + unset($this->speech_adaptation_info); + } + + /** + * Provides information on adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; + * @param \Google\Cloud\Speech\V1\SpeechAdaptationInfo $var + * @return $this + */ + public function setSpeechAdaptationInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\SpeechAdaptationInfo::class); + $this->speech_adaptation_info = $var; + + return $this; + } + + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 8; + * @return int|string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 8; + * @param int|string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkInt64($var); + $this->request_id = $var; + + return $this; + } + } diff --git a/Speech/src/V1/SpeechAdaptationInfo.php b/Speech/src/V1/SpeechAdaptationInfo.php new file mode 100644 index 000000000000..48c025f218a6 --- /dev/null +++ b/Speech/src/V1/SpeechAdaptationInfo.php @@ -0,0 +1,109 @@ +google.cloud.speech.v1.SpeechAdaptationInfo + */ +class SpeechAdaptationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Whether there was a timeout when applying speech adaptation. If true, + * adaptation had no effect in the response transcript. + * + * Generated from protobuf field bool adaptation_timeout = 1; + */ + private $adaptation_timeout = false; + /** + * If set, returns a message specifying which part of the speech adaptation + * request timed out. + * + * Generated from protobuf field string timeout_message = 4; + */ + private $timeout_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $adaptation_timeout + * Whether there was a timeout when applying speech adaptation. If true, + * adaptation had no effect in the response transcript. + * @type string $timeout_message + * If set, returns a message specifying which part of the speech adaptation + * request timed out. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce(); + parent::__construct($data); + } + + /** + * Whether there was a timeout when applying speech adaptation. If true, + * adaptation had no effect in the response transcript. + * + * Generated from protobuf field bool adaptation_timeout = 1; + * @return bool + */ + public function getAdaptationTimeout() + { + return $this->adaptation_timeout; + } + + /** + * Whether there was a timeout when applying speech adaptation. If true, + * adaptation had no effect in the response transcript. + * + * Generated from protobuf field bool adaptation_timeout = 1; + * @param bool $var + * @return $this + */ + public function setAdaptationTimeout($var) + { + GPBUtil::checkBool($var); + $this->adaptation_timeout = $var; + + return $this; + } + + /** + * If set, returns a message specifying which part of the speech adaptation + * request timed out. + * + * Generated from protobuf field string timeout_message = 4; + * @return string + */ + public function getTimeoutMessage() + { + return $this->timeout_message; + } + + /** + * If set, returns a message specifying which part of the speech adaptation + * request timed out. + * + * Generated from protobuf field string timeout_message = 4; + * @param string $var + * @return $this + */ + public function setTimeoutMessage($var) + { + GPBUtil::checkString($var, True); + $this->timeout_message = $var; + + return $this; + } + +} + diff --git a/Speech/src/V1/StreamingRecognizeResponse.php b/Speech/src/V1/StreamingRecognizeResponse.php index 0b3d318ec77c..a9e8a5a0ed6c 100644 --- a/Speech/src/V1/StreamingRecognizeResponse.php +++ b/Speech/src/V1/StreamingRecognizeResponse.php @@ -79,6 +79,19 @@ class StreamingRecognizeResponse extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Duration total_billed_time = 5; */ private $total_billed_time = null; + /** + * Provides information on adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9; + */ + private $speech_adaptation_info = null; + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 10; + */ + private $request_id = 0; /** * Constructor. @@ -99,6 +112,11 @@ class StreamingRecognizeResponse extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\Duration $total_billed_time * When available, billed audio seconds for the stream. * Set only if this is the last response in the stream. + * @type \Google\Cloud\Speech\V1\SpeechAdaptationInfo $speech_adaptation_info + * Provides information on adaptation behavior in response + * @type int|string $request_id + * The ID associated with the request. This is a unique ID specific only to + * the given request. * } */ public function __construct($data = NULL) { @@ -240,5 +258,69 @@ public function setTotalBilledTime($var) return $this; } + /** + * Provides information on adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9; + * @return \Google\Cloud\Speech\V1\SpeechAdaptationInfo|null + */ + public function getSpeechAdaptationInfo() + { + return $this->speech_adaptation_info; + } + + public function hasSpeechAdaptationInfo() + { + return isset($this->speech_adaptation_info); + } + + public function clearSpeechAdaptationInfo() + { + unset($this->speech_adaptation_info); + } + + /** + * Provides information on adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9; + * @param \Google\Cloud\Speech\V1\SpeechAdaptationInfo $var + * @return $this + */ + public function setSpeechAdaptationInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\SpeechAdaptationInfo::class); + $this->speech_adaptation_info = $var; + + return $this; + } + + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 10; + * @return int|string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 10; + * @param int|string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkInt64($var); + $this->request_id = $var; + + return $this; + } + } diff --git a/Speech/src/V1p1beta1/Gapic/AdaptationGapicClient.php b/Speech/src/V1p1beta1/Gapic/AdaptationGapicClient.php index 3adf7b975e82..88cd26bdf74b 100644 --- a/Speech/src/V1p1beta1/Gapic/AdaptationGapicClient.php +++ b/Speech/src/V1p1beta1/Gapic/AdaptationGapicClient.php @@ -29,7 +29,6 @@ use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\GapicClientTrait; - use Google\ApiCore\PathTemplate; use Google\ApiCore\RequestParamsHeaderDescriptor; use Google\ApiCore\RetrySettings; @@ -82,29 +81,19 @@ class AdaptationGapicClient { use GapicClientTrait; - /** - * The name of the service. - */ + /** The name of the service. */ const SERVICE_NAME = 'google.cloud.speech.v1p1beta1.Adaptation'; - /** - * The default address of the service. - */ + /** The default address of the service. */ const SERVICE_ADDRESS = 'speech.googleapis.com'; - /** - * The default port of the service. - */ + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; - /** - * The name of the code generator, to be included in the agent header. - */ + /** The name of the code generator, to be included in the agent header. */ const CODEGEN_NAME = 'gapic'; - /** - * The default scopes required by the service. - */ + /** The default scopes required by the service. */ public static $serviceScopes = [ 'https://www.googleapis.com/auth/cloud-platform', ]; @@ -288,9 +277,6 @@ public static function parseName($formattedName, $template = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress - * **Deprecated**. This option will be removed in a future major release. Please - * utilize the `$apiEndpoint` option instead. * @type string $apiEndpoint * The address of the API remote host. May optionally include the port, formatted * as ":". Default 'speech.googleapis.com:443'. @@ -320,7 +306,7 @@ public static function parseName($formattedName, $template = null) * *Advanced usage*: Additionally, it is possible to pass in an already * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note * that when this object is provided, any settings in $transportConfig, and any - * $serviceAddress setting, will be ignored. + * $apiEndpoint setting, will be ignored. * @type array $transportConfig * Configuration options that will be used to construct the transport. Options for * each supported transport type should be passed in a key for that transport. For diff --git a/Speech/src/V1p1beta1/Gapic/SpeechGapicClient.php b/Speech/src/V1p1beta1/Gapic/SpeechGapicClient.php index 6d1269deb7d7..a0bb21419167 100644 --- a/Speech/src/V1p1beta1/Gapic/SpeechGapicClient.php +++ b/Speech/src/V1p1beta1/Gapic/SpeechGapicClient.php @@ -27,10 +27,8 @@ namespace Google\Cloud\Speech\V1p1beta1\Gapic; use Google\ApiCore\ApiException; - use Google\ApiCore\Call; use Google\ApiCore\CredentialsWrapper; - use Google\ApiCore\GapicClientTrait; use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; @@ -97,29 +95,19 @@ class SpeechGapicClient { use GapicClientTrait; - /** - * The name of the service. - */ + /** The name of the service. */ const SERVICE_NAME = 'google.cloud.speech.v1p1beta1.Speech'; - /** - * The default address of the service. - */ + /** The default address of the service. */ const SERVICE_ADDRESS = 'speech.googleapis.com'; - /** - * The default port of the service. - */ + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; - /** - * The name of the code generator, to be included in the agent header. - */ + /** The name of the code generator, to be included in the agent header. */ const CODEGEN_NAME = 'gapic'; - /** - * The default scopes required by the service. - */ + /** The default scopes required by the service. */ public static $serviceScopes = [ 'https://www.googleapis.com/auth/cloud-platform', ]; @@ -184,9 +172,6 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress - * **Deprecated**. This option will be removed in a future major release. Please - * utilize the `$apiEndpoint` option instead. * @type string $apiEndpoint * The address of the API remote host. May optionally include the port, formatted * as ":". Default 'speech.googleapis.com:443'. @@ -216,7 +201,7 @@ public function resumeOperation($operationName, $methodName = null) * *Advanced usage*: Additionally, it is possible to pass in an already * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note * that when this object is provided, any settings in $transportConfig, and any - * $serviceAddress setting, will be ignored. + * $apiEndpoint setting, will be ignored. * @type array $transportConfig * Configuration options that will be used to construct the transport. Options for * each supported transport type should be passed in a key for that transport. For diff --git a/Speech/src/V1p1beta1/LongRunningRecognizeResponse.php b/Speech/src/V1p1beta1/LongRunningRecognizeResponse.php index 12a6547b5288..fd802be096b0 100644 --- a/Speech/src/V1p1beta1/LongRunningRecognizeResponse.php +++ b/Speech/src/V1p1beta1/LongRunningRecognizeResponse.php @@ -44,6 +44,19 @@ class LongRunningRecognizeResponse extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.rpc.Status output_error = 7; */ private $output_error = null; + /** + * Provides information on speech adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 8; + */ + private $speech_adaptation_info = null; + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 9; + */ + private $request_id = 0; /** * Constructor. @@ -60,6 +73,11 @@ class LongRunningRecognizeResponse extends \Google\Protobuf\Internal\Message * Original output config if present in the request. * @type \Google\Rpc\Status $output_error * If the transcript output fails this field contains the relevant error. + * @type \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo $speech_adaptation_info + * Provides information on speech adaptation behavior in response + * @type int|string $request_id + * The ID associated with the request. This is a unique ID specific only to + * the given request. * } */ public function __construct($data = NULL) { @@ -203,5 +221,69 @@ public function setOutputError($var) return $this; } + /** + * Provides information on speech adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 8; + * @return \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo|null + */ + public function getSpeechAdaptationInfo() + { + return $this->speech_adaptation_info; + } + + public function hasSpeechAdaptationInfo() + { + return isset($this->speech_adaptation_info); + } + + public function clearSpeechAdaptationInfo() + { + unset($this->speech_adaptation_info); + } + + /** + * Provides information on speech adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 8; + * @param \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo $var + * @return $this + */ + public function setSpeechAdaptationInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo::class); + $this->speech_adaptation_info = $var; + + return $this; + } + + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 9; + * @return int|string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 9; + * @param int|string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkInt64($var); + $this->request_id = $var; + + return $this; + } + } diff --git a/Speech/src/V1p1beta1/RecognitionConfig.php b/Speech/src/V1p1beta1/RecognitionConfig.php index e419a51754f0..7825593692d8 100644 --- a/Speech/src/V1p1beta1/RecognitionConfig.php +++ b/Speech/src/V1p1beta1/RecognitionConfig.php @@ -39,8 +39,7 @@ class RecognitionConfig extends \Google\Protobuf\Internal\Message /** * The number of channels in the input audio data. * ONLY set this for MULTI-CHANNEL recognition. - * Valid values for LINEAR16 and FLAC are `1`-`8`. - * Valid values for OGG_OPUS are '1'-'254'. + * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. * If `0` or omitted, defaults to one channel (mono). * Note: We only recognize the first channel by default. @@ -314,8 +313,7 @@ class RecognitionConfig extends \Google\Protobuf\Internal\Message * @type int $audio_channel_count * The number of channels in the input audio data. * ONLY set this for MULTI-CHANNEL recognition. - * Valid values for LINEAR16 and FLAC are `1`-`8`. - * Valid values for OGG_OPUS are '1'-'254'. + * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. * If `0` or omitted, defaults to one channel (mono). * Note: We only recognize the first channel by default. @@ -563,8 +561,7 @@ public function setSampleRateHertz($var) /** * The number of channels in the input audio data. * ONLY set this for MULTI-CHANNEL recognition. - * Valid values for LINEAR16 and FLAC are `1`-`8`. - * Valid values for OGG_OPUS are '1'-'254'. + * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. * If `0` or omitted, defaults to one channel (mono). * Note: We only recognize the first channel by default. @@ -582,8 +579,7 @@ public function getAudioChannelCount() /** * The number of channels in the input audio data. * ONLY set this for MULTI-CHANNEL recognition. - * Valid values for LINEAR16 and FLAC are `1`-`8`. - * Valid values for OGG_OPUS are '1'-'254'. + * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. * If `0` or omitted, defaults to one channel (mono). * Note: We only recognize the first channel by default. diff --git a/Speech/src/V1p1beta1/RecognizeResponse.php b/Speech/src/V1p1beta1/RecognizeResponse.php index 4dd9ccd81c44..7942727152ad 100644 --- a/Speech/src/V1p1beta1/RecognizeResponse.php +++ b/Speech/src/V1p1beta1/RecognizeResponse.php @@ -30,6 +30,19 @@ class RecognizeResponse extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3; */ private $total_billed_time = null; + /** + * Provides information on adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7; + */ + private $speech_adaptation_info = null; + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 8; + */ + private $request_id = 0; /** * Constructor. @@ -42,6 +55,11 @@ class RecognizeResponse extends \Google\Protobuf\Internal\Message * sequential portions of audio. * @type \Google\Protobuf\Duration $total_billed_time * When available, billed audio seconds for the corresponding request. + * @type \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo $speech_adaptation_info + * Provides information on adaptation behavior in response + * @type int|string $request_id + * The ID associated with the request. This is a unique ID specific only to + * the given request. * } */ public function __construct($data = NULL) { @@ -113,5 +131,69 @@ public function setTotalBilledTime($var) return $this; } + /** + * Provides information on adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7; + * @return \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo|null + */ + public function getSpeechAdaptationInfo() + { + return $this->speech_adaptation_info; + } + + public function hasSpeechAdaptationInfo() + { + return isset($this->speech_adaptation_info); + } + + public function clearSpeechAdaptationInfo() + { + unset($this->speech_adaptation_info); + } + + /** + * Provides information on adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7; + * @param \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo $var + * @return $this + */ + public function setSpeechAdaptationInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo::class); + $this->speech_adaptation_info = $var; + + return $this; + } + + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 8; + * @return int|string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 8; + * @param int|string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkInt64($var); + $this->request_id = $var; + + return $this; + } + } diff --git a/Speech/src/V1p1beta1/SpeechAdaptationInfo.php b/Speech/src/V1p1beta1/SpeechAdaptationInfo.php new file mode 100644 index 000000000000..7fbebd02259a --- /dev/null +++ b/Speech/src/V1p1beta1/SpeechAdaptationInfo.php @@ -0,0 +1,109 @@ +google.cloud.speech.v1p1beta1.SpeechAdaptationInfo + */ +class SpeechAdaptationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Whether there was a timeout when applying speech adaptation. If true, + * adaptation had no effect in the response transcript. + * + * Generated from protobuf field bool adaptation_timeout = 1; + */ + private $adaptation_timeout = false; + /** + * If set, returns a message specifying which part of the speech adaptation + * request timed out. + * + * Generated from protobuf field string timeout_message = 4; + */ + private $timeout_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $adaptation_timeout + * Whether there was a timeout when applying speech adaptation. If true, + * adaptation had no effect in the response transcript. + * @type string $timeout_message + * If set, returns a message specifying which part of the speech adaptation + * request timed out. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce(); + parent::__construct($data); + } + + /** + * Whether there was a timeout when applying speech adaptation. If true, + * adaptation had no effect in the response transcript. + * + * Generated from protobuf field bool adaptation_timeout = 1; + * @return bool + */ + public function getAdaptationTimeout() + { + return $this->adaptation_timeout; + } + + /** + * Whether there was a timeout when applying speech adaptation. If true, + * adaptation had no effect in the response transcript. + * + * Generated from protobuf field bool adaptation_timeout = 1; + * @param bool $var + * @return $this + */ + public function setAdaptationTimeout($var) + { + GPBUtil::checkBool($var); + $this->adaptation_timeout = $var; + + return $this; + } + + /** + * If set, returns a message specifying which part of the speech adaptation + * request timed out. + * + * Generated from protobuf field string timeout_message = 4; + * @return string + */ + public function getTimeoutMessage() + { + return $this->timeout_message; + } + + /** + * If set, returns a message specifying which part of the speech adaptation + * request timed out. + * + * Generated from protobuf field string timeout_message = 4; + * @param string $var + * @return $this + */ + public function setTimeoutMessage($var) + { + GPBUtil::checkString($var, True); + $this->timeout_message = $var; + + return $this; + } + +} + diff --git a/Speech/src/V1p1beta1/StreamingRecognizeResponse.php b/Speech/src/V1p1beta1/StreamingRecognizeResponse.php index 54c99c340321..f784071f5916 100644 --- a/Speech/src/V1p1beta1/StreamingRecognizeResponse.php +++ b/Speech/src/V1p1beta1/StreamingRecognizeResponse.php @@ -79,6 +79,19 @@ class StreamingRecognizeResponse extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Duration total_billed_time = 5; */ private $total_billed_time = null; + /** + * Provides information on adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 9; + */ + private $speech_adaptation_info = null; + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 10; + */ + private $request_id = 0; /** * Constructor. @@ -99,6 +112,11 @@ class StreamingRecognizeResponse extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\Duration $total_billed_time * When available, billed audio seconds for the stream. * Set only if this is the last response in the stream. + * @type \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo $speech_adaptation_info + * Provides information on adaptation behavior in response + * @type int|string $request_id + * The ID associated with the request. This is a unique ID specific only to + * the given request. * } */ public function __construct($data = NULL) { @@ -240,5 +258,69 @@ public function setTotalBilledTime($var) return $this; } + /** + * Provides information on adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 9; + * @return \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo|null + */ + public function getSpeechAdaptationInfo() + { + return $this->speech_adaptation_info; + } + + public function hasSpeechAdaptationInfo() + { + return isset($this->speech_adaptation_info); + } + + public function clearSpeechAdaptationInfo() + { + unset($this->speech_adaptation_info); + } + + /** + * Provides information on adaptation behavior in response + * + * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 9; + * @param \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo $var + * @return $this + */ + public function setSpeechAdaptationInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo::class); + $this->speech_adaptation_info = $var; + + return $this; + } + + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 10; + * @return int|string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * The ID associated with the request. This is a unique ID specific only to + * the given request. + * + * Generated from protobuf field int64 request_id = 10; + * @param int|string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkInt64($var); + $this->request_id = $var; + + return $this; + } + } diff --git a/Speech/src/V2/Gapic/SpeechGapicClient.php b/Speech/src/V2/Gapic/SpeechGapicClient.php index b769a4d1fd04..e6818a671bda 100644 --- a/Speech/src/V2/Gapic/SpeechGapicClient.php +++ b/Speech/src/V2/Gapic/SpeechGapicClient.php @@ -27,9 +27,7 @@ use Google\ApiCore\ApiException; use Google\ApiCore\Call; use Google\ApiCore\CredentialsWrapper; - use Google\ApiCore\GapicClientTrait; - use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\OperationResponse; use Google\ApiCore\PathTemplate; @@ -60,9 +58,9 @@ use Google\Cloud\Speech\V2\ListRecognizersResponse; use Google\Cloud\Speech\V2\PhraseSet; use Google\Cloud\Speech\V2\RecognitionConfig; -use Google\Cloud\Speech\V2\Recognizer; use Google\Cloud\Speech\V2\RecognizeRequest; use Google\Cloud\Speech\V2\RecognizeResponse; +use Google\Cloud\Speech\V2\Recognizer; use Google\Cloud\Speech\V2\StreamingRecognizeRequest; use Google\Cloud\Speech\V2\StreamingRecognizeResponse; use Google\Cloud\Speech\V2\UndeleteCustomClassRequest; @@ -125,29 +123,19 @@ class SpeechGapicClient { use GapicClientTrait; - /** - * The name of the service. - */ + /** The name of the service. */ const SERVICE_NAME = 'google.cloud.speech.v2.Speech'; - /** - * The default address of the service. - */ + /** The default address of the service. */ const SERVICE_ADDRESS = 'speech.googleapis.com'; - /** - * The default port of the service. - */ + /** The default port of the service. */ const DEFAULT_SERVICE_PORT = 443; - /** - * The name of the code generator, to be included in the agent header. - */ + /** The name of the code generator, to be included in the agent header. */ const CODEGEN_NAME = 'gapic'; - /** - * The default scopes required by the service. - */ + /** The default scopes required by the service. */ public static $serviceScopes = [ 'https://www.googleapis.com/auth/cloud-platform', ]; @@ -486,9 +474,6 @@ public function resumeOperation($operationName, $methodName = null) * @param array $options { * Optional. Options for configuring the service API wrapper. * - * @type string $serviceAddress - * **Deprecated**. This option will be removed in a future major release. Please - * utilize the `$apiEndpoint` option instead. * @type string $apiEndpoint * The address of the API remote host. May optionally include the port, formatted * as ":". Default 'speech.googleapis.com:443'. @@ -518,7 +503,7 @@ public function resumeOperation($operationName, $methodName = null) * *Advanced usage*: Additionally, it is possible to pass in an already * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note * that when this object is provided, any settings in $transportConfig, and any - * $serviceAddress setting, will be ignored. + * $apiEndpoint setting, will be ignored. * @type array $transportConfig * Configuration options that will be used to construct the transport. Options for * each supported transport type should be passed in a key for that transport. For diff --git a/Speech/tests/Unit/V1/AdaptationClientTest.php b/Speech/tests/Unit/V1/AdaptationClientTest.php index 22baaf8cf391..5e02e445ce28 100644 --- a/Speech/tests/Unit/V1/AdaptationClientTest.php +++ b/Speech/tests/Unit/V1/AdaptationClientTest.php @@ -23,11 +23,9 @@ namespace Google\Cloud\Speech\Tests\Unit\V1; use Google\ApiCore\ApiException; - use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; - use Google\Cloud\Speech\V1\AdaptationClient; use Google\Cloud\Speech\V1\CustomClass; use Google\Cloud\Speech\V1\ListCustomClassesResponse; @@ -44,25 +42,19 @@ */ class AdaptationClientTest extends GeneratedTest { - /** - * @return TransportInterface - */ + /** @return TransportInterface */ private function createTransport($deserialize = null) { return new MockTransport($deserialize); } - /** - * @return CredentialsWrapper - */ + /** @return CredentialsWrapper */ private function createCredentials() { return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); } - /** - * @return AdaptationClient - */ + /** @return AdaptationClient */ private function createClient(array $options = []) { $options += [ @@ -71,9 +63,7 @@ private function createClient(array $options = []) return new AdaptationClient($options); } - /** - * @test - */ + /** @test */ public function createCustomClassTest() { $transport = $this->createTransport(); @@ -108,9 +98,7 @@ public function createCustomClassTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function createCustomClassExceptionTest() { $transport = $this->createTransport(); @@ -145,9 +133,7 @@ public function createCustomClassExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function createPhraseSetTest() { $transport = $this->createTransport(); @@ -182,9 +168,7 @@ public function createPhraseSetTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function createPhraseSetExceptionTest() { $transport = $this->createTransport(); @@ -219,9 +203,7 @@ public function createPhraseSetExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deleteCustomClassTest() { $transport = $this->createTransport(); @@ -245,9 +227,7 @@ public function deleteCustomClassTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deleteCustomClassExceptionTest() { $transport = $this->createTransport(); @@ -280,9 +260,7 @@ public function deleteCustomClassExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deletePhraseSetTest() { $transport = $this->createTransport(); @@ -306,9 +284,7 @@ public function deletePhraseSetTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deletePhraseSetExceptionTest() { $transport = $this->createTransport(); @@ -341,9 +317,7 @@ public function deletePhraseSetExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getCustomClassTest() { $transport = $this->createTransport(); @@ -372,9 +346,7 @@ public function getCustomClassTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getCustomClassExceptionTest() { $transport = $this->createTransport(); @@ -407,9 +379,7 @@ public function getCustomClassExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getPhraseSetTest() { $transport = $this->createTransport(); @@ -438,9 +408,7 @@ public function getPhraseSetTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getPhraseSetExceptionTest() { $transport = $this->createTransport(); @@ -473,9 +441,7 @@ public function getPhraseSetExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listCustomClassesTest() { $transport = $this->createTransport(); @@ -510,9 +476,7 @@ public function listCustomClassesTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listCustomClassesExceptionTest() { $transport = $this->createTransport(); @@ -545,9 +509,7 @@ public function listCustomClassesExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listPhraseSetTest() { $transport = $this->createTransport(); @@ -582,9 +544,7 @@ public function listPhraseSetTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listPhraseSetExceptionTest() { $transport = $this->createTransport(); @@ -617,9 +577,7 @@ public function listPhraseSetExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updateCustomClassTest() { $transport = $this->createTransport(); @@ -648,9 +606,7 @@ public function updateCustomClassTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updateCustomClassExceptionTest() { $transport = $this->createTransport(); @@ -683,9 +639,7 @@ public function updateCustomClassExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updatePhraseSetTest() { $transport = $this->createTransport(); @@ -714,9 +668,7 @@ public function updatePhraseSetTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updatePhraseSetExceptionTest() { $transport = $this->createTransport(); diff --git a/Speech/tests/Unit/V1/SpeechClientTest.php b/Speech/tests/Unit/V1/SpeechClientTest.php index 5a19cb295f30..a280af7fe306 100644 --- a/Speech/tests/Unit/V1/SpeechClientTest.php +++ b/Speech/tests/Unit/V1/SpeechClientTest.php @@ -24,14 +24,11 @@ use Google\ApiCore\ApiException; use Google\ApiCore\BidiStream; - use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; - use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Speech\V1\LongRunningRecognizeResponse; - use Google\Cloud\Speech\V1\RecognitionAudio; use Google\Cloud\Speech\V1\RecognitionConfig; use Google\Cloud\Speech\V1\RecognizeResponse; @@ -51,25 +48,19 @@ */ class SpeechClientTest extends GeneratedTest { - /** - * @return TransportInterface - */ + /** @return TransportInterface */ private function createTransport($deserialize = null) { return new MockTransport($deserialize); } - /** - * @return CredentialsWrapper - */ + /** @return CredentialsWrapper */ private function createCredentials() { return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); } - /** - * @return SpeechClient - */ + /** @return SpeechClient */ private function createClient(array $options = []) { $options += [ @@ -78,14 +69,12 @@ private function createClient(array $options = []) return new SpeechClient($options); } - /** - * @test - */ + /** @test */ public function longRunningRecognizeTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -101,7 +90,9 @@ public function longRunningRecognizeTest() $incompleteOperation->setName('operations/longRunningRecognizeTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); + $requestId = 37109963; $expectedResponse = new LongRunningRecognizeResponse(); + $expectedResponse->setRequestId($requestId); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -147,14 +138,12 @@ public function longRunningRecognizeTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function longRunningRecognizeExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -207,9 +196,7 @@ public function longRunningRecognizeExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function recognizeTest() { $transport = $this->createTransport(); @@ -218,7 +205,9 @@ public function recognizeTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response + $requestId = 37109963; $expectedResponse = new RecognizeResponse(); + $expectedResponse->setRequestId($requestId); $transport->addResponse($expectedResponse); // Mock request $config = new RecognitionConfig(); @@ -239,9 +228,7 @@ public function recognizeTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function recognizeExceptionTest() { $transport = $this->createTransport(); @@ -277,9 +264,7 @@ public function recognizeExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function streamingRecognizeTest() { $transport = $this->createTransport(); @@ -288,11 +273,17 @@ public function streamingRecognizeTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response + $requestId = 37109963; $expectedResponse = new StreamingRecognizeResponse(); + $expectedResponse->setRequestId($requestId); $transport->addResponse($expectedResponse); + $requestId2 = 1302939070; $expectedResponse2 = new StreamingRecognizeResponse(); + $expectedResponse2->setRequestId($requestId2); $transport->addResponse($expectedResponse2); + $requestId3 = 1302939071; $expectedResponse3 = new StreamingRecognizeResponse(); + $expectedResponse3->setRequestId($requestId3); $transport->addResponse($expectedResponse3); // Mock request $request = new StreamingRecognizeRequest(); @@ -334,9 +325,7 @@ public function streamingRecognizeTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function streamingRecognizeExceptionTest() { $transport = $this->createTransport(); diff --git a/Speech/tests/Unit/V1p1beta1/AdaptationClientTest.php b/Speech/tests/Unit/V1p1beta1/AdaptationClientTest.php index 66eca1836bca..676d6e378c1a 100644 --- a/Speech/tests/Unit/V1p1beta1/AdaptationClientTest.php +++ b/Speech/tests/Unit/V1p1beta1/AdaptationClientTest.php @@ -23,11 +23,9 @@ namespace Google\Cloud\Speech\Tests\Unit\V1p1beta1; use Google\ApiCore\ApiException; - use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; - use Google\Cloud\Speech\V1p1beta1\AdaptationClient; use Google\Cloud\Speech\V1p1beta1\CustomClass; use Google\Cloud\Speech\V1p1beta1\ListCustomClassesResponse; @@ -44,25 +42,19 @@ */ class AdaptationClientTest extends GeneratedTest { - /** - * @return TransportInterface - */ + /** @return TransportInterface */ private function createTransport($deserialize = null) { return new MockTransport($deserialize); } - /** - * @return CredentialsWrapper - */ + /** @return CredentialsWrapper */ private function createCredentials() { return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); } - /** - * @return AdaptationClient - */ + /** @return AdaptationClient */ private function createClient(array $options = []) { $options += [ @@ -71,9 +63,7 @@ private function createClient(array $options = []) return new AdaptationClient($options); } - /** - * @test - */ + /** @test */ public function createCustomClassTest() { $transport = $this->createTransport(); @@ -108,9 +98,7 @@ public function createCustomClassTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function createCustomClassExceptionTest() { $transport = $this->createTransport(); @@ -145,9 +133,7 @@ public function createCustomClassExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function createPhraseSetTest() { $transport = $this->createTransport(); @@ -182,9 +168,7 @@ public function createPhraseSetTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function createPhraseSetExceptionTest() { $transport = $this->createTransport(); @@ -219,9 +203,7 @@ public function createPhraseSetExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deleteCustomClassTest() { $transport = $this->createTransport(); @@ -245,9 +227,7 @@ public function deleteCustomClassTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deleteCustomClassExceptionTest() { $transport = $this->createTransport(); @@ -280,9 +260,7 @@ public function deleteCustomClassExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deletePhraseSetTest() { $transport = $this->createTransport(); @@ -306,9 +284,7 @@ public function deletePhraseSetTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deletePhraseSetExceptionTest() { $transport = $this->createTransport(); @@ -341,9 +317,7 @@ public function deletePhraseSetExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getCustomClassTest() { $transport = $this->createTransport(); @@ -372,9 +346,7 @@ public function getCustomClassTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getCustomClassExceptionTest() { $transport = $this->createTransport(); @@ -407,9 +379,7 @@ public function getCustomClassExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getPhraseSetTest() { $transport = $this->createTransport(); @@ -438,9 +408,7 @@ public function getPhraseSetTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getPhraseSetExceptionTest() { $transport = $this->createTransport(); @@ -473,9 +441,7 @@ public function getPhraseSetExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listCustomClassesTest() { $transport = $this->createTransport(); @@ -510,9 +476,7 @@ public function listCustomClassesTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listCustomClassesExceptionTest() { $transport = $this->createTransport(); @@ -545,9 +509,7 @@ public function listCustomClassesExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listPhraseSetTest() { $transport = $this->createTransport(); @@ -582,9 +544,7 @@ public function listPhraseSetTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listPhraseSetExceptionTest() { $transport = $this->createTransport(); @@ -617,9 +577,7 @@ public function listPhraseSetExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updateCustomClassTest() { $transport = $this->createTransport(); @@ -648,9 +606,7 @@ public function updateCustomClassTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updateCustomClassExceptionTest() { $transport = $this->createTransport(); @@ -683,9 +639,7 @@ public function updateCustomClassExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updatePhraseSetTest() { $transport = $this->createTransport(); @@ -714,9 +668,7 @@ public function updatePhraseSetTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updatePhraseSetExceptionTest() { $transport = $this->createTransport(); diff --git a/Speech/tests/Unit/V1p1beta1/SpeechClientTest.php b/Speech/tests/Unit/V1p1beta1/SpeechClientTest.php index 3672bf48268d..53526cfbdefd 100644 --- a/Speech/tests/Unit/V1p1beta1/SpeechClientTest.php +++ b/Speech/tests/Unit/V1p1beta1/SpeechClientTest.php @@ -24,14 +24,11 @@ use Google\ApiCore\ApiException; use Google\ApiCore\BidiStream; - use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; - use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Speech\V1p1beta1\LongRunningRecognizeResponse; - use Google\Cloud\Speech\V1p1beta1\RecognitionAudio; use Google\Cloud\Speech\V1p1beta1\RecognitionConfig; use Google\Cloud\Speech\V1p1beta1\RecognizeResponse; @@ -51,25 +48,19 @@ */ class SpeechClientTest extends GeneratedTest { - /** - * @return TransportInterface - */ + /** @return TransportInterface */ private function createTransport($deserialize = null) { return new MockTransport($deserialize); } - /** - * @return CredentialsWrapper - */ + /** @return CredentialsWrapper */ private function createCredentials() { return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); } - /** - * @return SpeechClient - */ + /** @return SpeechClient */ private function createClient(array $options = []) { $options += [ @@ -78,14 +69,12 @@ private function createClient(array $options = []) return new SpeechClient($options); } - /** - * @test - */ + /** @test */ public function longRunningRecognizeTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -101,7 +90,9 @@ public function longRunningRecognizeTest() $incompleteOperation->setName('operations/longRunningRecognizeTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); + $requestId = 37109963; $expectedResponse = new LongRunningRecognizeResponse(); + $expectedResponse->setRequestId($requestId); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -147,14 +138,12 @@ public function longRunningRecognizeTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function longRunningRecognizeExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -207,9 +196,7 @@ public function longRunningRecognizeExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function recognizeTest() { $transport = $this->createTransport(); @@ -218,7 +205,9 @@ public function recognizeTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response + $requestId = 37109963; $expectedResponse = new RecognizeResponse(); + $expectedResponse->setRequestId($requestId); $transport->addResponse($expectedResponse); // Mock request $config = new RecognitionConfig(); @@ -239,9 +228,7 @@ public function recognizeTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function recognizeExceptionTest() { $transport = $this->createTransport(); @@ -277,9 +264,7 @@ public function recognizeExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function streamingRecognizeTest() { $transport = $this->createTransport(); @@ -288,11 +273,17 @@ public function streamingRecognizeTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response + $requestId = 37109963; $expectedResponse = new StreamingRecognizeResponse(); + $expectedResponse->setRequestId($requestId); $transport->addResponse($expectedResponse); + $requestId2 = 1302939070; $expectedResponse2 = new StreamingRecognizeResponse(); + $expectedResponse2->setRequestId($requestId2); $transport->addResponse($expectedResponse2); + $requestId3 = 1302939071; $expectedResponse3 = new StreamingRecognizeResponse(); + $expectedResponse3->setRequestId($requestId3); $transport->addResponse($expectedResponse3); // Mock request $request = new StreamingRecognizeRequest(); @@ -334,9 +325,7 @@ public function streamingRecognizeTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function streamingRecognizeExceptionTest() { $transport = $this->createTransport(); diff --git a/Speech/tests/Unit/V2/SpeechClientTest.php b/Speech/tests/Unit/V2/SpeechClientTest.php index 345c08acab45..2d8551d9719d 100644 --- a/Speech/tests/Unit/V2/SpeechClientTest.php +++ b/Speech/tests/Unit/V2/SpeechClientTest.php @@ -24,23 +24,19 @@ use Google\ApiCore\ApiException; use Google\ApiCore\BidiStream; - use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\LongRunning\OperationsClient; - use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\Cloud\Speech\V2\BatchRecognizeResponse; - use Google\Cloud\Speech\V2\Config; - use Google\Cloud\Speech\V2\CustomClass; use Google\Cloud\Speech\V2\ListCustomClassesResponse; use Google\Cloud\Speech\V2\ListPhraseSetsResponse; use Google\Cloud\Speech\V2\ListRecognizersResponse; use Google\Cloud\Speech\V2\PhraseSet; -use Google\Cloud\Speech\V2\Recognizer; use Google\Cloud\Speech\V2\RecognizeResponse; +use Google\Cloud\Speech\V2\Recognizer; use Google\Cloud\Speech\V2\SpeechClient; use Google\Cloud\Speech\V2\StreamingRecognizeRequest; use Google\Cloud\Speech\V2\StreamingRecognizeResponse; @@ -57,25 +53,19 @@ */ class SpeechClientTest extends GeneratedTest { - /** - * @return TransportInterface - */ + /** @return TransportInterface */ private function createTransport($deserialize = null) { return new MockTransport($deserialize); } - /** - * @return CredentialsWrapper - */ + /** @return CredentialsWrapper */ private function createCredentials() { return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); } - /** - * @return SpeechClient - */ + /** @return SpeechClient */ private function createClient(array $options = []) { $options += [ @@ -84,14 +74,12 @@ private function createClient(array $options = []) return new SpeechClient($options); } - /** - * @test - */ + /** @test */ public function batchRecognizeTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -148,14 +136,12 @@ public function batchRecognizeTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function batchRecognizeExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -205,14 +191,12 @@ public function batchRecognizeExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function createCustomClassTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -286,14 +270,12 @@ public function createCustomClassTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function createCustomClassExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -344,14 +326,12 @@ public function createCustomClassExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function createPhraseSetTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -427,14 +407,12 @@ public function createPhraseSetTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function createPhraseSetExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -485,14 +463,12 @@ public function createPhraseSetExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function createRecognizerTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -572,14 +548,12 @@ public function createRecognizerTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function createRecognizerExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -634,14 +608,12 @@ public function createRecognizerExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deleteCustomClassTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -712,14 +684,12 @@ public function deleteCustomClassTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deleteCustomClassExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -769,14 +739,12 @@ public function deleteCustomClassExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deletePhraseSetTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -849,14 +817,12 @@ public function deletePhraseSetTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deletePhraseSetExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -906,14 +872,12 @@ public function deletePhraseSetExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deleteRecognizerTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -986,14 +950,12 @@ public function deleteRecognizerTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function deleteRecognizerExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -1043,9 +1005,7 @@ public function deleteRecognizerExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getConfigTest() { $transport = $this->createTransport(); @@ -1074,9 +1034,7 @@ public function getConfigTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getConfigExceptionTest() { $transport = $this->createTransport(); @@ -1109,9 +1067,7 @@ public function getConfigExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getCustomClassTest() { $transport = $this->createTransport(); @@ -1150,9 +1106,7 @@ public function getCustomClassTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getCustomClassExceptionTest() { $transport = $this->createTransport(); @@ -1185,9 +1139,7 @@ public function getCustomClassExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getPhraseSetTest() { $transport = $this->createTransport(); @@ -1228,9 +1180,7 @@ public function getPhraseSetTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getPhraseSetExceptionTest() { $transport = $this->createTransport(); @@ -1263,9 +1213,7 @@ public function getPhraseSetExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getRecognizerTest() { $transport = $this->createTransport(); @@ -1306,9 +1254,7 @@ public function getRecognizerTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function getRecognizerExceptionTest() { $transport = $this->createTransport(); @@ -1341,9 +1287,7 @@ public function getRecognizerExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listCustomClassesTest() { $transport = $this->createTransport(); @@ -1378,9 +1322,7 @@ public function listCustomClassesTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listCustomClassesExceptionTest() { $transport = $this->createTransport(); @@ -1413,9 +1355,7 @@ public function listCustomClassesExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listPhraseSetsTest() { $transport = $this->createTransport(); @@ -1450,9 +1390,7 @@ public function listPhraseSetsTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listPhraseSetsExceptionTest() { $transport = $this->createTransport(); @@ -1485,9 +1423,7 @@ public function listPhraseSetsExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listRecognizersTest() { $transport = $this->createTransport(); @@ -1522,9 +1458,7 @@ public function listRecognizersTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function listRecognizersExceptionTest() { $transport = $this->createTransport(); @@ -1557,9 +1491,7 @@ public function listRecognizersExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function recognizeTest() { $transport = $this->createTransport(); @@ -1584,9 +1516,7 @@ public function recognizeTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function recognizeExceptionTest() { $transport = $this->createTransport(); @@ -1619,9 +1549,7 @@ public function recognizeExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function streamingRecognizeTest() { $transport = $this->createTransport(); @@ -1682,9 +1610,7 @@ public function streamingRecognizeTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function streamingRecognizeExceptionTest() { $transport = $this->createTransport(); @@ -1717,14 +1643,12 @@ public function streamingRecognizeExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function undeleteCustomClassTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -1795,14 +1719,12 @@ public function undeleteCustomClassTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function undeleteCustomClassExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -1852,14 +1774,12 @@ public function undeleteCustomClassExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function undeletePhraseSetTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -1932,14 +1852,12 @@ public function undeletePhraseSetTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function undeletePhraseSetExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -1989,14 +1907,12 @@ public function undeletePhraseSetExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function undeleteRecognizerTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -2069,14 +1985,12 @@ public function undeleteRecognizerTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function undeleteRecognizerExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -2126,9 +2040,7 @@ public function undeleteRecognizerExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updateConfigTest() { $transport = $this->createTransport(); @@ -2157,9 +2069,7 @@ public function updateConfigTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updateConfigExceptionTest() { $transport = $this->createTransport(); @@ -2192,14 +2102,12 @@ public function updateConfigExceptionTest() $this->assertTrue($transport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updateCustomClassTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -2270,14 +2178,12 @@ public function updateCustomClassTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updateCustomClassExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -2327,14 +2233,12 @@ public function updateCustomClassExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updatePhraseSetTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -2407,14 +2311,12 @@ public function updatePhraseSetTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updatePhraseSetExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -2464,14 +2366,12 @@ public function updatePhraseSetExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updateRecognizerTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); @@ -2548,14 +2448,12 @@ public function updateRecognizerTest() $this->assertTrue($operationsTransport->isExhausted()); } - /** - * @test - */ + /** @test */ public function updateRecognizerExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ - 'serviceAddress' => '', + 'apiEndpoint' => '', 'transport' => $operationsTransport, 'credentials' => $this->createCredentials(), ]); From 553ca19f0a11ac48a5fb63e5ff7115dfa92e3818 Mon Sep 17 00:00:00 2001 From: David Supplee Date: Mon, 12 Dec 2022 13:34:38 -0800 Subject: [PATCH 7/9] chore: pin to grpc-1.49.0 (#5696) --- .github/workflows/tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2f0d6f1f766a..afee47dc2a29 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -27,7 +27,7 @@ jobs: uses: shivammathur/setup-php@verbose with: php-version: ${{ matrix.php }} - extensions: grpc + extensions: grpc-1.49.0 - name: Install Dependencies uses: nick-invision/retry@v2 with: @@ -61,7 +61,7 @@ jobs: uses: shivammathur/setup-php@verbose with: php-version: '8.0' - extensions: grpc + extensions: grpc-1.49.0 - name: Run Package Test Suites run: bash .github/run-package-tests.sh From 68188ce1be3108c77eb1aec509cad3e8ac84d4a5 Mon Sep 17 00:00:00 2001 From: David Supplee Date: Mon, 12 Dec 2022 14:03:21 -0800 Subject: [PATCH 8/9] feat: introduce bigquery data policies v1 (#5693) --- BigQueryDataPolicies/.OwlBot.yaml | 4 +- .../metadata/V1/Datapolicy.php | Bin 0 -> 5226 bytes .../create_data_policy.php | 71 ++ .../delete_data_policy.php | 69 ++ .../get_data_policy.php | 71 ++ .../get_iam_policy.php | 66 ++ .../list_data_policies.php | 72 ++ .../rename_data_policy.php | 68 ++ .../set_iam_policy.php | 69 ++ .../test_iam_permissions.php | 74 ++ .../update_data_policy.php | 57 ++ .../src/V1/CreateDataPolicyRequest.php | 119 +++ .../src/V1/DataMaskingPolicy.php | 75 ++ .../PredefinedExpression.php | 87 ++ BigQueryDataPolicies/src/V1/DataPolicy.php | 234 +++++ .../src/V1/DataPolicy/DataPolicyType.php | 63 ++ .../src/V1/DataPolicyServiceClient.php | 34 + .../src/V1/DeleteDataPolicyRequest.php | 71 ++ .../V1/Gapic/DataPolicyServiceGapicClient.php | 845 ++++++++++++++++++ .../src/V1/GetDataPolicyRequest.php | 71 ++ .../src/V1/ListDataPoliciesRequest.php | 209 +++++ .../src/V1/ListDataPoliciesResponse.php | 105 +++ .../src/V1/RenameDataPolicyRequest.php | 105 +++ .../src/V1/UpdateDataPolicyRequest.php | 145 +++ .../src/V1/gapic_metadata.json | 63 ++ .../data_policy_service_client_config.json | 79 ++ .../data_policy_service_descriptor_config.php | 18 + ...data_policy_service_rest_client_config.php | 114 +++ .../Unit/V1/DataPolicyServiceClientTest.php | 644 +++++++++++++ 29 files changed, 3700 insertions(+), 2 deletions(-) create mode 100644 BigQueryDataPolicies/metadata/V1/Datapolicy.php create mode 100644 BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/create_data_policy.php create mode 100644 BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/delete_data_policy.php create mode 100644 BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/get_data_policy.php create mode 100644 BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/get_iam_policy.php create mode 100644 BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/list_data_policies.php create mode 100644 BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/rename_data_policy.php create mode 100644 BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/set_iam_policy.php create mode 100644 BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/test_iam_permissions.php create mode 100644 BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/update_data_policy.php create mode 100644 BigQueryDataPolicies/src/V1/CreateDataPolicyRequest.php create mode 100644 BigQueryDataPolicies/src/V1/DataMaskingPolicy.php create mode 100644 BigQueryDataPolicies/src/V1/DataMaskingPolicy/PredefinedExpression.php create mode 100644 BigQueryDataPolicies/src/V1/DataPolicy.php create mode 100644 BigQueryDataPolicies/src/V1/DataPolicy/DataPolicyType.php create mode 100644 BigQueryDataPolicies/src/V1/DataPolicyServiceClient.php create mode 100644 BigQueryDataPolicies/src/V1/DeleteDataPolicyRequest.php create mode 100644 BigQueryDataPolicies/src/V1/Gapic/DataPolicyServiceGapicClient.php create mode 100644 BigQueryDataPolicies/src/V1/GetDataPolicyRequest.php create mode 100644 BigQueryDataPolicies/src/V1/ListDataPoliciesRequest.php create mode 100644 BigQueryDataPolicies/src/V1/ListDataPoliciesResponse.php create mode 100644 BigQueryDataPolicies/src/V1/RenameDataPolicyRequest.php create mode 100644 BigQueryDataPolicies/src/V1/UpdateDataPolicyRequest.php create mode 100644 BigQueryDataPolicies/src/V1/gapic_metadata.json create mode 100644 BigQueryDataPolicies/src/V1/resources/data_policy_service_client_config.json create mode 100644 BigQueryDataPolicies/src/V1/resources/data_policy_service_descriptor_config.php create mode 100644 BigQueryDataPolicies/src/V1/resources/data_policy_service_rest_client_config.php create mode 100644 BigQueryDataPolicies/tests/Unit/V1/DataPolicyServiceClientTest.php diff --git a/BigQueryDataPolicies/.OwlBot.yaml b/BigQueryDataPolicies/.OwlBot.yaml index 960e502fc114..2bd9fd103a66 100644 --- a/BigQueryDataPolicies/.OwlBot.yaml +++ b/BigQueryDataPolicies/.OwlBot.yaml @@ -1,4 +1,4 @@ deep-copy-regex: - - source: /google/cloud/bigquery/datapolicies/v1beta1/.*-php/(.*) - dest: /owl-bot-staging/BigQueryDataPolicies/v1beta1/$1 + - source: /google/cloud/bigquery/datapolicies/(v1|v1beta1)/.*-php/(.*) + dest: /owl-bot-staging/BigQueryDataPolicies/$1/$2 api-name: BigQueryDataPolicies diff --git a/BigQueryDataPolicies/metadata/V1/Datapolicy.php b/BigQueryDataPolicies/metadata/V1/Datapolicy.php new file mode 100644 index 0000000000000000000000000000000000000000..5e3b12f1493df350c737c447ee8708ed6a19e82b GIT binary patch literal 5226 zcmcIo%}*Og6pu|p%g_LskU(hFY_^F4h^z~3(`pH!>kq(+0S6mWkgL^VkIgpg-RzuPkIMXs5qiAT{ZmnD<7FRT?rm7K3;JD;Ex3-?=Qpt4w8mQVv z%_0?%-SyO$=QzLz`yINEvvff zsEVe30X{BpWks_IsCUYiYkJX94V|M3>w1w)PI0bHDtp~DfRhEz$Csrv0Y!zh?hs2? zv_g{DMN2gu!^(oFC{~CQkV}7=obtA%=F~Db>0%Vc4v-6+W7SA_caF1&Q?vAWhMO8_ z1fL4WuqT;nLDF@DvS8@8C^mg+ns}aKLQ{$E^ro|<60H;`d&<6QSiPxk5HFFs2ANi> zkOKwym!%0-?|wf|vsbks*g$ovYC1ja7^pIaRu%i<@n~6o-MXuK*(8-pLGmm?`Ar7l zroq37e&^8b)72fm;pz#jUIo8ig>bzJ`?C{co_WPop|oj6xOF>mHMCHsVV8HkxO)Ou zLIRc-TyN=ZZ%I|Ev?stnne_;-CrnJVuD7hc>8-Ku0hJdcG!mX+zX=74F0v}{?Mm=Z zB4{jO5omR^XSf-#L7-RJ4o;$eQ?bCs@dy{09EiXFhZOx+67Y=APC!mwa8Up&wg9a$ z)-;Cip+PF=c{CmcQ-gD}p27)q3r#!mKG>cA9^h`8VDA{XZ5vU{r``z1&|r=2BU7?G z)Du2xpHCr3Uw##hZ4lbKn~;4TFQBt@!DEs7fv+O0lLI+KjI5T}E(5NkpQ5oO(a3Rr z##_vJK|wtQh2KG=%f#t~`YLRH2QkX1cGEhHI-iPHlTsJZfT>i7Y{T?oq@BYUA@-AF zJS6&fAI(=hg!;>>26JfqEd9*2yDB4#A;0 zKfr%|7NI8NcoYz`J}o;+#YMPs20uU-84j9ts$TJ{<{V4rkNo_5ag$ zt5WV>dTrTXh>EpmlGR&j;5ZcbXQb%Zu|w}uBc>Te_s9@C^glLY)Ia7tJ<1)1yluos z&`?!zihDGInzBo@`0LP1S+x1bQFMV)&=Mf5qf4emN~Emnq$HC^@Wr;_kiweA(A;Vd z0ckNTWCN?I!05^uzJ^ARTfsNbwd_VJnOaJ(rIK>$6Zn$LrPtTmLV{3#Zbh2=;5Lvy zj0UC518F-auWe>BBj@lHbO{Vdo0+`q2V_giY^FwDi;p7gXLi%axyQpUC2lI^h_$a4 z3H~#JM%qUczS|`c?TTIln&^G-@H=1q`uDfdMgCnnn-ATIxDX`CbSOEdTa!Wz556M_ zyQ(vxOu_$vkL~lUYaiPcU&6pT31%#3?E}7R z!rK*nM;5zep;O;IS@4n@8PBaA+Q*UP9ltT0dfxz+gPR@ZeNb>!fLn}`0}ZA?ZkW5FVcfO$1!a&7CSgN@BjywFs0_~ z1usuCCke7Dzh!EQQ#Pz>{F^A6f}5OA!i#%Ae3+hS+ziXoC!lO(=e~O-1Ou9)R|LbV z#41E*Z7bHiEuQc`Hcw{=J2=51>xbx#W%djvB7!cn>createDataPolicy($formattedParent, $dataPolicy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DataPolicyServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_data_policy_sample($formattedParent); +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_CreateDataPolicy_sync] diff --git a/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/delete_data_policy.php b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/delete_data_policy.php new file mode 100644 index 000000000000..d80ccbda5608 --- /dev/null +++ b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/delete_data_policy.php @@ -0,0 +1,69 @@ +deleteDataPolicy($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataPolicyServiceClient::dataPolicyName( + '[PROJECT]', + '[LOCATION]', + '[DATA_POLICY]' + ); + + delete_data_policy_sample($formattedName); +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_DeleteDataPolicy_sync] diff --git a/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/get_data_policy.php b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/get_data_policy.php new file mode 100644 index 000000000000..b5384d195f23 --- /dev/null +++ b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/get_data_policy.php @@ -0,0 +1,71 @@ +getDataPolicy($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DataPolicyServiceClient::dataPolicyName( + '[PROJECT]', + '[LOCATION]', + '[DATA_POLICY]' + ); + + get_data_policy_sample($formattedName); +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_GetDataPolicy_sync] diff --git a/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/get_iam_policy.php b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..602f4ee4495f --- /dev/null +++ b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/get_iam_policy.php @@ -0,0 +1,66 @@ +getIamPolicy($resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_GetIamPolicy_sync] diff --git a/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/list_data_policies.php b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/list_data_policies.php new file mode 100644 index 000000000000..111cdcecbbae --- /dev/null +++ b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/list_data_policies.php @@ -0,0 +1,72 @@ +listDataPolicies($formattedParent); + + /** @var DataPolicy $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DataPolicyServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_data_policies_sample($formattedParent); +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_ListDataPolicies_sync] diff --git a/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/rename_data_policy.php b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/rename_data_policy.php new file mode 100644 index 000000000000..e8d3f96c7ca7 --- /dev/null +++ b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/rename_data_policy.php @@ -0,0 +1,68 @@ +renameDataPolicy($name, $newDataPolicyId); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + $newDataPolicyId = '[NEW_DATA_POLICY_ID]'; + + rename_data_policy_sample($name, $newDataPolicyId); +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_RenameDataPolicy_sync] diff --git a/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/set_iam_policy.php b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..6c42621189ed --- /dev/null +++ b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/set_iam_policy.php @@ -0,0 +1,69 @@ +setIamPolicy($resource, $policy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_SetIamPolicy_sync] diff --git a/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/test_iam_permissions.php b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..99e6d19e3da5 --- /dev/null +++ b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/test_iam_permissions.php @@ -0,0 +1,74 @@ +testIamPermissions($resource, $permissions); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_TestIamPermissions_sync] diff --git a/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/update_data_policy.php b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/update_data_policy.php new file mode 100644 index 000000000000..f5ac566bcb0e --- /dev/null +++ b/BigQueryDataPolicies/samples/V1/DataPolicyServiceClient/update_data_policy.php @@ -0,0 +1,57 @@ +updateDataPolicy($dataPolicy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END bigquerydatapolicy_v1_generated_DataPolicyService_UpdateDataPolicy_sync] diff --git a/BigQueryDataPolicies/src/V1/CreateDataPolicyRequest.php b/BigQueryDataPolicies/src/V1/CreateDataPolicyRequest.php new file mode 100644 index 000000000000..b0d97987ab5e --- /dev/null +++ b/BigQueryDataPolicies/src/V1/CreateDataPolicyRequest.php @@ -0,0 +1,119 @@ +google.cloud.bigquery.datapolicies.v1.CreateDataPolicyRequest + */ +class CreateDataPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the project that the data policy will belong to. + * The format is `projects/{project_number}/locations/{location_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $parent = ''; + /** + * Required. The data policy to create. The `name` field does not need to be + * provided for the data policy creation. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $data_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the project that the data policy will belong to. + * The format is `projects/{project_number}/locations/{location_id}`. + * @type \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $data_policy + * Required. The data policy to create. The `name` field does not need to be + * provided for the data policy creation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the project that the data policy will belong to. + * The format is `projects/{project_number}/locations/{location_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the project that the data policy will belong to. + * The format is `projects/{project_number}/locations/{location_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The data policy to create. The `name` field does not need to be + * provided for the data policy creation. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy|null + */ + public function getDataPolicy() + { + return $this->data_policy; + } + + public function hasDataPolicy() + { + return isset($this->data_policy); + } + + public function clearDataPolicy() + { + unset($this->data_policy); + } + + /** + * Required. The data policy to create. The `name` field does not need to be + * provided for the data policy creation. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $var + * @return $this + */ + public function setDataPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy::class); + $this->data_policy = $var; + + return $this; + } + +} + diff --git a/BigQueryDataPolicies/src/V1/DataMaskingPolicy.php b/BigQueryDataPolicies/src/V1/DataMaskingPolicy.php new file mode 100644 index 000000000000..8ef0e8712da8 --- /dev/null +++ b/BigQueryDataPolicies/src/V1/DataMaskingPolicy.php @@ -0,0 +1,75 @@ +google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy + */ +class DataMaskingPolicy extends \Google\Protobuf\Internal\Message +{ + protected $masking_expression; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $predefined_expression + * A predefined masking expression. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * A predefined masking expression. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpression predefined_expression = 1; + * @return int + */ + public function getPredefinedExpression() + { + return $this->readOneof(1); + } + + public function hasPredefinedExpression() + { + return $this->hasOneof(1); + } + + /** + * A predefined masking expression. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpression predefined_expression = 1; + * @param int $var + * @return $this + */ + public function setPredefinedExpression($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy\PredefinedExpression::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getMaskingExpression() + { + return $this->whichOneof("masking_expression"); + } + +} + diff --git a/BigQueryDataPolicies/src/V1/DataMaskingPolicy/PredefinedExpression.php b/BigQueryDataPolicies/src/V1/DataMaskingPolicy/PredefinedExpression.php new file mode 100644 index 000000000000..127ef1921b4b --- /dev/null +++ b/BigQueryDataPolicies/src/V1/DataMaskingPolicy/PredefinedExpression.php @@ -0,0 +1,87 @@ +google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpression + */ +class PredefinedExpression +{ + /** + * Default, unspecified predefined expression. No masking will take place + * since no expression is specified. + * + * Generated from protobuf enum PREDEFINED_EXPRESSION_UNSPECIFIED = 0; + */ + const PREDEFINED_EXPRESSION_UNSPECIFIED = 0; + /** + * Masking expression to replace data with SHA-256 hash. + * + * Generated from protobuf enum SHA256 = 3; + */ + const SHA256 = 3; + /** + * Masking expression to replace data with NULLs. + * + * Generated from protobuf enum ALWAYS_NULL = 5; + */ + const ALWAYS_NULL = 5; + /** + * Masking expression to replace data with their default masking values. + * The default masking values for each type listed as below: + * * STRING: "" + * * BYTES: b'' + * * INTEGER: 0 + * * FLOAT: 0.0 + * * NUMERIC: 0 + * * BOOLEAN: FALSE + * * TIMESTAMP: 0001-01-01 00:00:00 UTC + * * DATE: 0001-01-01 + * * TIME: 00:00:00 + * * DATETIME: 0001-01-01T00:00:00 + * * GEOGRAPHY: POINT(0 0) + * * BIGNUMERIC: 0 + * * ARRAY: [] + * * STRUCT: NOT_APPLICABLE + * * JSON: NULL + * + * Generated from protobuf enum DEFAULT_MASKING_VALUE = 7; + */ + const DEFAULT_MASKING_VALUE = 7; + + private static $valueToName = [ + self::PREDEFINED_EXPRESSION_UNSPECIFIED => 'PREDEFINED_EXPRESSION_UNSPECIFIED', + self::SHA256 => 'SHA256', + self::ALWAYS_NULL => 'ALWAYS_NULL', + self::DEFAULT_MASKING_VALUE => 'DEFAULT_MASKING_VALUE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/BigQueryDataPolicies/src/V1/DataPolicy.php b/BigQueryDataPolicies/src/V1/DataPolicy.php new file mode 100644 index 000000000000..222656fb050b --- /dev/null +++ b/BigQueryDataPolicies/src/V1/DataPolicy.php @@ -0,0 +1,234 @@ +google.cloud.bigquery.datapolicies.v1.DataPolicy + */ +class DataPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of this data policy, in the format of + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $name = ''; + /** + * Type of data policy. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType data_policy_type = 2; + */ + private $data_policy_type = 0; + /** + * User-assigned (human readable) ID of the data policy that needs to be + * unique within a project. Used as {data_policy_id} in part of the resource + * name. + * + * Generated from protobuf field string data_policy_id = 3; + */ + private $data_policy_id = ''; + protected $matching_label; + protected $policy; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $policy_tag + * Policy tag resource name, in the format of + * `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. + * @type \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy $data_masking_policy + * The data masking policy that specifies the data masking rule to use. + * @type string $name + * Output only. Resource name of this data policy, in the format of + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * @type int $data_policy_type + * Type of data policy. + * @type string $data_policy_id + * User-assigned (human readable) ID of the data policy that needs to be + * unique within a project. Used as {data_policy_id} in part of the resource + * name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Policy tag resource name, in the format of + * `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. + * + * Generated from protobuf field string policy_tag = 4; + * @return string + */ + public function getPolicyTag() + { + return $this->readOneof(4); + } + + public function hasPolicyTag() + { + return $this->hasOneof(4); + } + + /** + * Policy tag resource name, in the format of + * `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. + * + * Generated from protobuf field string policy_tag = 4; + * @param string $var + * @return $this + */ + public function setPolicyTag($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The data masking policy that specifies the data masking rule to use. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy data_masking_policy = 5; + * @return \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy|null + */ + public function getDataMaskingPolicy() + { + return $this->readOneof(5); + } + + public function hasDataMaskingPolicy() + { + return $this->hasOneof(5); + } + + /** + * The data masking policy that specifies the data masking rule to use. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy data_masking_policy = 5; + * @param \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy $var + * @return $this + */ + public function setDataMaskingPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataMaskingPolicy::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Output only. Resource name of this data policy, in the format of + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of this data policy, in the format of + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Type of data policy. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType data_policy_type = 2; + * @return int + */ + public function getDataPolicyType() + { + return $this->data_policy_type; + } + + /** + * Type of data policy. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType data_policy_type = 2; + * @param int $var + * @return $this + */ + public function setDataPolicyType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy\DataPolicyType::class); + $this->data_policy_type = $var; + + return $this; + } + + /** + * User-assigned (human readable) ID of the data policy that needs to be + * unique within a project. Used as {data_policy_id} in part of the resource + * name. + * + * Generated from protobuf field string data_policy_id = 3; + * @return string + */ + public function getDataPolicyId() + { + return $this->data_policy_id; + } + + /** + * User-assigned (human readable) ID of the data policy that needs to be + * unique within a project. Used as {data_policy_id} in part of the resource + * name. + * + * Generated from protobuf field string data_policy_id = 3; + * @param string $var + * @return $this + */ + public function setDataPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->data_policy_id = $var; + + return $this; + } + + /** + * @return string + */ + public function getMatchingLabel() + { + return $this->whichOneof("matching_label"); + } + + /** + * @return string + */ + public function getPolicy() + { + return $this->whichOneof("policy"); + } + +} + diff --git a/BigQueryDataPolicies/src/V1/DataPolicy/DataPolicyType.php b/BigQueryDataPolicies/src/V1/DataPolicy/DataPolicyType.php new file mode 100644 index 000000000000..3c172a0e2cc8 --- /dev/null +++ b/BigQueryDataPolicies/src/V1/DataPolicy/DataPolicyType.php @@ -0,0 +1,63 @@ +google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType + */ +class DataPolicyType +{ + /** + * Default value for the data policy type. This should not be used. + * + * Generated from protobuf enum DATA_POLICY_TYPE_UNSPECIFIED = 0; + */ + const DATA_POLICY_TYPE_UNSPECIFIED = 0; + /** + * Used to create a data policy for column-level security, without data + * masking. + * + * Generated from protobuf enum COLUMN_LEVEL_SECURITY_POLICY = 3; + */ + const COLUMN_LEVEL_SECURITY_POLICY = 3; + /** + * Used to create a data policy for data masking. + * + * Generated from protobuf enum DATA_MASKING_POLICY = 2; + */ + const DATA_MASKING_POLICY = 2; + + private static $valueToName = [ + self::DATA_POLICY_TYPE_UNSPECIFIED => 'DATA_POLICY_TYPE_UNSPECIFIED', + self::COLUMN_LEVEL_SECURITY_POLICY => 'COLUMN_LEVEL_SECURITY_POLICY', + self::DATA_MASKING_POLICY => 'DATA_MASKING_POLICY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/BigQueryDataPolicies/src/V1/DataPolicyServiceClient.php b/BigQueryDataPolicies/src/V1/DataPolicyServiceClient.php new file mode 100644 index 000000000000..fb6b60b5dd5b --- /dev/null +++ b/BigQueryDataPolicies/src/V1/DataPolicyServiceClient.php @@ -0,0 +1,34 @@ +google.cloud.bigquery.datapolicies.v1.DeleteDataPolicyRequest + */ +class DeleteDataPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the data policy to delete. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the data policy to delete. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the data policy to delete. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the data policy to delete. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/BigQueryDataPolicies/src/V1/Gapic/DataPolicyServiceGapicClient.php b/BigQueryDataPolicies/src/V1/Gapic/DataPolicyServiceGapicClient.php new file mode 100644 index 000000000000..c9612a4f49f7 --- /dev/null +++ b/BigQueryDataPolicies/src/V1/Gapic/DataPolicyServiceGapicClient.php @@ -0,0 +1,845 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $dataPolicy = new DataPolicy(); + * $response = $dataPolicyServiceClient->createDataPolicy($formattedParent, $dataPolicy); + * } finally { + * $dataPolicyServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + */ +class DataPolicyServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.bigquery.datapolicies.v1.DataPolicyService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'bigquerydatapolicy.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigquery', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $dataPolicyNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => + self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => + __DIR__ . + '/../resources/data_policy_service_client_config.json', + 'descriptorsConfigPath' => + __DIR__ . + '/../resources/data_policy_service_descriptor_config.php', + 'gcpApiConfigPath' => + __DIR__ . '/../resources/data_policy_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . + '/../resources/data_policy_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getDataPolicyNameTemplate() + { + if (self::$dataPolicyNameTemplate == null) { + self::$dataPolicyNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/dataPolicies/{data_policy}' + ); + } + + return self::$dataPolicyNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}' + ); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'dataPolicy' => self::getDataPolicyNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a data_policy + * resource. + * + * @param string $project + * @param string $location + * @param string $dataPolicy + * + * @return string The formatted data_policy resource. + */ + public static function dataPolicyName($project, $location, $dataPolicy) + { + return self::getDataPolicyNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'data_policy' => $dataPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataPolicy: projects/{project}/locations/{location}/dataPolicies/{data_policy} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException( + "Template name $template does not exist" + ); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException( + "Input did not match any known format. Input: $formattedName" + ); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'bigquerydatapolicy.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Creates a new data policy under a project with the given `dataPolicyId` + * (used as the display name), policy tag, and data policy type. + * + * Sample code: + * ``` + * $dataPolicyServiceClient = new DataPolicyServiceClient(); + * try { + * $formattedParent = $dataPolicyServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $dataPolicy = new DataPolicy(); + * $response = $dataPolicyServiceClient->createDataPolicy($formattedParent, $dataPolicy); + * } finally { + * $dataPolicyServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the project that the data policy will belong to. + * The format is `projects/{project_number}/locations/{location_id}`. + * @param DataPolicy $dataPolicy Required. The data policy to create. The `name` field does not need to be + * provided for the data policy creation. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy + * + * @throws ApiException if the remote call fails + */ + public function createDataPolicy( + $parent, + $dataPolicy, + array $optionalArgs = [] + ) { + $request = new CreateDataPolicyRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDataPolicy($dataPolicy); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'CreateDataPolicy', + DataPolicy::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Deletes the data policy specified by its resource name. + * + * Sample code: + * ``` + * $dataPolicyServiceClient = new DataPolicyServiceClient(); + * try { + * $formattedName = $dataPolicyServiceClient->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); + * $dataPolicyServiceClient->deleteDataPolicy($formattedName); + * } finally { + * $dataPolicyServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the data policy to delete. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteDataPolicy($name, array $optionalArgs = []) + { + $request = new DeleteDataPolicyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'DeleteDataPolicy', + GPBEmpty::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Gets the data policy specified by its resource name. + * + * Sample code: + * ``` + * $dataPolicyServiceClient = new DataPolicyServiceClient(); + * try { + * $formattedName = $dataPolicyServiceClient->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); + * $response = $dataPolicyServiceClient->getDataPolicy($formattedName); + * } finally { + * $dataPolicyServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the requested data policy. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy + * + * @throws ApiException if the remote call fails + */ + public function getDataPolicy($name, array $optionalArgs = []) + { + $request = new GetDataPolicyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetDataPolicy', + DataPolicy::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Gets the IAM policy for the specified data policy. + * + * Sample code: + * ``` + * $dataPolicyServiceClient = new DataPolicyServiceClient(); + * try { + * $resource = 'resource'; + * $response = $dataPolicyServiceClient->getIamPolicy($resource); + * } finally { + * $dataPolicyServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetIamPolicy', + Policy::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * List all of the data policies in the specified parent project. + * + * Sample code: + * ``` + * $dataPolicyServiceClient = new DataPolicyServiceClient(); + * try { + * $formattedParent = $dataPolicyServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $dataPolicyServiceClient->listDataPolicies($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataPolicyServiceClient->listDataPolicies($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataPolicyServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the project for which to list data policies. + * Format is `projects/{project_number}/locations/{location_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Filters the data policies by policy tags that they + * are associated with. Currently filter only supports + * "policy_tag" based filtering and OR based predicates. Sample + * filter can be "policy_tag: + * `'projects/1/locations/us/taxonomies/2/policyTags/3'`". You may use + * wildcard such as "policy_tag: + * `'projects/1/locations/us/taxonomies/2/*'`". + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listDataPolicies($parent, array $optionalArgs = []) + { + $request = new ListDataPoliciesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( + 'ListDataPolicies', + $optionalArgs, + ListDataPoliciesResponse::class, + $request + ); + } + + /** + * Renames the id (display name) of the specified data policy. + * + * Sample code: + * ``` + * $dataPolicyServiceClient = new DataPolicyServiceClient(); + * try { + * $name = 'name'; + * $newDataPolicyId = 'new_data_policy_id'; + * $response = $dataPolicyServiceClient->renameDataPolicy($name, $newDataPolicyId); + * } finally { + * $dataPolicyServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the data policy to rename. The format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` + * @param string $newDataPolicyId Required. The new data policy id. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy + * + * @throws ApiException if the remote call fails + */ + public function renameDataPolicy( + $name, + $newDataPolicyId, + array $optionalArgs = [] + ) { + $request = new RenameDataPolicyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setNewDataPolicyId($newDataPolicyId); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'RenameDataPolicy', + DataPolicy::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Sets the IAM policy for the specified data policy. + * + * Sample code: + * ``` + * $dataPolicyServiceClient = new DataPolicyServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $dataPolicyServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $dataPolicyServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'SetIamPolicy', + Policy::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Returns the caller's permission on the specified data policy resource. + * + * Sample code: + * ``` + * $dataPolicyServiceClient = new DataPolicyServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $dataPolicyServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $dataPolicyServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions( + $resource, + $permissions, + array $optionalArgs = [] + ) { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'TestIamPermissions', + TestIamPermissionsResponse::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Updates the metadata for an existing data policy. The target data policy + * can be specified by the resource name. + * + * Sample code: + * ``` + * $dataPolicyServiceClient = new DataPolicyServiceClient(); + * try { + * $dataPolicy = new DataPolicy(); + * $response = $dataPolicyServiceClient->updateDataPolicy($dataPolicy); + * } finally { + * $dataPolicyServiceClient->close(); + * } + * ``` + * + * @param DataPolicy $dataPolicy Required. Update the data policy's metadata. + * + * The target data policy is determined by the `name` field. + * Other fields are updated to the specified values based on the field masks. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * + * Updates to the `name` and `dataPolicyId` fields are not allowed. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy + * + * @throws ApiException if the remote call fails + */ + public function updateDataPolicy($dataPolicy, array $optionalArgs = []) + { + $request = new UpdateDataPolicyRequest(); + $requestParamHeaders = []; + $request->setDataPolicy($dataPolicy); + $requestParamHeaders['data_policy.name'] = $dataPolicy->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'UpdateDataPolicy', + DataPolicy::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/BigQueryDataPolicies/src/V1/GetDataPolicyRequest.php b/BigQueryDataPolicies/src/V1/GetDataPolicyRequest.php new file mode 100644 index 000000000000..de11e4ada486 --- /dev/null +++ b/BigQueryDataPolicies/src/V1/GetDataPolicyRequest.php @@ -0,0 +1,71 @@ +google.cloud.bigquery.datapolicies.v1.GetDataPolicyRequest + */ +class GetDataPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the requested data policy. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the requested data policy. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the requested data policy. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the requested data policy. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/BigQueryDataPolicies/src/V1/ListDataPoliciesRequest.php b/BigQueryDataPolicies/src/V1/ListDataPoliciesRequest.php new file mode 100644 index 000000000000..ec169c1d3918 --- /dev/null +++ b/BigQueryDataPolicies/src/V1/ListDataPoliciesRequest.php @@ -0,0 +1,209 @@ +google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest + */ +class ListDataPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the project for which to list data policies. + * Format is `projects/{project_number}/locations/{location_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $parent = ''; + /** + * The maximum number of data policies to return. Must be a value between 1 + * and 1000. + * If not set, defaults to 50. + * + * Generated from protobuf field int32 page_size = 2; + */ + private $page_size = 0; + /** + * The `nextPageToken` value returned from a previous list request, if any. If + * not set, defaults to an empty string. + * + * Generated from protobuf field string page_token = 3; + */ + private $page_token = ''; + /** + * Filters the data policies by policy tags that they + * are associated with. Currently filter only supports + * "policy_tag" based filtering and OR based predicates. Sample + * filter can be "policy_tag: + * `'projects/1/locations/us/taxonomies/2/policyTags/3'`". You may use + * wildcard such as "policy_tag: + * `'projects/1/locations/us/taxonomies/2/*'`". + * + * Generated from protobuf field string filter = 4; + */ + private $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the project for which to list data policies. + * Format is `projects/{project_number}/locations/{location_id}`. + * @type int $page_size + * The maximum number of data policies to return. Must be a value between 1 + * and 1000. + * If not set, defaults to 50. + * @type string $page_token + * The `nextPageToken` value returned from a previous list request, if any. If + * not set, defaults to an empty string. + * @type string $filter + * Filters the data policies by policy tags that they + * are associated with. Currently filter only supports + * "policy_tag" based filtering and OR based predicates. Sample + * filter can be "policy_tag: + * `'projects/1/locations/us/taxonomies/2/policyTags/3'`". You may use + * wildcard such as "policy_tag: + * `'projects/1/locations/us/taxonomies/2/*'`". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the project for which to list data policies. + * Format is `projects/{project_number}/locations/{location_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the project for which to list data policies. + * Format is `projects/{project_number}/locations/{location_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of data policies to return. Must be a value between 1 + * and 1000. + * If not set, defaults to 50. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of data policies to return. Must be a value between 1 + * and 1000. + * If not set, defaults to 50. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The `nextPageToken` value returned from a previous list request, if any. If + * not set, defaults to an empty string. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `nextPageToken` value returned from a previous list request, if any. If + * not set, defaults to an empty string. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filters the data policies by policy tags that they + * are associated with. Currently filter only supports + * "policy_tag" based filtering and OR based predicates. Sample + * filter can be "policy_tag: + * `'projects/1/locations/us/taxonomies/2/policyTags/3'`". You may use + * wildcard such as "policy_tag: + * `'projects/1/locations/us/taxonomies/2/*'`". + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filters the data policies by policy tags that they + * are associated with. Currently filter only supports + * "policy_tag" based filtering and OR based predicates. Sample + * filter can be "policy_tag: + * `'projects/1/locations/us/taxonomies/2/policyTags/3'`". You may use + * wildcard such as "policy_tag: + * `'projects/1/locations/us/taxonomies/2/*'`". + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/BigQueryDataPolicies/src/V1/ListDataPoliciesResponse.php b/BigQueryDataPolicies/src/V1/ListDataPoliciesResponse.php new file mode 100644 index 000000000000..fe70ee1f11b6 --- /dev/null +++ b/BigQueryDataPolicies/src/V1/ListDataPoliciesResponse.php @@ -0,0 +1,105 @@ +google.cloud.bigquery.datapolicies.v1.ListDataPoliciesResponse + */ +class ListDataPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Data policies that belong to the requested project. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policies = 1; + */ + private $data_policies; + /** + * Token used to retrieve the next page of results, or empty if there are no + * more results. + * + * Generated from protobuf field string next_page_token = 2; + */ + private $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy>|\Google\Protobuf\Internal\RepeatedField $data_policies + * Data policies that belong to the requested project. + * @type string $next_page_token + * Token used to retrieve the next page of results, or empty if there are no + * more results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Data policies that belong to the requested project. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataPolicies() + { + return $this->data_policies; + } + + /** + * Data policies that belong to the requested project. + * + * Generated from protobuf field repeated .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policies = 1; + * @param array<\Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy::class); + $this->data_policies = $arr; + + return $this; + } + + /** + * Token used to retrieve the next page of results, or empty if there are no + * more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token used to retrieve the next page of results, or empty if there are no + * more results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/BigQueryDataPolicies/src/V1/RenameDataPolicyRequest.php b/BigQueryDataPolicies/src/V1/RenameDataPolicyRequest.php new file mode 100644 index 000000000000..b3830f8fa7c2 --- /dev/null +++ b/BigQueryDataPolicies/src/V1/RenameDataPolicyRequest.php @@ -0,0 +1,105 @@ +google.cloud.bigquery.datapolicies.v1.RenameDataPolicyRequest + */ +class RenameDataPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the data policy to rename. The format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $name = ''; + /** + * Required. The new data policy id. + * + * Generated from protobuf field string new_data_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $new_data_policy_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the data policy to rename. The format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` + * @type string $new_data_policy_id + * Required. The new data policy id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the data policy to rename. The format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the data policy to rename. The format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The new data policy id. + * + * Generated from protobuf field string new_data_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNewDataPolicyId() + { + return $this->new_data_policy_id; + } + + /** + * Required. The new data policy id. + * + * Generated from protobuf field string new_data_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNewDataPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->new_data_policy_id = $var; + + return $this; + } + +} + diff --git a/BigQueryDataPolicies/src/V1/UpdateDataPolicyRequest.php b/BigQueryDataPolicies/src/V1/UpdateDataPolicyRequest.php new file mode 100644 index 000000000000..c9126ed81880 --- /dev/null +++ b/BigQueryDataPolicies/src/V1/UpdateDataPolicyRequest.php @@ -0,0 +1,145 @@ +google.cloud.bigquery.datapolicies.v1.UpdateDataPolicyRequest + */ +class UpdateDataPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Update the data policy's metadata. + * The target data policy is determined by the `name` field. + * Other fields are updated to the specified values based on the field masks. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $data_policy = null; + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * Updates to the `name` and `dataPolicyId` fields are not allowed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + private $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $data_policy + * Required. Update the data policy's metadata. + * The target data policy is determined by the `name` field. + * Other fields are updated to the specified values based on the field masks. + * @type \Google\Protobuf\FieldMask $update_mask + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * Updates to the `name` and `dataPolicyId` fields are not allowed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Datapolicies\V1\Datapolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Update the data policy's metadata. + * The target data policy is determined by the `name` field. + * Other fields are updated to the specified values based on the field masks. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy|null + */ + public function getDataPolicy() + { + return $this->data_policy; + } + + public function hasDataPolicy() + { + return isset($this->data_policy); + } + + public function clearDataPolicy() + { + unset($this->data_policy); + } + + /** + * Required. Update the data policy's metadata. + * The target data policy is determined by the `name` field. + * Other fields are updated to the specified values based on the field masks. + * + * Generated from protobuf field .google.cloud.bigquery.datapolicies.v1.DataPolicy data_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy $var + * @return $this + */ + public function setDataPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataPolicies\V1\DataPolicy::class); + $this->data_policy = $var; + + return $this; + } + + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * Updates to the `name` and `dataPolicyId` fields are not allowed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * Updates to the `name` and `dataPolicyId` fields are not allowed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/BigQueryDataPolicies/src/V1/gapic_metadata.json b/BigQueryDataPolicies/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..1d84ac5f7a4d --- /dev/null +++ b/BigQueryDataPolicies/src/V1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.bigquery.datapolicies.v1", + "libraryPackage": "Google\\Cloud\\BigQuery\\DataPolicies\\V1", + "services": { + "DataPolicyService": { + "clients": { + "grpc": { + "libraryClient": "DataPolicyServiceGapicClient", + "rpcs": { + "CreateDataPolicy": { + "methods": [ + "createDataPolicy" + ] + }, + "DeleteDataPolicy": { + "methods": [ + "deleteDataPolicy" + ] + }, + "GetDataPolicy": { + "methods": [ + "getDataPolicy" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "ListDataPolicies": { + "methods": [ + "listDataPolicies" + ] + }, + "RenameDataPolicy": { + "methods": [ + "renameDataPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateDataPolicy": { + "methods": [ + "updateDataPolicy" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/BigQueryDataPolicies/src/V1/resources/data_policy_service_client_config.json b/BigQueryDataPolicies/src/V1/resources/data_policy_service_client_config.json new file mode 100644 index 000000000000..c403ed0aa2f4 --- /dev/null +++ b/BigQueryDataPolicies/src/V1/resources/data_policy_service_client_config.json @@ -0,0 +1,79 @@ +{ + "interfaces": { + "google.cloud.bigquery.datapolicies.v1.DataPolicyService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateDataPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteDataPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDataPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDataPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RenameDataPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateDataPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/BigQueryDataPolicies/src/V1/resources/data_policy_service_descriptor_config.php b/BigQueryDataPolicies/src/V1/resources/data_policy_service_descriptor_config.php new file mode 100644 index 000000000000..6aca9ce454e2 --- /dev/null +++ b/BigQueryDataPolicies/src/V1/resources/data_policy_service_descriptor_config.php @@ -0,0 +1,18 @@ + [ + 'google.cloud.bigquery.datapolicies.v1.DataPolicyService' => [ + 'ListDataPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataPolicies', + ], + ], + ], + ], +]; diff --git a/BigQueryDataPolicies/src/V1/resources/data_policy_service_rest_client_config.php b/BigQueryDataPolicies/src/V1/resources/data_policy_service_rest_client_config.php new file mode 100644 index 000000000000..6a7324e75776 --- /dev/null +++ b/BigQueryDataPolicies/src/V1/resources/data_policy_service_rest_client_config.php @@ -0,0 +1,114 @@ + [ + 'google.cloud.bigquery.datapolicies.v1.DataPolicyService' => [ + 'CreateDataPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataPolicies', + 'body' => 'data_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDataPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataPolicies/*}:getIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'ListDataPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RenameDataPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataPolicies/*}:rename', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataPolicies/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataPolicies/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateDataPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{data_policy.name=projects/*/locations/*/dataPolicies/*}', + 'body' => 'data_policy', + 'placeholders' => [ + 'data_policy.name' => [ + 'getters' => [ + 'getDataPolicy', + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/BigQueryDataPolicies/tests/Unit/V1/DataPolicyServiceClientTest.php b/BigQueryDataPolicies/tests/Unit/V1/DataPolicyServiceClientTest.php new file mode 100644 index 000000000000..6c112c1aadc1 --- /dev/null +++ b/BigQueryDataPolicies/tests/Unit/V1/DataPolicyServiceClientTest.php @@ -0,0 +1,644 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataPolicyServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataPolicyServiceClient($options); + } + + /** @test */ + public function createDataPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $policyTag = 'policyTag1593879309'; + $name = 'name3373707'; + $dataPolicyId = 'dataPolicyId456934643'; + $expectedResponse = new DataPolicy(); + $expectedResponse->setPolicyTag($policyTag); + $expectedResponse->setName($name); + $expectedResponse->setDataPolicyId($dataPolicyId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataPolicy = new DataPolicy(); + $response = $gapicClient->createDataPolicy($formattedParent, $dataPolicy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datapolicies.v1.DataPolicyService/CreateDataPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataPolicy(); + $this->assertProtobufEquals($dataPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDataPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataPolicy = new DataPolicy(); + try { + $gapicClient->createDataPolicy($formattedParent, $dataPolicy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); + $gapicClient->deleteDataPolicy($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datapolicies.v1.DataPolicyService/DeleteDataPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); + try { + $gapicClient->deleteDataPolicy($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $policyTag = 'policyTag1593879309'; + $name2 = 'name2-1052831874'; + $dataPolicyId = 'dataPolicyId456934643'; + $expectedResponse = new DataPolicy(); + $expectedResponse->setPolicyTag($policyTag); + $expectedResponse->setName($name2); + $expectedResponse->setDataPolicyId($dataPolicyId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); + $response = $gapicClient->getDataPolicy($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datapolicies.v1.DataPolicyService/GetDataPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->dataPolicyName('[PROJECT]', '[LOCATION]', '[DATA_POLICY]'); + try { + $gapicClient->getDataPolicy($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datapolicies.v1.DataPolicyService/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataPoliciesElement = new DataPolicy(); + $dataPolicies = [ + $dataPoliciesElement, + ]; + $expectedResponse = new ListDataPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataPolicies($dataPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listDataPolicies($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datapolicies.v1.DataPolicyService/ListDataPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listDataPolicies($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameDataPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $policyTag = 'policyTag1593879309'; + $name2 = 'name2-1052831874'; + $dataPolicyId = 'dataPolicyId456934643'; + $expectedResponse = new DataPolicy(); + $expectedResponse->setPolicyTag($policyTag); + $expectedResponse->setName($name2); + $expectedResponse->setDataPolicyId($dataPolicyId); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $newDataPolicyId = 'newDataPolicyId-1742039694'; + $response = $gapicClient->renameDataPolicy($name, $newDataPolicyId); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datapolicies.v1.DataPolicyService/RenameDataPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getNewDataPolicyId(); + $this->assertProtobufEquals($newDataPolicyId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameDataPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $newDataPolicyId = 'newDataPolicyId-1742039694'; + try { + $gapicClient->renameDataPolicy($name, $newDataPolicyId); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datapolicies.v1.DataPolicyService/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datapolicies.v1.DataPolicyService/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $policyTag = 'policyTag1593879309'; + $name = 'name3373707'; + $dataPolicyId = 'dataPolicyId456934643'; + $expectedResponse = new DataPolicy(); + $expectedResponse->setPolicyTag($policyTag); + $expectedResponse->setName($name); + $expectedResponse->setDataPolicyId($dataPolicyId); + $transport->addResponse($expectedResponse); + // Mock request + $dataPolicy = new DataPolicy(); + $response = $gapicClient->updateDataPolicy($dataPolicy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.datapolicies.v1.DataPolicyService/UpdateDataPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getDataPolicy(); + $this->assertProtobufEquals($dataPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $dataPolicy = new DataPolicy(); + try { + $gapicClient->updateDataPolicy($dataPolicy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} From e31557d9de7a346aec24d5ac786fb8df7f69f9d1 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Mon, 12 Dec 2022 17:25:09 -0800 Subject: [PATCH 9/9] chore(docs): update all repo URLs, remove legacy docs workflows (#5672) --- .github/workflows/docs.yml | 47 ------------- .github/workflows/tests.yaml | 18 ----- AccessApproval/.repo-metadata.json | 2 +- AccessApproval/README.md | 2 +- AccessContextManager/.repo-metadata.json | 2 +- AccessContextManager/README.md | 2 +- AiPlatform/.repo-metadata.json | 2 +- AiPlatform/README.md | 2 +- AnalyticsAdmin/.repo-metadata.json | 2 +- AnalyticsAdmin/README.md | 2 +- AnalyticsData/.repo-metadata.json | 2 +- AnalyticsData/README.md | 2 +- ApiGateway/.repo-metadata.json | 2 +- ApiGateway/README.md | 2 +- ApiKeys/.repo-metadata.json | 2 +- ApiKeys/README.md | 2 +- ApigeeConnect/.repo-metadata.json | 2 +- ApigeeConnect/README.md | 2 +- ApigeeRegistry/.repo-metadata.json | 2 +- ApigeeRegistry/README.md | 2 +- AppEngineAdmin/.repo-metadata.json | 2 +- AppEngineAdmin/README.md | 2 +- ArtifactRegistry/.repo-metadata.json | 2 +- ArtifactRegistry/README.md | 2 +- Asset/.repo-metadata.json | 2 +- Asset/README.md | 2 +- AssuredWorkloads/.repo-metadata.json | 2 +- AssuredWorkloads/README.md | 2 +- AutoMl/.repo-metadata.json | 2 +- AutoMl/README.md | 2 +- BareMetalSolution/.repo-metadata.json | 2 +- BareMetalSolution/README.md | 2 +- Batch/.repo-metadata.json | 2 +- Batch/README.md | 2 +- BeyondCorpAppConnections/.repo-metadata.json | 2 +- BeyondCorpAppConnections/README.md | 2 +- BeyondCorpAppConnectors/.repo-metadata.json | 2 +- BeyondCorpAppConnectors/README.md | 2 +- BeyondCorpAppGateways/.repo-metadata.json | 2 +- BeyondCorpAppGateways/README.md | 2 +- .../.repo-metadata.json | 2 +- BeyondCorpClientConnectorServices/README.md | 2 +- BeyondCorpClientGateways/.repo-metadata.json | 2 +- BeyondCorpClientGateways/README.md | 2 +- BigQuery/.repo-metadata.json | 2 +- BigQuery/README.md | 2 +- BigQueryAnalyticsHub/.repo-metadata.json | 2 +- BigQueryAnalyticsHub/README.md | 2 +- BigQueryConnection/.repo-metadata.json | 2 +- BigQueryConnection/README.md | 2 +- BigQueryDataExchange/.repo-metadata.json | 2 +- BigQueryDataExchange/README.md | 2 +- BigQueryDataPolicies/.repo-metadata.json | 2 +- BigQueryDataPolicies/README.md | 2 +- BigQueryDataTransfer/.repo-metadata.json | 2 +- BigQueryDataTransfer/README.md | 2 +- BigQueryMigration/.repo-metadata.json | 2 +- BigQueryMigration/README.md | 2 +- BigQueryReservation/.repo-metadata.json | 2 +- BigQueryReservation/README.md | 2 +- BigQueryStorage/.repo-metadata.json | 2 +- BigQueryStorage/README.md | 2 +- Bigtable/.repo-metadata.json | 2 +- Bigtable/README.md | 2 +- Billing/.repo-metadata.json | 2 +- Billing/README.md | 2 +- BillingBudgets/.repo-metadata.json | 2 +- BillingBudgets/README.md | 2 +- BinaryAuthorization/.repo-metadata.json | 2 +- BinaryAuthorization/README.md | 2 +- Build/.repo-metadata.json | 2 +- Build/README.md | 2 +- CertificateManager/.repo-metadata.json | 2 +- CertificateManager/README.md | 2 +- Channel/.repo-metadata.json | 2 +- Channel/README.md | 2 +- CommonProtos/.repo-metadata.json | 2 +- Compute/.repo-metadata.json | 2 +- Compute/README.md | 2 +- ContactCenterInsights/.repo-metadata.json | 2 +- ContactCenterInsights/README.md | 2 +- Container/.repo-metadata.json | 2 +- Container/README.md | 2 +- ContainerAnalysis/.repo-metadata.json | 2 +- ContainerAnalysis/README.md | 2 +- Core/.repo-metadata.json | 2 +- Core/README.md | 2 +- DataCatalog/.repo-metadata.json | 2 +- DataCatalog/README.md | 2 +- DataFusion/.repo-metadata.json | 2 +- DataFusion/README.md | 2 +- DataLabeling/.repo-metadata.json | 2 +- DataLabeling/README.md | 2 +- Dataflow/.repo-metadata.json | 2 +- Dataflow/README.md | 2 +- Dataform/.repo-metadata.json | 2 +- Dataform/README.md | 2 +- Dataplex/.repo-metadata.json | 2 +- Dataplex/README.md | 2 +- Dataproc/.repo-metadata.json | 2 +- Dataproc/README.md | 2 +- DataprocMetastore/.repo-metadata.json | 2 +- DataprocMetastore/README.md | 2 +- Datastore/.repo-metadata.json | 2 +- Datastore/README.md | 2 +- DatastoreAdmin/.repo-metadata.json | 2 +- DatastoreAdmin/README.md | 2 +- Datastream/.repo-metadata.json | 2 +- Datastream/README.md | 2 +- Debugger/.repo-metadata.json | 2 +- Debugger/README.md | 4 +- Deploy/.repo-metadata.json | 2 +- Deploy/README.md | 2 +- Dialogflow/.repo-metadata.json | 2 +- Dialogflow/README.md | 2 +- Dlp/.repo-metadata.json | 2 +- Dlp/README.md | 2 +- Dms/.repo-metadata.json | 2 +- Dms/README.md | 2 +- DocumentAi/.repo-metadata.json | 2 +- DocumentAi/README.md | 2 +- Domains/.repo-metadata.json | 2 +- Domains/README.md | 2 +- ErrorReporting/.repo-metadata.json | 2 +- ErrorReporting/README.md | 2 +- EssentialContacts/.repo-metadata.json | 2 +- EssentialContacts/README.md | 2 +- Eventarc/.repo-metadata.json | 2 +- Eventarc/README.md | 2 +- EventarcPublishing/.repo-metadata.json | 2 +- EventarcPublishing/README.md | 2 +- Filestore/.repo-metadata.json | 2 +- Filestore/README.md | 2 +- Firestore/.repo-metadata.json | 2 +- Firestore/README.md | 2 +- Functions/.repo-metadata.json | 2 +- Functions/README.md | 2 +- GSuiteAddOns/.repo-metadata.json | 2 +- GSuiteAddOns/README.md | 2 +- Gaming/.repo-metadata.json | 2 +- Gaming/README.md | 2 +- GkeBackup/.repo-metadata.json | 2 +- GkeBackup/README.md | 2 +- GkeConnectGateway/.repo-metadata.json | 2 +- GkeConnectGateway/README.md | 2 +- GkeHub/.repo-metadata.json | 2 +- GkeHub/README.md | 2 +- GkeMultiCloud/.repo-metadata.json | 2 +- GkeMultiCloud/README.md | 2 +- Grafeas/.repo-metadata.json | 2 +- Grafeas/README.md | 2 +- Iam/.repo-metadata.json | 2 +- Iam/README.md | 2 +- IamCredentials/.repo-metadata.json | 2 +- IamCredentials/README.md | 2 +- Iap/.repo-metadata.json | 2 +- Iap/README.md | 2 +- Ids/.repo-metadata.json | 2 +- Ids/README.md | 2 +- Iot/.repo-metadata.json | 2 +- Iot/README.md | 2 +- Kms/.repo-metadata.json | 2 +- Kms/README.md | 2 +- Language/.repo-metadata.json | 2 +- Language/README.md | 2 +- LifeSciences/.repo-metadata.json | 2 +- LifeSciences/README.md | 2 +- Logging/.repo-metadata.json | 2 +- Logging/README.md | 2 +- LongRunning/.repo-metadata.json | 2 +- ManagedIdentities/.repo-metadata.json | 2 +- ManagedIdentities/README.md | 2 +- MediaTranslation/.repo-metadata.json | 2 +- MediaTranslation/README.md | 2 +- Memcache/.repo-metadata.json | 2 +- Memcache/README.md | 2 +- Monitoring/.repo-metadata.json | 2 +- Monitoring/README.md | 2 +- NetworkConnectivity/.repo-metadata.json | 2 +- NetworkConnectivity/README.md | 2 +- NetworkManagement/.repo-metadata.json | 2 +- NetworkManagement/README.md | 2 +- NetworkSecurity/.repo-metadata.json | 2 +- NetworkSecurity/README.md | 2 +- Notebooks/.repo-metadata.json | 2 +- Notebooks/README.md | 2 +- Optimization/.repo-metadata.json | 2 +- Optimization/README.md | 2 +- OrchestrationAirflow/.repo-metadata.json | 2 +- OrchestrationAirflow/README.md | 2 +- OrgPolicy/.repo-metadata.json | 2 +- OrgPolicy/README.md | 2 +- OsConfig/.repo-metadata.json | 2 +- OsConfig/README.md | 2 +- OsLogin/.repo-metadata.json | 2 +- OsLogin/README.md | 2 +- PolicyTroubleshooter/.repo-metadata.json | 2 +- PolicyTroubleshooter/README.md | 2 +- PrivateCatalog/.repo-metadata.json | 2 +- PrivateCatalog/README.md | 2 +- Profiler/.repo-metadata.json | 2 +- Profiler/README.md | 2 +- PubSub/.repo-metadata.json | 2 +- PubSub/README.md | 2 +- README.md | 67 +------------------ RecaptchaEnterprise/.repo-metadata.json | 2 +- RecaptchaEnterprise/README.md | 2 +- RecommendationEngine/.repo-metadata.json | 2 +- RecommendationEngine/README.md | 2 +- Recommender/.repo-metadata.json | 2 +- Recommender/README.md | 2 +- Redis/.repo-metadata.json | 2 +- Redis/README.md | 2 +- ResourceManager/.repo-metadata.json | 2 +- ResourceManager/README.md | 2 +- ResourceSettings/.repo-metadata.json | 2 +- ResourceSettings/README.md | 2 +- Retail/.repo-metadata.json | 2 +- Retail/README.md | 2 +- Run/.repo-metadata.json | 2 +- Run/README.md | 2 +- Scheduler/.repo-metadata.json | 2 +- Scheduler/README.md | 2 +- SecretManager/.repo-metadata.json | 2 +- SecretManager/README.md | 2 +- SecurityCenter/.repo-metadata.json | 2 +- SecurityCenter/README.md | 2 +- SecurityPrivateCa/.repo-metadata.json | 2 +- SecurityPrivateCa/README.md | 2 +- SecurityPublicCA/.repo-metadata.json | 2 +- SecurityPublicCA/README.md | 2 +- ServiceControl/.repo-metadata.json | 2 +- ServiceControl/README.md | 2 +- ServiceDirectory/.repo-metadata.json | 2 +- ServiceDirectory/README.md | 2 +- ServiceManagement/.repo-metadata.json | 2 +- ServiceManagement/README.md | 2 +- ServiceUsage/.repo-metadata.json | 2 +- ServiceUsage/README.md | 2 +- Shell/.repo-metadata.json | 2 +- Shell/README.md | 2 +- Spanner/.repo-metadata.json | 2 +- Spanner/README.md | 2 +- Speech/.repo-metadata.json | 2 +- Speech/README.md | 2 +- SqlAdmin/.repo-metadata.json | 2 +- SqlAdmin/README.md | 2 +- Storage/.repo-metadata.json | 2 +- Storage/README.md | 2 +- StorageTransfer/.repo-metadata.json | 2 +- StorageTransfer/README.md | 2 +- Talent/.repo-metadata.json | 2 +- Talent/README.md | 2 +- Tasks/.repo-metadata.json | 2 +- Tasks/README.md | 2 +- TextToSpeech/.repo-metadata.json | 2 +- TextToSpeech/README.md | 2 +- Tpu/.repo-metadata.json | 2 +- Tpu/README.md | 2 +- Trace/.repo-metadata.json | 2 +- Trace/README.md | 4 +- Translate/.repo-metadata.json | 2 +- Translate/README.md | 2 +- VideoIntelligence/.repo-metadata.json | 2 +- VideoIntelligence/README.md | 4 +- VideoLiveStream/.repo-metadata.json | 2 +- VideoLiveStream/README.md | 2 +- VideoStitcher/.repo-metadata.json | 2 +- VideoStitcher/README.md | 2 +- VideoTranscoder/.repo-metadata.json | 2 +- VideoTranscoder/README.md | 2 +- Vision/.repo-metadata.json | 2 +- Vision/README.md | 2 +- VmMigration/.repo-metadata.json | 2 +- VmMigration/README.md | 2 +- VpcAccess/.repo-metadata.json | 2 +- VpcAccess/README.md | 2 +- WebRisk/.repo-metadata.json | 2 +- WebRisk/README.md | 2 +- WebSecurityScanner/.repo-metadata.json | 2 +- WebSecurityScanner/README.md | 2 +- Workflows/.repo-metadata.json | 2 +- Workflows/README.md | 2 +- .../templates/template-README.md.txt | 2 +- dev/tests/fixtures/docfx/index.md | 2 +- dev/tests/fixtures/split/get-repo.json | 4 +- 286 files changed, 290 insertions(+), 416 deletions(-) delete mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index c18130cd824a..000000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Generate Documentation -on: - push: - branches: - - main - tags: - - "*" - -jobs: - docs: - name: "Generate Project Documentation" - runs-on: ubuntu-latest - steps: - - id: getTag - name: Get Tag - run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - name: Checkout - uses: actions/checkout@v3 - with: - persist-credentials: false - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '7.4' - ini-values: memory_limit=2048M - - name: Install Dependencies - uses: nick-fields/retry@v2 - with: - timeout_minutes: 10 - max_attempts: 3 - command: composer require --dev phpdocumentor/reflection:^4.0 - - name: Build Documentation - run: | - if [ "$tagName" = "main" ]; then - ./dev/google-cloud docs - else - ./dev/google-cloud docs -r - fi - env: - tagName: ${{ steps.getTag.outputs.tag }} - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@releases/v3 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: docs - CLEAN: false diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index afee47dc2a29..24cae28f028a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -111,21 +111,3 @@ jobs: run: vendor/bin/phpunit -c dev/phpunit-docfx.xml.dist - name: Run Docs Generator (Dry Run) run: bash .kokoro/docs/publish.sh - - docs: - runs-on: ubuntu-latest - name: Generate Legacy Documentation (Dry Run) - steps: - - uses: actions/checkout@v3 - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '7.4' - - name: Install Dependencies - uses: nick-invision/retry@v2 - with: - timeout_minutes: 10 - max_attempts: 3 - command: composer --no-interaction --no-ansi --no-progress update - - name: Run Docs Generator - run: php -d 'memory_limit=-1' dev/google-cloud docs diff --git a/AccessApproval/.repo-metadata.json b/AccessApproval/.repo-metadata.json index 42a41c6c4b8d..47513f71faa8 100644 --- a/AccessApproval/.repo-metadata.json +++ b/AccessApproval/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-access-approval", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-access-approval/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-access-approval/latest", "library_type": "GAPIC_AUTO" } diff --git a/AccessApproval/README.md b/AccessApproval/README.md index dbca0e622478..50ccfd1a22d2 100644 --- a/AccessApproval/README.md +++ b/AccessApproval/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-access-approval/v/stable)](https://packagist.org/packages/google/cloud-access-approval) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-access-approval.svg)](https://packagist.org/packages/google/cloud-access-approval) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-access-approval/latest/accessapproval/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-access-approval/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/AccessContextManager/.repo-metadata.json b/AccessContextManager/.repo-metadata.json index fb5deaad6f28..7ed9c3a7319c 100644 --- a/AccessContextManager/.repo-metadata.json +++ b/AccessContextManager/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/access-context-manager", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/access-context-manager/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/access-context-manager/latest", "library_type": "GAPIC_AUTO" } diff --git a/AccessContextManager/README.md b/AccessContextManager/README.md index f9b094cbcc68..809e93c20470 100644 --- a/AccessContextManager/README.md +++ b/AccessContextManager/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/access-context-manager/v/stable)](https://packagist.org/packages/google/access-context-manager) [![Packagist](https://img.shields.io/packagist/dm/google/access-context-manager.svg)](https://packagist.org/packages/google/access-context-manager) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/access-context-manager/latest/accesscontextmanager/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/access-context-manager/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/AiPlatform/.repo-metadata.json b/AiPlatform/.repo-metadata.json index b2a430b8d071..6e0a43696dbe 100644 --- a/AiPlatform/.repo-metadata.json +++ b/AiPlatform/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-ai-platform", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-ai-platform/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-ai-platform/latest", "library_type": "GAPIC_AUTO" } diff --git a/AiPlatform/README.md b/AiPlatform/README.md index da7040af5fe6..88e503f51aea 100644 --- a/AiPlatform/README.md +++ b/AiPlatform/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-ai-platform/v/stable)](https://packagist.org/packages/google/cloud-ai-platform) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-ai-platform.svg)](https://packagist.org/packages/google/cloud-ai-platform) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-ai-platform/latest/aiplatform/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-ai-platform/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/AnalyticsAdmin/.repo-metadata.json b/AnalyticsAdmin/.repo-metadata.json index 183e0ded0259..cc72d7ffa62e 100644 --- a/AnalyticsAdmin/.repo-metadata.json +++ b/AnalyticsAdmin/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/analytics-admin", "release_level": "beta", - "client_documentation": "https://googleapis.github.io/google-cloud-php/#/docs/analytics-admin/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/analytics-admin/latest", "library_type": "GAPIC_AUTO" } diff --git a/AnalyticsAdmin/README.md b/AnalyticsAdmin/README.md index 029dffaec859..c357e0a1a20a 100644 --- a/AnalyticsAdmin/README.md +++ b/AnalyticsAdmin/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/analytics-admin/v/stable)](https://packagist.org/packages/google/analytics-admin) [![Packagist](https://img.shields.io/packagist/dm/google/analytics-admin.svg)](https://packagist.org/packages/google/analytics-admin) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/analytics-admin/latest/analyticsadmin/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/analytics-admin/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/AnalyticsData/.repo-metadata.json b/AnalyticsData/.repo-metadata.json index 1f47664c928c..c0a5c1d84568 100644 --- a/AnalyticsData/.repo-metadata.json +++ b/AnalyticsData/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/analytics-data", "release_level": "beta", - "client_documentation": "https://googleapis.github.io/google-cloud-php/#/docs/analytics-data/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/analytics-data/latest", "library_type": "GAPIC_AUTO" } diff --git a/AnalyticsData/README.md b/AnalyticsData/README.md index d8593f93f3fc..baf3adc36f03 100644 --- a/AnalyticsData/README.md +++ b/AnalyticsData/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/analytics-data/v/stable)](https://packagist.org/packages/google/analytics-data) [![Packagist](https://img.shields.io/packagist/dm/google/analytics-data.svg)](https://packagist.org/packages/google/analytics-data) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/analytics-data/latest/analyticsdata/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/analytics-data/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ApiGateway/.repo-metadata.json b/ApiGateway/.repo-metadata.json index 5e3c33e6abe3..a021bf9f2153 100644 --- a/ApiGateway/.repo-metadata.json +++ b/ApiGateway/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-api-gateway", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-api-gateway/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-api-gateway/latest", "library_type": "GAPIC_AUTO" } diff --git a/ApiGateway/README.md b/ApiGateway/README.md index 21c6adf3a4e6..0d923329d012 100644 --- a/ApiGateway/README.md +++ b/ApiGateway/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-api-gateway/v/stable)](https://packagist.org/packages/google/cloud-api-gateway) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-api-gateway.svg)](https://packagist.org/packages/google/cloud-api-gateway) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-api-gateway/latest/apigateway/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-api-gateway/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ApiKeys/.repo-metadata.json b/ApiKeys/.repo-metadata.json index a956cf47839a..1d2d250fb5f8 100644 --- a/ApiKeys/.repo-metadata.json +++ b/ApiKeys/.repo-metadata.json @@ -1,7 +1,7 @@ { "distribution_name": "google/cloud-api-keys", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-api-keys/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-api-keys/latest", "library_type": "GAPIC_AUTO", "product_documentation": "https://cloud.google.com/api-keys/docs", "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues" diff --git a/ApiKeys/README.md b/ApiKeys/README.md index a2bd73efc150..e3390338d0ed 100644 --- a/ApiKeys/README.md +++ b/ApiKeys/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-api-keys/v/stable)](https://packagist.org/packages/google/cloud-api-keys) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-api-keys.svg)](https://packagist.org/packages/google/cloud-api-keys) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-api-keys/latest/apikeys/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-api-keys/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ApigeeConnect/.repo-metadata.json b/ApigeeConnect/.repo-metadata.json index c406f59d3128..62d9f83375e0 100644 --- a/ApigeeConnect/.repo-metadata.json +++ b/ApigeeConnect/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-apigee-connect", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-apigee-connect/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-apigee-connect/latest", "library_type": "GAPIC_AUTO" } diff --git a/ApigeeConnect/README.md b/ApigeeConnect/README.md index acd0b5682fcc..20a6c824017b 100644 --- a/ApigeeConnect/README.md +++ b/ApigeeConnect/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-apigee-connect/v/stable)](https://packagist.org/packages/google/cloud-apigee-connect) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-apigee-connect.svg)](https://packagist.org/packages/google/cloud-apigee-connect) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-apigee-connect/latest/apigeeconnect/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-apigee-connect/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ApigeeRegistry/.repo-metadata.json b/ApigeeRegistry/.repo-metadata.json index 9d8656dc8152..f52a78604ac2 100644 --- a/ApigeeRegistry/.repo-metadata.json +++ b/ApigeeRegistry/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-apigee-registry", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-apigee-registry/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-apigee-registry/latest", "library_type": "GAPIC_AUTO" } diff --git a/ApigeeRegistry/README.md b/ApigeeRegistry/README.md index 8c1b589a7f62..2137828f16b4 100644 --- a/ApigeeRegistry/README.md +++ b/ApigeeRegistry/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-apigee-registry/v/stable)](https://packagist.org/packages/google/cloud-apigee-registry) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-apigee-registry.svg)](https://packagist.org/packages/google/cloud-apigee-registry) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-apigee-registry/latest/apigeeregistry/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-apigee-registry/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/AppEngineAdmin/.repo-metadata.json b/AppEngineAdmin/.repo-metadata.json index a7d9acb1139c..b789ce4bd7df 100644 --- a/AppEngineAdmin/.repo-metadata.json +++ b/AppEngineAdmin/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-appengine-admin", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-appengine-admin/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-appengine-admin/latest", "library_type": "GAPIC_AUTO" } diff --git a/AppEngineAdmin/README.md b/AppEngineAdmin/README.md index 10710fe74ef7..b502fe627714 100644 --- a/AppEngineAdmin/README.md +++ b/AppEngineAdmin/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-appengine-admin/v/stable)](https://packagist.org/packages/google/cloud-appengine-admin) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-appengine-admin.svg)](https://packagist.org/packages/google/cloud-appengine-admin) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-appengine-admin/latest/appengineadmin/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-appengine-admin/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ArtifactRegistry/.repo-metadata.json b/ArtifactRegistry/.repo-metadata.json index 31d3c6bea59e..25eb829c6d20 100644 --- a/ArtifactRegistry/.repo-metadata.json +++ b/ArtifactRegistry/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-artifact-registry", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-artifact-registry/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-artifact-registry/latest", "library_type": "GAPIC_AUTO" } diff --git a/ArtifactRegistry/README.md b/ArtifactRegistry/README.md index 9efc102faf0c..3ed8d80e021a 100644 --- a/ArtifactRegistry/README.md +++ b/ArtifactRegistry/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-artifact-registry/v/stable)](https://packagist.org/packages/google/cloud-artifact-registry) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-artifact-registry.svg)](https://packagist.org/packages/google/cloud-artifact-registry) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-artifact-registry/latest/artifactregistry/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-artifact-registry/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Asset/.repo-metadata.json b/Asset/.repo-metadata.json index 3ffceea34e9b..2255f9930ae0 100644 --- a/Asset/.repo-metadata.json +++ b/Asset/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-asset", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-asset/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-asset/latest", "library_type": "GAPIC_AUTO" } diff --git a/Asset/README.md b/Asset/README.md index a73828424a34..6114a5db98c7 100644 --- a/Asset/README.md +++ b/Asset/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-asset/v/stable)](https://packagist.org/packages/google/cloud-asset) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-asset.svg)](https://packagist.org/packages/google/cloud-asset) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-asset/latest/asset/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-asset/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/AssuredWorkloads/.repo-metadata.json b/AssuredWorkloads/.repo-metadata.json index 17e61d9131fe..d0cccb7d2fee 100644 --- a/AssuredWorkloads/.repo-metadata.json +++ b/AssuredWorkloads/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-assured-workloads", "release_level": "beta", - "client_documentation": "https://googleapis.github.io/google-cloud-php/#/docs/cloud-assured-workloads/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-assured-workloads/latest", "library_type": "GAPIC_AUTO" } diff --git a/AssuredWorkloads/README.md b/AssuredWorkloads/README.md index 6d8ed5f649d2..6d6decd1bc3b 100644 --- a/AssuredWorkloads/README.md +++ b/AssuredWorkloads/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-assured-workloads/v/stable)](https://packagist.org/packages/google/cloud-assured-workloads) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-assured-workloads.svg)](https://packagist.org/packages/google/cloud-assured-workloads) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-assured-workloads/latest/assuredworkloads/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-assured-workloads/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/AutoMl/.repo-metadata.json b/AutoMl/.repo-metadata.json index 25f43c061c73..c89a53267244 100644 --- a/AutoMl/.repo-metadata.json +++ b/AutoMl/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-automl", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-automl/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-automl/latest", "library_type": "GAPIC_AUTO" } diff --git a/AutoMl/README.md b/AutoMl/README.md index bd344b30270d..8007639f85b6 100644 --- a/AutoMl/README.md +++ b/AutoMl/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-automl/v/stable)](https://packagist.org/packages/google/cloud-automl) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-automl.svg)](https://packagist.org/packages/google/cloud-automl) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-automl/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-automl/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BareMetalSolution/.repo-metadata.json b/BareMetalSolution/.repo-metadata.json index 4c5671d7911b..b0ab9c86e7bb 100644 --- a/BareMetalSolution/.repo-metadata.json +++ b/BareMetalSolution/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-bare-metal-solution", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-bare-metal-solution/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest", "library_type": "GAPIC_AUTO" } diff --git a/BareMetalSolution/README.md b/BareMetalSolution/README.md index 43a27474a800..ad1a21aca808 100644 --- a/BareMetalSolution/README.md +++ b/BareMetalSolution/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-bare-metal-solution/v/stable)](https://packagist.org/packages/google/cloud-bare-metal-solution) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-bare-metal-solution.svg)](https://packagist.org/packages/google/cloud-bare-metal-solution) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-bare-metal-solution/latest/baremetalsolution/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Batch/.repo-metadata.json b/Batch/.repo-metadata.json index 57cae9302fcb..fc08efb40cf4 100644 --- a/Batch/.repo-metadata.json +++ b/Batch/.repo-metadata.json @@ -1,7 +1,7 @@ { "distribution_name": "google/cloud-batch", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-batch/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-batch/latest", "library_type": "GAPIC_AUTO", "product_documentation": "https://cloud.google.com/batch/docs", "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues" diff --git a/Batch/README.md b/Batch/README.md index e67a8a448080..03d46b199d98 100644 --- a/Batch/README.md +++ b/Batch/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-batch/v/stable)](https://packagist.org/packages/google/cloud-batch) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-batch.svg)](https://packagist.org/packages/google/cloud-batch) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-batch/latest/batch/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-batch/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BeyondCorpAppConnections/.repo-metadata.json b/BeyondCorpAppConnections/.repo-metadata.json index e8fd3b44adab..3f3d268c7b03 100644 --- a/BeyondCorpAppConnections/.repo-metadata.json +++ b/BeyondCorpAppConnections/.repo-metadata.json @@ -1,7 +1,7 @@ { "distribution_name": "google/cloud-beyondcorp-appconnections", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-beyondcorp-appconnections/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-appconnections/latest", "library_type": "GAPIC_AUTO", "product_documentation": "https://cloud.google.com/beyondcorp-enterprise/docs", "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues" diff --git a/BeyondCorpAppConnections/README.md b/BeyondCorpAppConnections/README.md index b0e70d152618..32dccc106177 100644 --- a/BeyondCorpAppConnections/README.md +++ b/BeyondCorpAppConnections/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-beyondcorp-appconnections/v/stable)](https://packagist.org/packages/google/cloud-beyondcorp-appconnections) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-beyondcorp-appconnections.svg)](https://packagist.org/packages/google/cloud-beyondcorp-appconnections) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-beyondcorp-appconnections/latest/beyondcorpappconnections/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-beyondcorp-appconnections/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BeyondCorpAppConnectors/.repo-metadata.json b/BeyondCorpAppConnectors/.repo-metadata.json index 3d7171d6a71e..d9e12d344ee8 100644 --- a/BeyondCorpAppConnectors/.repo-metadata.json +++ b/BeyondCorpAppConnectors/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-beyondcorp-appconnectors", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-beyondcorp-appconnectors/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-appconnectors/latest", "library_type": "GAPIC_AUTO" } diff --git a/BeyondCorpAppConnectors/README.md b/BeyondCorpAppConnectors/README.md index 5aaa10d69a33..7116f362323c 100644 --- a/BeyondCorpAppConnectors/README.md +++ b/BeyondCorpAppConnectors/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-beyondcorp-appconnectors/v/stable)](https://packagist.org/packages/google/cloud-beyondcorp-appconnectors) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-beyondcorp-appconnectors.svg)](https://packagist.org/packages/google/cloud-beyondcorp-appconnectors) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-beyondcorp-appconnectors/latest/beyondcorpappconnectors/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-beyondcorp-appconnectors/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BeyondCorpAppGateways/.repo-metadata.json b/BeyondCorpAppGateways/.repo-metadata.json index 9978635c1077..dd296794aae9 100644 --- a/BeyondCorpAppGateways/.repo-metadata.json +++ b/BeyondCorpAppGateways/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-beyondcorp-appgateways", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-beyondcorp-appgateways/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-appgateways/latest", "library_type": "GAPIC_AUTO" } diff --git a/BeyondCorpAppGateways/README.md b/BeyondCorpAppGateways/README.md index f78029903b14..81c8e3fbe2d1 100644 --- a/BeyondCorpAppGateways/README.md +++ b/BeyondCorpAppGateways/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-beyondcorp-appgateways/v/stable)](https://packagist.org/packages/google/cloud-beyondcorp-appgateways) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-beyondcorp-appgateways.svg)](https://packagist.org/packages/google/cloud-beyondcorp-appgateways) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-beyondcorp-appgateways/latest/beyondcorpappgateways/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-beyondcorp-appgateways/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BeyondCorpClientConnectorServices/.repo-metadata.json b/BeyondCorpClientConnectorServices/.repo-metadata.json index 983c76186fc4..91f45c4473b6 100644 --- a/BeyondCorpClientConnectorServices/.repo-metadata.json +++ b/BeyondCorpClientConnectorServices/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-beyondcorp-clientconnectorservices", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-beyondcorp-clientconnectorservices/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-clientconnectorservices/latest", "library_type": "GAPIC_AUTO" } diff --git a/BeyondCorpClientConnectorServices/README.md b/BeyondCorpClientConnectorServices/README.md index c05bf91112b3..bf7c9d0025a2 100644 --- a/BeyondCorpClientConnectorServices/README.md +++ b/BeyondCorpClientConnectorServices/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-beyondcorp-clientconnectorservices/v/stable)](https://packagist.org/packages/google/cloud-beyondcorp-clientconnectorservices) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-beyondcorp-clientconnectorservices.svg)](https://packagist.org/packages/google/cloud-beyondcorp-clientconnectorservices) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-beyondcorp-clientconnectorservices/latest/beyondcorpclientconnectorservices/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-beyondcorp-clientconnectorservices/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BeyondCorpClientGateways/.repo-metadata.json b/BeyondCorpClientGateways/.repo-metadata.json index d70e4384eab4..af44337dfa13 100644 --- a/BeyondCorpClientGateways/.repo-metadata.json +++ b/BeyondCorpClientGateways/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-beyondcorp-clientgateways", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-beyondcorp-clientgateways/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-clientgateways/latest", "library_type": "GAPIC_AUTO" } diff --git a/BeyondCorpClientGateways/README.md b/BeyondCorpClientGateways/README.md index a3d56bc660c9..60521cab4f85 100644 --- a/BeyondCorpClientGateways/README.md +++ b/BeyondCorpClientGateways/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-beyondcorp-clientgateways/v/stable)](https://packagist.org/packages/google/cloud-beyondcorp-clientgateways) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-beyondcorp-clientgateways.svg)](https://packagist.org/packages/google/cloud-beyondcorp-clientgateways) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-beyondcorp-clientgateways/latest/beyondcorpclientgateways/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-beyondcorp-clientgateways/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BigQuery/.repo-metadata.json b/BigQuery/.repo-metadata.json index ec314735a7df..43f8811a1eca 100644 --- a/BigQuery/.repo-metadata.json +++ b/BigQuery/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-bigquery", "release_level": "ga", - "client_documentation": "https://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery/latest", "library_type": "GAPIC_MANUAL" } diff --git a/BigQuery/README.md b/BigQuery/README.md index c40424217032..f4bf84bc2c6d 100644 --- a/BigQuery/README.md +++ b/BigQuery/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-bigquery/v/stable)](https://packagist.org/packages/google/cloud-bigquery) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-bigquery.svg)](https://packagist.org/packages/google/cloud-bigquery) -* [API Documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery/latest) +* [API Documentation](https://cloud.google.com/php/docs/reference/cloud-bigquery/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BigQueryAnalyticsHub/.repo-metadata.json b/BigQueryAnalyticsHub/.repo-metadata.json index 4c890ca82c23..e8e122b90512 100644 --- a/BigQueryAnalyticsHub/.repo-metadata.json +++ b/BigQueryAnalyticsHub/.repo-metadata.json @@ -1,7 +1,7 @@ { "distribution_name": "google/cloud-bigquery-analyticshub", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-analyticshub/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-analyticshub/latest", "library_type": "GAPIC_AUTO", "product_documentation": "https://cloud.google.com/analytics-hub", "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues" diff --git a/BigQueryAnalyticsHub/README.md b/BigQueryAnalyticsHub/README.md index 457ae1d22498..ec69066e6dd1 100644 --- a/BigQueryAnalyticsHub/README.md +++ b/BigQueryAnalyticsHub/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-bigquery-analyticshub/v/stable)](https://packagist.org/packages/google/cloud-bigquery-analyticshub) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-bigquery-analyticshub.svg)](https://packagist.org/packages/google/cloud-bigquery-analyticshub) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-analyticshub/latest/bigqueryanalyticshub/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-bigquery-analyticshub/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BigQueryConnection/.repo-metadata.json b/BigQueryConnection/.repo-metadata.json index 2a0bcc763975..3ff4abec2aa5 100644 --- a/BigQueryConnection/.repo-metadata.json +++ b/BigQueryConnection/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-bigquery-connection", "release_level": "ga", - "client_documentation": "https://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-connection/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-connection/latest", "library_type": "GAPIC_AUTO" } diff --git a/BigQueryConnection/README.md b/BigQueryConnection/README.md index 4000f3f3f4d8..512d07ae1682 100644 --- a/BigQueryConnection/README.md +++ b/BigQueryConnection/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-bigquery-connection/v/stable)](https://packagist.org/packages/google/cloud-bigquery-connection) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-bigquery-connection.svg)](https://packagist.org/packages/google/cloud-bigquery-connection) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-connection/latest/bigqueryconnection/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-bigquery-connection/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BigQueryDataExchange/.repo-metadata.json b/BigQueryDataExchange/.repo-metadata.json index 74419fa503c3..d4e78cd18691 100644 --- a/BigQueryDataExchange/.repo-metadata.json +++ b/BigQueryDataExchange/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-bigquery-data-exchange", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-data-exchange/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-data-exchange/latest", "library_type": "GAPIC_AUTO" } diff --git a/BigQueryDataExchange/README.md b/BigQueryDataExchange/README.md index 3fd3a7e60104..c67321aeb6aa 100644 --- a/BigQueryDataExchange/README.md +++ b/BigQueryDataExchange/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-bigquery-data-exchange/v/stable)](https://packagist.org/packages/google/cloud-bigquery-data-exchange) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-bigquery-data-exchange.svg)](https://packagist.org/packages/google/cloud-bigquery-data-exchange) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-data-exchange/latest/bigquerydataexchange/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-bigquery-data-exchange/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BigQueryDataPolicies/.repo-metadata.json b/BigQueryDataPolicies/.repo-metadata.json index 387f43301d95..21dc8ef25748 100644 --- a/BigQueryDataPolicies/.repo-metadata.json +++ b/BigQueryDataPolicies/.repo-metadata.json @@ -1,7 +1,7 @@ { "distribution_name": "google/cloud-bigquery-datapolicies", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-datapolicies/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-datapolicies/latest", "library_type": "GAPIC_AUTO", "product_documentation": "https://cloud.google.com/bigquery/docs/reference/bigquerydatapolicy/rest", "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues" diff --git a/BigQueryDataPolicies/README.md b/BigQueryDataPolicies/README.md index 836822fb2d4e..5305c9fe20ad 100644 --- a/BigQueryDataPolicies/README.md +++ b/BigQueryDataPolicies/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-bigquery-datapolicies/v/stable)](https://packagist.org/packages/google/cloud-bigquery-datapolicies) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-bigquery-datapolicies.svg)](https://packagist.org/packages/google/cloud-bigquery-datapolicies) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-datapolicies/latest/bigquerydatapolicies/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-bigquery-datapolicies/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BigQueryDataTransfer/.repo-metadata.json b/BigQueryDataTransfer/.repo-metadata.json index f25421599800..83693b8c1c54 100644 --- a/BigQueryDataTransfer/.repo-metadata.json +++ b/BigQueryDataTransfer/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-bigquerydatatransfer", "release_level": "ga", - "client_documentation": "https://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquerydatatransfer/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquerydatatransfer/latest", "library_type": "GAPIC_AUTO" } diff --git a/BigQueryDataTransfer/README.md b/BigQueryDataTransfer/README.md index 1717faa80674..82ca2cd011e9 100644 --- a/BigQueryDataTransfer/README.md +++ b/BigQueryDataTransfer/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-bigquerydatatransfer/v/stable)](https://packagist.org/packages/google/cloud-bigquerydatatransfer) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-bigquerydatatransfer.svg)](https://packagist.org/packages/google/cloud-bigquerydatatransfer) -* [API Documentation](https://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquerydatatransfer/latest) +* [API Documentation](https://cloud.google.com/php/docs/reference/cloud-bigquerydatatransfer/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BigQueryMigration/.repo-metadata.json b/BigQueryMigration/.repo-metadata.json index e779f323fcd4..b307ec45b953 100644 --- a/BigQueryMigration/.repo-metadata.json +++ b/BigQueryMigration/.repo-metadata.json @@ -1,7 +1,7 @@ { "distribution_name": "google/cloud-bigquery-migration", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-migration/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-migration/latest", "library_type": "GAPIC_AUTO", "product_documentation": "https://cloud.google.com/bigquery/docs/migration-intro/docs", "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues" diff --git a/BigQueryMigration/README.md b/BigQueryMigration/README.md index 4ce6e2c531d4..5e9b1e9ebebb 100644 --- a/BigQueryMigration/README.md +++ b/BigQueryMigration/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-bigquery-migration/v/stable)](https://packagist.org/packages/google/cloud-bigquery-migration) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-bigquery-migration.svg)](https://packagist.org/packages/google/cloud-bigquery-migration) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-migration/latest/bigquerymigration/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-bigquery-migration/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BigQueryReservation/.repo-metadata.json b/BigQueryReservation/.repo-metadata.json index 544ccaddac75..9fffdbd1516c 100644 --- a/BigQueryReservation/.repo-metadata.json +++ b/BigQueryReservation/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-bigquery-reservation", "release_level": "ga", - "client_documentation": "https://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-reservation/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-reservation/latest", "library_type": "GAPIC_AUTO" } diff --git a/BigQueryReservation/README.md b/BigQueryReservation/README.md index f5121953a572..00a523286c58 100644 --- a/BigQueryReservation/README.md +++ b/BigQueryReservation/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-bigquery-reservation/v/stable)](https://packagist.org/packages/google/cloud-bigquery-reservation) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-bigquery-reservation.svg)](https://packagist.org/packages/google/cloud-bigquery-reservation) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-reservation/latest/bigqueryreservation/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-bigquery-reservation/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BigQueryStorage/.repo-metadata.json b/BigQueryStorage/.repo-metadata.json index dadb379482c9..7051603797e6 100644 --- a/BigQueryStorage/.repo-metadata.json +++ b/BigQueryStorage/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-bigquery-storage", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-storage/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-storage/latest", "library_type": "GAPIC_AUTO" } diff --git a/BigQueryStorage/README.md b/BigQueryStorage/README.md index 696c7830f24c..82eb7671583d 100644 --- a/BigQueryStorage/README.md +++ b/BigQueryStorage/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-bigquery-storage/v/stable)](https://packagist.org/packages/google/cloud-bigquery-storage) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-bigquerystorage.svg)](https://packagist.org/packages/google/cloud-bigquerystorage) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-bigquery-storage/latest/bigquerystorage/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-bigquery-storage/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Bigtable/.repo-metadata.json b/Bigtable/.repo-metadata.json index 0a225e8f3976..ff598441cc36 100644 --- a/Bigtable/.repo-metadata.json +++ b/Bigtable/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-bigtable", "release_level": "ga", - "client_documentation": "https://googleapis.github.io/google-cloud-php/#/docs/cloud-bigtable/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigtable/latest", "library_type": "GAPIC_COMBO" } diff --git a/Bigtable/README.md b/Bigtable/README.md index a60763179a6a..88f77c95747c 100644 --- a/Bigtable/README.md +++ b/Bigtable/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-bigtable/v/stable)](https://packagist.org/packages/google/cloud-bigtable) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-bigtable.svg)](https://packagist.org/packages/google/cloud-bigtable) -* [API Documentation](https://googleapis.github.io/google-cloud-php/#/docs/cloud-bigtable/latest) +* [API Documentation](https://cloud.google.com/php/docs/reference/cloud-bigtable/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Billing/.repo-metadata.json b/Billing/.repo-metadata.json index 434ff0ae5338..7a126ae82d91 100644 --- a/Billing/.repo-metadata.json +++ b/Billing/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-billing", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-billing/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-billing/latest", "library_type": "GAPIC_AUTO" } diff --git a/Billing/README.md b/Billing/README.md index 0514001adccb..733abbf2ba18 100644 --- a/Billing/README.md +++ b/Billing/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-billing/v/stable)](https://packagist.org/packages/google/cloud-billing) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-billing.svg)](https://packagist.org/packages/google/cloud-billing) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-billing/latest/billing/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-billing/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BillingBudgets/.repo-metadata.json b/BillingBudgets/.repo-metadata.json index 46135792b161..e4d3157875fe 100644 --- a/BillingBudgets/.repo-metadata.json +++ b/BillingBudgets/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-billing-budgets", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-billing-budgets/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-billing-budgets/latest", "library_type": "GAPIC_AUTO" } diff --git a/BillingBudgets/README.md b/BillingBudgets/README.md index a186f45dcab5..21527bebd949 100644 --- a/BillingBudgets/README.md +++ b/BillingBudgets/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-billing-budgets/v/stable)](https://packagist.org/packages/google/cloud-billing-budgets) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-billing-budgets.svg)](https://packagist.org/packages/google/cloud-billing-budgets) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-billing-budgets/latest/billingbudgets/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-billing-budgets/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/BinaryAuthorization/.repo-metadata.json b/BinaryAuthorization/.repo-metadata.json index b09225abbef0..2180bbe25f6e 100644 --- a/BinaryAuthorization/.repo-metadata.json +++ b/BinaryAuthorization/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-binary-authorization", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-binary-authorization/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-binary-authorization/latest", "library_type": "GAPIC_AUTO" } diff --git a/BinaryAuthorization/README.md b/BinaryAuthorization/README.md index 4199771812b2..d576574d9232 100644 --- a/BinaryAuthorization/README.md +++ b/BinaryAuthorization/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-binary-authorization/v/stable)](https://packagist.org/packages/google/cloud-binary-authorization) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-binary-authorization.svg)](https://packagist.org/packages/google/cloud-binary-authorization) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-binary-authorization/latest/binaryauthorization/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-binary-authorization/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Build/.repo-metadata.json b/Build/.repo-metadata.json index 7bf7e89d341a..6f68de9506b2 100644 --- a/Build/.repo-metadata.json +++ b/Build/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-build", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-build/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-build/latest", "library_type": "GAPIC_AUTO" } diff --git a/Build/README.md b/Build/README.md index 3b31b42bee56..da8df40e0b26 100644 --- a/Build/README.md +++ b/Build/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-build/v/stable)](https://packagist.org/packages/google/cloud-build) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-build.svg)](https://packagist.org/packages/google/cloud-build) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-build/latest/build/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-build/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/CertificateManager/.repo-metadata.json b/CertificateManager/.repo-metadata.json index 830e6e5b6009..9279157b2550 100644 --- a/CertificateManager/.repo-metadata.json +++ b/CertificateManager/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-certificate-manager", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-certificate-manager/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-certificate-manager/latest", "library_type": "GAPIC_AUTO" } diff --git a/CertificateManager/README.md b/CertificateManager/README.md index db31d3f16031..b8e8d0153773 100644 --- a/CertificateManager/README.md +++ b/CertificateManager/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-certificate-manager/v/stable)](https://packagist.org/packages/google/cloud-certificate-manager) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-certificate-manager.svg)](https://packagist.org/packages/google/cloud-certificate-manager) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-certificate-manager/latest/certificatemanager/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-certificate-manager/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Channel/.repo-metadata.json b/Channel/.repo-metadata.json index 08d6492ff411..c6aef372de35 100644 --- a/Channel/.repo-metadata.json +++ b/Channel/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-channel", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-channel/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-channel/latest", "library_type": "GAPIC_AUTO" } diff --git a/Channel/README.md b/Channel/README.md index 10486e07fa27..a49be04f992d 100644 --- a/Channel/README.md +++ b/Channel/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-channel/v/stable)](https://packagist.org/packages/google/cloud-channel) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-channel.svg)](https://packagist.org/packages/google/cloud-channel) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-channel/latest/channel/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-channel/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/CommonProtos/.repo-metadata.json b/CommonProtos/.repo-metadata.json index 1c0cb47ce67e..e709208bfbbf 100644 --- a/CommonProtos/.repo-metadata.json +++ b/CommonProtos/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-common-protos", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-common-protos/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-common-protos/latest", "library_type": "CORE" } diff --git a/Compute/.repo-metadata.json b/Compute/.repo-metadata.json index db4b6effdabf..87b463cf4f6b 100644 --- a/Compute/.repo-metadata.json +++ b/Compute/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-compute", "release_level": "ga", - "client_documentation": "https://googleapis.github.io/google-cloud-php/#/docs/cloud-compute/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-compute/latest", "library_type": "GAPIC_AUTO" } diff --git a/Compute/README.md b/Compute/README.md index 36ccce3c3271..9eb2a28b45e8 100644 --- a/Compute/README.md +++ b/Compute/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-compute/v/stable)](https://packagist.org/packages/google/cloud-compute) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-compute.svg)](https://packagist.org/packages/google/cloud-compute) -* [API Documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-compute/latest) +* [API Documentation](https://cloud.google.com/php/docs/reference/cloud-compute/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ContactCenterInsights/.repo-metadata.json b/ContactCenterInsights/.repo-metadata.json index 71c22fb72e8f..3722b6dbae5e 100644 --- a/ContactCenterInsights/.repo-metadata.json +++ b/ContactCenterInsights/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-contact-center-insights", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-contact-center-insights/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest", "library_type": "GAPIC_AUTO" } diff --git a/ContactCenterInsights/README.md b/ContactCenterInsights/README.md index 9f0aa956486e..ffaa1aca0175 100644 --- a/ContactCenterInsights/README.md +++ b/ContactCenterInsights/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-contact-center-insights/v/stable)](https://packagist.org/packages/google/cloud-contact-center-insights) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-contact-center-insights.svg)](https://packagist.org/packages/google/cloud-contact-center-insights) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-contact-center-insights/latest/contactcenterinsights/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Container/.repo-metadata.json b/Container/.repo-metadata.json index 29717a84b30d..3b85846298e7 100644 --- a/Container/.repo-metadata.json +++ b/Container/.repo-metadata.json @@ -2,6 +2,6 @@ "distribution_name": "google/cloud-container", "release_level": "ga", "codeowner_team": "@googleapis/cicd", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-container/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-container/latest", "library_type": "GAPIC_AUTO" } diff --git a/Container/README.md b/Container/README.md index cccae73dd8c7..c3150383c427 100644 --- a/Container/README.md +++ b/Container/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-container/v/stable)](https://packagist.org/packages/google/cloud-container) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-container.svg)](https://packagist.org/packages/google/cloud-container) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-container/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-container/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ContainerAnalysis/.repo-metadata.json b/ContainerAnalysis/.repo-metadata.json index 51c36878bea1..71567a4d6e29 100644 --- a/ContainerAnalysis/.repo-metadata.json +++ b/ContainerAnalysis/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-container-analysis", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-container-analysis/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-container-analysis/latest", "library_type": "GAPIC_AUTO" } diff --git a/ContainerAnalysis/README.md b/ContainerAnalysis/README.md index 67a9705b2482..611ceaf08323 100644 --- a/ContainerAnalysis/README.md +++ b/ContainerAnalysis/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-container-analysis/v/stable)](https://packagist.org/packages/google/cloud-container-analysis) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-container-analysis.svg)](https://packagist.org/packages/google/cloud-container-analysis) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-container-analysis/latest/containeranalysis/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-container-analysis/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Core/.repo-metadata.json b/Core/.repo-metadata.json index c698e1b5cba7..e89598d8015c 100644 --- a/Core/.repo-metadata.json +++ b/Core/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-core", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-core/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-core/latest", "library_type": "CORE" } diff --git a/Core/README.md b/Core/README.md index 71796f573138..8c5e4b332af9 100644 --- a/Core/README.md +++ b/Core/README.md @@ -2,7 +2,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-core/v/stable)](https://packagist.org/packages/google/cloud-core) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-core.svg)](https://packagist.org/packages/google/cloud-core) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-core/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-core/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/DataCatalog/.repo-metadata.json b/DataCatalog/.repo-metadata.json index 837048338dbb..01e60eb0b678 100644 --- a/DataCatalog/.repo-metadata.json +++ b/DataCatalog/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-data-catalog", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-data-catalog/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-data-catalog/latest", "library_type": "GAPIC_AUTO" } diff --git a/DataCatalog/README.md b/DataCatalog/README.md index 1a9986763b47..80a14bd8d52b 100644 --- a/DataCatalog/README.md +++ b/DataCatalog/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-data-catalog/v/stable)](https://packagist.org/packages/google/cloud-data-catalog) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-data-catalog.svg)](https://packagist.org/packages/google/cloud-data-catalog) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-data-catalog/latest/datacatalog/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-data-catalog/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/DataFusion/.repo-metadata.json b/DataFusion/.repo-metadata.json index 00b0d4090e28..1a70892645e6 100644 --- a/DataFusion/.repo-metadata.json +++ b/DataFusion/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-data-fusion", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-data-fusion/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-data-fusion/latest", "library_type": "GAPIC_AUTO" } diff --git a/DataFusion/README.md b/DataFusion/README.md index d6926eb6a58d..83cca2eee61e 100644 --- a/DataFusion/README.md +++ b/DataFusion/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-data-fusion/v/stable)](https://packagist.org/packages/google/cloud-data-fusion) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-data-fusion.svg)](https://packagist.org/packages/google/cloud-data-fusion) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-data-fusion/latest/datafusion/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-data-fusion/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/DataLabeling/.repo-metadata.json b/DataLabeling/.repo-metadata.json index c3b1a9a5b4ab..5bf24f8906d1 100644 --- a/DataLabeling/.repo-metadata.json +++ b/DataLabeling/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-datalabeling", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-datalabeling/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datalabeling/latest", "library_type": "GAPIC_AUTO" } diff --git a/DataLabeling/README.md b/DataLabeling/README.md index 7db32d314a63..300b4ffbfc25 100644 --- a/DataLabeling/README.md +++ b/DataLabeling/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-datalabeling/v/stable)](https://packagist.org/packages/google/cloud-datalabeling) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-datalabeling.svg)](https://packagist.org/packages/google/cloud-datalabeling) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-datalabeling/latest/datalabeling/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-datalabeling/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Dataflow/.repo-metadata.json b/Dataflow/.repo-metadata.json index 042fbdc2b462..37bb07f47754 100644 --- a/Dataflow/.repo-metadata.json +++ b/Dataflow/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-dataflow", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-dataflow/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataflow/latest", "library_type": "GAPIC_AUTO" } diff --git a/Dataflow/README.md b/Dataflow/README.md index 58d877542932..2005b8f0b9e9 100644 --- a/Dataflow/README.md +++ b/Dataflow/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-dataflow/v/stable)](https://packagist.org/packages/google/cloud-dataflow) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-dataflow.svg)](https://packagist.org/packages/google/cloud-dataflow) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-dataflow/latest/dataflow/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-dataflow/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Dataform/.repo-metadata.json b/Dataform/.repo-metadata.json index c3c0ef3db22b..1791f09b68c9 100644 --- a/Dataform/.repo-metadata.json +++ b/Dataform/.repo-metadata.json @@ -1,7 +1,7 @@ { "distribution_name": "google/cloud-dataform", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-dataform/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataform/latest", "library_type": "GAPIC_AUTO", "product_documentation": "https://cloud.google.com/dataform/docs", "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues" diff --git a/Dataform/README.md b/Dataform/README.md index 5611f3484cc1..f18337c47f2c 100644 --- a/Dataform/README.md +++ b/Dataform/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-dataform/v/stable)](https://packagist.org/packages/google/cloud-dataform) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-dataform.svg)](https://packagist.org/packages/google/cloud-dataform) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-dataform/latest/dataform/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-dataform/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Dataplex/.repo-metadata.json b/Dataplex/.repo-metadata.json index 4869d81e8b02..15daa331bfe9 100644 --- a/Dataplex/.repo-metadata.json +++ b/Dataplex/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-dataplex", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-dataplex/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataplex/latest", "library_type": "GAPIC_AUTO" } diff --git a/Dataplex/README.md b/Dataplex/README.md index 49758d999e89..64d1bc32f6db 100644 --- a/Dataplex/README.md +++ b/Dataplex/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-dataplex/v/stable)](https://packagist.org/packages/google/cloud-dataplex) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-dataplex.svg)](https://packagist.org/packages/google/cloud-dataplex) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-dataplex/latest/dataplex/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-dataplex/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Dataproc/.repo-metadata.json b/Dataproc/.repo-metadata.json index e6b24057ae78..91d150e7118c 100644 --- a/Dataproc/.repo-metadata.json +++ b/Dataproc/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-dataproc", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-dataproc/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataproc/latest", "library_type": "GAPIC_AUTO" } diff --git a/Dataproc/README.md b/Dataproc/README.md index 6ea64a4876e1..3e838672ffa3 100644 --- a/Dataproc/README.md +++ b/Dataproc/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-dataproc/v/stable)](https://packagist.org/packages/google/cloud-dataproc) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-dataproc.svg)](https://packagist.org/packages/google/cloud-dataproc) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-dataproc/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-dataproc/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/DataprocMetastore/.repo-metadata.json b/DataprocMetastore/.repo-metadata.json index 3e9b99d0df4a..be7650db0990 100644 --- a/DataprocMetastore/.repo-metadata.json +++ b/DataprocMetastore/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-dataproc-metastore", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-dataproc-metastore/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataproc-metastore/latest", "library_type": "GAPIC_AUTO" } diff --git a/DataprocMetastore/README.md b/DataprocMetastore/README.md index 1dc73ee0e4e7..543536e49c0d 100644 --- a/DataprocMetastore/README.md +++ b/DataprocMetastore/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-dataproc-metastore/v/stable)](https://packagist.org/packages/google/cloud-dataproc-metastore) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-dataproc-metastore.svg)](https://packagist.org/packages/google/cloud-dataproc-metastore) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-dataproc-metastore/latest/dataprocmetastore/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-dataproc-metastore/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Datastore/.repo-metadata.json b/Datastore/.repo-metadata.json index 7f25ace7c828..947169500cf1 100644 --- a/Datastore/.repo-metadata.json +++ b/Datastore/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-datastore", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-datastore/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datastore/latest", "library_type": "GAPIC_COMBO" } diff --git a/Datastore/README.md b/Datastore/README.md index e67d7f8e0afb..bc979c276d86 100644 --- a/Datastore/README.md +++ b/Datastore/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-datastore/v/stable)](https://packagist.org/packages/google/cloud-datastore) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-datastore.svg)](https://packagist.org/packages/google/cloud-datastore) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-datastore/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-datastore/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/DatastoreAdmin/.repo-metadata.json b/DatastoreAdmin/.repo-metadata.json index 6f5ff10a378a..83f020560183 100644 --- a/DatastoreAdmin/.repo-metadata.json +++ b/DatastoreAdmin/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-datastore-admin", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-datastore-admin/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datastore-admin/latest", "library_type": "GAPIC_AUTO" } diff --git a/DatastoreAdmin/README.md b/DatastoreAdmin/README.md index ffef7ee6e255..f8b6a0514385 100644 --- a/DatastoreAdmin/README.md +++ b/DatastoreAdmin/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-datastore-admin/v/stable)](https://packagist.org/packages/google/cloud-datastore-admin) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-datastore-admin.svg)](https://packagist.org/packages/google/cloud-datastore-admin) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-datastore-admin/latest/datastoreadmin/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-datastore-admin/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Datastream/.repo-metadata.json b/Datastream/.repo-metadata.json index c3bc284a1208..3c0423265069 100644 --- a/Datastream/.repo-metadata.json +++ b/Datastream/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-datastream", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-datastream/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datastream/latest", "library_type": "GAPIC_AUTO" } diff --git a/Datastream/README.md b/Datastream/README.md index a3491bfd9928..e17d53eca056 100644 --- a/Datastream/README.md +++ b/Datastream/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-datastream/v/stable)](https://packagist.org/packages/google/cloud-datastream) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-datastream.svg)](https://packagist.org/packages/google/cloud-datastream) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-datastream/latest/datastream/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-datastream/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Debugger/.repo-metadata.json b/Debugger/.repo-metadata.json index 87a12a337f4a..3feeba96841b 100644 --- a/Debugger/.repo-metadata.json +++ b/Debugger/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-debugger", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-debugger/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-debugger/latest", "library_type": "GAPIC_COMBO" } diff --git a/Debugger/README.md b/Debugger/README.md index 6abbfd0ae812..05b0aba7d8d5 100644 --- a/Debugger/README.md +++ b/Debugger/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-debugger/v/stable)](https://packagist.org/packages/google/cloud-debugger) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-debugger.svg)](https://packagist.org/packages/google/cloud-debugger) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-debugger/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-debugger/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to @@ -143,7 +143,7 @@ any minor or patch releases. We will address issues and requests with the highes [semaphore-extensions]: http://php.net/manual/en/book.sem.php [batch-daemon]: https://github.com/googleapis/google-cloud-php/blob/main/src/Core/Batch/BatchDaemon.php -[debugger-daemon]: http://googleapis.github.io/google-cloud-php/#/docs/cloud-debugger/main/debugger/daemon +[debugger-daemon]: https://cloud.google.com/php/docs/reference/debugger/latest/Daemon [pecl-debugger]: https://pecl.php.net/package/stackdriver_debugger [debugger-console]: https://console.cloud.google.com/debug [using-debug-snapshots]: https://cloud.google.com/debugger/docs/debugging diff --git a/Deploy/.repo-metadata.json b/Deploy/.repo-metadata.json index 1f6da6d66d39..4dfb01aadf19 100644 --- a/Deploy/.repo-metadata.json +++ b/Deploy/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-deploy", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-deploy/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-deploy/latest", "library_type": "GAPIC_AUTO" } diff --git a/Deploy/README.md b/Deploy/README.md index 689c8f1c2ce7..d01122bbc860 100644 --- a/Deploy/README.md +++ b/Deploy/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-deploy/v/stable)](https://packagist.org/packages/google/cloud-deploy) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-deploy.svg)](https://packagist.org/packages/google/cloud-deploy) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-deploy/latest/deploy/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-deploy/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Dialogflow/.repo-metadata.json b/Dialogflow/.repo-metadata.json index 74749f6c7895..16182591b051 100644 --- a/Dialogflow/.repo-metadata.json +++ b/Dialogflow/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-dialogflow", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-dialogflow/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dialogflow/latest", "library_type": "GAPIC_AUTO" } diff --git a/Dialogflow/README.md b/Dialogflow/README.md index b5a79438fbf4..be474d8c8ee2 100644 --- a/Dialogflow/README.md +++ b/Dialogflow/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-dialogflow/v/stable)](https://packagist.org/packages/google/cloud-dialogflow) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-dialogflow.svg)](https://packagist.org/packages/google/cloud-dialogflow) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-dialogflow/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-dialogflow/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Dlp/.repo-metadata.json b/Dlp/.repo-metadata.json index 79a3ef892d68..118e5d539628 100644 --- a/Dlp/.repo-metadata.json +++ b/Dlp/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-dlp", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-dlp/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dlp/latest", "library_type": "GAPIC_AUTO" } diff --git a/Dlp/README.md b/Dlp/README.md index 305df26b760f..a934a019fba9 100644 --- a/Dlp/README.md +++ b/Dlp/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-dlp/v/stable)](https://packagist.org/packages/google/cloud-dlp) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-dlp.svg)](https://packagist.org/packages/google/cloud-dlp) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-dlp/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-dlp/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Dms/.repo-metadata.json b/Dms/.repo-metadata.json index 8b279be89a9e..94a4d41c0e2f 100644 --- a/Dms/.repo-metadata.json +++ b/Dms/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-dms", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-dms/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dms/latest", "library_type": "GAPIC_AUTO" } diff --git a/Dms/README.md b/Dms/README.md index 739e2bc96b80..3bfcea5431a4 100644 --- a/Dms/README.md +++ b/Dms/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-dms/v/stable)](https://packagist.org/packages/google/cloud-dms) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-dms.svg)](https://packagist.org/packages/google/cloud-dms) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-dms/latest/dms/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-dms/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/DocumentAi/.repo-metadata.json b/DocumentAi/.repo-metadata.json index 242e8ab46954..70ac09f96bc4 100644 --- a/DocumentAi/.repo-metadata.json +++ b/DocumentAi/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-document-ai", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-document-ai/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-document-ai/latest", "library_type": "GAPIC_AUTO" } diff --git a/DocumentAi/README.md b/DocumentAi/README.md index 2794555cccd6..3ea798963029 100644 --- a/DocumentAi/README.md +++ b/DocumentAi/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-document-ai/v/stable)](https://packagist.org/packages/google/cloud-document-ai) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-document-ai.svg)](https://packagist.org/packages/google/cloud-document-ai) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-document-ai/latest/documentai/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-document-ai/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Domains/.repo-metadata.json b/Domains/.repo-metadata.json index 1a981ed31f3e..49cb943b8b1a 100644 --- a/Domains/.repo-metadata.json +++ b/Domains/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-domains", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-domains/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-domains/latest", "library_type": "GAPIC_AUTO" } diff --git a/Domains/README.md b/Domains/README.md index bcd0fee65aa7..372962c74bff 100644 --- a/Domains/README.md +++ b/Domains/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-domains/v/stable)](https://packagist.org/packages/google/cloud-domains) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-domains.svg)](https://packagist.org/packages/google/cloud-domains) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-domains/latest/domains/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-domains/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ErrorReporting/.repo-metadata.json b/ErrorReporting/.repo-metadata.json index 14c90d533f57..b56d22d60042 100644 --- a/ErrorReporting/.repo-metadata.json +++ b/ErrorReporting/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-error-reporting", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-error-reporting/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-error-reporting/latest", "library_type": "GAPIC_AUTO" } diff --git a/ErrorReporting/README.md b/ErrorReporting/README.md index 79e902a9f59f..dd23ccf147e4 100644 --- a/ErrorReporting/README.md +++ b/ErrorReporting/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-error-reporting/v/stable)](https://packagist.org/packages/google/cloud-error-reporting) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-error-reporting.svg)](https://packagist.org/packages/google/cloud-error-reporting) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-error-reporting/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-error-reporting/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/EssentialContacts/.repo-metadata.json b/EssentialContacts/.repo-metadata.json index 7a6e54633043..b93187a7b7c4 100644 --- a/EssentialContacts/.repo-metadata.json +++ b/EssentialContacts/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-essential-contacts", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-essential-contacts/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-essential-contacts/latest", "library_type": "GAPIC_AUTO" } diff --git a/EssentialContacts/README.md b/EssentialContacts/README.md index 27ff5e79def7..441fd6211809 100644 --- a/EssentialContacts/README.md +++ b/EssentialContacts/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-essential-contacts/v/stable)](https://packagist.org/packages/google/cloud-essential-contacts) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-essential-contacts.svg)](https://packagist.org/packages/google/cloud-essential-contacts) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-essential-contacts/latest/essentialcontacts/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-essential-contacts/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Eventarc/.repo-metadata.json b/Eventarc/.repo-metadata.json index dac47522914c..9c5ef622d195 100644 --- a/Eventarc/.repo-metadata.json +++ b/Eventarc/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-eventarc", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-eventarc/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-eventarc/latest", "library_type": "GAPIC_AUTO" } diff --git a/Eventarc/README.md b/Eventarc/README.md index 7a1878e15c4c..8aa2891507ce 100644 --- a/Eventarc/README.md +++ b/Eventarc/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-eventarc/v/stable)](https://packagist.org/packages/google/cloud-eventarc) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-eventarc.svg)](https://packagist.org/packages/google/cloud-eventarc) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-eventarc/latest/eventarc/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-eventarc/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/EventarcPublishing/.repo-metadata.json b/EventarcPublishing/.repo-metadata.json index 4680d725b16e..c6267b38f13a 100644 --- a/EventarcPublishing/.repo-metadata.json +++ b/EventarcPublishing/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-eventarc-publishing", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-eventarc-publishing/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-eventarc-publishing/latest", "library_type": "GAPIC_AUTO" } diff --git a/EventarcPublishing/README.md b/EventarcPublishing/README.md index e6683cc4d204..c4cf14dd3cfb 100644 --- a/EventarcPublishing/README.md +++ b/EventarcPublishing/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-eventarc-publishing/v/stable)](https://packagist.org/packages/google/cloud-eventarc-publishing) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-eventarc-publishing.svg)](https://packagist.org/packages/google/cloud-eventarc-publishing) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-eventarc-publishing/latest/eventarcpublishing/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-eventarc-publishing/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Filestore/.repo-metadata.json b/Filestore/.repo-metadata.json index 461e0abdeb6a..7850d6c32396 100644 --- a/Filestore/.repo-metadata.json +++ b/Filestore/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-filestore", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-filestore/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-filestore/latest", "library_type": "GAPIC_AUTO" } diff --git a/Filestore/README.md b/Filestore/README.md index f458daa6016d..312d8a54320a 100644 --- a/Filestore/README.md +++ b/Filestore/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-filestore/v/stable)](https://packagist.org/packages/google/cloud-filestore) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-filestore.svg)](https://packagist.org/packages/google/cloud-filestore) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-filestore/latest/filestore/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-filestore/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Firestore/.repo-metadata.json b/Firestore/.repo-metadata.json index 69b68c786d8f..c2f221fb4c7c 100644 --- a/Firestore/.repo-metadata.json +++ b/Firestore/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-firestore", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-firestore/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-firestore/latest", "library_type": "GAPIC_COMBO" } diff --git a/Firestore/README.md b/Firestore/README.md index b9b17d7ca2b3..3621591b8e21 100644 --- a/Firestore/README.md +++ b/Firestore/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-firestore/v/stable)](https://packagist.org/packages/google/cloud-firestore) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-firestore.svg)](https://packagist.org/packages/google/cloud-firestore) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-firestore/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-firestore/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Functions/.repo-metadata.json b/Functions/.repo-metadata.json index 09b009c54a39..fd5d5588aa81 100644 --- a/Functions/.repo-metadata.json +++ b/Functions/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-functions", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-functions/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-functions/latest", "library_type": "GAPIC_AUTO" } diff --git a/Functions/README.md b/Functions/README.md index 96c740858a04..c89d6173155a 100644 --- a/Functions/README.md +++ b/Functions/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-functions/v/stable)](https://packagist.org/packages/google/cloud-functions) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-functions.svg)](https://packagist.org/packages/google/cloud-functions) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-functions/latest/functions/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-functions/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/GSuiteAddOns/.repo-metadata.json b/GSuiteAddOns/.repo-metadata.json index 2fa6c6e8eb40..26f726b58152 100644 --- a/GSuiteAddOns/.repo-metadata.json +++ b/GSuiteAddOns/.repo-metadata.json @@ -1,7 +1,7 @@ { "distribution_name": "google/cloud-gsuite-addons", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-gsuite-addons/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gsuite-addons/latest", "library_type": "GAPIC_AUTO", "product_documentation": "https://developers.google.com/workspace/add-ons/overview", "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues" diff --git a/GSuiteAddOns/README.md b/GSuiteAddOns/README.md index 4f4ee8762cdc..3c2ec3b98749 100644 --- a/GSuiteAddOns/README.md +++ b/GSuiteAddOns/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-gsuite-addons/v/stable)](https://packagist.org/packages/google/cloud-gsuite-addons) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-gsuite-addons.svg)](https://packagist.org/packages/google/cloud-gsuite-addons) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-gsuite-addons/latest/gsuiteaddons/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-gsuite-addons/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Gaming/.repo-metadata.json b/Gaming/.repo-metadata.json index 8c49334c52c7..b72293aed523 100644 --- a/Gaming/.repo-metadata.json +++ b/Gaming/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-game-servers", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-game-servers/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-game-servers/latest", "library_type": "GAPIC_AUTO" } diff --git a/Gaming/README.md b/Gaming/README.md index 78632d6b1c87..b62da985da20 100644 --- a/Gaming/README.md +++ b/Gaming/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-game-servers/v/stable)](https://packagist.org/packages/google/cloud-game-servers) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-game-servers.svg)](https://packagist.org/packages/google/cloud-game-servers) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-game-servers/latest/gameservers/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-game-servers/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/GkeBackup/.repo-metadata.json b/GkeBackup/.repo-metadata.json index 3735481c8593..82d22cfd845f 100644 --- a/GkeBackup/.repo-metadata.json +++ b/GkeBackup/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-gke-backup", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-gke-backup/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gke-backup/latest", "library_type": "GAPIC_AUTO" } diff --git a/GkeBackup/README.md b/GkeBackup/README.md index 6dd51d445e5f..d273bb9e1214 100644 --- a/GkeBackup/README.md +++ b/GkeBackup/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-gke-backup/v/stable)](https://packagist.org/packages/google/cloud-gke-backup) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-gke-backup.svg)](https://packagist.org/packages/google/cloud-gke-backup) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-gke-backup/latest/gkebackup/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-gke-backup/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/GkeConnectGateway/.repo-metadata.json b/GkeConnectGateway/.repo-metadata.json index b204db394b4a..2b305eeb262e 100644 --- a/GkeConnectGateway/.repo-metadata.json +++ b/GkeConnectGateway/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-gke-connect-gateway", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-gke-connect-gateway/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gke-connect-gateway/latest", "library_type": "GAPIC_AUTO" } diff --git a/GkeConnectGateway/README.md b/GkeConnectGateway/README.md index 715d60433e1a..8139690ae6d1 100644 --- a/GkeConnectGateway/README.md +++ b/GkeConnectGateway/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-gke-connect-gateway/v/stable)](https://packagist.org/packages/google/cloud-gke-connect-gateway) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-gke-connect-gateway.svg)](https://packagist.org/packages/google/cloud-gke-connect-gateway) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-gke-connect-gateway/latest/gkeconnectgateway/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-gke-connect-gateway/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/GkeHub/.repo-metadata.json b/GkeHub/.repo-metadata.json index 915f02bd5a09..89ac5f7ac35f 100644 --- a/GkeHub/.repo-metadata.json +++ b/GkeHub/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-gke-hub", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-gke-hub/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gke-hub/latest", "library_type": "GAPIC_AUTO" } diff --git a/GkeHub/README.md b/GkeHub/README.md index 2c8256e0e087..36462f617011 100644 --- a/GkeHub/README.md +++ b/GkeHub/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-gke-hub/v/stable)](https://packagist.org/packages/google/cloud-gke-hub) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-gke-hub.svg)](https://packagist.org/packages/google/cloud-gke-hub) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-gke-hub/latest/gkehub/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-gke-hub/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/GkeMultiCloud/.repo-metadata.json b/GkeMultiCloud/.repo-metadata.json index 6733daac114f..6f9fdd4e7824 100644 --- a/GkeMultiCloud/.repo-metadata.json +++ b/GkeMultiCloud/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-gke-multi-cloud", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-gke-multi-cloud/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest", "library_type": "GAPIC_AUTO" } diff --git a/GkeMultiCloud/README.md b/GkeMultiCloud/README.md index c68f6650febd..7c0647064a34 100644 --- a/GkeMultiCloud/README.md +++ b/GkeMultiCloud/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-gke-multi-cloud/v/stable)](https://packagist.org/packages/google/cloud-gke-multi-cloud) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-gke-multi-cloud.svg)](https://packagist.org/packages/google/cloud-gke-multi-cloud) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-gke-multi-cloud/latest/gkemulticloud/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Grafeas/.repo-metadata.json b/Grafeas/.repo-metadata.json index 68a65e5ea382..6d4d2d9b6ead 100644 --- a/Grafeas/.repo-metadata.json +++ b/Grafeas/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/grafeas", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/grafeas/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/grafeas/latest", "library_type": "GAPIC_AUTO" } diff --git a/Grafeas/README.md b/Grafeas/README.md index 011d05701e4c..f3fce742a596 100644 --- a/Grafeas/README.md +++ b/Grafeas/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/grafeas/v/stable)](https://packagist.org/packages/google/grafeas) [![Packagist](https://img.shields.io/packagist/dm/google/grafeas.svg)](https://packagist.org/packages/google/grafeas) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/grafeas/latest/grafeas/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/grafeas/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Iam/.repo-metadata.json b/Iam/.repo-metadata.json index 2992a27ed1ed..84cb771009d8 100644 --- a/Iam/.repo-metadata.json +++ b/Iam/.repo-metadata.json @@ -1,7 +1,7 @@ { "distribution_name": "google/cloud-iam", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-iam/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-iam/latest", "library_type": "GAPIC_AUTO", "product_documentation": "https://cloud.google.com/iam/docs", "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues" diff --git a/Iam/README.md b/Iam/README.md index 61b17437ddde..f0c0c474a3d5 100644 --- a/Iam/README.md +++ b/Iam/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-iam/v/stable)](https://packagist.org/packages/google/cloud-iam) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-iam.svg)](https://packagist.org/packages/google/cloud-iam) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-iam/latest/iam/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-iam/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/IamCredentials/.repo-metadata.json b/IamCredentials/.repo-metadata.json index c858ad940cf6..3b1ffc1ac364 100644 --- a/IamCredentials/.repo-metadata.json +++ b/IamCredentials/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-iam-credentials", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-iam-credentials/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-iam-credentials/latest", "library_type": "GAPIC_AUTO" } diff --git a/IamCredentials/README.md b/IamCredentials/README.md index 8b03fbbc8327..495307d8b97d 100644 --- a/IamCredentials/README.md +++ b/IamCredentials/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-iam-credentials/v/stable)](https://packagist.org/packages/google/cloud-iam-credentials) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-iam-credentials.svg)](https://packagist.org/packages/google/cloud-iam-credentials) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-iam-credentials/latest/iamcredentials/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-iam-credentials/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Iap/.repo-metadata.json b/Iap/.repo-metadata.json index 9931f9dce691..2738bca64735 100644 --- a/Iap/.repo-metadata.json +++ b/Iap/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-iap", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-iap/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-iap/latest", "library_type": "GAPIC_AUTO" } diff --git a/Iap/README.md b/Iap/README.md index 3f0a5c176f8b..5c4c48f6cd7c 100644 --- a/Iap/README.md +++ b/Iap/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-iap/v/stable)](https://packagist.org/packages/google/cloud-iap) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-iap.svg)](https://packagist.org/packages/google/cloud-iap) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-iap/latest/iap/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-iap/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Ids/.repo-metadata.json b/Ids/.repo-metadata.json index 02875862a043..b32480ec369b 100644 --- a/Ids/.repo-metadata.json +++ b/Ids/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-ids", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-ids/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-ids/latest", "library_type": "GAPIC_AUTO" } diff --git a/Ids/README.md b/Ids/README.md index 6136b6d42c3d..b4ccacd1073e 100644 --- a/Ids/README.md +++ b/Ids/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-ids/v/stable)](https://packagist.org/packages/google/cloud-ids) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-ids.svg)](https://packagist.org/packages/google/cloud-ids) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-ids/latest/ids/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-ids/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Iot/.repo-metadata.json b/Iot/.repo-metadata.json index ba1de5733dc5..8df6ad14ed6a 100644 --- a/Iot/.repo-metadata.json +++ b/Iot/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-iot", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-iot/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-iot/latest", "library_type": "GAPIC_AUTO" } diff --git a/Iot/README.md b/Iot/README.md index 4b95e658cd0b..371022e67d7d 100644 --- a/Iot/README.md +++ b/Iot/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-iot/v/stable)](https://packagist.org/packages/google/cloud-iot) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-iot.svg)](https://packagist.org/packages/google/cloud-iot) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-iot/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-iot/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Kms/.repo-metadata.json b/Kms/.repo-metadata.json index 802ae3428742..4a5ebba255f4 100644 --- a/Kms/.repo-metadata.json +++ b/Kms/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-kms", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-kms/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-kms/latest", "library_type": "GAPIC_AUTO" } diff --git a/Kms/README.md b/Kms/README.md index bd109cc501da..c8d144b97fb3 100644 --- a/Kms/README.md +++ b/Kms/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-kms/v/stable)](https://packagist.org/packages/google/cloud-kms) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-kms.svg)](https://packagist.org/packages/google/cloud-kms) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-kms/latest/kms/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-kms/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Language/.repo-metadata.json b/Language/.repo-metadata.json index c2a88a29a2a9..ef6626f54125 100644 --- a/Language/.repo-metadata.json +++ b/Language/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-language", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-language/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-language/latest", "library_type": "GAPIC_COMBO" } diff --git a/Language/README.md b/Language/README.md index 38709d15798f..32dd3f03f3a4 100644 --- a/Language/README.md +++ b/Language/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-language/v/stable)](https://packagist.org/packages/google/cloud-language) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-language.svg)](https://packagist.org/packages/google/cloud-language) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-language/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-language/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/LifeSciences/.repo-metadata.json b/LifeSciences/.repo-metadata.json index 4a39be48729e..508a17683ea0 100644 --- a/LifeSciences/.repo-metadata.json +++ b/LifeSciences/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-life-sciences", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-life-sciences/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-life-sciences/latest", "library_type": "GAPIC_AUTO" } diff --git a/LifeSciences/README.md b/LifeSciences/README.md index a0e6635ef127..e2caf3e1d784 100644 --- a/LifeSciences/README.md +++ b/LifeSciences/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-life-sciences/v/stable)](https://packagist.org/packages/google/cloud-life-sciences) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-life-sciences.svg)](https://packagist.org/packages/google/cloud-life-sciences) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-life-sciences/latest/lifesciences/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-life-sciences/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Logging/.repo-metadata.json b/Logging/.repo-metadata.json index ff9c9550b58c..e4d73bbabfd6 100644 --- a/Logging/.repo-metadata.json +++ b/Logging/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-logging", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-logging/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-logging/latest", "library_type": "GAPIC_COMBO" } diff --git a/Logging/README.md b/Logging/README.md index abb41bddbd5e..7ae8c4d6312b 100644 --- a/Logging/README.md +++ b/Logging/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-logging/v/stable)](https://packagist.org/packages/google/cloud-logging) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-logging.svg)](https://packagist.org/packages/google/cloud-logging) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-logging/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-logging/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/LongRunning/.repo-metadata.json b/LongRunning/.repo-metadata.json index 8bd0151037d9..f1223118adaf 100644 --- a/LongRunning/.repo-metadata.json +++ b/LongRunning/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/longrunning", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/longrunning/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/longrunning/latest", "library_type": "GAPIC_AUTO" } diff --git a/ManagedIdentities/.repo-metadata.json b/ManagedIdentities/.repo-metadata.json index 6d17478f7e72..adcc8e39ca8b 100644 --- a/ManagedIdentities/.repo-metadata.json +++ b/ManagedIdentities/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-managed-identities", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-managed-identities/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-managed-identities/latest", "library_type": "GAPIC_AUTO" } diff --git a/ManagedIdentities/README.md b/ManagedIdentities/README.md index 899e02944e2a..9b9a2ebd086a 100644 --- a/ManagedIdentities/README.md +++ b/ManagedIdentities/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-managed-identities/v/stable)](https://packagist.org/packages/google/cloud-managed-identities) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-managed-identities.svg)](https://packagist.org/packages/google/cloud-managed-identities) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-managed-identities/latest/managedidentities/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-managed-identities/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/MediaTranslation/.repo-metadata.json b/MediaTranslation/.repo-metadata.json index 7a433f990223..61aa139db36d 100644 --- a/MediaTranslation/.repo-metadata.json +++ b/MediaTranslation/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-media-translation", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-media-translation/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-media-translation/latest", "library_type": "GAPIC_AUTO" } diff --git a/MediaTranslation/README.md b/MediaTranslation/README.md index d0ef811b2487..3e9398e4782b 100644 --- a/MediaTranslation/README.md +++ b/MediaTranslation/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-media-translation/v/stable)](https://packagist.org/packages/google/cloud-media-translation) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-media-translation.svg)](https://packagist.org/packages/google/cloud-media-translation) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-media-translation/latest/mediatranslation/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-media-translation/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Memcache/.repo-metadata.json b/Memcache/.repo-metadata.json index ec1a795b402c..abcca26b8fb1 100644 --- a/Memcache/.repo-metadata.json +++ b/Memcache/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-memcache", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-memcache/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-memcache/latest", "library_type": "GAPIC_AUTO" } diff --git a/Memcache/README.md b/Memcache/README.md index 7ed2a3eff441..7a6aaab5d0fc 100644 --- a/Memcache/README.md +++ b/Memcache/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-memcache/v/stable)](https://packagist.org/packages/google/cloud-memcache) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-memcache.svg)](https://packagist.org/packages/google/cloud-memcache) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-memcache/latest/memcache/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-memcache/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Monitoring/.repo-metadata.json b/Monitoring/.repo-metadata.json index 6b38876c1577..622eaac0256e 100644 --- a/Monitoring/.repo-metadata.json +++ b/Monitoring/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-monitoring", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-monitoring/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-monitoring/latest", "library_type": "GAPIC_AUTO" } diff --git a/Monitoring/README.md b/Monitoring/README.md index 3d88386a2153..7cea6f73a821 100644 --- a/Monitoring/README.md +++ b/Monitoring/README.md @@ -2,7 +2,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-monitoring/v/stable)](https://packagist.org/packages/google/cloud-monitoring) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-monitoring.svg)](https://packagist.org/packages/google/cloud-monitoring) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-monitoring/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-monitoring/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/NetworkConnectivity/.repo-metadata.json b/NetworkConnectivity/.repo-metadata.json index 84e99332ba17..6d942958dd30 100644 --- a/NetworkConnectivity/.repo-metadata.json +++ b/NetworkConnectivity/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-network-connectivity", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-network-connectivity/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-network-connectivity/latest", "library_type": "GAPIC_AUTO" } diff --git a/NetworkConnectivity/README.md b/NetworkConnectivity/README.md index a45e70a0b993..c398cd1a0418 100644 --- a/NetworkConnectivity/README.md +++ b/NetworkConnectivity/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-network-connectivity/v/stable)](https://packagist.org/packages/google/cloud-network-connectivity) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-network-connectivity.svg)](https://packagist.org/packages/google/cloud-network-connectivity) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-network-connectivity/latest/networkconnectivity/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-network-connectivity/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/NetworkManagement/.repo-metadata.json b/NetworkManagement/.repo-metadata.json index 8ce0b0d9ef75..3ea055901fa8 100644 --- a/NetworkManagement/.repo-metadata.json +++ b/NetworkManagement/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-network-management", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-network-management/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-network-management/latest", "library_type": "GAPIC_AUTO" } diff --git a/NetworkManagement/README.md b/NetworkManagement/README.md index 9992a3ec452c..b13b5d1f8053 100644 --- a/NetworkManagement/README.md +++ b/NetworkManagement/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-network-management/v/stable)](https://packagist.org/packages/google/cloud-network-management) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-network-management.svg)](https://packagist.org/packages/google/cloud-network-management) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-network-management/latest/networkmanagement/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-network-management/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/NetworkSecurity/.repo-metadata.json b/NetworkSecurity/.repo-metadata.json index 68550c49cc09..1f37ec018da7 100644 --- a/NetworkSecurity/.repo-metadata.json +++ b/NetworkSecurity/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-network-security", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-network-security/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-network-security/latest", "library_type": "GAPIC_AUTO" } diff --git a/NetworkSecurity/README.md b/NetworkSecurity/README.md index c46240f28d8d..90b7c6fd6be3 100644 --- a/NetworkSecurity/README.md +++ b/NetworkSecurity/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-network-security/v/stable)](https://packagist.org/packages/google/cloud-network-security) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-network-security.svg)](https://packagist.org/packages/google/cloud-network-security) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-network-security/latest/networksecurity/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-network-security/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Notebooks/.repo-metadata.json b/Notebooks/.repo-metadata.json index e498b5ff2d08..d84344ed7e59 100644 --- a/Notebooks/.repo-metadata.json +++ b/Notebooks/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-notebooks", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-notebooks/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-notebooks/latest", "library_type": "GAPIC_AUTO" } diff --git a/Notebooks/README.md b/Notebooks/README.md index 5799facf59ec..2969f477cdc2 100644 --- a/Notebooks/README.md +++ b/Notebooks/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-notebooks/v/stable)](https://packagist.org/packages/google/cloud-notebooks) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-notebooks.svg)](https://packagist.org/packages/google/cloud-notebooks) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-notebooks/latest/notebooks/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-notebooks/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Optimization/.repo-metadata.json b/Optimization/.repo-metadata.json index a90831a3bbfa..a04d2361cdf9 100644 --- a/Optimization/.repo-metadata.json +++ b/Optimization/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-optimization", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-optimization/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-optimization/latest", "library_type": "GAPIC_AUTO" } diff --git a/Optimization/README.md b/Optimization/README.md index 1aa50839d681..5c98a8cf43f6 100644 --- a/Optimization/README.md +++ b/Optimization/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-optimization/v/stable)](https://packagist.org/packages/google/cloud-optimization) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-optimization.svg)](https://packagist.org/packages/google/cloud-optimization) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-optimization/latest/optimization/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-optimization/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/OrchestrationAirflow/.repo-metadata.json b/OrchestrationAirflow/.repo-metadata.json index fd425d6f1bc6..8b2b28995236 100644 --- a/OrchestrationAirflow/.repo-metadata.json +++ b/OrchestrationAirflow/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-orchestration-airflow", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-orchestration-airflow/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-orchestration-airflow/latest", "library_type": "GAPIC_AUTO" } diff --git a/OrchestrationAirflow/README.md b/OrchestrationAirflow/README.md index 7ecd3017c11b..c24282be34f2 100644 --- a/OrchestrationAirflow/README.md +++ b/OrchestrationAirflow/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-orchestration-airflow/v/stable)](https://packagist.org/packages/google/cloud-orchestration-airflow) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-orchestration-airflow.svg)](https://packagist.org/packages/google/cloud-orchestration-airflow) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-orchestration-airflow/latest/orchestrationairflow/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-orchestration-airflow/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/OrgPolicy/.repo-metadata.json b/OrgPolicy/.repo-metadata.json index cf6222e84fa4..6837ab3bc3b8 100644 --- a/OrgPolicy/.repo-metadata.json +++ b/OrgPolicy/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-org-policy", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-org-policy/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-org-policy/latest", "library_type": "GAPIC_AUTO" } diff --git a/OrgPolicy/README.md b/OrgPolicy/README.md index 1146cd07f51b..0db2221b528f 100644 --- a/OrgPolicy/README.md +++ b/OrgPolicy/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-org-policy/v/stable)](https://packagist.org/packages/google/cloud-org-policy) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-org-policy.svg)](https://packagist.org/packages/google/cloud-org-policy) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-org-policy/latest/orgpolicy/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-org-policy/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/OsConfig/.repo-metadata.json b/OsConfig/.repo-metadata.json index 81ef8606ee25..24257a66e5b7 100644 --- a/OsConfig/.repo-metadata.json +++ b/OsConfig/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-osconfig", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-osconfig/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-osconfig/latest", "library_type": "GAPIC_AUTO" } diff --git a/OsConfig/README.md b/OsConfig/README.md index 22847e1d64e0..79aa643f3345 100644 --- a/OsConfig/README.md +++ b/OsConfig/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-osconfig/v/stable)](https://packagist.org/packages/google/cloud-osconfig) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-osconfig.svg)](https://packagist.org/packages/google/cloud-osconfig) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-osconfig/latest/osconfig/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-osconfig/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/OsLogin/.repo-metadata.json b/OsLogin/.repo-metadata.json index a309089107e0..4db76ee394b0 100644 --- a/OsLogin/.repo-metadata.json +++ b/OsLogin/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-oslogin", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-oslogin/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-oslogin/latest", "library_type": "GAPIC_AUTO" } diff --git a/OsLogin/README.md b/OsLogin/README.md index dcfdfdb2e083..e03f67893ca0 100644 --- a/OsLogin/README.md +++ b/OsLogin/README.md @@ -5,7 +5,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-oslogin/v/stable)](https://packagist.org/packages/google/cloud-oslogin) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-oslogin.svg)](https://packagist.org/packages/google/cloud-oslogin) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-oslogin/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-oslogin/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/PolicyTroubleshooter/.repo-metadata.json b/PolicyTroubleshooter/.repo-metadata.json index 25deb8248c0f..07c3f84ff057 100644 --- a/PolicyTroubleshooter/.repo-metadata.json +++ b/PolicyTroubleshooter/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-policy-troubleshooter", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-policy-troubleshooter/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-policy-troubleshooter/latest", "library_type": "GAPIC_AUTO" } diff --git a/PolicyTroubleshooter/README.md b/PolicyTroubleshooter/README.md index a1b3dfc48ca7..f1854cdcc9f4 100644 --- a/PolicyTroubleshooter/README.md +++ b/PolicyTroubleshooter/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-policy-troubleshooter/v/stable)](https://packagist.org/packages/google/cloud-policy-troubleshooter) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-policy-troubleshooter.svg)](https://packagist.org/packages/google/cloud-policy-troubleshooter) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-policy-troubleshooter/latest/policytroubleshooter/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-policy-troubleshooter/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/PrivateCatalog/.repo-metadata.json b/PrivateCatalog/.repo-metadata.json index 7159c502abdc..c82b2ba9851d 100644 --- a/PrivateCatalog/.repo-metadata.json +++ b/PrivateCatalog/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-private-catalog", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-private-catalog/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-private-catalog/latest", "library_type": "GAPIC_AUTO" } diff --git a/PrivateCatalog/README.md b/PrivateCatalog/README.md index e4619f82a20c..b96d381f6679 100644 --- a/PrivateCatalog/README.md +++ b/PrivateCatalog/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-private-catalog/v/stable)](https://packagist.org/packages/google/cloud-private-catalog) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-private-catalog.svg)](https://packagist.org/packages/google/cloud-private-catalog) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-private-catalog/latest/privatecatalog/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-private-catalog/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Profiler/.repo-metadata.json b/Profiler/.repo-metadata.json index e816823a04de..0c6a07597480 100644 --- a/Profiler/.repo-metadata.json +++ b/Profiler/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-profiler", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-profiler/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-profiler/latest", "library_type": "GAPIC_AUTO" } diff --git a/Profiler/README.md b/Profiler/README.md index 7a53c9b9d161..a63b5a424e06 100644 --- a/Profiler/README.md +++ b/Profiler/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-profiler/v/stable)](https://packagist.org/packages/google/cloud-profiler) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-profiler.svg)](https://packagist.org/packages/google/cloud-profiler) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-profiler/latest/profiler/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-profiler/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/PubSub/.repo-metadata.json b/PubSub/.repo-metadata.json index 133dfb2d8e47..907f0a39d099 100644 --- a/PubSub/.repo-metadata.json +++ b/PubSub/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-pubsub", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-pubsub/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-pubsub/latest", "library_type": "GAPIC_COMBO" } diff --git a/PubSub/README.md b/PubSub/README.md index 251e68a9c7fd..1488666a92e3 100644 --- a/PubSub/README.md +++ b/PubSub/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-pubsub/v/stable)](https://packagist.org/packages/google/cloud-pubsub) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-pubsub.svg)](https://packagist.org/packages/google/cloud-pubsub) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-pubsub/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-pubsub/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/README.md b/README.md index b16ed3b4d070..ebfaa1654418 100644 --- a/README.md +++ b/README.md @@ -9,68 +9,7 @@ PHP 7.4 | [![Kokoro CI](https://storage.googleapis.com/cloud-devrel-public/php/b [![Latest Stable Version](https://poser.pugx.org/google/cloud/v/stable)](https://packagist.org/packages/google/cloud) [![Packagist](https://img.shields.io/packagist/dm/google/cloud.svg)](https://packagist.org/packages/google/cloud) -* [Homepage](http://googleapis.github.io/google-cloud-php) -* [API Documentation](https://googleapis.github.io/google-cloud-php/#/docs/google-cloud/latest/servicebuilder) - -This client supports the following Google Cloud Platform services at a [General Availability](#versioning) quality level: -* [Cloud AutoML](AutoMl) -* [Cloud Firestore](Firestore) -* [Cloud Spanner](Spanner) -* [Google BigQuery](BigQuery) -* [Google Bigtable](Bigtable) -* [Google Cloud Asset](Asset) -* [Google Cloud BigQuery Data Transfer](BigQueryDataTransfer) -* [Google Cloud BigQuery Storage](BigQueryStorage) -* [Google Cloud Billing](Billing) -* [Google Cloud Compute](Compute) -* [Google Cloud Container](Container) -* [Google Cloud Dataproc](Dataproc) -* [Google Cloud Datastore](Datastore) -* [Google Cloud Data Catalog](DataCatalog) -* [Google Cloud IoT](Iot) -* [Google Cloud KMS](Kms) -* [Google Cloud OsLogin](OsLogin) -* [Google Cloud Pub/Sub](PubSub) -* [Google Cloud Recaptcha Enterprise](RecaptchaEnterprise) -* [Google Cloud Redis](Redis) -* [Google Cloud Scheduler](Scheduler) -* [Google Cloud Security Command Center](SecurityCenter) -* [Google Cloud Speech](Speech) -* [Google Cloud Storage](Storage) -* [Google Cloud Tasks](Tasks) -* [Google Cloud Text-to-Speech](TextToSpeech) -* [Google Cloud Translation](Translate) -* [Google Cloud Video Intelligence](VideoIntelligence) -* [Google Cloud Vision](Vision) -* [Google Cloud Web Risk](WebRisk) -* [Google DLP](Dlp) -* [Google Stackdriver Debugger](Debugger) -* [Google Stackdriver Logging](Logging) -* [Google Stackdriver Monitoring](Monitoring) -* [Google Stackdriver Trace](Trace) -* [Recommender](Recommender) -* [Secret Manager](SecretManager) - -This client supports the following Google Cloud Platform services at a [Beta](#versioning) quality level: - -* [Dialogflow API](Dialogflow) -* [Google Analytics Admin](AnalyticsAdmin) -* [Google Analytics Data](AnalyticsData) -* [Google Certificate Authority Service](SecurityPrivateCa) -* [Google Cloud Assured Workloads](AssuredWorkloads) -* [Google Cloud BigQuery Connection](BigQueryConnection) -* [Google Cloud BigQuery Reservation](BigQueryReservation) -* [Google Cloud Channel](Channel) -* [Google Cloud Datastore Admin](DatastoreAdmin) -* [Google Cloud Natural Language](Language) -* [Google Cloud Retail](Retail) -* [Google Cloud Talent Solution](Talent) -* [Google Cloud Web Security Scanner](WebSecurityScanner) -* [Google Cloud Workflows](Workflows) -* [Google Service Directory](ServiceDirectory) -* [Google Stackdriver Error Reporting](ErrorReporting) -* [Memorystore for Memcached](Memcache) -* [Recommendations AI](RecommendationEngine) +View the [list of supported APIs and Services](https://cloud.google.com/php/docs/reference). If you need support for other Google APIs, please check out the [Google APIs Client Library for PHP](https://github.com/google/google-api-php-client). @@ -220,8 +159,8 @@ Contributions to this library are always welcome and highly encouraged. See [CONTRIBUTING](CONTRIBUTING.md) for more information on how to get started. -This repository is not an official support channel. If you have support questions, -file a support request through the normal Google support channels, +This repository is not an official support channel. If you have support questions, +file a support request through the normal Google support channels, or post questions on a forum such as [StackOverflow](http://stackoverflow.com/questions/tagged/google-cloud-platform+php). ## License diff --git a/RecaptchaEnterprise/.repo-metadata.json b/RecaptchaEnterprise/.repo-metadata.json index 1cdc7492ea31..4c47fd135fbf 100644 --- a/RecaptchaEnterprise/.repo-metadata.json +++ b/RecaptchaEnterprise/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-recaptcha-enterprise", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-recaptcha-enterprise/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest", "library_type": "GAPIC_AUTO" } diff --git a/RecaptchaEnterprise/README.md b/RecaptchaEnterprise/README.md index 1a260a214375..9c0963f7c466 100644 --- a/RecaptchaEnterprise/README.md +++ b/RecaptchaEnterprise/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-recaptcha-enterprise/v/stable)](https://packagist.org/packages/google/cloud-recaptcha-enterprise) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-recaptcha-enterprise.svg)](https://packagist.org/packages/google/cloud-recaptcha-enterprise) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-recaptcha-enterprise/latest/recaptchaenterprise/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/RecommendationEngine/.repo-metadata.json b/RecommendationEngine/.repo-metadata.json index e1ed89617fb1..46cd48908ef0 100644 --- a/RecommendationEngine/.repo-metadata.json +++ b/RecommendationEngine/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-recommendations-ai", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-recommendations-ai/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-recommendations-ai/latest", "library_type": "GAPIC_AUTO" } diff --git a/RecommendationEngine/README.md b/RecommendationEngine/README.md index 97ed5ff9b659..c8114e1c605c 100644 --- a/RecommendationEngine/README.md +++ b/RecommendationEngine/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-recommendations-ai/v/stable)](https://packagist.org/packages/google/cloud-recommendations-ai) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-recommendations-ai.svg)](https://packagist.org/packages/google/cloud-recommendations-ai) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-recommendations-ai/latest/recommendationengine/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-recommendations-ai/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Recommender/.repo-metadata.json b/Recommender/.repo-metadata.json index dfab096a8327..24a8c470bab6 100644 --- a/Recommender/.repo-metadata.json +++ b/Recommender/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-recommender", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-recommender/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-recommender/latest", "library_type": "GAPIC_AUTO" } diff --git a/Recommender/README.md b/Recommender/README.md index 53a411ddf29e..53266b6d365d 100644 --- a/Recommender/README.md +++ b/Recommender/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-recommender/v/stable)](https://packagist.org/packages/google/cloud-recommender) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-recommender.svg)](https://packagist.org/packages/google/cloud-recommender) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-recommender/latest/recommender/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-recommender/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Redis/.repo-metadata.json b/Redis/.repo-metadata.json index b5a98ff4d732..844f38f492a7 100644 --- a/Redis/.repo-metadata.json +++ b/Redis/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-redis", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-redis/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-redis/latest", "library_type": "GAPIC_AUTO" } diff --git a/Redis/README.md b/Redis/README.md index 8ea2fc088405..f44e2c8413b0 100644 --- a/Redis/README.md +++ b/Redis/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-redis/v/stable)](https://packagist.org/packages/google/cloud-redis) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-redis.svg)](https://packagist.org/packages/google/cloud-redis) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-redis/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-redis/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ResourceManager/.repo-metadata.json b/ResourceManager/.repo-metadata.json index 88100530bb19..f1dbe7840fd7 100644 --- a/ResourceManager/.repo-metadata.json +++ b/ResourceManager/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-resource-manager", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-resource-manager/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-resource-manager/latest", "library_type": "GAPIC_AUTO" } diff --git a/ResourceManager/README.md b/ResourceManager/README.md index b6c24d5973a3..8edc84816e26 100644 --- a/ResourceManager/README.md +++ b/ResourceManager/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-resource-manager/v/stable)](https://packagist.org/packages/google/cloud-resource-manager) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-resource-manager.svg)](https://packagist.org/packages/google/cloud-resource-manager) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-resource-manager/latest/resourcemanager/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-resource-manager/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ResourceSettings/.repo-metadata.json b/ResourceSettings/.repo-metadata.json index abdef3ac8ed7..bcf651316f70 100644 --- a/ResourceSettings/.repo-metadata.json +++ b/ResourceSettings/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-resource-settings", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-resource-settings/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-resource-settings/latest", "library_type": "GAPIC_AUTO" } diff --git a/ResourceSettings/README.md b/ResourceSettings/README.md index 2cf4d537ace1..b4119bcb2648 100644 --- a/ResourceSettings/README.md +++ b/ResourceSettings/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-resource-settings/v/stable)](https://packagist.org/packages/google/cloud-resource-settings) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-resource-settings.svg)](https://packagist.org/packages/google/cloud-resource-settings) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-resource-settings/latest/resourcesettings/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-resource-settings/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Retail/.repo-metadata.json b/Retail/.repo-metadata.json index 5c6a19813e74..bf2da97241b5 100644 --- a/Retail/.repo-metadata.json +++ b/Retail/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-retail", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-retail/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-retail/latest", "library_type": "GAPIC_AUTO" } diff --git a/Retail/README.md b/Retail/README.md index 79bfdbe2bcb6..1f29980f34a2 100644 --- a/Retail/README.md +++ b/Retail/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-retail/v/stable)](https://packagist.org/packages/google/cloud-retail) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-retail.svg)](https://packagist.org/packages/google/cloud-retail) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-retail/latest/retail/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-retail/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Run/.repo-metadata.json b/Run/.repo-metadata.json index 603c8d307a1e..c83e73cc0089 100644 --- a/Run/.repo-metadata.json +++ b/Run/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-run", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-run/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-run/latest", "library_type": "GAPIC_AUTO" } diff --git a/Run/README.md b/Run/README.md index 9f4f1cb6dc76..ba959c95256d 100644 --- a/Run/README.md +++ b/Run/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-run/v/stable)](https://packagist.org/packages/google/cloud-run) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-run.svg)](https://packagist.org/packages/google/cloud-run) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-run/latest/run/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-run/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Scheduler/.repo-metadata.json b/Scheduler/.repo-metadata.json index 0c2024bcbcaa..9087ccdb5302 100644 --- a/Scheduler/.repo-metadata.json +++ b/Scheduler/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-scheduler", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-scheduler/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-scheduler/latest", "library_type": "GAPIC_AUTO" } diff --git a/Scheduler/README.md b/Scheduler/README.md index 04e71dfdd8d7..bc05537013c6 100644 --- a/Scheduler/README.md +++ b/Scheduler/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-scheduler/v/stable)](https://packagist.org/packages/google/cloud-scheduler) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-scheduler.svg)](https://packagist.org/packages/google/cloud-scheduler) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-scheduler/latest/scheduler/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-scheduler/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/SecretManager/.repo-metadata.json b/SecretManager/.repo-metadata.json index 231fe4649f84..84f5bd0d3f88 100644 --- a/SecretManager/.repo-metadata.json +++ b/SecretManager/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-secret-manager", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-secret-manager/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-secret-manager/latest", "library_type": "GAPIC_AUTO" } diff --git a/SecretManager/README.md b/SecretManager/README.md index c116f74e3b68..2e40ffe19fc6 100644 --- a/SecretManager/README.md +++ b/SecretManager/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-secret-manager/v/stable)](https://packagist.org/packages/google/cloud-secret-manager) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-secret-manager.svg)](https://packagist.org/packages/google/cloud-secret-manager) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-secret-manager/latest/secretmanager/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-secret-manager/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/SecurityCenter/.repo-metadata.json b/SecurityCenter/.repo-metadata.json index 1f635c1198e6..5d361e263219 100644 --- a/SecurityCenter/.repo-metadata.json +++ b/SecurityCenter/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-security-center", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-security-center/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-security-center/latest", "library_type": "GAPIC_AUTO" } diff --git a/SecurityCenter/README.md b/SecurityCenter/README.md index da69b13c3fe0..687a2e680dd9 100644 --- a/SecurityCenter/README.md +++ b/SecurityCenter/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-security-center/v/stable)](https://packagist.org/packages/google/cloud-security-center) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-security-center.svg)](https://packagist.org/packages/google/cloud-security-center) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-security-center/latest/securitycenter/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-security-center/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/SecurityPrivateCa/.repo-metadata.json b/SecurityPrivateCa/.repo-metadata.json index df2d3453291b..d2f732512011 100644 --- a/SecurityPrivateCa/.repo-metadata.json +++ b/SecurityPrivateCa/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-security-private-ca", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-security-private-ca/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-security-private-ca/latest", "library_type": "GAPIC_AUTO" } diff --git a/SecurityPrivateCa/README.md b/SecurityPrivateCa/README.md index 048a863b8663..b41069473591 100644 --- a/SecurityPrivateCa/README.md +++ b/SecurityPrivateCa/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-security-private-ca/v/stable)](https://packagist.org/packages/google/cloud-security-private-ca) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-security-private-ca.svg)](https://packagist.org/packages/google/cloud-security-private-ca) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-security-private-ca/latest/securityprivateca/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-security-private-ca/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/SecurityPublicCA/.repo-metadata.json b/SecurityPublicCA/.repo-metadata.json index dd73c96b0582..64def410140d 100644 --- a/SecurityPublicCA/.repo-metadata.json +++ b/SecurityPublicCA/.repo-metadata.json @@ -1,7 +1,7 @@ { "distribution_name": "google/cloud-security-public-ca", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-security-public-ca/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-security-public-ca/latest", "library_type": "GAPIC_AUTO", "product_documentation": "https://cloud.google.com/certificate-manager/docs/public-ca", "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues" diff --git a/SecurityPublicCA/README.md b/SecurityPublicCA/README.md index 27ec618b28db..9801ecb10194 100644 --- a/SecurityPublicCA/README.md +++ b/SecurityPublicCA/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-security-public-ca/v/stable)](https://packagist.org/packages/google/cloud-security-public-ca) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-security-public-ca.svg)](https://packagist.org/packages/google/cloud-security-public-ca) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-security-public-ca/latest/securitypublicca/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-security-public-ca/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ServiceControl/.repo-metadata.json b/ServiceControl/.repo-metadata.json index 18e711b5862d..b68827c3302a 100644 --- a/ServiceControl/.repo-metadata.json +++ b/ServiceControl/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-service-control", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-service-control/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-service-control/latest", "library_type": "GAPIC_AUTO" } diff --git a/ServiceControl/README.md b/ServiceControl/README.md index 25f127ffdac1..863bdc4097ce 100644 --- a/ServiceControl/README.md +++ b/ServiceControl/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-service-control/v/stable)](https://packagist.org/packages/google/cloud-service-control) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-service-control.svg)](https://packagist.org/packages/google/cloud-service-control) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-service-control/latest/servicecontrol/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-service-control/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ServiceDirectory/.repo-metadata.json b/ServiceDirectory/.repo-metadata.json index b1ae36ca8ba7..908a1cc27b96 100644 --- a/ServiceDirectory/.repo-metadata.json +++ b/ServiceDirectory/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-service-directory", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-service-directory/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-service-directory/latest", "library_type": "GAPIC_AUTO" } diff --git a/ServiceDirectory/README.md b/ServiceDirectory/README.md index 41e4ca283955..74d544a940ff 100644 --- a/ServiceDirectory/README.md +++ b/ServiceDirectory/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-service-directory/v/stable)](https://packagist.org/packages/google/cloud-service-directory) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-service-directory.svg)](https://packagist.org/packages/google/cloud-service-directory) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-service-directory/latest/servicedirectory/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-service-directory/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ServiceManagement/.repo-metadata.json b/ServiceManagement/.repo-metadata.json index f9e91cc78971..9ea6592af545 100644 --- a/ServiceManagement/.repo-metadata.json +++ b/ServiceManagement/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-service-management", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-service-management/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-service-management/latest", "library_type": "GAPIC_AUTO" } diff --git a/ServiceManagement/README.md b/ServiceManagement/README.md index 9f5bc548e37b..6423fab444fa 100644 --- a/ServiceManagement/README.md +++ b/ServiceManagement/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-service-management/v/stable)](https://packagist.org/packages/google/cloud-service-management) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-service-management.svg)](https://packagist.org/packages/google/cloud-service-management) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-service-management/latest/servicemanagement/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-service-management/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/ServiceUsage/.repo-metadata.json b/ServiceUsage/.repo-metadata.json index 550bbada6e28..81458e74dbaf 100644 --- a/ServiceUsage/.repo-metadata.json +++ b/ServiceUsage/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-service-usage", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-service-usage/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-service-usage/latest", "library_type": "GAPIC_AUTO" } diff --git a/ServiceUsage/README.md b/ServiceUsage/README.md index d3cd69454ae0..3efd66dae843 100644 --- a/ServiceUsage/README.md +++ b/ServiceUsage/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-service-usage/v/stable)](https://packagist.org/packages/google/cloud-service-usage) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-service-usage.svg)](https://packagist.org/packages/google/cloud-service-usage) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-service-usage/latest/serviceusage/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-service-usage/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Shell/.repo-metadata.json b/Shell/.repo-metadata.json index b9d1b214715a..6cb6219dff54 100644 --- a/Shell/.repo-metadata.json +++ b/Shell/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-shell", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-shell/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-shell/latest", "library_type": "GAPIC_AUTO" } diff --git a/Shell/README.md b/Shell/README.md index 4aae680a4fe4..55a7b2289994 100644 --- a/Shell/README.md +++ b/Shell/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-shell/v/stable)](https://packagist.org/packages/google/cloud-shell) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-shell.svg)](https://packagist.org/packages/google/cloud-shell) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-shell/latest/shell/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-shell/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Spanner/.repo-metadata.json b/Spanner/.repo-metadata.json index e64a04f363f2..41d2b1ea61cd 100644 --- a/Spanner/.repo-metadata.json +++ b/Spanner/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-spanner", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-spanner/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-spanner/latest", "library_type": "GAPIC_COMBO" } diff --git a/Spanner/README.md b/Spanner/README.md index 13b306c0aa52..fb4ba03a84c0 100644 --- a/Spanner/README.md +++ b/Spanner/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-spanner/v/stable)](https://packagist.org/packages/google/cloud-spanner) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-spanner.svg)](https://packagist.org/packages/google/cloud-spanner) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-spanner/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-spanner/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Speech/.repo-metadata.json b/Speech/.repo-metadata.json index 4c94474c9fc4..5101aa95b96e 100644 --- a/Speech/.repo-metadata.json +++ b/Speech/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-speech", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-speech/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-speech/latest", "library_type": "GAPIC_COMBO" } diff --git a/Speech/README.md b/Speech/README.md index 1c6968e0acea..2462c25bcc3e 100644 --- a/Speech/README.md +++ b/Speech/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-speech/v/stable)](https://packagist.org/packages/google/cloud-speech) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-speech.svg)](https://packagist.org/packages/google/cloud-speech) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-speech/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-speech/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/SqlAdmin/.repo-metadata.json b/SqlAdmin/.repo-metadata.json index 747b1e166cfd..40b9baa10f87 100644 --- a/SqlAdmin/.repo-metadata.json +++ b/SqlAdmin/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-sql-admin", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-sql-admin/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-sql-admin/latest", "library_type": "GAPIC_AUTO" } diff --git a/SqlAdmin/README.md b/SqlAdmin/README.md index be66d938927d..ee9f10fed080 100644 --- a/SqlAdmin/README.md +++ b/SqlAdmin/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-sql-admin/v/stable)](https://packagist.org/packages/google/cloud-sql-admin) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-sql-admin.svg)](https://packagist.org/packages/google/cloud-sql-admin) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-sql-admin/latest/sqladmin/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-sql-admin/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Storage/.repo-metadata.json b/Storage/.repo-metadata.json index 67b7d2c17fe6..18c103689c07 100644 --- a/Storage/.repo-metadata.json +++ b/Storage/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-storage", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-storage/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-storage/latest", "library_type": "GAPIC_MANUAL" } diff --git a/Storage/README.md b/Storage/README.md index ab5fed0203a4..ae9d9805e70b 100644 --- a/Storage/README.md +++ b/Storage/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-storage/v/stable)](https://packagist.org/packages/google/cloud-storage) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-storage.svg)](https://packagist.org/packages/google/cloud-storage) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-storage/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-storage/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/StorageTransfer/.repo-metadata.json b/StorageTransfer/.repo-metadata.json index df3fadce6129..943d708bfc75 100644 --- a/StorageTransfer/.repo-metadata.json +++ b/StorageTransfer/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-storage-transfer", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-storage-transfer/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-storage-transfer/latest", "library_type": "GAPIC_AUTO" } diff --git a/StorageTransfer/README.md b/StorageTransfer/README.md index f0bb7777f94d..11facf607f54 100644 --- a/StorageTransfer/README.md +++ b/StorageTransfer/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-storage-transfer/v/stable)](https://packagist.org/packages/google/cloud-storage-transfer) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-storage-transfer.svg)](https://packagist.org/packages/google/cloud-storage-transfer) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-storage-transfer/latest/storagetransfer/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-storage-transfer/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Talent/.repo-metadata.json b/Talent/.repo-metadata.json index b3812b66066f..fbd74cc7330a 100644 --- a/Talent/.repo-metadata.json +++ b/Talent/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-talent", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-talent/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-talent/latest", "library_type": "GAPIC_AUTO" } diff --git a/Talent/README.md b/Talent/README.md index a169ea219729..6b5622092714 100644 --- a/Talent/README.md +++ b/Talent/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-talent/v/stable)](https://packagist.org/packages/google/cloud-talent) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-talent.svg)](https://packagist.org/packages/google/cloud-talent) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-talent/latest/talent/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-talent/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Tasks/.repo-metadata.json b/Tasks/.repo-metadata.json index 94701a970930..c0a69c23b033 100644 --- a/Tasks/.repo-metadata.json +++ b/Tasks/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-tasks", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-tasks/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-tasks/latest", "library_type": "GAPIC_AUTO" } diff --git a/Tasks/README.md b/Tasks/README.md index 089358baafb7..e6428b40be69 100644 --- a/Tasks/README.md +++ b/Tasks/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-tasks/v/stable)](https://packagist.org/packages/google/cloud-tasks) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-tasks.svg)](https://packagist.org/packages/google/cloud-tasks) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-tasks/latest/tasks/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-tasks/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/TextToSpeech/.repo-metadata.json b/TextToSpeech/.repo-metadata.json index 5a0e0687817e..5ff0379fe703 100644 --- a/TextToSpeech/.repo-metadata.json +++ b/TextToSpeech/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-text-to-speech", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-text-to-speech/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-text-to-speech/latest", "library_type": "GAPIC_AUTO" } diff --git a/TextToSpeech/README.md b/TextToSpeech/README.md index ddf043863c51..eac45f926199 100644 --- a/TextToSpeech/README.md +++ b/TextToSpeech/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-text-to-speech/v/stable)](https://packagist.org/packages/google/cloud-text-to-speech) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-text-to-speech.svg)](https://packagist.org/packages/google/cloud-text-to-speech) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-text-to-speech/latest/texttospeech/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-text-to-speech/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Tpu/.repo-metadata.json b/Tpu/.repo-metadata.json index 074cdd1106ee..8b3b9c4c1a94 100644 --- a/Tpu/.repo-metadata.json +++ b/Tpu/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-tpu", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-tpu/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-tpu/latest", "library_type": "GAPIC_AUTO" } diff --git a/Tpu/README.md b/Tpu/README.md index 30fbf88a7bd8..92d74e185c3b 100644 --- a/Tpu/README.md +++ b/Tpu/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-tpu/v/stable)](https://packagist.org/packages/google/cloud-tpu) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-tpu.svg)](https://packagist.org/packages/google/cloud-tpu) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-tpu/latest/tpu/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-tpu/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Trace/.repo-metadata.json b/Trace/.repo-metadata.json index 615933ec1b0d..ee5126a63c5f 100644 --- a/Trace/.repo-metadata.json +++ b/Trace/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-trace", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-trace/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-trace/latest", "library_type": "GAPIC_COMBO" } diff --git a/Trace/README.md b/Trace/README.md index 5b0bf1f66c66..08e1c84ae3b6 100644 --- a/Trace/README.md +++ b/Trace/README.md @@ -122,8 +122,8 @@ any minor or patch releases. We will address issues and requests with the highes [stackdriver-trace]: https://cloud.google.com/trace/ -[homepage]: http://googleapis.github.io/google-cloud-php -[api-docs]: http://googleapis.github.io/google-cloud-php/#/docs/cloud-trace/latest +[homepage]: https://cloud.google.com/php/docs/reference +[api-docs]: https://cloud.google.com/php/docs/reference/cloud-trace/latest [opencensus]: http://opencensus.io [opencensus-php]: https://github.com/census-instrumentation/opencensus-php [opencensus-migration]: http://opencensus.io/opencensus-php/migrating-stackdriver-trace diff --git a/Translate/.repo-metadata.json b/Translate/.repo-metadata.json index bd7f49f06eab..854f88afa44d 100644 --- a/Translate/.repo-metadata.json +++ b/Translate/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-translate", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-translate/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-translate/latest", "library_type": "GAPIC_COMBO" } diff --git a/Translate/README.md b/Translate/README.md index c65fc3ad1235..8209c4c93e50 100644 --- a/Translate/README.md +++ b/Translate/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-translate/v/stable)](https://packagist.org/packages/google/cloud-translate) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-translate.svg)](https://packagist.org/packages/google/cloud-translate) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-translate/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-translate/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/VideoIntelligence/.repo-metadata.json b/VideoIntelligence/.repo-metadata.json index 7db952b7b7fa..e52bd2c0c015 100644 --- a/VideoIntelligence/.repo-metadata.json +++ b/VideoIntelligence/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-videointelligence", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-videointelligence/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-videointelligence/latest", "library_type": "GAPIC_AUTO" } diff --git a/VideoIntelligence/README.md b/VideoIntelligence/README.md index 5e8285ae8268..f61337d93313 100644 --- a/VideoIntelligence/README.md +++ b/VideoIntelligence/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-videointelligence/v/stable)](https://packagist.org/packages/google/cloud-videointelligence) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-videointelligence.svg)](https://packagist.org/packages/google/cloud-videointelligence) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-videointelligence/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-videointelligence/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to @@ -17,7 +17,7 @@ per segment, per shot, and per frame. **NOTE:** This documentation covers the most recent stable release (V1). There is an additional beta release included in this component. To check out its documentation, see the link below: -* [VideoIntelligence V1beta2 client](https://googleapis.github.io/google-cloud-php/#/docs/google-cloud/latest/videointelligence/v1beta2/videointelligenceserviceclient) +* [VideoIntelligence](https://cloud.google.com/php/docs/reference/cloud-videointelligence/latest)) ### Installation diff --git a/VideoLiveStream/.repo-metadata.json b/VideoLiveStream/.repo-metadata.json index 46287e128dd7..1355dbad7608 100644 --- a/VideoLiveStream/.repo-metadata.json +++ b/VideoLiveStream/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-video-live-stream", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-video-live-stream/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-video-live-stream/latest", "library_type": "GAPIC_AUTO" } diff --git a/VideoLiveStream/README.md b/VideoLiveStream/README.md index c2742497adbd..fede53851864 100644 --- a/VideoLiveStream/README.md +++ b/VideoLiveStream/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-video-live-stream/v/stable)](https://packagist.org/packages/google/cloud-video-live-stream) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-video-live-stream.svg)](https://packagist.org/packages/google/cloud-video-live-stream) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-video-live-stream/latest/videolivestream/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-video-live-stream/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/VideoStitcher/.repo-metadata.json b/VideoStitcher/.repo-metadata.json index 43e4b8c304fc..5c7a5c5fa06c 100644 --- a/VideoStitcher/.repo-metadata.json +++ b/VideoStitcher/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-video-stitcher", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-video-stitcher/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-video-stitcher/latest", "library_type": "GAPIC_AUTO" } diff --git a/VideoStitcher/README.md b/VideoStitcher/README.md index d406b45be4bd..5c68d23fac37 100644 --- a/VideoStitcher/README.md +++ b/VideoStitcher/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-video-stitcher/v/stable)](https://packagist.org/packages/google/cloud-video-stitcher) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-video-stitcher.svg)](https://packagist.org/packages/google/cloud-video-stitcher) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-video-stitcher/latest/videostitcher/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-video-stitcher/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/VideoTranscoder/.repo-metadata.json b/VideoTranscoder/.repo-metadata.json index c886a42bffb4..cc5ec52d56db 100644 --- a/VideoTranscoder/.repo-metadata.json +++ b/VideoTranscoder/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-video-transcoder", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-video-transcoder/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-video-transcoder/latest", "library_type": "GAPIC_AUTO" } diff --git a/VideoTranscoder/README.md b/VideoTranscoder/README.md index e7e27fa0ae0a..baee86ec1f09 100644 --- a/VideoTranscoder/README.md +++ b/VideoTranscoder/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-video-transcoder/v/stable)](https://packagist.org/packages/google/cloud-video-transcoder) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-video-transcoder.svg)](https://packagist.org/packages/google/cloud-video-transcoder) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-video-transcoder/latest/videotranscoder/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-video-transcoder/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Vision/.repo-metadata.json b/Vision/.repo-metadata.json index 979a1b7ca6ac..a3d84ce1b680 100644 --- a/Vision/.repo-metadata.json +++ b/Vision/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-vision", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-vision/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-vision/latest", "library_type": "GAPIC_COMBO" } diff --git a/Vision/README.md b/Vision/README.md index 6b6e2f6aeb80..2830091693ba 100644 --- a/Vision/README.md +++ b/Vision/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-vision/v/stable)](https://packagist.org/packages/google/cloud-vision) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-vision.svg)](https://packagist.org/packages/google/cloud-vision) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-vision/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-vision/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/VmMigration/.repo-metadata.json b/VmMigration/.repo-metadata.json index 59a69850e262..18275575d913 100644 --- a/VmMigration/.repo-metadata.json +++ b/VmMigration/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-vm-migration", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-vm-migration/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-vm-migration/latest", "library_type": "GAPIC_AUTO" } diff --git a/VmMigration/README.md b/VmMigration/README.md index 8cc3eadb1ddc..60894433680d 100644 --- a/VmMigration/README.md +++ b/VmMigration/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-vm-migration/v/stable)](https://packagist.org/packages/google/cloud-vm-migration) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-vm-migration.svg)](https://packagist.org/packages/google/cloud-vm-migration) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-vm-migration/latest/vmmigration/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-vm-migration/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/VpcAccess/.repo-metadata.json b/VpcAccess/.repo-metadata.json index 4e69ef8c686e..4d9d23943362 100644 --- a/VpcAccess/.repo-metadata.json +++ b/VpcAccess/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-vpc-access", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-vpc-access/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-vpc-access/latest", "library_type": "GAPIC_AUTO" } diff --git a/VpcAccess/README.md b/VpcAccess/README.md index ff9b378d87f0..0bb9016aff87 100644 --- a/VpcAccess/README.md +++ b/VpcAccess/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-vpc-access/v/stable)](https://packagist.org/packages/google/cloud-vpc-access) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-vpc-access.svg)](https://packagist.org/packages/google/cloud-vpc-access) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-vpc-access/latest/vpcaccess/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-vpc-access/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/WebRisk/.repo-metadata.json b/WebRisk/.repo-metadata.json index c42cc76f093f..cc60f26605c4 100644 --- a/WebRisk/.repo-metadata.json +++ b/WebRisk/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-web-risk", "release_level": "ga", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-web-risk/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-web-risk/latest", "library_type": "GAPIC_AUTO" } diff --git a/WebRisk/README.md b/WebRisk/README.md index 1becb330e8c1..10246ff924fd 100644 --- a/WebRisk/README.md +++ b/WebRisk/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-web-risk/v/stable)](https://packagist.org/packages/google/cloud-web-risk) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-web-risk.svg)](https://packagist.org/packages/google/cloud-web-risk) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-web-risk/latest/webrisk/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-web-risk/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/WebSecurityScanner/.repo-metadata.json b/WebSecurityScanner/.repo-metadata.json index 22ccf938be6c..10daa27ca4e7 100644 --- a/WebSecurityScanner/.repo-metadata.json +++ b/WebSecurityScanner/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-web-security-scanner", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-web-security-scanner/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-web-security-scanner/latest", "library_type": "GAPIC_AUTO" } diff --git a/WebSecurityScanner/README.md b/WebSecurityScanner/README.md index 88ee0c2ebf82..a58c89ced91d 100644 --- a/WebSecurityScanner/README.md +++ b/WebSecurityScanner/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-web-security-scanner/v/stable)](https://packagist.org/packages/google/cloud-web-security-scanner) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-web-security-scanner.svg)](https://packagist.org/packages/google/cloud-web-security-scanner) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-web-security-scanner/latest/websecurityscanner/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-web-security-scanner/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/Workflows/.repo-metadata.json b/Workflows/.repo-metadata.json index dd644d0234b8..a1a436e320a0 100644 --- a/Workflows/.repo-metadata.json +++ b/Workflows/.repo-metadata.json @@ -1,6 +1,6 @@ { "distribution_name": "google/cloud-workflows", "release_level": "beta", - "client_documentation": "http://googleapis.github.io/google-cloud-php/#/docs/cloud-workflows/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-workflows/latest", "library_type": "GAPIC_AUTO" } diff --git a/Workflows/README.md b/Workflows/README.md index dbd4e619df94..ced8b6159118 100644 --- a/Workflows/README.md +++ b/Workflows/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-workflows/v/stable)](https://packagist.org/packages/google/cloud-workflows) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-workflows.svg)](https://packagist.org/packages/google/cloud-workflows) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-workflows/latest/workflows/readme) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-workflows/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/dev/src/AddComponent/templates/template-README.md.txt b/dev/src/AddComponent/templates/template-README.md.txt index 76abe3e90de4..843e51264f71 100644 --- a/dev/src/AddComponent/templates/template-README.md.txt +++ b/dev/src/AddComponent/templates/template-README.md.txt @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/{name}/v/stable)](https://packagist.org/packages/google/{name}) [![Packagist](https://img.shields.io/packagist/dm/google/{name}.svg)](https://packagist.org/packages/google/{name}) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/{name}/latest/{directory}/{client}) +* [API documentation](https://cloud.google.com/php/docs/reference/{name}/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/dev/tests/fixtures/docfx/index.md b/dev/tests/fixtures/docfx/index.md index 6b6e2f6aeb80..2830091693ba 100644 --- a/dev/tests/fixtures/docfx/index.md +++ b/dev/tests/fixtures/docfx/index.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://poser.pugx.org/google/cloud-vision/v/stable)](https://packagist.org/packages/google/cloud-vision) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-vision.svg)](https://packagist.org/packages/google/cloud-vision) -* [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-vision/latest) +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-vision/latest) **NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to diff --git a/dev/tests/fixtures/split/get-repo.json b/dev/tests/fixtures/split/get-repo.json index ffa386fa61c9..0b8ead201f53 100644 --- a/dev/tests/fixtures/split/get-repo.json +++ b/dev/tests/fixtures/split/get-repo.json @@ -171,7 +171,7 @@ "ssh_url": "git@github.com:googleapis/google-cloud-php.git", "clone_url": "https://github.com/googleapis/google-cloud-php.git", "svn_url": "https://github.com/googleapis/google-cloud-php", - "homepage": "https://googleapis.github.io/google-cloud-php", + "homepage": "https://cloud.google.com/php/docs/reference", "size": 162863, "stargazers_count": 753, "watchers_count": 753, @@ -271,7 +271,7 @@ "ssh_url": "git@github.com:googleapis/google-cloud-php.git", "clone_url": "https://github.com/googleapis/google-cloud-php.git", "svn_url": "https://github.com/googleapis/google-cloud-php", - "homepage": "https://googleapis.github.io/google-cloud-php", + "homepage": "https://cloud.google.com/php/docs/reference", "size": 162863, "stargazers_count": 753, "watchers_count": 753,