diff --git a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/attach_trust.php b/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/attach_trust.php deleted file mode 100644 index 9103480a40c0..000000000000 --- a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/attach_trust.php +++ /dev/null @@ -1,83 +0,0 @@ -attachTrust($formattedName, $trust); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Domain $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 = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - - attach_trust_sample($formattedName); -} -// [END managedidentities_v1beta1_generated_ManagedIdentitiesService_AttachTrust_sync] diff --git a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/create_microsoft_ad_domain.php b/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/create_microsoft_ad_domain.php deleted file mode 100644 index 4aacd51307df..000000000000 --- a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/create_microsoft_ad_domain.php +++ /dev/null @@ -1,120 +0,0 @@ -setReservedIpRange($domainReservedIpRange) - ->setLocations($domainLocations); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedIdentitiesServiceClient->createMicrosoftAdDomain( - $formattedParent, - $domainName, - $domain - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Domain $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 = ManagedIdentitiesServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $domainName = '[DOMAIN_NAME]'; - $domainReservedIpRange = '[RESERVED_IP_RANGE]'; - $domainLocationsElement = '[LOCATIONS]'; - - create_microsoft_ad_domain_sample( - $formattedParent, - $domainName, - $domainReservedIpRange, - $domainLocationsElement - ); -} -// [END managedidentities_v1beta1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_sync] diff --git a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/delete_domain.php b/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/delete_domain.php deleted file mode 100644 index 698174799c2b..000000000000 --- a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/delete_domain.php +++ /dev/null @@ -1,76 +0,0 @@ -deleteDomain($formattedName); - $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 -{ - $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - - delete_domain_sample($formattedName); -} -// [END managedidentities_v1beta1_generated_ManagedIdentitiesService_DeleteDomain_sync] diff --git a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/detach_trust.php b/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/detach_trust.php deleted file mode 100644 index 4ccee53e7fb9..000000000000 --- a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/detach_trust.php +++ /dev/null @@ -1,83 +0,0 @@ -detachTrust($formattedName, $trust); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Domain $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 = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - - detach_trust_sample($formattedName); -} -// [END managedidentities_v1beta1_generated_ManagedIdentitiesService_DetachTrust_sync] diff --git a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/get_domain.php b/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/get_domain.php deleted file mode 100644 index e2ce44527496..000000000000 --- a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/get_domain.php +++ /dev/null @@ -1,67 +0,0 @@ -getDomain($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 = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - - get_domain_sample($formattedName); -} -// [END managedidentities_v1beta1_generated_ManagedIdentitiesService_GetDomain_sync] diff --git a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/list_domains.php b/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/list_domains.php deleted file mode 100644 index 37b6e982096d..000000000000 --- a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/list_domains.php +++ /dev/null @@ -1,72 +0,0 @@ -listDomains($formattedParent); - - /** @var Domain $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 = ManagedIdentitiesServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_domains_sample($formattedParent); -} -// [END managedidentities_v1beta1_generated_ManagedIdentitiesService_ListDomains_sync] diff --git a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/reconfigure_trust.php b/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/reconfigure_trust.php deleted file mode 100644 index b4bb764a5cda..000000000000 --- a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/reconfigure_trust.php +++ /dev/null @@ -1,95 +0,0 @@ -reconfigureTrust( - $formattedName, - $targetDomainName, - $targetDnsIpAddresses - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Domain $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 = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $targetDomainName = '[TARGET_DOMAIN_NAME]'; - $targetDnsIpAddressesElement = '[TARGET_DNS_IP_ADDRESSES]'; - - reconfigure_trust_sample($formattedName, $targetDomainName, $targetDnsIpAddressesElement); -} -// [END managedidentities_v1beta1_generated_ManagedIdentitiesService_ReconfigureTrust_sync] diff --git a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/reset_admin_password.php b/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/reset_admin_password.php deleted file mode 100644 index 29bd45d29d17..000000000000 --- a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/reset_admin_password.php +++ /dev/null @@ -1,67 +0,0 @@ -resetAdminPassword($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 = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - - reset_admin_password_sample($formattedName); -} -// [END managedidentities_v1beta1_generated_ManagedIdentitiesService_ResetAdminPassword_sync] diff --git a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/update_domain.php b/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/update_domain.php deleted file mode 100644 index 86849800639b..000000000000 --- a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/update_domain.php +++ /dev/null @@ -1,94 +0,0 @@ -setReservedIpRange($domainReservedIpRange) - ->setLocations($domainLocations); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedIdentitiesServiceClient->updateDomain($updateMask, $domain); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Domain $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 -{ - $domainReservedIpRange = '[RESERVED_IP_RANGE]'; - $domainLocationsElement = '[LOCATIONS]'; - - update_domain_sample($domainReservedIpRange, $domainLocationsElement); -} -// [END managedidentities_v1beta1_generated_ManagedIdentitiesService_UpdateDomain_sync] diff --git a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/validate_trust.php b/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/validate_trust.php deleted file mode 100644 index 3cb0e8f4c0c3..000000000000 --- a/ManagedIdentities/samples/V1beta1/ManagedIdentitiesServiceClient/validate_trust.php +++ /dev/null @@ -1,84 +0,0 @@ -validateTrust($formattedName, $trust); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Domain $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 = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - - validate_trust_sample($formattedName); -} -// [END managedidentities_v1beta1_generated_ManagedIdentitiesService_ValidateTrust_sync]