* $iamcredentialsService = new Google\Service\IAMCredentials(...); * $serviceAccounts = $iamcredentialsService->serviceAccounts; * */ class ProjectsServiceAccounts extends \Google\Service\Resource { /** * Generates an OAuth 2.0 access token for a service account. * (serviceAccounts.generateAccessToken) * * @param string $name Required. The resource name of the service account for * which the credentials are requested, in the following format: * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard * character is required; replacing it with a project ID is invalid. * @param GenerateAccessTokenRequest $postBody * @param array $optParams Optional parameters. * @return GenerateAccessTokenResponse */ public function generateAccessToken($name, GenerateAccessTokenRequest $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('generateAccessToken', [$params], GenerateAccessTokenResponse::class); } /** * Generates an OpenID Connect ID token for a service account. * (serviceAccounts.generateIdToken) * * @param string $name Required. The resource name of the service account for * which the credentials are requested, in the following format: * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard * character is required; replacing it with a project ID is invalid. * @param GenerateIdTokenRequest $postBody * @param array $optParams Optional parameters. * @return GenerateIdTokenResponse */ public function generateIdToken($name, GenerateIdTokenRequest $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('generateIdToken', [$params], GenerateIdTokenResponse::class); } /** * Signs a blob using a service account's system-managed private key. * (serviceAccounts.signBlob) * * @param string $name Required. The resource name of the service account for * which the credentials are requested, in the following format: * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard * character is required; replacing it with a project ID is invalid. * @param SignBlobRequest $postBody * @param array $optParams Optional parameters. * @return SignBlobResponse */ public function signBlob($name, SignBlobRequest $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('signBlob', [$params], SignBlobResponse::class); } /** * Signs a JWT using a service account's system-managed private key. * (serviceAccounts.signJwt) * * @param string $name Required. The resource name of the service account for * which the credentials are requested, in the following format: * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard * character is required; replacing it with a project ID is invalid. * @param SignJwtRequest $postBody * @param array $optParams Optional parameters. * @return SignJwtResponse */ public function signJwt($name, SignJwtRequest $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('signJwt', [$params], SignJwtResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ProjectsServiceAccounts::class, 'Google_Service_IAMCredentials_Resource_ProjectsServiceAccounts');