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
PubSub/src/V1/StreamingPullRequest.php
StreamingPullRequest.setModifyDeadlineAckIds
public function setModifyDeadlineAckIds($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->modify_deadline_ack_ids = $arr; return $this; }
php
public function setModifyDeadlineAckIds($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->modify_deadline_ack_ids = $arr; return $this; }
[ "public", "function", "setModifyDeadlineAckIds", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "STRING", ")", ";", "$", "this", "->", "modify_deadline_ack_ids", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
List of acknowledgement IDs whose deadline will be modified based on the corresponding element in `modify_deadline_seconds`. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted. Generated from protobuf field <code>repeated string modify_deadline_ack_ids = 4;</code> @param string[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "List", "of", "acknowledgement", "IDs", "whose", "deadline", "will", "be", "modified", "based", "on", "the", "corresponding", "element", "in", "modify_deadline_seconds", ".", "This", "field", "can", "be", "used", "to", "indicate", "that", "more", "time", "is", "needed", "to", "process", "a", "message", "by", "the", "subscriber", "or", "to", "make", "the", "message", "available", "for", "redelivery", "if", "the", "processing", "was", "interrupted", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/V1/StreamingPullRequest.php#L260-L266
train
googleapis/google-cloud-php
AutoMl/src/V1beta1/OperationMetadata.php
OperationMetadata.setCreateModelDetails
public function setCreateModelDetails($var) { GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1beta1\CreateModelOperationMetadata::class); $this->writeOneof(10, $var); return $this; }
php
public function setCreateModelDetails($var) { GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1beta1\CreateModelOperationMetadata::class); $this->writeOneof(10, $var); return $this; }
[ "public", "function", "setCreateModelDetails", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "AutoMl", "\\", "V1beta1", "\\", "CreateModelOperationMetadata", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "10", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
Details of CreateModel operation. Generated from protobuf field <code>.google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10;</code> @param \Google\Cloud\AutoMl\V1beta1\CreateModelOperationMetadata $var @return $this
[ "Details", "of", "CreateModel", "operation", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/AutoMl/src/V1beta1/OperationMetadata.php#L91-L97
train
googleapis/google-cloud-php
AutoMl/src/V1beta1/OperationMetadata.php
OperationMetadata.setPartialFailures
public function setPartialFailures($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); $this->partial_failures = $arr; return $this; }
php
public function setPartialFailures($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); $this->partial_failures = $arr; return $this; }
[ "public", "function", "setPartialFailures", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Rpc", "\\", "Status", "::", "class", ")", ";", "$", "this", "->", "partial_failures", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
Output only. Partial failures encountered. E.g. single files that couldn't be read. This field should never exceed 20 entries. Status details field will contain standard GCP error details. Generated from protobuf field <code>repeated .google.rpc.Status partial_failures = 2;</code> @param \Google\Rpc\Status[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Output", "only", ".", "Partial", "failures", "encountered", ".", "E", ".", "g", ".", "single", "files", "that", "couldn", "t", "be", "read", ".", "This", "field", "should", "never", "exceed", "20", "entries", ".", "Status", "details", "field", "will", "contain", "standard", "GCP", "error", "details", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/AutoMl/src/V1beta1/OperationMetadata.php#L149-L155
train
googleapis/google-cloud-php
Core/src/Exception/AbortedException.php
AbortedException.getRetryDelay
public function getRetryDelay() { $metadata = array_filter($this->metadata, function ($metadataItem) { return array_key_exists('retryDelay', $metadataItem); }); if (count($metadata) === 0) { return ['seconds' => 0, 'nanos' => 0]; } return $metadata[0]['retryDelay'] + [ 'seconds' => 0, 'nanos' => 0 ]; }
php
public function getRetryDelay() { $metadata = array_filter($this->metadata, function ($metadataItem) { return array_key_exists('retryDelay', $metadataItem); }); if (count($metadata) === 0) { return ['seconds' => 0, 'nanos' => 0]; } return $metadata[0]['retryDelay'] + [ 'seconds' => 0, 'nanos' => 0 ]; }
[ "public", "function", "getRetryDelay", "(", ")", "{", "$", "metadata", "=", "array_filter", "(", "$", "this", "->", "metadata", ",", "function", "(", "$", "metadataItem", ")", "{", "return", "array_key_exists", "(", "'retryDelay'", ",", "$", "metadataItem", ")", ";", "}", ")", ";", "if", "(", "count", "(", "$", "metadata", ")", "===", "0", ")", "{", "return", "[", "'seconds'", "=>", "0", ",", "'nanos'", "=>", "0", "]", ";", "}", "return", "$", "metadata", "[", "0", "]", "[", "'retryDelay'", "]", "+", "[", "'seconds'", "=>", "0", ",", "'nanos'", "=>", "0", "]", ";", "}" ]
Return the delay in seconds and nanos before retrying the failed request. @return array
[ "Return", "the", "delay", "in", "seconds", "and", "nanos", "before", "retrying", "the", "failed", "request", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/Exception/AbortedException.php#L30-L44
train
googleapis/google-cloud-php
Vision/src/V1/Word.php
Word.setSymbols
public function setSymbols($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Symbol::class); $this->symbols = $arr; return $this; }
php
public function setSymbols($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Symbol::class); $this->symbols = $arr; return $this; }
[ "public", "function", "setSymbols", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "Vision", "\\", "V1", "\\", "Symbol", "::", "class", ")", ";", "$", "this", "->", "symbols", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
List of symbols in the word. The order of the symbols follows the natural reading order. Generated from protobuf field <code>repeated .google.cloud.vision.v1.Symbol symbols = 3;</code> @param \Google\Cloud\Vision\V1\Symbol[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "List", "of", "symbols", "in", "the", "word", ".", "The", "order", "of", "the", "symbols", "follows", "the", "natural", "reading", "order", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/Word.php#L194-L200
train
googleapis/google-cloud-php
Dlp/src/V2/AnalyzeDataSourceRiskDetails/NumericalStatsResult.php
NumericalStatsResult.setMinValue
public function setMinValue($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\Value::class); $this->min_value = $var; return $this; }
php
public function setMinValue($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\Value::class); $this->min_value = $var; return $this; }
[ "public", "function", "setMinValue", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Dlp", "\\", "V2", "\\", "Value", "::", "class", ")", ";", "$", "this", "->", "min_value", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Minimum value appearing in the column. Generated from protobuf field <code>.google.privacy.dlp.v2.Value min_value = 1;</code> @param \Google\Cloud\Dlp\V2\Value $var @return $this
[ "Minimum", "value", "appearing", "in", "the", "column", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/AnalyzeDataSourceRiskDetails/NumericalStatsResult.php#L76-L82
train
googleapis/google-cloud-php
Dlp/src/V2/AnalyzeDataSourceRiskDetails/NumericalStatsResult.php
NumericalStatsResult.setMaxValue
public function setMaxValue($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\Value::class); $this->max_value = $var; return $this; }
php
public function setMaxValue($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\Value::class); $this->max_value = $var; return $this; }
[ "public", "function", "setMaxValue", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Dlp", "\\", "V2", "\\", "Value", "::", "class", ")", ";", "$", "this", "->", "max_value", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Maximum value appearing in the column. Generated from protobuf field <code>.google.privacy.dlp.v2.Value max_value = 2;</code> @param \Google\Cloud\Dlp\V2\Value $var @return $this
[ "Maximum", "value", "appearing", "in", "the", "column", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/AnalyzeDataSourceRiskDetails/NumericalStatsResult.php#L102-L108
train
googleapis/google-cloud-php
Dlp/src/V2/AnalyzeDataSourceRiskDetails/NumericalStatsResult.php
NumericalStatsResult.setQuantileValues
public function setQuantileValues($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\Value::class); $this->quantile_values = $arr; return $this; }
php
public function setQuantileValues($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\Value::class); $this->quantile_values = $arr; return $this; }
[ "public", "function", "setQuantileValues", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "Dlp", "\\", "V2", "\\", "Value", "::", "class", ")", ";", "$", "this", "->", "quantile_values", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
List of 99 values that partition the set of field values into 100 equal sized buckets. Generated from protobuf field <code>repeated .google.privacy.dlp.v2.Value quantile_values = 4;</code> @param \Google\Cloud\Dlp\V2\Value[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "List", "of", "99", "values", "that", "partition", "the", "set", "of", "field", "values", "into", "100", "equal", "sized", "buckets", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/AnalyzeDataSourceRiskDetails/NumericalStatsResult.php#L130-L136
train
googleapis/google-cloud-php
Dlp/src/V2/PrivacyMetric/LDiversityConfig.php
LDiversityConfig.setSensitiveAttribute
public function setSensitiveAttribute($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\FieldId::class); $this->sensitive_attribute = $var; return $this; }
php
public function setSensitiveAttribute($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\FieldId::class); $this->sensitive_attribute = $var; return $this; }
[ "public", "function", "setSensitiveAttribute", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Dlp", "\\", "V2", "\\", "FieldId", "::", "class", ")", ";", "$", "this", "->", "sensitive_attribute", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Sensitive field for computing the l-value. Generated from protobuf field <code>.google.privacy.dlp.v2.FieldId sensitive_attribute = 2;</code> @param \Google\Cloud\Dlp\V2\FieldId $var @return $this
[ "Sensitive", "field", "for", "computing", "the", "l", "-", "value", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/PrivacyMetric/LDiversityConfig.php#L100-L106
train
googleapis/google-cloud-php
Dlp/src/V2/CustomInfoType/DetectionRule/HotwordRule.php
HotwordRule.setHotwordRegex
public function setHotwordRegex($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_Regex::class); $this->hotword_regex = $var; return $this; }
php
public function setHotwordRegex($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_Regex::class); $this->hotword_regex = $var; return $this; }
[ "public", "function", "setHotwordRegex", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Dlp", "\\", "V2", "\\", "CustomInfoType_Regex", "::", "class", ")", ";", "$", "this", "->", "hotword_regex", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Regular expression pattern defining what qualifies as a hotword. Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code> @param \Google\Cloud\Dlp\V2\CustomInfoType\Regex $var @return $this
[ "Regular", "expression", "pattern", "defining", "what", "qualifies", "as", "a", "hotword", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/CustomInfoType/DetectionRule/HotwordRule.php#L89-L95
train
googleapis/google-cloud-php
Dlp/src/V2/CustomInfoType/DetectionRule/HotwordRule.php
HotwordRule.setLikelihoodAdjustment
public function setLikelihoodAdjustment($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_DetectionRule_LikelihoodAdjustment::class); $this->likelihood_adjustment = $var; return $this; }
php
public function setLikelihoodAdjustment($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_DetectionRule_LikelihoodAdjustment::class); $this->likelihood_adjustment = $var; return $this; }
[ "public", "function", "setLikelihoodAdjustment", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Dlp", "\\", "V2", "\\", "CustomInfoType_DetectionRule_LikelihoodAdjustment", "::", "class", ")", ";", "$", "this", "->", "likelihood_adjustment", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Likelihood adjustment to apply to all matching findings. Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;</code> @param \Google\Cloud\Dlp\V2\CustomInfoType\DetectionRule\LikelihoodAdjustment $var @return $this
[ "Likelihood", "adjustment", "to", "apply", "to", "all", "matching", "findings", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/CustomInfoType/DetectionRule/HotwordRule.php#L155-L161
train
googleapis/google-cloud-php
Talent/src/V4beta1/Company.php
Company.setSize
public function setSize($var) { GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4beta1\CompanySize::class); $this->size = $var; return $this; }
php
public function setSize($var) { GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4beta1\CompanySize::class); $this->size = $var; return $this; }
[ "public", "function", "setSize", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkEnum", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Talent", "\\", "V4beta1", "\\", "CompanySize", "::", "class", ")", ";", "$", "this", "->", "size", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Optional. The employer's company size. Generated from protobuf field <code>.google.cloud.talent.v4beta1.CompanySize size = 4;</code> @param int $var @return $this
[ "Optional", ".", "The", "employer", "s", "company", "size", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/Company.php#L336-L342
train
googleapis/google-cloud-php
BigQuery/src/Job.php
Job.queryResults
public function queryResults(array $options = []) { $timeoutMs = $this->pluck('initialTimeoutMs', $options, false) ?: 0; $queryResultsOptions = $options; $options['timeoutMs'] = $timeoutMs; return new QueryResults( $this->connection, $this->identity['jobId'], $this->identity['projectId'], $this->connection->getQueryResults($options + $this->identity), $this->mapper, $this, $queryResultsOptions ); }
php
public function queryResults(array $options = []) { $timeoutMs = $this->pluck('initialTimeoutMs', $options, false) ?: 0; $queryResultsOptions = $options; $options['timeoutMs'] = $timeoutMs; return new QueryResults( $this->connection, $this->identity['jobId'], $this->identity['projectId'], $this->connection->getQueryResults($options + $this->identity), $this->mapper, $this, $queryResultsOptions ); }
[ "public", "function", "queryResults", "(", "array", "$", "options", "=", "[", "]", ")", "{", "$", "timeoutMs", "=", "$", "this", "->", "pluck", "(", "'initialTimeoutMs'", ",", "$", "options", ",", "false", ")", "?", ":", "0", ";", "$", "queryResultsOptions", "=", "$", "options", ";", "$", "options", "[", "'timeoutMs'", "]", "=", "$", "timeoutMs", ";", "return", "new", "QueryResults", "(", "$", "this", "->", "connection", ",", "$", "this", "->", "identity", "[", "'jobId'", "]", ",", "$", "this", "->", "identity", "[", "'projectId'", "]", ",", "$", "this", "->", "connection", "->", "getQueryResults", "(", "$", "options", "+", "$", "this", "->", "identity", ")", ",", "$", "this", "->", "mapper", ",", "$", "this", ",", "$", "queryResultsOptions", ")", ";", "}" ]
Retrieves the results of a query job. Please note this method will trigger an initial network request, but further polling may be necessary in order to access the full query results. Polling for completion can be initiated by iterating on the returned {@see Google\Cloud\BigQuery\QueryResults}, or by calling either {@see Google\Cloud\BigQuery\QueryResults::rows()} or {@see Google\Cloud\BigQuery\QueryResults::waitUntilComplete()}. Example: ``` $queryResults = $job->queryResults(); ``` @see https://cloud.google.com/bigquery/docs/reference/v2/jobs/getQueryResults Jobs getQueryResults API documentation. @param array $options [optional] { Configuration options. @type int $maxResults Maximum number of results to read per page. @type int $startIndex Zero-based index of the starting row. @type int $initialTimeoutMs How long, in milliseconds, to wait for query results to become available before timing out. **Defaults to** `0` milliseconds (0 seconds). Please note that this option is used only for the initial call to get query results. To control the timeout for any subsequent calls while polling for query results to complete, please see the `$timeoutMs` option. @type int $timeoutMs How long, in milliseconds, each API call will wait for query results to become available before timing out. Depending on whether the $maxRetries has been exceeded, the results will be polled again after the timeout has been reached. **Defaults to** `10000` milliseconds (10 seconds). Please note that this option is used when iterating on the returned class, and will not apply immediately upon calling of this method. @type int $maxRetries The number of times to poll the Job status, until the job is complete. By default, will poll indefinitely. Please note that this option is used when iterating on the returned class, and will not block immediately upon calling of this method. } @return QueryResults
[ "Retrieves", "the", "results", "of", "a", "query", "job", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/BigQuery/src/Job.php#L190-L205
train
googleapis/google-cloud-php
BigQuery/src/Job.php
Job.reload
public function reload(array $options = []) { return $this->info = $this->connection->getJob($options + $this->identity); }
php
public function reload(array $options = []) { return $this->info = $this->connection->getJob($options + $this->identity); }
[ "public", "function", "reload", "(", "array", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->", "info", "=", "$", "this", "->", "connection", "->", "getJob", "(", "$", "options", "+", "$", "this", "->", "identity", ")", ";", "}" ]
Triggers a network request to reload the job's details. Example: ``` echo $job->isComplete(); // false sleep(1); // let's wait for a moment... $job->reload(); // execute a network request echo $job->isComplete(); // true ``` @see https://cloud.google.com/bigquery/docs/reference/v2/jobs/get Jobs get API documentation. @param array $options [optional] Configuration options. @return array
[ "Triggers", "a", "network", "request", "to", "reload", "the", "job", "s", "details", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/BigQuery/src/Job.php#L304-L307
train
googleapis/google-cloud-php
Spanner/src/V1/PartitionQueryRequest.php
PartitionQueryRequest.setPartitionOptions
public function setPartitionOptions($var) { GPBUtil::checkMessage($var, \Google\Cloud\Spanner\V1\PartitionOptions::class); $this->partition_options = $var; return $this; }
php
public function setPartitionOptions($var) { GPBUtil::checkMessage($var, \Google\Cloud\Spanner\V1\PartitionOptions::class); $this->partition_options = $var; return $this; }
[ "public", "function", "setPartitionOptions", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Spanner", "\\", "V1", "\\", "PartitionOptions", "::", "class", ")", ";", "$", "this", "->", "partition_options", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Additional options that affect how many partitions are created. Generated from protobuf field <code>.google.spanner.v1.PartitionOptions partition_options = 6;</code> @param \Google\Cloud\Spanner\V1\PartitionOptions $var @return $this
[ "Additional", "options", "that", "affect", "how", "many", "partitions", "are", "created", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/V1/PartitionQueryRequest.php#L336-L342
train
googleapis/google-cloud-php
Bigtable/src/V2/RowFilter.php
RowFilter.setChain
public function setChain($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter_Chain::class); $this->writeOneof(1, $var); return $this; }
php
public function setChain($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter_Chain::class); $this->writeOneof(1, $var); return $this; }
[ "public", "function", "setChain", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Bigtable", "\\", "V2", "\\", "RowFilter_Chain", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "1", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
Applies several RowFilters to the data in sequence, progressively narrowing the results. Generated from protobuf field <code>.google.bigtable.v2.RowFilter.Chain chain = 1;</code> @param \Google\Cloud\Bigtable\V2\RowFilter\Chain $var @return $this
[ "Applies", "several", "RowFilters", "to", "the", "data", "in", "sequence", "progressively", "narrowing", "the", "results", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/V2/RowFilter.php#L216-L222
train
googleapis/google-cloud-php
Bigtable/src/V2/RowFilter.php
RowFilter.setInterleave
public function setInterleave($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter_Interleave::class); $this->writeOneof(2, $var); return $this; }
php
public function setInterleave($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter_Interleave::class); $this->writeOneof(2, $var); return $this; }
[ "public", "function", "setInterleave", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Bigtable", "\\", "V2", "\\", "RowFilter_Interleave", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "2", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
Applies several RowFilters to the data in parallel and combines the results. Generated from protobuf field <code>.google.bigtable.v2.RowFilter.Interleave interleave = 2;</code> @param \Google\Cloud\Bigtable\V2\RowFilter\Interleave $var @return $this
[ "Applies", "several", "RowFilters", "to", "the", "data", "in", "parallel", "and", "combines", "the", "results", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/V2/RowFilter.php#L244-L250
train
googleapis/google-cloud-php
Bigtable/src/V2/RowFilter.php
RowFilter.setCondition
public function setCondition($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter_Condition::class); $this->writeOneof(3, $var); return $this; }
php
public function setCondition($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter_Condition::class); $this->writeOneof(3, $var); return $this; }
[ "public", "function", "setCondition", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Bigtable", "\\", "V2", "\\", "RowFilter_Condition", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "3", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
Applies one of two possible RowFilters to the data based on the output of a predicate RowFilter. Generated from protobuf field <code>.google.bigtable.v2.RowFilter.Condition condition = 3;</code> @param \Google\Cloud\Bigtable\V2\RowFilter\Condition $var @return $this
[ "Applies", "one", "of", "two", "possible", "RowFilters", "to", "the", "data", "based", "on", "the", "output", "of", "a", "predicate", "RowFilter", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/V2/RowFilter.php#L272-L278
train
googleapis/google-cloud-php
Bigtable/src/V2/RowFilter.php
RowFilter.setColumnRangeFilter
public function setColumnRangeFilter($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ColumnRange::class); $this->writeOneof(7, $var); return $this; }
php
public function setColumnRangeFilter($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ColumnRange::class); $this->writeOneof(7, $var); return $this; }
[ "public", "function", "setColumnRangeFilter", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Bigtable", "\\", "V2", "\\", "ColumnRange", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "7", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
Matches only cells from columns within the given range. Generated from protobuf field <code>.google.bigtable.v2.ColumnRange column_range_filter = 7;</code> @param \Google\Cloud\Bigtable\V2\ColumnRange $var @return $this
[ "Matches", "only", "cells", "from", "columns", "within", "the", "given", "range", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/V2/RowFilter.php#L624-L630
train
googleapis/google-cloud-php
Bigtable/src/V2/RowFilter.php
RowFilter.setTimestampRangeFilter
public function setTimestampRangeFilter($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\TimestampRange::class); $this->writeOneof(8, $var); return $this; }
php
public function setTimestampRangeFilter($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\TimestampRange::class); $this->writeOneof(8, $var); return $this; }
[ "public", "function", "setTimestampRangeFilter", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Bigtable", "\\", "V2", "\\", "TimestampRange", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "8", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
Matches only cells with timestamps within the given range. Generated from protobuf field <code>.google.bigtable.v2.TimestampRange timestamp_range_filter = 8;</code> @param \Google\Cloud\Bigtable\V2\TimestampRange $var @return $this
[ "Matches", "only", "cells", "with", "timestamps", "within", "the", "given", "range", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/V2/RowFilter.php#L650-L656
train
googleapis/google-cloud-php
Bigtable/src/V2/RowFilter.php
RowFilter.setValueRangeFilter
public function setValueRangeFilter($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ValueRange::class); $this->writeOneof(15, $var); return $this; }
php
public function setValueRangeFilter($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ValueRange::class); $this->writeOneof(15, $var); return $this; }
[ "public", "function", "setValueRangeFilter", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Bigtable", "\\", "V2", "\\", "ValueRange", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "15", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
Matches only cells with values that fall within the given range. Generated from protobuf field <code>.google.bigtable.v2.ValueRange value_range_filter = 15;</code> @param \Google\Cloud\Bigtable\V2\ValueRange $var @return $this
[ "Matches", "only", "cells", "with", "values", "that", "fall", "within", "the", "given", "range", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/V2/RowFilter.php#L710-L716
train
googleapis/google-cloud-php
Storage/src/EncryptionTrait.php
EncryptionTrait.formatEncryptionHeaders
public function formatEncryptionHeaders(array $options) { $encryptionHeaders = []; $useCopySourceHeaders = isset($options['useCopySourceHeaders']) ? $options['useCopySourceHeaders'] : false; $key = isset($options['encryptionKey']) ? $options['encryptionKey'] : null; $keySHA256 = isset($options['encryptionKeySHA256']) ? $options['encryptionKeySHA256'] : null; $destinationKey = isset($options['destinationEncryptionKey']) ? $options['destinationEncryptionKey'] : null; $destinationKeySHA256 = isset($options['destinationEncryptionKeySHA256']) ? $options['destinationEncryptionKeySHA256'] : null; unset($options['useCopySourceHeaders']); unset($options['encryptionKey']); unset($options['encryptionKeySHA256']); unset($options['destinationEncryptionKey']); unset($options['destinationEncryptionKeySHA256']); $encryptionHeaders = $this->buildHeaders($key, $keySHA256, $useCopySourceHeaders) + $this->buildHeaders($destinationKey, $destinationKeySHA256, false); if (!empty($encryptionHeaders)) { if (isset($options['restOptions']['headers'])) { $options['restOptions']['headers'] += $encryptionHeaders; } else { $options['restOptions']['headers'] = $encryptionHeaders; } } return $options; }
php
public function formatEncryptionHeaders(array $options) { $encryptionHeaders = []; $useCopySourceHeaders = isset($options['useCopySourceHeaders']) ? $options['useCopySourceHeaders'] : false; $key = isset($options['encryptionKey']) ? $options['encryptionKey'] : null; $keySHA256 = isset($options['encryptionKeySHA256']) ? $options['encryptionKeySHA256'] : null; $destinationKey = isset($options['destinationEncryptionKey']) ? $options['destinationEncryptionKey'] : null; $destinationKeySHA256 = isset($options['destinationEncryptionKeySHA256']) ? $options['destinationEncryptionKeySHA256'] : null; unset($options['useCopySourceHeaders']); unset($options['encryptionKey']); unset($options['encryptionKeySHA256']); unset($options['destinationEncryptionKey']); unset($options['destinationEncryptionKeySHA256']); $encryptionHeaders = $this->buildHeaders($key, $keySHA256, $useCopySourceHeaders) + $this->buildHeaders($destinationKey, $destinationKeySHA256, false); if (!empty($encryptionHeaders)) { if (isset($options['restOptions']['headers'])) { $options['restOptions']['headers'] += $encryptionHeaders; } else { $options['restOptions']['headers'] = $encryptionHeaders; } } return $options; }
[ "public", "function", "formatEncryptionHeaders", "(", "array", "$", "options", ")", "{", "$", "encryptionHeaders", "=", "[", "]", ";", "$", "useCopySourceHeaders", "=", "isset", "(", "$", "options", "[", "'useCopySourceHeaders'", "]", ")", "?", "$", "options", "[", "'useCopySourceHeaders'", "]", ":", "false", ";", "$", "key", "=", "isset", "(", "$", "options", "[", "'encryptionKey'", "]", ")", "?", "$", "options", "[", "'encryptionKey'", "]", ":", "null", ";", "$", "keySHA256", "=", "isset", "(", "$", "options", "[", "'encryptionKeySHA256'", "]", ")", "?", "$", "options", "[", "'encryptionKeySHA256'", "]", ":", "null", ";", "$", "destinationKey", "=", "isset", "(", "$", "options", "[", "'destinationEncryptionKey'", "]", ")", "?", "$", "options", "[", "'destinationEncryptionKey'", "]", ":", "null", ";", "$", "destinationKeySHA256", "=", "isset", "(", "$", "options", "[", "'destinationEncryptionKeySHA256'", "]", ")", "?", "$", "options", "[", "'destinationEncryptionKeySHA256'", "]", ":", "null", ";", "unset", "(", "$", "options", "[", "'useCopySourceHeaders'", "]", ")", ";", "unset", "(", "$", "options", "[", "'encryptionKey'", "]", ")", ";", "unset", "(", "$", "options", "[", "'encryptionKeySHA256'", "]", ")", ";", "unset", "(", "$", "options", "[", "'destinationEncryptionKey'", "]", ")", ";", "unset", "(", "$", "options", "[", "'destinationEncryptionKeySHA256'", "]", ")", ";", "$", "encryptionHeaders", "=", "$", "this", "->", "buildHeaders", "(", "$", "key", ",", "$", "keySHA256", ",", "$", "useCopySourceHeaders", ")", "+", "$", "this", "->", "buildHeaders", "(", "$", "destinationKey", ",", "$", "destinationKeySHA256", ",", "false", ")", ";", "if", "(", "!", "empty", "(", "$", "encryptionHeaders", ")", ")", "{", "if", "(", "isset", "(", "$", "options", "[", "'restOptions'", "]", "[", "'headers'", "]", ")", ")", "{", "$", "options", "[", "'restOptions'", "]", "[", "'headers'", "]", "+=", "$", "encryptionHeaders", ";", "}", "else", "{", "$", "options", "[", "'restOptions'", "]", "[", "'headers'", "]", "=", "$", "encryptionHeaders", ";", "}", "}", "return", "$", "options", ";", "}" ]
Formats options for customer-supplied encryption headers. @param array $options @return array @access private
[ "Formats", "options", "for", "customer", "-", "supplied", "encryption", "headers", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/EncryptionTrait.php#L52-L81
train
googleapis/google-cloud-php
Storage/src/EncryptionTrait.php
EncryptionTrait.buildHeaders
private function buildHeaders($key, $keySHA256, $useCopySourceHeaders) { if ($key) { $headerNames = $useCopySourceHeaders ? $this->copySourceEncryptionHeaderNames : $this->encryptionHeaderNames; if (!$keySHA256) { $decodedKey = base64_decode($key); $keySHA256 = base64_encode(hash('SHA256', $decodedKey, true)); } return [ $headerNames['algorithm'] => 'AES256', $headerNames['key'] => $key, $headerNames['keySHA256'] => $keySHA256 ]; } return []; }
php
private function buildHeaders($key, $keySHA256, $useCopySourceHeaders) { if ($key) { $headerNames = $useCopySourceHeaders ? $this->copySourceEncryptionHeaderNames : $this->encryptionHeaderNames; if (!$keySHA256) { $decodedKey = base64_decode($key); $keySHA256 = base64_encode(hash('SHA256', $decodedKey, true)); } return [ $headerNames['algorithm'] => 'AES256', $headerNames['key'] => $key, $headerNames['keySHA256'] => $keySHA256 ]; } return []; }
[ "private", "function", "buildHeaders", "(", "$", "key", ",", "$", "keySHA256", ",", "$", "useCopySourceHeaders", ")", "{", "if", "(", "$", "key", ")", "{", "$", "headerNames", "=", "$", "useCopySourceHeaders", "?", "$", "this", "->", "copySourceEncryptionHeaderNames", ":", "$", "this", "->", "encryptionHeaderNames", ";", "if", "(", "!", "$", "keySHA256", ")", "{", "$", "decodedKey", "=", "base64_decode", "(", "$", "key", ")", ";", "$", "keySHA256", "=", "base64_encode", "(", "hash", "(", "'SHA256'", ",", "$", "decodedKey", ",", "true", ")", ")", ";", "}", "return", "[", "$", "headerNames", "[", "'algorithm'", "]", "=>", "'AES256'", ",", "$", "headerNames", "[", "'key'", "]", "=>", "$", "key", ",", "$", "headerNames", "[", "'keySHA256'", "]", "=>", "$", "keySHA256", "]", ";", "}", "return", "[", "]", ";", "}" ]
Builds out customer-supplied encryption headers. @param string $key @param string $keySHA256 @param bool $useCopySourceHeaders @return array
[ "Builds", "out", "customer", "-", "supplied", "encryption", "headers", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/EncryptionTrait.php#L91-L111
train
googleapis/google-cloud-php
Storage/src/EncryptionTrait.php
EncryptionTrait.signString
protected function signString($privateKey, $data, $forceOpenssl = false) { $signature = ''; if (class_exists(RSA::class) && !$forceOpenssl) { $rsa = new RSA; $rsa->loadKey($privateKey); $rsa->setSignatureMode(RSA::SIGNATURE_PKCS1); $rsa->setHash('sha256'); $signature = $rsa->sign($data); } elseif (extension_loaded('openssl')) { openssl_sign($data, $signature, $privateKey, 'sha256WithRSAEncryption'); } else { // @codeCoverageIgnoreStart throw new \RuntimeException('OpenSSL is not installed.'); } // @codeCoverageIgnoreEnd return $signature; }
php
protected function signString($privateKey, $data, $forceOpenssl = false) { $signature = ''; if (class_exists(RSA::class) && !$forceOpenssl) { $rsa = new RSA; $rsa->loadKey($privateKey); $rsa->setSignatureMode(RSA::SIGNATURE_PKCS1); $rsa->setHash('sha256'); $signature = $rsa->sign($data); } elseif (extension_loaded('openssl')) { openssl_sign($data, $signature, $privateKey, 'sha256WithRSAEncryption'); } else { // @codeCoverageIgnoreStart throw new \RuntimeException('OpenSSL is not installed.'); } // @codeCoverageIgnoreEnd return $signature; }
[ "protected", "function", "signString", "(", "$", "privateKey", ",", "$", "data", ",", "$", "forceOpenssl", "=", "false", ")", "{", "$", "signature", "=", "''", ";", "if", "(", "class_exists", "(", "RSA", "::", "class", ")", "&&", "!", "$", "forceOpenssl", ")", "{", "$", "rsa", "=", "new", "RSA", ";", "$", "rsa", "->", "loadKey", "(", "$", "privateKey", ")", ";", "$", "rsa", "->", "setSignatureMode", "(", "RSA", "::", "SIGNATURE_PKCS1", ")", ";", "$", "rsa", "->", "setHash", "(", "'sha256'", ")", ";", "$", "signature", "=", "$", "rsa", "->", "sign", "(", "$", "data", ")", ";", "}", "elseif", "(", "extension_loaded", "(", "'openssl'", ")", ")", "{", "openssl_sign", "(", "$", "data", ",", "$", "signature", ",", "$", "privateKey", ",", "'sha256WithRSAEncryption'", ")", ";", "}", "else", "{", "// @codeCoverageIgnoreStart", "throw", "new", "\\", "RuntimeException", "(", "'OpenSSL is not installed.'", ")", ";", "}", "// @codeCoverageIgnoreEnd", "return", "$", "signature", ";", "}" ]
Sign a string using a given private key. @deprecated Please use the {@see Google\Auth\SignBlobInterface::signBlob()} and implementations for signing strings. This method will be removed in a future release. @param string $privateKey The private key to use to sign the data. @param string $data The data to sign. @param bool $forceOpenssl If true, OpenSSL will be used regardless of whether phpseclib is available. **Defaults to** `false`. @return string The signature
[ "Sign", "a", "string", "using", "a", "given", "private", "key", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/EncryptionTrait.php#L126-L146
train
googleapis/google-cloud-php
Iot/src/V1/MqttConfig.php
MqttConfig.setMqttEnabledState
public function setMqttEnabledState($var) { GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\MqttState::class); $this->mqtt_enabled_state = $var; return $this; }
php
public function setMqttEnabledState($var) { GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\MqttState::class); $this->mqtt_enabled_state = $var; return $this; }
[ "public", "function", "setMqttEnabledState", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkEnum", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Iot", "\\", "V1", "\\", "MqttState", "::", "class", ")", ";", "$", "this", "->", "mqtt_enabled_state", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
If enabled, allows connections using the MQTT protocol. Otherwise, MQTT connections to this registry will fail. Generated from protobuf field <code>.google.cloud.iot.v1.MqttState mqtt_enabled_state = 1;</code> @param int $var @return $this
[ "If", "enabled", "allows", "connections", "using", "the", "MQTT", "protocol", ".", "Otherwise", "MQTT", "connections", "to", "this", "registry", "will", "fail", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Iot/src/V1/MqttConfig.php#L62-L68
train
googleapis/google-cloud-php
ErrorReporting/src/V1beta1/ErrorEvent.php
ErrorEvent.setServiceContext
public function setServiceContext($var) { GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); $this->service_context = $var; return $this; }
php
public function setServiceContext($var) { GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); $this->service_context = $var; return $this; }
[ "public", "function", "setServiceContext", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "ErrorReporting", "\\", "V1beta1", "\\", "ServiceContext", "::", "class", ")", ";", "$", "this", "->", "service_context", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
The `ServiceContext` for which this error was reported. Generated from protobuf field <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code> @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var @return $this
[ "The", "ServiceContext", "for", "which", "this", "error", "was", "reported", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/ErrorReporting/src/V1beta1/ErrorEvent.php#L116-L122
train
googleapis/google-cloud-php
ErrorReporting/src/V1beta1/ErrorEvent.php
ErrorEvent.setContext
public function setContext($var) { GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); $this->context = $var; return $this; }
php
public function setContext($var) { GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); $this->context = $var; return $this; }
[ "public", "function", "setContext", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "ErrorReporting", "\\", "V1beta1", "\\", "ErrorContext", "::", "class", ")", ";", "$", "this", "->", "context", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Data about the context in which the error occurred. Generated from protobuf field <code>.google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5;</code> @param \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $var @return $this
[ "Data", "about", "the", "context", "in", "which", "the", "error", "occurred", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/ErrorReporting/src/V1beta1/ErrorEvent.php#L168-L174
train
googleapis/google-cloud-php
Language/src/V1/Token.php
Token.setText
public function setText($var) { GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\TextSpan::class); $this->text = $var; return $this; }
php
public function setText($var) { GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\TextSpan::class); $this->text = $var; return $this; }
[ "public", "function", "setText", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Language", "\\", "V1", "\\", "TextSpan", "::", "class", ")", ";", "$", "this", "->", "text", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
The token text. Generated from protobuf field <code>.google.cloud.language.v1.TextSpan text = 1;</code> @param \Google\Cloud\Language\V1\TextSpan $var @return $this
[ "The", "token", "text", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Language/src/V1/Token.php#L82-L88
train
googleapis/google-cloud-php
Language/src/V1/Token.php
Token.setPartOfSpeech
public function setPartOfSpeech($var) { GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\PartOfSpeech::class); $this->part_of_speech = $var; return $this; }
php
public function setPartOfSpeech($var) { GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\PartOfSpeech::class); $this->part_of_speech = $var; return $this; }
[ "public", "function", "setPartOfSpeech", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Language", "\\", "V1", "\\", "PartOfSpeech", "::", "class", ")", ";", "$", "this", "->", "part_of_speech", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Parts of speech tag for this token. Generated from protobuf field <code>.google.cloud.language.v1.PartOfSpeech part_of_speech = 2;</code> @param \Google\Cloud\Language\V1\PartOfSpeech $var @return $this
[ "Parts", "of", "speech", "tag", "for", "this", "token", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Language/src/V1/Token.php#L108-L114
train
googleapis/google-cloud-php
Language/src/V1/Token.php
Token.setDependencyEdge
public function setDependencyEdge($var) { GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\DependencyEdge::class); $this->dependency_edge = $var; return $this; }
php
public function setDependencyEdge($var) { GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\DependencyEdge::class); $this->dependency_edge = $var; return $this; }
[ "public", "function", "setDependencyEdge", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Language", "\\", "V1", "\\", "DependencyEdge", "::", "class", ")", ";", "$", "this", "->", "dependency_edge", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Dependency tree parse for this token. Generated from protobuf field <code>.google.cloud.language.v1.DependencyEdge dependency_edge = 3;</code> @param \Google\Cloud\Language\V1\DependencyEdge $var @return $this
[ "Dependency", "tree", "parse", "for", "this", "token", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Language/src/V1/Token.php#L134-L140
train
googleapis/google-cloud-php
Core/src/TimeTrait.php
TimeTrait.parseTimeString
private function parseTimeString($timestamp) { $nanoRegex = '/\d{4}-\d{1,2}-\d{1,2}T\d{1,2}\:\d{1,2}\:\d{1,2}(?:\.(\d{1,}))?/'; preg_match($nanoRegex, $timestamp, $matches); $subSeconds = isset($matches[1]) ? $matches[1] : '0'; if (strlen($subSeconds) > 6) { $timestamp = str_replace('.'. $subSeconds, '.' . substr($subSeconds, 0, 6), $timestamp); } $dt = new \DateTimeImmutable($timestamp); if (!$dt) { throw new \InvalidArgumentException(sprintf( 'Could not create a DateTime instance from given timestamp %s.', $timestamp )); } $nanos = (int) str_pad($subSeconds, 9, '0', STR_PAD_RIGHT); return [$dt, $nanos]; }
php
private function parseTimeString($timestamp) { $nanoRegex = '/\d{4}-\d{1,2}-\d{1,2}T\d{1,2}\:\d{1,2}\:\d{1,2}(?:\.(\d{1,}))?/'; preg_match($nanoRegex, $timestamp, $matches); $subSeconds = isset($matches[1]) ? $matches[1] : '0'; if (strlen($subSeconds) > 6) { $timestamp = str_replace('.'. $subSeconds, '.' . substr($subSeconds, 0, 6), $timestamp); } $dt = new \DateTimeImmutable($timestamp); if (!$dt) { throw new \InvalidArgumentException(sprintf( 'Could not create a DateTime instance from given timestamp %s.', $timestamp )); } $nanos = (int) str_pad($subSeconds, 9, '0', STR_PAD_RIGHT); return [$dt, $nanos]; }
[ "private", "function", "parseTimeString", "(", "$", "timestamp", ")", "{", "$", "nanoRegex", "=", "'/\\d{4}-\\d{1,2}-\\d{1,2}T\\d{1,2}\\:\\d{1,2}\\:\\d{1,2}(?:\\.(\\d{1,}))?/'", ";", "preg_match", "(", "$", "nanoRegex", ",", "$", "timestamp", ",", "$", "matches", ")", ";", "$", "subSeconds", "=", "isset", "(", "$", "matches", "[", "1", "]", ")", "?", "$", "matches", "[", "1", "]", ":", "'0'", ";", "if", "(", "strlen", "(", "$", "subSeconds", ")", ">", "6", ")", "{", "$", "timestamp", "=", "str_replace", "(", "'.'", ".", "$", "subSeconds", ",", "'.'", ".", "substr", "(", "$", "subSeconds", ",", "0", ",", "6", ")", ",", "$", "timestamp", ")", ";", "}", "$", "dt", "=", "new", "\\", "DateTimeImmutable", "(", "$", "timestamp", ")", ";", "if", "(", "!", "$", "dt", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "sprintf", "(", "'Could not create a DateTime instance from given timestamp %s.'", ",", "$", "timestamp", ")", ")", ";", "}", "$", "nanos", "=", "(", "int", ")", "str_pad", "(", "$", "subSeconds", ",", "9", ",", "'0'", ",", "STR_PAD_RIGHT", ")", ";", "return", "[", "$", "dt", ",", "$", "nanos", "]", ";", "}" ]
Parse a Timestamp string and return a DateTimeImmutable instance and nanoseconds as an integer. @param string $timestamp A string representation of a timestamp, encoded in RFC 3339 format (YYYY-MM-DDTHH:MM:SS.000000[000]TZ). @return array [\DateTimeImmutable, int] @throws \InvalidArgumentException If the timestamp string is in an unrecognized format.
[ "Parse", "a", "Timestamp", "string", "and", "return", "a", "DateTimeImmutable", "instance", "and", "nanoseconds", "as", "an", "integer", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/TimeTrait.php#L33-L57
train
googleapis/google-cloud-php
Core/src/TimeTrait.php
TimeTrait.formatTimeAsString
private function formatTimeAsString(\DateTimeInterface $dateTime, $ns) { $dateTime = $dateTime->setTimeZone(new \DateTimeZone('UTC')); if ($ns === null) { return $dateTime->format(Timestamp::FORMAT); } else { $ns = (string) $ns; $ns = str_pad($ns, 9, '0', STR_PAD_LEFT); if (substr($ns, 6, 3) === '000') { $ns = substr($ns, 0, 6); } return sprintf( $dateTime->format(Timestamp::FORMAT_INTERPOLATE), $ns ); } }
php
private function formatTimeAsString(\DateTimeInterface $dateTime, $ns) { $dateTime = $dateTime->setTimeZone(new \DateTimeZone('UTC')); if ($ns === null) { return $dateTime->format(Timestamp::FORMAT); } else { $ns = (string) $ns; $ns = str_pad($ns, 9, '0', STR_PAD_LEFT); if (substr($ns, 6, 3) === '000') { $ns = substr($ns, 0, 6); } return sprintf( $dateTime->format(Timestamp::FORMAT_INTERPOLATE), $ns ); } }
[ "private", "function", "formatTimeAsString", "(", "\\", "DateTimeInterface", "$", "dateTime", ",", "$", "ns", ")", "{", "$", "dateTime", "=", "$", "dateTime", "->", "setTimeZone", "(", "new", "\\", "DateTimeZone", "(", "'UTC'", ")", ")", ";", "if", "(", "$", "ns", "===", "null", ")", "{", "return", "$", "dateTime", "->", "format", "(", "Timestamp", "::", "FORMAT", ")", ";", "}", "else", "{", "$", "ns", "=", "(", "string", ")", "$", "ns", ";", "$", "ns", "=", "str_pad", "(", "$", "ns", ",", "9", ",", "'0'", ",", "STR_PAD_LEFT", ")", ";", "if", "(", "substr", "(", "$", "ns", ",", "6", ",", "3", ")", "===", "'000'", ")", "{", "$", "ns", "=", "substr", "(", "$", "ns", ",", "0", ",", "6", ")", ";", "}", "return", "sprintf", "(", "$", "dateTime", "->", "format", "(", "Timestamp", "::", "FORMAT_INTERPOLATE", ")", ",", "$", "ns", ")", ";", "}", "}" ]
Create a Timestamp string in an API-compatible format. @param \DateTimeInterface $dateTime The date time object. @param int|null $ns The number of nanoseconds. If null, subseconds from $dateTime will be used instead. @return string
[ "Create", "a", "Timestamp", "string", "in", "an", "API", "-", "compatible", "format", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/TimeTrait.php#L82-L99
train
googleapis/google-cloud-php
Talent/src/V4beta1/UpdateTenantRequest.php
UpdateTenantRequest.setTenant
public function setTenant($var) { GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\Tenant::class); $this->tenant = $var; return $this; }
php
public function setTenant($var) { GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\Tenant::class); $this->tenant = $var; return $this; }
[ "public", "function", "setTenant", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Talent", "\\", "V4beta1", "\\", "Tenant", "::", "class", ")", ";", "$", "this", "->", "tenant", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Required. The tenant resource to replace the current resource in the system. Generated from protobuf field <code>.google.cloud.talent.v4beta1.Tenant tenant = 1;</code> @param \Google\Cloud\Talent\V4beta1\Tenant $var @return $this
[ "Required", ".", "The", "tenant", "resource", "to", "replace", "the", "current", "resource", "in", "the", "system", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/UpdateTenantRequest.php#L88-L94
train
googleapis/google-cloud-php
Debugger/src/StatusMessage.php
StatusMessage.fromJson
public static function fromJson(array $data) { if (!$data) { return null; } $data += [ 'isError' => false, 'refersTo' => null, 'description' => null ]; return new static($data['isError'], $data['refersTo'], FormatMessage::fromJson($data['description'])); }
php
public static function fromJson(array $data) { if (!$data) { return null; } $data += [ 'isError' => false, 'refersTo' => null, 'description' => null ]; return new static($data['isError'], $data['refersTo'], FormatMessage::fromJson($data['description'])); }
[ "public", "static", "function", "fromJson", "(", "array", "$", "data", ")", "{", "if", "(", "!", "$", "data", ")", "{", "return", "null", ";", "}", "$", "data", "+=", "[", "'isError'", "=>", "false", ",", "'refersTo'", "=>", "null", ",", "'description'", "=>", "null", "]", ";", "return", "new", "static", "(", "$", "data", "[", "'isError'", "]", ",", "$", "data", "[", "'refersTo'", "]", ",", "FormatMessage", "::", "fromJson", "(", "$", "data", "[", "'description'", "]", ")", ")", ";", "}" ]
Load a StatusMessage from JSON form Example: ``` $message = StatusMessage::fromJson([ 'isError' => true, 'refersTo' => StatusMessage::REFERENCE_UNSPECIFIED, 'description' => [ 'format' => 'message with placeholders', 'parameters' => [] ] ]); ``` @access private @param array $data { StatusMessage data @type bool $isError Distinguishes errors from informational messages. @type Reference $refersTo Reference to which the message applies. @type FormatMessage $description Status message text. } @return StatusMessage|null
[ "Load", "a", "StatusMessage", "from", "JSON", "form" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/StatusMessage.php#L106-L118
train
googleapis/google-cloud-php
Storage/src/StorageClient.php
StorageClient.buckets
public function buckets(array $options = []) { if (!$this->projectId) { throw new GoogleException( 'No project ID was provided, ' . 'and we were unable to detect a default project ID.' ); } $resultLimit = $this->pluck('resultLimit', $options, false); $bucketUserProject = $this->pluck('bucketUserProject', $options, false); $bucketUserProject = !is_null($bucketUserProject) ? $bucketUserProject : true; $userProject = (isset($options['userProject']) && $bucketUserProject) ? $options['userProject'] : null; return new ItemIterator( new PageIterator( function (array $bucket) use ($userProject) { return new Bucket( $this->connection, $bucket['name'], $bucket + ['requesterProjectId' => $userProject] ); }, [$this->connection, 'listBuckets'], $options + ['project' => $this->projectId], ['resultLimit' => $resultLimit] ) ); }
php
public function buckets(array $options = []) { if (!$this->projectId) { throw new GoogleException( 'No project ID was provided, ' . 'and we were unable to detect a default project ID.' ); } $resultLimit = $this->pluck('resultLimit', $options, false); $bucketUserProject = $this->pluck('bucketUserProject', $options, false); $bucketUserProject = !is_null($bucketUserProject) ? $bucketUserProject : true; $userProject = (isset($options['userProject']) && $bucketUserProject) ? $options['userProject'] : null; return new ItemIterator( new PageIterator( function (array $bucket) use ($userProject) { return new Bucket( $this->connection, $bucket['name'], $bucket + ['requesterProjectId' => $userProject] ); }, [$this->connection, 'listBuckets'], $options + ['project' => $this->projectId], ['resultLimit' => $resultLimit] ) ); }
[ "public", "function", "buckets", "(", "array", "$", "options", "=", "[", "]", ")", "{", "if", "(", "!", "$", "this", "->", "projectId", ")", "{", "throw", "new", "GoogleException", "(", "'No project ID was provided, '", ".", "'and we were unable to detect a default project ID.'", ")", ";", "}", "$", "resultLimit", "=", "$", "this", "->", "pluck", "(", "'resultLimit'", ",", "$", "options", ",", "false", ")", ";", "$", "bucketUserProject", "=", "$", "this", "->", "pluck", "(", "'bucketUserProject'", ",", "$", "options", ",", "false", ")", ";", "$", "bucketUserProject", "=", "!", "is_null", "(", "$", "bucketUserProject", ")", "?", "$", "bucketUserProject", ":", "true", ";", "$", "userProject", "=", "(", "isset", "(", "$", "options", "[", "'userProject'", "]", ")", "&&", "$", "bucketUserProject", ")", "?", "$", "options", "[", "'userProject'", "]", ":", "null", ";", "return", "new", "ItemIterator", "(", "new", "PageIterator", "(", "function", "(", "array", "$", "bucket", ")", "use", "(", "$", "userProject", ")", "{", "return", "new", "Bucket", "(", "$", "this", "->", "connection", ",", "$", "bucket", "[", "'name'", "]", ",", "$", "bucket", "+", "[", "'requesterProjectId'", "=>", "$", "userProject", "]", ")", ";", "}", ",", "[", "$", "this", "->", "connection", ",", "'listBuckets'", "]", ",", "$", "options", "+", "[", "'project'", "=>", "$", "this", "->", "projectId", "]", ",", "[", "'resultLimit'", "=>", "$", "resultLimit", "]", ")", ")", ";", "}" ]
Fetches all buckets in the project. Example: ``` $buckets = $storage->buckets(); ``` ``` // Get all buckets beginning with the prefix 'album'. $buckets = $storage->buckets([ 'prefix' => 'album' ]); foreach ($buckets as $bucket) { echo $bucket->name() . PHP_EOL; } ``` @see https://cloud.google.com/storage/docs/json_api/v1/buckets/list Buckets list API documentation. @param array $options [optional] { Configuration options. @type int $maxResults Maximum number of results to return per requested page. @type int $resultLimit Limit the number of results returned in total. **Defaults to** `0` (return all results). @type string $pageToken A previously-returned page token used to resume the loading of results from a specific point. @type string $prefix Filter results with this prefix. @type string $projection Determines which properties to return. May be either 'full' or 'noAcl'. @type string $fields Selector which will cause the response to only return the specified fields. @type string $userProject If set, this is the ID of the project which will be billed for the request. @type bool $bucketUserProject If true, each returned instance will have `$userProject` set to the value of `$options.userProject`. If false, `$options.userProject` will be used ONLY for the listBuckets operation. If `$options.userProject` is not set, this option has no effect. **Defaults to** `true`. } @return ItemIterator<Bucket> @throws GoogleException When a project ID has not been detected.
[ "Fetches", "all", "buckets", "in", "the", "project", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/StorageClient.php#L184-L216
train
googleapis/google-cloud-php
Storage/src/StorageClient.php
StorageClient.signedUrlUploader
public function signedUrlUploader($uri, $data, array $options = []) { return new SignedUrlUploader($this->connection->requestWrapper(), $data, $uri, $options); }
php
public function signedUrlUploader($uri, $data, array $options = []) { return new SignedUrlUploader($this->connection->requestWrapper(), $data, $uri, $options); }
[ "public", "function", "signedUrlUploader", "(", "$", "uri", ",", "$", "data", ",", "array", "$", "options", "=", "[", "]", ")", "{", "return", "new", "SignedUrlUploader", "(", "$", "this", "->", "connection", "->", "requestWrapper", "(", ")", ",", "$", "data", ",", "$", "uri", ",", "$", "options", ")", ";", "}" ]
Create an uploader to handle a Signed URL. Example: ``` $uploader = $storage->signedUrlUploader($uri, fopen('/path/to/myfile.doc', 'r')); ``` @param string $uri The URI to accept an upload request. @param string|resource|StreamInterface $data The data to be uploaded @param array $options [optional] Configuration Options. Refer to {@see Google\Cloud\Core\Upload\AbstractUploader::__construct()}. @return SignedUrlUploader
[ "Create", "an", "uploader", "to", "handle", "a", "Signed", "URL", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/StorageClient.php#L385-L388
train
googleapis/google-cloud-php
PubSub/src/V1/ListTopicsResponse.php
ListTopicsResponse.setTopics
public function setTopics($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\PubSub\V1\Topic::class); $this->topics = $arr; return $this; }
php
public function setTopics($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\PubSub\V1\Topic::class); $this->topics = $arr; return $this; }
[ "public", "function", "setTopics", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "PubSub", "\\", "V1", "\\", "Topic", "::", "class", ")", ";", "$", "this", "->", "topics", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
The resulting topics. Generated from protobuf field <code>repeated .google.pubsub.v1.Topic topics = 1;</code> @param \Google\Cloud\PubSub\V1\Topic[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "The", "resulting", "topics", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/V1/ListTopicsResponse.php#L68-L74
train
googleapis/google-cloud-php
Dataproc/src/V1beta2/WorkflowGraph.php
WorkflowGraph.setNodes
public function setNodes($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1beta2\WorkflowNode::class); $this->nodes = $arr; return $this; }
php
public function setNodes($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1beta2\WorkflowNode::class); $this->nodes = $arr; return $this; }
[ "public", "function", "setNodes", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "Dataproc", "\\", "V1beta2", "\\", "WorkflowNode", "::", "class", ")", ";", "$", "this", "->", "nodes", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
Output only. The workflow nodes. Generated from protobuf field <code>repeated .google.cloud.dataproc.v1beta2.WorkflowNode nodes = 1;</code> @param \Google\Cloud\Dataproc\V1beta2\WorkflowNode[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Output", "only", ".", "The", "workflow", "nodes", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1beta2/WorkflowGraph.php#L58-L64
train
googleapis/google-cloud-php
Dataproc/src/V1beta2/ParameterValidation.php
ParameterValidation.setRegex
public function setRegex($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\RegexValidation::class); $this->writeOneof(1, $var); return $this; }
php
public function setRegex($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\RegexValidation::class); $this->writeOneof(1, $var); return $this; }
[ "public", "function", "setRegex", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Dataproc", "\\", "V1beta2", "\\", "RegexValidation", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "1", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
Validation based on regular expressions. Generated from protobuf field <code>.google.cloud.dataproc.v1beta2.RegexValidation regex = 1;</code> @param \Google\Cloud\Dataproc\V1beta2\RegexValidation $var @return $this
[ "Validation", "based", "on", "regular", "expressions", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1beta2/ParameterValidation.php#L55-L61
train
googleapis/google-cloud-php
Dataproc/src/V1beta2/ParameterValidation.php
ParameterValidation.setValues
public function setValues($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\ValueValidation::class); $this->writeOneof(2, $var); return $this; }
php
public function setValues($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\ValueValidation::class); $this->writeOneof(2, $var); return $this; }
[ "public", "function", "setValues", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Dataproc", "\\", "V1beta2", "\\", "ValueValidation", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "2", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
Validation based on a list of allowed values. Generated from protobuf field <code>.google.cloud.dataproc.v1beta2.ValueValidation values = 2;</code> @param \Google\Cloud\Dataproc\V1beta2\ValueValidation $var @return $this
[ "Validation", "based", "on", "a", "list", "of", "allowed", "values", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1beta2/ParameterValidation.php#L81-L87
train
googleapis/google-cloud-php
Core/src/LongRunning/LROTrait.php
LROTrait.setLroProperties
private function setLroProperties( LongRunningConnectionInterface $lroConnection, array $lroCallables, $resource = null ) { $this->lroConnection = $lroConnection; $this->lroCallables = $lroCallables; $this->lroResource = $resource; }
php
private function setLroProperties( LongRunningConnectionInterface $lroConnection, array $lroCallables, $resource = null ) { $this->lroConnection = $lroConnection; $this->lroCallables = $lroCallables; $this->lroResource = $resource; }
[ "private", "function", "setLroProperties", "(", "LongRunningConnectionInterface", "$", "lroConnection", ",", "array", "$", "lroCallables", ",", "$", "resource", "=", "null", ")", "{", "$", "this", "->", "lroConnection", "=", "$", "lroConnection", ";", "$", "this", "->", "lroCallables", "=", "$", "lroCallables", ";", "$", "this", "->", "lroResource", "=", "$", "resource", ";", "}" ]
Populate required LRO properties. @param LongRunningConnectionInterface $lroConnection The LRO Connection. @param array $callablesMap An collection of form [(string) typeUrl, (callable) callable] providing a function to invoke when an operation completes. The callable Type should correspond to an expected value of operation.metadata.typeUrl. @param string $lroResource [optional] The resource for which operations may be listed.
[ "Populate", "required", "LRO", "properties", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/LongRunning/LROTrait.php#L57-L65
train
googleapis/google-cloud-php
Core/src/LongRunning/LROTrait.php
LROTrait.resumeOperation
public function resumeOperation($operationName, array $info = []) { return new LongRunningOperation( $this->lroConnection, $operationName, $this->lroCallables, $info ); }
php
public function resumeOperation($operationName, array $info = []) { return new LongRunningOperation( $this->lroConnection, $operationName, $this->lroCallables, $info ); }
[ "public", "function", "resumeOperation", "(", "$", "operationName", ",", "array", "$", "info", "=", "[", "]", ")", "{", "return", "new", "LongRunningOperation", "(", "$", "this", "->", "lroConnection", ",", "$", "operationName", ",", "$", "this", "->", "lroCallables", ",", "$", "info", ")", ";", "}" ]
Resume a Long Running Operation @param string $operationName The Long Running Operation name. @param array $info [optional] The operation data. @return LongRunningOperation
[ "Resume", "a", "Long", "Running", "Operation" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/LongRunning/LROTrait.php#L74-L82
train
googleapis/google-cloud-php
Core/src/LongRunning/LROTrait.php
LROTrait.longRunningOperations
public function longRunningOperations(array $options = []) { if (is_null($this->lroResource)) { throw new \BadMethodCallException('This service does list support listing operations.'); } $resultLimit = $this->pluck('resultLimit', $options, false) ?: 0; $options['name'] = $this->lroResource .'/operations'; return new ItemIterator( new PageIterator( function (array $operation) { return $this->resumeOperation($operation['name'], $operation); }, [$this->lroConnection, 'operations'], $options, [ 'itemsKey' => 'operations', 'resultLimit' => $resultLimit ] ) ); }
php
public function longRunningOperations(array $options = []) { if (is_null($this->lroResource)) { throw new \BadMethodCallException('This service does list support listing operations.'); } $resultLimit = $this->pluck('resultLimit', $options, false) ?: 0; $options['name'] = $this->lroResource .'/operations'; return new ItemIterator( new PageIterator( function (array $operation) { return $this->resumeOperation($operation['name'], $operation); }, [$this->lroConnection, 'operations'], $options, [ 'itemsKey' => 'operations', 'resultLimit' => $resultLimit ] ) ); }
[ "public", "function", "longRunningOperations", "(", "array", "$", "options", "=", "[", "]", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "lroResource", ")", ")", "{", "throw", "new", "\\", "BadMethodCallException", "(", "'This service does list support listing operations.'", ")", ";", "}", "$", "resultLimit", "=", "$", "this", "->", "pluck", "(", "'resultLimit'", ",", "$", "options", ",", "false", ")", "?", ":", "0", ";", "$", "options", "[", "'name'", "]", "=", "$", "this", "->", "lroResource", ".", "'/operations'", ";", "return", "new", "ItemIterator", "(", "new", "PageIterator", "(", "function", "(", "array", "$", "operation", ")", "{", "return", "$", "this", "->", "resumeOperation", "(", "$", "operation", "[", "'name'", "]", ",", "$", "operation", ")", ";", "}", ",", "[", "$", "this", "->", "lroConnection", ",", "'operations'", "]", ",", "$", "options", ",", "[", "'itemsKey'", "=>", "'operations'", ",", "'resultLimit'", "=>", "$", "resultLimit", "]", ")", ")", ";", "}" ]
List long running operations. @param array $options [optional] { Configuration Options. @type string $name The name of the operation collection. @type string $filter The standard list filter. @type int $pageSize Maximum number of results to return per request. @type int $resultLimit Limit the number of results returned in total. **Defaults to** `0` (return all results). @type string $pageToken A previously-returned page token used to resume the loading of results from a specific point. } @return ItemIterator<InstanceConfiguration>
[ "List", "long", "running", "operations", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/LongRunning/LROTrait.php#L101-L124
train
googleapis/google-cloud-php
Iot/src/V1/ListDevicesResponse.php
ListDevicesResponse.setDevices
public function setDevices($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\Device::class); $this->devices = $arr; return $this; }
php
public function setDevices($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\Device::class); $this->devices = $arr; return $this; }
[ "public", "function", "setDevices", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "Iot", "\\", "V1", "\\", "Device", "::", "class", ")", ";", "$", "this", "->", "devices", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
The devices that match the request. Generated from protobuf field <code>repeated .google.cloud.iot.v1.Device devices = 1;</code> @param \Google\Cloud\Iot\V1\Device[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "The", "devices", "that", "match", "the", "request", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Iot/src/V1/ListDevicesResponse.php#L68-L74
train
googleapis/google-cloud-php
ErrorReporting/src/V1beta1/ErrorGroup.php
ErrorGroup.setTrackingIssues
public function setTrackingIssues($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue::class); $this->tracking_issues = $arr; return $this; }
php
public function setTrackingIssues($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue::class); $this->tracking_issues = $arr; return $this; }
[ "public", "function", "setTrackingIssues", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "ErrorReporting", "\\", "V1beta1", "\\", "TrackingIssue", "::", "class", ")", ";", "$", "this", "->", "tracking_issues", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
Associated tracking issues. Generated from protobuf field <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code> @param \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Associated", "tracking", "issues", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/ErrorReporting/src/V1beta1/ErrorGroup.php#L134-L140
train
googleapis/google-cloud-php
Language/src/Annotation.php
Annotation.filter
private function filter($items, $path, $type) { if (!$items) { return null; } return array_filter($items, function ($item) use ($path, $type) { $itemCopy = $item; // key into the value with the given path foreach ($path as $key) { $itemCopy = $itemCopy[$key]; } if (strtolower($itemCopy) === strtolower($type)) { return $item; } }); }
php
private function filter($items, $path, $type) { if (!$items) { return null; } return array_filter($items, function ($item) use ($path, $type) { $itemCopy = $item; // key into the value with the given path foreach ($path as $key) { $itemCopy = $itemCopy[$key]; } if (strtolower($itemCopy) === strtolower($type)) { return $item; } }); }
[ "private", "function", "filter", "(", "$", "items", ",", "$", "path", ",", "$", "type", ")", "{", "if", "(", "!", "$", "items", ")", "{", "return", "null", ";", "}", "return", "array_filter", "(", "$", "items", ",", "function", "(", "$", "item", ")", "use", "(", "$", "path", ",", "$", "type", ")", "{", "$", "itemCopy", "=", "$", "item", ";", "// key into the value with the given path", "foreach", "(", "$", "path", "as", "$", "key", ")", "{", "$", "itemCopy", "=", "$", "itemCopy", "[", "$", "key", "]", ";", "}", "if", "(", "strtolower", "(", "$", "itemCopy", ")", "===", "strtolower", "(", "$", "type", ")", ")", "{", "return", "$", "item", ";", "}", "}", ")", ";", "}" ]
Filters an array of items based on the provided type. @param array $items The items to iterate. @param array $path The path to the value to compare against the provided type. @param string $type The type to filter on. @return array|null
[ "Filters", "an", "array", "of", "items", "based", "on", "the", "provided", "type", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Language/src/Annotation.php#L265-L283
train
googleapis/google-cloud-php
BigQueryDataTransfer/src/V1/ListTransferRunsResponse.php
ListTransferRunsResponse.setTransferRuns
public function setTransferRuns($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\TransferRun::class); $this->transfer_runs = $arr; return $this; }
php
public function setTransferRuns($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\TransferRun::class); $this->transfer_runs = $arr; return $this; }
[ "public", "function", "setTransferRuns", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "BigQuery", "\\", "DataTransfer", "\\", "V1", "\\", "TransferRun", "::", "class", ")", ";", "$", "this", "->", "transfer_runs", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
Output only. The stored pipeline transfer runs. Generated from protobuf field <code>repeated .google.cloud.bigquery.datatransfer.v1.TransferRun transfer_runs = 1;</code> @param \Google\Cloud\BigQuery\DataTransfer\V1\TransferRun[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Output", "only", ".", "The", "stored", "pipeline", "transfer", "runs", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/BigQueryDataTransfer/src/V1/ListTransferRunsResponse.php#L72-L78
train
googleapis/google-cloud-php
CommonProtos/src/DevTools/Source/V1/SourceContext.php
SourceContext.setCloudRepo
public function setCloudRepo($var) { GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\CloudRepoSourceContext::class); $this->writeOneof(1, $var); return $this; }
php
public function setCloudRepo($var) { GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\CloudRepoSourceContext::class); $this->writeOneof(1, $var); return $this; }
[ "public", "function", "setCloudRepo", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "DevTools", "\\", "Source", "\\", "V1", "\\", "CloudRepoSourceContext", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "1", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
A SourceContext referring to a revision in a cloud repo. Generated from protobuf field <code>.google.devtools.source.v1.CloudRepoSourceContext cloud_repo = 1;</code> @param \Google\Cloud\DevTools\Source\V1\CloudRepoSourceContext $var @return $this
[ "A", "SourceContext", "referring", "to", "a", "revision", "in", "a", "cloud", "repo", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/CommonProtos/src/DevTools/Source/V1/SourceContext.php#L60-L66
train
googleapis/google-cloud-php
CommonProtos/src/DevTools/Source/V1/SourceContext.php
SourceContext.setCloudWorkspace
public function setCloudWorkspace($var) { GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\CloudWorkspaceSourceContext::class); $this->writeOneof(2, $var); return $this; }
php
public function setCloudWorkspace($var) { GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\CloudWorkspaceSourceContext::class); $this->writeOneof(2, $var); return $this; }
[ "public", "function", "setCloudWorkspace", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "DevTools", "\\", "Source", "\\", "V1", "\\", "CloudWorkspaceSourceContext", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "2", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
A SourceContext referring to a snapshot in a cloud workspace. Generated from protobuf field <code>.google.devtools.source.v1.CloudWorkspaceSourceContext cloud_workspace = 2;</code> @param \Google\Cloud\DevTools\Source\V1\CloudWorkspaceSourceContext $var @return $this
[ "A", "SourceContext", "referring", "to", "a", "snapshot", "in", "a", "cloud", "workspace", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/CommonProtos/src/DevTools/Source/V1/SourceContext.php#L86-L92
train
googleapis/google-cloud-php
CommonProtos/src/DevTools/Source/V1/SourceContext.php
SourceContext.setGerrit
public function setGerrit($var) { GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\GerritSourceContext::class); $this->writeOneof(3, $var); return $this; }
php
public function setGerrit($var) { GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\GerritSourceContext::class); $this->writeOneof(3, $var); return $this; }
[ "public", "function", "setGerrit", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "DevTools", "\\", "Source", "\\", "V1", "\\", "GerritSourceContext", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "3", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
A SourceContext referring to a Gerrit project. Generated from protobuf field <code>.google.devtools.source.v1.GerritSourceContext gerrit = 3;</code> @param \Google\Cloud\DevTools\Source\V1\GerritSourceContext $var @return $this
[ "A", "SourceContext", "referring", "to", "a", "Gerrit", "project", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/CommonProtos/src/DevTools/Source/V1/SourceContext.php#L112-L118
train
googleapis/google-cloud-php
OsLogin/src/V1beta/UpdateSshPublicKeyRequest.php
UpdateSshPublicKeyRequest.setSshPublicKey
public function setSshPublicKey($var) { GPBUtil::checkMessage($var, \Google\Cloud\OsLogin\Common\SshPublicKey::class); $this->ssh_public_key = $var; return $this; }
php
public function setSshPublicKey($var) { GPBUtil::checkMessage($var, \Google\Cloud\OsLogin\Common\SshPublicKey::class); $this->ssh_public_key = $var; return $this; }
[ "public", "function", "setSshPublicKey", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "OsLogin", "\\", "Common", "\\", "SshPublicKey", "::", "class", ")", ";", "$", "this", "->", "ssh_public_key", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
The SSH public key and expiration time. Generated from protobuf field <code>.google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2;</code> @param \Google\Cloud\OsLogin\Common\SshPublicKey $var @return $this
[ "The", "SSH", "public", "key", "and", "expiration", "time", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/OsLogin/src/V1beta/UpdateSshPublicKeyRequest.php#L108-L114
train
googleapis/google-cloud-php
Firestore/src/V1beta1/Value.php
Value.setMapValue
public function setMapValue($var) { GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\MapValue::class); $this->writeOneof(6, $var); return $this; }
php
public function setMapValue($var) { GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\MapValue::class); $this->writeOneof(6, $var); return $this; }
[ "public", "function", "setMapValue", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Firestore", "\\", "V1beta1", "\\", "MapValue", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "6", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
A map value. Generated from protobuf field <code>.google.firestore.v1beta1.MapValue map_value = 6;</code> @param \Google\Cloud\Firestore\V1beta1\MapValue $var @return $this
[ "A", "map", "value", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1beta1/Value.php#L363-L369
train
googleapis/google-cloud-php
Dataproc/src/V1beta2/Gapic/JobControllerGapicClient.php
JobControllerGapicClient.getJob
public function getJob($projectId, $region, $jobId, array $optionalArgs = []) { $request = new GetJobRequest(); $request->setProjectId($projectId); $request->setRegion($region); $request->setJobId($jobId); return $this->startCall( 'GetJob', Job::class, $optionalArgs, $request )->wait(); }
php
public function getJob($projectId, $region, $jobId, array $optionalArgs = []) { $request = new GetJobRequest(); $request->setProjectId($projectId); $request->setRegion($region); $request->setJobId($jobId); return $this->startCall( 'GetJob', Job::class, $optionalArgs, $request )->wait(); }
[ "public", "function", "getJob", "(", "$", "projectId", ",", "$", "region", ",", "$", "jobId", ",", "array", "$", "optionalArgs", "=", "[", "]", ")", "{", "$", "request", "=", "new", "GetJobRequest", "(", ")", ";", "$", "request", "->", "setProjectId", "(", "$", "projectId", ")", ";", "$", "request", "->", "setRegion", "(", "$", "region", ")", ";", "$", "request", "->", "setJobId", "(", "$", "jobId", ")", ";", "return", "$", "this", "->", "startCall", "(", "'GetJob'", ",", "Job", "::", "class", ",", "$", "optionalArgs", ",", "$", "request", ")", "->", "wait", "(", ")", ";", "}" ]
Gets the resource representation for a job in a project. Sample code: ``` $jobControllerClient = new JobControllerClient(); try { $projectId = ''; $region = ''; $jobId = ''; $response = $jobControllerClient->getJob($projectId, $region, $jobId); } finally { $jobControllerClient->close(); } ``` @param string $projectId Required. The ID of the Google Cloud Platform project that the job belongs to. @param string $region Required. The Cloud Dataproc region in which to handle the request. @param string $jobId Required. The job ID. @param array $optionalArgs { Optional. @type RetrySettings|array $retrySettings Retry settings to use for this call. Can be a {@see Google\ApiCore\RetrySettings} object, or an associative array of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} for example usage. } @return \Google\Cloud\Dataproc\V1beta2\Job @throws ApiException if the remote call fails @experimental
[ "Gets", "the", "resource", "representation", "for", "a", "job", "in", "a", "project", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1beta2/Gapic/JobControllerGapicClient.php#L276-L289
train
googleapis/google-cloud-php
Dataproc/src/V1beta2/Gapic/JobControllerGapicClient.php
JobControllerGapicClient.updateJob
public function updateJob($projectId, $region, $jobId, $job, $updateMask, array $optionalArgs = []) { $request = new UpdateJobRequest(); $request->setProjectId($projectId); $request->setRegion($region); $request->setJobId($jobId); $request->setJob($job); $request->setUpdateMask($updateMask); return $this->startCall( 'UpdateJob', Job::class, $optionalArgs, $request )->wait(); }
php
public function updateJob($projectId, $region, $jobId, $job, $updateMask, array $optionalArgs = []) { $request = new UpdateJobRequest(); $request->setProjectId($projectId); $request->setRegion($region); $request->setJobId($jobId); $request->setJob($job); $request->setUpdateMask($updateMask); return $this->startCall( 'UpdateJob', Job::class, $optionalArgs, $request )->wait(); }
[ "public", "function", "updateJob", "(", "$", "projectId", ",", "$", "region", ",", "$", "jobId", ",", "$", "job", ",", "$", "updateMask", ",", "array", "$", "optionalArgs", "=", "[", "]", ")", "{", "$", "request", "=", "new", "UpdateJobRequest", "(", ")", ";", "$", "request", "->", "setProjectId", "(", "$", "projectId", ")", ";", "$", "request", "->", "setRegion", "(", "$", "region", ")", ";", "$", "request", "->", "setJobId", "(", "$", "jobId", ")", ";", "$", "request", "->", "setJob", "(", "$", "job", ")", ";", "$", "request", "->", "setUpdateMask", "(", "$", "updateMask", ")", ";", "return", "$", "this", "->", "startCall", "(", "'UpdateJob'", ",", "Job", "::", "class", ",", "$", "optionalArgs", ",", "$", "request", ")", "->", "wait", "(", ")", ";", "}" ]
Updates a job in a project. Sample code: ``` $jobControllerClient = new JobControllerClient(); try { $projectId = ''; $region = ''; $jobId = ''; $job = new Job(); $updateMask = new FieldMask(); $response = $jobControllerClient->updateJob($projectId, $region, $jobId, $job, $updateMask); } finally { $jobControllerClient->close(); } ``` @param string $projectId Required. The ID of the Google Cloud Platform project that the job belongs to. @param string $region Required. The Cloud Dataproc region in which to handle the request. @param string $jobId Required. The job ID. @param Job $job Required. The changes to the job. @param FieldMask $updateMask Required. Specifies the path, relative to <code>Job</code>, of the field to update. For example, to update the labels of a Job the <code>update_mask</code> parameter would be specified as <code>labels</code>, and the `PATCH` request body would specify the new value. <strong>Note:</strong> Currently, <code>labels</code> is the only field that can be updated. @param array $optionalArgs { Optional. @type RetrySettings|array $retrySettings Retry settings to use for this call. Can be a {@see Google\ApiCore\RetrySettings} object, or an associative array of retry settings parameters. See the documentation on {@see Google\ApiCore\RetrySettings} for example usage. } @return \Google\Cloud\Dataproc\V1beta2\Job @throws ApiException if the remote call fails @experimental
[ "Updates", "a", "job", "in", "a", "project", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1beta2/Gapic/JobControllerGapicClient.php#L445-L460
train
googleapis/google-cloud-php
Dlp/src/V2/DlpServiceGrpcClient.php
DlpServiceGrpcClient.ActivateJobTrigger
public function ActivateJobTrigger(\Google\Cloud\Dlp\V2\ActivateJobTriggerRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.privacy.dlp.v2.DlpService/ActivateJobTrigger', $argument, ['\Google\Cloud\Dlp\V2\DlpJob', 'decode'], $metadata, $options); }
php
public function ActivateJobTrigger(\Google\Cloud\Dlp\V2\ActivateJobTriggerRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.privacy.dlp.v2.DlpService/ActivateJobTrigger', $argument, ['\Google\Cloud\Dlp\V2\DlpJob', 'decode'], $metadata, $options); }
[ "public", "function", "ActivateJobTrigger", "(", "\\", "Google", "\\", "Cloud", "\\", "Dlp", "\\", "V2", "\\", "ActivateJobTriggerRequest", "$", "argument", ",", "$", "metadata", "=", "[", "]", ",", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->", "_simpleRequest", "(", "'/google.privacy.dlp.v2.DlpService/ActivateJobTrigger'", ",", "$", "argument", ",", "[", "'\\Google\\Cloud\\Dlp\\V2\\DlpJob'", ",", "'decode'", "]", ",", "$", "metadata", ",", "$", "options", ")", ";", "}" ]
Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur. @param \Google\Cloud\Dlp\V2\ActivateJobTriggerRequest $argument input argument @param array $metadata metadata @param array $options call options
[ "Activate", "a", "job", "trigger", ".", "Causes", "the", "immediate", "execute", "of", "a", "trigger", "instead", "of", "waiting", "on", "the", "trigger", "event", "to", "occur", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/DlpServiceGrpcClient.php#L381-L387
train
googleapis/google-cloud-php
VideoIntelligence/src/V1/LabelAnnotation.php
LabelAnnotation.setEntity
public function setEntity($var) { GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\Entity::class); $this->entity = $var; return $this; }
php
public function setEntity($var) { GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\Entity::class); $this->entity = $var; return $this; }
[ "public", "function", "setEntity", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "VideoIntelligence", "\\", "V1", "\\", "Entity", "::", "class", ")", ";", "$", "this", "->", "entity", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Detected entity. Generated from protobuf field <code>.google.cloud.videointelligence.v1.Entity entity = 1;</code> @param \Google\Cloud\VideoIntelligence\V1\Entity $var @return $this
[ "Detected", "entity", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/VideoIntelligence/src/V1/LabelAnnotation.php#L88-L94
train
googleapis/google-cloud-php
VideoIntelligence/src/V1/LabelAnnotation.php
LabelAnnotation.setFrames
public function setFrames($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelFrame::class); $this->frames = $arr; return $this; }
php
public function setFrames($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelFrame::class); $this->frames = $arr; return $this; }
[ "public", "function", "setFrames", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "VideoIntelligence", "\\", "V1", "\\", "LabelFrame", "::", "class", ")", ";", "$", "this", "->", "frames", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
All video frames where a label was detected. Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1.LabelFrame frames = 4;</code> @param \Google\Cloud\VideoIntelligence\V1\LabelFrame[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "All", "video", "frames", "where", "a", "label", "was", "detected", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/VideoIntelligence/src/V1/LabelAnnotation.php#L172-L178
train
googleapis/google-cloud-php
Asset/src/V1beta1/Asset.php
Asset.setResource
public function setResource($var) { GPBUtil::checkMessage($var, \Google\Cloud\Asset\V1beta1\Resource::class); $this->resource = $var; return $this; }
php
public function setResource($var) { GPBUtil::checkMessage($var, \Google\Cloud\Asset\V1beta1\Resource::class); $this->resource = $var; return $this; }
[ "public", "function", "setResource", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Asset", "\\", "V1beta1", "\\", "Resource", "::", "class", ")", ";", "$", "this", "->", "resource", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Representation of the resource. Generated from protobuf field <code>.google.cloud.asset.v1beta1.Resource resource = 3;</code> @param \Google\Cloud\Asset\V1beta1\Resource $var @return $this
[ "Representation", "of", "the", "resource", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Asset/src/V1beta1/Asset.php#L153-L159
train
googleapis/google-cloud-php
Asset/src/V1beta1/Asset.php
Asset.setIamPolicy
public function setIamPolicy($var) { GPBUtil::checkMessage($var, \Google\Cloud\Iam\V1\Policy::class); $this->iam_policy = $var; return $this; }
php
public function setIamPolicy($var) { GPBUtil::checkMessage($var, \Google\Cloud\Iam\V1\Policy::class); $this->iam_policy = $var; return $this; }
[ "public", "function", "setIamPolicy", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Iam", "\\", "V1", "\\", "Policy", "::", "class", ")", ";", "$", "this", "->", "iam_policy", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Representation of the actual Cloud IAM policy set on a cloud resource. For each resource, there must be at most one Cloud IAM policy set on it. Generated from protobuf field <code>.google.iam.v1.Policy iam_policy = 4;</code> @param \Google\Cloud\Iam\V1\Policy $var @return $this
[ "Representation", "of", "the", "actual", "Cloud", "IAM", "policy", "set", "on", "a", "cloud", "resource", ".", "For", "each", "resource", "there", "must", "be", "at", "most", "one", "Cloud", "IAM", "policy", "set", "on", "it", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Asset/src/V1beta1/Asset.php#L181-L187
train
googleapis/google-cloud-php
Debugger/src/SourceLocationResolver.php
SourceLocationResolver.resolve
public function resolve(SourceLocation $location) { $origPath = str_replace('/', DIRECTORY_SEPARATOR, $location->path()); $basename = basename($origPath); $prefixes = $this->searchPrefixes($origPath); $includePaths = array_filter($this->includePaths, function ($path) { return file_exists($path); }); // Phase 1: search for an exact file match and try stripping off extra // folders foreach ($prefixes as $prefix) { foreach ($includePaths as $path) { $file = implode(DIRECTORY_SEPARATOR, [$path, $prefix, $basename]); if (file_exists($file)) { return new SourceLocation($this->realRelativePath($file, $path), $location->line()); } } } // Phase 2: recursively search folders for a matching file foreach ($includePaths as $includePath) { $iterator = new MatchingFileIterator( $includePath, $origPath ); foreach ($iterator as $file => $info) { return new SourceLocation($this->realRelativePath($file, $includePath), $location->line()); } } return null; }
php
public function resolve(SourceLocation $location) { $origPath = str_replace('/', DIRECTORY_SEPARATOR, $location->path()); $basename = basename($origPath); $prefixes = $this->searchPrefixes($origPath); $includePaths = array_filter($this->includePaths, function ($path) { return file_exists($path); }); // Phase 1: search for an exact file match and try stripping off extra // folders foreach ($prefixes as $prefix) { foreach ($includePaths as $path) { $file = implode(DIRECTORY_SEPARATOR, [$path, $prefix, $basename]); if (file_exists($file)) { return new SourceLocation($this->realRelativePath($file, $path), $location->line()); } } } // Phase 2: recursively search folders for a matching file foreach ($includePaths as $includePath) { $iterator = new MatchingFileIterator( $includePath, $origPath ); foreach ($iterator as $file => $info) { return new SourceLocation($this->realRelativePath($file, $includePath), $location->line()); } } return null; }
[ "public", "function", "resolve", "(", "SourceLocation", "$", "location", ")", "{", "$", "origPath", "=", "str_replace", "(", "'/'", ",", "DIRECTORY_SEPARATOR", ",", "$", "location", "->", "path", "(", ")", ")", ";", "$", "basename", "=", "basename", "(", "$", "origPath", ")", ";", "$", "prefixes", "=", "$", "this", "->", "searchPrefixes", "(", "$", "origPath", ")", ";", "$", "includePaths", "=", "array_filter", "(", "$", "this", "->", "includePaths", ",", "function", "(", "$", "path", ")", "{", "return", "file_exists", "(", "$", "path", ")", ";", "}", ")", ";", "// Phase 1: search for an exact file match and try stripping off extra", "// folders", "foreach", "(", "$", "prefixes", "as", "$", "prefix", ")", "{", "foreach", "(", "$", "includePaths", "as", "$", "path", ")", "{", "$", "file", "=", "implode", "(", "DIRECTORY_SEPARATOR", ",", "[", "$", "path", ",", "$", "prefix", ",", "$", "basename", "]", ")", ";", "if", "(", "file_exists", "(", "$", "file", ")", ")", "{", "return", "new", "SourceLocation", "(", "$", "this", "->", "realRelativePath", "(", "$", "file", ",", "$", "path", ")", ",", "$", "location", "->", "line", "(", ")", ")", ";", "}", "}", "}", "// Phase 2: recursively search folders for a matching file", "foreach", "(", "$", "includePaths", "as", "$", "includePath", ")", "{", "$", "iterator", "=", "new", "MatchingFileIterator", "(", "$", "includePath", ",", "$", "origPath", ")", ";", "foreach", "(", "$", "iterator", "as", "$", "file", "=>", "$", "info", ")", "{", "return", "new", "SourceLocation", "(", "$", "this", "->", "realRelativePath", "(", "$", "file", ",", "$", "includePath", ")", ",", "$", "location", "->", "line", "(", ")", ")", ";", "}", "}", "return", "null", ";", "}" ]
Resolve the full path of an existing file in the application's source. If no matching source file is found, then return null. If found, the resolved location will include the full, absolute path to the source file. There are 3 cases for resolving a SourceLocation: Case 1: The exact path is found Example: ``` $location = new SourceLocation('Debugger/src/DebuggerClient.php', 1); $resolver = new SourceLocationResolver(); $resolvedLocation = $resolver->resolve($location); ``` Case 2: There are extra folder(s) in the requested breakpoint path Example: ``` $location = new SourceLocation('extra/folder/Debugger/src/DebuggerClient.php', 1); $resolver = new SourceLocationResolver(); $resolvedLocation = $resolver->resolve($location); ``` Case 3: There are fewer folders in the requested breakpoint path Example: ``` $location = new SourceLocation('src/DebuggerClient.php', 1); $resolver = new SourceLocationResolver(); $resolvedLocation = $resolver->resolve($location); @param SourceLocation $location The location to resolve. @return SourceLocation|null
[ "Resolve", "the", "full", "path", "of", "an", "existing", "file", "in", "the", "application", "s", "source", ".", "If", "no", "matching", "source", "file", "is", "found", "then", "return", "null", ".", "If", "found", "the", "resolved", "location", "will", "include", "the", "full", "absolute", "path", "to", "the", "source", "file", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/SourceLocationResolver.php#L87-L120
train
googleapis/google-cloud-php
Debugger/src/SourceLocationResolver.php
SourceLocationResolver.searchPrefixes
private function searchPrefixes($path) { $dirname = dirname($path); $directoryParts = explode(DIRECTORY_SEPARATOR, $dirname); $directories = []; while ($directoryParts) { $directories[] = implode(DIRECTORY_SEPARATOR, $directoryParts); array_shift($directoryParts); } return $directories; }
php
private function searchPrefixes($path) { $dirname = dirname($path); $directoryParts = explode(DIRECTORY_SEPARATOR, $dirname); $directories = []; while ($directoryParts) { $directories[] = implode(DIRECTORY_SEPARATOR, $directoryParts); array_shift($directoryParts); } return $directories; }
[ "private", "function", "searchPrefixes", "(", "$", "path", ")", "{", "$", "dirname", "=", "dirname", "(", "$", "path", ")", ";", "$", "directoryParts", "=", "explode", "(", "DIRECTORY_SEPARATOR", ",", "$", "dirname", ")", ";", "$", "directories", "=", "[", "]", ";", "while", "(", "$", "directoryParts", ")", "{", "$", "directories", "[", "]", "=", "implode", "(", "DIRECTORY_SEPARATOR", ",", "$", "directoryParts", ")", ";", "array_shift", "(", "$", "directoryParts", ")", ";", "}", "return", "$", "directories", ";", "}" ]
Returns an array of relative paths for this file by recursively removing each leading directory. @param string $path The source path @return string[]
[ "Returns", "an", "array", "of", "relative", "paths", "for", "this", "file", "by", "recursively", "removing", "each", "leading", "directory", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/SourceLocationResolver.php#L129-L139
train
googleapis/google-cloud-php
AutoMl/src/V1beta1/ListDatasetsResponse.php
ListDatasetsResponse.setDatasets
public function setDatasets($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AutoMl\V1beta1\Dataset::class); $this->datasets = $arr; return $this; }
php
public function setDatasets($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AutoMl\V1beta1\Dataset::class); $this->datasets = $arr; return $this; }
[ "public", "function", "setDatasets", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "AutoMl", "\\", "V1beta1", "\\", "Dataset", "::", "class", ")", ";", "$", "this", "->", "datasets", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
The datasets read. Generated from protobuf field <code>repeated .google.cloud.automl.v1beta1.Dataset datasets = 1;</code> @param \Google\Cloud\AutoMl\V1beta1\Dataset[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "The", "datasets", "read", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/AutoMl/src/V1beta1/ListDatasetsResponse.php#L68-L74
train
googleapis/google-cloud-php
Monitoring/src/V3/Point.php
Point.setValue
public function setValue($var) { GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TypedValue::class); $this->value = $var; return $this; }
php
public function setValue($var) { GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TypedValue::class); $this->value = $var; return $this; }
[ "public", "function", "setValue", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Monitoring", "\\", "V3", "\\", "TypedValue", "::", "class", ")", ";", "$", "this", "->", "value", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
The value of the data point. Generated from protobuf field <code>.google.monitoring.v3.TypedValue value = 2;</code> @param \Google\Cloud\Monitoring\V3\TypedValue $var @return $this
[ "The", "value", "of", "the", "data", "point", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Monitoring/src/V3/Point.php#L120-L126
train
googleapis/google-cloud-php
Firestore/src/FieldPath.php
FieldPath.fromString
public static function fromString($path, $splitPath = true) { self::validateString($path); $parts = $splitPath ? explode('.', $path) : [$path]; return new self($parts); }
php
public static function fromString($path, $splitPath = true) { self::validateString($path); $parts = $splitPath ? explode('.', $path) : [$path]; return new self($parts); }
[ "public", "static", "function", "fromString", "(", "$", "path", ",", "$", "splitPath", "=", "true", ")", "{", "self", "::", "validateString", "(", "$", "path", ")", ";", "$", "parts", "=", "$", "splitPath", "?", "explode", "(", "'.'", ",", "$", "path", ")", ":", "[", "$", "path", "]", ";", "return", "new", "self", "(", "$", "parts", ")", ";", "}" ]
Create a FieldPath from a string path. Example: ``` use Google\Cloud\Firestore\FieldPath; $path = FieldPath::fromString('path.to.field'); ``` @param string $path The field path string. @param bool $splitPath If false, the input path will not be split on `.`. **Defaults to** `true`. @return FieldPath @throws \InvalidArgumentException If an invalid path is provided.
[ "Create", "a", "FieldPath", "from", "a", "string", "path", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/FieldPath.php#L76-L85
train
googleapis/google-cloud-php
Firestore/src/FieldPath.php
FieldPath.pathString
public function pathString() { $out = []; foreach ($this->fieldNames as $part) { $out[] = $this->escapePathPart($part); } $fieldPath = implode('.', $out); return $fieldPath; }
php
public function pathString() { $out = []; foreach ($this->fieldNames as $part) { $out[] = $this->escapePathPart($part); } $fieldPath = implode('.', $out); return $fieldPath; }
[ "public", "function", "pathString", "(", ")", "{", "$", "out", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "fieldNames", "as", "$", "part", ")", "{", "$", "out", "[", "]", "=", "$", "this", "->", "escapePathPart", "(", "$", "part", ")", ";", "}", "$", "fieldPath", "=", "implode", "(", "'.'", ",", "$", "out", ")", ";", "return", "$", "fieldPath", ";", "}" ]
Get the current path as a string, with special characters escaped. Example: ``` $string = $path->pathString(); ``` @return string
[ "Get", "the", "current", "path", "as", "a", "string", "with", "special", "characters", "escaped", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/FieldPath.php#L118-L128
train
googleapis/google-cloud-php
Vision/src/VisionClient.php
VisionClient.annotate
public function annotate(Image $image, array $options = []) { $res = $this->annotateBatch([$image], $options); return $res[0]; }
php
public function annotate(Image $image, array $options = []) { $res = $this->annotateBatch([$image], $options); return $res[0]; }
[ "public", "function", "annotate", "(", "Image", "$", "image", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "res", "=", "$", "this", "->", "annotateBatch", "(", "[", "$", "image", "]", ",", "$", "options", ")", ";", "return", "$", "res", "[", "0", "]", ";", "}" ]
Annotate a single image. Example: ``` $familyPhotoResource = fopen(__DIR__ . '/assets/family-photo.jpg', 'r'); $image = $vision->image($familyPhotoResource, [ 'FACE_DETECTION' ]); $result = $vision->annotate($image); ``` @see https://cloud.google.com/vision/docs/reference/rest/v1/images/annotate Annotate API documentation @param Image $image The image to annotate @param array $options Configuration options @return Annotation
[ "Annotate", "a", "single", "image", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/VisionClient.php#L238-L242
train
googleapis/google-cloud-php
Vision/src/VisionClient.php
VisionClient.annotateBatch
public function annotateBatch(array $images, array $options = []) { $this->validateBatch($images, Image::class); $requests = []; foreach ($images as $image) { $requests[] = $image->requestObject(); } $res = $this->connection->annotate([ 'requests' => $requests ] + $options); $annotations = []; if (isset($res['responses'])) { foreach ($res['responses'] as $response) { $annotations[] = new Annotation($response); } } return $annotations; }
php
public function annotateBatch(array $images, array $options = []) { $this->validateBatch($images, Image::class); $requests = []; foreach ($images as $image) { $requests[] = $image->requestObject(); } $res = $this->connection->annotate([ 'requests' => $requests ] + $options); $annotations = []; if (isset($res['responses'])) { foreach ($res['responses'] as $response) { $annotations[] = new Annotation($response); } } return $annotations; }
[ "public", "function", "annotateBatch", "(", "array", "$", "images", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "validateBatch", "(", "$", "images", ",", "Image", "::", "class", ")", ";", "$", "requests", "=", "[", "]", ";", "foreach", "(", "$", "images", "as", "$", "image", ")", "{", "$", "requests", "[", "]", "=", "$", "image", "->", "requestObject", "(", ")", ";", "}", "$", "res", "=", "$", "this", "->", "connection", "->", "annotate", "(", "[", "'requests'", "=>", "$", "requests", "]", "+", "$", "options", ")", ";", "$", "annotations", "=", "[", "]", ";", "if", "(", "isset", "(", "$", "res", "[", "'responses'", "]", ")", ")", "{", "foreach", "(", "$", "res", "[", "'responses'", "]", "as", "$", "response", ")", "{", "$", "annotations", "[", "]", "=", "new", "Annotation", "(", "$", "response", ")", ";", "}", "}", "return", "$", "annotations", ";", "}" ]
Annotate a set of images. Example: ``` $images = []; $familyPhotoResource = fopen(__DIR__ . '/assets/family-photo.jpg', 'r'); $eiffelTowerResource = fopen(__DIR__ . '/assets/eiffel-tower.jpg', 'r'); $images[] = $vision->image($familyPhotoResource, [ 'FACE_DETECTION' ]); $images[] = $vision->image($eiffelTowerResource, [ 'LANDMARK_DETECTION' ]); $result = $vision->annotateBatch($images); ``` @see https://cloud.google.com/vision/docs/reference/rest/v1/images/annotate Annotate API documentation @param Image[] $images An array consisting of instances of {@see Google\Cloud\Vision\Image}. @param array $options Configuration Options @return Annotation[]
[ "Annotate", "a", "set", "of", "images", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/VisionClient.php#L272-L293
train
googleapis/google-cloud-php
AutoMl/src/V1beta1/ClassificationEvaluationMetrics/ConfusionMatrix/Row.php
Row.setExampleCount
public function setExampleCount($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); $this->example_count = $arr; return $this; }
php
public function setExampleCount($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); $this->example_count = $arr; return $this; }
[ "public", "function", "setExampleCount", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "INT32", ")", ";", "$", "this", "->", "example_count", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
Output only. Value of the specific cell in the confusion matrix. The number of values each row is equal to the size of annotatin_spec_id. Generated from protobuf field <code>repeated int32 example_count = 1;</code> @param int[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Output", "only", ".", "Value", "of", "the", "specific", "cell", "in", "the", "confusion", "matrix", ".", "The", "number", "of", "values", "each", "row", "is", "equal", "to", "the", "size", "of", "annotatin_spec_id", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/AutoMl/src/V1beta1/ClassificationEvaluationMetrics/ConfusionMatrix/Row.php#L66-L72
train
googleapis/google-cloud-php
Dlp/src/V2/BigQueryOptions.php
BigQueryOptions.setIdentifyingFields
public function setIdentifyingFields($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\FieldId::class); $this->identifying_fields = $arr; return $this; }
php
public function setIdentifyingFields($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\FieldId::class); $this->identifying_fields = $arr; return $this; }
[ "public", "function", "setIdentifyingFields", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "Dlp", "\\", "V2", "\\", "FieldId", "::", "class", ")", ";", "$", "this", "->", "identifying_fields", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
References to fields uniquely identifying rows within the table. Nested fields in the format, like `person.birthdate.year`, are allowed. Generated from protobuf field <code>repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2;</code> @param \Google\Cloud\Dlp\V2\FieldId[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "References", "to", "fields", "uniquely", "identifying", "rows", "within", "the", "table", ".", "Nested", "fields", "in", "the", "format", "like", "person", ".", "birthdate", ".", "year", "are", "allowed", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/BigQueryOptions.php#L141-L147
train
googleapis/google-cloud-php
Dlp/src/V2/BigQueryOptions.php
BigQueryOptions.setExcludedFields
public function setExcludedFields($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\FieldId::class); $this->excluded_fields = $arr; return $this; }
php
public function setExcludedFields($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\FieldId::class); $this->excluded_fields = $arr; return $this; }
[ "public", "function", "setExcludedFields", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "Dlp", "\\", "V2", "\\", "FieldId", "::", "class", ")", ";", "$", "this", "->", "excluded_fields", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
References to fields excluded from scanning. This allows you to skip inspection of entire columns which you know have no findings. Generated from protobuf field <code>repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5;</code> @param \Google\Cloud\Dlp\V2\FieldId[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "References", "to", "fields", "excluded", "from", "scanning", ".", "This", "allows", "you", "to", "skip", "inspection", "of", "entire", "columns", "which", "you", "know", "have", "no", "findings", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/BigQueryOptions.php#L257-L263
train
googleapis/google-cloud-php
Datastore/src/TransactionTrait.php
TransactionTrait.lookupBatch
public function lookupBatch(array $keys, array $options = []) { return $this->operation->lookup($keys, $options + [ 'transaction' => $this->transactionId ]); }
php
public function lookupBatch(array $keys, array $options = []) { return $this->operation->lookup($keys, $options + [ 'transaction' => $this->transactionId ]); }
[ "public", "function", "lookupBatch", "(", "array", "$", "keys", ",", "array", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->", "operation", "->", "lookup", "(", "$", "keys", ",", "$", "options", "+", "[", "'transaction'", "=>", "$", "this", "->", "transactionId", "]", ")", ";", "}" ]
Get multiple entities inside a transaction Example: ``` $keys = [ $datastore->key('Person', 'Bob'), $datastore->key('Person', 'John') ]; $entities = $transaction->lookupBatch($keys); foreach ($entities['found'] as $entity) { echo $entity['firstName'] . PHP_EOL; } ``` @param Key[] $key The identifiers to look up. @param array $options [optional] { Configuration Options @type string|array $className If a string, the name of the class to return results as. Must be a subclass of {@see Google\Cloud\Datastore\Entity}. If not set, {@see Google\Cloud\Datastore\Entity} will be used. If an array is given, it must be an associative array, where the key is a Kind and the value is the name of a subclass of {@see Google\Cloud\Datastore\Entity}. @type bool $sort If set to true, results in each set will be sorted to match the order given in $keys. **Defaults to** `false`. } @return array Returns an array with keys [`found`, `missing`, and `deferred`]. Members of `found` will be instance of {@see Google\Cloud\Datastore\Entity}. Members of `missing` and `deferred` will be instance of {@see Google\Cloud\Datastore\Key}.
[ "Get", "multiple", "entities", "inside", "a", "transaction" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/TransactionTrait.php#L126-L131
train
googleapis/google-cloud-php
Datastore/src/TransactionTrait.php
TransactionTrait.runQuery
public function runQuery(QueryInterface $query, array $options = []) { return $this->operation->runQuery($query, $options + [ 'transaction' => $this->transactionId ]); }
php
public function runQuery(QueryInterface $query, array $options = []) { return $this->operation->runQuery($query, $options + [ 'transaction' => $this->transactionId ]); }
[ "public", "function", "runQuery", "(", "QueryInterface", "$", "query", ",", "array", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->", "operation", "->", "runQuery", "(", "$", "query", ",", "$", "options", "+", "[", "'transaction'", "=>", "$", "this", "->", "transactionId", "]", ")", ";", "}" ]
Run a query and return entities inside a Transaction Example: ``` $result = $transaction->runQuery($query); foreach ($result as $entity) { echo $entity['firstName']; } ``` @param QueryInterface $query The query object. @param array $options [optional] { Configuration Options @type string $className The name of the class to return results as. Must be a subclass of {@see Google\Cloud\Datastore\Entity}. If not set, {@see Google\Cloud\Datastore\Entity} will be used. } @return EntityIterator<EntityInterface>
[ "Run", "a", "query", "and", "return", "entities", "inside", "a", "Transaction" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/TransactionTrait.php#L155-L160
train
googleapis/google-cloud-php
Vision/src/V1/EntityAnnotation.php
EntityAnnotation.setLocations
public function setLocations($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\LocationInfo::class); $this->locations = $arr; return $this; }
php
public function setLocations($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\LocationInfo::class); $this->locations = $arr; return $this; }
[ "public", "function", "setLocations", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "Vision", "\\", "V1", "\\", "LocationInfo", "::", "class", ")", ";", "$", "this", "->", "locations", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks. Generated from protobuf field <code>repeated .google.cloud.vision.v1.LocationInfo locations = 8;</code> @param \Google\Cloud\Vision\V1\LocationInfo[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "The", "location", "information", "for", "the", "detected", "entity", ".", "Multiple", "LocationInfo", "elements", "can", "be", "present", "because", "one", "location", "may", "indicate", "the", "location", "of", "the", "scene", "in", "the", "image", "and", "another", "location", "may", "indicate", "the", "location", "of", "the", "place", "where", "the", "image", "was", "taken", ".", "Location", "information", "is", "usually", "present", "for", "landmarks", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/EntityAnnotation.php#L370-L376
train
googleapis/google-cloud-php
PubSub/src/V1/UpdateSnapshotRequest.php
UpdateSnapshotRequest.setSnapshot
public function setSnapshot($var) { GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Snapshot::class); $this->snapshot = $var; return $this; }
php
public function setSnapshot($var) { GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Snapshot::class); $this->snapshot = $var; return $this; }
[ "public", "function", "setSnapshot", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "PubSub", "\\", "V1", "\\", "Snapshot", "::", "class", ")", ";", "$", "this", "->", "snapshot", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
The updated snapshot object. Generated from protobuf field <code>.google.pubsub.v1.Snapshot snapshot = 1;</code> @param \Google\Cloud\PubSub\V1\Snapshot $var @return $this
[ "The", "updated", "snapshot", "object", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/PubSub/src/V1/UpdateSnapshotRequest.php#L68-L74
train
googleapis/google-cloud-php
Datastore/src/EntityTrait.php
EntityTrait.getProperty
public function getProperty($property) { return isset($this->entity[$property]) ? $this->entity[$property] : null; }
php
public function getProperty($property) { return isset($this->entity[$property]) ? $this->entity[$property] : null; }
[ "public", "function", "getProperty", "(", "$", "property", ")", "{", "return", "isset", "(", "$", "this", "->", "entity", "[", "$", "property", "]", ")", "?", "$", "this", "->", "entity", "[", "$", "property", "]", ":", "null", ";", "}" ]
Get a single property from the entity data. If the property does not exist, this method will return `null`. Example: ``` $value = $entity->getProperty('firstName'); ``` @param string $property The name of an entity property to return. @return mixed|null
[ "Get", "a", "single", "property", "from", "the", "entity", "data", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/EntityTrait.php#L128-L133
train
googleapis/google-cloud-php
Bigtable/src/Admin/V2/ListTablesRequest.php
ListTablesRequest.setView
public function setView($var) { GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table_View::class); $this->view = $var; return $this; }
php
public function setView($var) { GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table_View::class); $this->view = $var; return $this; }
[ "public", "function", "setView", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkEnum", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Bigtable", "\\", "Admin", "\\", "V2", "\\", "Table_View", "::", "class", ")", ";", "$", "this", "->", "view", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
The view to be applied to the returned tables' fields. Defaults to `NAME_ONLY` if unspecified; no others are currently supported. Generated from protobuf field <code>.google.bigtable.admin.v2.Table.View view = 2;</code> @param int $var @return $this
[ "The", "view", "to", "be", "applied", "to", "the", "returned", "tables", "fields", ".", "Defaults", "to", "NAME_ONLY", "if", "unspecified", ";", "no", "others", "are", "currently", "supported", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/Admin/V2/ListTablesRequest.php#L119-L125
train
googleapis/google-cloud-php
SecurityCenter/src/V1/ListFindingsResponse.php
ListFindingsResponse.setListFindingsResults
public function setListFindingsResults($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult::class); $this->list_findings_results = $arr; return $this; }
php
public function setListFindingsResults($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult::class); $this->list_findings_results = $arr; return $this; }
[ "public", "function", "setListFindingsResults", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "SecurityCenter", "\\", "V1", "\\", "ListFindingsResponse", "\\", "ListFindingsResult", "::", "class", ")", ";", "$", "this", "->", "list_findings_results", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
Findings matching the list request. Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult list_findings_results = 1;</code> @param \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Findings", "matching", "the", "list", "request", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/SecurityCenter/src/V1/ListFindingsResponse.php#L84-L90
train
googleapis/google-cloud-php
Dialogflow/src/V2/Intent/Message/BasicCard/Button.php
Button.setOpenUriAction
public function setOpenUriAction($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_BasicCard_Button_OpenUriAction::class); $this->open_uri_action = $var; return $this; }
php
public function setOpenUriAction($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_BasicCard_Button_OpenUriAction::class); $this->open_uri_action = $var; return $this; }
[ "public", "function", "setOpenUriAction", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Dialogflow", "\\", "V2", "\\", "Intent_Message_BasicCard_Button_OpenUriAction", "::", "class", ")", ";", "$", "this", "->", "open_uri_action", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Required. Action to take when a user taps on the button. Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;</code> @param \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button\OpenUriAction $var @return $this
[ "Required", ".", "Action", "to", "take", "when", "a", "user", "taps", "on", "the", "button", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Intent/Message/BasicCard/Button.php#L92-L98
train
googleapis/google-cloud-php
Firestore/src/Admin/V1/Field.php
Field.setIndexConfig
public function setIndexConfig($var) { GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field_IndexConfig::class); $this->index_config = $var; return $this; }
php
public function setIndexConfig($var) { GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field_IndexConfig::class); $this->index_config = $var; return $this; }
[ "public", "function", "setIndexConfig", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Firestore", "\\", "Admin", "\\", "V1", "\\", "Field_IndexConfig", "::", "class", ")", ";", "$", "this", "->", "index_config", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
The index configuration for this field. If unset, field indexing will revert to the configuration defined by the `ancestor_field`. To explicitly remove all indexes for this field, specify an index config with an empty list of indexes. Generated from protobuf field <code>.google.firestore.admin.v1.Field.IndexConfig index_config = 2;</code> @param \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $var @return $this
[ "The", "index", "configuration", "for", "this", "field", ".", "If", "unset", "field", "indexing", "will", "revert", "to", "the", "configuration", "defined", "by", "the", "ancestor_field", ".", "To", "explicitly", "remove", "all", "indexes", "for", "this", "field", "specify", "an", "index", "config", "with", "an", "empty", "list", "of", "indexes", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Admin/V1/Field.php#L190-L196
train
googleapis/google-cloud-php
WebRisk/src/V1beta1/ComputeThreatListDiffRequest/Constraints.php
Constraints.setSupportedCompressions
public function setSupportedCompressions($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1beta1\CompressionType::class); $this->supported_compressions = $arr; return $this; }
php
public function setSupportedCompressions($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1beta1\CompressionType::class); $this->supported_compressions = $arr; return $this; }
[ "public", "function", "setSupportedCompressions", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "ENUM", ",", "\\", "Google", "\\", "Cloud", "\\", "WebRisk", "\\", "V1beta1", "\\", "CompressionType", "::", "class", ")", ";", "$", "this", "->", "supported_compressions", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
The compression types supported by the client. Generated from protobuf field <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;</code> @param int[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "The", "compression", "types", "supported", "by", "the", "client", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/WebRisk/src/V1beta1/ComputeThreatListDiffRequest/Constraints.php#L142-L148
train
googleapis/google-cloud-php
Debugger/src/Variable.php
Variable.fromJson
public static function fromJson(array $data) { if (array_key_exists('members', $data)) { $data['members'] = array_map([static::class, 'fromJson'], $data['members']); } if (array_key_exists('status', $data)) { $data['status'] = StatusMessage::fromJson($data['status']); } return new static($data['name'], $data['type'], $data); }
php
public static function fromJson(array $data) { if (array_key_exists('members', $data)) { $data['members'] = array_map([static::class, 'fromJson'], $data['members']); } if (array_key_exists('status', $data)) { $data['status'] = StatusMessage::fromJson($data['status']); } return new static($data['name'], $data['type'], $data); }
[ "public", "static", "function", "fromJson", "(", "array", "$", "data", ")", "{", "if", "(", "array_key_exists", "(", "'members'", ",", "$", "data", ")", ")", "{", "$", "data", "[", "'members'", "]", "=", "array_map", "(", "[", "static", "::", "class", ",", "'fromJson'", "]", ",", "$", "data", "[", "'members'", "]", ")", ";", "}", "if", "(", "array_key_exists", "(", "'status'", ",", "$", "data", ")", ")", "{", "$", "data", "[", "'status'", "]", "=", "StatusMessage", "::", "fromJson", "(", "$", "data", "[", "'status'", "]", ")", ";", "}", "return", "new", "static", "(", "$", "data", "[", "'name'", "]", ",", "$", "data", "[", "'type'", "]", ",", "$", "data", ")", ";", "}" ]
Load a Variable from JSON form Example: ``` $variable = Variable::fromJson([ 'name' => 'myVar', 'type' => 'string', 'value' => 'some value' ]); ``` @access private @param array $data { Variable data. @type string $name Name of the variable, if any. @type string $value Simple value of the variable. @type string $type Variable type (e.g. MyClass). @type int $varTableIndex The index of this variable in the variable table. @type array $members Any public member variables. @type array $status Status associated with the variable. } @return Variable
[ "Load", "a", "Variable", "from", "JSON", "form" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/Variable.php#L133-L142
train
googleapis/google-cloud-php
Debugger/src/Variable.php
Variable.byteSize
public function byteSize() { return mb_strlen($this->name) + mb_strlen($this->type) + mb_strlen($this->value); }
php
public function byteSize() { return mb_strlen($this->name) + mb_strlen($this->type) + mb_strlen($this->value); }
[ "public", "function", "byteSize", "(", ")", "{", "return", "mb_strlen", "(", "$", "this", "->", "name", ")", "+", "mb_strlen", "(", "$", "this", "->", "type", ")", "+", "mb_strlen", "(", "$", "this", "->", "value", ")", ";", "}" ]
Return the approximate size of this object in bytes @return int
[ "Return", "the", "approximate", "size", "of", "this", "object", "in", "bytes" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/Variable.php#L149-L154
train
googleapis/google-cloud-php
Debugger/src/Variable.php
Variable.fullByteSize
public function fullByteSize() { $size = $this->byteSize(); foreach ($this->members as $variable) { $size += $variable->fullByteSize(); } return $size; }
php
public function fullByteSize() { $size = $this->byteSize(); foreach ($this->members as $variable) { $size += $variable->fullByteSize(); } return $size; }
[ "public", "function", "fullByteSize", "(", ")", "{", "$", "size", "=", "$", "this", "->", "byteSize", "(", ")", ";", "foreach", "(", "$", "this", "->", "members", "as", "$", "variable", ")", "{", "$", "size", "+=", "$", "variable", "->", "fullByteSize", "(", ")", ";", "}", "return", "$", "size", ";", "}" ]
Returns the approximate size of this object including all members in bytes @return int
[ "Returns", "the", "approximate", "size", "of", "this", "object", "including", "all", "members", "in", "bytes" ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/Variable.php#L161-L168
train
googleapis/google-cloud-php
BigQuery/src/JobWaitTrait.php
JobWaitTrait.wait
private function wait( callable $isCompleteFn, callable $reloadFn, Job $job, $maxRetries ) { if (!$isCompleteFn()) { if ($maxRetries === null) { $maxRetries = Job::MAX_RETRIES; } $retryFn = function () use ($isCompleteFn, $reloadFn, $job) { $reloadFn(); if (!$isCompleteFn()) { throw new JobException('Job did not complete within the allowed number of retries.', $job); } }; (new ExponentialBackoff($maxRetries)) ->execute($retryFn); } }
php
private function wait( callable $isCompleteFn, callable $reloadFn, Job $job, $maxRetries ) { if (!$isCompleteFn()) { if ($maxRetries === null) { $maxRetries = Job::MAX_RETRIES; } $retryFn = function () use ($isCompleteFn, $reloadFn, $job) { $reloadFn(); if (!$isCompleteFn()) { throw new JobException('Job did not complete within the allowed number of retries.', $job); } }; (new ExponentialBackoff($maxRetries)) ->execute($retryFn); } }
[ "private", "function", "wait", "(", "callable", "$", "isCompleteFn", ",", "callable", "$", "reloadFn", ",", "Job", "$", "job", ",", "$", "maxRetries", ")", "{", "if", "(", "!", "$", "isCompleteFn", "(", ")", ")", "{", "if", "(", "$", "maxRetries", "===", "null", ")", "{", "$", "maxRetries", "=", "Job", "::", "MAX_RETRIES", ";", "}", "$", "retryFn", "=", "function", "(", ")", "use", "(", "$", "isCompleteFn", ",", "$", "reloadFn", ",", "$", "job", ")", "{", "$", "reloadFn", "(", ")", ";", "if", "(", "!", "$", "isCompleteFn", "(", ")", ")", "{", "throw", "new", "JobException", "(", "'Job did not complete within the allowed number of retries.'", ",", "$", "job", ")", ";", "}", "}", ";", "(", "new", "ExponentialBackoff", "(", "$", "maxRetries", ")", ")", "->", "execute", "(", "$", "retryFn", ")", ";", "}", "}" ]
Waits for an operation to complete. @param callable $isCompleteFn @param callable $reloadFn @param Job $job @param int $maxRetries @throws JobException
[ "Waits", "for", "an", "operation", "to", "complete", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/BigQuery/src/JobWaitTrait.php#L39-L61
train
googleapis/google-cloud-php
Debugger/src/V2/FormatMessage.php
FormatMessage.setParameters
public function setParameters($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->parameters = $arr; return $this; }
php
public function setParameters($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->parameters = $arr; return $this; }
[ "public", "function", "setParameters", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "STRING", ")", ";", "$", "this", "->", "parameters", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
Optional parameters to be embedded into the message. Generated from protobuf field <code>repeated string parameters = 2;</code> @param string[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Optional", "parameters", "to", "be", "embedded", "into", "the", "message", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/V2/FormatMessage.php#L116-L122
train
googleapis/google-cloud-php
Bigtable/src/V2/CheckAndMutateRowRequest.php
CheckAndMutateRowRequest.setPredicateFilter
public function setPredicateFilter($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); $this->predicate_filter = $var; return $this; }
php
public function setPredicateFilter($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); $this->predicate_filter = $var; return $this; }
[ "public", "function", "setPredicateFilter", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Bigtable", "\\", "V2", "\\", "RowFilter", "::", "class", ")", ";", "$", "this", "->", "predicate_filter", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
The filter to be applied to the contents of the specified row. Depending on whether or not any results are yielded, either `true_mutations` or `false_mutations` will be executed. If unset, checks that the row contains any values at all. Generated from protobuf field <code>.google.bigtable.v2.RowFilter predicate_filter = 6;</code> @param \Google\Cloud\Bigtable\V2\RowFilter $var @return $this
[ "The", "filter", "to", "be", "applied", "to", "the", "contents", "of", "the", "specified", "row", ".", "Depending", "on", "whether", "or", "not", "any", "results", "are", "yielded", "either", "true_mutations", "or", "false_mutations", "will", "be", "executed", ".", "If", "unset", "checks", "that", "the", "row", "contains", "any", "values", "at", "all", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/V2/CheckAndMutateRowRequest.php#L220-L226
train
googleapis/google-cloud-php
Bigtable/src/V2/CheckAndMutateRowRequest.php
CheckAndMutateRowRequest.setTrueMutations
public function setTrueMutations($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); $this->true_mutations = $arr; return $this; }
php
public function setTrueMutations($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); $this->true_mutations = $arr; return $this; }
[ "public", "function", "setTrueMutations", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "Bigtable", "\\", "V2", "\\", "Mutation", "::", "class", ")", ";", "$", "this", "->", "true_mutations", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
Changes to be atomically applied to the specified row if `predicate_filter` yields at least one cell when applied to `row_key`. Entries are applied in order, meaning that earlier mutations can be masked by later ones. Must contain at least one entry if `false_mutations` is empty, and at most 100000. Generated from protobuf field <code>repeated .google.bigtable.v2.Mutation true_mutations = 4;</code> @param \Google\Cloud\Bigtable\V2\Mutation[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Changes", "to", "be", "atomically", "applied", "to", "the", "specified", "row", "if", "predicate_filter", "yields", "at", "least", "one", "cell", "when", "applied", "to", "row_key", ".", "Entries", "are", "applied", "in", "order", "meaning", "that", "earlier", "mutations", "can", "be", "masked", "by", "later", "ones", ".", "Must", "contain", "at", "least", "one", "entry", "if", "false_mutations", "is", "empty", "and", "at", "most", "100000", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/V2/CheckAndMutateRowRequest.php#L254-L260
train
googleapis/google-cloud-php
Bigtable/src/V2/CheckAndMutateRowRequest.php
CheckAndMutateRowRequest.setFalseMutations
public function setFalseMutations($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); $this->false_mutations = $arr; return $this; }
php
public function setFalseMutations($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); $this->false_mutations = $arr; return $this; }
[ "public", "function", "setFalseMutations", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "Bigtable", "\\", "V2", "\\", "Mutation", "::", "class", ")", ";", "$", "this", "->", "false_mutations", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
Changes to be atomically applied to the specified row if `predicate_filter` does not yield any cells when applied to `row_key`. Entries are applied in order, meaning that earlier mutations can be masked by later ones. Must contain at least one entry if `true_mutations` is empty, and at most 100000. Generated from protobuf field <code>repeated .google.bigtable.v2.Mutation false_mutations = 5;</code> @param \Google\Cloud\Bigtable\V2\Mutation[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Changes", "to", "be", "atomically", "applied", "to", "the", "specified", "row", "if", "predicate_filter", "does", "not", "yield", "any", "cells", "when", "applied", "to", "row_key", ".", "Entries", "are", "applied", "in", "order", "meaning", "that", "earlier", "mutations", "can", "be", "masked", "by", "later", "ones", ".", "Must", "contain", "at", "least", "one", "entry", "if", "true_mutations", "is", "empty", "and", "at", "most", "100000", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/V2/CheckAndMutateRowRequest.php#L288-L294
train
googleapis/google-cloud-php
Firestore/src/Transaction.php
Transaction.snapshot
public function snapshot(DocumentReference $document, array $options = []) { return $this->createSnapshot($this->connection, $this->valueMapper, $document, [ 'transaction' => $this->transaction, ] + $options); }
php
public function snapshot(DocumentReference $document, array $options = []) { return $this->createSnapshot($this->connection, $this->valueMapper, $document, [ 'transaction' => $this->transaction, ] + $options); }
[ "public", "function", "snapshot", "(", "DocumentReference", "$", "document", ",", "array", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->", "createSnapshot", "(", "$", "this", "->", "connection", ",", "$", "this", "->", "valueMapper", ",", "$", "document", ",", "[", "'transaction'", "=>", "$", "this", "->", "transaction", ",", "]", "+", "$", "options", ")", ";", "}" ]
Get a Document Snapshot. Example: ``` $snapshot = $transaction->snapshot($document); ``` @param DocumentReference $document The document to retrieve. @param array $options Configuration options. @return DocumentSnapshot
[ "Get", "a", "Document", "Snapshot", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Transaction.php#L107-L112
train
googleapis/google-cloud-php
Firestore/src/Transaction.php
Transaction.create
public function create(DocumentReference $document, array $fields) { $this->writer->create($document->name(), $fields); return $this; }
php
public function create(DocumentReference $document, array $fields) { $this->writer->create($document->name(), $fields); return $this; }
[ "public", "function", "create", "(", "DocumentReference", "$", "document", ",", "array", "$", "fields", ")", "{", "$", "this", "->", "writer", "->", "create", "(", "$", "document", "->", "name", "(", ")", ",", "$", "fields", ")", ";", "return", "$", "this", ";", "}" ]
Enqueue an operation to create a Firestore document. Example: ``` $transaction->create($document, [ 'name' => 'John', 'country' => 'USA' ]); ``` @param DocumentReference $document The document to create. @param array $fields An array containing fields, where keys are the field names, and values are field values. Nested arrays are allowed. Note that unlike {@see Google\Cloud\Firestore\DocumentReference::update()}, field paths are NOT supported by this method. @return Transaction
[ "Enqueue", "an", "operation", "to", "create", "a", "Firestore", "document", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Transaction.php#L206-L211
train
googleapis/google-cloud-php
Firestore/src/Transaction.php
Transaction.set
public function set(DocumentReference $document, array $fields, array $options = []) { $this->writer->set($document->name(), $fields, $options); return $this; }
php
public function set(DocumentReference $document, array $fields, array $options = []) { $this->writer->set($document->name(), $fields, $options); return $this; }
[ "public", "function", "set", "(", "DocumentReference", "$", "document", ",", "array", "$", "fields", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "writer", "->", "set", "(", "$", "document", "->", "name", "(", ")", ",", "$", "fields", ",", "$", "options", ")", ";", "return", "$", "this", ";", "}" ]
Enqueue an operation to modify or replace a Firestore document. Example: ``` // In this example, all field not explicitly specified will be removed. $transaction->set($document, [ 'name' => 'Johnny' ]); ``` ``` // To specify MERGE over REPLACE, set `$options.merge` to `true`. $transaction->set($document, [ 'name' => 'Johnny' ], [ 'merge' => true ]); ``` @param DocumentReference $document The document to modify or replace. @param array $fields An array containing fields, where keys are the field names, and values are field values. Nested arrays are allowed. Note that unlike {@see Google\Cloud\Firestore\Transaction::update()}, field paths are NOT supported by this method. @param array $options { Configuration options. @type bool $merge If true, unwritten fields will be preserved. Otherwise, they will be overwritten (removed). **Defaults to** `false`. } @return Transaction
[ "Enqueue", "an", "operation", "to", "modify", "or", "replace", "a", "Firestore", "document", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Transaction.php#L247-L252
train
googleapis/google-cloud-php
Firestore/src/Transaction.php
Transaction.delete
public function delete(DocumentReference $document, array $options = []) { $this->writer->delete($document->name(), $options); return $this; }
php
public function delete(DocumentReference $document, array $options = []) { $this->writer->delete($document->name(), $options); return $this; }
[ "public", "function", "delete", "(", "DocumentReference", "$", "document", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "writer", "->", "delete", "(", "$", "document", "->", "name", "(", ")", ",", "$", "options", ")", ";", "return", "$", "this", ";", "}" ]
Enqueue an operation to delete a Firestore document. Example: ``` $transaction->delete($document); ``` @param DocumentReference $document The document to delete. @param array $options Configuration Options. @return Transaction
[ "Enqueue", "an", "operation", "to", "delete", "a", "Firestore", "document", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Transaction.php#L336-L341
train
googleapis/google-cloud-php
Vision/src/V1/OperationMetadata.php
OperationMetadata.setState
public function setState($var) { GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\OperationMetadata_State::class); $this->state = $var; return $this; }
php
public function setState($var) { GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\OperationMetadata_State::class); $this->state = $var; return $this; }
[ "public", "function", "setState", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkEnum", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Vision", "\\", "V1", "\\", "OperationMetadata_State", "::", "class", ")", ";", "$", "this", "->", "state", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Current state of the batch operation. Generated from protobuf field <code>.google.cloud.vision.v1.OperationMetadata.State state = 1;</code> @param int $var @return $this
[ "Current", "state", "of", "the", "batch", "operation", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/OperationMetadata.php#L74-L80
train
googleapis/google-cloud-php
Monitoring/src/V3/UptimeCheckConfig.php
UptimeCheckConfig.setResourceGroup
public function setResourceGroup($var) { GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_ResourceGroup::class); $this->writeOneof(4, $var); return $this; }
php
public function setResourceGroup($var) { GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_ResourceGroup::class); $this->writeOneof(4, $var); return $this; }
[ "public", "function", "setResourceGroup", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Monitoring", "\\", "V3", "\\", "UptimeCheckConfig_ResourceGroup", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "4", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
The group resource associated with the configuration. Generated from protobuf field <code>.google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4;</code> @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ResourceGroup $var @return $this
[ "The", "group", "resource", "associated", "with", "the", "configuration", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Monitoring/src/V3/UptimeCheckConfig.php#L287-L293
train
googleapis/google-cloud-php
Monitoring/src/V3/UptimeCheckConfig.php
UptimeCheckConfig.setHttpCheck
public function setHttpCheck($var) { GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck::class); $this->writeOneof(5, $var); return $this; }
php
public function setHttpCheck($var) { GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck::class); $this->writeOneof(5, $var); return $this; }
[ "public", "function", "setHttpCheck", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Monitoring", "\\", "V3", "\\", "UptimeCheckConfig_HttpCheck", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "5", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
Contains information needed to make an HTTP or HTTPS check. Generated from protobuf field <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5;</code> @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck $var @return $this
[ "Contains", "information", "needed", "to", "make", "an", "HTTP", "or", "HTTPS", "check", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Monitoring/src/V3/UptimeCheckConfig.php#L313-L319
train
googleapis/google-cloud-php
Monitoring/src/V3/UptimeCheckConfig.php
UptimeCheckConfig.setTcpCheck
public function setTcpCheck($var) { GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_TcpCheck::class); $this->writeOneof(6, $var); return $this; }
php
public function setTcpCheck($var) { GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_TcpCheck::class); $this->writeOneof(6, $var); return $this; }
[ "public", "function", "setTcpCheck", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Monitoring", "\\", "V3", "\\", "UptimeCheckConfig_TcpCheck", "::", "class", ")", ";", "$", "this", "->", "writeOneof", "(", "6", ",", "$", "var", ")", ";", "return", "$", "this", ";", "}" ]
Contains information needed to make a TCP check. Generated from protobuf field <code>.google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6;</code> @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\TcpCheck $var @return $this
[ "Contains", "information", "needed", "to", "make", "a", "TCP", "check", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Monitoring/src/V3/UptimeCheckConfig.php#L339-L345
train
googleapis/google-cloud-php
Monitoring/src/V3/UptimeCheckConfig.php
UptimeCheckConfig.setContentMatchers
public function setContentMatchers($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher::class); $this->content_matchers = $arr; return $this; }
php
public function setContentMatchers($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher::class); $this->content_matchers = $arr; return $this; }
[ "public", "function", "setContentMatchers", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "MESSAGE", ",", "\\", "Google", "\\", "Cloud", "\\", "Monitoring", "\\", "V3", "\\", "UptimeCheckConfig", "\\", "ContentMatcher", "::", "class", ")", ";", "$", "this", "->", "content_matchers", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
The expected content on the page the check is run against. Currently, only the first entry in the list is supported, and other entries will be ignored. The server will look for an exact match of the string in the page response's content. This field is optional and should only be specified if a content match is required. Generated from protobuf field <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code> @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "The", "expected", "content", "on", "the", "page", "the", "check", "is", "run", "against", ".", "Currently", "only", "the", "first", "entry", "in", "the", "list", "is", "supported", "and", "other", "entries", "will", "be", "ignored", ".", "The", "server", "will", "look", "for", "an", "exact", "match", "of", "the", "string", "in", "the", "page", "response", "s", "content", ".", "This", "field", "is", "optional", "and", "should", "only", "be", "specified", "if", "a", "content", "match", "is", "required", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Monitoring/src/V3/UptimeCheckConfig.php#L433-L439
train
googleapis/google-cloud-php
Monitoring/src/V3/UptimeCheckConfig.php
UptimeCheckConfig.setSelectedRegions
public function setSelectedRegions($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Monitoring\V3\UptimeCheckRegion::class); $this->selected_regions = $arr; return $this; }
php
public function setSelectedRegions($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Monitoring\V3\UptimeCheckRegion::class); $this->selected_regions = $arr; return $this; }
[ "public", "function", "setSelectedRegions", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "ENUM", ",", "\\", "Google", "\\", "Cloud", "\\", "Monitoring", "\\", "V3", "\\", "UptimeCheckRegion", "::", "class", ")", ";", "$", "this", "->", "selected_regions", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
The list of regions from which the check will be run. Some regions contain one location, and others contain more than one. If this field is specified, enough regions to include a minimum of 3 locations must be provided, or an error message is returned. Not specifying this field will result in uptime checks running from all regions. Generated from protobuf field <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code> @param int[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "The", "list", "of", "regions", "from", "which", "the", "check", "will", "be", "run", ".", "Some", "regions", "contain", "one", "location", "and", "others", "contain", "more", "than", "one", ".", "If", "this", "field", "is", "specified", "enough", "regions", "to", "include", "a", "minimum", "of", "3", "locations", "must", "be", "provided", "or", "an", "error", "message", "is", "returned", ".", "Not", "specifying", "this", "field", "will", "result", "in", "uptime", "checks", "running", "from", "all", "regions", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Monitoring/src/V3/UptimeCheckConfig.php#L469-L475
train
googleapis/google-cloud-php
Dataproc/src/V1beta2/InstanceGroupConfig.php
InstanceGroupConfig.setInstanceNames
public function setInstanceNames($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->instance_names = $arr; return $this; }
php
public function setInstanceNames($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->instance_names = $arr; return $this; }
[ "public", "function", "setInstanceNames", "(", "$", "var", ")", "{", "$", "arr", "=", "GPBUtil", "::", "checkRepeatedField", "(", "$", "var", ",", "\\", "Google", "\\", "Protobuf", "\\", "Internal", "\\", "GPBType", "::", "STRING", ")", ";", "$", "this", "->", "instance_names", "=", "$", "arr", ";", "return", "$", "this", ";", "}" ]
Output only. The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group. Generated from protobuf field <code>repeated string instance_names = 2;</code> @param string[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "Output", "only", ".", "The", "list", "of", "instance", "names", ".", "Cloud", "Dataproc", "derives", "the", "names", "from", "cluster_name", "num_instances", "and", "the", "instance", "group", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1beta2/InstanceGroupConfig.php#L195-L201
train
googleapis/google-cloud-php
Dataproc/src/V1beta2/InstanceGroupConfig.php
InstanceGroupConfig.setDiskConfig
public function setDiskConfig($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\DiskConfig::class); $this->disk_config = $var; return $this; }
php
public function setDiskConfig($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\DiskConfig::class); $this->disk_config = $var; return $this; }
[ "public", "function", "setDiskConfig", "(", "$", "var", ")", "{", "GPBUtil", "::", "checkMessage", "(", "$", "var", ",", "\\", "Google", "\\", "Cloud", "\\", "Dataproc", "\\", "V1beta2", "\\", "DiskConfig", "::", "class", ")", ";", "$", "this", "->", "disk_config", "=", "$", "var", ";", "return", "$", "this", ";", "}" ]
Optional. Disk option config settings. Generated from protobuf field <code>.google.cloud.dataproc.v1beta2.DiskConfig disk_config = 5;</code> @param \Google\Cloud\Dataproc\V1beta2\DiskConfig $var @return $this
[ "Optional", ".", "Disk", "option", "config", "settings", "." ]
ff5030ffa1f12904565509a7bc24ecc0bd794a3e
https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1beta2/InstanceGroupConfig.php#L295-L301
train