\Google\AdsApi\AdWords\QueryValidationResult

Indicates whether a validation has passed or failed with an explanation.

Summary

Methods
Properties
Constants
fail()
pass()
isPassed()
isFailed()
getFailReason()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
__construct()
$passedResult
$passed
$failReason
N/A

Properties

$passedResult

$passedResult :\Google\AdsApi\AdWords\Query\ValidationResult

Type

\Google\AdsApi\AdWords\Query\ValidationResult—represents a passed validation result. This result can be reused for all passed validations because it is always the same.

$passed

$passed :

Type

$failReason

$failReason :

Type

Methods

fail()

fail(string  $reason): \Google\AdsApi\AdWords\Query\ValidationResult

Creates a validation fail result with an explanation.

Parameters

string $reason

the explanation of why validation has failed

Returns

\Google\AdsApi\AdWords\Query\ValidationResult

the validation fail result with an explanation

isPassed()

isPassed(): boolean

Gets validation result of whether it has passed or failed.

Returns

boolean —

true if the validation has passed; Otherwise, returns false

isFailed()

isFailed(): boolean

Gets validation result of whether it has failed.

Returns

boolean —

true if the validation has failed; Otherwise, returns false

getFailReason()

getFailReason(): string|null

Gets the explanation why the validation has failed.

Returns

string|null —

a string to explain why validation has failed, or null if validation has passed

__construct()

__construct(boolean  $passed,string|null  $failReason = null)

Creates a validation result object.

Parameters

boolean $passed

whether the validation has passed

string|null $failReason

optional, the reason why validation has failed