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
Spanner/src/Operation.php
Operation.executeUpdate
public function executeUpdate( Session $session, Transaction $transaction, $sql, array $options = [] ) { $res = $this->execute($session, $sql, [ 'transactionId' => $transaction->id() ] + $options); // Iterate through the result to ensure we have q...
php
public function executeUpdate( Session $session, Transaction $transaction, $sql, array $options = [] ) { $res = $this->execute($session, $sql, [ 'transactionId' => $transaction->id() ] + $options); // Iterate through the result to ensure we have q...
[ "public", "function", "executeUpdate", "(", "Session", "$", "session", ",", "Transaction", "$", "transaction", ",", "$", "sql", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "res", "=", "$", "this", "->", "execute", "(", "$", "session", ...
Execute a DML statement and return an affected row count. @param Session $session The session in which the update operation should be executed. @param Transaction $transaction The transaction in which the operation should be executed. @param string $sql The SQL string to execute. @param array $options Configuration op...
[ "Execute", "a", "DML", "statement", "and", "return", "an", "affected", "row", "count", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Operation.php#L207-L232
train
googleapis/google-cloud-php
Spanner/src/Operation.php
Operation.read
public function read(Session $session, $table, KeySet $keySet, array $columns, array $options = []) { $options += [ 'index' => null, 'limit' => null, 'offset' => null, 'transactionContext' => null ]; $context = $this->pluck('transactionContext...
php
public function read(Session $session, $table, KeySet $keySet, array $columns, array $options = []) { $options += [ 'index' => null, 'limit' => null, 'offset' => null, 'transactionContext' => null ]; $context = $this->pluck('transactionContext...
[ "public", "function", "read", "(", "Session", "$", "session", ",", "$", "table", ",", "KeySet", "$", "keySet", ",", "array", "$", "columns", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "options", "+=", "[", "'index'", "=>", "null", ...
Lookup rows in a database. @param Session $session The session in which to read data. @param string $table The table name. @param KeySet $keySet The KeySet to select rows. @param array $columns A list of column names to return. @param array $options [optional] { Configuration Options. @type string $index The name of ...
[ "Lookup", "rows", "in", "a", "database", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Operation.php#L315-L341
train
googleapis/google-cloud-php
Spanner/src/Operation.php
Operation.createTransaction
public function createTransaction(Session $session, array $res = [], array $options = []) { $res += [ 'id' => null ]; $options['isRetry'] = isset($options['isRetry']) ? $options['isRetry'] : false; return new Transaction($this, $session, $res['id...
php
public function createTransaction(Session $session, array $res = [], array $options = []) { $res += [ 'id' => null ]; $options['isRetry'] = isset($options['isRetry']) ? $options['isRetry'] : false; return new Transaction($this, $session, $res['id...
[ "public", "function", "createTransaction", "(", "Session", "$", "session", ",", "array", "$", "res", "=", "[", "]", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "res", "+=", "[", "'id'", "=>", "null", "]", ";", "$", "options", "[", ...
Create a Transaction instance from a response object. @param Session $session The session the transaction belongs to. @param array $res [optional] The createTransaction response. @param array $options [optional] Options for the transaction object. @return Transaction
[ "Create", "a", "Transaction", "instance", "from", "a", "response", "object", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Operation.php#L386-L397
train
googleapis/google-cloud-php
Spanner/src/Operation.php
Operation.snapshot
public function snapshot(Session $session, array $options = []) { $options += [ 'singleUse' => false, 'className' => Snapshot::class ]; if (!$options['singleUse']) { $res = $this->beginTransaction($session, $options); } else { $res = [...
php
public function snapshot(Session $session, array $options = []) { $options += [ 'singleUse' => false, 'className' => Snapshot::class ]; if (!$options['singleUse']) { $res = $this->beginTransaction($session, $options); } else { $res = [...
[ "public", "function", "snapshot", "(", "Session", "$", "session", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "options", "+=", "[", "'singleUse'", "=>", "false", ",", "'className'", "=>", "Snapshot", "::", "class", "]", ";", "if", "(", ...
Create a read-only snapshot transaction. @see https://cloud.google.com/spanner/reference/rpc/google.spanner.v1#google.spanner.v1.BeginTransactionRequest BeginTransactionRequest @param Session $session The session to start the snapshot in. @param array $options [optional] { Configuration Options. @type bool $singleUs...
[ "Create", "a", "read", "-", "only", "snapshot", "transaction", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Operation.php#L418-L437
train
googleapis/google-cloud-php
Spanner/src/Operation.php
Operation.createSnapshot
public function createSnapshot(Session $session, array $res = [], $className = Snapshot::class) { $res += [ 'id' => null, 'readTimestamp' => null ]; if ($res['readTimestamp']) { if (!($res['readTimestamp'] instanceof Timestamp)) { $time = ...
php
public function createSnapshot(Session $session, array $res = [], $className = Snapshot::class) { $res += [ 'id' => null, 'readTimestamp' => null ]; if ($res['readTimestamp']) { if (!($res['readTimestamp'] instanceof Timestamp)) { $time = ...
[ "public", "function", "createSnapshot", "(", "Session", "$", "session", ",", "array", "$", "res", "=", "[", "]", ",", "$", "className", "=", "Snapshot", "::", "class", ")", "{", "$", "res", "+=", "[", "'id'", "=>", "null", ",", "'readTimestamp'", "=>",...
Create a Snapshot instance from a response object. @param Session $session The session the snapshot belongs to. @param array $res [optional] The createTransaction response. @param string $className [optional] The class to instantiate with a snapshot. **Defaults to** `Google\Cloud\Spanner\Snapshot`. @return Snapshot
[ "Create", "a", "Snapshot", "instance", "from", "a", "response", "object", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Operation.php#L448-L463
train
googleapis/google-cloud-php
Spanner/src/Operation.php
Operation.partitionOptions
private function partitionOptions(array $options) { $options['partitionOptions'] = array_filter([ 'partitionSizeBytes' => $this->pluck('partitionSizeBytes', $options, false), 'maxPartitions' => $this->pluck('maxPartitions', $options, false) ]); return $options; }
php
private function partitionOptions(array $options) { $options['partitionOptions'] = array_filter([ 'partitionSizeBytes' => $this->pluck('partitionSizeBytes', $options, false), 'maxPartitions' => $this->pluck('maxPartitions', $options, false) ]); return $options; }
[ "private", "function", "partitionOptions", "(", "array", "$", "options", ")", "{", "$", "options", "[", "'partitionOptions'", "]", "=", "array_filter", "(", "[", "'partitionSizeBytes'", "=>", "$", "this", "->", "pluck", "(", "'partitionSizeBytes'", ",", "$", "...
Normalize options for partition configuration. @param array $options @return array
[ "Normalize", "options", "for", "partition", "configuration", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Operation.php#L655-L663
train
googleapis/google-cloud-php
Spanner/src/Operation.php
Operation.beginTransaction
private function beginTransaction(Session $session, array $options = []) { $options += [ 'transactionOptions' => [] ]; return $this->connection->beginTransaction($options + [ 'session' => $session->name(), 'database' => $session->info()['database'] ...
php
private function beginTransaction(Session $session, array $options = []) { $options += [ 'transactionOptions' => [] ]; return $this->connection->beginTransaction($options + [ 'session' => $session->name(), 'database' => $session->info()['database'] ...
[ "private", "function", "beginTransaction", "(", "Session", "$", "session", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "options", "+=", "[", "'transactionOptions'", "=>", "[", "]", "]", ";", "return", "$", "this", "->", "connection", "->"...
Execute a service call to begin a transaction or snapshot. @see https://cloud.google.com/spanner/reference/rpc/google.spanner.v1#google.spanner.v1.BeginTransactionRequest BeginTransactionRequest @param Session $session The session to start the snapshot in. @param array $options [optional] Configuration options. @retu...
[ "Execute", "a", "service", "call", "to", "begin", "a", "transaction", "or", "snapshot", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Operation.php#L674-L684
train
googleapis/google-cloud-php
Spanner/src/Operation.php
Operation.flattenKeySet
private function flattenKeySet(KeySet $keySet) { $keys = $keySet->keySetObject(); if (!empty($keys['ranges'])) { foreach ($keys['ranges'] as $index => $range) { foreach ($range as $type => $rangeKeys) { $range[$type] = $this->mapper->encodeValuesAsSim...
php
private function flattenKeySet(KeySet $keySet) { $keys = $keySet->keySetObject(); if (!empty($keys['ranges'])) { foreach ($keys['ranges'] as $index => $range) { foreach ($range as $type => $rangeKeys) { $range[$type] = $this->mapper->encodeValuesAsSim...
[ "private", "function", "flattenKeySet", "(", "KeySet", "$", "keySet", ")", "{", "$", "keys", "=", "$", "keySet", "->", "keySetObject", "(", ")", ";", "if", "(", "!", "empty", "(", "$", "keys", "[", "'ranges'", "]", ")", ")", "{", "foreach", "(", "$...
Convert a KeySet object to an API-ready array. @param KeySet $keySet The keySet object. @return array [KeySet](https://cloud.google.com/spanner/reference/rpc/google.spanner.v1#keyset)
[ "Convert", "a", "KeySet", "object", "to", "an", "API", "-", "ready", "array", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Operation.php#L692-L711
train
googleapis/google-cloud-php
Talent/src/V4beta1/Activity.php
Activity.setTeamMembers
public function setTeamMembers($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->team_members = $arr; return $this; }
php
public function setTeamMembers($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->team_members = $arr; return $this; }
[ "public", "function", "setTeamMembers", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "STRING", ")", ";", "$", "this", ...
Optional. A list of team members involved in this activity. Number of characters allowed is 100. Generated from protobuf field <code>repeated string team_members = 6;</code> @param string[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Optional", ".", "A", "list", "of", "team", "members", "involved", "in", "this", "activity", ".", "Number", "of", "characters", "allowed", "is", "100", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/Activity.php#L328-L334
train
googleapis/google-cloud-php
Logging/src/V2/LogSink.php
LogSink.setOutputVersionFormat
public function setOutputVersionFormat($var) { GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LogSink_VersionFormat::class); $this->output_version_format = $var; return $this; }
php
public function setOutputVersionFormat($var) { GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LogSink_VersionFormat::class); $this->output_version_format = $var; return $this; }
[ "public", "function", "setOutputVersionFormat", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkEnum", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Logging", "\\", "V2", "\\", "LogSink_VersionFormat", "::", "class", ")", ";", "$", "this", ...
Deprecated. The log entry format to use for this sink's exported log entries. The v2 format is used by default and cannot be changed. Generated from protobuf field <code>.google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true];</code> @param int $var @return $this
[ "Deprecated", ".", "The", "log", "entry", "format", "to", "use", "for", "this", "sink", "s", "exported", "log", "entries", ".", "The", "v2", "format", "is", "used", "by", "default", "and", "cannot", "be", "changed", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Logging/src/V2/LogSink.php#L306-L312
train
googleapis/google-cloud-php
Talent/src/V4beta1/SearchJobsRequest.php
SearchJobsRequest.setJobQuery
public function setJobQuery($var) { GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\JobQuery::class); $this->job_query = $var; return $this; }
php
public function setJobQuery($var) { GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\JobQuery::class); $this->job_query = $var; return $this; }
[ "public", "function", "setJobQuery", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Talent", "\\", "V4beta1", "\\", "JobQuery", "::", "class", ")", ";", "$", "this", "->", "job_qu...
Optional. Query used to search against jobs, such as keyword, location filters, etc. Generated from protobuf field <code>.google.cloud.talent.v4beta1.JobQuery job_query = 4;</code> @param \Google\Cloud\Talent\V4beta1\JobQuery $var @return $this
[ "Optional", ".", "Query", "used", "to", "search", "against", "jobs", "such", "as", "keyword", "location", "filters", "etc", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/SearchJobsRequest.php#L685-L691
train
googleapis/google-cloud-php
Vision/src/V1/Paragraph.php
Paragraph.setProperty
public function setProperty($var) { GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation_TextProperty::class); $this->property = $var; return $this; }
php
public function setProperty($var) { GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation_TextProperty::class); $this->property = $var; return $this; }
[ "public", "function", "setProperty", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Vision", "\\", "V1", "\\", "TextAnnotation_TextProperty", "::", "class", ")", ";", "$", "this", "...
Additional information detected for the paragraph. Generated from protobuf field <code>.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;</code> @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var @return $this
[ "Additional", "information", "detected", "for", "the", "paragraph", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/Paragraph.php#L110-L116
train
googleapis/google-cloud-php
Vision/src/V1/Paragraph.php
Paragraph.setWords
public function setWords($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Word::class); $this->words = $arr; return $this; }
php
public function setWords($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Word::class); $this->words = $arr; return $this; }
[ "public", "function", "setWords", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", ...
List of words in this paragraph. Generated from protobuf field <code>repeated .google.cloud.vision.v1.Word words = 3;</code> @param \Google\Cloud\Vision\V1\Word[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "List", "of", "words", "in", "this", "paragraph", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/Paragraph.php#L190-L196
train
googleapis/google-cloud-php
Iot/src/V1/ListDeviceConfigVersionsResponse.php
ListDeviceConfigVersionsResponse.setDeviceConfigs
public function setDeviceConfigs($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\DeviceConfig::class); $this->device_configs = $arr; return $this; }
php
public function setDeviceConfigs($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\DeviceConfig::class); $this->device_configs = $arr; return $this; }
[ "public", "function", "setDeviceConfigs", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", ...
The device configuration for the last few versions. Versions are listed in decreasing order, starting from the most recent one. Generated from protobuf field <code>repeated .google.cloud.iot.v1.DeviceConfig device_configs = 1;</code> @param \Google\Cloud\Iot\V1\DeviceConfig[]|\Google\Protobuf\Internal\RepeatedField $v...
[ "The", "device", "configuration", "for", "the", "last", "few", "versions", ".", "Versions", "are", "listed", "in", "decreasing", "order", "starting", "from", "the", "most", "recent", "one", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Iot/src/V1/ListDeviceConfigVersionsResponse.php#L62-L68
train
googleapis/google-cloud-php
Dialogflow/src/V2/Intent/Message/Text.php
Text.setText
public function setText($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->text = $arr; return $this; }
php
public function setText($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->text = $arr; return $this; }
[ "public", "function", "setText", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "STRING", ")", ";", "$", "this", "->", ...
Optional. The collection of the agent's responses. Generated from protobuf field <code>repeated string text = 1;</code> @param string[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Optional", ".", "The", "collection", "of", "the", "agent", "s", "responses", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Intent/Message/Text.php#L58-L64
train
googleapis/google-cloud-php
Talent/src/V4beta1/JobServiceGrpcClient.php
JobServiceGrpcClient.GetJob
public function GetJob(\Google\Cloud\Talent\V4beta1\GetJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.talent.v4beta1.JobService/GetJob', $argument, ['\Google\Cloud\Talent\V4beta1\Job', 'decode'], $metadata, $options); }
php
public function GetJob(\Google\Cloud\Talent\V4beta1\GetJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.talent.v4beta1.JobService/GetJob', $argument, ['\Google\Cloud\Talent\V4beta1\Job', 'decode'], $metadata, $options); }
[ "public", "function", "GetJob", "(", "\\", "Google", "\\", "Cloud", "\\", "Talent", "\\", "V4beta1", "\\", "GetJobRequest", "$", "argument", ",", "$", "metadata", "=", "[", "]", ",", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->...
Retrieves the specified job, whose status is OPEN or recently EXPIRED within the last 90 days. @param \Google\Cloud\Talent\V4beta1\GetJobRequest $argument input argument @param array $metadata metadata @param array $options call options
[ "Retrieves", "the", "specified", "job", "whose", "status", "is", "OPEN", "or", "recently", "EXPIRED", "within", "the", "last", "90", "days", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/JobServiceGrpcClient.php#L60-L66
train
googleapis/google-cloud-php
Talent/src/V4beta1/JobServiceGrpcClient.php
JobServiceGrpcClient.UpdateJob
public function UpdateJob(\Google\Cloud\Talent\V4beta1\UpdateJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.talent.v4beta1.JobService/UpdateJob', $argument, ['\Google\Cloud\Talent\V4beta1\Job', 'decode'], $metadata, $options); ...
php
public function UpdateJob(\Google\Cloud\Talent\V4beta1\UpdateJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.talent.v4beta1.JobService/UpdateJob', $argument, ['\Google\Cloud\Talent\V4beta1\Job', 'decode'], $metadata, $options); ...
[ "public", "function", "UpdateJob", "(", "\\", "Google", "\\", "Cloud", "\\", "Talent", "\\", "V4beta1", "\\", "UpdateJobRequest", "$", "argument", ",", "$", "metadata", "=", "[", "]", ",", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this",...
Updates specified job. Typically, updated contents become visible in search results within 10 seconds, but it may take up to 5 minutes. @param \Google\Cloud\Talent\V4beta1\UpdateJobRequest $argument input argument @param array $metadata metadata @param array $options call options
[ "Updates", "specified", "job", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/JobServiceGrpcClient.php#L77-L83
train
googleapis/google-cloud-php
Talent/src/V4beta1/JobServiceGrpcClient.php
JobServiceGrpcClient.DeleteJob
public function DeleteJob(\Google\Cloud\Talent\V4beta1\DeleteJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.talent.v4beta1.JobService/DeleteJob', $argument, ['\Google\Protobuf\GPBEmpty', 'decode'], $metadata, $options); }
php
public function DeleteJob(\Google\Cloud\Talent\V4beta1\DeleteJobRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.talent.v4beta1.JobService/DeleteJob', $argument, ['\Google\Protobuf\GPBEmpty', 'decode'], $metadata, $options); }
[ "public", "function", "DeleteJob", "(", "\\", "Google", "\\", "Cloud", "\\", "Talent", "\\", "V4beta1", "\\", "DeleteJobRequest", "$", "argument", ",", "$", "metadata", "=", "[", "]", ",", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this",...
Deletes the specified job. Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes. @param \Google\Cloud\Talent\V4beta1\DeleteJobRequest $argument input argument @param array $metadata metadata @param array $options call options
[ "Deletes", "the", "specified", "job", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/JobServiceGrpcClient.php#L94-L100
train
googleapis/google-cloud-php
Talent/src/V4beta1/JobServiceGrpcClient.php
JobServiceGrpcClient.ListJobs
public function ListJobs(\Google\Cloud\Talent\V4beta1\ListJobsRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.talent.v4beta1.JobService/ListJobs', $argument, ['\Google\Cloud\Talent\V4beta1\ListJobsResponse', 'decode'], $metadata, $opt...
php
public function ListJobs(\Google\Cloud\Talent\V4beta1\ListJobsRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.talent.v4beta1.JobService/ListJobs', $argument, ['\Google\Cloud\Talent\V4beta1\ListJobsResponse', 'decode'], $metadata, $opt...
[ "public", "function", "ListJobs", "(", "\\", "Google", "\\", "Cloud", "\\", "Talent", "\\", "V4beta1", "\\", "ListJobsRequest", "$", "argument", ",", "$", "metadata", "=", "[", "]", ",", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", ...
Lists jobs by filter. @param \Google\Cloud\Talent\V4beta1\ListJobsRequest $argument input argument @param array $metadata metadata @param array $options call options
[ "Lists", "jobs", "by", "filter", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/JobServiceGrpcClient.php#L108-L114
train
googleapis/google-cloud-php
PubSub/src/V1/ListTopicSnapshotsResponse.php
ListTopicSnapshotsResponse.setSnapshots
public function setSnapshots($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->snapshots = $arr; return $this; }
php
public function setSnapshots($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->snapshots = $arr; return $this; }
[ "public", "function", "setSnapshots", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "STRING", ")", ";", "$", "this", "...
The names of the snapshots that match the request. Generated from protobuf field <code>repeated string snapshots = 1;</code> @param string[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "The", "names", "of", "the", "snapshots", "that", "match", "the", "request", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/V1/ListTopicSnapshotsResponse.php#L70-L76
train
googleapis/google-cloud-php
Talent/src/V4beta1/CreateJobRequest.php
CreateJobRequest.setJob
public function setJob($var) { GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\Job::class); $this->job = $var; return $this; }
php
public function setJob($var) { GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\Job::class); $this->job = $var; return $this; }
[ "public", "function", "setJob", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Talent", "\\", "V4beta1", "\\", "Job", "::", "class", ")", ";", "$", "this", "->", "job", "=", "...
Required. The Job to be created. Generated from protobuf field <code>.google.cloud.talent.v4beta1.Job job = 2;</code> @param \Google\Cloud\Talent\V4beta1\Job $var @return $this
[ "Required", ".", "The", "Job", "to", "be", "created", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/CreateJobRequest.php#L117-L123
train
googleapis/google-cloud-php
Bigtable/src/Filter/Builder/KeyFilter.php
KeyFilter.sample
public function sample($probability) { if ($probability < 0) { throw new \InvalidArgumentException('Probability must be positive'); } if ($probability >= 1.0) { throw new \InvalidArgumentException('Probability must be less than 1.0'); } return new Sim...
php
public function sample($probability) { if ($probability < 0) { throw new \InvalidArgumentException('Probability must be positive'); } if ($probability >= 1.0) { throw new \InvalidArgumentException('Probability must be less than 1.0'); } return new Sim...
[ "public", "function", "sample", "(", "$", "probability", ")", "{", "if", "(", "$", "probability", "<", "0", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Probability must be positive'", ")", ";", "}", "if", "(", "$", "probability", ">=",...
Matches all cells from a row with `probability`, and matches no cells from the row with probability 1-`probability`. Example: ``` $keyFilter = $builder->sample(.7); ``` @param float $probability The probability to filter by. Must be within the range [0, 1], end points excluded. @return SimpleFilter @throws \InvalidAr...
[ "Matches", "all", "cells", "from", "a", "row", "with", "probability", "and", "matches", "no", "cells", "from", "the", "row", "with", "probability", "1", "-", "probability", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/Filter/Builder/KeyFilter.php#L102-L114
train
googleapis/google-cloud-php
Talent/src/V4beta1/ListCompaniesResponse.php
ListCompaniesResponse.setCompanies
public function setCompanies($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4beta1\Company::class); $this->companies = $arr; return $this; }
php
public function setCompanies($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4beta1\Company::class); $this->companies = $arr; return $this; }
[ "public", "function", "setCompanies", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\"...
Companies for the current client. Generated from protobuf field <code>repeated .google.cloud.talent.v4beta1.Company companies = 1;</code> @param \Google\Cloud\Talent\V4beta1\Company[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Companies", "for", "the", "current", "client", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/ListCompaniesResponse.php#L77-L83
train
googleapis/google-cloud-php
Speech/src/V1/LongRunningRecognizeResponse.php
LongRunningRecognizeResponse.setResults
public function setResults($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\SpeechRecognitionResult::class); $this->results = $arr; return $this; }
php
public function setResults($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\SpeechRecognitionResult::class); $this->results = $arr; return $this; }
[ "public", "function", "setResults", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", ...
Output only. Sequential list of transcription results corresponding to sequential portions of audio. Generated from protobuf field <code>repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;</code> @param \Google\Cloud\Speech\V1\SpeechRecognitionResult[]|\Google\Protobuf\Internal\RepeatedField $var @re...
[ "Output", "only", ".", "Sequential", "list", "of", "transcription", "results", "corresponding", "to", "sequential", "portions", "of", "audio", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Speech/src/V1/LongRunningRecognizeResponse.php#L66-L72
train
googleapis/google-cloud-php
Bigtable/src/ChunkFormatter.php
ChunkFormatter.readAll
public function readAll() { // Chunks contain 3 properties: // - rowContents: The row contents, this essentially is all data // pertaining to a single family. // - commitRow: This is a boolean telling us the all previous chunks for // this row are ok to consume. /...
php
public function readAll() { // Chunks contain 3 properties: // - rowContents: The row contents, this essentially is all data // pertaining to a single family. // - commitRow: This is a boolean telling us the all previous chunks for // this row are ok to consume. /...
[ "public", "function", "readAll", "(", ")", "{", "// Chunks contain 3 properties:", "// - rowContents: The row contents, this essentially is all data", "// pertaining to a single family.", "// - commitRow: This is a boolean telling us the all previous chunks for", "// this row are ok to consu...
Formats the row's chunks into a friendly format. Example: ``` $rows = $formatter->readAll(); ``` @return \Generator @throws BigtableDataOperationException If a malformed response is received.
[ "Formats", "the", "row", "s", "chunks", "into", "a", "friendly", "format", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/ChunkFormatter.php#L158-L193
train
googleapis/google-cloud-php
Bigtable/src/ChunkFormatter.php
ChunkFormatter.validateNewRow
private function validateNewRow(CellChunk $chunk) { $this->isError( $this->row, 'A new row cannot have existing state.' ); $this->isError( !$chunk->getRowKey(), 'A row key must be set.' ); $this->isError( $chunk->get...
php
private function validateNewRow(CellChunk $chunk) { $this->isError( $this->row, 'A new row cannot have existing state.' ); $this->isError( !$chunk->getRowKey(), 'A row key must be set.' ); $this->isError( $chunk->get...
[ "private", "function", "validateNewRow", "(", "CellChunk", "$", "chunk", ")", "{", "$", "this", "->", "isError", "(", "$", "this", "->", "row", ",", "'A new row cannot have existing state.'", ")", ";", "$", "this", "->", "isError", "(", "!", "$", "chunk", ...
Validates state for a new row. @param CellChunk $chunk The chunk to validate. @return void @throws BigtableDataOperationException
[ "Validates", "state", "for", "a", "new", "row", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/ChunkFormatter.php#L281-L303
train
googleapis/google-cloud-php
Bigtable/src/ChunkFormatter.php
ChunkFormatter.reset
private function reset() { $this->prevRowKey = null; $this->rowKey = null; $this->state = self::$rowStateEnum['NEW_ROW']; $this->row = []; }
php
private function reset() { $this->prevRowKey = null; $this->rowKey = null; $this->state = self::$rowStateEnum['NEW_ROW']; $this->row = []; }
[ "private", "function", "reset", "(", ")", "{", "$", "this", "->", "prevRowKey", "=", "null", ";", "$", "this", "->", "rowKey", "=", "null", ";", "$", "this", "->", "state", "=", "self", "::", "$", "rowStateEnum", "[", "'NEW_ROW'", "]", ";", "$", "t...
Resets the state of formatter. @return void
[ "Resets", "the", "state", "of", "formatter", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/ChunkFormatter.php#L310-L316
train
googleapis/google-cloud-php
Bigtable/src/ChunkFormatter.php
ChunkFormatter.moveToNextState
private function moveToNextState(CellChunk $chunk) { $this->state = $chunk->getValueSize() > 0 ? self::$rowStateEnum['CELL_IN_PROGRESS'] : self::$rowStateEnum['ROW_IN_PROGRESS']; }
php
private function moveToNextState(CellChunk $chunk) { $this->state = $chunk->getValueSize() > 0 ? self::$rowStateEnum['CELL_IN_PROGRESS'] : self::$rowStateEnum['ROW_IN_PROGRESS']; }
[ "private", "function", "moveToNextState", "(", "CellChunk", "$", "chunk", ")", "{", "$", "this", "->", "state", "=", "$", "chunk", "->", "getValueSize", "(", ")", ">", "0", "?", "self", "::", "$", "rowStateEnum", "[", "'CELL_IN_PROGRESS'", "]", ":", "sel...
Moves to the next state in processing. @param CellChunk $chunk The chunk to analyze. @return void
[ "Moves", "to", "the", "next", "state", "in", "processing", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/ChunkFormatter.php#L336-L341
train
googleapis/google-cloud-php
Bigtable/src/ChunkFormatter.php
ChunkFormatter.newRow
private function newRow(CellChunk $chunk) { $this->validateNewRow($chunk); $this->rowKey = $chunk->getRowKey(); $familyName = $chunk->getFamilyName()->getValue(); $qualifierName = $chunk->getQualifier()->getValue(); $labels = ($chunk->getLabels()->getIterator()->valid()) ...
php
private function newRow(CellChunk $chunk) { $this->validateNewRow($chunk); $this->rowKey = $chunk->getRowKey(); $familyName = $chunk->getFamilyName()->getValue(); $qualifierName = $chunk->getQualifier()->getValue(); $labels = ($chunk->getLabels()->getIterator()->valid()) ...
[ "private", "function", "newRow", "(", "CellChunk", "$", "chunk", ")", "{", "$", "this", "->", "validateNewRow", "(", "$", "chunk", ")", ";", "$", "this", "->", "rowKey", "=", "$", "chunk", "->", "getRowKey", "(", ")", ";", "$", "familyName", "=", "$"...
Processes a chunk when in the NEW_ROW state. @param CellChunk $chunk The chunk to process. @return void @throws BigtableDataOperationException
[ "Processes", "a", "chunk", "when", "in", "the", "NEW_ROW", "state", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/ChunkFormatter.php#L350-L371
train
googleapis/google-cloud-php
Bigtable/src/ChunkFormatter.php
ChunkFormatter.validateResetRow
private function validateResetRow(CellChunk $chunk) { $this->isError( $chunk->getResetRow() && ( $chunk->getRowKey() || $chunk->getQualifier() || $chunk->getValue() || $chunk->getTimestampMicros() > 0 ), ...
php
private function validateResetRow(CellChunk $chunk) { $this->isError( $chunk->getResetRow() && ( $chunk->getRowKey() || $chunk->getQualifier() || $chunk->getValue() || $chunk->getTimestampMicros() > 0 ), ...
[ "private", "function", "validateResetRow", "(", "CellChunk", "$", "chunk", ")", "{", "$", "this", "->", "isError", "(", "$", "chunk", "->", "getResetRow", "(", ")", "&&", "(", "$", "chunk", "->", "getRowKey", "(", ")", "||", "$", "chunk", "->", "getQua...
Validates the reset row condition for a chunk. @param CellChunk $chunk chunk The chunk to validate. @return void @throws BigtableDataOperationException
[ "Validates", "the", "reset", "row", "condition", "for", "a", "chunk", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/ChunkFormatter.php#L380-L392
train
googleapis/google-cloud-php
Bigtable/src/ChunkFormatter.php
ChunkFormatter.validateRowInProgress
private function validateRowInProgress(CellChunk $chunk) { $this->validateResetRow($chunk); $newRowKey = $chunk->getRowKey(); $this->isError( $chunk->getRowKey() && $newRowKey !== $this->rowKey, 'A commit is required between row keys.' ); $this->isErro...
php
private function validateRowInProgress(CellChunk $chunk) { $this->validateResetRow($chunk); $newRowKey = $chunk->getRowKey(); $this->isError( $chunk->getRowKey() && $newRowKey !== $this->rowKey, 'A commit is required between row keys.' ); $this->isErro...
[ "private", "function", "validateRowInProgress", "(", "CellChunk", "$", "chunk", ")", "{", "$", "this", "->", "validateResetRow", "(", "$", "chunk", ")", ";", "$", "newRowKey", "=", "$", "chunk", "->", "getRowKey", "(", ")", ";", "$", "this", "->", "isErr...
Validates state for a row in progress. @param CellChunk $chunk The chunk to validate. @return void @throws BigtableDataOperationException
[ "Validates", "state", "for", "a", "row", "in", "progress", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/ChunkFormatter.php#L401-L414
train
googleapis/google-cloud-php
Bigtable/src/ChunkFormatter.php
ChunkFormatter.rowInProgress
private function rowInProgress(CellChunk $chunk) { $this->validateRowInProgress($chunk); if ($chunk->getResetRow()) { $this->reset(); return; } if ($chunk->getFamilyName()) { $familyName = $chunk->getFamilyName()->getValue(); if (!isset...
php
private function rowInProgress(CellChunk $chunk) { $this->validateRowInProgress($chunk); if ($chunk->getResetRow()) { $this->reset(); return; } if ($chunk->getFamilyName()) { $familyName = $chunk->getFamilyName()->getValue(); if (!isset...
[ "private", "function", "rowInProgress", "(", "CellChunk", "$", "chunk", ")", "{", "$", "this", "->", "validateRowInProgress", "(", "$", "chunk", ")", ";", "if", "(", "$", "chunk", "->", "getResetRow", "(", ")", ")", "{", "$", "this", "->", "reset", "("...
Process a chunk when in ROW_IN_PROGRESS state. @param CellChunk $chunk The chunk to process. @return void @throws BigtableDataOperationException
[ "Process", "a", "chunk", "when", "in", "ROW_IN_PROGRESS", "state", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/ChunkFormatter.php#L423-L455
train
googleapis/google-cloud-php
Bigtable/src/ChunkFormatter.php
ChunkFormatter.cellInProgress
private function cellInProgress(CellChunk $chunk) { $this->validateCellInProgress($chunk); if ($chunk->getResetRow()) { $this->reset(); return; } $this->qualifierValue = $this->qualifierValue . $chunk->getValue(); $this->moveToNextState($chunk); }
php
private function cellInProgress(CellChunk $chunk) { $this->validateCellInProgress($chunk); if ($chunk->getResetRow()) { $this->reset(); return; } $this->qualifierValue = $this->qualifierValue . $chunk->getValue(); $this->moveToNextState($chunk); }
[ "private", "function", "cellInProgress", "(", "CellChunk", "$", "chunk", ")", "{", "$", "this", "->", "validateCellInProgress", "(", "$", "chunk", ")", ";", "if", "(", "$", "chunk", "->", "getResetRow", "(", ")", ")", "{", "$", "this", "->", "reset", "...
Process chunk when in CELL_IN_PROGRESS state. @param CellChunk $chunk The chunk to process. @return void @throws BigtableDataOperationException
[ "Process", "chunk", "when", "in", "CELL_IN_PROGRESS", "state", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/ChunkFormatter.php#L477-L486
train
googleapis/google-cloud-php
Vision/src/V1/WebDetection.php
WebDetection.setWebEntities
public function setWebEntities($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebEntity::class); $this->web_entities = $arr; return $this; }
php
public function setWebEntities($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebEntity::class); $this->web_entities = $arr; return $this; }
[ "public", "function", "setWebEntities", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\...
Deduced entities from similar images on the Internet. Generated from protobuf field <code>repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1;</code> @param \Google\Cloud\Vision\V1\WebDetection\WebEntity[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Deduced", "entities", "from", "similar", "images", "on", "the", "Internet", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/WebDetection.php#L106-L112
train
googleapis/google-cloud-php
Vision/src/V1/WebDetection.php
WebDetection.setFullMatchingImages
public function setFullMatchingImages($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); $this->full_matching_images = $arr; return $this; }
php
public function setFullMatchingImages($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); $this->full_matching_images = $arr; return $this; }
[ "public", "function", "setFullMatchingImages", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google...
Fully matching images from the Internet. Can include resized copies of the query image. Generated from protobuf field <code>repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2;</code> @param \Google\Cloud\Vision\V1\WebDetection\WebImage[]|\Google\Protobuf\Internal\RepeatedField $var @return...
[ "Fully", "matching", "images", "from", "the", "Internet", ".", "Can", "include", "resized", "copies", "of", "the", "query", "image", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/WebDetection.php#L134-L140
train
googleapis/google-cloud-php
Vision/src/V1/WebDetection.php
WebDetection.setPartialMatchingImages
public function setPartialMatchingImages($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); $this->partial_matching_images = $arr; return $this; }
php
public function setPartialMatchingImages($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); $this->partial_matching_images = $arr; return $this; }
[ "public", "function", "setPartialMatchingImages", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Goo...
Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops. Generated from protobuf field <code>repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3;</code> @par...
[ "Partial", "matching", "images", "from", "the", "Internet", ".", "Those", "images", "are", "similar", "enough", "to", "share", "some", "key", "-", "point", "features", ".", "For", "example", "an", "original", "image", "will", "likely", "have", "partial", "ma...
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/WebDetection.php#L164-L170
train
googleapis/google-cloud-php
Vision/src/V1/WebDetection.php
WebDetection.setPagesWithMatchingImages
public function setPagesWithMatchingImages($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebPage::class); $this->pages_with_matching_images = $arr; return $this; }
php
public function setPagesWithMatchingImages($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebPage::class); $this->pages_with_matching_images = $arr; return $this; }
[ "public", "function", "setPagesWithMatchingImages", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "G...
Web pages containing the matching images from the Internet. Generated from protobuf field <code>repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4;</code> @param \Google\Cloud\Vision\V1\WebDetection\WebPage[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Web", "pages", "containing", "the", "matching", "images", "from", "the", "Internet", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/WebDetection.php#L190-L196
train
googleapis/google-cloud-php
Vision/src/V1/WebDetection.php
WebDetection.setVisuallySimilarImages
public function setVisuallySimilarImages($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); $this->visually_similar_images = $arr; return $this; }
php
public function setVisuallySimilarImages($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); $this->visually_similar_images = $arr; return $this; }
[ "public", "function", "setVisuallySimilarImages", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Goo...
The visually similar image results. Generated from protobuf field <code>repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6;</code> @param \Google\Cloud\Vision\V1\WebDetection\WebImage[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "The", "visually", "similar", "image", "results", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/WebDetection.php#L216-L222
train
googleapis/google-cloud-php
Talent/src/V4beta1/Degree.php
Degree.setDegreeType
public function setDegreeType($var) { GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4beta1\DegreeType::class); $this->degree_type = $var; return $this; }
php
public function setDegreeType($var) { GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4beta1\DegreeType::class); $this->degree_type = $var; return $this; }
[ "public", "function", "setDegreeType", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkEnum", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Talent", "\\", "V4beta1", "\\", "DegreeType", "::", "class", ")", ";", "$", "this", "->", "degre...
Optional. ISCED degree type. Generated from protobuf field <code>.google.cloud.talent.v4beta1.DegreeType degree_type = 1;</code> @param int $var @return $this
[ "Optional", ".", "ISCED", "degree", "type", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/Degree.php#L90-L96
train
googleapis/google-cloud-php
Talent/src/V4beta1/Degree.php
Degree.setFieldsOfStudy
public function setFieldsOfStudy($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->fields_of_study = $arr; return $this; }
php
public function setFieldsOfStudy($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->fields_of_study = $arr; return $this; }
[ "public", "function", "setFieldsOfStudy", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "STRING", ")", ";", "$", "this",...
Optional. Fields of study for the degree. For example, "Computer science", "engineering". Number of characters allowed is 100. Generated from protobuf field <code>repeated string fields_of_study = 3;</code> @param string[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Optional", ".", "Fields", "of", "study", "for", "the", "degree", ".", "For", "example", "Computer", "science", "engineering", ".", "Number", "of", "characters", "allowed", "is", "100", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/Degree.php#L154-L160
train
googleapis/google-cloud-php
Datastore/src/Key.php
Key.pathElement
public function pathElement($kind, $identifier = null, array $options = []) { $options += [ 'identifierType' => null ]; if (!empty($this->path) && $this->state() !== Key::STATE_NAMED) { throw new InvalidArgumentException( 'Cannot add pathElement becau...
php
public function pathElement($kind, $identifier = null, array $options = []) { $options += [ 'identifierType' => null ]; if (!empty($this->path) && $this->state() !== Key::STATE_NAMED) { throw new InvalidArgumentException( 'Cannot add pathElement becau...
[ "public", "function", "pathElement", "(", "$", "kind", ",", "$", "identifier", "=", "null", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "options", "+=", "[", "'identifierType'", "=>", "null", "]", ";", "if", "(", "!", "empty", "(", ...
Add a path element to the end of the Key path If the previous pathElement is incomplete (has no name or ID specified), an `InvalidArgumentException` will be thrown. Once an incomplete pathElement is given, the key cannot be extended any further. Example: ``` $key->pathElement('Person', 'Jane'); ``` ``` // In cases w...
[ "Add", "a", "path", "element", "to", "the", "end", "of", "the", "Key", "path" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Key.php#L166-L183
train
googleapis/google-cloud-php
Datastore/src/Key.php
Key.ancestor
public function ancestor($kind, $identifier, array $options = []) { $options += [ 'identifierType' => null ]; $pathElement = $this->normalizeElement($kind, $identifier, $options['identifierType']); array_unshift($this->path, $pathElement); return $this; }
php
public function ancestor($kind, $identifier, array $options = []) { $options += [ 'identifierType' => null ]; $pathElement = $this->normalizeElement($kind, $identifier, $options['identifierType']); array_unshift($this->path, $pathElement); return $this; }
[ "public", "function", "ancestor", "(", "$", "kind", ",", "$", "identifier", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "options", "+=", "[", "'identifierType'", "=>", "null", "]", ";", "$", "pathElement", "=", "$", "this", "->", "nor...
Add a path element to the beginning of the Key path. Example: ``` $key->ancestor('Person', 'Jane'); ``` ``` // In cases where the identifier type is ambiguous, you can choose the // type to be used. $key->ancestor('Robots', '1337', [ 'identifierType' => Key::TYPE_NAME ]); ``` @see https://cloud.google.com/datastore...
[ "Add", "a", "path", "element", "to", "the", "beginning", "of", "the", "Key", "path", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Key.php#L215-L226
train
googleapis/google-cloud-php
Datastore/src/Key.php
Key.ancestorKey
public function ancestorKey(Key $key) { if ($key->state() !== self::STATE_NAMED) { throw new InvalidArgumentException('Cannot use an incomplete key as an ancestor'); } $path = $key->path(); $this->path = array_merge($path, $this->path); return $this; }
php
public function ancestorKey(Key $key) { if ($key->state() !== self::STATE_NAMED) { throw new InvalidArgumentException('Cannot use an incomplete key as an ancestor'); } $path = $key->path(); $this->path = array_merge($path, $this->path); return $this; }
[ "public", "function", "ancestorKey", "(", "Key", "$", "key", ")", "{", "if", "(", "$", "key", "->", "state", "(", ")", "!==", "self", "::", "STATE_NAMED", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'Cannot use an incomplete key as an ancestor'",...
Use another Key's path as the current Key's ancestor Given key path will be prepended to any path elements on the current key. Example: ``` $parent = $datastore->key('Person', 'Dad'); $key->ancestorKey($parent); ``` @param Key $key The ancestor Key. @return Key @throws InvalidArgumentException
[ "Use", "another", "Key", "s", "path", "as", "the", "current", "Key", "s", "ancestor" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Key.php#L243-L254
train
googleapis/google-cloud-php
Datastore/src/Key.php
Key.state
public function state() { $end = $this->pathEnd(); return (isset($end['id']) || isset($end['name'])) ? self::STATE_NAMED : self::STATE_INCOMPLETE; }
php
public function state() { $end = $this->pathEnd(); return (isset($end['id']) || isset($end['name'])) ? self::STATE_NAMED : self::STATE_INCOMPLETE; }
[ "public", "function", "state", "(", ")", "{", "$", "end", "=", "$", "this", "->", "pathEnd", "(", ")", ";", "return", "(", "isset", "(", "$", "end", "[", "'id'", "]", ")", "||", "isset", "(", "$", "end", "[", "'name'", "]", ")", ")", "?", "se...
Check if the Key is considered Named or Incomplete. Use `Key::STATE_NAMED` and `Key::STATE_INCOMPLETE` to check value. Example: ``` // An incomplete key does not have an ID on its last path element. $key = $datastore->key('parent', 1234) ->pathElement('child'); if ($key->state() === Key::STATE_INCOMPLETE) { echo 'Ke...
[ "Check", "if", "the", "Key", "is", "considered", "Named", "or", "Incomplete", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Key.php#L284-L290
train
googleapis/google-cloud-php
Datastore/src/Key.php
Key.setLastElementIdentifier
public function setLastElementIdentifier($value, $type = Key::TYPE_ID) { $end = $this->pathEnd(); $end[$type] = (string) $value; $elements = array_keys($this->path); $lastElement = end($elements); $this->path[$lastElement] = $end; }
php
public function setLastElementIdentifier($value, $type = Key::TYPE_ID) { $end = $this->pathEnd(); $end[$type] = (string) $value; $elements = array_keys($this->path); $lastElement = end($elements); $this->path[$lastElement] = $end; }
[ "public", "function", "setLastElementIdentifier", "(", "$", "value", ",", "$", "type", "=", "Key", "::", "TYPE_ID", ")", "{", "$", "end", "=", "$", "this", "->", "pathEnd", "(", ")", ";", "$", "end", "[", "$", "type", "]", "=", "(", "string", ")", ...
Set the value of the last path element in a Key This method is used internally when IDs are allocated to existing instances of a Key. It should not generally be used externally. Example: ``` $key = $datastore->key('Person'); $key->setLastElementIdentifier('Bob', Key::TYPE_NAME); ``` @param string $value The value of...
[ "Set", "the", "value", "of", "the", "last", "path", "element", "in", "a", "Key" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Key.php#L309-L318
train
googleapis/google-cloud-php
Datastore/src/Key.php
Key.pathEndIdentifier
public function pathEndIdentifier() { $end = $this->pathEnd(); if (isset($end['id'])) { return $end['id']; } if (isset($end['name'])) { return $end['name']; } return null; }
php
public function pathEndIdentifier() { $end = $this->pathEnd(); if (isset($end['id'])) { return $end['id']; } if (isset($end['name'])) { return $end['name']; } return null; }
[ "public", "function", "pathEndIdentifier", "(", ")", "{", "$", "end", "=", "$", "this", "->", "pathEnd", "(", ")", ";", "if", "(", "isset", "(", "$", "end", "[", "'id'", "]", ")", ")", "{", "return", "$", "end", "[", "'id'", "]", ";", "}", "if"...
Get the last pathElement identifier. If the key is incomplete, returns `null`. Example: ``` $lastPathElementIndentifier = $key->pathEndIdentifier(); ``` @return string|int|null
[ "Get", "the", "last", "pathElement", "identifier", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Key.php#L365-L378
train
googleapis/google-cloud-php
Datastore/src/Key.php
Key.pathEndIdentifierType
public function pathEndIdentifierType() { $end = $this->pathEnd(); if (isset($end['id'])) { return self::TYPE_ID; } if (isset($end['name'])) { return self::TYPE_NAME; } return null; }
php
public function pathEndIdentifierType() { $end = $this->pathEnd(); if (isset($end['id'])) { return self::TYPE_ID; } if (isset($end['name'])) { return self::TYPE_NAME; } return null; }
[ "public", "function", "pathEndIdentifierType", "(", ")", "{", "$", "end", "=", "$", "this", "->", "pathEnd", "(", ")", ";", "if", "(", "isset", "(", "$", "end", "[", "'id'", "]", ")", ")", "{", "return", "self", "::", "TYPE_ID", ";", "}", "if", "...
Get the last pathElement identifier type. If the key is incomplete, returns `null`. Example: ``` $lastPathElementIdentifierType = $key->pathEndIdentifierType(); ``` @return string|null
[ "Get", "the", "last", "pathElement", "identifier", "type", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Key.php#L392-L405
train
googleapis/google-cloud-php
Datastore/src/Key.php
Key.normalizeElement
private function normalizeElement($kind, $identifier, $identifierType) { $identifierType = $this->determineIdentifierType($identifier, $identifierType); $element = []; $element['kind'] = $kind; if (!is_null($identifier)) { $element[$identifierType] = $identifier; ...
php
private function normalizeElement($kind, $identifier, $identifierType) { $identifierType = $this->determineIdentifierType($identifier, $identifierType); $element = []; $element['kind'] = $kind; if (!is_null($identifier)) { $element[$identifierType] = $identifier; ...
[ "private", "function", "normalizeElement", "(", "$", "kind", ",", "$", "identifier", ",", "$", "identifierType", ")", "{", "$", "identifierType", "=", "$", "this", "->", "determineIdentifierType", "(", "$", "identifier", ",", "$", "identifierType", ")", ";", ...
Determine the identifier type and return the valid pathElement @param string $kind the kind. @param mixed $identifier The ID or name. @param string $identifierType Either `id` or `name`. @return array
[ "Determine", "the", "identifier", "type", "and", "return", "the", "valid", "pathElement" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Key.php#L437-L449
train
googleapis/google-cloud-php
Datastore/src/Key.php
Key.determineIdentifierType
private function determineIdentifierType($identifier, $identifierType) { $allowedTypes = [self::TYPE_ID, self::TYPE_NAME]; if (!is_null($identifierType) && in_array($identifierType, $allowedTypes)) { return $identifierType; } elseif (!is_null($identifierType)) { thro...
php
private function determineIdentifierType($identifier, $identifierType) { $allowedTypes = [self::TYPE_ID, self::TYPE_NAME]; if (!is_null($identifierType) && in_array($identifierType, $allowedTypes)) { return $identifierType; } elseif (!is_null($identifierType)) { thro...
[ "private", "function", "determineIdentifierType", "(", "$", "identifier", ",", "$", "identifierType", ")", "{", "$", "allowedTypes", "=", "[", "self", "::", "TYPE_ID", ",", "self", "::", "TYPE_NAME", "]", ";", "if", "(", "!", "is_null", "(", "$", "identifi...
Determine whether the given identifier is an ID or a Name @param mixed $identifier The given value. @param string|null $identifierType If not null and allowed, this will be used as the type. If null, type will be inferred. @return string @throws InvalidArgumentException
[ "Determine", "whether", "the", "given", "identifier", "is", "an", "ID", "or", "a", "Name" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Key.php#L460-L478
train
googleapis/google-cloud-php
Datastore/src/Key.php
Key.normalizePath
private function normalizePath(array $path) { // If the path is associative (i.e. not nested), wrap it up. if ($this->isAssoc($path)) { $path = [$path]; } $res = []; foreach ($path as $index => $pathElement) { if (!isset($pathElement['kind'])) { ...
php
private function normalizePath(array $path) { // If the path is associative (i.e. not nested), wrap it up. if ($this->isAssoc($path)) { $path = [$path]; } $res = []; foreach ($path as $index => $pathElement) { if (!isset($pathElement['kind'])) { ...
[ "private", "function", "normalizePath", "(", "array", "$", "path", ")", "{", "// If the path is associative (i.e. not nested), wrap it up.", "if", "(", "$", "this", "->", "isAssoc", "(", "$", "path", ")", ")", "{", "$", "path", "=", "[", "$", "path", "]", ";...
Normalize the internal representation of a path @param array $path @return array @throws InvalidArgumentException
[ "Normalize", "the", "internal", "representation", "of", "a", "path" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/Key.php#L487-L515
train
googleapis/google-cloud-php
Talent/src/V4beta1/Address.php
Address.setUsage
public function setUsage($var) { GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4beta1\ContactInfoUsage::class); $this->usage = $var; return $this; }
php
public function setUsage($var) { GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4beta1\ContactInfoUsage::class); $this->usage = $var; return $this; }
[ "public", "function", "setUsage", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkEnum", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Talent", "\\", "V4beta1", "\\", "ContactInfoUsage", "::", "class", ")", ";", "$", "this", "->", "usag...
Optional. The usage of the address. For example, SCHOOL, WORK, PERSONAL. Generated from protobuf field <code>.google.cloud.talent.v4beta1.ContactInfoUsage usage = 1;</code> @param int $var @return $this
[ "Optional", ".", "The", "usage", "of", "the", "address", ".", "For", "example", "SCHOOL", "WORK", "PERSONAL", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/Address.php#L83-L89
train
googleapis/google-cloud-php
Core/src/Batch/BatchDaemon.php
BatchDaemon.run
public function run() { $this->setupSignalHandlers(); $procs = []; while (true) { $jobs = $this->runner->getJobs(); foreach ($jobs as $job) { if (! array_key_exists($job->identifier(), $procs)) { $procs[$job->identifier()] = []; ...
php
public function run() { $this->setupSignalHandlers(); $procs = []; while (true) { $jobs = $this->runner->getJobs(); foreach ($jobs as $job) { if (! array_key_exists($job->identifier(), $procs)) { $procs[$job->identifier()] = []; ...
[ "public", "function", "run", "(", ")", "{", "$", "this", "->", "setupSignalHandlers", "(", ")", ";", "$", "procs", "=", "[", "]", ";", "while", "(", "true", ")", "{", "$", "jobs", "=", "$", "this", "->", "runner", "->", "getJobs", "(", ")", ";", ...
A loop for the parent. @return void
[ "A", "loop", "for", "the", "parent", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/Batch/BatchDaemon.php#L83-L149
train
googleapis/google-cloud-php
Storage/src/SigningHelper.php
SigningHelper.v2Sign
public function v2Sign(ConnectionInterface $connection, $expires, $resource, $generation, array $options) { list($credentials, $options) = $this->getSigningCredentials($connection, $options); $expires = $this->normalizeExpiration($expires); $resource = $this->normalizeResource($resource); ...
php
public function v2Sign(ConnectionInterface $connection, $expires, $resource, $generation, array $options) { list($credentials, $options) = $this->getSigningCredentials($connection, $options); $expires = $this->normalizeExpiration($expires); $resource = $this->normalizeResource($resource); ...
[ "public", "function", "v2Sign", "(", "ConnectionInterface", "$", "connection", ",", "$", "expires", ",", "$", "resource", ",", "$", "generation", ",", "array", "$", "options", ")", "{", "list", "(", "$", "credentials", ",", "$", "options", ")", "=", "$",...
Sign a URL using Google Signed URLs v2. This method will be deprecated in the future. @param ConnectionInterface $connection A connection to the Cloud Storage API. @param Timestamp|\DateTimeInterface|int $expires The signed URL expiration. @param string $resource The URI to the storage resource, preceded by a leading...
[ "Sign", "a", "URL", "using", "Google", "Signed", "URLs", "v2", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/SigningHelper.php#L123-L185
train
googleapis/google-cloud-php
Storage/src/SigningHelper.php
SigningHelper.normalizeExpiration
private function normalizeExpiration($expires) { if ($expires instanceof Timestamp) { $seconds = $expires->get()->format('U'); } elseif ($expires instanceof \DateTimeInterface) { $seconds = $expires->format('U'); } elseif (is_numeric($expires)) { $seconds ...
php
private function normalizeExpiration($expires) { if ($expires instanceof Timestamp) { $seconds = $expires->get()->format('U'); } elseif ($expires instanceof \DateTimeInterface) { $seconds = $expires->format('U'); } elseif (is_numeric($expires)) { $seconds ...
[ "private", "function", "normalizeExpiration", "(", "$", "expires", ")", "{", "if", "(", "$", "expires", "instanceof", "Timestamp", ")", "{", "$", "seconds", "=", "$", "expires", "->", "get", "(", ")", "->", "format", "(", "'U'", ")", ";", "}", "elseif"...
Normalizes and validates an expiration. @param Timestamp|\DateTimeInterface|int $expires The expiration @return int @throws \InvalidArgumentException If an invalid value is given.
[ "Normalizes", "and", "validates", "an", "expiration", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/SigningHelper.php#L350-L363
train
googleapis/google-cloud-php
Storage/src/SigningHelper.php
SigningHelper.normalizeResource
private function normalizeResource($resource) { $pieces = explode('/', trim($resource, '/')); array_walk($pieces, function (&$piece) { $piece = rawurlencode($piece); }); return '/' . implode('/', $pieces); }
php
private function normalizeResource($resource) { $pieces = explode('/', trim($resource, '/')); array_walk($pieces, function (&$piece) { $piece = rawurlencode($piece); }); return '/' . implode('/', $pieces); }
[ "private", "function", "normalizeResource", "(", "$", "resource", ")", "{", "$", "pieces", "=", "explode", "(", "'/'", ",", "trim", "(", "$", "resource", ",", "'/'", ")", ")", ";", "array_walk", "(", "$", "pieces", ",", "function", "(", "&", "$", "pi...
Normalizes and encodes the resource identifier. @param string $resource The resource identifier. In form `[/]$bucket/$object`. @return string The resource, with pieces encoded and prefixed with a forward slash.
[ "Normalizes", "and", "encodes", "the", "resource", "identifier", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/SigningHelper.php#L373-L380
train
googleapis/google-cloud-php
Storage/src/SigningHelper.php
SigningHelper.normalizeOptions
private function normalizeOptions(array $options) { $options += [ 'method' => 'GET', 'cname' => self::DEFAULT_DOWNLOAD_HOST, 'contentMd5' => null, 'contentType' => null, 'headers' => [], 'saveAsName' => null, 'responseDispos...
php
private function normalizeOptions(array $options) { $options += [ 'method' => 'GET', 'cname' => self::DEFAULT_DOWNLOAD_HOST, 'contentMd5' => null, 'contentType' => null, 'headers' => [], 'saveAsName' => null, 'responseDispos...
[ "private", "function", "normalizeOptions", "(", "array", "$", "options", ")", "{", "$", "options", "+=", "[", "'method'", "=>", "'GET'", ",", "'cname'", "=>", "self", "::", "DEFAULT_DOWNLOAD_HOST", ",", "'contentMd5'", "=>", "null", ",", "'contentType'", "=>",...
Fixes the user input options, filters and validates data. @param array $options Signed URL configuration options. @return array @throws \InvalidArgumentException
[ "Fixes", "the", "user", "input", "options", "filters", "and", "validates", "data", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/SigningHelper.php#L389-L458
train
googleapis/google-cloud-php
Storage/src/SigningHelper.php
SigningHelper.normalizeHeaders
private function normalizeHeaders(array $headers) { $out = []; foreach ($headers as $name => $value) { $name = strtolower(trim($name)); // collapse arrays of values into a comma-separated list. if (!is_array($value)) { $value = [$value]; ...
php
private function normalizeHeaders(array $headers) { $out = []; foreach ($headers as $name => $value) { $name = strtolower(trim($name)); // collapse arrays of values into a comma-separated list. if (!is_array($value)) { $value = [$value]; ...
[ "private", "function", "normalizeHeaders", "(", "array", "$", "headers", ")", "{", "$", "out", "=", "[", "]", ";", "foreach", "(", "$", "headers", "as", "$", "name", "=>", "$", "value", ")", "{", "$", "name", "=", "strtolower", "(", "trim", "(", "$...
Cleans and normalizes header values. Arrays of values are collapsed into a comma-separated list, trailing and leading spaces are removed, newlines are replaced by empty strings, and multiple whitespace chars are replaced by a single space. @param array $headers Input headers @return array
[ "Cleans", "and", "normalizes", "header", "values", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/SigningHelper.php#L470-L495
train
googleapis/google-cloud-php
Storage/src/SigningHelper.php
SigningHelper.normalizeUriPath
private function normalizeUriPath($cname, $resource) { if ($cname !== self::DEFAULT_DOWNLOAD_HOST) { $resourceParts = explode('/', trim($resource, '/')); array_shift($resourceParts); // Resource is a Bucket. if (empty($resourceParts)) { $resou...
php
private function normalizeUriPath($cname, $resource) { if ($cname !== self::DEFAULT_DOWNLOAD_HOST) { $resourceParts = explode('/', trim($resource, '/')); array_shift($resourceParts); // Resource is a Bucket. if (empty($resourceParts)) { $resou...
[ "private", "function", "normalizeUriPath", "(", "$", "cname", ",", "$", "resource", ")", "{", "if", "(", "$", "cname", "!==", "self", "::", "DEFAULT_DOWNLOAD_HOST", ")", "{", "$", "resourceParts", "=", "explode", "(", "'/'", ",", "trim", "(", "$", "resou...
Returns a resource formatted for use in a URI. If the cname is other than the default, will omit the bucket name. @param string $cname The cname provided by the user, or the default value. @param string $resource The GCS resource path (i.e. /bucket/object). @return string
[ "Returns", "a", "resource", "formatted", "for", "use", "in", "a", "URI", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/SigningHelper.php#L507-L522
train
googleapis/google-cloud-php
Storage/src/SigningHelper.php
SigningHelper.getSigningCredentials
private function getSigningCredentials(ConnectionInterface $connection, array $options) { $keyFilePath = isset($options['keyFilePath']) ? $options['keyFilePath'] : null; if ($keyFilePath) { if (!file_exists($keyFilePath)) { throw new \InvalidArgum...
php
private function getSigningCredentials(ConnectionInterface $connection, array $options) { $keyFilePath = isset($options['keyFilePath']) ? $options['keyFilePath'] : null; if ($keyFilePath) { if (!file_exists($keyFilePath)) { throw new \InvalidArgum...
[ "private", "function", "getSigningCredentials", "(", "ConnectionInterface", "$", "connection", ",", "array", "$", "options", ")", "{", "$", "keyFilePath", "=", "isset", "(", "$", "options", "[", "'keyFilePath'", "]", ")", "?", "$", "options", "[", "'keyFilePat...
Get the credentials for use with signing. @param ConnectionInterface $connection A Storage connection object. @param array $options Configuration options. @return array A list containing a credentials object at index 0 and the modified options at index 1. @throws \RuntimeException If the credentials type is not valid ...
[ "Get", "the", "credentials", "for", "use", "with", "signing", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/SigningHelper.php#L534-L580
train
googleapis/google-cloud-php
Storage/src/SigningHelper.php
SigningHelper.addCommonParams
private function addCommonParams($generation, array $params, array $options) { if ($options['responseType']) { $params['response-content-type'] = $options['responseType']; } if ($options['responseDisposition']) { $params['response-content-disposition'] = $options['re...
php
private function addCommonParams($generation, array $params, array $options) { if ($options['responseType']) { $params['response-content-type'] = $options['responseType']; } if ($options['responseDisposition']) { $params['response-content-disposition'] = $options['re...
[ "private", "function", "addCommonParams", "(", "$", "generation", ",", "array", "$", "params", ",", "array", "$", "options", ")", "{", "if", "(", "$", "options", "[", "'responseType'", "]", ")", "{", "$", "params", "[", "'response-content-type'", "]", "=",...
Add parameters common to all signed URL versions. @param int|null $generation @param array $params @param array $options @return array
[ "Add", "parameters", "common", "to", "all", "signed", "URL", "versions", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/SigningHelper.php#L590-L608
train
googleapis/google-cloud-php
Spanner/src/Batch/ReadPartition.php
ReadPartition.serialize
public function serialize() { $vars = get_object_vars($this); $vars['keySet'] = $vars['keySet']->keySetObject(); return base64_encode(json_encode($vars + [ BatchClient::PARTITION_TYPE_KEY => static::class ])); }
php
public function serialize() { $vars = get_object_vars($this); $vars['keySet'] = $vars['keySet']->keySetObject(); return base64_encode(json_encode($vars + [ BatchClient::PARTITION_TYPE_KEY => static::class ])); }
[ "public", "function", "serialize", "(", ")", "{", "$", "vars", "=", "get_object_vars", "(", "$", "this", ")", ";", "$", "vars", "[", "'keySet'", "]", "=", "$", "vars", "[", "'keySet'", "]", "->", "keySetObject", "(", ")", ";", "return", "base64_encode"...
Return a stringified representation of the ReadPartition object. Example: ``` $partitionString = $partition->serialize(); ``` @return string
[ "Return", "a", "stringified", "representation", "of", "the", "ReadPartition", "object", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Batch/ReadPartition.php#L166-L174
train
googleapis/google-cloud-php
Spanner/src/Batch/ReadPartition.php
ReadPartition.hydrate
public static function hydrate(array $data) { return new self( $data['token'], $data['table'], KeySet::fromArray($data['keySet']), $data['columns'], $data['options'] ); }
php
public static function hydrate(array $data) { return new self( $data['token'], $data['table'], KeySet::fromArray($data['keySet']), $data['columns'], $data['options'] ); }
[ "public", "static", "function", "hydrate", "(", "array", "$", "data", ")", "{", "return", "new", "self", "(", "$", "data", "[", "'token'", "]", ",", "$", "data", "[", "'table'", "]", ",", "KeySet", "::", "fromArray", "(", "$", "data", "[", "'keySet'"...
Create a ReadPartition object from a deserialized array of partition data. @param array $data The partition data. @return ReadPartition @access private
[ "Create", "a", "ReadPartition", "object", "from", "a", "deserialized", "array", "of", "partition", "data", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Batch/ReadPartition.php#L183-L192
train
googleapis/google-cloud-php
Datastore/src/V1/CommitRequest.php
CommitRequest.setMode
public function setMode($var) { GPBUtil::checkEnum($var, \Google\Cloud\Datastore\V1\CommitRequest_Mode::class); $this->mode = $var; return $this; }
php
public function setMode($var) { GPBUtil::checkEnum($var, \Google\Cloud\Datastore\V1\CommitRequest_Mode::class); $this->mode = $var; return $this; }
[ "public", "function", "setMode", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkEnum", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Datastore", "\\", "V1", "\\", "CommitRequest_Mode", "::", "class", ")", ";", "$", "this", "->", "mode"...
The type of commit to perform. Defaults to `TRANSACTIONAL`. Generated from protobuf field <code>.google.datastore.v1.CommitRequest.Mode mode = 5;</code> @param int $var @return $this
[ "The", "type", "of", "commit", "to", "perform", ".", "Defaults", "to", "TRANSACTIONAL", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/V1/CommitRequest.php#L123-L129
train
googleapis/google-cloud-php
BigQueryDataTransfer/src/V1/ListTransferRunsRequest.php
ListTransferRunsRequest.setStates
public function setStates($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\DataTransfer\V1\TransferState::class); $this->states = $arr; return $this; }
php
public function setStates($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\DataTransfer\V1\TransferState::class); $this->states = $arr; return $this; }
[ "public", "function", "setStates", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "ENUM", ",", "\\", "Google", "\\", "C...
When specified, only transfer runs with requested states are returned. Generated from protobuf field <code>repeated .google.cloud.bigquery.datatransfer.v1.TransferState states = 2;</code> @param int[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "When", "specified", "only", "transfer", "runs", "with", "requested", "states", "are", "returned", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/BigQueryDataTransfer/src/V1/ListTransferRunsRequest.php#L134-L140
train
googleapis/google-cloud-php
BigQueryDataTransfer/src/V1/ListTransferRunsRequest.php
ListTransferRunsRequest.setRunAttempt
public function setRunAttempt($var) { GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\ListTransferRunsRequest_RunAttempt::class); $this->run_attempt = $var; return $this; }
php
public function setRunAttempt($var) { GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\ListTransferRunsRequest_RunAttempt::class); $this->run_attempt = $var; return $this; }
[ "public", "function", "setRunAttempt", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkEnum", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "BigQuery", "\\", "DataTransfer", "\\", "V1", "\\", "ListTransferRunsRequest_RunAttempt", "::", "class", ...
Indicates how run attempts are to be pulled. Generated from protobuf field <code>.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt run_attempt = 5;</code> @param int $var @return $this
[ "Indicates", "how", "run", "attempts", "are", "to", "be", "pulled", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/BigQueryDataTransfer/src/V1/ListTransferRunsRequest.php#L220-L226
train
googleapis/google-cloud-php
Dataproc/src/V1beta2/Gapic/ClusterControllerGapicClient.php
ClusterControllerGapicClient.createCluster
public function createCluster($projectId, $region, $cluster, array $optionalArgs = []) { $request = new CreateClusterRequest(); $request->setProjectId($projectId); $request->setRegion($region); $request->setCluster($cluster); if (isset($optionalArgs['requestId'])) { ...
php
public function createCluster($projectId, $region, $cluster, array $optionalArgs = []) { $request = new CreateClusterRequest(); $request->setProjectId($projectId); $request->setRegion($region); $request->setCluster($cluster); if (isset($optionalArgs['requestId'])) { ...
[ "public", "function", "createCluster", "(", "$", "projectId", ",", "$", "region", ",", "$", "cluster", ",", "array", "$", "optionalArgs", "=", "[", "]", ")", "{", "$", "request", "=", "new", "CreateClusterRequest", "(", ")", ";", "$", "request", "->", ...
Creates a cluster in a project. Sample code: ``` $clusterControllerClient = new ClusterControllerClient(); try { $projectId = ''; $region = ''; $cluster = new Cluster(); $operationResponse = $clusterControllerClient->createCluster($projectId, $region, $cluster); $operationResponse->pollUntilComplete(); if ($operationR...
[ "Creates", "a", "cluster", "in", "a", "project", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1beta2/Gapic/ClusterControllerGapicClient.php#L321-L337
train
googleapis/google-cloud-php
Dataproc/src/V1beta2/Gapic/ClusterControllerGapicClient.php
ClusterControllerGapicClient.updateCluster
public function updateCluster($projectId, $region, $clusterName, $cluster, $updateMask, array $optionalArgs = []) { $request = new UpdateClusterRequest(); $request->setProjectId($projectId); $request->setRegion($region); $request->setClusterName($clusterName); $request->setCl...
php
public function updateCluster($projectId, $region, $clusterName, $cluster, $updateMask, array $optionalArgs = []) { $request = new UpdateClusterRequest(); $request->setProjectId($projectId); $request->setRegion($region); $request->setClusterName($clusterName); $request->setCl...
[ "public", "function", "updateCluster", "(", "$", "projectId", ",", "$", "region", ",", "$", "clusterName", ",", "$", "cluster", ",", "$", "updateMask", ",", "array", "$", "optionalArgs", "=", "[", "]", ")", "{", "$", "request", "=", "new", "UpdateCluster...
Updates a cluster in a project. Sample code: ``` $clusterControllerClient = new ClusterControllerClient(); try { $projectId = ''; $region = ''; $clusterName = ''; $cluster = new Cluster(); $updateMask = new FieldMask(); $operationResponse = $clusterControllerClient->updateCluster($projectId, $region, $clusterName, $cl...
[ "Updates", "a", "cluster", "in", "a", "project", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1beta2/Gapic/ClusterControllerGapicClient.php#L483-L504
train
googleapis/google-cloud-php
Dataproc/src/V1beta2/Gapic/ClusterControllerGapicClient.php
ClusterControllerGapicClient.deleteCluster
public function deleteCluster($projectId, $region, $clusterName, array $optionalArgs = []) { $request = new DeleteClusterRequest(); $request->setProjectId($projectId); $request->setRegion($region); $request->setClusterName($clusterName); if (isset($optionalArgs['clusterUuid']...
php
public function deleteCluster($projectId, $region, $clusterName, array $optionalArgs = []) { $request = new DeleteClusterRequest(); $request->setProjectId($projectId); $request->setRegion($region); $request->setClusterName($clusterName); if (isset($optionalArgs['clusterUuid']...
[ "public", "function", "deleteCluster", "(", "$", "projectId", ",", "$", "region", ",", "$", "clusterName", ",", "array", "$", "optionalArgs", "=", "[", "]", ")", "{", "$", "request", "=", "new", "DeleteClusterRequest", "(", ")", ";", "$", "request", "->"...
Deletes a cluster in a project. Sample code: ``` $clusterControllerClient = new ClusterControllerClient(); try { $projectId = ''; $region = ''; $clusterName = ''; $operationResponse = $clusterControllerClient->deleteCluster($projectId, $region, $clusterName); $operationResponse->pollUntilComplete(); if ($operationResp...
[ "Deletes", "a", "cluster", "in", "a", "project", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1beta2/Gapic/ClusterControllerGapicClient.php#L583-L602
train
googleapis/google-cloud-php
dev/src/DocGenerator/Parser/CodeParser.php
CodeParser.buildNestedParams
private function buildNestedParams($nestedParams, $origParam, $isProto = false) { $paramsArray = []; foreach ($nestedParams as $param) { $nestedParam = explode(' ', trim($param), 3); // START proto nested arg missing description workaround if (count($nestedParam...
php
private function buildNestedParams($nestedParams, $origParam, $isProto = false) { $paramsArray = []; foreach ($nestedParams as $param) { $nestedParam = explode(' ', trim($param), 3); // START proto nested arg missing description workaround if (count($nestedParam...
[ "private", "function", "buildNestedParams", "(", "$", "nestedParams", ",", "$", "origParam", ",", "$", "isProto", "=", "false", ")", "{", "$", "paramsArray", "=", "[", "]", ";", "foreach", "(", "$", "nestedParams", "as", "$", "param", ")", "{", "$", "n...
PHPDoc has no support for nested params currently. this is a workaround until it is implemented.
[ "PHPDoc", "has", "no", "support", "for", "nested", "params", "currently", ".", "this", "is", "a", "workaround", "until", "it", "is", "implemented", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/dev/src/DocGenerator/Parser/CodeParser.php#L600-L632
train
googleapis/google-cloud-php
PubSub/src/Subscription.php
Subscription.create
public function create(array $options = []) { // If a subscription is created via PubSubClient::subscription(), // it may or may not have a topic name. This is fine for most API // interactions, but a topic name is required to create a subscription. if (!$this->topicName) { ...
php
public function create(array $options = []) { // If a subscription is created via PubSubClient::subscription(), // it may or may not have a topic name. This is fine for most API // interactions, but a topic name is required to create a subscription. if (!$this->topicName) { ...
[ "public", "function", "create", "(", "array", "$", "options", "=", "[", "]", ")", "{", "// If a subscription is created via PubSubClient::subscription(),", "// it may or may not have a topic name. This is fine for most API", "// interactions, but a topic name is required to create a subs...
Execute a service request creating the subscription. The suggested way of creating a subscription is by calling through {@see Google\Cloud\PubSub\Topic::subscribe()} or {@see Google\Cloud\PubSub\Topic::subscription()}. Returns subscription info in the format detailed in the documentation for a [subscription](https://...
[ "Execute", "a", "service", "request", "creating", "the", "subscription", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Subscription.php#L207-L223
train
googleapis/google-cloud-php
PubSub/src/Subscription.php
Subscription.update
public function update(array $subscription, array $options = []) { return $this->info = $this->connection->updateSubscription([ 'name' => $this->name ] + $options + $subscription); }
php
public function update(array $subscription, array $options = []) { return $this->info = $this->connection->updateSubscription([ 'name' => $this->name ] + $options + $subscription); }
[ "public", "function", "update", "(", "array", "$", "subscription", ",", "array", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->", "info", "=", "$", "this", "->", "connection", "->", "updateSubscription", "(", "[", "'name'", "=>", "...
Update the subscription. Note that subscription name and topic are immutable properties and may not be modified. Example: ``` $subscription->update([ 'retainAckedMessages' => true ]); ``` @param array $subscription { The Subscription data. For information regarding the push configuration settings, see [PushConfig](...
[ "Update", "the", "subscription", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Subscription.php#L264-L269
train
googleapis/google-cloud-php
PubSub/src/Subscription.php
Subscription.reload
public function reload(array $options = []) { return $this->info = $this->connection->getSubscription($options + [ 'subscription' => $this->name ]); }
php
public function reload(array $options = []) { return $this->info = $this->connection->getSubscription($options + [ 'subscription' => $this->name ]); }
[ "public", "function", "reload", "(", "array", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->", "info", "=", "$", "this", "->", "connection", "->", "getSubscription", "(", "$", "options", "+", "[", "'subscription'", "=>", "$", "this...
Retrieve info on a subscription from the API. To use the previously cached result (if it exists), use {@see Subscription::info()}. Example: ``` $subscription->reload(); $info = $subscription->info(); echo $info['name']; // `projects/my-awesome-project/subscriptions/my-new-subscription` ``` @see https://cloud.google....
[ "Retrieve", "info", "on", "a", "subscription", "from", "the", "API", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Subscription.php#L366-L371
train
googleapis/google-cloud-php
PubSub/src/Subscription.php
Subscription.pull
public function pull(array $options = []) { $messages = []; $options['returnImmediately'] = isset($options['returnImmediately']) ? $options['returnImmediately'] : false; $options['maxMessages'] = isset($options['maxMessages']) ? $options['maxMessages'] ...
php
public function pull(array $options = []) { $messages = []; $options['returnImmediately'] = isset($options['returnImmediately']) ? $options['returnImmediately'] : false; $options['maxMessages'] = isset($options['maxMessages']) ? $options['maxMessages'] ...
[ "public", "function", "pull", "(", "array", "$", "options", "=", "[", "]", ")", "{", "$", "messages", "=", "[", "]", ";", "$", "options", "[", "'returnImmediately'", "]", "=", "isset", "(", "$", "options", "[", "'returnImmediately'", "]", ")", "?", "...
Retrieve new messages from the topic. Example: ``` $messages = $subscription->pull(); foreach ($messages as $message) { echo $message->data(); } ``` @see https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/pull Pull Subscriptions @param array $options [optional] { Configuration Options @ty...
[ "Retrieve", "new", "messages", "from", "the", "topic", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Subscription.php#L398-L419
train
googleapis/google-cloud-php
PubSub/src/Subscription.php
Subscription.acknowledgeBatch
public function acknowledgeBatch(array $messages, array $options = []) { $this->validateBatch($messages, Message::class); $this->connection->acknowledge($options + [ 'subscription' => $this->name, 'ackIds' => $this->getMessageAckIds($messages) ]); }
php
public function acknowledgeBatch(array $messages, array $options = []) { $this->validateBatch($messages, Message::class); $this->connection->acknowledge($options + [ 'subscription' => $this->name, 'ackIds' => $this->getMessageAckIds($messages) ]); }
[ "public", "function", "acknowledgeBatch", "(", "array", "$", "messages", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "validateBatch", "(", "$", "messages", ",", "Message", "::", "class", ")", ";", "$", "this", "->", "conne...
Acknowledge receipt of multiple messages at once. Use {@see Google\Cloud\PubSub\Subscription::acknowledge()} to acknowledge a single message. Example: ``` $messages = $subscription->pull(); $subscription->acknowledgeBatch($messages); ``` @codingStandardsIgnoreStart @see https://cloud.google.com/pubsub/docs/referenc...
[ "Acknowledge", "receipt", "of", "multiple", "messages", "at", "once", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Subscription.php#L468-L476
train
googleapis/google-cloud-php
PubSub/src/Subscription.php
Subscription.modifyAckDeadline
public function modifyAckDeadline(Message $message, $seconds, array $options = []) { $this->modifyAckDeadlineBatch([$message], $seconds, $options); }
php
public function modifyAckDeadline(Message $message, $seconds, array $options = []) { $this->modifyAckDeadlineBatch([$message], $seconds, $options); }
[ "public", "function", "modifyAckDeadline", "(", "Message", "$", "message", ",", "$", "seconds", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "modifyAckDeadlineBatch", "(", "[", "$", "message", "]", ",", "$", "seconds", ",", ...
Set the acknowledge deadline for a single ackId. Use {@see Google\Cloud\PubSub\Subscription::modifyAckDeadlineBatch()} to modify the ack deadline for multiple messages at once. Example: ``` $messages = $subscription->pull(); foreach ($messages as $message) { $subscription->modifyAckDeadline($message, 3); sleep(2); ...
[ "Set", "the", "acknowledge", "deadline", "for", "a", "single", "ackId", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Subscription.php#L513-L516
train
googleapis/google-cloud-php
PubSub/src/Subscription.php
Subscription.modifyAckDeadlineBatch
public function modifyAckDeadlineBatch(array $messages, $seconds, array $options = []) { $this->validateBatch($messages, Message::class); $this->connection->modifyAckDeadline($options + [ 'subscription' => $this->name, 'ackIds' => $this->getMessageAckIds($messages), ...
php
public function modifyAckDeadlineBatch(array $messages, $seconds, array $options = []) { $this->validateBatch($messages, Message::class); $this->connection->modifyAckDeadline($options + [ 'subscription' => $this->name, 'ackIds' => $this->getMessageAckIds($messages), ...
[ "public", "function", "modifyAckDeadlineBatch", "(", "array", "$", "messages", ",", "$", "seconds", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "validateBatch", "(", "$", "messages", ",", "Message", "::", "class", ")", ";", ...
Set the acknowledge deadline for multiple ackIds. Use {@see Google\Cloud\PubSub\Subscription::modifyAckDeadline()} to modify the ack deadline for a single message. Example: ``` $messages = $subscription->pull(); // Set the ack deadline to three seconds from now for every message $subscription->modifyAckDeadlineBatch...
[ "Set", "the", "acknowledge", "deadline", "for", "multiple", "ackIds", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Subscription.php#L552-L561
train
googleapis/google-cloud-php
PubSub/src/Subscription.php
Subscription.modifyPushConfig
public function modifyPushConfig(array $pushConfig, array $options = []) { $this->connection->modifyPushConfig($options + [ 'subscription' => $this->name, 'pushConfig' => $pushConfig ]); }
php
public function modifyPushConfig(array $pushConfig, array $options = []) { $this->connection->modifyPushConfig($options + [ 'subscription' => $this->name, 'pushConfig' => $pushConfig ]); }
[ "public", "function", "modifyPushConfig", "(", "array", "$", "pushConfig", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "connection", "->", "modifyPushConfig", "(", "$", "options", "+", "[", "'subscription'", "=>", "$", "this",...
Set the push config for the subscription Example: ``` $subscription->modifyPushConfig([ 'pushEndpoint' => 'https://www.example.com/foo/bar' ]); ``` @codingStandardsIgnoreStart @see https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/modifyPushConfig Modify Push Config @codingStandardsIgnoreE...
[ "Set", "the", "push", "config", "for", "the", "subscription" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Subscription.php#L590-L596
train
googleapis/google-cloud-php
PubSub/src/Subscription.php
Subscription.seekToTime
public function seekToTime(Timestamp $timestamp) { return $this->connection->seek([ 'subscription' => $this->name, 'time' => $timestamp->formatAsString() ]); }
php
public function seekToTime(Timestamp $timestamp) { return $this->connection->seek([ 'subscription' => $this->name, 'time' => $timestamp->formatAsString() ]); }
[ "public", "function", "seekToTime", "(", "Timestamp", "$", "timestamp", ")", "{", "return", "$", "this", "->", "connection", "->", "seek", "(", "[", "'subscription'", "=>", "$", "this", "->", "name", ",", "'time'", "=>", "$", "timestamp", "->", "formatAsSt...
Seek to a given timestamp. When you seek to a time, it has the effect of marking every message received before this time as acknowledged, and all messages received after the time as unacknowledged. Please note that this method may not yet be available in your project. Example: ``` $time = $pubsub->timestamp(new \Dat...
[ "Seek", "to", "a", "given", "timestamp", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Subscription.php#L616-L622
train
googleapis/google-cloud-php
PubSub/src/Subscription.php
Subscription.seekToSnapshot
public function seekToSnapshot(Snapshot $snapshot) { return $this->connection->seek([ 'subscription' => $this->name, 'snapshot' => $snapshot->name() ]); }
php
public function seekToSnapshot(Snapshot $snapshot) { return $this->connection->seek([ 'subscription' => $this->name, 'snapshot' => $snapshot->name() ]); }
[ "public", "function", "seekToSnapshot", "(", "Snapshot", "$", "snapshot", ")", "{", "return", "$", "this", "->", "connection", "->", "seek", "(", "[", "'subscription'", "=>", "$", "this", "->", "name", ",", "'snapshot'", "=>", "$", "snapshot", "->", "name"...
Seek to a given snapshot. When seeking to a snapshot, any message that had an "unacknowledged" state when the snapshot was created can be re-delivered. Please note that this method may not yet be available in your project. Example: ``` $snapshot = $pubsub->snapshot('my-snapshot'); $subscription->seekToSnapshot($snap...
[ "Seek", "to", "a", "given", "snapshot", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Subscription.php#L641-L647
train
googleapis/google-cloud-php
PubSub/src/Subscription.php
Subscription.iam
public function iam() { if (!$this->iam) { $iamConnection = new IamSubscription($this->connection); $this->iam = new Iam($iamConnection, $this->name); } return $this->iam; }
php
public function iam() { if (!$this->iam) { $iamConnection = new IamSubscription($this->connection); $this->iam = new Iam($iamConnection, $this->name); } return $this->iam; }
[ "public", "function", "iam", "(", ")", "{", "if", "(", "!", "$", "this", "->", "iam", ")", "{", "$", "iamConnection", "=", "new", "IamSubscription", "(", "$", "this", "->", "connection", ")", ";", "$", "this", "->", "iam", "=", "new", "Iam", "(", ...
Manage the IAM policy for the current Subscription. Example: ``` $iam = $subscription->iam(); ``` @codingStandardsIgnoreStart @see https://cloud.google.com/pubsub/access_control PubSub Access Control Documentation @see https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/getIamPolicy Get Subs...
[ "Manage", "the", "IAM", "policy", "for", "the", "current", "Subscription", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Subscription.php#L666-L674
train
googleapis/google-cloud-php
PubSub/src/Subscription.php
Subscription.getMessageAckIds
private function getMessageAckIds(array $messages) { $ackIds = []; foreach ($messages as $message) { $ackIds[] = $message->ackId(); } return $ackIds; }
php
private function getMessageAckIds(array $messages) { $ackIds = []; foreach ($messages as $message) { $ackIds[] = $message->ackId(); } return $ackIds; }
[ "private", "function", "getMessageAckIds", "(", "array", "$", "messages", ")", "{", "$", "ackIds", "=", "[", "]", ";", "foreach", "(", "$", "messages", "as", "$", "message", ")", "{", "$", "ackIds", "[", "]", "=", "$", "message", "->", "ackId", "(", ...
Get a list of ackIds from a list of Message objects. @param Message[] $messages The messages @return array
[ "Get", "a", "list", "of", "ackIds", "from", "a", "list", "of", "Message", "objects", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/Subscription.php#L682-L690
train
googleapis/google-cloud-php
TextToSpeech/src/V1/SynthesizeSpeechRequest.php
SynthesizeSpeechRequest.setInput
public function setInput($var) { GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\SynthesisInput::class); $this->input = $var; return $this; }
php
public function setInput($var) { GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\SynthesisInput::class); $this->input = $var; return $this; }
[ "public", "function", "setInput", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "TextToSpeech", "\\", "V1", "\\", "SynthesisInput", "::", "class", ")", ";", "$", "this", "->", "in...
Required. The Synthesizer requires either plain text or SSML as input. Generated from protobuf field <code>.google.cloud.texttospeech.v1.SynthesisInput input = 1;</code> @param \Google\Cloud\TextToSpeech\V1\SynthesisInput $var @return $this
[ "Required", ".", "The", "Synthesizer", "requires", "either", "plain", "text", "or", "SSML", "as", "input", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/TextToSpeech/src/V1/SynthesizeSpeechRequest.php#L74-L80
train
googleapis/google-cloud-php
TextToSpeech/src/V1/SynthesizeSpeechRequest.php
SynthesizeSpeechRequest.setVoice
public function setVoice($var) { GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams::class); $this->voice = $var; return $this; }
php
public function setVoice($var) { GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams::class); $this->voice = $var; return $this; }
[ "public", "function", "setVoice", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "TextToSpeech", "\\", "V1", "\\", "VoiceSelectionParams", "::", "class", ")", ";", "$", "this", "->",...
Required. The desired voice of the synthesized audio. Generated from protobuf field <code>.google.cloud.texttospeech.v1.VoiceSelectionParams voice = 2;</code> @param \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $var @return $this
[ "Required", ".", "The", "desired", "voice", "of", "the", "synthesized", "audio", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/TextToSpeech/src/V1/SynthesizeSpeechRequest.php#L100-L106
train
googleapis/google-cloud-php
TextToSpeech/src/V1/SynthesizeSpeechRequest.php
SynthesizeSpeechRequest.setAudioConfig
public function setAudioConfig($var) { GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\AudioConfig::class); $this->audio_config = $var; return $this; }
php
public function setAudioConfig($var) { GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\AudioConfig::class); $this->audio_config = $var; return $this; }
[ "public", "function", "setAudioConfig", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "TextToSpeech", "\\", "V1", "\\", "AudioConfig", "::", "class", ")", ";", "$", "this", "->", ...
Required. The configuration of the synthesized audio. Generated from protobuf field <code>.google.cloud.texttospeech.v1.AudioConfig audio_config = 3;</code> @param \Google\Cloud\TextToSpeech\V1\AudioConfig $var @return $this
[ "Required", ".", "The", "configuration", "of", "the", "synthesized", "audio", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/TextToSpeech/src/V1/SynthesizeSpeechRequest.php#L126-L132
train
googleapis/google-cloud-php
SecurityCenter/src/V1/Asset.php
Asset.setSecurityCenterProperties
public function setSecurityCenterProperties($var) { GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Asset_SecurityCenterProperties::class); $this->security_center_properties = $var; return $this; }
php
public function setSecurityCenterProperties($var) { GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Asset_SecurityCenterProperties::class); $this->security_center_properties = $var; return $this; }
[ "public", "function", "setSecurityCenterProperties", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "SecurityCenter", "\\", "V1", "\\", "Asset_SecurityCenterProperties", "::", "class", ")", ...
Cloud SCC managed properties. These properties are managed by Cloud SCC and cannot be modified by the user. Generated from protobuf field <code>.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2;</code> @param \Google\Cloud\SecurityCenter\V1\Asset\SecurityCenterProperties $va...
[ "Cloud", "SCC", "managed", "properties", ".", "These", "properties", "are", "managed", "by", "Cloud", "SCC", "and", "cannot", "be", "modified", "by", "the", "user", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/SecurityCenter/src/V1/Asset.php#L162-L168
train
googleapis/google-cloud-php
SecurityCenter/src/V1/Asset.php
Asset.setResourceProperties
public function setResourceProperties($var) { $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); $this->resource_properties = $arr; return $this; }
php
public function setResourceProperties($var) { $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); $this->resource_properties = $arr; return $this; }
[ "public", "function", "setResourceProperties", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkMapField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "STRING", ",", "\\", "Google", "...
Resource managed properties. These properties are managed and defined by the GCP resource and cannot be modified by the user. Generated from protobuf field <code>map<string, .google.protobuf.Value> resource_properties = 7;</code> @param array|\Google\Protobuf\Internal\MapField $var @return $this
[ "Resource", "managed", "properties", ".", "These", "properties", "are", "managed", "and", "defined", "by", "the", "GCP", "resource", "and", "cannot", "be", "modified", "by", "the", "user", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/SecurityCenter/src/V1/Asset.php#L190-L196
train
googleapis/google-cloud-php
SecurityCenter/src/V1/Asset.php
Asset.setIamPolicy
public function setIamPolicy($var) { GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Asset_IamPolicy::class); $this->iam_policy = $var; return $this; }
php
public function setIamPolicy($var) { GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Asset_IamPolicy::class); $this->iam_policy = $var; return $this; }
[ "public", "function", "setIamPolicy", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "SecurityCenter", "\\", "V1", "\\", "Asset_IamPolicy", "::", "class", ")", ";", "$", "this", "->"...
IAM Policy information associated with the GCP resource described by the Cloud SCC asset. This information is managed and defined by the GCP resource and cannot be modified by the user. Generated from protobuf field <code>.google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11;</code> @param \Google\Cloud\Secu...
[ "IAM", "Policy", "information", "associated", "with", "the", "GCP", "resource", "described", "by", "the", "Cloud", "SCC", "asset", ".", "This", "information", "is", "managed", "and", "defined", "by", "the", "GCP", "resource", "and", "cannot", "be", "modified",...
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/SecurityCenter/src/V1/Asset.php#L302-L308
train
googleapis/google-cloud-php
Firestore/src/V1beta1/ListenResponse.php
ListenResponse.setFilter
public function setFilter($var) { GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\ExistenceFilter::class); $this->writeOneof(5, $var); return $this; }
php
public function setFilter($var) { GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\ExistenceFilter::class); $this->writeOneof(5, $var); return $this; }
[ "public", "function", "setFilter", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Firestore", "\\", "V1beta1", "\\", "ExistenceFilter", "::", "class", ")", ";", "$", "this", "->", ...
A filter to apply to the set of documents previously returned for the given target. Returned when documents may have been removed from the given target, but the exact documents are unknown. Generated from protobuf field <code>.google.firestore.v1beta1.ExistenceFilter filter = 5;</code> @param \Google\Cloud\Firestore\V...
[ "A", "filter", "to", "apply", "to", "the", "set", "of", "documents", "previously", "returned", "for", "the", "given", "target", ".", "Returned", "when", "documents", "may", "have", "been", "removed", "from", "the", "given", "target", "but", "the", "exact", ...
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1beta1/ListenResponse.php#L177-L183
train
googleapis/google-cloud-php
Dlp/src/V2/TransformationOverview.php
TransformationOverview.setTransformationSummaries
public function setTransformationSummaries($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\TransformationSummary::class); $this->transformation_summaries = $arr; return $this; }
php
public function setTransformationSummaries($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\TransformationSummary::class); $this->transformation_summaries = $arr; return $this; }
[ "public", "function", "setTransformationSummaries", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "G...
Transformations applied to the dataset. Generated from protobuf field <code>repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3;</code> @param \Google\Cloud\Dlp\V2\TransformationSummary[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Transformations", "applied", "to", "the", "dataset", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/TransformationOverview.php#L92-L98
train
googleapis/google-cloud-php
Dlp/src/V2/ListJobTriggersResponse.php
ListJobTriggersResponse.setJobTriggers
public function setJobTriggers($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\JobTrigger::class); $this->job_triggers = $arr; return $this; }
php
public function setJobTriggers($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\JobTrigger::class); $this->job_triggers = $arr; return $this; }
[ "public", "function", "setJobTriggers", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\...
List of triggeredJobs, up to page_size in ListJobTriggersRequest. Generated from protobuf field <code>repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1;</code> @param \Google\Cloud\Dlp\V2\JobTrigger[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "List", "of", "triggeredJobs", "up", "to", "page_size", "in", "ListJobTriggersRequest", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/ListJobTriggersResponse.php#L68-L74
train
googleapis/google-cloud-php
Dataproc/src/V1beta2/TemplateParameter.php
TemplateParameter.setValidation
public function setValidation($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\ParameterValidation::class); $this->validation = $var; return $this; }
php
public function setValidation($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\ParameterValidation::class); $this->validation = $var; return $this; }
[ "public", "function", "setValidation", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Dataproc", "\\", "V1beta2", "\\", "ParameterValidation", "::", "class", ")", ";", "$", "this", ...
Optional. Validation rules to be applied to this parameter's value. Generated from protobuf field <code>.google.cloud.dataproc.v1beta2.ParameterValidation validation = 4;</code> @param \Google\Cloud\Dataproc\V1beta2\ParameterValidation $var @return $this
[ "Optional", ".", "Validation", "rules", "to", "be", "applied", "to", "this", "parameter", "s", "value", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1beta2/TemplateParameter.php#L336-L342
train
googleapis/google-cloud-php
Container/src/V1/NodeConfig.php
NodeConfig.setTags
public function setTags($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->tags = $arr; return $this; }
php
public function setTags($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->tags = $arr; return $this; }
[ "public", "function", "setTags", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "STRING", ")", ";", "$", "this", "->", ...
The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster or node pool creation. Each tag within the list must comply with RFC1035. Generated from protobuf field <code>repeated string tags = 8;</code> @param s...
[ "The", "list", "of", "instance", "tags", "applied", "to", "all", "nodes", ".", "Tags", "are", "used", "to", "identify", "valid", "sources", "or", "targets", "for", "network", "firewalls", "and", "are", "specified", "by", "the", "client", "during", "cluster",...
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/NodeConfig.php#L588-L594
train
googleapis/google-cloud-php
Firestore/src/ValueMapper.php
ValueMapper.encodeValues
public function encodeValues(array $fields) { $output = []; foreach ($fields as $key => $val) { $output[$key] = $this->encodeValue($val); } return $output; }
php
public function encodeValues(array $fields) { $output = []; foreach ($fields as $key => $val) { $output[$key] = $this->encodeValue($val); } return $output; }
[ "public", "function", "encodeValues", "(", "array", "$", "fields", ")", "{", "$", "output", "=", "[", "]", ";", "foreach", "(", "$", "fields", "as", "$", "key", "=>", "$", "val", ")", "{", "$", "output", "[", "$", "key", "]", "=", "$", "this", ...
Convert a PHP array containing google-cloud-php and simple types to an array ready to be sent to Firestore. @param array $fields A list of fields to encode. @return array
[ "Convert", "a", "PHP", "array", "containing", "google", "-", "cloud", "-", "php", "and", "simple", "types", "to", "an", "array", "ready", "to", "be", "sent", "to", "Firestore", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/ValueMapper.php#L96-L105
train
googleapis/google-cloud-php
Firestore/src/ValueMapper.php
ValueMapper.encodeValue
public function encodeValue($value) { $type = gettype($value); switch ($type) { case 'boolean': return ['booleanValue' => $value]; break; case 'integer': return ['integerValue' => $value]; break; c...
php
public function encodeValue($value) { $type = gettype($value); switch ($type) { case 'boolean': return ['booleanValue' => $value]; break; case 'integer': return ['integerValue' => $value]; break; c...
[ "public", "function", "encodeValue", "(", "$", "value", ")", "{", "$", "type", "=", "gettype", "(", "$", "value", ")", ";", "switch", "(", "$", "type", ")", "{", "case", "'boolean'", ":", "return", "[", "'booleanValue'", "=>", "$", "value", "]", ";",...
Encode a Google Cloud PHP value as a Firestore value. @param mixed $value @return array [Value](https://firebase.google.com/docs/firestore/reference/rpc/google.firestore.v1beta1#value) @throws \RuntimeException If an unknown type is encountered.
[ "Encode", "a", "Google", "Cloud", "PHP", "value", "as", "a", "Firestore", "value", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/ValueMapper.php#L195-L246
train
googleapis/google-cloud-php
Firestore/src/ValueMapper.php
ValueMapper.encodeObjectValue
private function encodeObjectValue($value) { if ($value instanceof \stdClass) { return $this->encodeAssociativeArrayValue((array) $value); } if ($value instanceof Blob) { return ['bytesValue' => (string) $value]; } if ($value instanceof \DateTimeInte...
php
private function encodeObjectValue($value) { if ($value instanceof \stdClass) { return $this->encodeAssociativeArrayValue((array) $value); } if ($value instanceof Blob) { return ['bytesValue' => (string) $value]; } if ($value instanceof \DateTimeInte...
[ "private", "function", "encodeObjectValue", "(", "$", "value", ")", "{", "if", "(", "$", "value", "instanceof", "\\", "stdClass", ")", "{", "return", "$", "this", "->", "encodeAssociativeArrayValue", "(", "(", "array", ")", "$", "value", ")", ";", "}", "...
Encode a value of type `object` as a Firestore value. @param object $value @return array @throws \RuntimeException If an invalid object type is provided.
[ "Encode", "a", "value", "of", "type", "object", "as", "a", "Firestore", "value", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/ValueMapper.php#L278-L318
train
googleapis/google-cloud-php
Firestore/src/ValueMapper.php
ValueMapper.encodeAssociativeArrayValue
private function encodeAssociativeArrayValue(array $value) { $out = []; foreach ($value as $key => $item) { $out[$key] = $this->encodeValue($item); } return ['mapValue' => ['fields' => $out]]; }
php
private function encodeAssociativeArrayValue(array $value) { $out = []; foreach ($value as $key => $item) { $out[$key] = $this->encodeValue($item); } return ['mapValue' => ['fields' => $out]]; }
[ "private", "function", "encodeAssociativeArrayValue", "(", "array", "$", "value", ")", "{", "$", "out", "=", "[", "]", ";", "foreach", "(", "$", "value", "as", "$", "key", "=>", "$", "item", ")", "{", "$", "out", "[", "$", "key", "]", "=", "$", "...
Encode an associative array as a Firestore Map value. @codingStandardsIgnoreStart @param array $value @return array [MapValue](https://firebase.google.com/docs/firestore/reference/rpc/google.firestore.v1beta1#google.firestore.v1beta1.MapValue) @codingStandardsIgnoreEnd
[ "Encode", "an", "associative", "array", "as", "a", "Firestore", "Map", "value", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/ValueMapper.php#L328-L336
train
googleapis/google-cloud-php
Iot/src/V1/CreateDeviceRequest.php
CreateDeviceRequest.setDevice
public function setDevice($var) { GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\Device::class); $this->device = $var; return $this; }
php
public function setDevice($var) { GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\Device::class); $this->device = $var; return $this; }
[ "public", "function", "setDevice", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Iot", "\\", "V1", "\\", "Device", "::", "class", ")", ";", "$", "this", "->", "device", "=", ...
The device registration details. The field `name` must be empty. The server generates `name` from the device registry `id` and the `parent` field. Generated from protobuf field <code>.google.cloud.iot.v1.Device device = 2;</code> @param \Google\Cloud\Iot\V1\Device $var @return $this
[ "The", "device", "registration", "details", ".", "The", "field", "name", "must", "be", "empty", ".", "The", "server", "generates", "name", "from", "the", "device", "registry", "id", "and", "the", "parent", "field", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Iot/src/V1/CreateDeviceRequest.php#L108-L114
train
googleapis/google-cloud-php
Dialogflow/src/V2/WebhookResponse.php
WebhookResponse.setFollowupEventInput
public function setFollowupEventInput($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EventInput::class); $this->followup_event_input = $var; return $this; }
php
public function setFollowupEventInput($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EventInput::class); $this->followup_event_input = $var; return $this; }
[ "public", "function", "setFollowupEventInput", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Dialogflow", "\\", "V2", "\\", "EventInput", "::", "class", ")", ";", "$", "this", "->"...
Optional. Makes the platform immediately invoke another `DetectIntent` call internally with the specified event as input. Generated from protobuf field <code>.google.cloud.dialogflow.v2.EventInput followup_event_input = 6;</code> @param \Google\Cloud\Dialogflow\V2\EventInput $var @return $this
[ "Optional", ".", "Makes", "the", "platform", "immediately", "invoke", "another", "DetectIntent", "call", "internally", "with", "the", "specified", "event", "as", "input", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/WebhookResponse.php#L328-L334
train
googleapis/google-cloud-php
Bigtable/src/Admin/V2/CreateClusterRequest.php
CreateClusterRequest.setCluster
public function setCluster($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); $this->cluster = $var; return $this; }
php
public function setCluster($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); $this->cluster = $var; return $this; }
[ "public", "function", "setCluster", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Bigtable", "\\", "Admin", "\\", "V2", "\\", "Cluster", "::", "class", ")", ";", "$", "this", "...
The cluster to be created. Fields marked `OutputOnly` must be left blank. Generated from protobuf field <code>.google.bigtable.admin.v2.Cluster cluster = 3;</code> @param \Google\Cloud\Bigtable\Admin\V2\Cluster $var @return $this
[ "The", "cluster", "to", "be", "created", ".", "Fields", "marked", "OutputOnly", "must", "be", "left", "blank", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/Admin/V2/CreateClusterRequest.php#L146-L152
train
googleapis/google-cloud-php
Spanner/src/KeySet.php
KeySet.keySetObject
public function keySetObject() { $ranges = []; foreach ($this->ranges as $range) { $ranges[] = $range->keyRangeObject(); } $set = []; if ($this->all) { $set['all'] = true; } if ($this->keys) { $set['keys'] = $this->keys; ...
php
public function keySetObject() { $ranges = []; foreach ($this->ranges as $range) { $ranges[] = $range->keyRangeObject(); } $set = []; if ($this->all) { $set['all'] = true; } if ($this->keys) { $set['keys'] = $this->keys; ...
[ "public", "function", "keySetObject", "(", ")", "{", "$", "ranges", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "ranges", "as", "$", "range", ")", "{", "$", "ranges", "[", "]", "=", "$", "range", "->", "keyRangeObject", "(", ")", ";", ...
Format a KeySet object for use in the Spanner API. @access private
[ "Format", "a", "KeySet", "object", "for", "use", "in", "the", "Spanner", "API", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/KeySet.php#L234-L256
train