repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
googleapis/google-cloud-php | Dlp/src/V2/InspectionRule.php | InspectionRule.setHotwordRule | public function setHotwordRule($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_DetectionRule_HotwordRule::class);
$this->writeOneof(1, $var);
return $this;
} | php | public function setHotwordRule($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_DetectionRule_HotwordRule::class);
$this->writeOneof(1, $var);
return $this;
} | [
"public",
"function",
"setHotwordRule",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"CustomInfoType_DetectionRule_HotwordRule",
"::",
"class",
")",
";",
"$",
... | Hotword-based detection rule.
Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;</code>
@param \Google\Cloud\Dlp\V2\CustomInfoType\DetectionRule\HotwordRule $var
@return $this | [
"Hotword",
"-",
"based",
"detection",
"rule",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/InspectionRule.php#L56-L62 | train |
googleapis/google-cloud-php | Dlp/src/V2/InspectionRule.php | InspectionRule.setExclusionRule | public function setExclusionRule($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\ExclusionRule::class);
$this->writeOneof(2, $var);
return $this;
} | php | public function setExclusionRule($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\ExclusionRule::class);
$this->writeOneof(2, $var);
return $this;
} | [
"public",
"function",
"setExclusionRule",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"ExclusionRule",
"::",
"class",
")",
";",
"$",
"this",
"->",
"writ... | Exclusion rule.
Generated from protobuf field <code>.google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2;</code>
@param \Google\Cloud\Dlp\V2\ExclusionRule $var
@return $this | [
"Exclusion",
"rule",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/InspectionRule.php#L82-L88 | train |
googleapis/google-cloud-php | Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php | HttpCheck.setAuthInfo | public function setAuthInfo($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_BasicAuthentication::class);
$this->auth_info = $var;
return $this;
} | php | public function setAuthInfo($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_BasicAuthentication::class);
$this->auth_info = $var;
return $this;
} | [
"public",
"function",
"setAuthInfo",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Monitoring",
"\\",
"V3",
"\\",
"UptimeCheckConfig_HttpCheck_BasicAuthentication",
"::",
"class",
")",
"... | The authentication information. Optional when creating an HTTP check;
defaults to empty.
Generated from protobuf field <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
@param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication $var
@return $this | [
"The",
"authentication",
"information",
".",
"Optional",
"when",
"creating",
"an",
"HTTP",
"check",
";",
"defaults",
"to",
"empty",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php#L220-L226 | train |
googleapis/google-cloud-php | Scheduler/src/V1beta1/Job.php | Job.setRetryConfig | public function setRetryConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Scheduler\V1beta1\RetryConfig::class);
$this->retry_config = $var;
return $this;
} | php | public function setRetryConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Scheduler\V1beta1\RetryConfig::class);
$this->retry_config = $var;
return $this;
} | [
"public",
"function",
"setRetryConfig",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Scheduler",
"\\",
"V1beta1",
"\\",
"RetryConfig",
"::",
"class",
")",
";",
"$",
"this",
"->",
... | Settings that determine the retry behavior.
Generated from protobuf field <code>.google.cloud.scheduler.v1beta1.RetryConfig retry_config = 19;</code>
@param \Google\Cloud\Scheduler\V1beta1\RetryConfig $var
@return $this | [
"Settings",
"that",
"determine",
"the",
"retry",
"behavior",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Scheduler/src/V1beta1/Job.php#L648-L654 | train |
googleapis/google-cloud-php | Bigtable/src/ReadModifyWriteRowRules.php | ReadModifyWriteRowRules.append | public function append($familyName, $qualifier, $value)
{
$this->rules[] = (new ReadModifyWriteRule)
->setFamilyName($familyName)
->setColumnQualifier($qualifier)
->setAppendValue($value);
return $this;
} | php | public function append($familyName, $qualifier, $value)
{
$this->rules[] = (new ReadModifyWriteRule)
->setFamilyName($familyName)
->setColumnQualifier($qualifier)
->setAppendValue($value);
return $this;
} | [
"public",
"function",
"append",
"(",
"$",
"familyName",
",",
"$",
"qualifier",
",",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"rules",
"[",
"]",
"=",
"(",
"new",
"ReadModifyWriteRule",
")",
"->",
"setFamilyName",
"(",
"$",
"familyName",
")",
"->",
"se... | Appends the value to the existing value of the cell. If targeted cell is unset,
it will be treated as containing the empty string.
@param string $familyName Family name of the row.
@param string $qualifier Column qualifier of the row.
@param string $value Value of the Column qualifier.
@return ReadModifyWriteRowRules... | [
"Appends",
"the",
"value",
"to",
"the",
"existing",
"value",
"of",
"the",
"cell",
".",
"If",
"targeted",
"cell",
"is",
"unset",
"it",
"will",
"be",
"treated",
"as",
"containing",
"the",
"empty",
"string",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/ReadModifyWriteRowRules.php#L46-L53 | train |
googleapis/google-cloud-php | Bigtable/src/V2/Column.php | Column.setCells | public function setCells($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Cell::class);
$this->cells = $arr;
return $this;
} | php | public function setCells($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Cell::class);
$this->cells = $arr;
return $this;
} | [
"public",
"function",
"setCells",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\",
... | Must not be empty. Sorted in order of decreasing "timestamp_micros".
Generated from protobuf field <code>repeated .google.bigtable.v2.Cell cells = 2;</code>
@param \Google\Cloud\Bigtable\V2\Cell[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Must",
"not",
"be",
"empty",
".",
"Sorted",
"in",
"order",
"of",
"decreasing",
"timestamp_micros",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/V2/Column.php#L109-L115 | train |
googleapis/google-cloud-php | Core/src/RequestWrapper.php | RequestWrapper.sendAsync | public function sendAsync(RequestInterface $request, array $options = [])
{
// Unfortunately, the current ExponentialBackoff implementation doesn't
// play nicely with promises.
$retryAttempt = 0;
$fn = function ($retryAttempt) use (&$fn, $request, $options) {
$asyncHttpH... | php | public function sendAsync(RequestInterface $request, array $options = [])
{
// Unfortunately, the current ExponentialBackoff implementation doesn't
// play nicely with promises.
$retryAttempt = 0;
$fn = function ($retryAttempt) use (&$fn, $request, $options) {
$asyncHttpH... | [
"public",
"function",
"sendAsync",
"(",
"RequestInterface",
"$",
"request",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"// Unfortunately, the current ExponentialBackoff implementation doesn't",
"// play nicely with promises.",
"$",
"retryAttempt",
"=",
"0",
";... | Deliver the request asynchronously.
@param RequestInterface $request A PSR-7 request.
@param array $options [optional] {
Request options.
@type float $requestTimeout Seconds to wait before timing out the
request. **Defaults to** `0`.
@type int $retries Number of retries for a failed request.
**Defaults to** `3`.
@typ... | [
"Deliver",
"the",
"request",
"asynchronously",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/RequestWrapper.php#L238-L269 | train |
googleapis/google-cloud-php | Core/src/RequestWrapper.php | RequestWrapper.applyHeaders | private function applyHeaders(RequestInterface $request)
{
$headers = [
'User-Agent' => 'gcloud-php/' . $this->componentVersion,
'x-goog-api-client' => 'gl-php/' . PHP_VERSION . ' gccl/' . $this->componentVersion,
];
if ($this->shouldSignRequest) {
$heade... | php | private function applyHeaders(RequestInterface $request)
{
$headers = [
'User-Agent' => 'gcloud-php/' . $this->componentVersion,
'x-goog-api-client' => 'gl-php/' . PHP_VERSION . ' gccl/' . $this->componentVersion,
];
if ($this->shouldSignRequest) {
$heade... | [
"private",
"function",
"applyHeaders",
"(",
"RequestInterface",
"$",
"request",
")",
"{",
"$",
"headers",
"=",
"[",
"'User-Agent'",
"=>",
"'gcloud-php/'",
".",
"$",
"this",
"->",
"componentVersion",
",",
"'x-goog-api-client'",
"=>",
"'gl-php/'",
".",
"PHP_VERSION"... | Applies headers to the request.
@param RequestInterface $request A PSR-7 request.
@return RequestInterface | [
"Applies",
"headers",
"to",
"the",
"request",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/RequestWrapper.php#L277-L289 | train |
googleapis/google-cloud-php | Core/src/RequestWrapper.php | RequestWrapper.fetchCredentials | private function fetchCredentials()
{
$backoff = new ExponentialBackoff($this->retries, $this->getRetryFunction());
try {
return $backoff->execute(
[$this->getCredentialsFetcher(), 'fetchAuthToken'],
[$this->authHttpHandler]
);
} catch... | php | private function fetchCredentials()
{
$backoff = new ExponentialBackoff($this->retries, $this->getRetryFunction());
try {
return $backoff->execute(
[$this->getCredentialsFetcher(), 'fetchAuthToken'],
[$this->authHttpHandler]
);
} catch... | [
"private",
"function",
"fetchCredentials",
"(",
")",
"{",
"$",
"backoff",
"=",
"new",
"ExponentialBackoff",
"(",
"$",
"this",
"->",
"retries",
",",
"$",
"this",
"->",
"getRetryFunction",
"(",
")",
")",
";",
"try",
"{",
"return",
"$",
"backoff",
"->",
"ex... | Fetches credentials.
@return array | [
"Fetches",
"credentials",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/RequestWrapper.php#L310-L322 | train |
googleapis/google-cloud-php | Core/src/RequestWrapper.php | RequestWrapper.convertToGoogleException | private function convertToGoogleException(\Exception $ex)
{
switch ($ex->getCode()) {
case 400:
$exception = Exception\BadRequestException::class;
break;
case 404:
$exception = Exception\NotFoundException::class;
break;... | php | private function convertToGoogleException(\Exception $ex)
{
switch ($ex->getCode()) {
case 400:
$exception = Exception\BadRequestException::class;
break;
case 404:
$exception = Exception\NotFoundException::class;
break;... | [
"private",
"function",
"convertToGoogleException",
"(",
"\\",
"Exception",
"$",
"ex",
")",
"{",
"switch",
"(",
"$",
"ex",
"->",
"getCode",
"(",
")",
")",
"{",
"case",
"400",
":",
"$",
"exception",
"=",
"Exception",
"\\",
"BadRequestException",
"::",
"class... | Convert any exception to a Google Exception.
@param \Exception $ex
@return Exception\ServiceException | [
"Convert",
"any",
"exception",
"to",
"a",
"Google",
"Exception",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/RequestWrapper.php#L330-L363 | train |
googleapis/google-cloud-php | Core/src/RequestWrapper.php | RequestWrapper.getExceptionMessage | private function getExceptionMessage(\Exception $ex)
{
if ($ex instanceof RequestException && $ex->hasResponse()) {
return (string) $ex->getResponse()->getBody();
try {
$this->jsonDecode($res);
return $res;
} catch (\InvalidArgumentExcepti... | php | private function getExceptionMessage(\Exception $ex)
{
if ($ex instanceof RequestException && $ex->hasResponse()) {
return (string) $ex->getResponse()->getBody();
try {
$this->jsonDecode($res);
return $res;
} catch (\InvalidArgumentExcepti... | [
"private",
"function",
"getExceptionMessage",
"(",
"\\",
"Exception",
"$",
"ex",
")",
"{",
"if",
"(",
"$",
"ex",
"instanceof",
"RequestException",
"&&",
"$",
"ex",
"->",
"hasResponse",
"(",
")",
")",
"{",
"return",
"(",
"string",
")",
"$",
"ex",
"->",
... | Gets the exception message.
@access private
@param \Exception $ex
@return string | [
"Gets",
"the",
"exception",
"message",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/RequestWrapper.php#L372-L386 | train |
googleapis/google-cloud-php | Core/src/RequestWrapper.php | RequestWrapper.getRequestOptions | private function getRequestOptions(array $options)
{
$restOptions = isset($options['restOptions'])
? $options['restOptions']
: $this->restOptions;
$timeout = isset($options['requestTimeout'])
? $options['requestTimeout']
: $this->requestTimeout;
... | php | private function getRequestOptions(array $options)
{
$restOptions = isset($options['restOptions'])
? $options['restOptions']
: $this->restOptions;
$timeout = isset($options['requestTimeout'])
? $options['requestTimeout']
: $this->requestTimeout;
... | [
"private",
"function",
"getRequestOptions",
"(",
"array",
"$",
"options",
")",
"{",
"$",
"restOptions",
"=",
"isset",
"(",
"$",
"options",
"[",
"'restOptions'",
"]",
")",
"?",
"$",
"options",
"[",
"'restOptions'",
"]",
":",
"$",
"this",
"->",
"restOptions"... | Gets a set of request options.
@param array $options
@return array | [
"Gets",
"a",
"set",
"of",
"request",
"options",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/RequestWrapper.php#L394-L408 | train |
googleapis/google-cloud-php | Core/src/RequestWrapper.php | RequestWrapper.getRetryOptions | private function getRetryOptions(array $options)
{
return [
'retries' => isset($options['retries'])
? $options['retries']
: $this->retries,
'retryFunction' => isset($options['restRetryFunction'])
? $options['restRetryFunction']
... | php | private function getRetryOptions(array $options)
{
return [
'retries' => isset($options['retries'])
? $options['retries']
: $this->retries,
'retryFunction' => isset($options['restRetryFunction'])
? $options['restRetryFunction']
... | [
"private",
"function",
"getRetryOptions",
"(",
"array",
"$",
"options",
")",
"{",
"return",
"[",
"'retries'",
"=>",
"isset",
"(",
"$",
"options",
"[",
"'retries'",
"]",
")",
"?",
"$",
"options",
"[",
"'retries'",
"]",
":",
"$",
"this",
"->",
"retries",
... | Gets a set of retry options.
@param array $options
@return array | [
"Gets",
"a",
"set",
"of",
"retry",
"options",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/RequestWrapper.php#L416-L432 | train |
googleapis/google-cloud-php | Core/src/RequestWrapper.php | RequestWrapper.buildDefaultAsyncHandler | private function buildDefaultAsyncHandler()
{
$isGuzzleHandler = $this->httpHandler instanceof Guzzle6HttpHandler
|| $this->httpHandler instanceof Guzzle5HttpHandler;
return $isGuzzleHandler
? [$this->httpHandler, 'async']
: [HttpHandlerFactory::build(), 'async']... | php | private function buildDefaultAsyncHandler()
{
$isGuzzleHandler = $this->httpHandler instanceof Guzzle6HttpHandler
|| $this->httpHandler instanceof Guzzle5HttpHandler;
return $isGuzzleHandler
? [$this->httpHandler, 'async']
: [HttpHandlerFactory::build(), 'async']... | [
"private",
"function",
"buildDefaultAsyncHandler",
"(",
")",
"{",
"$",
"isGuzzleHandler",
"=",
"$",
"this",
"->",
"httpHandler",
"instanceof",
"Guzzle6HttpHandler",
"||",
"$",
"this",
"->",
"httpHandler",
"instanceof",
"Guzzle5HttpHandler",
";",
"return",
"$",
"isGu... | Builds the default async HTTP handler.
@return callable | [
"Builds",
"the",
"default",
"async",
"HTTP",
"handler",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/RequestWrapper.php#L439-L447 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/StreamingDetectIntentRequest.php | StreamingDetectIntentRequest.setQueryParams | public function setQueryParams($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryParameters::class);
$this->query_params = $var;
return $this;
} | php | public function setQueryParams($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\QueryParameters::class);
$this->query_params = $var;
return $this;
} | [
"public",
"function",
"setQueryParams",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"QueryParameters",
"::",
"class",
")",
";",
"$",
"this",
"->",
... | Optional. The parameters of this query.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.QueryParameters query_params = 2;</code>
@param \Google\Cloud\Dialogflow\V2\QueryParameters $var
@return $this | [
"Optional",
".",
"The",
"parameters",
"of",
"this",
"query",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/StreamingDetectIntentRequest.php#L181-L187 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/StreamingDetectIntentRequest.php | StreamingDetectIntentRequest.setOutputAudioConfig | public function setOutputAudioConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class);
$this->output_audio_config = $var;
return $this;
} | php | public function setOutputAudioConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class);
$this->output_audio_config = $var;
return $this;
} | [
"public",
"function",
"setOutputAudioConfig",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"OutputAudioConfig",
"::",
"class",
")",
";",
"$",
"this",
... | Optional. Instructs the speech synthesizer how to generate the output
audio. If this field is not set and agent-level speech synthesizer is not
configured, no output audio is generated.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.OutputAudioConfig output_audio_config = 5;</code>
@param \Google\Clou... | [
"Optional",
".",
"Instructs",
"the",
"speech",
"synthesizer",
"how",
"to",
"generate",
"the",
"output",
"audio",
".",
"If",
"this",
"field",
"is",
"not",
"set",
"and",
"agent",
"-",
"level",
"speech",
"synthesizer",
"is",
"not",
"configured",
"no",
"output",... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/StreamingDetectIntentRequest.php#L285-L291 | train |
googleapis/google-cloud-php | Iot/src/V1/HttpConfig.php | HttpConfig.setHttpEnabledState | public function setHttpEnabledState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\HttpState::class);
$this->http_enabled_state = $var;
return $this;
} | php | public function setHttpEnabledState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\HttpState::class);
$this->http_enabled_state = $var;
return $this;
} | [
"public",
"function",
"setHttpEnabledState",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Iot",
"\\",
"V1",
"\\",
"HttpState",
"::",
"class",
")",
";",
"$",
"this",
"->",
"http_ena... | If enabled, allows devices to use DeviceService via the HTTP protocol.
Otherwise, any requests to DeviceService will fail for this registry.
Generated from protobuf field <code>.google.cloud.iot.v1.HttpState http_enabled_state = 1;</code>
@param int $var
@return $this | [
"If",
"enabled",
"allows",
"devices",
"to",
"use",
"DeviceService",
"via",
"the",
"HTTP",
"protocol",
".",
"Otherwise",
"any",
"requests",
"to",
"DeviceService",
"will",
"fail",
"for",
"this",
"registry",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Iot/src/V1/HttpConfig.php#L62-L68 | train |
googleapis/google-cloud-php | Datastore/src/Query/GqlQuery.php | GqlQuery.queryObject | public function queryObject()
{
$bindingType = $this->options['bindingType'];
$queryObj = [];
$queryObj['queryString'] = $this->query;
$queryObj['allowLiterals'] = (bool) $this->options['allowLiterals'];
$bindings = $this->mapBindings($bindingType, $this->options['bindings'... | php | public function queryObject()
{
$bindingType = $this->options['bindingType'];
$queryObj = [];
$queryObj['queryString'] = $this->query;
$queryObj['allowLiterals'] = (bool) $this->options['allowLiterals'];
$bindings = $this->mapBindings($bindingType, $this->options['bindings'... | [
"public",
"function",
"queryObject",
"(",
")",
"{",
"$",
"bindingType",
"=",
"$",
"this",
"->",
"options",
"[",
"'bindingType'",
"]",
";",
"$",
"queryObj",
"=",
"[",
"]",
";",
"$",
"queryObj",
"[",
"'queryString'",
"]",
"=",
"$",
"this",
"->",
"query",... | Format the query for use in the API
This method is used internally to run queries and is not intended for use
outside the internal library API
@access private
@return array | [
"Format",
"the",
"query",
"for",
"use",
"in",
"the",
"API"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Query/GqlQuery.php#L160-L174 | train |
googleapis/google-cloud-php | Datastore/src/Query/GqlQuery.php | GqlQuery.mapBindings | private function mapBindings($bindingType, array $bindings)
{
$res = [];
foreach ($bindings as $key => $binding) {
if ($binding instanceof Cursor) {
$value = [
'cursor' => $binding->cursor()
];
} else {
$valu... | php | private function mapBindings($bindingType, array $bindings)
{
$res = [];
foreach ($bindings as $key => $binding) {
if ($binding instanceof Cursor) {
$value = [
'cursor' => $binding->cursor()
];
} else {
$valu... | [
"private",
"function",
"mapBindings",
"(",
"$",
"bindingType",
",",
"array",
"$",
"bindings",
")",
"{",
"$",
"res",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"bindings",
"as",
"$",
"key",
"=>",
"$",
"binding",
")",
"{",
"if",
"(",
"$",
"binding",
"i... | Format bound values for the API
@param string $bindingType Either named or positional bindings.
@param array $bindings The bindings to map
@return array | [
"Format",
"bound",
"values",
"for",
"the",
"API"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Query/GqlQuery.php#L229-L251 | train |
googleapis/google-cloud-php | Datastore/src/Query/GqlQuery.php | GqlQuery.determineBindingType | private function determineBindingType(array $options)
{
if (isset($options['bindings']) && !$this->isAssoc($options['bindings'])) {
return self::BINDING_POSITIONAL;
}
return self::BINDING_NAMED;
} | php | private function determineBindingType(array $options)
{
if (isset($options['bindings']) && !$this->isAssoc($options['bindings'])) {
return self::BINDING_POSITIONAL;
}
return self::BINDING_NAMED;
} | [
"private",
"function",
"determineBindingType",
"(",
"array",
"$",
"options",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"options",
"[",
"'bindings'",
"]",
")",
"&&",
"!",
"$",
"this",
"->",
"isAssoc",
"(",
"$",
"options",
"[",
"'bindings'",
"]",
")",
")",... | Determine whether the query should use named or positional bindings.
@param array $options
@return string | [
"Determine",
"whether",
"the",
"query",
"should",
"use",
"named",
"or",
"positional",
"bindings",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Query/GqlQuery.php#L259-L266 | train |
googleapis/google-cloud-php | Firestore/src/V1beta1/BeginTransactionRequest.php | BeginTransactionRequest.setOptions | public function setOptions($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\TransactionOptions::class);
$this->options = $var;
return $this;
} | php | public function setOptions($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\TransactionOptions::class);
$this->options = $var;
return $this;
} | [
"public",
"function",
"setOptions",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"V1beta1",
"\\",
"TransactionOptions",
"::",
"class",
")",
";",
"$",
"this",
"->... | The options for the transaction.
Defaults to a read-write transaction.
Generated from protobuf field <code>.google.firestore.v1beta1.TransactionOptions options = 2;</code>
@param \Google\Cloud\Firestore\V1beta1\TransactionOptions $var
@return $this | [
"The",
"options",
"for",
"the",
"transaction",
".",
"Defaults",
"to",
"a",
"read",
"-",
"write",
"transaction",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1beta1/BeginTransactionRequest.php#L100-L106 | train |
googleapis/google-cloud-php | CommonProtos/src/DevTools/Source/V1/ExtendedSourceContext.php | ExtendedSourceContext.setContext | public function setContext($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\SourceContext::class);
$this->context = $var;
return $this;
} | php | public function setContext($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\SourceContext::class);
$this->context = $var;
return $this;
} | [
"public",
"function",
"setContext",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"DevTools",
"\\",
"Source",
"\\",
"V1",
"\\",
"SourceContext",
"::",
"class",
")",
";",
"$",
"thi... | Any source context.
Generated from protobuf field <code>.google.devtools.source.v1.SourceContext context = 1;</code>
@param \Google\Cloud\DevTools\Source\V1\SourceContext $var
@return $this | [
"Any",
"source",
"context",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/CommonProtos/src/DevTools/Source/V1/ExtendedSourceContext.php#L67-L73 | train |
googleapis/google-cloud-php | BigQuery/src/QueryJobConfiguration.php | QueryJobConfiguration.parameters | public function parameters(array $parameters)
{
$queryParams = [];
$this->config['configuration']['query']['parameterMode'] = $this->isAssoc($parameters)
? 'named'
: 'positional';
foreach ($parameters as $name => $value) {
$param = $this->mapper->toParame... | php | public function parameters(array $parameters)
{
$queryParams = [];
$this->config['configuration']['query']['parameterMode'] = $this->isAssoc($parameters)
? 'named'
: 'positional';
foreach ($parameters as $name => $value) {
$param = $this->mapper->toParame... | [
"public",
"function",
"parameters",
"(",
"array",
"$",
"parameters",
")",
"{",
"$",
"queryParams",
"=",
"[",
"]",
";",
"$",
"this",
"->",
"config",
"[",
"'configuration'",
"]",
"[",
"'query'",
"]",
"[",
"'parameterMode'",
"]",
"=",
"$",
"this",
"->",
"... | Sets parameters to be used on the query. Only available for standard SQL
queries.
For examples of usage please see
{@see Google\Cloud\BigQuery\BigQueryClient::runQuery()}.
@param array $parameters Parameters to use on the query. When providing
a non-associative array positional parameters (`?`) will be used.
When pro... | [
"Sets",
"parameters",
"to",
"be",
"used",
"on",
"the",
"query",
".",
"Only",
"available",
"for",
"standard",
"SQL",
"queries",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/BigQuery/src/QueryJobConfiguration.php#L270-L290 | train |
googleapis/google-cloud-php | ErrorReporting/src/V1beta1/ErrorContext.php | ErrorContext.setHttpRequest | public function setHttpRequest($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext::class);
$this->http_request = $var;
return $this;
} | php | public function setHttpRequest($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext::class);
$this->http_request = $var;
return $this;
} | [
"public",
"function",
"setHttpRequest",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"ErrorReporting",
"\\",
"V1beta1",
"\\",
"HttpRequestContext",
"::",
"class",
")",
";",
"$",
"thi... | The HTTP request which was processed when the error was
triggered.
Generated from protobuf field <code>.google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1;</code>
@param \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext $var
@return $this | [
"The",
"HTTP",
"request",
"which",
"was",
"processed",
"when",
"the",
"error",
"was",
"triggered",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/ErrorReporting/src/V1beta1/ErrorContext.php#L105-L111 | train |
googleapis/google-cloud-php | ErrorReporting/src/V1beta1/ErrorContext.php | ErrorContext.setReportLocation | public function setReportLocation($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\SourceLocation::class);
$this->report_location = $var;
return $this;
} | php | public function setReportLocation($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\SourceLocation::class);
$this->report_location = $var;
return $this;
} | [
"public",
"function",
"setReportLocation",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"ErrorReporting",
"\\",
"V1beta1",
"\\",
"SourceLocation",
"::",
"class",
")",
";",
"$",
"this... | The location in the source code where the decision was made to
report the error, usually the place where it was logged.
For a logged exception this would be the source line where the
exception is logged, usually close to the place where it was
caught. This value is in contrast to `Exception.cause_location`,
which descr... | [
"The",
"location",
"in",
"the",
"source",
"code",
"where",
"the",
"decision",
"was",
"made",
"to",
"report",
"the",
"error",
"usually",
"the",
"place",
"where",
"it",
"was",
"logged",
".",
"For",
"a",
"logged",
"exception",
"this",
"would",
"be",
"the",
... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/ErrorReporting/src/V1beta1/ErrorContext.php#L181-L187 | train |
googleapis/google-cloud-php | Firestore/src/Admin/V1/Index.php | Index.setQueryScope | public function setQueryScope($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index_QueryScope::class);
$this->query_scope = $var;
return $this;
} | php | public function setQueryScope($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index_QueryScope::class);
$this->query_scope = $var;
return $this;
} | [
"public",
"function",
"setQueryScope",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"Admin",
"\\",
"V1",
"\\",
"Index_QueryScope",
"::",
"class",
")",
";",
"$",
"... | Indexes with a collection query scope specified allow queries
against a collection that is the child of a specific document, specified at
query time, and that has the same collection id.
Indexes with a collection group query scope specified allow queries against
all collections descended from a specific document, speci... | [
"Indexes",
"with",
"a",
"collection",
"query",
"scope",
"specified",
"allow",
"queries",
"against",
"a",
"collection",
"that",
"is",
"the",
"child",
"of",
"a",
"specific",
"document",
"specified",
"at",
"query",
"time",
"and",
"that",
"has",
"the",
"same",
"... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Admin/V1/Index.php#L163-L169 | train |
googleapis/google-cloud-php | Firestore/src/Admin/V1/Index.php | Index.setState | public function setState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index_State::class);
$this->state = $var;
return $this;
} | php | public function setState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index_State::class);
$this->state = $var;
return $this;
} | [
"public",
"function",
"setState",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"Admin",
"\\",
"V1",
"\\",
"Index_State",
"::",
"class",
")",
";",
"$",
"this",
"... | Output only.
The serving state of the index.
Generated from protobuf field <code>.google.firestore.admin.v1.Index.State state = 4;</code>
@param int $var
@return $this | [
"Output",
"only",
".",
"The",
"serving",
"state",
"of",
"the",
"index",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Admin/V1/Index.php#L233-L239 | train |
googleapis/google-cloud-php | Dlp/src/V2/AnalyzeDataSourceRiskDetails/LDiversityResult/LDiversityEquivalenceClass.php | LDiversityEquivalenceClass.setQuasiIdsValues | public function setQuasiIdsValues($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\Value::class);
$this->quasi_ids_values = $arr;
return $this;
} | php | public function setQuasiIdsValues($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\Value::class);
$this->quasi_ids_values = $arr;
return $this;
} | [
"public",
"function",
"setQuasiIdsValues",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
... | Quasi-identifier values defining the k-anonymity equivalence
class. The order is always the same as the original request.
Generated from protobuf field <code>repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1;</code>
@param \Google\Cloud\Dlp\V2\Value[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Quasi",
"-",
"identifier",
"values",
"defining",
"the",
"k",
"-",
"anonymity",
"equivalence",
"class",
".",
"The",
"order",
"is",
"always",
"the",
"same",
"as",
"the",
"original",
"request",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/AnalyzeDataSourceRiskDetails/LDiversityResult/LDiversityEquivalenceClass.php#L86-L92 | train |
googleapis/google-cloud-php | Dlp/src/V2/AnalyzeDataSourceRiskDetails/LDiversityResult/LDiversityEquivalenceClass.php | LDiversityEquivalenceClass.setTopSensitiveValues | public function setTopSensitiveValues($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\ValueFrequency::class);
$this->top_sensitive_values = $arr;
return $this;
} | php | public function setTopSensitiveValues($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\ValueFrequency::class);
$this->top_sensitive_values = $arr;
return $this;
} | [
"public",
"function",
"setTopSensitiveValues",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google... | Estimated frequencies of top sensitive values.
Generated from protobuf field <code>repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4;</code>
@param \Google\Cloud\Dlp\V2\ValueFrequency[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Estimated",
"frequencies",
"of",
"top",
"sensitive",
"values",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/AnalyzeDataSourceRiskDetails/LDiversityResult/LDiversityEquivalenceClass.php#L164-L170 | train |
googleapis/google-cloud-php | Firestore/src/V1beta1/RunQueryRequest.php | RunQueryRequest.setStructuredQuery | public function setStructuredQuery($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\StructuredQuery::class);
$this->writeOneof(2, $var);
return $this;
} | php | public function setStructuredQuery($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\StructuredQuery::class);
$this->writeOneof(2, $var);
return $this;
} | [
"public",
"function",
"setStructuredQuery",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"V1beta1",
"\\",
"StructuredQuery",
"::",
"class",
")",
";",
"$",
"this",
... | A structured query.
Generated from protobuf field <code>.google.firestore.v1beta1.StructuredQuery structured_query = 2;</code>
@param \Google\Cloud\Firestore\V1beta1\StructuredQuery $var
@return $this | [
"A",
"structured",
"query",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1beta1/RunQueryRequest.php#L118-L124 | train |
googleapis/google-cloud-php | Core/src/RestTrait.php | RestTrait.send | public function send($resource, $method, array $options = [], $whitelisted = false)
{
$requestOptions = $this->pluckArray([
'restOptions',
'retries',
'requestTimeout'
], $options);
try {
return json_decode(
$this->requestWrappe... | php | public function send($resource, $method, array $options = [], $whitelisted = false)
{
$requestOptions = $this->pluckArray([
'restOptions',
'retries',
'requestTimeout'
], $options);
try {
return json_decode(
$this->requestWrappe... | [
"public",
"function",
"send",
"(",
"$",
"resource",
",",
"$",
"method",
",",
"array",
"$",
"options",
"=",
"[",
"]",
",",
"$",
"whitelisted",
"=",
"false",
")",
"{",
"$",
"requestOptions",
"=",
"$",
"this",
"->",
"pluckArray",
"(",
"[",
"'restOptions'"... | Delivers a request built from the service definition.
@param string $resource The resource type used for the request.
@param string $method The method used for the request.
@param array $options [optional] Options used to build out the request.
@param array $whitelisted [optional]
@return array | [
"Delivers",
"a",
"request",
"built",
"from",
"the",
"service",
"definition",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/RestTrait.php#L83-L106 | train |
googleapis/google-cloud-php | PubSub/src/Connection/Grpc.php | Grpc.buildSubscription | private function buildSubscription(array &$args, $required = false)
{
$pushConfig = $this->pluck('pushConfig', $args, $required);
$pushConfig = $pushConfig
? $this->buildPushConfig($pushConfig)
: null;
return $this->serializer->decodeMessage(new Subscription(), array... | php | private function buildSubscription(array &$args, $required = false)
{
$pushConfig = $this->pluck('pushConfig', $args, $required);
$pushConfig = $pushConfig
? $this->buildPushConfig($pushConfig)
: null;
return $this->serializer->decodeMessage(new Subscription(), array... | [
"private",
"function",
"buildSubscription",
"(",
"array",
"&",
"$",
"args",
",",
"$",
"required",
"=",
"false",
")",
"{",
"$",
"pushConfig",
"=",
"$",
"this",
"->",
"pluck",
"(",
"'pushConfig'",
",",
"$",
"args",
",",
"$",
"required",
")",
";",
"$",
... | Create a Subscription proto message from an array of arguments.
@param array $args
@param bool $required
@return Subscription | [
"Create",
"a",
"Subscription",
"proto",
"message",
"from",
"an",
"array",
"of",
"arguments",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Connection/Grpc.php#L445-L460 | train |
googleapis/google-cloud-php | Core/src/Batch/JobConfig.php | JobConfig.getJobFromId | public function getJobFromId($identifier)
{
return array_key_exists($identifier, $this->identifierToId)
? $this->jobs[$identifier]
: null;
} | php | public function getJobFromId($identifier)
{
return array_key_exists($identifier, $this->identifierToId)
? $this->jobs[$identifier]
: null;
} | [
"public",
"function",
"getJobFromId",
"(",
"$",
"identifier",
")",
"{",
"return",
"array_key_exists",
"(",
"$",
"identifier",
",",
"$",
"this",
"->",
"identifierToId",
")",
"?",
"$",
"this",
"->",
"jobs",
"[",
"$",
"identifier",
"]",
":",
"null",
";",
"}... | Get the job with the given identifier.
@param string $identifier Unique identifier of the job.
@return JobInterface|null | [
"Get",
"the",
"job",
"with",
"the",
"given",
"identifier",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/Batch/JobConfig.php#L53-L58 | train |
googleapis/google-cloud-php | Core/src/Batch/JobConfig.php | JobConfig.getJobFromIdNum | public function getJobFromIdNum($idNum)
{
return array_key_exists($idNum, $this->idToIdentifier)
? $this->jobs[$this->idToIdentifier[$idNum]]
: null;
} | php | public function getJobFromIdNum($idNum)
{
return array_key_exists($idNum, $this->idToIdentifier)
? $this->jobs[$this->idToIdentifier[$idNum]]
: null;
} | [
"public",
"function",
"getJobFromIdNum",
"(",
"$",
"idNum",
")",
"{",
"return",
"array_key_exists",
"(",
"$",
"idNum",
",",
"$",
"this",
"->",
"idToIdentifier",
")",
"?",
"$",
"this",
"->",
"jobs",
"[",
"$",
"this",
"->",
"idToIdentifier",
"[",
"$",
"idN... | Get the job with the given numeric id.
@param int $idNum A numeric id of the job.
@return JobInterface|null | [
"Get",
"the",
"job",
"with",
"the",
"given",
"numeric",
"id",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/Batch/JobConfig.php#L67-L72 | train |
googleapis/google-cloud-php | Core/src/Batch/JobConfig.php | JobConfig.registerJob | public function registerJob($identifier, $callback)
{
if (array_key_exists($identifier, $this->identifierToId)) {
$idNum = $this->identifierToId[$identifier];
} else {
$idNum = count($this->identifierToId) + 1;
$this->idToIdentifier[$idNum] = $identifier;
... | php | public function registerJob($identifier, $callback)
{
if (array_key_exists($identifier, $this->identifierToId)) {
$idNum = $this->identifierToId[$identifier];
} else {
$idNum = count($this->identifierToId) + 1;
$this->idToIdentifier[$idNum] = $identifier;
... | [
"public",
"function",
"registerJob",
"(",
"$",
"identifier",
",",
"$",
"callback",
")",
"{",
"if",
"(",
"array_key_exists",
"(",
"$",
"identifier",
",",
"$",
"this",
"->",
"identifierToId",
")",
")",
"{",
"$",
"idNum",
"=",
"$",
"this",
"->",
"identifier... | Register a job for executing in batch.
@param string $identifier Unique identifier of the job.
@param callable $callback Callback that accepts the job $idNum
and returns a JobInterface instance.
@return void | [
"Register",
"a",
"job",
"for",
"executing",
"in",
"batch",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/Batch/JobConfig.php#L82-L95 | train |
googleapis/google-cloud-php | Dlp/src/V2/CustomInfoType.php | CustomInfoType.setLikelihood | public function setLikelihood($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2\Likelihood::class);
$this->likelihood = $var;
return $this;
} | php | public function setLikelihood($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2\Likelihood::class);
$this->likelihood = $var;
return $this;
} | [
"public",
"function",
"setLikelihood",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"Likelihood",
"::",
"class",
")",
";",
"$",
"this",
"->",
"likelihood",
... | Likelihood to return for this CustomInfoType. This base value can be
altered by a detection rule if the finding meets the criteria specified by
the rule. Defaults to `VERY_LIKELY` if not specified.
Generated from protobuf field <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
@param int $var
@return $thi... | [
"Likelihood",
"to",
"return",
"for",
"this",
"CustomInfoType",
".",
"This",
"base",
"value",
"can",
"be",
"altered",
"by",
"a",
"detection",
"rule",
"if",
"the",
"finding",
"meets",
"the",
"criteria",
"specified",
"by",
"the",
"rule",
".",
"Defaults",
"to",
... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/CustomInfoType.php#L154-L160 | train |
googleapis/google-cloud-php | Dlp/src/V2/CustomInfoType.php | CustomInfoType.setDictionary | public function setDictionary($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_Dictionary::class);
$this->writeOneof(2, $var);
return $this;
} | php | public function setDictionary($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_Dictionary::class);
$this->writeOneof(2, $var);
return $this;
} | [
"public",
"function",
"setDictionary",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"CustomInfoType_Dictionary",
"::",
"class",
")",
";",
"$",
"this",
"->"... | A list of phrases to detect as a CustomInfoType.
Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
@param \Google\Cloud\Dlp\V2\CustomInfoType\Dictionary $var
@return $this | [
"A",
"list",
"of",
"phrases",
"to",
"detect",
"as",
"a",
"CustomInfoType",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/CustomInfoType.php#L180-L186 | train |
googleapis/google-cloud-php | Dlp/src/V2/CustomInfoType.php | CustomInfoType.setSurrogateType | public function setSurrogateType($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_SurrogateType::class);
$this->writeOneof(4, $var);
return $this;
} | php | public function setSurrogateType($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_SurrogateType::class);
$this->writeOneof(4, $var);
return $this;
} | [
"public",
"function",
"setSurrogateType",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"CustomInfoType_SurrogateType",
"::",
"class",
")",
";",
"$",
"this",
... | Message for detecting output from deidentification transformations that
support reversing.
Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
@param \Google\Cloud\Dlp\V2\CustomInfoType\SurrogateType $var
@return $this | [
"Message",
"for",
"detecting",
"output",
"from",
"deidentification",
"transformations",
"that",
"support",
"reversing",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/CustomInfoType.php#L234-L240 | train |
googleapis/google-cloud-php | Dlp/src/V2/CustomInfoType.php | CustomInfoType.setStoredType | public function setStoredType($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\StoredType::class);
$this->writeOneof(5, $var);
return $this;
} | php | public function setStoredType($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\StoredType::class);
$this->writeOneof(5, $var);
return $this;
} | [
"public",
"function",
"setStoredType",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"StoredType",
"::",
"class",
")",
";",
"$",
"this",
"->",
"writeOneof... | Load an existing `StoredInfoType` resource for use in
`InspectDataSource`. Not currently supported in `InspectContent`.
Generated from protobuf field <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
@param \Google\Cloud\Dlp\V2\StoredType $var
@return $this | [
"Load",
"an",
"existing",
"StoredInfoType",
"resource",
"for",
"use",
"in",
"InspectDataSource",
".",
"Not",
"currently",
"supported",
"in",
"InspectContent",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/CustomInfoType.php#L262-L268 | train |
googleapis/google-cloud-php | Dlp/src/V2/CustomInfoType.php | CustomInfoType.setDetectionRules | public function setDetectionRules($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\CustomInfoType\DetectionRule::class);
$this->detection_rules = $arr;
return $this;
} | php | public function setDetectionRules($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\CustomInfoType\DetectionRule::class);
$this->detection_rules = $arr;
return $this;
} | [
"public",
"function",
"setDetectionRules",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
... | Set of detection rules to apply to all findings of this CustomInfoType.
Rules are applied in order that they are specified. Not supported for the
`surrogate_type` CustomInfoType.
Generated from protobuf field <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;</code>
@param \Google\... | [
"Set",
"of",
"detection",
"rules",
"to",
"apply",
"to",
"all",
"findings",
"of",
"this",
"CustomInfoType",
".",
"Rules",
"are",
"applied",
"in",
"order",
"that",
"they",
"are",
"specified",
".",
"Not",
"supported",
"for",
"the",
"surrogate_type",
"CustomInfoTy... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/CustomInfoType.php#L292-L298 | train |
googleapis/google-cloud-php | Dlp/src/V2/CustomInfoType.php | CustomInfoType.setExclusionType | public function setExclusionType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2\CustomInfoType_ExclusionType::class);
$this->exclusion_type = $var;
return $this;
} | php | public function setExclusionType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2\CustomInfoType_ExclusionType::class);
$this->exclusion_type = $var;
return $this;
} | [
"public",
"function",
"setExclusionType",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"CustomInfoType_ExclusionType",
"::",
"class",
")",
";",
"$",
"this",
"... | If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
to be returned. It still can be used for rules matching.
Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
@param int $var
@return $this | [
"If",
"set",
"to",
"EXCLUSION_TYPE_EXCLUDE",
"this",
"infoType",
"will",
"not",
"cause",
"a",
"finding",
"to",
"be",
"returned",
".",
"It",
"still",
"can",
"be",
"used",
"for",
"rules",
"matching",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/CustomInfoType.php#L320-L326 | train |
googleapis/google-cloud-php | Datastore/src/Connection/Grpc.php | Grpc.prepareQueryBinding | private function prepareQueryBinding(array $binding)
{
$value = $binding['value'];
list ($type, $val) = $this->toGrpcValue($value);
$binding['value'][$type] = $val;
return $binding;
} | php | private function prepareQueryBinding(array $binding)
{
$value = $binding['value'];
list ($type, $val) = $this->toGrpcValue($value);
$binding['value'][$type] = $val;
return $binding;
} | [
"private",
"function",
"prepareQueryBinding",
"(",
"array",
"$",
"binding",
")",
"{",
"$",
"value",
"=",
"$",
"binding",
"[",
"'value'",
"]",
";",
"list",
"(",
"$",
"type",
",",
"$",
"val",
")",
"=",
"$",
"this",
"->",
"toGrpcValue",
"(",
"$",
"value... | Convert a query binding to an API-compatible value.
@param array $binding The input binding data
@return array | [
"Convert",
"a",
"query",
"binding",
"to",
"an",
"API",
"-",
"compatible",
"value",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Connection/Grpc.php#L313-L322 | train |
googleapis/google-cloud-php | Datastore/src/Connection/Grpc.php | Grpc.readOptions | private function readOptions(array $readOptions)
{
if (isset($readOptions['readConsistency'])) {
switch ($readOptions['readConsistency']) {
case 'STRONG':
$readOptions['readConsistency'] = ReadConsistency::STRONG;
break;
ca... | php | private function readOptions(array $readOptions)
{
if (isset($readOptions['readConsistency'])) {
switch ($readOptions['readConsistency']) {
case 'STRONG':
$readOptions['readConsistency'] = ReadConsistency::STRONG;
break;
ca... | [
"private",
"function",
"readOptions",
"(",
"array",
"$",
"readOptions",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"readOptions",
"[",
"'readConsistency'",
"]",
")",
")",
"{",
"switch",
"(",
"$",
"readOptions",
"[",
"'readConsistency'",
"]",
")",
"{",
"case",... | Convert read options into an API-compatible value.
@param array $readOptions The input readOptions data.
@return array | [
"Convert",
"read",
"options",
"into",
"an",
"API",
"-",
"compatible",
"value",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Connection/Grpc.php#L330-L354 | train |
googleapis/google-cloud-php | Datastore/src/Connection/Grpc.php | Grpc.convertFilterProps | private function convertFilterProps(array $filter)
{
if (isset($filter['propertyFilter'])) {
$operator = $filter['propertyFilter']['op'];
$constName = PropertyFilterOperator::class . '::' . $operator;
if (!defined($constName)) {
throw new \InvalidArgument... | php | private function convertFilterProps(array $filter)
{
if (isset($filter['propertyFilter'])) {
$operator = $filter['propertyFilter']['op'];
$constName = PropertyFilterOperator::class . '::' . $operator;
if (!defined($constName)) {
throw new \InvalidArgument... | [
"private",
"function",
"convertFilterProps",
"(",
"array",
"$",
"filter",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"filter",
"[",
"'propertyFilter'",
"]",
")",
")",
"{",
"$",
"operator",
"=",
"$",
"filter",
"[",
"'propertyFilter'",
"]",
"[",
"'op'",
"]",
... | Convert Query filters to an API-compatible value.
@param array $filter The input filter data
@return array | [
"Convert",
"Query",
"filters",
"to",
"an",
"API",
"-",
"compatible",
"value",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Connection/Grpc.php#L362-L384 | train |
googleapis/google-cloud-php | Datastore/src/Connection/Grpc.php | Grpc.toGrpcValue | private function toGrpcValue(array $property)
{
$type = array_keys($property)[0];
$val = $property[$type];
if ($val === null) {
$val = NullValue::NULL_VALUE;
}
if ($type === 'timestampValue') {
$val = $this->formatTimestampForApi($val);
}
... | php | private function toGrpcValue(array $property)
{
$type = array_keys($property)[0];
$val = $property[$type];
if ($val === null) {
$val = NullValue::NULL_VALUE;
}
if ($type === 'timestampValue') {
$val = $this->formatTimestampForApi($val);
}
... | [
"private",
"function",
"toGrpcValue",
"(",
"array",
"$",
"property",
")",
"{",
"$",
"type",
"=",
"array_keys",
"(",
"$",
"property",
")",
"[",
"0",
"]",
";",
"$",
"val",
"=",
"$",
"property",
"[",
"$",
"type",
"]",
";",
"if",
"(",
"$",
"val",
"==... | Convert a property value to a gRPC value.
@param array $property The input property.
@return array | [
"Convert",
"a",
"property",
"value",
"to",
"a",
"gRPC",
"value",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Connection/Grpc.php#L392-L409 | train |
googleapis/google-cloud-php | Dlp/src/V2/ExclusionRule.php | ExclusionRule.setRegex | public function setRegex($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_Regex::class);
$this->writeOneof(2, $var);
return $this;
} | php | public function setRegex($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_Regex::class);
$this->writeOneof(2, $var);
return $this;
} | [
"public",
"function",
"setRegex",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"CustomInfoType_Regex",
"::",
"class",
")",
";",
"$",
"this",
"->",
"write... | Regular expression which defines the rule.
Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 2;</code>
@param \Google\Cloud\Dlp\V2\CustomInfoType\Regex $var
@return $this | [
"Regular",
"expression",
"which",
"defines",
"the",
"rule",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/ExclusionRule.php#L92-L98 | train |
googleapis/google-cloud-php | Dlp/src/V2/ExclusionRule.php | ExclusionRule.setExcludeInfoTypes | public function setExcludeInfoTypes($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\ExcludeInfoTypes::class);
$this->writeOneof(3, $var);
return $this;
} | php | public function setExcludeInfoTypes($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\ExcludeInfoTypes::class);
$this->writeOneof(3, $var);
return $this;
} | [
"public",
"function",
"setExcludeInfoTypes",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"ExcludeInfoTypes",
"::",
"class",
")",
";",
"$",
"this",
"->",
... | Set of infoTypes for which findings would affect this rule.
Generated from protobuf field <code>.google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3;</code>
@param \Google\Cloud\Dlp\V2\ExcludeInfoTypes $var
@return $this | [
"Set",
"of",
"infoTypes",
"for",
"which",
"findings",
"would",
"affect",
"this",
"rule",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/ExclusionRule.php#L118-L124 | train |
googleapis/google-cloud-php | Dlp/src/V2/ExclusionRule.php | ExclusionRule.setMatchingType | public function setMatchingType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2\MatchingType::class);
$this->matching_type = $var;
return $this;
} | php | public function setMatchingType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2\MatchingType::class);
$this->matching_type = $var;
return $this;
} | [
"public",
"function",
"setMatchingType",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"MatchingType",
"::",
"class",
")",
";",
"$",
"this",
"->",
"matching_... | How the rule is applied, see MatchingType documentation for details.
Generated from protobuf field <code>.google.privacy.dlp.v2.MatchingType matching_type = 4;</code>
@param int $var
@return $this | [
"How",
"the",
"rule",
"is",
"applied",
"see",
"MatchingType",
"documentation",
"for",
"details",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/ExclusionRule.php#L144-L150 | train |
googleapis/google-cloud-php | TextToSpeech/src/V1/ListVoicesResponse.php | ListVoicesResponse.setVoices | public function setVoices($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TextToSpeech\V1\Voice::class);
$this->voices = $arr;
return $this;
} | php | public function setVoices($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TextToSpeech\V1\Voice::class);
$this->voices = $arr;
return $this;
} | [
"public",
"function",
"setVoices",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\",
... | The list of voices.
Generated from protobuf field <code>repeated .google.cloud.texttospeech.v1.Voice voices = 1;</code>
@param \Google\Cloud\TextToSpeech\V1\Voice[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"The",
"list",
"of",
"voices",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/TextToSpeech/src/V1/ListVoicesResponse.php#L58-L64 | train |
googleapis/google-cloud-php | Dlp/src/V2/StoredInfoType.php | StoredInfoType.setCurrentVersion | public function setCurrentVersion($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\StoredInfoTypeVersion::class);
$this->current_version = $var;
return $this;
} | php | public function setCurrentVersion($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\StoredInfoTypeVersion::class);
$this->current_version = $var;
return $this;
} | [
"public",
"function",
"setCurrentVersion",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"StoredInfoTypeVersion",
"::",
"class",
")",
";",
"$",
"this",
"->"... | Current version of the stored info type.
Generated from protobuf field <code>.google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2;</code>
@param \Google\Cloud\Dlp\V2\StoredInfoTypeVersion $var
@return $this | [
"Current",
"version",
"of",
"the",
"stored",
"info",
"type",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/StoredInfoType.php#L103-L109 | train |
googleapis/google-cloud-php | Dlp/src/V2/StoredInfoType.php | StoredInfoType.setPendingVersions | public function setPendingVersions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\StoredInfoTypeVersion::class);
$this->pending_versions = $arr;
return $this;
} | php | public function setPendingVersions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\StoredInfoTypeVersion::class);
$this->pending_versions = $arr;
return $this;
} | [
"public",
"function",
"setPendingVersions",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
... | Pending versions of the stored info type. Empty if no versions are
pending.
Generated from protobuf field <code>repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3;</code>
@param \Google\Cloud\Dlp\V2\StoredInfoTypeVersion[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Pending",
"versions",
"of",
"the",
"stored",
"info",
"type",
".",
"Empty",
"if",
"no",
"versions",
"are",
"pending",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/StoredInfoType.php#L131-L137 | train |
googleapis/google-cloud-php | Spanner/src/V1/ListSessionsResponse.php | ListSessionsResponse.setSessions | public function setSessions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Spanner\V1\Session::class);
$this->sessions = $arr;
return $this;
} | php | public function setSessions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Spanner\V1\Session::class);
$this->sessions = $arr;
return $this;
} | [
"public",
"function",
"setSessions",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\",... | The list of requested sessions.
Generated from protobuf field <code>repeated .google.spanner.v1.Session sessions = 1;</code>
@param \Google\Cloud\Spanner\V1\Session[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"The",
"list",
"of",
"requested",
"sessions",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/V1/ListSessionsResponse.php#L70-L76 | train |
googleapis/google-cloud-php | SecurityCenter/src/V1/Asset/SecurityCenterProperties.php | SecurityCenterProperties.setResourceOwners | public function setResourceOwners($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->resource_owners = $arr;
return $this;
} | php | public function setResourceOwners($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->resource_owners = $arr;
return $this;
} | [
"public",
"function",
"setResourceOwners",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"STRING",
")",
";",
"$",
"this"... | Owners of the Google Cloud resource.
Generated from protobuf field <code>repeated string resource_owners = 5;</code>
@param string[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Owners",
"of",
"the",
"Google",
"Cloud",
"resource",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/SecurityCenter/src/V1/Asset/SecurityCenterProperties.php#L223-L229 | train |
googleapis/google-cloud-php | Spanner/src/Admin/Database/V1/ListDatabasesResponse.php | ListDatabasesResponse.setDatabases | public function setDatabases($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Spanner\Admin\Database\V1\Database::class);
$this->databases = $arr;
return $this;
} | php | public function setDatabases($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Spanner\Admin\Database\V1\Database::class);
$this->databases = $arr;
return $this;
} | [
"public",
"function",
"setDatabases",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\"... | Databases that matched the request.
Generated from protobuf field <code>repeated .google.spanner.admin.database.v1.Database databases = 1;</code>
@param \Google\Cloud\Spanner\Admin\Database\V1\Database[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Databases",
"that",
"matched",
"the",
"request",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Admin/Database/V1/ListDatabasesResponse.php#L71-L77 | train |
googleapis/google-cloud-php | Monitoring/src/V3/Gapic/UptimeCheckServiceGapicClient.php | UptimeCheckServiceGapicClient.listUptimeCheckIps | public function listUptimeCheckIps(array $optionalArgs = [])
{
$request = new ListUptimeCheckIpsRequest();
if (isset($optionalArgs['pageSize'])) {
$request->setPageSize($optionalArgs['pageSize']);
}
if (isset($optionalArgs['pageToken'])) {
$request->setPageTok... | php | public function listUptimeCheckIps(array $optionalArgs = [])
{
$request = new ListUptimeCheckIpsRequest();
if (isset($optionalArgs['pageSize'])) {
$request->setPageSize($optionalArgs['pageSize']);
}
if (isset($optionalArgs['pageToken'])) {
$request->setPageTok... | [
"public",
"function",
"listUptimeCheckIps",
"(",
"array",
"$",
"optionalArgs",
"=",
"[",
"]",
")",
"{",
"$",
"request",
"=",
"new",
"ListUptimeCheckIpsRequest",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"optionalArgs",
"[",
"'pageSize'",
"]",
")",
")",
... | Returns the list of IPs that checkers run from.
Sample code:
```
$uptimeCheckServiceClient = new UptimeCheckServiceClient();
try {
// Iterate over pages of elements
$pagedResponse = $uptimeCheckServiceClient->listUptimeCheckIps();
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doS... | [
"Returns",
"the",
"list",
"of",
"IPs",
"that",
"checkers",
"run",
"from",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Monitoring/src/V3/Gapic/UptimeCheckServiceGapicClient.php#L676-L692 | train |
googleapis/google-cloud-php | Talent/src/V4beta1/Gapic/ApplicationServiceGapicClient.php | ApplicationServiceGapicClient.profileName | public static function profileName($project, $tenant, $profile)
{
return self::getProfileNameTemplate()->render([
'project' => $project,
'tenant' => $tenant,
'profile' => $profile,
]);
} | php | public static function profileName($project, $tenant, $profile)
{
return self::getProfileNameTemplate()->render([
'project' => $project,
'tenant' => $tenant,
'profile' => $profile,
]);
} | [
"public",
"static",
"function",
"profileName",
"(",
"$",
"project",
",",
"$",
"tenant",
",",
"$",
"profile",
")",
"{",
"return",
"self",
"::",
"getProfileNameTemplate",
"(",
")",
"->",
"render",
"(",
"[",
"'project'",
"=>",
"$",
"project",
",",
"'tenant'",... | Formats a string containing the fully-qualified path to represent
a profile resource.
@param string $project
@param string $tenant
@param string $profile
@return string The formatted profile resource.
@experimental | [
"Formats",
"a",
"string",
"containing",
"the",
"fully",
"-",
"qualified",
"path",
"to",
"represent",
"a",
"profile",
"resource",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/Gapic/ApplicationServiceGapicClient.php#L168-L175 | train |
googleapis/google-cloud-php | Talent/src/V4beta1/Gapic/ApplicationServiceGapicClient.php | ApplicationServiceGapicClient.applicationName | public static function applicationName($project, $tenant, $profile, $application)
{
return self::getApplicationNameTemplate()->render([
'project' => $project,
'tenant' => $tenant,
'profile' => $profile,
'application' => $application,
]);
} | php | public static function applicationName($project, $tenant, $profile, $application)
{
return self::getApplicationNameTemplate()->render([
'project' => $project,
'tenant' => $tenant,
'profile' => $profile,
'application' => $application,
]);
} | [
"public",
"static",
"function",
"applicationName",
"(",
"$",
"project",
",",
"$",
"tenant",
",",
"$",
"profile",
",",
"$",
"application",
")",
"{",
"return",
"self",
"::",
"getApplicationNameTemplate",
"(",
")",
"->",
"render",
"(",
"[",
"'project'",
"=>",
... | Formats a string containing the fully-qualified path to represent
a application resource.
@param string $project
@param string $tenant
@param string $profile
@param string $application
@return string The formatted application resource.
@experimental | [
"Formats",
"a",
"string",
"containing",
"the",
"fully",
"-",
"qualified",
"path",
"to",
"represent",
"a",
"application",
"resource",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/Gapic/ApplicationServiceGapicClient.php#L189-L197 | train |
googleapis/google-cloud-php | Spanner/src/Instance.php | Instance.reload | public function reload(array $options = [])
{
$this->info = $this->connection->getInstance($options + [
'name' => $this->name,
'projectId' => $this->projectId
]);
return $this->info;
} | php | public function reload(array $options = [])
{
$this->info = $this->connection->getInstance($options + [
'name' => $this->name,
'projectId' => $this->projectId
]);
return $this->info;
} | [
"public",
"function",
"reload",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"info",
"=",
"$",
"this",
"->",
"connection",
"->",
"getInstance",
"(",
"$",
"options",
"+",
"[",
"'name'",
"=>",
"$",
"this",
"->",
"name",
"... | Fetch a fresh representation of the instance from the service.
Example:
```
$info = $instance->reload();
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/spanner/reference/rpc/google.spanner.admin.instance.v1#google.spanner.admin.instance.v1.GetInstanceRequest GetInstanceRequest
@codingStandardsIgnoreEnd... | [
"Fetch",
"a",
"fresh",
"representation",
"of",
"the",
"instance",
"from",
"the",
"service",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Instance.php#L235-L243 | train |
googleapis/google-cloud-php | Spanner/src/Instance.php | Instance.state | public function state(array $options = [])
{
$info = $this->info($options);
return (isset($info['state']))
? $info['state']
: null;
} | php | public function state(array $options = [])
{
$info = $this->info($options);
return (isset($info['state']))
? $info['state']
: null;
} | [
"public",
"function",
"state",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"info",
"=",
"$",
"this",
"->",
"info",
"(",
"$",
"options",
")",
";",
"return",
"(",
"isset",
"(",
"$",
"info",
"[",
"'state'",
"]",
")",
")",
"?",
"$",... | Return the instance state.
When instances are created or updated, they may take some time before
they are ready for use. This method allows for checking whether an
instance is ready.
Example:
```
if ($instance->state() === Instance::STATE_READY) {
echo 'Instance is ready!';
}
```
@param array $options [optional] Con... | [
"Return",
"the",
"instance",
"state",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Instance.php#L308-L315 | train |
googleapis/google-cloud-php | Spanner/src/Instance.php | Instance.update | public function update(array $options = [])
{
$operation = $this->connection->updateInstance([
'name' => $this->name,
] + $options);
return $this->resumeOperation($operation['name'], $operation);
} | php | public function update(array $options = [])
{
$operation = $this->connection->updateInstance([
'name' => $this->name,
] + $options);
return $this->resumeOperation($operation['name'], $operation);
} | [
"public",
"function",
"update",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"operation",
"=",
"$",
"this",
"->",
"connection",
"->",
"updateInstance",
"(",
"[",
"'name'",
"=>",
"$",
"this",
"->",
"name",
",",
"]",
"+",
"$",
"options",... | Update the instance
Example:
```
$instance->update([
'displayName' => 'My Instance',
'nodeCount' => 4
]);
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/spanner/reference/rpc/google.spanner.admin.instance.v1#updateinstancerequest UpdateInstanceRequest
@codingStandardsIgnoreEnd
@param array $options [o... | [
"Update",
"the",
"instance"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Instance.php#L345-L352 | train |
googleapis/google-cloud-php | Spanner/src/Instance.php | Instance.createDatabase | public function createDatabase($name, array $options = [])
{
$instantiation = $this->pluckArray(['sessionPool'], $options);
$database = $this->database($name, $instantiation);
return $database->create($options);
} | php | public function createDatabase($name, array $options = [])
{
$instantiation = $this->pluckArray(['sessionPool'], $options);
$database = $this->database($name, $instantiation);
return $database->create($options);
} | [
"public",
"function",
"createDatabase",
"(",
"$",
"name",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"instantiation",
"=",
"$",
"this",
"->",
"pluckArray",
"(",
"[",
"'sessionPool'",
"]",
",",
"$",
"options",
")",
";",
"$",
"database",... | Create a Database
Example:
```
$operation = $instance->createDatabase('my-database');
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/spanner/reference/rpc/google.spanner.admin.database.v1#createdatabaserequest CreateDatabaseRequest
@codingStandardsIgnoreEnd
@param string $name The database name.
@para... | [
"Create",
"a",
"Database"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Instance.php#L398-L404 | train |
googleapis/google-cloud-php | Spanner/src/Instance.php | Instance.database | public function database($name, array $options = [])
{
return new Database(
$this->connection,
$this,
$this->lroConnection,
$this->lroCallables,
$this->projectId,
$name,
isset($options['sessionPool']) ? $options['sessionPool... | php | public function database($name, array $options = [])
{
return new Database(
$this->connection,
$this,
$this->lroConnection,
$this->lroCallables,
$this->projectId,
$name,
isset($options['sessionPool']) ? $options['sessionPool... | [
"public",
"function",
"database",
"(",
"$",
"name",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"return",
"new",
"Database",
"(",
"$",
"this",
"->",
"connection",
",",
"$",
"this",
",",
"$",
"this",
"->",
"lroConnection",
",",
"$",
"this",... | Lazily instantiate a database object
Example:
```
$database = $instance->database('my-database');
```
@param string $name The database name
@param array $options [optional] {
Configuration options.
@type SessionPoolInterface $sessionPool A pool used to manage
sessions.
}
@return Database | [
"Lazily",
"instantiate",
"a",
"database",
"object"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Instance.php#L423-L435 | train |
googleapis/google-cloud-php | Spanner/src/Instance.php | Instance.databases | public function databases(array $options = [])
{
$resultLimit = $this->pluck('resultLimit', $options, false);
return new ItemIterator(
new PageIterator(
function (array $database) {
return $this->database($database['name']);
},
... | php | public function databases(array $options = [])
{
$resultLimit = $this->pluck('resultLimit', $options, false);
return new ItemIterator(
new PageIterator(
function (array $database) {
return $this->database($database['name']);
},
... | [
"public",
"function",
"databases",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"resultLimit",
"=",
"$",
"this",
"->",
"pluck",
"(",
"'resultLimit'",
",",
"$",
"options",
",",
"false",
")",
";",
"return",
"new",
"ItemIterator",
"(",
"new... | List databases in an instance
Example:
```
$databases = $instance->databases();
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.database.v1#listdatabasesrequest ListDatabasesRequest
@codingStandardsIgnoreEnd
@param array $options [optional] {
Configuratio... | [
"List",
"databases",
"in",
"an",
"instance"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Instance.php#L461-L477 | train |
googleapis/google-cloud-php | Spanner/src/Instance.php | Instance.iam | public function iam()
{
if (!$this->iam) {
$this->iam = new Iam(
new IamInstance($this->connection),
$this->name
);
}
return $this->iam;
} | php | public function iam()
{
if (!$this->iam) {
$this->iam = new Iam(
new IamInstance($this->connection),
$this->name
);
}
return $this->iam;
} | [
"public",
"function",
"iam",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"iam",
")",
"{",
"$",
"this",
"->",
"iam",
"=",
"new",
"Iam",
"(",
"new",
"IamInstance",
"(",
"$",
"this",
"->",
"connection",
")",
",",
"$",
"this",
"->",
"name",
"... | Manage the instance IAM policy
Example:
```
$iam = $instance->iam();
```
@return Iam | [
"Manage",
"the",
"instance",
"IAM",
"policy"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Instance.php#L489-L499 | train |
googleapis/google-cloud-php | WebRisk/src/V1beta1/ComputeThreatListDiffResponse.php | ComputeThreatListDiffResponse.setResponseType | public function setResponseType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse_ResponseType::class);
$this->response_type = $var;
return $this;
} | php | public function setResponseType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse_ResponseType::class);
$this->response_type = $var;
return $this;
} | [
"public",
"function",
"setResponseType",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"WebRisk",
"\\",
"V1beta1",
"\\",
"ComputeThreatListDiffResponse_ResponseType",
"::",
"class",
")",
";"... | The type of response. This may indicate that an action is required by the
client when the response is received.
Generated from protobuf field <code>.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4;</code>
@param int $var
@return $this | [
"The",
"type",
"of",
"response",
".",
"This",
"may",
"indicate",
"that",
"an",
"action",
"is",
"required",
"by",
"the",
"client",
"when",
"the",
"response",
"is",
"received",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/WebRisk/src/V1beta1/ComputeThreatListDiffResponse.php#L114-L120 | train |
googleapis/google-cloud-php | WebRisk/src/V1beta1/ComputeThreatListDiffResponse.php | ComputeThreatListDiffResponse.setAdditions | public function setAdditions($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ThreatEntryAdditions::class);
$this->additions = $var;
return $this;
} | php | public function setAdditions($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ThreatEntryAdditions::class);
$this->additions = $var;
return $this;
} | [
"public",
"function",
"setAdditions",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"WebRisk",
"\\",
"V1beta1",
"\\",
"ThreatEntryAdditions",
"::",
"class",
")",
";",
"$",
"this",
"... | A set of entries to add to a local threat type's list.
Generated from protobuf field <code>.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;</code>
@param \Google\Cloud\WebRisk\V1beta1\ThreatEntryAdditions $var
@return $this | [
"A",
"set",
"of",
"entries",
"to",
"add",
"to",
"a",
"local",
"threat",
"type",
"s",
"list",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/WebRisk/src/V1beta1/ComputeThreatListDiffResponse.php#L140-L146 | train |
googleapis/google-cloud-php | WebRisk/src/V1beta1/ComputeThreatListDiffResponse.php | ComputeThreatListDiffResponse.setRemovals | public function setRemovals($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ThreatEntryRemovals::class);
$this->removals = $var;
return $this;
} | php | public function setRemovals($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ThreatEntryRemovals::class);
$this->removals = $var;
return $this;
} | [
"public",
"function",
"setRemovals",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"WebRisk",
"\\",
"V1beta1",
"\\",
"ThreatEntryRemovals",
"::",
"class",
")",
";",
"$",
"this",
"->... | A set of entries to remove from a local threat type's list.
This field may be empty.
Generated from protobuf field <code>.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;</code>
@param \Google\Cloud\WebRisk\V1beta1\ThreatEntryRemovals $var
@return $this | [
"A",
"set",
"of",
"entries",
"to",
"remove",
"from",
"a",
"local",
"threat",
"type",
"s",
"list",
".",
"This",
"field",
"may",
"be",
"empty",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/WebRisk/src/V1beta1/ComputeThreatListDiffResponse.php#L168-L174 | train |
googleapis/google-cloud-php | WebRisk/src/V1beta1/ComputeThreatListDiffResponse.php | ComputeThreatListDiffResponse.setChecksum | public function setChecksum($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse_Checksum::class);
$this->checksum = $var;
return $this;
} | php | public function setChecksum($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse_Checksum::class);
$this->checksum = $var;
return $this;
} | [
"public",
"function",
"setChecksum",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"WebRisk",
"\\",
"V1beta1",
"\\",
"ComputeThreatListDiffResponse_Checksum",
"::",
"class",
")",
";",
"... | The expected SHA256 hash of the client state; that is, of the sorted list
of all hashes present in the database after applying the provided diff.
If the client state doesn't match the expected state, the client must
disregard this diff and retry later.
Generated from protobuf field <code>.google.cloud.webrisk.v1beta1.... | [
"The",
"expected",
"SHA256",
"hash",
"of",
"the",
"client",
"state",
";",
"that",
"is",
"of",
"the",
"sorted",
"list",
"of",
"all",
"hashes",
"present",
"in",
"the",
"database",
"after",
"applying",
"the",
"provided",
"diff",
".",
"If",
"the",
"client",
... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/WebRisk/src/V1beta1/ComputeThreatListDiffResponse.php#L226-L232 | train |
googleapis/google-cloud-php | Firestore/src/V1/StructuredQuery/Filter.php | Filter.setFieldFilter | public function setFieldFilter($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery_FieldFilter::class);
$this->writeOneof(2, $var);
return $this;
} | php | public function setFieldFilter($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery_FieldFilter::class);
$this->writeOneof(2, $var);
return $this;
} | [
"public",
"function",
"setFieldFilter",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"V1",
"\\",
"StructuredQuery_FieldFilter",
"::",
"class",
")",
";",
"$",
"this... | A filter on a document field.
Generated from protobuf field <code>.google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2;</code>
@param \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $var
@return $this | [
"A",
"filter",
"on",
"a",
"document",
"field",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1/StructuredQuery/Filter.php#L83-L89 | train |
googleapis/google-cloud-php | Firestore/src/V1/StructuredQuery/Filter.php | Filter.setUnaryFilter | public function setUnaryFilter($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery_UnaryFilter::class);
$this->writeOneof(3, $var);
return $this;
} | php | public function setUnaryFilter($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery_UnaryFilter::class);
$this->writeOneof(3, $var);
return $this;
} | [
"public",
"function",
"setUnaryFilter",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"V1",
"\\",
"StructuredQuery_UnaryFilter",
"::",
"class",
")",
";",
"$",
"this... | A filter that takes exactly one argument.
Generated from protobuf field <code>.google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3;</code>
@param \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $var
@return $this | [
"A",
"filter",
"that",
"takes",
"exactly",
"one",
"argument",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1/StructuredQuery/Filter.php#L109-L115 | train |
googleapis/google-cloud-php | Debugger/src/V2/RegisterDebuggeeRequest.php | RegisterDebuggeeRequest.setDebuggee | public function setDebuggee($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Debugger\V2\Debuggee::class);
$this->debuggee = $var;
return $this;
} | php | public function setDebuggee($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Debugger\V2\Debuggee::class);
$this->debuggee = $var;
return $this;
} | [
"public",
"function",
"setDebuggee",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Debugger",
"\\",
"V2",
"\\",
"Debuggee",
"::",
"class",
")",
";",
"$",
"this",
"->",
"debuggee"... | Debuggee information to register.
The fields `project`, `uniquifier`, `description` and `agent_version`
of the debuggee must be set.
Generated from protobuf field <code>.google.devtools.clouddebugger.v2.Debuggee debuggee = 1;</code>
@param \Google\Cloud\Debugger\V2\Debuggee $var
@return $this | [
"Debuggee",
"information",
"to",
"register",
".",
"The",
"fields",
"project",
"uniquifier",
"description",
"and",
"agent_version",
"of",
"the",
"debuggee",
"must",
"be",
"set",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/V2/RegisterDebuggeeRequest.php#L66-L72 | train |
googleapis/google-cloud-php | Debugger/src/VariableTable.php | VariableTable.setOptions | public function setOptions(array $options = [])
{
$options += [
'maxMemberDepth' => self::DEFAULT_MAX_MEMBER_DEPTH,
'maxPayloadSize' => self::DEFAULT_MAX_PAYLOAD_SIZE,
'maxMembers' => self::DEFAULT_MAX_MEMBERS,
'maxValueLength' => self::DEFAULT_MAX_STRING_LENG... | php | public function setOptions(array $options = [])
{
$options += [
'maxMemberDepth' => self::DEFAULT_MAX_MEMBER_DEPTH,
'maxPayloadSize' => self::DEFAULT_MAX_PAYLOAD_SIZE,
'maxMembers' => self::DEFAULT_MAX_MEMBERS,
'maxValueLength' => self::DEFAULT_MAX_STRING_LENG... | [
"public",
"function",
"setOptions",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"+=",
"[",
"'maxMemberDepth'",
"=>",
"self",
"::",
"DEFAULT_MAX_MEMBER_DEPTH",
",",
"'maxPayloadSize'",
"=>",
"self",
"::",
"DEFAULT_MAX_PAYLOAD_SIZE",
","... | Update evaluation options.
@param array $options [optional] {
Configuration options.
@type int $maxMemberDepth Maximum depth of member variables to capture.
**Defaults to** 5.
@type int $maxPayloadSize Maximum amount of space of captured data.
**Defaults to** 32768.
@type int $maxMembers Maximum number of member vari... | [
"Update",
"evaluation",
"options",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/VariableTable.php#L112-L124 | train |
googleapis/google-cloud-php | Debugger/src/VariableTable.php | VariableTable.register | public function register($name, $value, $hash = null)
{
return $this->doRegister($name, $value, 0, $hash);
} | php | public function register($name, $value, $hash = null)
{
return $this->doRegister($name, $value, 0, $hash);
} | [
"public",
"function",
"register",
"(",
"$",
"name",
",",
"$",
"value",
",",
"$",
"hash",
"=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"doRegister",
"(",
"$",
"name",
",",
"$",
"value",
",",
"0",
",",
"$",
"hash",
")",
";",
"}"
] | Register a variable in the VariableTable and return a Variable reference.
The reference should be stored in the correct Breakpoint location.
Example:
```
$variableReference = $variableTable->register('varName', 'some value');
```
@param string $name The name of the variable
@param mixed $value The value of the variab... | [
"Register",
"a",
"variable",
"in",
"the",
"VariableTable",
"and",
"return",
"a",
"Variable",
"reference",
".",
"The",
"reference",
"should",
"be",
"stored",
"in",
"the",
"correct",
"Breakpoint",
"location",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/VariableTable.php#L140-L143 | train |
googleapis/google-cloud-php | Debugger/src/VariableTable.php | VariableTable.bufferFullVariable | public function bufferFullVariable()
{
if (!$this->bufferFullVariableIndex) {
$this->bufferFullVariableIndex = $this->nextIndex++;
$this->variables[] = new Variable('', '', [
'status' => new StatusMessage(
true,
StatusMessage::R... | php | public function bufferFullVariable()
{
if (!$this->bufferFullVariableIndex) {
$this->bufferFullVariableIndex = $this->nextIndex++;
$this->variables[] = new Variable('', '', [
'status' => new StatusMessage(
true,
StatusMessage::R... | [
"public",
"function",
"bufferFullVariable",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"bufferFullVariableIndex",
")",
"{",
"$",
"this",
"->",
"bufferFullVariableIndex",
"=",
"$",
"this",
"->",
"nextIndex",
"++",
";",
"$",
"this",
"->",
"variables",
... | Returns the reference for the buffer full variable.
@return Variable | [
"Returns",
"the",
"reference",
"for",
"the",
"buffer",
"full",
"variable",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/VariableTable.php#L150-L167 | train |
googleapis/google-cloud-php | Speech/src/Operation.php | Operation.results | public function results(array $options = [])
{
$info = $this->info($options);
$results = [];
if (!isset($info['response']['results'])) {
return $results;
}
foreach ($info['response']['results'] as $result) {
$results[] = new Result($result);
... | php | public function results(array $options = [])
{
$info = $this->info($options);
$results = [];
if (!isset($info['response']['results'])) {
return $results;
}
foreach ($info['response']['results'] as $result) {
$results[] = new Result($result);
... | [
"public",
"function",
"results",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"info",
"=",
"$",
"this",
"->",
"info",
"(",
"$",
"options",
")",
";",
"$",
"results",
"=",
"[",
"]",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"info",
... | Retrieves the results of the operation. A network request will be
triggered if no cached data exists.
Example:
```
if ($operation->isComplete()) {
$results = $operation->results();
}
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/speech/reference/rest/v1/speech/recognize#SpeechRecognitionResult SpeechR... | [
"Retrieves",
"the",
"results",
"of",
"the",
"operation",
".",
"A",
"network",
"request",
"will",
"be",
"triggered",
"if",
"no",
"cached",
"data",
"exists",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Speech/src/Operation.php#L115-L129 | train |
googleapis/google-cloud-php | Speech/src/Operation.php | Operation.reload | public function reload(array $options = [])
{
return $this->info = $this->connection->getOperation($options + [
'name' => $this->name
]);
} | php | public function reload(array $options = [])
{
return $this->info = $this->connection->getOperation($options + [
'name' => $this->name
]);
} | [
"public",
"function",
"reload",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"info",
"=",
"$",
"this",
"->",
"connection",
"->",
"getOperation",
"(",
"$",
"options",
"+",
"[",
"'name'",
"=>",
"$",
"this",
"->",
... | Triggers a network request to reload the operation's details.
Example:
```
$operation->reload();
$info = $operation->info();
print_r($info['response']);
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/speech/reference/rest/v1/operations/get Operations get API documentation.
@see https://cloud.google.com... | [
"Triggers",
"a",
"network",
"request",
"to",
"reload",
"the",
"operation",
"s",
"details",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Speech/src/Operation.php#L200-L205 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/QueryInput.php | QueryInput.setAudioConfig | public function setAudioConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\InputAudioConfig::class);
$this->writeOneof(1, $var);
return $this;
} | php | public function setAudioConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\InputAudioConfig::class);
$this->writeOneof(1, $var);
return $this;
} | [
"public",
"function",
"setAudioConfig",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"InputAudioConfig",
"::",
"class",
")",
";",
"$",
"this",
"->",... | Instructs the speech recognizer how to process the speech audio.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.InputAudioConfig audio_config = 1;</code>
@param \Google\Cloud\Dialogflow\V2\InputAudioConfig $var
@return $this | [
"Instructs",
"the",
"speech",
"recognizer",
"how",
"to",
"process",
"the",
"speech",
"audio",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/QueryInput.php#L61-L67 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/QueryInput.php | QueryInput.setText | public function setText($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\TextInput::class);
$this->writeOneof(2, $var);
return $this;
} | php | public function setText($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\TextInput::class);
$this->writeOneof(2, $var);
return $this;
} | [
"public",
"function",
"setText",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"TextInput",
"::",
"class",
")",
";",
"$",
"this",
"->",
"writeOneof... | The natural language text to be processed.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.TextInput text = 2;</code>
@param \Google\Cloud\Dialogflow\V2\TextInput $var
@return $this | [
"The",
"natural",
"language",
"text",
"to",
"be",
"processed",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/QueryInput.php#L87-L93 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/QueryInput.php | QueryInput.setEvent | public function setEvent($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EventInput::class);
$this->writeOneof(3, $var);
return $this;
} | php | public function setEvent($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EventInput::class);
$this->writeOneof(3, $var);
return $this;
} | [
"public",
"function",
"setEvent",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"EventInput",
"::",
"class",
")",
";",
"$",
"this",
"->",
"writeOne... | The event to be processed.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.EventInput event = 3;</code>
@param \Google\Cloud\Dialogflow\V2\EventInput $var
@return $this | [
"The",
"event",
"to",
"be",
"processed",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/QueryInput.php#L113-L119 | train |
googleapis/google-cloud-php | Vision/src/V1/TextAnnotation.php | TextAnnotation.setPages | public function setPages($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Page::class);
$this->pages = $arr;
return $this;
} | php | public function setPages($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Page::class);
$this->pages = $arr;
return $this;
} | [
"public",
"function",
"setPages",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\",
... | List of pages detected by OCR.
Generated from protobuf field <code>repeated .google.cloud.vision.v1.Page pages = 1;</code>
@param \Google\Cloud\Vision\V1\Page[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"List",
"of",
"pages",
"detected",
"by",
"OCR",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/TextAnnotation.php#L73-L79 | train |
googleapis/google-cloud-php | Container/src/V1/ListOperationsResponse.php | ListOperationsResponse.setOperations | public function setOperations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Container\V1\Operation::class);
$this->operations = $arr;
return $this;
} | php | public function setOperations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Container\V1\Operation::class);
$this->operations = $arr;
return $this;
} | [
"public",
"function",
"setOperations",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\... | A list of operations in the project in the specified zone.
Generated from protobuf field <code>repeated .google.container.v1.Operation operations = 1;</code>
@param \Google\Cloud\Container\V1\Operation[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"A",
"list",
"of",
"operations",
"in",
"the",
"project",
"in",
"the",
"specified",
"zone",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/ListOperationsResponse.php#L68-L74 | train |
googleapis/google-cloud-php | Container/src/V1/ListOperationsResponse.php | ListOperationsResponse.setMissingZones | public function setMissingZones($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->missing_zones = $arr;
return $this;
} | php | public function setMissingZones($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->missing_zones = $arr;
return $this;
} | [
"public",
"function",
"setMissingZones",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"STRING",
")",
";",
"$",
"this",
... | If any zones are listed here, the list of operations returned
may be missing the operations from those zones.
Generated from protobuf field <code>repeated string missing_zones = 2;</code>
@param string[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"If",
"any",
"zones",
"are",
"listed",
"here",
"the",
"list",
"of",
"operations",
"returned",
"may",
"be",
"missing",
"the",
"operations",
"from",
"those",
"zones",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/ListOperationsResponse.php#L96-L102 | train |
googleapis/google-cloud-php | Dataproc/src/V1/WorkflowTemplatePlacement.php | WorkflowTemplatePlacement.setManagedCluster | public function setManagedCluster($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ManagedCluster::class);
$this->writeOneof(1, $var);
return $this;
} | php | public function setManagedCluster($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ManagedCluster::class);
$this->writeOneof(1, $var);
return $this;
} | [
"public",
"function",
"setManagedCluster",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dataproc",
"\\",
"V1",
"\\",
"ManagedCluster",
"::",
"class",
")",
";",
"$",
"this",
"->",
... | Optional. A cluster that is managed by the workflow.
Generated from protobuf field <code>.google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1;</code>
@param \Google\Cloud\Dataproc\V1\ManagedCluster $var
@return $this | [
"Optional",
".",
"A",
"cluster",
"that",
"is",
"managed",
"by",
"the",
"workflow",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1/WorkflowTemplatePlacement.php#L58-L64 | train |
googleapis/google-cloud-php | Dataproc/src/V1/WorkflowTemplatePlacement.php | WorkflowTemplatePlacement.setClusterSelector | public function setClusterSelector($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ClusterSelector::class);
$this->writeOneof(2, $var);
return $this;
} | php | public function setClusterSelector($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ClusterSelector::class);
$this->writeOneof(2, $var);
return $this;
} | [
"public",
"function",
"setClusterSelector",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dataproc",
"\\",
"V1",
"\\",
"ClusterSelector",
"::",
"class",
")",
";",
"$",
"this",
"->"... | Optional. A selector that chooses target cluster for jobs based
on metadata.
The selector is evaluated at the time each job is submitted.
Generated from protobuf field <code>.google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2;</code>
@param \Google\Cloud\Dataproc\V1\ClusterSelector $var
@return $this | [
"Optional",
".",
"A",
"selector",
"that",
"chooses",
"target",
"cluster",
"for",
"jobs",
"based",
"on",
"metadata",
".",
"The",
"selector",
"is",
"evaluated",
"at",
"the",
"time",
"each",
"job",
"is",
"submitted",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1/WorkflowTemplatePlacement.php#L88-L94 | train |
googleapis/google-cloud-php | Firestore/src/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php | IndexConfigDelta.setChangeType | public function setChangeType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_IndexConfigDelta_ChangeType::class);
$this->change_type = $var;
return $this;
} | php | public function setChangeType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_IndexConfigDelta_ChangeType::class);
$this->change_type = $var;
return $this;
} | [
"public",
"function",
"setChangeType",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"Admin",
"\\",
"V1",
"\\",
"FieldOperationMetadata_IndexConfigDelta_ChangeType",
"::",
... | Specifies how the index is changing.
Generated from protobuf field <code>.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1;</code>
@param int $var
@return $this | [
"Specifies",
"how",
"the",
"index",
"is",
"changing",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php#L66-L72 | train |
googleapis/google-cloud-php | PubSub/src/V1/Subscription.php | Subscription.setPushConfig | public function setPushConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\PushConfig::class);
$this->push_config = $var;
return $this;
} | php | public function setPushConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\PushConfig::class);
$this->push_config = $var;
return $this;
} | [
"public",
"function",
"setPushConfig",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"PubSub",
"\\",
"V1",
"\\",
"PushConfig",
"::",
"class",
")",
";",
"$",
"this",
"->",
"push_co... | If push delivery is used with this subscription, this field is
used to configure it. An empty `pushConfig` signifies that the subscriber
will pull and ack messages using API methods.
Generated from protobuf field <code>.google.pubsub.v1.PushConfig push_config = 4;</code>
@param \Google\Cloud\PubSub\V1\PushConfig $var
... | [
"If",
"push",
"delivery",
"is",
"used",
"with",
"this",
"subscription",
"this",
"field",
"is",
"used",
"to",
"configure",
"it",
".",
"An",
"empty",
"pushConfig",
"signifies",
"that",
"the",
"subscriber",
"will",
"pull",
"and",
"ack",
"messages",
"using",
"AP... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/V1/Subscription.php#L292-L298 | train |
googleapis/google-cloud-php | Container/src/V1/ListNodePoolsResponse.php | ListNodePoolsResponse.setNodePools | public function setNodePools($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Container\V1\NodePool::class);
$this->node_pools = $arr;
return $this;
} | php | public function setNodePools($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Container\V1\NodePool::class);
$this->node_pools = $arr;
return $this;
} | [
"public",
"function",
"setNodePools",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\"... | A list of node pools for a cluster.
Generated from protobuf field <code>repeated .google.container.v1.NodePool node_pools = 1;</code>
@param \Google\Cloud\Container\V1\NodePool[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"A",
"list",
"of",
"node",
"pools",
"for",
"a",
"cluster",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/ListNodePoolsResponse.php#L58-L64 | train |
googleapis/google-cloud-php | Core/src/Compute/Metadata.php | Metadata.getProjectId | public function getProjectId()
{
if (!isset($this->projectId)) {
$this->projectId = $this->get('project/project-id');
}
return $this->projectId;
} | php | public function getProjectId()
{
if (!isset($this->projectId)) {
$this->projectId = $this->get('project/project-id');
}
return $this->projectId;
} | [
"public",
"function",
"getProjectId",
"(",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"projectId",
")",
")",
"{",
"$",
"this",
"->",
"projectId",
"=",
"$",
"this",
"->",
"get",
"(",
"'project/project-id'",
")",
";",
"}",
"return",
"$"... | Detect and return the project ID
Example:
```
$projectId = $metadata->getProjectId();
```
@return string | [
"Detect",
"and",
"return",
"the",
"project",
"ID"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/Compute/Metadata.php#L105-L112 | train |
googleapis/google-cloud-php | Core/src/Compute/Metadata.php | Metadata.getNumericProjectId | public function getNumericProjectId()
{
if (!isset($this->numericProjectId)) {
$this->numericProjectId = $this->get('project/numeric-project-id');
}
return $this->numericProjectId;
} | php | public function getNumericProjectId()
{
if (!isset($this->numericProjectId)) {
$this->numericProjectId = $this->get('project/numeric-project-id');
}
return $this->numericProjectId;
} | [
"public",
"function",
"getNumericProjectId",
"(",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"numericProjectId",
")",
")",
"{",
"$",
"this",
"->",
"numericProjectId",
"=",
"$",
"this",
"->",
"get",
"(",
"'project/numeric-project-id'",
")",
... | Detect and return the numeric project ID
Example:
```
$projectId = $metadata->getNumericProjectId();
```
@return string | [
"Detect",
"and",
"return",
"the",
"numeric",
"project",
"ID"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/Compute/Metadata.php#L124-L131 | train |
googleapis/google-cloud-php | Firestore/src/Admin/V1/Index/IndexField.php | IndexField.setArrayConfig | public function setArrayConfig($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index_IndexField_ArrayConfig::class);
$this->writeOneof(3, $var);
return $this;
} | php | public function setArrayConfig($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index_IndexField_ArrayConfig::class);
$this->writeOneof(3, $var);
return $this;
} | [
"public",
"function",
"setArrayConfig",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"Admin",
"\\",
"V1",
"\\",
"Index_IndexField_ArrayConfig",
"::",
"class",
")",
";... | Indicates that this field supports operations on `array_value`s.
Generated from protobuf field <code>.google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;</code>
@param int $var
@return $this | [
"Indicates",
"that",
"this",
"field",
"supports",
"operations",
"on",
"array_value",
"s",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Admin/V1/Index/IndexField.php#L128-L134 | train |
googleapis/google-cloud-php | BigQueryDataTransfer/src/V1/TransferRun.php | TransferRun.setState | public function setState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferState::class);
$this->state = $var;
return $this;
} | php | public function setState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferState::class);
$this->state = $var;
return $this;
} | [
"public",
"function",
"setState",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"BigQuery",
"\\",
"DataTransfer",
"\\",
"V1",
"\\",
"TransferState",
"::",
"class",
")",
";",
"$",
"th... | Data transfer run state. Ignored for input requests.
Generated from protobuf field <code>.google.cloud.bigquery.datatransfer.v1.TransferState state = 8;</code>
@param int $var
@return $this | [
"Data",
"transfer",
"run",
"state",
".",
"Ignored",
"for",
"input",
"requests",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/BigQueryDataTransfer/src/V1/TransferRun.php#L454-L460 | train |
googleapis/google-cloud-php | dev/src/ComponentVersionTrait.php | ComponentVersionTrait.addToComponentManifest | private function addToComponentManifest($version, array $component)
{
$manifest = $this->getManifest($this->manifest());
$index = $this->getManifestComponentModuleIndex($manifest, $component['id']);
array_unshift($manifest['modules'][$index]['versions'], 'v'. $version);
$content = ... | php | private function addToComponentManifest($version, array $component)
{
$manifest = $this->getManifest($this->manifest());
$index = $this->getManifestComponentModuleIndex($manifest, $component['id']);
array_unshift($manifest['modules'][$index]['versions'], 'v'. $version);
$content = ... | [
"private",
"function",
"addToComponentManifest",
"(",
"$",
"version",
",",
"array",
"$",
"component",
")",
"{",
"$",
"manifest",
"=",
"$",
"this",
"->",
"getManifest",
"(",
"$",
"this",
"->",
"manifest",
"(",
")",
")",
";",
"$",
"index",
"=",
"$",
"thi... | Add a new component version to the manifest.
@param string $version The new version. (do not prefix with `v`).
@param array $component The component data, as an array.
@return void | [
"Add",
"a",
"new",
"component",
"version",
"to",
"the",
"manifest",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/dev/src/ComponentVersionTrait.php#L21-L35 | train |
googleapis/google-cloud-php | dev/src/ComponentVersionTrait.php | ComponentVersionTrait.updateComponentVersionConstant | private function updateComponentVersionConstant($version, $componentPath, $componentEntry)
{
if (is_null($componentEntry)) {
return false;
}
$path = $this->rootPath() .'/'. $componentPath .'/'. $componentEntry;
if (!file_exists($path)) {
throw new \RuntimeExc... | php | private function updateComponentVersionConstant($version, $componentPath, $componentEntry)
{
if (is_null($componentEntry)) {
return false;
}
$path = $this->rootPath() .'/'. $componentPath .'/'. $componentEntry;
if (!file_exists($path)) {
throw new \RuntimeExc... | [
"private",
"function",
"updateComponentVersionConstant",
"(",
"$",
"version",
",",
"$",
"componentPath",
",",
"$",
"componentEntry",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"componentEntry",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"path",
"=",
"... | Update the VERSION constant in a veneer entry file.
@param string $version The new version. (do not prefix with `v`).
@param string $componentPath The path to the component, relative to the root of the project.
@param string $componentEntry The name of the entry file to modify (i.e. FooClient.php).
@return bool | [
"Update",
"the",
"VERSION",
"constant",
"in",
"a",
"veneer",
"entry",
"file",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/dev/src/ComponentVersionTrait.php#L45-L72 | train |
googleapis/google-cloud-php | dev/src/ComponentVersionTrait.php | ComponentVersionTrait.updateComponentVersionFile | private function updateComponentVersionFile($version, array $component)
{
$path = $this->rootPath() .'/'. $component['path'] .'/VERSION';
$result = file_put_contents($path, $version);
if (!$result) {
throw new \RuntimeException('File write failed');
}
return tru... | php | private function updateComponentVersionFile($version, array $component)
{
$path = $this->rootPath() .'/'. $component['path'] .'/VERSION';
$result = file_put_contents($path, $version);
if (!$result) {
throw new \RuntimeException('File write failed');
}
return tru... | [
"private",
"function",
"updateComponentVersionFile",
"(",
"$",
"version",
",",
"array",
"$",
"component",
")",
"{",
"$",
"path",
"=",
"$",
"this",
"->",
"rootPath",
"(",
")",
".",
"'/'",
".",
"$",
"component",
"[",
"'path'",
"]",
".",
"'/VERSION'",
";",
... | Update the VERSION file in a component directory.
@param string $version The new version. (do not prefix with `v`).
@param array $component The component data as an array.
@return bool | [
"Update",
"the",
"VERSION",
"file",
"in",
"a",
"component",
"directory",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/dev/src/ComponentVersionTrait.php#L81-L91 | train |
googleapis/google-cloud-php | dev/src/ComponentVersionTrait.php | ComponentVersionTrait.updateComposerReplacesVersion | private function updateComposerReplacesVersion($version, array $component)
{
$composer = $this->rootPath() .'/composer.json';
if (!file_exists($composer)) {
throw new \Exception('Invalid composer.json path');
}
$data = json_decode(file_get_contents($composer), true);
... | php | private function updateComposerReplacesVersion($version, array $component)
{
$composer = $this->rootPath() .'/composer.json';
if (!file_exists($composer)) {
throw new \Exception('Invalid composer.json path');
}
$data = json_decode(file_get_contents($composer), true);
... | [
"private",
"function",
"updateComposerReplacesVersion",
"(",
"$",
"version",
",",
"array",
"$",
"component",
")",
"{",
"$",
"composer",
"=",
"$",
"this",
"->",
"rootPath",
"(",
")",
".",
"'/composer.json'",
";",
"if",
"(",
"!",
"file_exists",
"(",
"$",
"co... | Update the `replaces` version in the main composer.json file.
@param string $version The new version. (do not prefix with `v`).
@param array $component The component data as an array.
@return void | [
"Update",
"the",
"replaces",
"version",
"in",
"the",
"main",
"composer",
".",
"json",
"file",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/dev/src/ComponentVersionTrait.php#L100-L112 | train |
googleapis/google-cloud-php | Spanner/src/KeyRange.php | KeyRange.setStart | public function setStart($type, array $start)
{
$rangeKey = $this->fromDefinition($type, 'start');
$this->startType = $rangeKey;
$this->start = $start;
} | php | public function setStart($type, array $start)
{
$rangeKey = $this->fromDefinition($type, 'start');
$this->startType = $rangeKey;
$this->start = $start;
} | [
"public",
"function",
"setStart",
"(",
"$",
"type",
",",
"array",
"$",
"start",
")",
"{",
"$",
"rangeKey",
"=",
"$",
"this",
"->",
"fromDefinition",
"(",
"$",
"type",
",",
"'start'",
")",
";",
"$",
"this",
"->",
"startType",
"=",
"$",
"rangeKey",
";"... | Set the range start.
Example:
```
$range->setStart(KeyRange::TYPE_OPEN, ['Bob']);
```
@param string $type Either "open" or "closed". Use constants
`KeyRange::TYPE_OPEN` and `KeyRange::TYPE_CLOSED` for guaranteed
correctness.
@param array $start The start of the key range.
@return void | [
"Set",
"the",
"range",
"start",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/KeyRange.php#L172-L178 | train |
googleapis/google-cloud-php | Spanner/src/KeyRange.php | KeyRange.setEnd | public function setEnd($type, array $end)
{
if (!in_array($type, array_keys($this->definition))) {
throw new \InvalidArgumentException(sprintf(
'Invalid KeyRange type. Allowed values are %s',
implode(', ', array_keys($this->definition))
));
}
... | php | public function setEnd($type, array $end)
{
if (!in_array($type, array_keys($this->definition))) {
throw new \InvalidArgumentException(sprintf(
'Invalid KeyRange type. Allowed values are %s',
implode(', ', array_keys($this->definition))
));
}
... | [
"public",
"function",
"setEnd",
"(",
"$",
"type",
",",
"array",
"$",
"end",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"type",
",",
"array_keys",
"(",
"$",
"this",
"->",
"definition",
")",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentExc... | Set the range end.
Example:
```
$range->setEnd(KeyRange::TYPE_CLOSED, ['Jill']);
```
@param string $type Either "open" or "closed". Use constants
`KeyRange::TYPE_OPEN` and `KeyRange::TYPE_CLOSED` for guaranteed
correctness.
@param array $end The end of the key range.
@return void | [
"Set",
"the",
"range",
"end",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/KeyRange.php#L209-L222 | train |
googleapis/google-cloud-php | Spanner/src/KeyRange.php | KeyRange.keyRangeObject | public function keyRangeObject()
{
if (!$this->start || !$this->end) {
throw new \BadMethodCallException('Key Range must supply a start and an end');
}
return [
$this->startType => $this->start,
$this->endType => $this->end
];
} | php | public function keyRangeObject()
{
if (!$this->start || !$this->end) {
throw new \BadMethodCallException('Key Range must supply a start and an end');
}
return [
$this->startType => $this->start,
$this->endType => $this->end
];
} | [
"public",
"function",
"keyRangeObject",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"start",
"||",
"!",
"$",
"this",
"->",
"end",
")",
"{",
"throw",
"new",
"\\",
"BadMethodCallException",
"(",
"'Key Range must supply a start and an end'",
")",
";",
"}"... | Returns an API-compliant representation of a KeyRange.
@return array
@access private | [
"Returns",
"an",
"API",
"-",
"compliant",
"representation",
"of",
"a",
"KeyRange",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/KeyRange.php#L248-L258 | train |
googleapis/google-cloud-php | Spanner/src/KeyRange.php | KeyRange.fromDefinition | private function fromDefinition($type, $startOrEnd)
{
if (!array_key_exists($type, $this->definition)) {
throw new \InvalidArgumentException(sprintf(
'Invalid KeyRange %s type. Allowed values are %s.',
$startOrEnd,
implode(', ', array_keys($this->d... | php | private function fromDefinition($type, $startOrEnd)
{
if (!array_key_exists($type, $this->definition)) {
throw new \InvalidArgumentException(sprintf(
'Invalid KeyRange %s type. Allowed values are %s.',
$startOrEnd,
implode(', ', array_keys($this->d... | [
"private",
"function",
"fromDefinition",
"(",
"$",
"type",
",",
"$",
"startOrEnd",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"type",
",",
"$",
"this",
"->",
"definition",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
... | Normalizes key range values.
@param string $type The range type.
@param mixed $startOrEnd
@return array | [
"Normalizes",
"key",
"range",
"values",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/KeyRange.php#L304-L315 | train |
googleapis/google-cloud-php | Language/src/LanguageClient.php | LanguageClient.analyzeSentiment | public function analyzeSentiment($content, array $options = [])
{
return new Annotation(
$this->connection->analyzeSentiment(
$this->formatRequest($content, $options)
)
);
} | php | public function analyzeSentiment($content, array $options = [])
{
return new Annotation(
$this->connection->analyzeSentiment(
$this->formatRequest($content, $options)
)
);
} | [
"public",
"function",
"analyzeSentiment",
"(",
"$",
"content",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"return",
"new",
"Annotation",
"(",
"$",
"this",
"->",
"connection",
"->",
"analyzeSentiment",
"(",
"$",
"this",
"->",
"formatRequest",
"(... | Analyzes the sentiment of the provided document.
Example:
```
$annotation = $language->analyzeSentiment('Google Cloud Platform is a powerful tool.');
$sentiment = $annotation->sentiment();
if ($sentiment['score'] > 0) {
echo 'This is a positive message.';
}
```
@codingStandardsIgnoreStart
@see https://cloud.google.c... | [
"Analyzes",
"the",
"sentiment",
"of",
"the",
"provided",
"document",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Language/src/LanguageClient.php#L218-L225 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.