From 2cdda2871320b5c56eff7523fbe15aece1f6dbf3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 14:59:08 -0800 Subject: [PATCH] feat: [ApiGateway] service update (#5013) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(apigateway): add ancillary service bindings to service_yaml PiperOrigin-RevId: 421098261 Source-Link: https://github.com/googleapis/googleapis/commit/4c13e8fdf8c99e7dc25cbb712a19d6ad25ed80c5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7c2bac34ae920baaa393b5757854f0f8fbb9697e Copy-Tag: eyJwIjoiQXBpR2F0ZXdheS8uT3dsQm90LnlhbWwiLCJoIjoiN2MyYmFjMzRhZTkyMGJhYWEzOTNiNTc1Nzg1NGYwZjhmYmI5Njk3ZSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- ApiGateway/src/V1/Api.php | 4 +- ApiGateway/src/V1/ApiConfig.php | 4 +- .../V1/ApiConfig/GrpcServiceDefinition.php | 2 +- .../src/V1/ApiConfig/OpenApiDocument.php | 2 +- ApiGateway/src/V1/ApiGatewayServiceClient.php | 2 +- ApiGateway/src/V1/CreateApiConfigRequest.php | 2 +- ApiGateway/src/V1/CreateApiRequest.php | 2 +- ApiGateway/src/V1/CreateGatewayRequest.php | 2 +- .../V1/Gapic/ApiGatewayServiceGapicClient.php | 11 +- ApiGateway/src/V1/Gateway.php | 4 +- ApiGateway/src/V1/OperationMetadata.php | 4 +- ApiGateway/src/V1/UpdateApiConfigRequest.php | 4 +- ApiGateway/src/V1/UpdateApiRequest.php | 4 +- ApiGateway/src/V1/UpdateGatewayRequest.php | 4 +- ...api_gateway_service_rest_client_config.php | 121 ++++++++++++++++-- 15 files changed, 140 insertions(+), 32 deletions(-) diff --git a/ApiGateway/src/V1/Api.php b/ApiGateway/src/V1/Api.php index 3bbb8ed0e261..466d78e95566 100644 --- a/ApiGateway/src/V1/Api.php +++ b/ApiGateway/src/V1/Api.php @@ -133,7 +133,7 @@ public function setName($var) */ public function getCreateTime() { - return isset($this->create_time) ? $this->create_time : null; + return $this->create_time; } public function hasCreateTime() @@ -169,7 +169,7 @@ public function setCreateTime($var) */ public function getUpdateTime() { - return isset($this->update_time) ? $this->update_time : null; + return $this->update_time; } public function hasUpdateTime() diff --git a/ApiGateway/src/V1/ApiConfig.php b/ApiGateway/src/V1/ApiConfig.php index 749bb248398e..e13d3e229453 100644 --- a/ApiGateway/src/V1/ApiConfig.php +++ b/ApiGateway/src/V1/ApiConfig.php @@ -198,7 +198,7 @@ public function setName($var) */ public function getCreateTime() { - return isset($this->create_time) ? $this->create_time : null; + return $this->create_time; } public function hasCreateTime() @@ -234,7 +234,7 @@ public function setCreateTime($var) */ public function getUpdateTime() { - return isset($this->update_time) ? $this->update_time : null; + return $this->update_time; } public function hasUpdateTime() diff --git a/ApiGateway/src/V1/ApiConfig/GrpcServiceDefinition.php b/ApiGateway/src/V1/ApiConfig/GrpcServiceDefinition.php index 75e74309ae62..6f3e931c7249 100644 --- a/ApiGateway/src/V1/ApiConfig/GrpcServiceDefinition.php +++ b/ApiGateway/src/V1/ApiConfig/GrpcServiceDefinition.php @@ -71,7 +71,7 @@ public function __construct($data = NULL) { */ public function getFileDescriptorSet() { - return isset($this->file_descriptor_set) ? $this->file_descriptor_set : null; + return $this->file_descriptor_set; } public function hasFileDescriptorSet() diff --git a/ApiGateway/src/V1/ApiConfig/OpenApiDocument.php b/ApiGateway/src/V1/ApiConfig/OpenApiDocument.php index e821a5498b4b..f8140732239a 100644 --- a/ApiGateway/src/V1/ApiConfig/OpenApiDocument.php +++ b/ApiGateway/src/V1/ApiConfig/OpenApiDocument.php @@ -45,7 +45,7 @@ public function __construct($data = NULL) { */ public function getDocument() { - return isset($this->document) ? $this->document : null; + return $this->document; } public function hasDocument() diff --git a/ApiGateway/src/V1/ApiGatewayServiceClient.php b/ApiGateway/src/V1/ApiGatewayServiceClient.php index 6c4bb4418cdc..30d889dd59e0 100644 --- a/ApiGateway/src/V1/ApiGatewayServiceClient.php +++ b/ApiGateway/src/V1/ApiGatewayServiceClient.php @@ -18,7 +18,7 @@ /* * GENERATED CODE WARNING * Generated by gapic-generator-php from the file - * https://github.com/google/googleapis/blob/master/google/cloud/apigateway/v1/apigateway_service.proto + * https://github.com/googleapis/googleapis/blob/master/google/cloud/apigateway/v1/apigateway_service.proto * Updates to the above are reflected here through a refresh process. */ diff --git a/ApiGateway/src/V1/CreateApiConfigRequest.php b/ApiGateway/src/V1/CreateApiConfigRequest.php index a8001046e6aa..557d967cd43a 100644 --- a/ApiGateway/src/V1/CreateApiConfigRequest.php +++ b/ApiGateway/src/V1/CreateApiConfigRequest.php @@ -121,7 +121,7 @@ public function setApiConfigId($var) */ public function getApiConfig() { - return isset($this->api_config) ? $this->api_config : null; + return $this->api_config; } public function hasApiConfig() diff --git a/ApiGateway/src/V1/CreateApiRequest.php b/ApiGateway/src/V1/CreateApiRequest.php index 4d062899dc03..90d3ccc016fe 100644 --- a/ApiGateway/src/V1/CreateApiRequest.php +++ b/ApiGateway/src/V1/CreateApiRequest.php @@ -121,7 +121,7 @@ public function setApiId($var) */ public function getApi() { - return isset($this->api) ? $this->api : null; + return $this->api; } public function hasApi() diff --git a/ApiGateway/src/V1/CreateGatewayRequest.php b/ApiGateway/src/V1/CreateGatewayRequest.php index 7ea58696b346..11b232bf7c8f 100644 --- a/ApiGateway/src/V1/CreateGatewayRequest.php +++ b/ApiGateway/src/V1/CreateGatewayRequest.php @@ -121,7 +121,7 @@ public function setGatewayId($var) */ public function getGateway() { - return isset($this->gateway) ? $this->gateway : null; + return $this->gateway; } public function hasGateway() diff --git a/ApiGateway/src/V1/Gapic/ApiGatewayServiceGapicClient.php b/ApiGateway/src/V1/Gapic/ApiGatewayServiceGapicClient.php index 57ce780ffc25..d6a27810708f 100644 --- a/ApiGateway/src/V1/Gapic/ApiGatewayServiceGapicClient.php +++ b/ApiGateway/src/V1/Gapic/ApiGatewayServiceGapicClient.php @@ -18,7 +18,7 @@ /* * GENERATED CODE WARNING * Generated by gapic-generator-php from the file - * https://github.com/google/googleapis/blob/master/google/cloud/apigateway/v1/apigateway_service.proto + * https://github.com/googleapis/googleapis/blob/master/google/cloud/apigateway/v1/apigateway_service.proto * Updates to the above are reflected here through a refresh process. */ @@ -107,9 +107,9 @@ * ``` * * Many parameters require resource names to be formatted in a particular way. To - * assistwith these names, this class includes a format method for each type of - * name, and additionallya parseName method to extract the individual identifiers - * contained within formatted namesthat are returned by the API. + * 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 ApiGatewayServiceGapicClient { @@ -506,6 +506,9 @@ public function resumeOperation($operationName, $methodName = null) * 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 diff --git a/ApiGateway/src/V1/Gateway.php b/ApiGateway/src/V1/Gateway.php index d4fa2eebb0ef..3289863f2824 100644 --- a/ApiGateway/src/V1/Gateway.php +++ b/ApiGateway/src/V1/Gateway.php @@ -141,7 +141,7 @@ public function setName($var) */ public function getCreateTime() { - return isset($this->create_time) ? $this->create_time : null; + return $this->create_time; } public function hasCreateTime() @@ -177,7 +177,7 @@ public function setCreateTime($var) */ public function getUpdateTime() { - return isset($this->update_time) ? $this->update_time : null; + return $this->update_time; } public function hasUpdateTime() diff --git a/ApiGateway/src/V1/OperationMetadata.php b/ApiGateway/src/V1/OperationMetadata.php index 522d6d9309d8..9d17c719c084 100644 --- a/ApiGateway/src/V1/OperationMetadata.php +++ b/ApiGateway/src/V1/OperationMetadata.php @@ -107,7 +107,7 @@ public function __construct($data = NULL) { */ public function getCreateTime() { - return isset($this->create_time) ? $this->create_time : null; + return $this->create_time; } public function hasCreateTime() @@ -143,7 +143,7 @@ public function setCreateTime($var) */ public function getEndTime() { - return isset($this->end_time) ? $this->end_time : null; + return $this->end_time; } public function hasEndTime() diff --git a/ApiGateway/src/V1/UpdateApiConfigRequest.php b/ApiGateway/src/V1/UpdateApiConfigRequest.php index 6c540b66ea3c..778eeef4126b 100644 --- a/ApiGateway/src/V1/UpdateApiConfigRequest.php +++ b/ApiGateway/src/V1/UpdateApiConfigRequest.php @@ -65,7 +65,7 @@ public function __construct($data = NULL) { */ public function getUpdateMask() { - return isset($this->update_mask) ? $this->update_mask : null; + return $this->update_mask; } public function hasUpdateMask() @@ -105,7 +105,7 @@ public function setUpdateMask($var) */ public function getApiConfig() { - return isset($this->api_config) ? $this->api_config : null; + return $this->api_config; } public function hasApiConfig() diff --git a/ApiGateway/src/V1/UpdateApiRequest.php b/ApiGateway/src/V1/UpdateApiRequest.php index c1c6d74cb35f..c5557e45e362 100644 --- a/ApiGateway/src/V1/UpdateApiRequest.php +++ b/ApiGateway/src/V1/UpdateApiRequest.php @@ -65,7 +65,7 @@ public function __construct($data = NULL) { */ public function getUpdateMask() { - return isset($this->update_mask) ? $this->update_mask : null; + return $this->update_mask; } public function hasUpdateMask() @@ -105,7 +105,7 @@ public function setUpdateMask($var) */ public function getApi() { - return isset($this->api) ? $this->api : null; + return $this->api; } public function hasApi() diff --git a/ApiGateway/src/V1/UpdateGatewayRequest.php b/ApiGateway/src/V1/UpdateGatewayRequest.php index 597364c07caf..211446edaae2 100644 --- a/ApiGateway/src/V1/UpdateGatewayRequest.php +++ b/ApiGateway/src/V1/UpdateGatewayRequest.php @@ -65,7 +65,7 @@ public function __construct($data = NULL) { */ public function getUpdateMask() { - return isset($this->update_mask) ? $this->update_mask : null; + return $this->update_mask; } public function hasUpdateMask() @@ -105,7 +105,7 @@ public function setUpdateMask($var) */ public function getGateway() { - return isset($this->gateway) ? $this->gateway : null; + return $this->gateway; } public function hasGateway() diff --git a/ApiGateway/src/V1/resources/api_gateway_service_rest_client_config.php b/ApiGateway/src/V1/resources/api_gateway_service_rest_client_config.php index b7b37d386f88..9dbb9180f993 100644 --- a/ApiGateway/src/V1/resources/api_gateway_service_rest_client_config.php +++ b/ApiGateway/src/V1/resources/api_gateway_service_rest_client_config.php @@ -14,6 +14,9 @@ ], ], ], + 'queryParams' => [ + 'api_id', + ], ], 'CreateApiConfig' => [ 'method' => 'post', @@ -26,6 +29,9 @@ ], ], ], + 'queryParams' => [ + 'api_config_id', + ], ], 'CreateGateway' => [ 'method' => 'post', @@ -38,6 +44,9 @@ ], ], ], + 'queryParams' => [ + 'gateway_id', + ], ], 'DeleteApi' => [ 'method' => 'delete', @@ -178,10 +187,10 @@ ], ], ], - 'google.longrunning.Operations' => [ - 'ListOperations' => [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', 'placeholders' => [ 'name' => [ 'getters' => [ @@ -190,9 +199,94 @@ ], ], ], - 'GetOperation' => [ + 'ListLocations' => [ 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/apis/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/apis/*/configs/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/apis/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/apis/*/configs/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/apis/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/apis/*/configs/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', 'placeholders' => [ 'name' => [ 'getters' => [ @@ -212,9 +306,20 @@ ], ], ], - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', 'placeholders' => [ 'name' => [ 'getters' => [