Service Description: Service to determine the likelihood an event is legitimate.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods.
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.
| Properties |
| public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform'] The default scopes required by the service. |
| Methods |
| public __call( $method, $args) Handles execution of the async variants for each documented method. |
| public __construct(Google Constructor.
|
| public addIpOverride(Google Adds an IP override to a key. The following restrictions hold:
The async variant is {@see \RecaptchaEnterpriseServiceClient::addIpOverrideAsync()} .
|
| public addMiddleware(callable $middlewareCallable) : void Add a middleware to the call stack by providing a callable which will be invoked at the start of each call, and will return an instance of {@see MiddlewareInterface} when invoked. The callable must have the following method signature:
An implementation may look something like this:
|
| public annotateAssessment(Google Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent. The async variant is {@see \RecaptchaEnterpriseServiceClient::annotateAssessmentAsync()} .
|
| public static assessmentName(string $project, string $assessment) : string Formats a string containing the fully-qualified path to represent a assessment resource.
|
| public close() Initiates an orderly shutdown in which preexisting calls continue but new calls are immediately cancelled.
|
| public createAssessment(Google Creates an Assessment of the likelihood an event is legitimate. The async variant is {@see \RecaptchaEnterpriseServiceClient::createAssessmentAsync()} .
|
| public createFirewallPolicy(Google Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA Enterprise actions can be executed. A project may have a maximum of 1000 policies. The async variant is {@see \RecaptchaEnterpriseServiceClient::createFirewallPolicyAsync()} .
|
| public createKey(Google Creates a new reCAPTCHA Enterprise key. The async variant is {@see \RecaptchaEnterpriseServiceClient::createKeyAsync()} .
|
| public deleteFirewallPolicy(Google Deletes the specified firewall policy. The async variant is {@see \RecaptchaEnterpriseServiceClient::deleteFirewallPolicyAsync()} .
|
| public deleteKey(Google Deletes the specified key. The async variant is {@see \RecaptchaEnterpriseServiceClient::deleteKeyAsync()} .
|
| public static firewallPolicyName(string $project, string $firewallpolicy) : string Formats a string containing the fully-qualified path to represent a firewall_policy resource.
|
| public getFirewallPolicy(Google Returns the specified firewall policy. The async variant is {@see \RecaptchaEnterpriseServiceClient::getFirewallPolicyAsync()} .
|
| public getKey(Google Returns the specified key. The async variant is {@see \RecaptchaEnterpriseServiceClient::getKeyAsync()} .
|
| public getMetrics(Google Get some aggregated metrics for a Key. This data can be used to build dashboards. The async variant is {@see \RecaptchaEnterpriseServiceClient::getMetricsAsync()} .
|
| public static keyName(string $project, string $key) : string Formats a string containing the fully-qualified path to represent a key resource.
|
| public listFirewallPolicies(Google Returns the list of all firewall policies that belong to a project. The async variant is {@see \RecaptchaEnterpriseServiceClient::listFirewallPoliciesAsync()} .
|
| public listIpOverrides(Google Lists all IP overrides for a key. The async variant is {@see \RecaptchaEnterpriseServiceClient::listIpOverridesAsync()} .
|
| public listKeys(Google Returns the list of all keys that belong to a project. The async variant is {@see \RecaptchaEnterpriseServiceClient::listKeysAsync()} .
|
| public listRelatedAccountGroupMemberships(Google Get memberships in a group of related accounts. The async variant is {@see \RecaptchaEnterpriseServiceClient::listRelatedAccountGroupMembershipsAsync()} .
|
| public listRelatedAccountGroups(Google List groups of related accounts. The async variant is {@see \RecaptchaEnterpriseServiceClient::listRelatedAccountGroupsAsync()} .
|
| public static metricsName(string $project, string $key) : string Formats a string containing the fully-qualified path to represent a metrics resource.
|
| public migrateKey(Google Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. Once a key is migrated, it can be used from either product. SiteVerify requests are billed as CreateAssessment calls. You must be authenticated as one of the current owners of the reCAPTCHA Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project. The async variant is {@see \RecaptchaEnterpriseServiceClient::migrateKeyAsync()} .
|
| public static parseName(string $formattedName, ?string $template = NULL) : array Parses a formatted name string and returns an associative array of the components in the name. The following name formats are supported: Template: Pattern
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.
|
| public prependMiddleware(callable $middlewareCallable) : void Prepend a middleware to the call stack by providing a callable which will be invoked at the end of each call, and will return an instance of {@see MiddlewareInterface} when invoked. The callable must have the following method signature:
An implementation may look something like this:
|
| public static projectName(string $project) : string Formats a string containing the fully-qualified path to represent a project resource.
|
| public static relatedAccountGroupName(string $project, string $relatedaccountgroup) : string Formats a string containing the fully-qualified path to represent a related_account_group resource.
|
| public removeIpOverride(Google Removes an IP override from a key. The following restrictions hold:
The async variant is {@see \RecaptchaEnterpriseServiceClient::removeIpOverrideAsync()} .
|
| public reorderFirewallPolicies(Google Reorders all firewall policies. The async variant is {@see \RecaptchaEnterpriseServiceClient::reorderFirewallPoliciesAsync()} .
|
| public retrieveLegacySecretKey(Google Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA. The async variant is {@see \RecaptchaEnterpriseServiceClient::retrieveLegacySecretKeyAsync()} .
|
| public searchRelatedAccountGroupMemberships(Google Search group memberships related to a given account. The async variant is {@see \RecaptchaEnterpriseServiceClient::searchRelatedAccountGroupMembershipsAsync()} .
|
public static traitValidate(array $arr, array $requiredKeys)
|
| public updateFirewallPolicy(Google Updates the specified firewall policy. The async variant is {@see \RecaptchaEnterpriseServiceClient::updateFirewallPolicyAsync()} .
|
| public updateKey(Google Updates the specified key. The async variant is {@see \RecaptchaEnterpriseServiceClient::updateKeyAsync()} .
|
public static validate(array $arr, array $requiredKeys)
|
public static validateNotNull(array $arr, array $requiredKeys)
|
| Methods |
| protected getCredentialsWrapper() Get the credentials for the client. This method is protected to support use by customized clients.
|
| protected getTransport() Get the transport for the client. This method is protected to support use by customized clients.
|
| protected modifyClientOptions(array $options) Modify options passed to the client before calling setClientOptions.
|
| protected modifyStreamingCallable(callable $callable) Modify the streaming callable.
|
| protected modifyUnaryCallable(callable $callable) Modify the unary callable.
|
| Constants |
| private Google The name of the code generator, to be included in the agent header. |
| private Google The default port of the service. |
| private Google The default address of the service.
|
| private Google The address template of the service. |
| private Google The name of the service. |
| Properties |
| private array $agentHeader = [] |
| private bool $backwardsCompatibilityMode |
| private ?Google |
| private array $descriptors = [] |
| private static $gapicVersionFromFile = NULL |
private array $middlewareCallables = []
|
private array $prependMiddlewareCallables = []
|
private array $retrySettings = []
|
| private string $serviceName = '' |
private static $templateMap = NULL
|
| private ?Google |
| private array $transportCallMethods = ['startUnaryCall', 'startBidiStreamingCall', 'startClientStreamingCall', 'startServerStreamingCall'] |
| Methods |
| private arrayFilterRemoveNull(array $arr) Just like array_filter(), but preserves falsey values except null.
|
| private arrayMergeRecursive(array $array1, array $array2) A method, similar to PHP's
|
| private buildClientOptions(Google Resolve client options based on the client's default ({@see ClientOptionsTrait::getClientDefault}) and the default for all Google APIs.
|
private buildMethod(?string $interfaceName = NULL, ?string $methodName = NULL)
|
private buildRequestParamsHeader(array $headerParams, ?Google
|
private configureCallConstructionOptions(string $methodName, array $optionalArgs)
|
private configureCallOptions(array $optionalArgs) : array
|
private createCallStack(array $callConstructionOptions)
|
private createCredentialsWrapper( $credentials, array $credentialsConfig, string $universeDomain)
|
private createOperationsClient(array $options)
|
private createTransport(string $apiEndpoint, $transport, $transportConfig, ?callable $clientCertSource = NULL, bool $hasEmulator = false)
|
private static defaultTransport()
|
| private static determineMtlsEndpoint(string $apiEndpoint) |
| private static getClientDefaults() |
| private static getDefaultAudience() The SERVICE_ADDRESS constant is set by GAPIC clients |
| private static getGapicVersion(array $options) |
private static getGrpcDependencyStatus()
|
private getPagedListResponse(string $methodName, array $optionalArgs, string $decodeType, Google
|
private getPagedListResponseAsync(string $methodName, array $optionalArgs, string $decodeType, Google
|
| private static getPathTemplate(string $key) |
| private static initGrpcGcpConfig(string $hostName, string $confPath) |
| private isAssoc(array $arr) Determine whether given array is associative.
|
private isBackwardsCompatibilityMode() : bool
|
| private static loadPathTemplates(string $configPath, string $serviceName) |
private logConfiguration(Psr\Log\LoggerInterface|false|?null $logger, array $options) : void
|
| private static parseFormattedName(string $formattedName, ?string $template = NULL) : array |
| private pluck(string $key, array $arr, bool $isRequired = true) Pluck a value out of an array.
|
| private pluckArray(array $keys, array $arr) Pluck a subset of an array.
|
| private static registerPathTemplates() |
| private setClientOptions(array $options) Configures the GAPIC client based on an array of options.
|
| private shouldUseMtlsEndpoint(array $options) |
private startApiCall(string $methodName, ?Google
|
private startAsyncCall(string $methodName, Google
|
private startCall(string $methodName, string $decodeType, array $optionalArgs = [], ?Google
|
private startOperationsCall(string $methodName, array $optionalArgs, Google
|
| private subsetArray(array $keys, array $arr) Return a subset of an array, like pluckArray, without modifying the original array.
|
| private static supportedTransports() This defaults to all three transports, which One-Platform supports. Discovery clients should define this function and only return ['rest']. |
| private validateCallConfig(string $methodName) |
private static validateFileExists(string $filePath)
|
private static validateGrpcSupport()
|
| private static validateImpl( $arr, $requiredKeys, $allowNull) |
| Properties |
| private static $gapicVersionFromFile = NULL |
| public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform'] The default scopes required by the service. |
private static $templateMap = NULL
|
| Methods |
| public static assessmentName(string $project, string $assessment) : string Formats a string containing the fully-qualified path to represent a assessment resource.
|
private static defaultTransport()
|
| private static determineMtlsEndpoint(string $apiEndpoint) |
| public static firewallPolicyName(string $project, string $firewallpolicy) : string Formats a string containing the fully-qualified path to represent a firewall_policy resource.
|
| private static getClientDefaults() |
| private static getDefaultAudience() The SERVICE_ADDRESS constant is set by GAPIC clients |
| private static getGapicVersion(array $options) |
private static getGrpcDependencyStatus()
|
| private static getPathTemplate(string $key) |
| private static initGrpcGcpConfig(string $hostName, string $confPath) |
| public static keyName(string $project, string $key) : string Formats a string containing the fully-qualified path to represent a key resource.
|
| private static loadPathTemplates(string $configPath, string $serviceName) |
| public static metricsName(string $project, string $key) : string Formats a string containing the fully-qualified path to represent a metrics resource.
|
| private static parseFormattedName(string $formattedName, ?string $template = NULL) : array |
| public static parseName(string $formattedName, ?string $template = NULL) : array Parses a formatted name string and returns an associative array of the components in the name. The following name formats are supported: Template: Pattern
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.
|
| public static projectName(string $project) : string Formats a string containing the fully-qualified path to represent a project resource.
|
| private static registerPathTemplates() |
| public static relatedAccountGroupName(string $project, string $relatedaccountgroup) : string Formats a string containing the fully-qualified path to represent a related_account_group resource.
|
| private static supportedTransports() This defaults to all three transports, which One-Platform supports. Discovery clients should define this function and only return ['rest']. |
public static traitValidate(array $arr, array $requiredKeys)
|
public static validate(array $arr, array $requiredKeys)
|
private static validateFileExists(string $filePath)
|
private static validateGrpcSupport()
|
| private static validateImpl( $arr, $requiredKeys, $allowNull) |
public static validateNotNull(array $arr, array $requiredKeys)
|