Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [ServiceDirectory] added network and uid fields in Endpoint message #6472

Merged
merged 2 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions ServiceDirectory/metadata/V1/Endpoint.php

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

7 changes: 4 additions & 3 deletions ServiceDirectory/metadata/V1/PBNamespace.php

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

7 changes: 4 additions & 3 deletions ServiceDirectory/metadata/V1/Service.php

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

7 changes: 4 additions & 3 deletions ServiceDirectory/metadata/V1Beta1/Endpoint.php

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

4 changes: 2 additions & 2 deletions ServiceDirectory/metadata/V1Beta1/LookupService.php

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

7 changes: 4 additions & 3 deletions ServiceDirectory/metadata/V1Beta1/PBNamespace.php

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

12 changes: 6 additions & 6 deletions ServiceDirectory/metadata/V1Beta1/RegistrationService.php

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

7 changes: 4 additions & 3 deletions ServiceDirectory/metadata/V1Beta1/Service.php

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START servicedirectory_v1_generated_LookupService_GetLocation_sync]
use Google\ApiCore\ApiException;
use Google\Cloud\Location\Location;
use Google\Cloud\ServiceDirectory\V1\LookupServiceClient;

/**
* Gets information about a location.
*
* 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 get_location_sample(): void
{
// Create a client.
$lookupServiceClient = new LookupServiceClient();

// Call the API and handle any network failures.
try {
/** @var Location $response */
$response = $lookupServiceClient->getLocation();
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
// [END servicedirectory_v1_generated_LookupService_GetLocation_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?php
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START servicedirectory_v1_generated_LookupService_ListLocations_sync]
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Location\Location;
use Google\Cloud\ServiceDirectory\V1\LookupServiceClient;

/**
* Lists information about the supported locations for this service.
*
* 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 list_locations_sample(): void
{
// Create a client.
$lookupServiceClient = new LookupServiceClient();

// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $lookupServiceClient->listLocations();

/** @var Location $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());
}
}
// [END servicedirectory_v1_generated_LookupService_ListLocations_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Google\Cloud\ServiceDirectory\V1\RegistrationServiceClient;

/**
* Creates a endpoint, and returns the new Endpoint.
* Creates an endpoint, and returns the new endpoint.
*
* @param string $formattedParent The resource name of the service that this endpoint provides. Please see
* {@see RegistrationServiceClient::serviceName()} for help formatting this field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Google\Cloud\ServiceDirectory\V1\RegistrationServiceClient;

/**
* Creates a namespace, and returns the new Namespace.
* Creates a namespace, and returns the new namespace.
*
* @param string $formattedParent The resource name of the project and location the namespace
* will be created in. Please see
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Google\Cloud\ServiceDirectory\V1\Service;

/**
* Creates a service, and returns the new Service.
* Creates a service, and returns the new service.
*
* @param string $formattedParent The resource name of the namespace this service will belong to. Please see
* {@see RegistrationServiceClient::namespaceName()} for help formatting this field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
use Google\Cloud\ServiceDirectory\V1\RegistrationServiceClient;

/**
* Deletes a endpoint.
* Deletes an endpoint.
*
* @param string $formattedName The name of the endpoint to delete. Please see
* {@see RegistrationServiceClient::endpointName()} for help formatting this field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Google\Cloud\ServiceDirectory\V1\RegistrationServiceClient;

/**
* Gets a endpoint.
* Gets an endpoint.
*
* @param string $formattedName The name of the endpoint to get. Please see
* {@see RegistrationServiceClient::endpointName()} for help formatting this field.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START servicedirectory_v1_generated_RegistrationService_GetLocation_sync]
use Google\ApiCore\ApiException;
use Google\Cloud\Location\Location;
use Google\Cloud\ServiceDirectory\V1\RegistrationServiceClient;

/**
* Gets information about a location.
*
* 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 get_location_sample(): void
{
// Create a client.
$registrationServiceClient = new RegistrationServiceClient();

// Call the API and handle any network failures.
try {
/** @var Location $response */
$response = $registrationServiceClient->getLocation();
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
// [END servicedirectory_v1_generated_RegistrationService_GetLocation_sync]
Loading