_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 33 8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q15300 | Asset.setIamPolicy | train | public function setIamPolicy($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Asset_IamPolicy::class);
| php | {
"resource": ""
} |
q15301 | ListenResponse.setFilter | train | public function setFilter($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\ExistenceFilter::class);
| php | {
"resource": ""
} |
q15302 | TransformationOverview.setTransformationSummaries | train | public function setTransformationSummaries($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15303 | ListJobTriggersResponse.setJobTriggers | train | public function setJobTriggers($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15304 | TemplateParameter.setValidation | train | public function setValidation($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\ParameterValidation::class); | php | {
"resource": ""
} |
q15305 | NodeConfig.setTags | train | public function setTags($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
| php | {
"resource": ""
} |
q15306 | ValueMapper.encodeValues | train | public function encodeValues(array $fields)
{
$output = [];
foreach ($fields as $key => $val) {
| php | {
"resource": ""
} |
q15307 | ValueMapper.encodeValue | train | public function encodeValue($value)
{
$type = gettype($value);
switch ($type) {
case 'boolean':
return ['booleanValue' => $value];
break;
case 'integer':
return ['integerValue' => $value];
break;
c... | php | {
"resource": ""
} |
q15308 | ValueMapper.encodeObjectValue | train | private function encodeObjectValue($value)
{
if ($value instanceof \stdClass) {
return $this->encodeAssociativeArrayValue((array) $value);
}
if ($value instanceof Blob) {
return ['bytesValue' => (string) $value];
}
if ($value instanceof \DateTimeInte... | php | {
"resource": ""
} |
q15309 | ValueMapper.encodeAssociativeArrayValue | train | private function encodeAssociativeArrayValue(array $value)
{
$out = [];
foreach ($value as $key => $item) {
| php | {
"resource": ""
} |
q15310 | CreateDeviceRequest.setDevice | train | public function setDevice($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\Device::class);
| php | {
"resource": ""
} |
q15311 | WebhookResponse.setFollowupEventInput | train | public function setFollowupEventInput($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EventInput::class);
| php | {
"resource": ""
} |
q15312 | CreateClusterRequest.setCluster | train | public function setCluster($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster::class);
| php | {
"resource": ""
} |
q15313 | KeySet.keySetObject | train | public function keySetObject()
{
$ranges = [];
foreach ($this->ranges as $range) {
$ranges[] = $range->keyRangeObject();
}
$set = [];
| php | {
"resource": ""
} |
q15314 | Transaction.insertBatch | train | public function insertBatch($table, array $dataSet)
{
| php | {
"resource": ""
} |
q15315 | Transaction.updateBatch | train | public function updateBatch($table, array $dataSet)
{
| php | {
"resource": ""
} |
q15316 | Transaction.insertOrUpdateBatch | train | public function insertOrUpdateBatch($table, array $dataSet)
{
| php | {
"resource": ""
} |
q15317 | Transaction.replaceBatch | train | public function replaceBatch($table, array $dataSet)
{
| php | {
"resource": ""
} |
q15318 | Transaction.delete | train | public function delete($table, KeySet $keySet)
{
| php | {
"resource": ""
} |
q15319 | Transaction.executeUpdate | train | public function executeUpdate($sql, array $options = [])
{
$options['seqno'] = $this->seqno;
$this->seqno++;
| php | {
"resource": ""
} |
q15320 | Transaction.commit | train | public function commit(array $options = [])
{
if ($this->state !== self::STATE_ACTIVE) {
throw new \BadMethodCallException('The transaction cannot be committed because it is not active');
}
if (!$this->singleUseState()) {
$this->state = self::STATE_COMMITTED;
| php | {
"resource": ""
} |
q15321 | Transaction.enqueue | train | private function enqueue($op, $table, array $dataSet)
{
foreach ($dataSet as $data) {
if ($op === Operation::OP_DELETE) {
$this->mutations[] = $this->operation->deleteMutation($table, $data);
} else {
| php | {
"resource": ""
} |
q15322 | ListWorkflowTemplatesResponse.setTemplates | train | public function setTemplates($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15323 | GerritSourceContext.setAliasContext | train | public function setAliasContext($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\AliasContext::class);
| php | {
"resource": ""
} |
q15324 | DocumentReference.create | train | public function create(array $fields = [], array $options = [])
{
return $this->writeResult(
$this->batchFactory()
| php | {
"resource": ""
} |
q15325 | DocumentReference.set | train | public function set(array $fields, array $options = [])
{
return $this->writeResult(
$this->batchFactory()
| php | {
"resource": ""
} |
q15326 | DocumentReference.update | train | public function update(array $data, array $options = [])
{
return $this->writeResult(
$this->batchFactory()
| php | {
"resource": ""
} |
q15327 | DocumentReference.snapshot | train | public function snapshot(array $options = [])
{
return | php | {
"resource": ""
} |
q15328 | DocumentReference.collection | train | public function collection($collectionId)
{
return new CollectionReference(
$this->connection,
| php | {
"resource": ""
} |
q15329 | DocumentReference.collections | train | public function collections(array $options = [])
{
$resultLimit = $this->pluck('resultLimit', $options, false);
return new ItemIterator(
new PageIterator(
function ($collectionId) {
return new CollectionReference(
$this->connect... | php | {
"resource": ""
} |
q15330 | DocumentReference.batchFactory | train | protected function batchFactory()
{
return new WriteBatch(
$this->connection,
$this->valueMapper,
| php | {
"resource": ""
} |
q15331 | Cluster.setConfig | train | public function setConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\ClusterConfig::class); | php | {
"resource": ""
} |
q15332 | UnaryFilter.setField | train | public function setField($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\StructuredQuery_FieldReference::class);
| php | {
"resource": ""
} |
q15333 | InputConfig.setGcsSource | train | public function setGcsSource($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Redis\V1\GcsSource::class);
| php | {
"resource": ""
} |
q15334 | CompensationEntry.setRange | train | public function setRange($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\CompensationInfo_CompensationRange::class);
| php | {
"resource": ""
} |
q15335 | DeviceRegistry.setMqttConfig | train | public function setMqttConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\MqttConfig::class);
| php | {
"resource": ""
} |
q15336 | CreateProductSetRequest.setProductSet | train | public function setProductSet($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSet::class);
| php | {
"resource": ""
} |
q15337 | Table.update | train | public function update(array $metadata, array $options = [])
{
$options = $this->applyEtagHeader(
$options
+ $metadata
+ $this->identity
);
if (!isset($options['etag']) && !isset($options['retries'])) {
| php | {
"resource": ""
} |
q15338 | Table.runJob | train | public function runJob(JobConfigurationInterface $config, array $options = [])
{
$maxRetries = $this->pluck('maxRetries', $options, | php | {
"resource": ""
} |
q15339 | Table.startJob | train | public function startJob(JobConfigurationInterface $config, array $options = [])
{
$response = null;
$config = $config->toArray() + $options;
if (isset($config['data'])) {
$response = $this->connection->insertJobUpload($config)->upload();
} else {
$response =... | php | {
"resource": ""
} |
q15340 | Table.insertRow | train | public function insertRow(array $row, array $options = [])
{
$row = ['data' => $row];
if (isset($options['insertId'])) {
$row['insertId'] = $options['insertId'];
| php | {
"resource": ""
} |
q15341 | Table.insertRows | train | public function insertRows(array $rows, array $options = [])
{
if (count($rows) === 0) {
throw new \InvalidArgumentException('Must provide at least a single row.');
}
foreach ($rows as $row) {
if (!isset($row['data'])) {
throw new \InvalidArgumentExce... | php | {
"resource": ""
} |
q15342 | Table.reload | train | public function reload(array $options = [])
{
return $this->info = | php | {
"resource": ""
} |
q15343 | Table.handleInsert | train | private function handleInsert(array $options)
{
$attempt = 0;
$metadata = $this->pluck('tableMetadata', $options, false) ?: [];
$autoCreate = $this->pluck('autoCreate', $options, false) ?: false;
$maxRetries = $this->pluck('maxRetries', $options, false) ?: self::MAX_RETRIES;
... | php | {
"resource": ""
} |
q15344 | ListGroupMembersResponse.setMembers | train | public function setMembers($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15345 | DataSourceParameter.setType | train | public function setType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\DataSou | php | {
"resource": ""
} |
q15346 | DataSourceParameter.setAllowedValues | train | public function setAllowedValues($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
| php | {
"resource": ""
} |
q15347 | DataSourceParameter.setFields | train | public function setFields($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15348 | DebuggerClient.debuggees | train | public function debuggees(array $extras = [])
{
$res = $this->connection->listDebuggees(['project' => $this->projectId] + $extras);
if (is_array($res) && array_key_exists('debuggees', | php | {
"resource": ""
} |
q15349 | Projection.setProperty | train | public function setProperty($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Datastore\V1\PropertyReference::class);
| php | {
"resource": ""
} |
q15350 | CommitResponse.setWriteResults | train | public function setWriteResults($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15351 | Agent.handleSnapshot | train | public function handleSnapshot(array $snapshot)
{
if (array_key_exists($snapshot['id'], $this->breakpointsById)) {
$breakpoint = $this->breakpointsById[$snapshot['id']];
$evaluatedExpressions = $snapshot['evaluatedExpressions'];
$stackframes = $snapshot['stackframes'];
| php | {
"resource": ""
} |
q15352 | Agent.reportBreakpoints | train | public function reportBreakpoints(array $breakpointsInfo)
{
$client = $this->defaultClient();
foreach ($breakpointsInfo as $breakpointInfo) {
list($debuggeeId, $breakpoint) = $breakpointInfo;
$debuggee = $client->debuggee($debuggeeId);
| php | {
"resource": ""
} |
q15353 | QuickReplies.setQuickReplies | train | public function setQuickReplies($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
| php | {
"resource": ""
} |
q15354 | TraceClient.insertBatch | train | public function insertBatch(array $traces, array $options = [])
{
$spans = [];
foreach ($traces as $trace) {
foreach ($trace->spans() as $span) {
$spans[] = $this->transformSpan($span);
}
}
| php | {
"resource": ""
} |
q15355 | ClusterConfig.setGceClusterConfig | train | public function setGceClusterConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\GceClusterConfig::class);
| php | {
"resource": ""
} |
q15356 | ClusterConfig.setMasterConfig | train | public function setMasterConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\InstanceGroupConfig::class);
| php | {
"resource": ""
} |
q15357 | ClusterConfig.setWorkerConfig | train | public function setWorkerConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\InstanceGroupConfig::class);
| php | {
"resource": ""
} |
q15358 | UpdateJobTriggerRequest.setJobTrigger | train | public function setJobTrigger($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\JobTrigger::class);
| php | {
"resource": ""
} |
q15359 | LookupResponse.setFound | train | public function setFound($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15360 | LookupResponse.setMissing | train | public function setMissing($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15361 | LookupResponse.setDeferred | train | public function setDeferred($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15362 | CreateReferenceImageRequest.setReferenceImage | train | public function setReferenceImage($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ReferenceImage::class);
| php | {
"resource": ""
} |
q15363 | BatchGetDocumentsResponse.setFound | train | public function setFound($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class);
| php | {
"resource": ""
} |
q15364 | ExportAssetsRequest.setOutputConfig | train | public function setOutputConfig($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q15365 | CreateIntentRequest.setIntentView | train | public function setIntentView($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\IntentView::class);
| php | {
"resource": ""
} |
q15366 | DataUtil.isSystemLittleEndian | train | public static function isSystemLittleEndian()
{
if (self::$isLittleEndian === null) {
self::$isLittleEndian = (pack("P", 2) | php | {
"resource": ""
} |
q15367 | DataUtil.intToByteString | train | public static function intToByteString($intValue)
{
if (!self::isSupported()) {
throw new \RuntimeException('This utility is only supported on 64 bit machines with PHP version > 5.5.');
}
| php | {
"resource": ""
} |
q15368 | DataUtil.byteStringToInt | train | public static function byteStringToInt($bytes)
{
if (!self::isSupported()) {
throw new \RuntimeException('This utility is only supported on 64 bit machines with PHP version > 5.5.');
| php | {
"resource": ""
} |
q15369 | MutateRowRequest.setMutations | train | public function setMutations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15370 | RequestBuilder.build | train | public function build($resource, $method, array $options = [])
{
$root = $this->resourceRoot;
array_push($root, 'resources');
$root = array_merge($root, explode('.', $resource));
array_push($root, 'methods', $method);
$action = $this->service;
foreach ($root as $roo... | php | {
"resource": ""
} |
q15371 | ListTransferConfigsResponse.setTransferConfigs | train | public function setTransferConfigs($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15372 | Breakpoint.evaluate | train | public function evaluate(array $evaluatedExpressions, array $stackframes, array $options = [])
{
$this->variableTable->setOptions($options); | php | {
"resource": ""
} |
q15373 | Breakpoint.finalize | train | public function finalize()
{
list($usec, $sec) = explode(' ', microtime());
$micro = sprintf("%06d", $usec * 1000000);
$when = new \DateTime(date('Y-m-d H:i:s.' . $micro));
| php | {
"resource": ""
} |
q15374 | Breakpoint.addStackFrame | train | public function addStackFrame($stackFrameData)
{
$stackFrameData += [
'function' => '',
'locals' => []
];
$sf = new StackFrame(
$stackFrameData['function'],
new SourceLocation($stackFrameData['filename'], $stackFrameData['line'])
);
... | php | {
"resource": ""
} |
q15375 | Breakpoint.addEvaluatedExpressions | train | public function addEvaluatedExpressions(array $expressions)
{
foreach ($expressions as $expression => $result) {
try {
$this->evaluatedExpressions[] = $this->addVariable($expression, $result);
} catch (BufferFullException | php | {
"resource": ""
} |
q15376 | ExamplePayload.setImage | train | public function setImage($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1beta1\Image::class);
| php | {
"resource": ""
} |
q15377 | ExamplePayload.setTextSnippet | train | public function setTextSnippet($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q15378 | BigtableGapicClient.tableName | train | public static function tableName($project, $instance, $table)
{
return self::getTableNameTemplate()->render([
'project' => $project,
| php | {
"resource": ""
} |
q15379 | PredictionServiceGapicClient.modelName | train | public static function modelName($project, $location, $model)
{
return self::getModelNameTemplate()->render([
'project' => $project,
| php | {
"resource": ""
} |
q15380 | FieldTransform.setSetToServerValue | train | public function setSetToServerValue($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\F | php | {
"resource": ""
} |
q15381 | Timestamp.nanoSeconds | train | public function nanoSeconds()
{
return $this->nanoSeconds === | php | {
"resource": ""
} |
q15382 | Application.setState | train | public function setState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4beta1\Application_Ap | php | {
"resource": ""
} |
q15383 | Application.setOutcome | train | public function setOutcome($var)
{
GPBUtil::checkEnum($var, | php | {
"resource": ""
} |
q15384 | DeviceManagerGapicClient.deviceName | train | public static function deviceName($project, $location, $registry, $device)
{
return self::getDeviceNameTemplate()->render([
'project' => $project,
| php | {
"resource": ""
} |
q15385 | DeviceManagerGapicClient.registryName | train | public static function registryName($project, $location, $registry)
{
return self::getRegistryNameTemplate()->render([
'project' => $project,
| php | {
"resource": ""
} |
q15386 | RecordCondition.setExpressions | train | public function setExpressions($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\RecordCondition_Expressions::class);
| php | {
"resource": ""
} |
q15387 | QueryParameters.setContexts | train | public function setContexts($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15388 | QueryParameters.setSessionEntityTypes | train | public function setSessionEntityTypes($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15389 | QueryParameters.setSentimentAnalysisRequestConfig | train | public function setSentimentAnalysisRequestConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SentimentAnalysisRequestConfig::class); | php | {
"resource": ""
} |
q15390 | ThreatEntryRemovals.setRawIndices | train | public function setRawIndices($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q15391 | ParseResumeResponse.setProfile | train | public function setProfile($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\Profile::class);
| php | {
"resource": ""
} |
q15392 | InspectDataSourceDetails.setRequestedOptions | train | public function setRequestedOptions($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\InspectDataSourceDetails_RequestedOptions::class);
| php | {
"resource": ""
} |
q15393 | InspectDataSourceDetails.setResult | train | public function setResult($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\InspectDataSourceDetails_Result::class); | php | {
"resource": ""
} |
q15394 | DatabaseAdminGrpcClient.GetIamPolicy | train | public function GetIamPolicy(\Google\Cloud\Iam\V1\GetIamPolicyRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.spanner.admin.database.v1.DatabaseAdmin/GetIamPolicy',
| php | {
"resource": ""
} |
q15395 | ClusterMetrics.setHdfsMetrics | train | public function setHdfsMetrics($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, | php | {
"resource": ""
} |
q15396 | ClusterMetrics.setYarnMetrics | train | public function setYarnMetrics($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, | php | {
"resource": ""
} |
q15397 | KeyManagementServiceGapicClient.cryptoKeyName | train | public static function cryptoKeyName($project, $location, $keyRing, $cryptoKey)
{
return self::getCryptoKeyNameTemplate()->render([
| php | {
"resource": ""
} |
q15398 | KeyManagementServiceGapicClient.cryptoKeyPathName | train | public static function cryptoKeyPathName($project, $location, $keyRing, $cryptoKeyPath)
{
return self::getCryptoKeyPathNameTemplate()->render([
| php | {
"resource": ""
} |
q15399 | KeyManagementServiceGapicClient.cryptoKeyVersionName | train | public static function cryptoKeyVersionName($project, $location, $keyRing, $cryptoKey, $cryptoKeyVersion)
{
return self::getCryptoKeyVersionNameTemplate()->render([
'project' => $project,
'location' => $location,
| php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.