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 | Dataproc/src/V1beta2/InstanceGroupConfig.php | InstanceGroupConfig.setManagedGroupConfig | public function setManagedGroupConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\ManagedGroupConfig::class);
$this->managed_group_config = $var;
return $this;
} | php | public function setManagedGroupConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\ManagedGroupConfig::class);
$this->managed_group_config = $var;
return $this;
} | [
"public",
"function",
"setManagedGroupConfig",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dataproc",
"\\",
"V1beta2",
"\\",
"ManagedGroupConfig",
"::",
"class",
")",
";",
"$",
"th... | Output only. The config for Compute Engine Instance Group
Manager that manages this group.
This is only used for preemptible instance groups.
Generated from protobuf field <code>.google.cloud.dataproc.v1beta2.ManagedGroupConfig managed_group_config = 7;</code>
@param \Google\Cloud\Dataproc\V1beta2\ManagedGroupConfig $... | [
"Output",
"only",
".",
"The",
"config",
"for",
"Compute",
"Engine",
"Instance",
"Group",
"Manager",
"that",
"manages",
"this",
"group",
".",
"This",
"is",
"only",
"used",
"for",
"preemptible",
"instance",
"groups",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1beta2/InstanceGroupConfig.php#L353-L359 | train |
googleapis/google-cloud-php | SecurityCenter/src/V1/UpdateFindingRequest.php | UpdateFindingRequest.setFinding | public function setFinding($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Finding::class);
$this->finding = $var;
return $this;
} | php | public function setFinding($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Finding::class);
$this->finding = $var;
return $this;
} | [
"public",
"function",
"setFinding",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"SecurityCenter",
"\\",
"V1",
"\\",
"Finding",
"::",
"class",
")",
";",
"$",
"this",
"->",
"findi... | The finding resource to update or create if it does not already exist.
parent, security_marks, and update_time will be ignored.
In the case of creation, the finding id portion of the name must be
alphanumeric and less than or equal to 32 characters and greater than 0
characters in length.
Generated from protobuf field... | [
"The",
"finding",
"resource",
"to",
"update",
"or",
"create",
"if",
"it",
"does",
"not",
"already",
"exist",
".",
"parent",
"security_marks",
"and",
"update_time",
"will",
"be",
"ignored",
".",
"In",
"the",
"case",
"of",
"creation",
"the",
"finding",
"id",
... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/SecurityCenter/src/V1/UpdateFindingRequest.php#L92-L98 | train |
googleapis/google-cloud-php | Bigtable/src/Admin/V2/ListSnapshotsResponse.php | ListSnapshotsResponse.setSnapshots | public function setSnapshots($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Snapshot::class);
$this->snapshots = $arr;
return $this;
} | php | public function setSnapshots($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Snapshot::class);
$this->snapshots = $arr;
return $this;
} | [
"public",
"function",
"setSnapshots",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\"... | The snapshots present in the requested cluster.
Generated from protobuf field <code>repeated .google.bigtable.admin.v2.Snapshot snapshots = 1;</code>
@param \Google\Cloud\Bigtable\Admin\V2\Snapshot[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"The",
"snapshots",
"present",
"in",
"the",
"requested",
"cluster",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/Admin/V2/ListSnapshotsResponse.php#L75-L81 | train |
googleapis/google-cloud-php | OsLogin/src/V1beta/LoginProfile.php | LoginProfile.setPosixAccounts | public function setPosixAccounts($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsLogin\Common\PosixAccount::class);
$this->posix_accounts = $arr;
return $this;
} | php | public function setPosixAccounts($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsLogin\Common\PosixAccount::class);
$this->posix_accounts = $arr;
return $this;
} | [
"public",
"function",
"setPosixAccounts",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
... | The list of POSIX accounts associated with the user.
Generated from protobuf field <code>repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;</code>
@param \Google\Cloud\OsLogin\Common\PosixAccount[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"The",
"list",
"of",
"POSIX",
"accounts",
"associated",
"with",
"the",
"user",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/OsLogin/src/V1beta/LoginProfile.php#L111-L117 | train |
googleapis/google-cloud-php | OsLogin/src/V1beta/LoginProfile.php | LoginProfile.setSshPublicKeys | public function setSshPublicKeys($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsLogin\Common\SshPublicKey::class);
$this->ssh_public_keys = $arr;
return $this;
} | php | public function setSshPublicKeys($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsLogin\Common\SshPublicKey::class);
$this->ssh_public_keys = $arr;
return $this;
} | [
"public",
"function",
"setSshPublicKeys",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkMapField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"STRING",
",",
"\\",
"Google",
"\\",
... | A map from SSH public key fingerprint to the associated key object.
Generated from protobuf field <code>map<string, .google.cloud.oslogin.common.SshPublicKey> ssh_public_keys = 3;</code>
@param array|\Google\Protobuf\Internal\MapField $var
@return $this | [
"A",
"map",
"from",
"SSH",
"public",
"key",
"fingerprint",
"to",
"the",
"associated",
"key",
"object",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/OsLogin/src/V1beta/LoginProfile.php#L137-L143 | train |
googleapis/google-cloud-php | Tasks/src/V2/ListQueuesResponse.php | ListQueuesResponse.setQueues | public function setQueues($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2\Queue::class);
$this->queues = $arr;
return $this;
} | php | public function setQueues($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2\Queue::class);
$this->queues = $arr;
return $this;
} | [
"public",
"function",
"setQueues",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\",
... | The list of queues.
Generated from protobuf field <code>repeated .google.cloud.tasks.v2.Queue queues = 1;</code>
@param \Google\Cloud\Tasks\V2\Queue[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"The",
"list",
"of",
"queues",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Tasks/src/V2/ListQueuesResponse.php#L76-L82 | train |
googleapis/google-cloud-php | Core/src/Iterator/PageIteratorTrait.php | PageIteratorTrait.next | public function next()
{
$this->position++;
$this->page = $this->nextResultToken()
? $this->executeCall()
: null;
} | php | public function next()
{
$this->position++;
$this->page = $this->nextResultToken()
? $this->executeCall()
: null;
} | [
"public",
"function",
"next",
"(",
")",
"{",
"$",
"this",
"->",
"position",
"++",
";",
"$",
"this",
"->",
"page",
"=",
"$",
"this",
"->",
"nextResultToken",
"(",
")",
"?",
"$",
"this",
"->",
"executeCall",
"(",
")",
":",
"null",
";",
"}"
] | Advances to the next page.
@return null | [
"Advances",
"to",
"the",
"next",
"page",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/Iterator/PageIteratorTrait.php#L202-L208 | train |
googleapis/google-cloud-php | Core/src/Iterator/PageIteratorTrait.php | PageIteratorTrait.executeCall | private function executeCall()
{
$call = $this->call;
list($results, $shouldContinue) = $this->mapResults(
$call($this->callOptions)
);
$this->set(
$this->resultTokenPath,
$this->callOptions,
$this->determineNextResultToken($results, $... | php | private function executeCall()
{
$call = $this->call;
list($results, $shouldContinue) = $this->mapResults(
$call($this->callOptions)
);
$this->set(
$this->resultTokenPath,
$this->callOptions,
$this->determineNextResultToken($results, $... | [
"private",
"function",
"executeCall",
"(",
")",
"{",
"$",
"call",
"=",
"$",
"this",
"->",
"call",
";",
"list",
"(",
"$",
"results",
",",
"$",
"shouldContinue",
")",
"=",
"$",
"this",
"->",
"mapResults",
"(",
"$",
"call",
"(",
"$",
"this",
"->",
"ca... | Executes the provided call to get a set of results.
@return array | [
"Executes",
"the",
"provided",
"call",
"to",
"get",
"a",
"set",
"of",
"results",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/Iterator/PageIteratorTrait.php#L229-L243 | train |
googleapis/google-cloud-php | Logging/src/V2/ListLogMetricsResponse.php | ListLogMetricsResponse.setMetrics | public function setMetrics($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogMetric::class);
$this->metrics = $arr;
return $this;
} | php | public function setMetrics($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogMetric::class);
$this->metrics = $arr;
return $this;
} | [
"public",
"function",
"setMetrics",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\",
... | A list of logs-based metrics.
Generated from protobuf field <code>repeated .google.logging.v2.LogMetric metrics = 1;</code>
@param \Google\Cloud\Logging\V2\LogMetric[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"A",
"list",
"of",
"logs",
"-",
"based",
"metrics",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Logging/src/V2/ListLogMetricsResponse.php#L70-L76 | train |
googleapis/google-cloud-php | Language/src/V1/DependencyEdge.php | DependencyEdge.setLabel | public function setLabel($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\DependencyEdge_Label::class);
$this->label = $var;
return $this;
} | php | public function setLabel($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\DependencyEdge_Label::class);
$this->label = $var;
return $this;
} | [
"public",
"function",
"setLabel",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Language",
"\\",
"V1",
"\\",
"DependencyEdge_Label",
"::",
"class",
")",
";",
"$",
"this",
"->",
"lab... | The parse label for the token.
Generated from protobuf field <code>.google.cloud.language.v1.DependencyEdge.Label label = 2;</code>
@param int $var
@return $this | [
"The",
"parse",
"label",
"for",
"the",
"token",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Language/src/V1/DependencyEdge.php#L110-L116 | train |
googleapis/google-cloud-php | Trace/src/V2/Span/Link.php | Link.setType | public function setType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Trace\V2\Span_Link_Type::class);
$this->type = $var;
return $this;
} | php | public function setType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Trace\V2\Span_Link_Type::class);
$this->type = $var;
return $this;
} | [
"public",
"function",
"setType",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Trace",
"\\",
"V2",
"\\",
"Span_Link_Type",
"::",
"class",
")",
";",
"$",
"this",
"->",
"type",
"=",... | The relationship of the current span relative to the linked span.
Generated from protobuf field <code>.google.devtools.cloudtrace.v2.Span.Link.Type type = 3;</code>
@param int $var
@return $this | [
"The",
"relationship",
"of",
"the",
"current",
"span",
"relative",
"to",
"the",
"linked",
"span",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Trace/src/V2/Span/Link.php#L139-L145 | train |
googleapis/google-cloud-php | WebRisk/src/V1beta1/SearchHashesResponse.php | SearchHashesResponse.setThreats | public function setThreats($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebRisk\V1beta1\SearchHashesResponse\ThreatHash::class);
$this->threats = $arr;
return $this;
} | php | public function setThreats($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebRisk\V1beta1\SearchHashesResponse\ThreatHash::class);
$this->threats = $arr;
return $this;
} | [
"public",
"function",
"setThreats",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\",
... | The full hashes that matched the requested prefixes.
The hash will be populated in the key.
Generated from protobuf field <code>repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;</code>
@param \Google\Cloud\WebRisk\V1beta1\SearchHashesResponse\ThreatHash[]|\Google\Protobuf\Internal\Rep... | [
"The",
"full",
"hashes",
"that",
"matched",
"the",
"requested",
"prefixes",
".",
"The",
"hash",
"will",
"be",
"populated",
"in",
"the",
"key",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/WebRisk/src/V1beta1/SearchHashesResponse.php#L70-L76 | train |
googleapis/google-cloud-php | Dlp/src/V2/InfoTypeDescription.php | InfoTypeDescription.setSupportedBy | public function setSupportedBy($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dlp\V2\InfoTypeSupportedBy::class);
$this->supported_by = $arr;
return $this;
} | php | public function setSupportedBy($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dlp\V2\InfoTypeSupportedBy::class);
$this->supported_by = $arr;
return $this;
} | [
"public",
"function",
"setSupportedBy",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"ENUM",
",",
"\\",
"Google",
"\\",... | Which parts of the API supports this InfoType.
Generated from protobuf field <code>repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3;</code>
@param int[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Which",
"parts",
"of",
"the",
"API",
"supports",
"this",
"InfoType",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/InfoTypeDescription.php#L136-L142 | train |
googleapis/google-cloud-php | VideoIntelligence/src/V1/LabelDetectionConfig.php | LabelDetectionConfig.setLabelDetectionMode | public function setLabelDetectionMode($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\VideoIntelligence\V1\LabelDetectionMode::class);
$this->label_detection_mode = $var;
return $this;
} | php | public function setLabelDetectionMode($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\VideoIntelligence\V1\LabelDetectionMode::class);
$this->label_detection_mode = $var;
return $this;
} | [
"public",
"function",
"setLabelDetectionMode",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"VideoIntelligence",
"\\",
"V1",
"\\",
"LabelDetectionMode",
"::",
"class",
")",
";",
"$",
"t... | What labels should be detected with LABEL_DETECTION, in addition to
video-level labels or segment-level labels.
If unspecified, defaults to `SHOT_MODE`.
Generated from protobuf field <code>.google.cloud.videointelligence.v1.LabelDetectionMode label_detection_mode = 1;</code>
@param int $var
@return $this | [
"What",
"labels",
"should",
"be",
"detected",
"with",
"LABEL_DETECTION",
"in",
"addition",
"to",
"video",
"-",
"level",
"labels",
"or",
"segment",
"-",
"level",
"labels",
".",
"If",
"unspecified",
"defaults",
"to",
"SHOT_MODE",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/VideoIntelligence/src/V1/LabelDetectionConfig.php#L90-L96 | train |
googleapis/google-cloud-php | Translate/src/TranslateClient.php | TranslateClient.translate | public function translate($string, array $options = [])
{
$res = $this->translateBatch([$string], $options);
if (count($res) > 0) {
return $res[0];
}
} | php | public function translate($string, array $options = [])
{
$res = $this->translateBatch([$string], $options);
if (count($res) > 0) {
return $res[0];
}
} | [
"public",
"function",
"translate",
"(",
"$",
"string",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"res",
"=",
"$",
"this",
"->",
"translateBatch",
"(",
"[",
"$",
"string",
"]",
",",
"$",
"options",
")",
";",
"if",
"(",
"count",
"... | Translate a string from one language to another.
Example:
```
$result = $translate->translate('Hello world!');
echo $result['text'];
```
@see https://cloud.google.com/translation/v2/translating-text-with-rest Translating Text
@param string $string The string to translate.
@param array $options [optional] {
Configur... | [
"Translate",
"a",
"string",
"from",
"one",
"language",
"to",
"another",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Translate/src/TranslateClient.php#L179-L185 | train |
googleapis/google-cloud-php | Translate/src/TranslateClient.php | TranslateClient.translateBatch | public function translateBatch(array $strings, array $options = [])
{
$options += [
'model' => null,
];
$options = array_filter($options + [
'q' => $strings,
'key' => $this->key,
'target' => $this->targetLanguage,
'model' => $optio... | php | public function translateBatch(array $strings, array $options = [])
{
$options += [
'model' => null,
];
$options = array_filter($options + [
'q' => $strings,
'key' => $this->key,
'target' => $this->targetLanguage,
'model' => $optio... | [
"public",
"function",
"translateBatch",
"(",
"array",
"$",
"strings",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"+=",
"[",
"'model'",
"=>",
"null",
",",
"]",
";",
"$",
"options",
"=",
"array_filter",
"(",
"$",
"options",
... | Translate multiple strings from one language to another.
Example:
```
$results = $translate->translateBatch([
'Hello world!',
'My name is David.'
]);
foreach ($results as $result) {
echo $result['text'];
}
```
@see https://cloud.google.com/translation/v2/translating-text-with-rest Translating Text
@param array $str... | [
"Translate",
"multiple",
"strings",
"from",
"one",
"language",
"to",
"another",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Translate/src/TranslateClient.php#L231-L271 | train |
googleapis/google-cloud-php | Translate/src/TranslateClient.php | TranslateClient.detectLanguageBatch | public function detectLanguageBatch(array $strings, array $options = [])
{
$response = $this->connection->listDetections($options + [
'q' => $strings,
'key' => $this->key
]);
$detections = [];
foreach ($response['data']['detections'] as $key => $detection) ... | php | public function detectLanguageBatch(array $strings, array $options = [])
{
$response = $this->connection->listDetections($options + [
'q' => $strings,
'key' => $this->key
]);
$detections = [];
foreach ($response['data']['detections'] as $key => $detection) ... | [
"public",
"function",
"detectLanguageBatch",
"(",
"array",
"$",
"strings",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"connection",
"->",
"listDetections",
"(",
"$",
"options",
"+",
"[",
"'q'",
"=>",
... | Detect the language of multiple strings.
Example:
```
$results = $translate->detectLanguageBatch([
'Hello World!',
'My name is David.'
]);
foreach ($results as $result) {
echo $result['languageCode'];
}
```
@see https://cloud.google.com/translation/v2/detecting-language-with-rest Detecting Langauge
@param string $s... | [
"Detect",
"the",
"language",
"of",
"multiple",
"strings",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Translate/src/TranslateClient.php#L323-L343 | train |
googleapis/google-cloud-php | Translate/src/TranslateClient.php | TranslateClient.languages | public function languages(array $options = [])
{
$response = $this->localizedLanguages($options + ['target' => null]);
return array_map(function ($language) {
return $language['code'];
}, $response);
} | php | public function languages(array $options = [])
{
$response = $this->localizedLanguages($options + ['target' => null]);
return array_map(function ($language) {
return $language['code'];
}, $response);
} | [
"public",
"function",
"languages",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"localizedLanguages",
"(",
"$",
"options",
"+",
"[",
"'target'",
"=>",
"null",
"]",
")",
";",
"return",
"array_map",
"(",... | Get all supported languages.
Example:
```
$languages = $translate->languages();
foreach ($languages as $language) {
echo $language;
}
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/translation/v2/discovering-supported-languages-with-rest Discovering Supported Languages
@codingStandardsIgnoreEnd
@para... | [
"Get",
"all",
"supported",
"languages",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Translate/src/TranslateClient.php#L364-L371 | train |
googleapis/google-cloud-php | Translate/src/TranslateClient.php | TranslateClient.localizedLanguages | public function localizedLanguages(array $options = [])
{
$response = $this->connection->listLanguages($options + [
'key' => $this->key,
'target' => $this->targetLanguage
]);
return array_map(function ($language) {
return array_filter([
'c... | php | public function localizedLanguages(array $options = [])
{
$response = $this->connection->listLanguages($options + [
'key' => $this->key,
'target' => $this->targetLanguage
]);
return array_map(function ($language) {
return array_filter([
'c... | [
"public",
"function",
"localizedLanguages",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"connection",
"->",
"listLanguages",
"(",
"$",
"options",
"+",
"[",
"'key'",
"=>",
"$",
"this",
"->",
"key",
","... | Get the supported languages for translation in the targeted language.
Unlike {@see Google\Cloud\Translate\TranslateClient::languages()} this
will return the localized language names in addition to the ISO 639-1
language codes.
Example:
```
$languages = $translate->localizedLanguages();
foreach ($languages as $langua... | [
"Get",
"the",
"supported",
"languages",
"for",
"translation",
"in",
"the",
"targeted",
"language",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Translate/src/TranslateClient.php#L405-L418 | train |
googleapis/google-cloud-php | Datastore/src/V1/CompositeFilter.php | CompositeFilter.setOp | public function setOp($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Datastore\V1\CompositeFilter_Operator::class);
$this->op = $var;
return $this;
} | php | public function setOp($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Datastore\V1\CompositeFilter_Operator::class);
$this->op = $var;
return $this;
} | [
"public",
"function",
"setOp",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Datastore",
"\\",
"V1",
"\\",
"CompositeFilter_Operator",
"::",
"class",
")",
";",
"$",
"this",
"->",
"o... | The operator for combining multiple filters.
Generated from protobuf field <code>.google.datastore.v1.CompositeFilter.Operator op = 1;</code>
@param int $var
@return $this | [
"The",
"operator",
"for",
"combining",
"multiple",
"filters",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/V1/CompositeFilter.php#L68-L74 | train |
googleapis/google-cloud-php | Iot/src/V1/ListDeviceStatesResponse.php | ListDeviceStatesResponse.setDeviceStates | public function setDeviceStates($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\DeviceState::class);
$this->device_states = $arr;
return $this;
} | php | public function setDeviceStates($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\DeviceState::class);
$this->device_states = $arr;
return $this;
} | [
"public",
"function",
"setDeviceStates",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"... | The last few device states. States are listed in descending order of server
update time, starting from the most recent one.
Generated from protobuf field <code>repeated .google.cloud.iot.v1.DeviceState device_states = 1;</code>
@param \Google\Cloud\Iot\V1\DeviceState[]|\Google\Protobuf\Internal\RepeatedField $var
@ret... | [
"The",
"last",
"few",
"device",
"states",
".",
"States",
"are",
"listed",
"in",
"descending",
"order",
"of",
"server",
"update",
"time",
"starting",
"from",
"the",
"most",
"recent",
"one",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Iot/src/V1/ListDeviceStatesResponse.php#L62-L68 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/BatchUpdateEntityTypesRequest.php | BatchUpdateEntityTypesRequest.setEntityTypeBatchInline | public function setEntityTypeBatchInline($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EntityTypeBatch::class);
$this->writeOneof(3, $var);
return $this;
} | php | public function setEntityTypeBatchInline($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EntityTypeBatch::class);
$this->writeOneof(3, $var);
return $this;
} | [
"public",
"function",
"setEntityTypeBatchInline",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"EntityTypeBatch",
"::",
"class",
")",
";",
"$",
"this"... | The collection of entity types to update or create.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.EntityTypeBatch entity_type_batch_inline = 3;</code>
@param \Google\Cloud\Dialogflow\V2\EntityTypeBatch $var
@return $this | [
"The",
"collection",
"of",
"entity",
"types",
"to",
"update",
"or",
"create",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/BatchUpdateEntityTypesRequest.php#L154-L160 | train |
googleapis/google-cloud-php | Storage/src/Notification.php | Notification.reload | public function reload(array $options = [])
{
return $this->info = $this->connection->getNotification(
$options + $this->identity
);
} | php | public function reload(array $options = [])
{
return $this->info = $this->connection->getNotification(
$options + $this->identity
);
} | [
"public",
"function",
"reload",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"info",
"=",
"$",
"this",
"->",
"connection",
"->",
"getNotification",
"(",
"$",
"options",
"+",
"$",
"this",
"->",
"identity",
")",
"... | Triggers a network request to reload the notification's details.
Example:
```
$notification->reload();
$info = $notification->info();
echo $info['topic'];
```
@see https://cloud.google.com/storage/docs/json_api/v1/notifications/get Notifications get API documentation.
@param array $options [optional]
@return array | [
"Triggers",
"a",
"network",
"request",
"to",
"reload",
"the",
"notification",
"s",
"details",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/Notification.php#L164-L169 | train |
googleapis/google-cloud-php | Dlp/src/V2/LargeCustomDictionaryConfig.php | LargeCustomDictionaryConfig.setOutputPath | public function setOutputPath($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CloudStoragePath::class);
$this->output_path = $var;
return $this;
} | php | public function setOutputPath($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CloudStoragePath::class);
$this->output_path = $var;
return $this;
} | [
"public",
"function",
"setOutputPath",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"CloudStoragePath",
"::",
"class",
")",
";",
"$",
"this",
"->",
"outp... | Location to store dictionary artifacts in Google Cloud Storage. These files
will only be accessible by project owners and the DLP API. If any of these
artifacts are modified, the dictionary is considered invalid and can no
longer be used.
Generated from protobuf field <code>.google.privacy.dlp.v2.CloudStoragePath outp... | [
"Location",
"to",
"store",
"dictionary",
"artifacts",
"in",
"Google",
"Cloud",
"Storage",
".",
"These",
"files",
"will",
"only",
"be",
"accessible",
"by",
"project",
"owners",
"and",
"the",
"DLP",
"API",
".",
"If",
"any",
"of",
"these",
"artifacts",
"are",
... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/LargeCustomDictionaryConfig.php#L80-L86 | train |
googleapis/google-cloud-php | Dlp/src/V2/LargeCustomDictionaryConfig.php | LargeCustomDictionaryConfig.setCloudStorageFileSet | public function setCloudStorageFileSet($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CloudStorageFileSet::class);
$this->writeOneof(2, $var);
return $this;
} | php | public function setCloudStorageFileSet($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CloudStorageFileSet::class);
$this->writeOneof(2, $var);
return $this;
} | [
"public",
"function",
"setCloudStorageFileSet",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"CloudStorageFileSet",
"::",
"class",
")",
";",
"$",
"this",
"... | Set of files containing newline-delimited lists of dictionary phrases.
Generated from protobuf field <code>.google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2;</code>
@param \Google\Cloud\Dlp\V2\CloudStorageFileSet $var
@return $this | [
"Set",
"of",
"files",
"containing",
"newline",
"-",
"delimited",
"lists",
"of",
"dictionary",
"phrases",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/LargeCustomDictionaryConfig.php#L106-L112 | train |
googleapis/google-cloud-php | Dlp/src/V2/LargeCustomDictionaryConfig.php | LargeCustomDictionaryConfig.setBigQueryField | public function setBigQueryField($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\BigQueryField::class);
$this->writeOneof(3, $var);
return $this;
} | php | public function setBigQueryField($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\BigQueryField::class);
$this->writeOneof(3, $var);
return $this;
} | [
"public",
"function",
"setBigQueryField",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dlp",
"\\",
"V2",
"\\",
"BigQueryField",
"::",
"class",
")",
";",
"$",
"this",
"->",
"writ... | Field in a BigQuery table where each cell represents a dictionary phrase.
Generated from protobuf field <code>.google.privacy.dlp.v2.BigQueryField big_query_field = 3;</code>
@param \Google\Cloud\Dlp\V2\BigQueryField $var
@return $this | [
"Field",
"in",
"a",
"BigQuery",
"table",
"where",
"each",
"cell",
"represents",
"a",
"dictionary",
"phrase",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/LargeCustomDictionaryConfig.php#L132-L138 | train |
googleapis/google-cloud-php | Talent/src/V4beta1/CreateClientEventRequest.php | CreateClientEventRequest.setClientEvent | public function setClientEvent($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\ClientEvent::class);
$this->client_event = $var;
return $this;
} | php | public function setClientEvent($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\ClientEvent::class);
$this->client_event = $var;
return $this;
} | [
"public",
"function",
"setClientEvent",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Talent",
"\\",
"V4beta1",
"\\",
"ClientEvent",
"::",
"class",
")",
";",
"$",
"this",
"->",
"... | Required.
Events issued when end user interacts with customer's application that
uses Cloud Talent Solution.
Generated from protobuf field <code>.google.cloud.talent.v4beta1.ClientEvent client_event = 2;</code>
@param \Google\Cloud\Talent\V4beta1\ClientEvent $var
@return $this | [
"Required",
".",
"Events",
"issued",
"when",
"end",
"user",
"interacts",
"with",
"customer",
"s",
"application",
"that",
"uses",
"Cloud",
"Talent",
"Solution",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/CreateClientEventRequest.php#L120-L126 | train |
googleapis/google-cloud-php | Vision/src/V1/Gapic/ProductSearchGapicClient.php | ProductSearchGapicClient.productName | public static function productName($project, $location, $product)
{
return self::getProductNameTemplate()->render([
'project' => $project,
'location' => $location,
'product' => $product,
]);
} | php | public static function productName($project, $location, $product)
{
return self::getProductNameTemplate()->render([
'project' => $project,
'location' => $location,
'product' => $product,
]);
} | [
"public",
"static",
"function",
"productName",
"(",
"$",
"project",
",",
"$",
"location",
",",
"$",
"product",
")",
"{",
"return",
"self",
"::",
"getProductNameTemplate",
"(",
")",
"->",
"render",
"(",
"[",
"'project'",
"=>",
"$",
"project",
",",
"'locatio... | Formats a string containing the fully-qualified path to represent
a product resource.
@param string $project
@param string $location
@param string $product
@return string The formatted product resource.
@experimental | [
"Formats",
"a",
"string",
"containing",
"the",
"fully",
"-",
"qualified",
"path",
"to",
"represent",
"a",
"product",
"resource",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/Gapic/ProductSearchGapicClient.php#L248-L255 | train |
googleapis/google-cloud-php | Vision/src/V1/Gapic/ProductSearchGapicClient.php | ProductSearchGapicClient.productSetName | public static function productSetName($project, $location, $productSet)
{
return self::getProductSetNameTemplate()->render([
'project' => $project,
'location' => $location,
'product_set' => $productSet,
]);
} | php | public static function productSetName($project, $location, $productSet)
{
return self::getProductSetNameTemplate()->render([
'project' => $project,
'location' => $location,
'product_set' => $productSet,
]);
} | [
"public",
"static",
"function",
"productSetName",
"(",
"$",
"project",
",",
"$",
"location",
",",
"$",
"productSet",
")",
"{",
"return",
"self",
"::",
"getProductSetNameTemplate",
"(",
")",
"->",
"render",
"(",
"[",
"'project'",
"=>",
"$",
"project",
",",
... | Formats a string containing the fully-qualified path to represent
a product_set resource.
@param string $project
@param string $location
@param string $productSet
@return string The formatted product_set resource.
@experimental | [
"Formats",
"a",
"string",
"containing",
"the",
"fully",
"-",
"qualified",
"path",
"to",
"represent",
"a",
"product_set",
"resource",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/Gapic/ProductSearchGapicClient.php#L268-L275 | train |
googleapis/google-cloud-php | Vision/src/V1/Gapic/ProductSearchGapicClient.php | ProductSearchGapicClient.referenceImageName | public static function referenceImageName($project, $location, $product, $referenceImage)
{
return self::getReferenceImageNameTemplate()->render([
'project' => $project,
'location' => $location,
'product' => $product,
'reference_image' => $referenceImage,
... | php | public static function referenceImageName($project, $location, $product, $referenceImage)
{
return self::getReferenceImageNameTemplate()->render([
'project' => $project,
'location' => $location,
'product' => $product,
'reference_image' => $referenceImage,
... | [
"public",
"static",
"function",
"referenceImageName",
"(",
"$",
"project",
",",
"$",
"location",
",",
"$",
"product",
",",
"$",
"referenceImage",
")",
"{",
"return",
"self",
"::",
"getReferenceImageNameTemplate",
"(",
")",
"->",
"render",
"(",
"[",
"'project'"... | Formats a string containing the fully-qualified path to represent
a reference_image resource.
@param string $project
@param string $location
@param string $product
@param string $referenceImage
@return string The formatted reference_image resource.
@experimental | [
"Formats",
"a",
"string",
"containing",
"the",
"fully",
"-",
"qualified",
"path",
"to",
"represent",
"a",
"reference_image",
"resource",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/Gapic/ProductSearchGapicClient.php#L289-L297 | train |
googleapis/google-cloud-php | PubSub/src/Message.php | Message.attribute | public function attribute($key)
{
return (isset($this->message['attributes'][$key]))
? $this->message['attributes'][$key]
: null;
} | php | public function attribute($key)
{
return (isset($this->message['attributes'][$key]))
? $this->message['attributes'][$key]
: null;
} | [
"public",
"function",
"attribute",
"(",
"$",
"key",
")",
"{",
"return",
"(",
"isset",
"(",
"$",
"this",
"->",
"message",
"[",
"'attributes'",
"]",
"[",
"$",
"key",
"]",
")",
")",
"?",
"$",
"this",
"->",
"message",
"[",
"'attributes'",
"]",
"[",
"$"... | Retrieve a single message attribute.
Example:
```
echo $message->attribute('browser-name');
```
@param string $key The attribute key
@return string|null | [
"Retrieve",
"a",
"single",
"message",
"attribute",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Message.php#L109-L114 | train |
googleapis/google-cloud-php | Core/src/RetryDeciderTrait.php | RetryDeciderTrait.getRetryFunction | private function getRetryFunction($shouldRetryMessages = true)
{
$httpRetryCodes = $this->httpRetryCodes;
$httpRetryMessages = $this->httpRetryMessages;
return function (\Exception $ex) use ($httpRetryCodes, $httpRetryMessages, $shouldRetryMessages) {
$statusCode = $ex->getCode(... | php | private function getRetryFunction($shouldRetryMessages = true)
{
$httpRetryCodes = $this->httpRetryCodes;
$httpRetryMessages = $this->httpRetryMessages;
return function (\Exception $ex) use ($httpRetryCodes, $httpRetryMessages, $shouldRetryMessages) {
$statusCode = $ex->getCode(... | [
"private",
"function",
"getRetryFunction",
"(",
"$",
"shouldRetryMessages",
"=",
"true",
")",
"{",
"$",
"httpRetryCodes",
"=",
"$",
"this",
"->",
"httpRetryCodes",
";",
"$",
"httpRetryMessages",
"=",
"$",
"this",
"->",
"httpRetryMessages",
";",
"return",
"functi... | Determines whether or not the request should be retried.
@param bool $shouldRetryMessages Whether or not to attempt retrying based
on the failure message.
@return callable | [
"Determines",
"whether",
"or",
"not",
"the",
"request",
"should",
"be",
"retried",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/RetryDeciderTrait.php#L53-L94 | train |
googleapis/google-cloud-php | Vision/src/V1/TextAnnotation/DetectedBreak.php | DetectedBreak.setType | public function setType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\TextAnnotation_DetectedBreak_BreakType::class);
$this->type = $var;
return $this;
} | php | public function setType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\TextAnnotation_DetectedBreak_BreakType::class);
$this->type = $var;
return $this;
} | [
"public",
"function",
"setType",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Vision",
"\\",
"V1",
"\\",
"TextAnnotation_DetectedBreak_BreakType",
"::",
"class",
")",
";",
"$",
"this",... | Detected break type.
Generated from protobuf field <code>.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1;</code>
@param int $var
@return $this | [
"Detected",
"break",
"type",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/TextAnnotation/DetectedBreak.php#L66-L72 | train |
googleapis/google-cloud-php | Container/src/V1/Cluster.php | Cluster.setMasterAuth | public function setMasterAuth($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\MasterAuth::class);
$this->master_auth = $var;
return $this;
} | php | public function setMasterAuth($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\MasterAuth::class);
$this->master_auth = $var;
return $this;
} | [
"public",
"function",
"setMasterAuth",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"MasterAuth",
"::",
"class",
")",
";",
"$",
"this",
"->",
"mast... | The authentication information for accessing the master endpoint.
Generated from protobuf field <code>.google.container.v1.MasterAuth master_auth = 5;</code>
@param \Google\Cloud\Container\V1\MasterAuth $var
@return $this | [
"The",
"authentication",
"information",
"for",
"accessing",
"the",
"master",
"endpoint",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/Cluster.php#L652-L658 | train |
googleapis/google-cloud-php | Container/src/V1/Cluster.php | Cluster.setLegacyAbac | public function setLegacyAbac($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\LegacyAbac::class);
$this->legacy_abac = $var;
return $this;
} | php | public function setLegacyAbac($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\LegacyAbac::class);
$this->legacy_abac = $var;
return $this;
} | [
"public",
"function",
"setLegacyAbac",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"LegacyAbac",
"::",
"class",
")",
";",
"$",
"this",
"->",
"lega... | Configuration for the legacy ABAC authorization mode.
Generated from protobuf field <code>.google.container.v1.LegacyAbac legacy_abac = 18;</code>
@param \Google\Cloud\Container\V1\LegacyAbac $var
@return $this | [
"Configuration",
"for",
"the",
"legacy",
"ABAC",
"authorization",
"mode",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/Cluster.php#L1016-L1022 | train |
googleapis/google-cloud-php | Container/src/V1/Cluster.php | Cluster.setIpAllocationPolicy | public function setIpAllocationPolicy($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\IPAllocationPolicy::class);
$this->ip_allocation_policy = $var;
return $this;
} | php | public function setIpAllocationPolicy($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\IPAllocationPolicy::class);
$this->ip_allocation_policy = $var;
return $this;
} | [
"public",
"function",
"setIpAllocationPolicy",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"IPAllocationPolicy",
"::",
"class",
")",
";",
"$",
"this",... | Configuration for cluster IP allocation.
Generated from protobuf field <code>.google.container.v1.IPAllocationPolicy ip_allocation_policy = 20;</code>
@param \Google\Cloud\Container\V1\IPAllocationPolicy $var
@return $this | [
"Configuration",
"for",
"cluster",
"IP",
"allocation",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/Cluster.php#L1068-L1074 | train |
googleapis/google-cloud-php | Container/src/V1/Cluster.php | Cluster.setMasterAuthorizedNetworksConfig | public function setMasterAuthorizedNetworksConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\MasterAuthorizedNetworksConfig::class);
$this->master_authorized_networks_config = $var;
return $this;
} | php | public function setMasterAuthorizedNetworksConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\MasterAuthorizedNetworksConfig::class);
$this->master_authorized_networks_config = $var;
return $this;
} | [
"public",
"function",
"setMasterAuthorizedNetworksConfig",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"MasterAuthorizedNetworksConfig",
"::",
"class",
")",... | The configuration options for master authorized networks feature.
Generated from protobuf field <code>.google.container.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 22;</code>
@param \Google\Cloud\Container\V1\MasterAuthorizedNetworksConfig $var
@return $this | [
"The",
"configuration",
"options",
"for",
"master",
"authorized",
"networks",
"feature",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/Cluster.php#L1094-L1100 | train |
googleapis/google-cloud-php | Container/src/V1/Cluster.php | Cluster.setNetworkConfig | public function setNetworkConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NetworkConfig::class);
$this->network_config = $var;
return $this;
} | php | public function setNetworkConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NetworkConfig::class);
$this->network_config = $var;
return $this;
} | [
"public",
"function",
"setNetworkConfig",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"NetworkConfig",
"::",
"class",
")",
";",
"$",
"this",
"->",
... | Configuration for cluster networking.
Generated from protobuf field <code>.google.container.v1.NetworkConfig network_config = 27;</code>
@param \Google\Cloud\Container\V1\NetworkConfig $var
@return $this | [
"Configuration",
"for",
"cluster",
"networking",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/Cluster.php#L1146-L1152 | train |
googleapis/google-cloud-php | Container/src/V1/Cluster.php | Cluster.setPrivateClusterConfig | public function setPrivateClusterConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\PrivateClusterConfig::class);
$this->private_cluster_config = $var;
return $this;
} | php | public function setPrivateClusterConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\PrivateClusterConfig::class);
$this->private_cluster_config = $var;
return $this;
} | [
"public",
"function",
"setPrivateClusterConfig",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"PrivateClusterConfig",
"::",
"class",
")",
";",
"$",
"th... | Configuration for private cluster.
Generated from protobuf field <code>.google.container.v1.PrivateClusterConfig private_cluster_config = 37;</code>
@param \Google\Cloud\Container\V1\PrivateClusterConfig $var
@return $this | [
"Configuration",
"for",
"private",
"cluster",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/Cluster.php#L1172-L1178 | train |
googleapis/google-cloud-php | Talent/src/V4beta1/Publication.php | Publication.setAuthors | public function setAuthors($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->authors = $arr;
return $this;
} | php | public function setAuthors($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->authors = $arr;
return $this;
} | [
"public",
"function",
"setAuthors",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"STRING",
")",
";",
"$",
"this",
"->... | Optional.
A list of author names.
Number of characters allowed is 100.
Generated from protobuf field <code>repeated string authors = 1;</code>
@param string[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Optional",
".",
"A",
"list",
"of",
"author",
"names",
".",
"Number",
"of",
"characters",
"allowed",
"is",
"100",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/Publication.php#L160-L166 | train |
googleapis/google-cloud-php | AutoMl/src/V1beta1/ClassificationEvaluationMetrics/ConfusionMatrix.php | ConfusionMatrix.setAnnotationSpecId | public function setAnnotationSpecId($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->annotation_spec_id = $arr;
return $this;
} | php | public function setAnnotationSpecId($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->annotation_spec_id = $arr;
return $this;
} | [
"public",
"function",
"setAnnotationSpecId",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"STRING",
")",
";",
"$",
"thi... | Output only. IDs of the annotation specs used in the confusion matrix.
Generated from protobuf field <code>repeated string annotation_spec_id = 1;</code>
@param string[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Output",
"only",
".",
"IDs",
"of",
"the",
"annotation",
"specs",
"used",
"in",
"the",
"confusion",
"matrix",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/AutoMl/src/V1beta1/ClassificationEvaluationMetrics/ConfusionMatrix.php#L74-L80 | train |
googleapis/google-cloud-php | Firestore/src/V1beta1/DocumentDelete.php | DocumentDelete.setRemovedTargetIds | public function setRemovedTargetIds($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
$this->removed_target_ids = $arr;
return $this;
} | php | public function setRemovedTargetIds($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
$this->removed_target_ids = $arr;
return $this;
} | [
"public",
"function",
"setRemovedTargetIds",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"INT32",
")",
";",
"$",
"this... | A set of target IDs for targets that previously matched this entity.
Generated from protobuf field <code>repeated int32 removed_target_ids = 6;</code>
@param int[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"A",
"set",
"of",
"target",
"IDs",
"for",
"targets",
"that",
"previously",
"matched",
"this",
"entity",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1beta1/DocumentDelete.php#L106-L112 | train |
googleapis/google-cloud-php | BigQueryDataTransfer/src/V1/Gapic/DataTransferServiceGapicClient.php | DataTransferServiceGapicClient.projectRunName | public static function projectRunName($project, $transferConfig, $run)
{
return self::getProjectRunNameTemplate()->render([
'project' => $project,
'transfer_config' => $transferConfig,
'run' => $run,
]);
} | php | public static function projectRunName($project, $transferConfig, $run)
{
return self::getProjectRunNameTemplate()->render([
'project' => $project,
'transfer_config' => $transferConfig,
'run' => $run,
]);
} | [
"public",
"static",
"function",
"projectRunName",
"(",
"$",
"project",
",",
"$",
"transferConfig",
",",
"$",
"run",
")",
"{",
"return",
"self",
"::",
"getProjectRunNameTemplate",
"(",
")",
"->",
"render",
"(",
"[",
"'project'",
"=>",
"$",
"project",
",",
"... | Formats a string containing the fully-qualified path to represent
a project_run resource.
@param string $project
@param string $transferConfig
@param string $run
@return string The formatted project_run resource.
@experimental | [
"Formats",
"a",
"string",
"containing",
"the",
"fully",
"-",
"qualified",
"path",
"to",
"represent",
"a",
"project_run",
"resource",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/BigQueryDataTransfer/src/V1/Gapic/DataTransferServiceGapicClient.php#L240-L247 | train |
googleapis/google-cloud-php | Container/src/V1/CreateNodePoolRequest.php | CreateNodePoolRequest.setNodePool | public function setNodePool($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NodePool::class);
$this->node_pool = $var;
return $this;
} | php | public function setNodePool($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NodePool::class);
$this->node_pool = $var;
return $this;
} | [
"public",
"function",
"setNodePool",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"NodePool",
"::",
"class",
")",
";",
"$",
"this",
"->",
"node_poo... | The node pool to create.
Generated from protobuf field <code>.google.container.v1.NodePool node_pool = 4;</code>
@param \Google\Cloud\Container\V1\NodePool $var
@return $this | [
"The",
"node",
"pool",
"to",
"create",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/CreateNodePoolRequest.php#L196-L202 | train |
googleapis/google-cloud-php | Asset/src/V1/OutputConfig.php | OutputConfig.setGcsDestination | public function setGcsDestination($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Asset\V1\GcsDestination::class);
$this->writeOneof(1, $var);
return $this;
} | php | public function setGcsDestination($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Asset\V1\GcsDestination::class);
$this->writeOneof(1, $var);
return $this;
} | [
"public",
"function",
"setGcsDestination",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Asset",
"\\",
"V1",
"\\",
"GcsDestination",
"::",
"class",
")",
";",
"$",
"this",
"->",
"... | Destination on Cloud Storage.
Generated from protobuf field <code>.google.cloud.asset.v1.GcsDestination gcs_destination = 1;</code>
@param \Google\Cloud\Asset\V1\GcsDestination $var
@return $this | [
"Destination",
"on",
"Cloud",
"Storage",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Asset/src/V1/OutputConfig.php#L53-L59 | train |
googleapis/google-cloud-php | SecurityCenter/src/V1/Gapic/SecurityCenterGapicClient.php | SecurityCenterGapicClient.findingSecurityMarksName | public static function findingSecurityMarksName($organization, $source, $finding)
{
return self::getFindingSecurityMarksNameTemplate()->render([
'organization' => $organization,
'source' => $source,
'finding' => $finding,
]);
} | php | public static function findingSecurityMarksName($organization, $source, $finding)
{
return self::getFindingSecurityMarksNameTemplate()->render([
'organization' => $organization,
'source' => $source,
'finding' => $finding,
]);
} | [
"public",
"static",
"function",
"findingSecurityMarksName",
"(",
"$",
"organization",
",",
"$",
"source",
",",
"$",
"finding",
")",
"{",
"return",
"self",
"::",
"getFindingSecurityMarksNameTemplate",
"(",
")",
"->",
"render",
"(",
"[",
"'organization'",
"=>",
"$... | Formats a string containing the fully-qualified path to represent
a finding_security_marks resource.
@param string $organization
@param string $source
@param string $finding
@return string The formatted finding_security_marks resource.
@experimental | [
"Formats",
"a",
"string",
"containing",
"the",
"fully",
"-",
"qualified",
"path",
"to",
"represent",
"a",
"finding_security_marks",
"resource",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/SecurityCenter/src/V1/Gapic/SecurityCenterGapicClient.php#L283-L290 | train |
googleapis/google-cloud-php | SecurityCenter/src/V1/Gapic/SecurityCenterGapicClient.php | SecurityCenterGapicClient.findingName | public static function findingName($organization, $source, $finding)
{
return self::getFindingNameTemplate()->render([
'organization' => $organization,
'source' => $source,
'finding' => $finding,
]);
} | php | public static function findingName($organization, $source, $finding)
{
return self::getFindingNameTemplate()->render([
'organization' => $organization,
'source' => $source,
'finding' => $finding,
]);
} | [
"public",
"static",
"function",
"findingName",
"(",
"$",
"organization",
",",
"$",
"source",
",",
"$",
"finding",
")",
"{",
"return",
"self",
"::",
"getFindingNameTemplate",
"(",
")",
"->",
"render",
"(",
"[",
"'organization'",
"=>",
"$",
"organization",
","... | Formats a string containing the fully-qualified path to represent
a finding resource.
@param string $organization
@param string $source
@param string $finding
@return string The formatted finding resource.
@experimental | [
"Formats",
"a",
"string",
"containing",
"the",
"fully",
"-",
"qualified",
"path",
"to",
"represent",
"a",
"finding",
"resource",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/SecurityCenter/src/V1/Gapic/SecurityCenterGapicClient.php#L353-L360 | train |
googleapis/google-cloud-php | SecurityCenter/src/V1/Gapic/SecurityCenterGapicClient.php | SecurityCenterGapicClient.getIamPolicy | public function getIamPolicy($resource, array $optionalArgs = [])
{
$request = new GetIamPolicyRequest();
$request->setResource($resource);
return $this->startCall(
'GetIamPolicy',
Policy::class,
$optionalArgs,
$request
)->wait();
... | php | public function getIamPolicy($resource, array $optionalArgs = [])
{
$request = new GetIamPolicyRequest();
$request->setResource($resource);
return $this->startCall(
'GetIamPolicy',
Policy::class,
$optionalArgs,
$request
)->wait();
... | [
"public",
"function",
"getIamPolicy",
"(",
"$",
"resource",
",",
"array",
"$",
"optionalArgs",
"=",
"[",
"]",
")",
"{",
"$",
"request",
"=",
"new",
"GetIamPolicyRequest",
"(",
")",
";",
"$",
"request",
"->",
"setResource",
"(",
"$",
"resource",
")",
";",... | Gets the access control policy on the specified Source.
Sample code:
```
$securityCenterClient = new SecurityCenterClient();
try {
$formattedResource = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]');
$response = $securityCenterClient->getIamPolicy($formattedResource);
} finally {
$securityCenterClient... | [
"Gets",
"the",
"access",
"control",
"policy",
"on",
"the",
"specified",
"Source",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/SecurityCenter/src/V1/Gapic/SecurityCenterGapicClient.php#L637-L648 | train |
googleapis/google-cloud-php | AutoMl/src/V1beta1/ClassificationEvaluationMetrics.php | ClassificationEvaluationMetrics.setConfidenceMetricsEntry | public function setConfidenceMetricsEntry($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AutoMl\V1beta1\ClassificationEvaluationMetrics\ConfidenceMetricsEntry::class);
$this->confidence_metrics_entry = $arr;
return $this;
} | php | public function setConfidenceMetricsEntry($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AutoMl\V1beta1\ClassificationEvaluationMetrics\ConfidenceMetricsEntry::class);
$this->confidence_metrics_entry = $arr;
return $this;
} | [
"public",
"function",
"setConfidenceMetricsEntry",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Go... | Output only. Metrics that have confidence thresholds.
Precision-recall curve can be derived from it.
Generated from protobuf field <code>repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3;</code>
@param \Google\Cloud\AutoMl\V1beta1\ClassificationEv... | [
"Output",
"only",
".",
"Metrics",
"that",
"have",
"confidence",
"thresholds",
".",
"Precision",
"-",
"recall",
"curve",
"can",
"be",
"derived",
"from",
"it",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/AutoMl/src/V1beta1/ClassificationEvaluationMetrics.php#L153-L159 | train |
googleapis/google-cloud-php | AutoMl/src/V1beta1/ClassificationEvaluationMetrics.php | ClassificationEvaluationMetrics.setConfusionMatrix | public function setConfusionMatrix($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1beta1\ClassificationEvaluationMetrics_ConfusionMatrix::class);
$this->confusion_matrix = $var;
return $this;
} | php | public function setConfusionMatrix($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1beta1\ClassificationEvaluationMetrics_ConfusionMatrix::class);
$this->confusion_matrix = $var;
return $this;
} | [
"public",
"function",
"setConfusionMatrix",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"AutoMl",
"\\",
"V1beta1",
"\\",
"ClassificationEvaluationMetrics_ConfusionMatrix",
"::",
"class",
... | Output only. Confusion matrix of the evaluation.
Only set for MULTICLASS classification problems where number
of labels is no more than 10.
Only set for model level evaluation, not for evaluation per label.
Generated from protobuf field <code>.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix... | [
"Output",
"only",
".",
"Confusion",
"matrix",
"of",
"the",
"evaluation",
".",
"Only",
"set",
"for",
"MULTICLASS",
"classification",
"problems",
"where",
"number",
"of",
"labels",
"is",
"no",
"more",
"than",
"10",
".",
"Only",
"set",
"for",
"model",
"level",
... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/AutoMl/src/V1beta1/ClassificationEvaluationMetrics.php#L185-L191 | train |
googleapis/google-cloud-php | BigQueryDataTransfer/src/V1/ListTransferLogsRequest.php | ListTransferLogsRequest.setMessageTypes | public function setMessageTypes($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage\MessageSeverity::class);
$this->message_types = $arr;
return $this;
} | php | public function setMessageTypes($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage\MessageSeverity::class);
$this->message_types = $arr;
return $this;
} | [
"public",
"function",
"setMessageTypes",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"ENUM",
",",
"\\",
"Google",
"\\"... | Message types to return. If not populated - INFO, WARNING and ERROR
messages are returned.
Generated from protobuf field <code>repeated .google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity message_types = 6;</code>
@param int[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Message",
"types",
"to",
"return",
".",
"If",
"not",
"populated",
"-",
"INFO",
"WARNING",
"and",
"ERROR",
"messages",
"are",
"returned",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/BigQueryDataTransfer/src/V1/ListTransferLogsRequest.php#L184-L190 | train |
googleapis/google-cloud-php | SecurityCenter/src/V1/CreateSourceRequest.php | CreateSourceRequest.setSource | public function setSource($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Source::class);
$this->source = $var;
return $this;
} | php | public function setSource($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Source::class);
$this->source = $var;
return $this;
} | [
"public",
"function",
"setSource",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"SecurityCenter",
"\\",
"V1",
"\\",
"Source",
"::",
"class",
")",
";",
"$",
"this",
"->",
"source"... | The Source being created, only the display_name and description will be
used. All other fields will be ignored.
Generated from protobuf field <code>.google.cloud.securitycenter.v1.Source source = 2;</code>
@param \Google\Cloud\SecurityCenter\V1\Source $var
@return $this | [
"The",
"Source",
"being",
"created",
"only",
"the",
"display_name",
"and",
"description",
"will",
"be",
"used",
".",
"All",
"other",
"fields",
"will",
"be",
"ignored",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/SecurityCenter/src/V1/CreateSourceRequest.php#L100-L106 | train |
googleapis/google-cloud-php | SecurityCenter/src/V1/UpdateOrganizationSettingsRequest.php | UpdateOrganizationSettingsRequest.setOrganizationSettings | public function setOrganizationSettings($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\OrganizationSettings::class);
$this->organization_settings = $var;
return $this;
} | php | public function setOrganizationSettings($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\OrganizationSettings::class);
$this->organization_settings = $var;
return $this;
} | [
"public",
"function",
"setOrganizationSettings",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"SecurityCenter",
"\\",
"V1",
"\\",
"OrganizationSettings",
"::",
"class",
")",
";",
"$",
... | The organization settings resource to update.
Generated from protobuf field <code>.google.cloud.securitycenter.v1.OrganizationSettings organization_settings = 1;</code>
@param \Google\Cloud\SecurityCenter\V1\OrganizationSettings $var
@return $this | [
"The",
"organization",
"settings",
"resource",
"to",
"update",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/SecurityCenter/src/V1/UpdateOrganizationSettingsRequest.php#L68-L74 | train |
googleapis/google-cloud-php | PubSub/src/V1/UpdateSubscriptionRequest.php | UpdateSubscriptionRequest.setSubscription | public function setSubscription($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Subscription::class);
$this->subscription = $var;
return $this;
} | php | public function setSubscription($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Subscription::class);
$this->subscription = $var;
return $this;
} | [
"public",
"function",
"setSubscription",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"PubSub",
"\\",
"V1",
"\\",
"Subscription",
"::",
"class",
")",
";",
"$",
"this",
"->",
"sub... | The updated subscription object.
Generated from protobuf field <code>.google.pubsub.v1.Subscription subscription = 1;</code>
@param \Google\Cloud\PubSub\V1\Subscription $var
@return $this | [
"The",
"updated",
"subscription",
"object",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/V1/UpdateSubscriptionRequest.php#L68-L74 | train |
googleapis/google-cloud-php | Logging/src/Metric.php | Metric.update | public function update(array $metadata, array $options = [])
{
$options += $metadata;
$options += $this->info($options);
return $this->info = $this->connection->updateMetric($options + [
'metricName' => $this->formattedName
]);
} | php | public function update(array $metadata, array $options = [])
{
$options += $metadata;
$options += $this->info($options);
return $this->info = $this->connection->updateMetric($options + [
'metricName' => $this->formattedName
]);
} | [
"public",
"function",
"update",
"(",
"array",
"$",
"metadata",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"+=",
"$",
"metadata",
";",
"$",
"options",
"+=",
"$",
"this",
"->",
"info",
"(",
"$",
"options",
")",
";",
"retur... | Update the metric. Please note this will trigger a network request if
cached data is not available to perform the update with.
Example:
```
$metric->update([
'description' => 'A description for my metric.'
]);
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.me... | [
"Update",
"the",
"metric",
".",
"Please",
"note",
"this",
"will",
"trigger",
"a",
"network",
"request",
"if",
"cached",
"data",
"is",
"not",
"available",
"to",
"perform",
"the",
"update",
"with",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Logging/src/Metric.php#L143-L151 | train |
googleapis/google-cloud-php | Logging/src/Metric.php | Metric.reload | public function reload(array $options = [])
{
return $this->info = $this->connection->getMetric($options + [
'metricName' => $this->formattedName
]);
} | php | public function reload(array $options = [])
{
return $this->info = $this->connection->getMetric($options + [
'metricName' => $this->formattedName
]);
} | [
"public",
"function",
"reload",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"info",
"=",
"$",
"this",
"->",
"connection",
"->",
"getMetric",
"(",
"$",
"options",
"+",
"[",
"'metricName'",
"=>",
"$",
"this",
"->... | Triggers a network request to reload the metric's details.
Example:
```
$metric->reload();
$info = $metric->info();
echo $info['description'];
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/get projects.metrics get API documentation.
@codingStandardsI... | [
"Triggers",
"a",
"network",
"request",
"to",
"reload",
"the",
"metric",
"s",
"details",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Logging/src/Metric.php#L196-L201 | train |
googleapis/google-cloud-php | Vision/src/V1/AnnotateImageRequest.php | AnnotateImageRequest.setImage | public function setImage($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Image::class);
$this->image = $var;
return $this;
} | php | public function setImage($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Image::class);
$this->image = $var;
return $this;
} | [
"public",
"function",
"setImage",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Vision",
"\\",
"V1",
"\\",
"Image",
"::",
"class",
")",
";",
"$",
"this",
"->",
"image",
"=",
... | The image to be processed.
Generated from protobuf field <code>.google.cloud.vision.v1.Image image = 1;</code>
@param \Google\Cloud\Vision\V1\Image $var
@return $this | [
"The",
"image",
"to",
"be",
"processed",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/AnnotateImageRequest.php#L75-L81 | train |
googleapis/google-cloud-php | Debugger/src/Daemon.php | Daemon.run | public function run(DebuggerClient $client = null, $asDaemon = true)
{
$client = $client ?: $this->defaultClient();
$extSourceContexts = $this->extSourceContext ? [$this->extSourceContext] : [];
$uniquifier = $this->uniquifier ?: $this->defaultUniquifier();
do {
$debugge... | php | public function run(DebuggerClient $client = null, $asDaemon = true)
{
$client = $client ?: $this->defaultClient();
$extSourceContexts = $this->extSourceContext ? [$this->extSourceContext] : [];
$uniquifier = $this->uniquifier ?: $this->defaultUniquifier();
do {
$debugge... | [
"public",
"function",
"run",
"(",
"DebuggerClient",
"$",
"client",
"=",
"null",
",",
"$",
"asDaemon",
"=",
"true",
")",
"{",
"$",
"client",
"=",
"$",
"client",
"?",
":",
"$",
"this",
"->",
"defaultClient",
"(",
")",
";",
"$",
"extSourceContexts",
"=",
... | Main loop for the daemon. Fetches breakpoints from the DebuggerClient
and stores them in shared storage for the application to read. This
function runs indefinitely.
Example:
```
$daemon->run();
``` | [
"Main",
"loop",
"for",
"the",
"daemon",
".",
"Fetches",
"breakpoints",
"from",
"the",
"DebuggerClient",
"and",
"stores",
"them",
"in",
"shared",
"storage",
"for",
"the",
"application",
"to",
"read",
".",
"This",
"function",
"runs",
"indefinitely",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/Daemon.php#L176-L215 | train |
googleapis/google-cloud-php | Bigtable/src/V2/RowFilter/Condition.php | Condition.setTrueFilter | public function setTrueFilter($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class);
$this->true_filter = $var;
return $this;
} | php | public function setTrueFilter($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class);
$this->true_filter = $var;
return $this;
} | [
"public",
"function",
"setTrueFilter",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Bigtable",
"\\",
"V2",
"\\",
"RowFilter",
"::",
"class",
")",
";",
"$",
"this",
"->",
"true_f... | The filter to apply to the input row if `predicate_filter` returns any
results. If not provided, no results will be returned in the true case.
Generated from protobuf field <code>.google.bigtable.v2.RowFilter true_filter = 2;</code>
@param \Google\Cloud\Bigtable\V2\RowFilter $var
@return $this | [
"The",
"filter",
"to",
"apply",
"to",
"the",
"input",
"row",
"if",
"predicate_filter",
"returns",
"any",
"results",
".",
"If",
"not",
"provided",
"no",
"results",
"will",
"be",
"returned",
"in",
"the",
"true",
"case",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/V2/RowFilter/Condition.php#L117-L123 | train |
googleapis/google-cloud-php | Bigtable/src/V2/RowFilter/Condition.php | Condition.setFalseFilter | public function setFalseFilter($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class);
$this->false_filter = $var;
return $this;
} | php | public function setFalseFilter($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class);
$this->false_filter = $var;
return $this;
} | [
"public",
"function",
"setFalseFilter",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Bigtable",
"\\",
"V2",
"\\",
"RowFilter",
"::",
"class",
")",
";",
"$",
"this",
"->",
"false... | The filter to apply to the input row if `predicate_filter` does not
return any results. If not provided, no results will be returned in the
false case.
Generated from protobuf field <code>.google.bigtable.v2.RowFilter false_filter = 3;</code>
@param \Google\Cloud\Bigtable\V2\RowFilter $var
@return $this | [
"The",
"filter",
"to",
"apply",
"to",
"the",
"input",
"row",
"if",
"predicate_filter",
"does",
"not",
"return",
"any",
"results",
".",
"If",
"not",
"provided",
"no",
"results",
"will",
"be",
"returned",
"in",
"the",
"false",
"case",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/V2/RowFilter/Condition.php#L147-L153 | train |
googleapis/google-cloud-php | Language/src/V1beta2/Gapic/LanguageServiceGapicClient.php | LanguageServiceGapicClient.annotateText | public function annotateText($document, $features, array $optionalArgs = [])
{
$request = new AnnotateTextRequest();
$request->setDocument($document);
$request->setFeatures($features);
if (isset($optionalArgs['encodingType'])) {
$request->setEncodingType($optionalArgs['en... | php | public function annotateText($document, $features, array $optionalArgs = [])
{
$request = new AnnotateTextRequest();
$request->setDocument($document);
$request->setFeatures($features);
if (isset($optionalArgs['encodingType'])) {
$request->setEncodingType($optionalArgs['en... | [
"public",
"function",
"annotateText",
"(",
"$",
"document",
",",
"$",
"features",
",",
"array",
"$",
"optionalArgs",
"=",
"[",
"]",
")",
"{",
"$",
"request",
"=",
"new",
"AnnotateTextRequest",
"(",
")",
";",
"$",
"request",
"->",
"setDocument",
"(",
"$",... | A convenience method that provides all syntax, sentiment, entity, and
classification features in one call.
Sample code:
```
$languageServiceClient = new LanguageServiceClient();
try {
$document = new Document();
$features = new AnnotateTextRequest\Features();
$response = $languageServiceClient->annotateText($document,... | [
"A",
"convenience",
"method",
"that",
"provides",
"all",
"syntax",
"sentiment",
"entity",
"and",
"classification",
"features",
"in",
"one",
"call",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Language/src/V1beta2/Gapic/LanguageServiceGapicClient.php#L462-L477 | train |
googleapis/google-cloud-php | Speech/src/V1p1beta1/RecognitionMetadata.php | RecognitionMetadata.setInteractionType | public function setInteractionType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata_InteractionType::class);
$this->interaction_type = $var;
return $this;
} | php | public function setInteractionType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata_InteractionType::class);
$this->interaction_type = $var;
return $this;
} | [
"public",
"function",
"setInteractionType",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Speech",
"\\",
"V1p1beta1",
"\\",
"RecognitionMetadata_InteractionType",
"::",
"class",
")",
";",
... | The use case most closely describing the audio content to be recognized.
Generated from protobuf field <code>.google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType interaction_type = 1;</code>
@param int $var
@return $this | [
"The",
"use",
"case",
"most",
"closely",
"describing",
"the",
"audio",
"content",
"to",
"be",
"recognized",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Speech/src/V1p1beta1/RecognitionMetadata.php#L142-L148 | train |
googleapis/google-cloud-php | Speech/src/V1p1beta1/RecognitionMetadata.php | RecognitionMetadata.setMicrophoneDistance | public function setMicrophoneDistance($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata_MicrophoneDistance::class);
$this->microphone_distance = $var;
return $this;
} | php | public function setMicrophoneDistance($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata_MicrophoneDistance::class);
$this->microphone_distance = $var;
return $this;
} | [
"public",
"function",
"setMicrophoneDistance",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Speech",
"\\",
"V1p1beta1",
"\\",
"RecognitionMetadata_MicrophoneDistance",
"::",
"class",
")",
... | The audio type that most closely describes the audio being recognized.
Generated from protobuf field <code>.google.cloud.speech.v1p1beta1.RecognitionMetadata.MicrophoneDistance microphone_distance = 4;</code>
@param int $var
@return $this | [
"The",
"audio",
"type",
"that",
"most",
"closely",
"describes",
"the",
"audio",
"being",
"recognized",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Speech/src/V1p1beta1/RecognitionMetadata.php#L200-L206 | train |
googleapis/google-cloud-php | Speech/src/V1p1beta1/RecognitionMetadata.php | RecognitionMetadata.setOriginalMediaType | public function setOriginalMediaType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata_OriginalMediaType::class);
$this->original_media_type = $var;
return $this;
} | php | public function setOriginalMediaType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata_OriginalMediaType::class);
$this->original_media_type = $var;
return $this;
} | [
"public",
"function",
"setOriginalMediaType",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Speech",
"\\",
"V1p1beta1",
"\\",
"RecognitionMetadata_OriginalMediaType",
"::",
"class",
")",
";... | The original media the speech was recorded on.
Generated from protobuf field <code>.google.cloud.speech.v1p1beta1.RecognitionMetadata.OriginalMediaType original_media_type = 5;</code>
@param int $var
@return $this | [
"The",
"original",
"media",
"the",
"speech",
"was",
"recorded",
"on",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Speech/src/V1p1beta1/RecognitionMetadata.php#L226-L232 | train |
googleapis/google-cloud-php | Speech/src/V1p1beta1/RecognitionMetadata.php | RecognitionMetadata.setRecordingDeviceType | public function setRecordingDeviceType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata_RecordingDeviceType::class);
$this->recording_device_type = $var;
return $this;
} | php | public function setRecordingDeviceType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata_RecordingDeviceType::class);
$this->recording_device_type = $var;
return $this;
} | [
"public",
"function",
"setRecordingDeviceType",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Speech",
"\\",
"V1p1beta1",
"\\",
"RecognitionMetadata_RecordingDeviceType",
"::",
"class",
")",
... | The type of device the speech was recorded with.
Generated from protobuf field <code>.google.cloud.speech.v1p1beta1.RecognitionMetadata.RecordingDeviceType recording_device_type = 6;</code>
@param int $var
@return $this | [
"The",
"type",
"of",
"device",
"the",
"speech",
"was",
"recorded",
"with",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Speech/src/V1p1beta1/RecognitionMetadata.php#L252-L258 | train |
googleapis/google-cloud-php | Datastore/src/EntityMapper.php | EntityMapper.responseToEntityProperties | public function responseToEntityProperties(array $entityData, $className = Entity::class)
{
if (!is_subclass_of($className, EntityInterface::class)) {
throw new \InvalidArgumentException(sprintf(
'Class %s must implement EntityInterface.',
$className
)... | php | public function responseToEntityProperties(array $entityData, $className = Entity::class)
{
if (!is_subclass_of($className, EntityInterface::class)) {
throw new \InvalidArgumentException(sprintf(
'Class %s must implement EntityInterface.',
$className
)... | [
"public",
"function",
"responseToEntityProperties",
"(",
"array",
"$",
"entityData",
",",
"$",
"className",
"=",
"Entity",
"::",
"class",
")",
"{",
"if",
"(",
"!",
"is_subclass_of",
"(",
"$",
"className",
",",
"EntityInterface",
"::",
"class",
")",
")",
"{",... | Convert an entity response to properties, excludes and meanings.
@param array $entityData The incoming entity
@param string $className The name of a class to use as the entity. Must
implement {@see Google\Cloud\Datastore\EntityInterface}.
@return array
@throws \InvalidArgumentException If the value of $className does ... | [
"Convert",
"an",
"entity",
"response",
"to",
"properties",
"excludes",
"and",
"meanings",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/EntityMapper.php#L80-L126 | train |
googleapis/google-cloud-php | Datastore/src/EntityMapper.php | EntityMapper.objectToRequest | public function objectToRequest(EntityInterface $entity)
{
$data = $entity->get();
$properties = [];
foreach ($data as $key => $value) {
$exclude = in_array($key, $entity->excludedProperties());
$meaning = (isset($entity->meanings()[$key]))
? $entity-... | php | public function objectToRequest(EntityInterface $entity)
{
$data = $entity->get();
$properties = [];
foreach ($data as $key => $value) {
$exclude = in_array($key, $entity->excludedProperties());
$meaning = (isset($entity->meanings()[$key]))
? $entity-... | [
"public",
"function",
"objectToRequest",
"(",
"EntityInterface",
"$",
"entity",
")",
"{",
"$",
"data",
"=",
"$",
"entity",
"->",
"get",
"(",
")",
";",
"$",
"properties",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"data",
"as",
"$",
"key",
"=>",
"$",
... | Translate an Entity to a datastore representation.
@param EntityInterface $entity The input entity.
@return array A Datastore [Entity](https://cloud.google.com/datastore/reference/rest/v1/Entity) | [
"Translate",
"an",
"Entity",
"to",
"a",
"datastore",
"representation",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/EntityMapper.php#L134-L160 | train |
googleapis/google-cloud-php | Datastore/src/EntityMapper.php | EntityMapper.valueObject | public function valueObject($value, $exclude = false, $meaning = null)
{
switch (gettype($value)) {
case 'boolean':
$propertyValue = [
'booleanValue' => $value
];
break;
case 'integer':
$propertyVal... | php | public function valueObject($value, $exclude = false, $meaning = null)
{
switch (gettype($value)) {
case 'boolean':
$propertyValue = [
'booleanValue' => $value
];
break;
case 'integer':
$propertyVal... | [
"public",
"function",
"valueObject",
"(",
"$",
"value",
",",
"$",
"exclude",
"=",
"false",
",",
"$",
"meaning",
"=",
"null",
")",
"{",
"switch",
"(",
"gettype",
"(",
"$",
"value",
")",
")",
"{",
"case",
"'boolean'",
":",
"$",
"propertyValue",
"=",
"[... | Format values for the API
@param mixed $value
@param bool $exclude [optional] If true, value will be excluded from datastore indexes.
@param int $meaning [optional] The Meaning value. Maintained only for backwards compatibility.
@return array | [
"Format",
"values",
"for",
"the",
"API"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/EntityMapper.php#L315-L401 | train |
googleapis/google-cloud-php | Datastore/src/EntityMapper.php | EntityMapper.objectProperty | public function objectProperty($value)
{
switch (true) {
case $value instanceof Int64:
return [
'integerValue' => $value->get()
];
break;
case $value instanceof Blob:
return [
'bl... | php | public function objectProperty($value)
{
switch (true) {
case $value instanceof Int64:
return [
'integerValue' => $value->get()
];
break;
case $value instanceof Blob:
return [
'bl... | [
"public",
"function",
"objectProperty",
"(",
"$",
"value",
")",
"{",
"switch",
"(",
"true",
")",
"{",
"case",
"$",
"value",
"instanceof",
"Int64",
":",
"return",
"[",
"'integerValue'",
"=>",
"$",
"value",
"->",
"get",
"(",
")",
"]",
";",
"break",
";",
... | Convert different object types to API values
@todo add middleware
@param mixed $value The value object
@return array | [
"Convert",
"different",
"object",
"types",
"to",
"API",
"values"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/EntityMapper.php#L411-L467 | train |
googleapis/google-cloud-php | Datastore/src/EntityMapper.php | EntityMapper.convertArrayToArrayValue | private function convertArrayToArrayValue(array $value)
{
$values = [];
foreach ($value as $val) {
// ListValues may not contain nested ListValues.
// Therefore, if an empty array is provided as part of an array,
// we can encode it as an EntityValue.
... | php | private function convertArrayToArrayValue(array $value)
{
$values = [];
foreach ($value as $val) {
// ListValues may not contain nested ListValues.
// Therefore, if an empty array is provided as part of an array,
// we can encode it as an EntityValue.
... | [
"private",
"function",
"convertArrayToArrayValue",
"(",
"array",
"$",
"value",
")",
"{",
"$",
"values",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"value",
"as",
"$",
"val",
")",
"{",
"// ListValues may not contain nested ListValues.",
"// Therefore, if an empty array... | Convert a non-associative array to a datastore arrayValue type
@param array $value The input array
@return array The arrayValue property | [
"Convert",
"a",
"non",
"-",
"associative",
"array",
"to",
"a",
"datastore",
"arrayValue",
"type"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/EntityMapper.php#L475-L494 | train |
googleapis/google-cloud-php | Datastore/src/EntityMapper.php | EntityMapper.convertArrayToEntityValue | private function convertArrayToEntityValue(array $value)
{
$excludes = $this->pluck(Entity::EXCLUDE_FROM_INDEXES, $value, false) ?: [];
$properties = [];
foreach ($value as $key => $val) {
$properties[$key] = $this->valueObject(
$val,
in_array($ke... | php | private function convertArrayToEntityValue(array $value)
{
$excludes = $this->pluck(Entity::EXCLUDE_FROM_INDEXES, $value, false) ?: [];
$properties = [];
foreach ($value as $key => $val) {
$properties[$key] = $this->valueObject(
$val,
in_array($ke... | [
"private",
"function",
"convertArrayToEntityValue",
"(",
"array",
"$",
"value",
")",
"{",
"$",
"excludes",
"=",
"$",
"this",
"->",
"pluck",
"(",
"Entity",
"::",
"EXCLUDE_FROM_INDEXES",
",",
"$",
"value",
",",
"false",
")",
"?",
":",
"[",
"]",
";",
"$",
... | Convert an associative array to a datastore entityValue type
@param array $value The input array
@return array The entityValue property | [
"Convert",
"an",
"associative",
"array",
"to",
"a",
"datastore",
"entityValue",
"type"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/EntityMapper.php#L502-L523 | train |
googleapis/google-cloud-php | Datastore/src/EntityMapper.php | EntityMapper.getPropertyValue | private function getPropertyValue(array $property, $className = Entity::class)
{
$type = $this->getValueType($property);
return $this->convertValue($type, $property[$type], $className);
} | php | private function getPropertyValue(array $property, $className = Entity::class)
{
$type = $this->getValueType($property);
return $this->convertValue($type, $property[$type], $className);
} | [
"private",
"function",
"getPropertyValue",
"(",
"array",
"$",
"property",
",",
"$",
"className",
"=",
"Entity",
"::",
"class",
")",
"{",
"$",
"type",
"=",
"$",
"this",
"->",
"getValueType",
"(",
"$",
"property",
")",
";",
"return",
"$",
"this",
"->",
"... | Determine the property type and return a converted value
@param array $property The API property
@param string $className [optional] The type to decode into, if property is an entity.
@return mixed | [
"Determine",
"the",
"property",
"type",
"and",
"return",
"a",
"converted",
"value"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/EntityMapper.php#L549-L553 | train |
googleapis/google-cloud-php | Datastore/src/EntityMapper.php | EntityMapper.getValueType | private function getValueType(array $value)
{
$keys = array_keys($value);
$types = array_values(array_filter($keys, function ($key) {
return strpos($key, 'Value') !== false;
}));
if (!empty($types)) {
return $types[0];
}
throw new \RuntimeExc... | php | private function getValueType(array $value)
{
$keys = array_keys($value);
$types = array_values(array_filter($keys, function ($key) {
return strpos($key, 'Value') !== false;
}));
if (!empty($types)) {
return $types[0];
}
throw new \RuntimeExc... | [
"private",
"function",
"getValueType",
"(",
"array",
"$",
"value",
")",
"{",
"$",
"keys",
"=",
"array_keys",
"(",
"$",
"value",
")",
";",
"$",
"types",
"=",
"array_values",
"(",
"array_filter",
"(",
"$",
"keys",
",",
"function",
"(",
"$",
"key",
")",
... | Get the value type from a value object.
@param array $value
@return string
@throws RuntimeException | [
"Get",
"the",
"value",
"type",
"from",
"a",
"value",
"object",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/EntityMapper.php#L562-L574 | train |
googleapis/google-cloud-php | Firestore/src/V1/ListenRequest.php | ListenRequest.setAddTarget | public function setAddTarget($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target::class);
$this->writeOneof(2, $var);
return $this;
} | php | public function setAddTarget($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target::class);
$this->writeOneof(2, $var);
return $this;
} | [
"public",
"function",
"setAddTarget",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"V1",
"\\",
"Target",
"::",
"class",
")",
";",
"$",
"this",
"->",
"writeOneo... | A target to add to this stream.
Generated from protobuf field <code>.google.firestore.v1.Target add_target = 2;</code>
@param \Google\Cloud\Firestore\V1\Target $var
@return $this | [
"A",
"target",
"to",
"add",
"to",
"this",
"stream",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1/ListenRequest.php#L101-L107 | train |
googleapis/google-cloud-php | Container/src/V1/ClusterManagerGrpcClient.php | ClusterManagerGrpcClient.DeleteCluster | public function DeleteCluster(\Google\Cloud\Container\V1\DeleteClusterRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.container.v1.ClusterManager/DeleteCluster',
$argument,
['\Google\Cloud\Container\V1\Operation', 'decode'],
$metadata, $opt... | php | public function DeleteCluster(\Google\Cloud\Container\V1\DeleteClusterRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.container.v1.ClusterManager/DeleteCluster',
$argument,
['\Google\Cloud\Container\V1\Operation', 'decode'],
$metadata, $opt... | [
"public",
"function",
"DeleteCluster",
"(",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"DeleteClusterRequest",
"$",
"argument",
",",
"$",
"metadata",
"=",
"[",
"]",
",",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"... | Deletes the cluster, including the Kubernetes endpoint and all worker
nodes.
Firewalls and routes that were configured during cluster creation
are also deleted.
Other Google Compute Engine resources that might be in use by the cluster
(e.g. load balancer resources) will not be deleted if they weren't present
at the i... | [
"Deletes",
"the",
"cluster",
"including",
"the",
"Kubernetes",
"endpoint",
"and",
"all",
"worker",
"nodes",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/ClusterManagerGrpcClient.php#L233-L239 | train |
googleapis/google-cloud-php | Container/src/V1/ClusterManagerGrpcClient.php | ClusterManagerGrpcClient.RollbackNodePoolUpgrade | public function RollbackNodePoolUpgrade(\Google\Cloud\Container\V1\RollbackNodePoolUpgradeRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.container.v1.ClusterManager/RollbackNodePoolUpgrade',
$argument,
['\Google\Cloud\Container\V1\Operation', 'dec... | php | public function RollbackNodePoolUpgrade(\Google\Cloud\Container\V1\RollbackNodePoolUpgradeRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.container.v1.ClusterManager/RollbackNodePoolUpgrade',
$argument,
['\Google\Cloud\Container\V1\Operation', 'dec... | [
"public",
"function",
"RollbackNodePoolUpgrade",
"(",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"RollbackNodePoolUpgradeRequest",
"$",
"argument",
",",
"$",
"metadata",
"=",
"[",
"]",
",",
"$",
"options",
"=",
"[",
"]",
")",
"{",
... | Roll back the previously Aborted or Failed NodePool upgrade.
This will be an no-op if the last upgrade successfully completed.
@param \Google\Cloud\Container\V1\RollbackNodePoolUpgradeRequest $argument input argument
@param array $metadata metadata
@param array $options call options | [
"Roll",
"back",
"the",
"previously",
"Aborted",
"or",
"Failed",
"NodePool",
"upgrade",
".",
"This",
"will",
"be",
"an",
"no",
"-",
"op",
"if",
"the",
"last",
"upgrade",
"successfully",
"completed",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/ClusterManagerGrpcClient.php#L360-L366 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/SentimentAnalysisResult.php | SentimentAnalysisResult.setQueryTextSentiment | public function setQueryTextSentiment($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Sentiment::class);
$this->query_text_sentiment = $var;
return $this;
} | php | public function setQueryTextSentiment($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Sentiment::class);
$this->query_text_sentiment = $var;
return $this;
} | [
"public",
"function",
"setQueryTextSentiment",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"Sentiment",
"::",
"class",
")",
";",
"$",
"this",
"->",... | The sentiment analysis result for `query_text`.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Sentiment query_text_sentiment = 1;</code>
@param \Google\Cloud\Dialogflow\V2\Sentiment $var
@return $this | [
"The",
"sentiment",
"analysis",
"result",
"for",
"query_text",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/SentimentAnalysisResult.php#L59-L65 | train |
googleapis/google-cloud-php | Language/src/V1/LanguageServiceGrpcClient.php | LanguageServiceGrpcClient.AnnotateText | public function AnnotateText(\Google\Cloud\Language\V1\AnnotateTextRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.language.v1.LanguageService/AnnotateText',
$argument,
['\Google\Cloud\Language\V1\AnnotateTextResponse', 'decode'],
$me... | php | public function AnnotateText(\Google\Cloud\Language\V1\AnnotateTextRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.language.v1.LanguageService/AnnotateText',
$argument,
['\Google\Cloud\Language\V1\AnnotateTextResponse', 'decode'],
$me... | [
"public",
"function",
"AnnotateText",
"(",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Language",
"\\",
"V1",
"\\",
"AnnotateTextRequest",
"$",
"argument",
",",
"$",
"metadata",
"=",
"[",
"]",
",",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"thi... | A convenience method that provides all the features that analyzeSentiment,
analyzeEntities, and analyzeSyntax provide in one call.
@param \Google\Cloud\Language\V1\AnnotateTextRequest $argument input argument
@param array $metadata metadata
@param array $options call options | [
"A",
"convenience",
"method",
"that",
"provides",
"all",
"the",
"features",
"that",
"analyzeSentiment",
"analyzeEntities",
"and",
"analyzeSyntax",
"provide",
"in",
"one",
"call",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Language/src/V1/LanguageServiceGrpcClient.php#L119-L125 | train |
googleapis/google-cloud-php | Spanner/src/Session/Session.php | Session.exists | public function exists(array $options = [])
{
try {
$this->connection->getSession($options + [
'name' => $this->name(),
'database' => $this->database
]);
return true;
} catch (NotFoundException $e) {
return false;
... | php | public function exists(array $options = [])
{
try {
$this->connection->getSession($options + [
'name' => $this->name(),
'database' => $this->database
]);
return true;
} catch (NotFoundException $e) {
return false;
... | [
"public",
"function",
"exists",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"try",
"{",
"$",
"this",
"->",
"connection",
"->",
"getSession",
"(",
"$",
"options",
"+",
"[",
"'name'",
"=>",
"$",
"this",
"->",
"name",
"(",
")",
",",
"'datab... | Check if the session exists.
@param array $options [optional] Configuration options.
@return bool | [
"Check",
"if",
"the",
"session",
"exists",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Session/Session.php#L101-L113 | train |
googleapis/google-cloud-php | Spanner/src/Session/Session.php | Session.delete | public function delete(array $options = [])
{
return $this->connection->deleteSession($options + [
'name' => $this->name(),
'database' => $this->database
]);
} | php | public function delete(array $options = [])
{
return $this->connection->deleteSession($options + [
'name' => $this->name(),
'database' => $this->database
]);
} | [
"public",
"function",
"delete",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"connection",
"->",
"deleteSession",
"(",
"$",
"options",
"+",
"[",
"'name'",
"=>",
"$",
"this",
"->",
"name",
"(",
")",
",",
"'databa... | Delete the session.
@param array $options [optional] Configuration options.
@return void | [
"Delete",
"the",
"session",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Session/Session.php#L121-L127 | train |
googleapis/google-cloud-php | Spanner/src/Session/Session.php | Session.name | public function name()
{
return SpannerClient::sessionName(
$this->projectId,
$this->instance,
$this->database,
$this->name
);
} | php | public function name()
{
return SpannerClient::sessionName(
$this->projectId,
$this->instance,
$this->database,
$this->name
);
} | [
"public",
"function",
"name",
"(",
")",
"{",
"return",
"SpannerClient",
"::",
"sessionName",
"(",
"$",
"this",
"->",
"projectId",
",",
"$",
"this",
"->",
"instance",
",",
"$",
"this",
"->",
"database",
",",
"$",
"this",
"->",
"name",
")",
";",
"}"
] | Format the constituent parts of a session name into a fully qualified session name.
@return string | [
"Format",
"the",
"constituent",
"parts",
"of",
"a",
"session",
"name",
"into",
"a",
"fully",
"qualified",
"session",
"name",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Session/Session.php#L134-L142 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/Agent.php | Agent.setMatchMode | public function setMatchMode($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Agent_MatchMode::class);
$this->match_mode = $var;
return $this;
} | php | public function setMatchMode($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Agent_MatchMode::class);
$this->match_mode = $var;
return $this;
} | [
"public",
"function",
"setMatchMode",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"Agent_MatchMode",
"::",
"class",
")",
";",
"$",
"this",
"->",
"ma... | Optional. Determines how intents are detected from user queries.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Agent.MatchMode match_mode = 9;</code>
@param int $var
@return $this | [
"Optional",
".",
"Determines",
"how",
"intents",
"are",
"detected",
"from",
"user",
"queries",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Agent.php#L402-L408 | train |
googleapis/google-cloud-php | Firestore/src/WriteBatch.php | WriteBatch.create | public function create($document, array $fields, array $options = [])
{
// Record whether the document is empty before any filtering.
$emptyDocument = count($fields) === 0;
list ($fields, $sentinels, $metadata) = $this->filterFields($fields);
if ($metadata['hasDelete']) {
... | php | public function create($document, array $fields, array $options = [])
{
// Record whether the document is empty before any filtering.
$emptyDocument = count($fields) === 0;
list ($fields, $sentinels, $metadata) = $this->filterFields($fields);
if ($metadata['hasDelete']) {
... | [
"public",
"function",
"create",
"(",
"$",
"document",
",",
"array",
"$",
"fields",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"// Record whether the document is empty before any filtering.",
"$",
"emptyDocument",
"=",
"count",
"(",
"$",
"fields",
")"... | Enqueue a document creation.
This operation will fail (when committed) if the document already exists.
Example:
```
$batch->create($documentName, [
'name' => 'John'
]);
```
@param DocumentReference|string $document The document to target, either
as a string document name, or DocumentReference object. Please
note tha... | [
"Enqueue",
"a",
"document",
"creation",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/WriteBatch.php#L122-L156 | train |
googleapis/google-cloud-php | Firestore/src/WriteBatch.php | WriteBatch.set | public function set($document, array $fields, array $options = [])
{
$merge = $this->pluck('merge', $options, false) ?: false;
// Record whether the document is empty before any filtering.
$emptyDocument = count($fields) === 0;
list ($fields, $sentinels, $metadata) = $this->filterF... | php | public function set($document, array $fields, array $options = [])
{
$merge = $this->pluck('merge', $options, false) ?: false;
// Record whether the document is empty before any filtering.
$emptyDocument = count($fields) === 0;
list ($fields, $sentinels, $metadata) = $this->filterF... | [
"public",
"function",
"set",
"(",
"$",
"document",
",",
"array",
"$",
"fields",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"merge",
"=",
"$",
"this",
"->",
"pluck",
"(",
"'merge'",
",",
"$",
"options",
",",
"false",
")",
"?",
":"... | Enqueue a set mutation.
Unless `$options['merge']` is set to `true, this method replaces all
fields in a Firestore document.
Example:
```
$batch->set($documentName, [
'name' => 'John'
]);
@codingStandardsIgnoreStart
@param DocumentReference|string $document The document to target, either
as a string document name, o... | [
"Enqueue",
"a",
"set",
"mutation",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/WriteBatch.php#L192-L237 | train |
googleapis/google-cloud-php | Firestore/src/WriteBatch.php | WriteBatch.commit | public function commit(array $options = [])
{
unset($options['merge'], $options['precondition']);
$response = $this->connection->commit(array_filter([
'database' => $this->database,
'writes' => $this->writes,
'transaction' => $this->transaction
]) + $opti... | php | public function commit(array $options = [])
{
unset($options['merge'], $options['precondition']);
$response = $this->connection->commit(array_filter([
'database' => $this->database,
'writes' => $this->writes,
'transaction' => $this->transaction
]) + $opti... | [
"public",
"function",
"commit",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"unset",
"(",
"$",
"options",
"[",
"'merge'",
"]",
",",
"$",
"options",
"[",
"'precondition'",
"]",
")",
";",
"$",
"response",
"=",
"$",
"this",
"->",
"connection"... | Commit writes to the database.
Example:
```
$batch->commit();
```
@codingStandardsIgnoreStart
@see https://firebase.google.com/docs/firestore/reference/rpc/google.firestore.v1beta1#google.firestore.v1beta1.Firestore.Commit Commit
@param array $options Configuration Options
@return array [https://firebase.google.com/... | [
"Commit",
"writes",
"to",
"the",
"database",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/WriteBatch.php#L430-L455 | train |
googleapis/google-cloud-php | Firestore/src/WriteBatch.php | WriteBatch.enqueueTransforms | private function enqueueTransforms($document, array $transforms, array $options = [])
{
$operations = [];
foreach ($transforms as $transform) {
if (!($transform instanceof DocumentTransformInterface)) {
continue;
}
$args = $transform->args();
... | php | private function enqueueTransforms($document, array $transforms, array $options = [])
{
$operations = [];
foreach ($transforms as $transform) {
if (!($transform instanceof DocumentTransformInterface)) {
continue;
}
$args = $transform->args();
... | [
"private",
"function",
"enqueueTransforms",
"(",
"$",
"document",
",",
"array",
"$",
"transforms",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"operations",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"transforms",
"as",
"$",
"transform",
... | Enqueue transforms for CREATE, UPDATE, and SET calls.
@param DocumentReference|string $document The document to target, either
as a string document name, or DocumentReference object.
@param DocumentTransformInterface[] $transforms
@param array $options
@return void | [
"Enqueue",
"transforms",
"for",
"CREATE",
"UPDATE",
"and",
"SET",
"calls",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/WriteBatch.php#L502-L531 | train |
googleapis/google-cloud-php | Firestore/src/WriteBatch.php | WriteBatch.validatePrecondition | private function validatePrecondition(array &$options)
{
$precondition = isset($options['precondition'])
? $options['precondition']
: null;
if (!$precondition) {
return;
}
if (isset($precondition['exists'])) {
return $precondition;
... | php | private function validatePrecondition(array &$options)
{
$precondition = isset($options['precondition'])
? $options['precondition']
: null;
if (!$precondition) {
return;
}
if (isset($precondition['exists'])) {
return $precondition;
... | [
"private",
"function",
"validatePrecondition",
"(",
"array",
"&",
"$",
"options",
")",
"{",
"$",
"precondition",
"=",
"isset",
"(",
"$",
"options",
"[",
"'precondition'",
"]",
")",
"?",
"$",
"options",
"[",
"'precondition'",
"]",
":",
"null",
";",
"if",
... | Validates a document precondition, if set.
@codingStandardsIgnoreStart
@param array $options Configuration Options
@return array [Precondition](https://firebase.google.com/docs/firestore/reference/rpc/google.firestore.v1beta1#google.firestore.v1beta1.Precondition)
@throws \InvalidArgumentException If the precondition ... | [
"Validates",
"a",
"document",
"precondition",
"if",
"set",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/WriteBatch.php#L574-L601 | train |
googleapis/google-cloud-php | Firestore/src/WriteBatch.php | WriteBatch.createDatabaseWriteOperation | private function createDatabaseWriteOperation($type, $document, array $options = [])
{
switch ($type) {
case self::TYPE_UPDATE:
return [
'update' => [
'name' => $document,
'fields' => $this->pluck('fields', $opti... | php | private function createDatabaseWriteOperation($type, $document, array $options = [])
{
switch ($type) {
case self::TYPE_UPDATE:
return [
'update' => [
'name' => $document,
'fields' => $this->pluck('fields', $opti... | [
"private",
"function",
"createDatabaseWriteOperation",
"(",
"$",
"type",
",",
"$",
"document",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"switch",
"(",
"$",
"type",
")",
"{",
"case",
"self",
"::",
"TYPE_UPDATE",
":",
"return",
"[",
"'update'... | Create the write operation object.
@param string $type The write type.
@param string $document The document to target, either
as a string document name, or DocumentReference object.
@param array $options Configuration Options.
@return array
@throws \InvalidArgumentException If $type is not a valid value. | [
"Create",
"the",
"write",
"operation",
"object",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/WriteBatch.php#L613-L647 | train |
googleapis/google-cloud-php | Firestore/src/WriteBatch.php | WriteBatch.formatPrecondition | private function formatPrecondition(array $options, $mustExist = false)
{
if (!isset($options['precondition']) && !$mustExist) {
return $options;
}
$precondition = isset($options['precondition'])
? $options['precondition']
: [];
if (isset($precon... | php | private function formatPrecondition(array $options, $mustExist = false)
{
if (!isset($options['precondition']) && !$mustExist) {
return $options;
}
$precondition = isset($options['precondition'])
? $options['precondition']
: [];
if (isset($precon... | [
"private",
"function",
"formatPrecondition",
"(",
"array",
"$",
"options",
",",
"$",
"mustExist",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"options",
"[",
"'precondition'",
"]",
")",
"&&",
"!",
"$",
"mustExist",
")",
"{",
"return",
"$... | Correctly formats a precondition for a write.
@param array $options Configuration options input.
@param bool $mustExist If true, the precondition will always include at
least `exists=true` precondition. **Defaults to** `false`.
@return array Modified configuration options. | [
"Correctly",
"formats",
"a",
"precondition",
"for",
"a",
"write",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/WriteBatch.php#L785-L806 | train |
googleapis/google-cloud-php | Firestore/src/WriteBatch.php | WriteBatch.checkPrefixes | private function checkPrefixes(array $paths)
{
sort($paths);
for ($i = 1; $i < count($paths); $i++) {
$prefix = $paths[$i-1];
$suffix = $paths[$i];
$prefix = explode('.', $prefix);
$suffix = explode('.', $suffix);
$isPrefix = count($pref... | php | private function checkPrefixes(array $paths)
{
sort($paths);
for ($i = 1; $i < count($paths); $i++) {
$prefix = $paths[$i-1];
$suffix = $paths[$i];
$prefix = explode('.', $prefix);
$suffix = explode('.', $suffix);
$isPrefix = count($pref... | [
"private",
"function",
"checkPrefixes",
"(",
"array",
"$",
"paths",
")",
"{",
"sort",
"(",
"$",
"paths",
")",
";",
"for",
"(",
"$",
"i",
"=",
"1",
";",
"$",
"i",
"<",
"count",
"(",
"$",
"paths",
")",
";",
"$",
"i",
"++",
")",
"{",
"$",
"prefi... | Check list of FieldPaths for prefix paths and throw exception.
@param string[] $paths
@throws \InvalidArgumentException If prefix paths are found. | [
"Check",
"list",
"of",
"FieldPaths",
"for",
"prefix",
"paths",
"and",
"throw",
"exception",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/WriteBatch.php#L892-L916 | train |
googleapis/google-cloud-php | Container/src/V1/NetworkPolicy.php | NetworkPolicy.setProvider | public function setProvider($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Container\V1\NetworkPolicy_Provider::class);
$this->provider = $var;
return $this;
} | php | public function setProvider($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Container\V1\NetworkPolicy_Provider::class);
$this->provider = $var;
return $this;
} | [
"public",
"function",
"setProvider",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"NetworkPolicy_Provider",
"::",
"class",
")",
";",
"$",
"this",
"->",
... | The selected network policy provider.
Generated from protobuf field <code>.google.container.v1.NetworkPolicy.Provider provider = 1;</code>
@param int $var
@return $this | [
"The",
"selected",
"network",
"policy",
"provider",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/NetworkPolicy.php#L67-L73 | train |
googleapis/google-cloud-php | Monitoring/src/V3/CreateNotificationChannelRequest.php | CreateNotificationChannelRequest.setNotificationChannel | public function setNotificationChannel($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\NotificationChannel::class);
$this->notification_channel = $var;
return $this;
} | php | public function setNotificationChannel($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\NotificationChannel::class);
$this->notification_channel = $var;
return $this;
} | [
"public",
"function",
"setNotificationChannel",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Monitoring",
"\\",
"V3",
"\\",
"NotificationChannel",
"::",
"class",
")",
";",
"$",
"thi... | The definition of the `NotificationChannel` to create.
Generated from protobuf field <code>.google.monitoring.v3.NotificationChannel notification_channel = 2;</code>
@param \Google\Cloud\Monitoring\V3\NotificationChannel $var
@return $this | [
"The",
"definition",
"of",
"the",
"NotificationChannel",
"to",
"create",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Monitoring/src/V3/CreateNotificationChannelRequest.php#L112-L118 | train |
googleapis/google-cloud-php | Firestore/src/V1/StructuredQuery/UnaryFilter.php | UnaryFilter.setOp | public function setOp($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery_UnaryFilter_Operator::class);
$this->op = $var;
return $this;
} | php | public function setOp($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery_UnaryFilter_Operator::class);
$this->op = $var;
return $this;
} | [
"public",
"function",
"setOp",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"V1",
"\\",
"StructuredQuery_UnaryFilter_Operator",
"::",
"class",
")",
";",
"$",
"this",
... | The unary operator to apply.
Generated from protobuf field <code>.google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1;</code>
@param int $var
@return $this | [
"The",
"unary",
"operator",
"to",
"apply",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1/StructuredQuery/UnaryFilter.php#L61-L67 | train |
googleapis/google-cloud-php | Dlp/src/V2/ListInspectTemplatesResponse.php | ListInspectTemplatesResponse.setInspectTemplates | public function setInspectTemplates($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\InspectTemplate::class);
$this->inspect_templates = $arr;
return $this;
} | php | public function setInspectTemplates($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\InspectTemplate::class);
$this->inspect_templates = $arr;
return $this;
} | [
"public",
"function",
"setInspectTemplates",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",... | List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
Generated from protobuf field <code>repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1;</code>
@param \Google\Cloud\Dlp\V2\InspectTemplate[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"List",
"of",
"inspectTemplates",
"up",
"to",
"page_size",
"in",
"ListInspectTemplatesRequest",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/ListInspectTemplatesResponse.php#L68-L74 | train |
googleapis/google-cloud-php | Container/src/V1/SetMasterAuthRequest.php | SetMasterAuthRequest.setAction | public function setAction($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Container\V1\SetMasterAuthRequest_Action::class);
$this->action = $var;
return $this;
} | php | public function setAction($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Container\V1\SetMasterAuthRequest_Action::class);
$this->action = $var;
return $this;
} | [
"public",
"function",
"setAction",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"SetMasterAuthRequest_Action",
"::",
"class",
")",
";",
"$",
"this",
"->... | The exact form of action to be taken on the master auth.
Generated from protobuf field <code>.google.container.v1.SetMasterAuthRequest.Action action = 4;</code>
@param int $var
@return $this | [
"The",
"exact",
"form",
"of",
"action",
"to",
"be",
"taken",
"on",
"the",
"master",
"auth",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/SetMasterAuthRequest.php#L202-L208 | train |
googleapis/google-cloud-php | Container/src/V1/SetMasterAuthRequest.php | SetMasterAuthRequest.setUpdate | public function setUpdate($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\MasterAuth::class);
$this->update = $var;
return $this;
} | php | public function setUpdate($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\MasterAuth::class);
$this->update = $var;
return $this;
} | [
"public",
"function",
"setUpdate",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"MasterAuth",
"::",
"class",
")",
";",
"$",
"this",
"->",
"update",... | A description of the update.
Generated from protobuf field <code>.google.container.v1.MasterAuth update = 5;</code>
@param \Google\Cloud\Container\V1\MasterAuth $var
@return $this | [
"A",
"description",
"of",
"the",
"update",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/SetMasterAuthRequest.php#L228-L234 | train |
googleapis/google-cloud-php | Talent/src/V4beta1/EducationRecord.php | EducationRecord.setStructuredDegree | public function setStructuredDegree($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\Degree::class);
$this->writeOneof(7, $var);
return $this;
} | php | public function setStructuredDegree($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\Degree::class);
$this->writeOneof(7, $var);
return $this;
} | [
"public",
"function",
"setStructuredDegree",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Talent",
"\\",
"V4beta1",
"\\",
"Degree",
"::",
"class",
")",
";",
"$",
"this",
"->",
"... | Optional.
The structured notation of the degree.
Generated from protobuf field <code>.google.cloud.talent.v4beta1.Degree structured_degree = 7;</code>
@param \Google\Cloud\Talent\V4beta1\Degree $var
@return $this | [
"Optional",
".",
"The",
"structured",
"notation",
"of",
"the",
"degree",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/EducationRecord.php#L345-L351 | train |
googleapis/google-cloud-php | Debugger/src/V2/Variable.php | Variable.setMembers | public function setMembers($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Debugger\V2\Variable::class);
$this->members = $arr;
return $this;
} | php | public function setMembers($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Debugger\V2\Variable::class);
$this->members = $arr;
return $this;
} | [
"public",
"function",
"setMembers",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\",
... | Members contained or pointed to by the variable.
Generated from protobuf field <code>repeated .google.devtools.clouddebugger.v2.Variable members = 3;</code>
@param \Google\Cloud\Debugger\V2\Variable[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Members",
"contained",
"or",
"pointed",
"to",
"by",
"the",
"variable",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/V2/Variable.php#L299-L305 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/Intent.php | Intent.setWebhookState | public function setWebhookState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent_WebhookState::class);
$this->webhook_state = $var;
return $this;
} | php | public function setWebhookState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent_WebhookState::class);
$this->webhook_state = $var;
return $this;
} | [
"public",
"function",
"setWebhookState",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"Intent_WebhookState",
"::",
"class",
")",
";",
"$",
"this",
"->"... | Optional. Indicates whether webhooks are enabled for the intent.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6;</code>
@param int $var
@return $this | [
"Optional",
".",
"Indicates",
"whether",
"webhooks",
"are",
"enabled",
"for",
"the",
"intent",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Intent.php#L316-L322 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/Intent.php | Intent.setEvents | public function setEvents($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->events = $arr;
return $this;
} | php | public function setEvents($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->events = $arr;
return $this;
} | [
"public",
"function",
"setEvents",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"STRING",
")",
";",
"$",
"this",
"->"... | Optional. The collection of event names that trigger the intent.
If the collection of input contexts is not empty, all of the contexts must
be present in the active user session for an event to trigger this intent.
Generated from protobuf field <code>repeated string events = 8;</code>
@param string[]|\Google\Protobuf\... | [
"Optional",
".",
"The",
"collection",
"of",
"event",
"names",
"that",
"trigger",
"the",
"intent",
".",
"If",
"the",
"collection",
"of",
"input",
"contexts",
"is",
"not",
"empty",
"all",
"of",
"the",
"contexts",
"must",
"be",
"present",
"in",
"the",
"active... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Intent.php#L466-L472 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.