_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 33 8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q15500 | Debuggee.updateBreakpoint | train | public function updateBreakpoint(Breakpoint $breakpoint, array $options = [])
{
$this->connection->updateBreakpoint([
'debuggeeId' => $this->id,
| php | {
"resource": ""
} |
q15501 | Debuggee.setBreakpoint | train | public function setBreakpoint($path, $line, array $options = [])
{
$resp = $this->connection->setBreakpoint([
'debuggeeId' => $this->id,
'location' => [
'path' => $path, | php | {
"resource": ""
} |
q15502 | Debuggee.updateBreakpointBatch | train | public function updateBreakpointBatch(array $breakpoints, array $options = [])
{
foreach ($breakpoints as $breakpoint) {
| php | {
"resource": ""
} |
q15503 | GrpcRequestWrapper.handleResponse | train | private function handleResponse($response)
{
if ($response instanceof PagedListResponse || $response instanceof GaxPagedListResponse) {
$response = $response->getPage()->getResponseObject();
}
if ($response instanceof Message) {
return $this->serializer->encodeMessag... | php | {
"resource": ""
} |
q15504 | GrpcRequestWrapper.handleStream | train | private function handleStream($response)
{
try {
foreach ($response->readAll() as $count => $result) {
$res = $this->serializer->encodeMessage($result);
yield $res;
| php | {
"resource": ""
} |
q15505 | GrpcRequestWrapper.convertToGoogleException | train | private function convertToGoogleException($ex)
{
switch ($ex->getCode()) {
case Code::INVALID_ARGUMENT:
$exception = Exception\BadRequestException::class;
break;
case Code::NOT_FOUND:
case Code::UNIMPLEMENTED:
$exception = ... | php | {
"resource": ""
} |
q15506 | ImageContext.setLatLongRect | train | public function setLatLongRect($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\LatLongRect::class);
| php | {
"resource": ""
} |
q15507 | ImageContext.setCropHintsParams | train | public function setCropHintsParams($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\CropHintsParams::class);
| php | {
"resource": ""
} |
q15508 | ImageContext.setProductSearchParams | train | public function setProductSearchParams($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSearchParams::class);
| php | {
"resource": ""
} |
q15509 | ImageContext.setWebDetectionParams | train | public function setWebDetectionParams($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\WebDetectionParams::class);
| php | {
"resource": ""
} |
q15510 | QueryResultBatch.setEntityResultType | train | public function setEntityResultType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Datastore\V1\EntityResult_ResultType::class); | php | {
"resource": ""
} |
q15511 | QueryResultBatch.setEntityResults | train | public function setEntityResults($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15512 | QueryResultBatch.setMoreResults | train | public function setMoreResults($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Datastore\V1\QueryResultBatch_MoreResultsType::class);
| php | {
"resource": ""
} |
q15513 | Result.setInfoTypeStats | train | public function setInfoTypeStats($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15514 | ListMetricDescriptorsResponse.setMetricDescriptors | train | public function setMetricDescriptors($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15515 | ListProductSetsResponse.setProductSets | train | public function setProductSets($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15516 | HttpTarget.setHttpMethod | train | public function setHttpMethod($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Scheduler\V1beta1\HttpMethod::class); | php | {
"resource": ""
} |
q15517 | Value.setKeyValue | train | public function setKeyValue($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Datastore\V1\Key::class);
| php | {
"resource": ""
} |
q15518 | UpdateAlertPolicyRequest.setAlertPolicy | train | public function setAlertPolicy($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q15519 | FirestoreClient.batch | train | public function batch()
{
return new WriteBatch(
$this->connection,
| php | {
"resource": ""
} |
q15520 | FirestoreClient.collection | train | public function collection($name)
{
return $this->getCollectionReference(
$this->connection,
$this->valueMapper,
| php | {
"resource": ""
} |
q15521 | FirestoreClient.collections | train | public function collections(array $options = [])
{
$resultLimit = $this->pluck('resultLimit', $options, false);
return new ItemIterator(
new PageIterator(
function ($collectionId) {
return $this->collection($collectionId);
},
... | php | {
"resource": ""
} |
q15522 | FirestoreClient.document | train | public function document($name)
{
return $this->getDocumentReference(
$this->connection,
$this->valueMapper,
| php | {
"resource": ""
} |
q15523 | FirestoreClient.runTransaction | train | public function runTransaction(callable $callable, array $options = [])
{
$options += [
'maxRetries' => self::MAX_RETRIES,
'begin' => [],
'commit' => [],
'rollback' => []
];
$retryableErrors = [
AbortedException::class
];
... | php | {
"resource": ""
} |
q15524 | UpdateFieldRequest.setField | train | public function setField($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field::class);
| php | {
"resource": ""
} |
q15525 | Mutation.setDelete | train | public function setDelete($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Spanner\V1\Mutation_Delete::class); | php | {
"resource": ""
} |
q15526 | SearchUrisResponse.setThreat | train | public function setThreat($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\SearchUrisRe | php | {
"resource": ""
} |
q15527 | ListTransferConfigsRequest.setDataSourceIds | train | public function setDataSourceIds($var)
{
$arr = GPBUtil::checkRepeatedField($var, | php | {
"resource": ""
} |
q15528 | ClientTrait.getConnectionType | train | private function getConnectionType(array $config)
{
$isGrpcExtensionLoaded = $this->isGrpcLoaded();
$defaultTransport = $isGrpcExtensionLoaded ? 'grpc' : 'rest';
$transport = isset($config['transport'])
? strtolower($config['transport'])
: $defaultTransport;
... | php | {
"resource": ""
} |
q15529 | ClientTrait.configureAuthentication | train | private function configureAuthentication(array $config)
{
$config['keyFile'] = $this->getKeyFile($config);
| php | {
"resource": ""
} |
q15530 | ClientTrait.getKeyFile | train | private function getKeyFile(array $config = [])
{
$config += [
'keyFile' => null,
'keyFilePath' => null,
];
if ($config['keyFile']) {
return $config['keyFile'];
}
if ($config['keyFilePath']) {
if (!file_exists($config['keyFile... | php | {
"resource": ""
} |
q15531 | ClientTrait.detectProjectId | train | private function detectProjectId(array $config)
{
$config += [
'httpHandler' => null,
'projectId' => null,
'projectIdRequired' => false,
'hasEmulator' => false,
'preferNumericProjectId' => false,
'suppressKeyFileNotice' => false
... | php | {
"resource": ""
} |
q15532 | AddonsConfig.setHorizontalPodAutoscaling | train | public function setHorizontalPodAutoscaling($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\HorizontalPodAutoscaling::class); | php | {
"resource": ""
} |
q15533 | AddonsConfig.setKubernetesDashboard | train | public function setKubernetesDashboard($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\KubernetesDashboard::class);
| php | {
"resource": ""
} |
q15534 | AddonsConfig.setNetworkPolicyConfig | train | public function setNetworkPolicyConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NetworkPolicyConfig::class);
| php | {
"resource": ""
} |
q15535 | ListTenantsResponse.setTenants | train | public function setTenants($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15536 | Target.setQuery | train | public function setQuery($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target_QueryTarget::class); | php | {
"resource": ""
} |
q15537 | Target.setDocuments | train | public function setDocuments($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target_DocumentsTarget::class);
| php | {
"resource": ""
} |
q15538 | SnapshotTrait.createSnapshot | train | private function createSnapshot(
ConnectionInterface $connection,
ValueMapper $valueMapper,
DocumentReference $reference,
array $options = []
) {
$document = [];
$fields = [];
$exists = true;
try {
| php | {
"resource": ""
} |
q15539 | SnapshotTrait.createSnapshotWithData | train | private function createSnapshotWithData(
ValueMapper $valueMapper,
DocumentReference $reference,
array $document,
$exists = true
) {
$fields = $exists
? $valueMapper->decodeValues($this->pluck('fields', $document))
: [];
| php | {
"resource": ""
} |
q15540 | SnapshotTrait.getSnapshot | train | private function getSnapshot(ConnectionInterface $connection, $name, array $options = [])
{
if (isset($options['readTime'])) {
if (!($options['readTime'] instanceof Timestamp)) {
throw new \InvalidArgumentException(sprintf(
'`$options.readTime` must be an inst... | php | {
"resource": ""
} |
q15541 | SnapshotTrait.getDocumentReference | train | private function getDocumentReference(
ConnectionInterface $connection,
ValueMapper $mapper,
$projectId,
$database,
$name
) {
if ($this->isRelative($name)) {
try {
$name = $this->fullName($projectId, $database, $name);
} catch (... | php | {
"resource": ""
} |
q15542 | SnapshotTrait.getCollectionReference | train | private function getCollectionReference(
ConnectionInterface $connection,
ValueMapper $mapper,
$projectId,
$database,
$name
) {
if ($this->isRelative($name)) {
$name = $this->fullName($projectId, $database, $name);
}
if (!$this->isCollecti... | php | {
"resource": ""
} |
q15543 | SnapshotTrait.transformSnapshotTimestamps | train | private function transformSnapshotTimestamps(array $data)
{
foreach (['createTime', 'updateTime', 'readTime'] as $timestampField) {
if (!isset($data[$timestampField])) {
continue;
}
| php | {
"resource": ""
} |
q15544 | ResultSet.setMetadata | train | public function setMetadata($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Spanner\V1\ResultSetMetadata::class);
| php | {
"resource": ""
} |
q15545 | UpdateInstanceMetadata.setInstance | train | public function setInstance($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Spanner\Admin\Instance\V1\Instance::class);
| php | {
"resource": ""
} |
q15546 | UpdateLogMetricRequest.setMetric | train | public function setMetric($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q15547 | ListApplicationsResponse.setApplications | train | public function setApplications($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15548 | Message.setQuickReplies | train | public function setQuickReplies($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_QuickReplies::class);
| php | {
"resource": ""
} |
q15549 | Message.setCard | train | public function setCard($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_Card::class); | php | {
"resource": ""
} |
q15550 | Message.setSimpleResponses | train | public function setSimpleResponses($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_SimpleResponses::class); | php | {
"resource": ""
} |
q15551 | Message.setBasicCard | train | public function setBasicCard($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_BasicCard::class);
| php | {
"resource": ""
} |
q15552 | Message.setSuggestions | train | public function setSuggestions($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_Suggestions::class);
| php | {
"resource": ""
} |
q15553 | Message.setLinkOutSuggestion | train | public function setLinkOutSuggestion($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_LinkOutSuggestion::class); | php | {
"resource": ""
} |
q15554 | Message.setListSelect | train | public function setListSelect($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_ListSelect::class);
| php | {
"resource": ""
} |
q15555 | Message.setCarouselSelect | train | public function setCarouselSelect($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_CarouselSelect::class); | php | {
"resource": ""
} |
q15556 | Message.setPlatform | train | public function setPlatform($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent_Message_Platform::class);
| php | {
"resource": ""
} |
q15557 | ExportDocumentsMetadata.setOperationState | train | public function setOperationState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); | php | {
"resource": ""
} |
q15558 | ExportDocumentsMetadata.setProgressDocuments | train | public function setProgressDocuments($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class);
| php | {
"resource": ""
} |
q15559 | ExportDocumentsMetadata.setProgressBytes | train | public function setProgressBytes($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q15560 | ExportDocumentsMetadata.setCollectionIds | train | public function setCollectionIds($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
| php | {
"resource": ""
} |
q15561 | Database.reload | train | public function reload(array $options = [])
{
return $this->info = $this->connection->getDatabase([
| php | {
"resource": ""
} |
q15562 | Database.create | train | public function create(array $options = [])
{
$options += [
'statements' => [],
];
$databaseId = DatabaseAdminClient::parseName($this->name())['database'];
$statement = sprintf('CREATE DATABASE `%s`', $databaseId);
$operation = $this->connection->createDatabase(... | php | {
"resource": ""
} |
q15563 | Database.updateDdlBatch | train | public function updateDdlBatch(array $statements, array $options = [])
{
$operation = $this->connection->updateDatabaseDdl($options + [ | php | {
"resource": ""
} |
q15564 | Database.drop | train | public function drop(array $options = [])
{
$this->connection->dropDatabase($options + [
'name' => $this->name
]);
if ($this->sessionPool) {
$this->sessionPool->clear();
}
| php | {
"resource": ""
} |
q15565 | Database.ddl | train | public function ddl(array $options = [])
{
$ddl = $this->connection->getDatabaseDDL($options + [
| php | {
"resource": ""
} |
q15566 | Database.iam | train | public function iam()
{
if (!$this->iam) {
$this->iam = new Iam(
| php | {
"resource": ""
} |
q15567 | Database.snapshot | train | public function snapshot(array $options = [])
{
if ($this->isRunningTransaction) {
throw new \BadMethodCallException('Nested transactions are not supported by this client.');
}
$options += [
'singleUse' => false
];
$options['transactionOptions'] = $t... | php | {
"resource": ""
} |
q15568 | Database.insertBatch | train | public function insertBatch($table, array $dataSet, array $options = [])
{
$mutations = [];
foreach ($dataSet as $data) {
$mutations[] = $this->operation->mutation(Operation::OP_INSERT, | php | {
"resource": ""
} |
q15569 | Database.updateBatch | train | public function updateBatch($table, array $dataSet, array $options = [])
{
$mutations = [];
foreach ($dataSet as $data) {
$mutations[] = $this->operation->mutation(Operation::OP_UPDATE, | php | {
"resource": ""
} |
q15570 | Database.insertOrUpdateBatch | train | public function insertOrUpdateBatch($table, array $dataSet, array $options = [])
{
$mutations = [];
foreach ($dataSet as $data) {
$mutations[] = $this->operation->mutation(Operation::OP_INSERT_OR_UPDATE, | php | {
"resource": ""
} |
q15571 | Database.replaceBatch | train | public function replaceBatch($table, array $dataSet, array $options = [])
{
$mutations = [];
foreach ($dataSet as $data) {
$mutations[] = $this->operation->mutation(Operation::OP_REPLACE, | php | {
"resource": ""
} |
q15572 | Database.delete | train | public function delete($table, KeySet $keySet, array $options = [])
{
$mutations = [$this->operation->deleteMutation($table, $keySet)];
| php | {
"resource": ""
} |
q15573 | Database.executePartitionedUpdate | train | public function executePartitionedUpdate($statement, array $options = [])
{
$session = $this->selectSession(SessionPoolInterface::CONTEXT_READWRITE);
$transaction = $this->operation->transaction($session, [
'transactionOptions' => [
'partitionedDml' => []
]
... | php | {
"resource": ""
} |
q15574 | Database.close | train | public function close()
{
if ($this->session) {
if ($this->sessionPool) {
$this->sessionPool->release($this->session);
| php | {
"resource": ""
} |
q15575 | Database.identity | train | public function identity()
{
$databaseParts = explode('/', $this->name);
$instanceParts = explode('/', $this->instance->name());
return [
'projectId' => $this->projectId,
| php | {
"resource": ""
} |
q15576 | Database.selectSession | train | private function selectSession($context = SessionPoolInterface::CONTEXT_READ, array $options = [])
{
if ($this->session) {
return $this->session;
}
if ($this->sessionPool) {
return $this->session = | php | {
"resource": ""
} |
q15577 | Database.commitInSingleUseTransaction | train | private function commitInSingleUseTransaction(array $mutations, array $options = [])
{
$options['mutations'] = $mutations;
return $this->runTransaction(function (Transaction $t) use ($options) {
| php | {
"resource": ""
} |
q15578 | Database.fullyQualifiedDatabaseName | train | private function fullyQualifiedDatabaseName($name)
{
$instance = InstanceAdminClient::parseName($this->instance->name())['instance'];
try {
return GapicSpannerClient::databaseName(
| php | {
"resource": ""
} |
q15579 | StreamReader.read | train | public function read($path)
{
$url = self::BASE_URL.$path;
return | php | {
"resource": ""
} |
q15580 | MetadataProviderUtils.autoSelect | train | public static function autoSelect($server)
{
if (isset($server['GAE_SERVICE'])) {
if (isset($server['GAE_ENV']) && $server['GAE_ENV'] === 'standard') {
return new GAEStandardMetadataProvider($server);
}
| php | {
"resource": ""
} |
q15581 | TransferMessage.setSeverity | train | public function setSeverity($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Bi | php | {
"resource": ""
} |
q15582 | KMapEstimationConfig.setAuxiliaryTables | train | public function setAuxiliaryTables($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15583 | NodeManagement.setUpgradeOptions | train | public function setUpgradeOptions($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q15584 | ObjectPageIterator.updatePrefixes | train | private function updatePrefixes()
{
foreach ($this->page['prefixes'] as $prefix) {
if (!in_array($prefix, $this->prefixes)) {
| php | {
"resource": ""
} |
q15585 | Job.setPlacement | train | public function setPlacement($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q15586 | Job.setHiveJob | train | public function setHiveJob($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\HiveJob::class);
| php | {
"resource": ""
} |
q15587 | Job.setPigJob | train | public function setPigJob($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\PigJob::class);
| php | {
"resource": ""
} |
q15588 | Job.setScheduling | train | public function setScheduling($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q15589 | VideoAnnotationResults.setSegmentLabelAnnotations | train | public function setSegmentLabelAnnotations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15590 | VideoAnnotationResults.setShotLabelAnnotations | train | public function setShotLabelAnnotations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15591 | ResumableStream.readAll | train | public function readAll()
{
$tries = 0;
$argumentFunction = $this->argumentFunction;
$retryFunction = $this->retryFunction;
do {
$ex = null;
$stream = $this->createExponentialBackoff()->execute($this->apiFunction, $argumentFunction());
try {
... | php | {
"resource": ""
} |
q15592 | VideoContext.setSegments | train | public function setSegments($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q15593 | VideoContext.setLabelDetectionConfig | train | public function setLabelDetectionConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1beta2\LabelDetectionConfig::class);
| php | {
"resource": ""
} |
q15594 | VideoContext.setFaceDetectionConfig | train | public function setFaceDetectionConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1beta2\FaceDetectionConfig::class);
| php | {
"resource": ""
} |
q15595 | Grpc.listDebuggees | train | public function listDebuggees(array $args = [])
{
return $this->send([$this->debuggerClient, 'listDebuggees'], [
$this->pluck('project', $args),
| php | {
"resource": ""
} |
q15596 | Grpc.registerDebuggee | train | public function registerDebuggee(array $args = [])
{
return $this->send([$this->controllerClient, 'registerDebuggee'], [
$this->serializer->decodeMessage(
new Debuggee(),
| php | {
"resource": ""
} |
q15597 | Grpc.listBreakpoints | train | public function listBreakpoints(array $args = [])
{
return $this->send([$this->controllerClient, 'listActiveBreakpoints'], [
| php | {
"resource": ""
} |
q15598 | Grpc.updateBreakpoint | train | public function updateBreakpoint(array $args)
{
return $this->send([$this->controllerClient, 'updateActiveBreakpoint'], [
$this->pluck('debuggeeId', | php | {
"resource": ""
} |
q15599 | Grpc.setBreakpoint | train | public function setBreakpoint(array $args)
{
$breakpointArgs = $this->pluckArray([
'action',
'condition',
'expressions',
'logMessageFormat',
'logLevel',
'location'
], $args);
return $this->send([$this->debuggerClient, 's... | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.