_id
stringlengths
2
7
title
stringlengths
3
151
partition
stringclasses
3 values
text
stringlengths
33
8k
language
stringclasses
1 value
meta_information
dict
q15600
ListEventsResponse.setErrorEvents
train
public function setErrorEvents($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15601
InspectionRuleSet.setRules
train
public function setRules($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15602
PersonStructuredName.setSuffixes
train
public function setSuffixes($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
php
{ "resource": "" }
q15603
PersonStructuredName.setPrefixes
train
public function setPrefixes($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
php
{ "resource": "" }
q15604
UpdateInstanceRequest.setInstance
train
public function setInstance($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15605
FirestoreGapicClient.anyPathName
train
public static function anyPathName($project, $database, $document, $anyPath) { return self::getAnyPathNameTemplate()->render([ 'project' => $project,
php
{ "resource": "" }
q15606
FirestoreGapicClient.documentPathName
train
public static function documentPathName($project, $database, $documentPath) { return self::getDocumentPathNameTemplate()->render([ 'project' => $project,
php
{ "resource": "" }
q15607
FirestoreGapicClient.commit
train
public function commit($database, $writes, array $optionalArgs = []) { $request = new CommitRequest(); $request->setDatabase($database); $request->setWrites($writes); if (isset($optionalArgs['transaction'])) { $request->setTransaction($optionalArgs['transaction']); } $requestParams = new RequestParamsHeaderDescriptor([ 'database' => $request->getDatabase(),
php
{ "resource": "" }
q15608
SimpleJobTrait.setSimpleJobProperties
train
private function setSimpleJobProperties(array $options = []) { if (!isset($options['identifier'])) { throw new \InvalidArgumentException( 'A valid identifier is required in order to register a job.' ); } $options += [ 'configStorage' => null, ]; $this->setSerializableClientOptions($options); $identifier = $options['identifier']; $configStorage = $options['configStorage'] ?: $this->defaultConfigStorage(); $result = $configStorage->lock(); if ($result === false) { return false; } $config = $configStorage->load();
php
{ "resource": "" }
q15609
LoggingClient.psrBatchLogger
train
public static function psrBatchLogger($name, array $options = []) { $client = array_key_exists('clientConfig', $options) ? new self($options['clientConfig']) : new self(); //
php
{ "resource": "" }
q15610
LoggingClient.createSink
train
public function createSink($name, $destination, array $options = []) { $response = $this->connection->createSink($options + [ 'parent' => $this->formattedProjectName, 'name' => $name, 'destination' => $destination,
php
{ "resource": "" }
q15611
LoggingClient.sinks
train
public function sinks(array $options = []) { $resultLimit = $this->pluck('resultLimit', $options, false); return new ItemIterator( new PageIterator( function (array $sink) { return new Sink($this->connection, $sink['name'], $this->projectId, $sink); },
php
{ "resource": "" }
q15612
LoggingClient.createMetric
train
public function createMetric($name, $filter, array $options = []) { $response = $this->connection->createMetric($options + [ 'parent' => $this->formattedProjectName, 'name' => $name,
php
{ "resource": "" }
q15613
LoggingClient.metrics
train
public function metrics(array $options = []) { $resultLimit = $this->pluck('resultLimit', $options, false); return new ItemIterator( new PageIterator( function (array $metric) { return new Metric($this->connection, $metric['name'], $this->projectId, $metric); },
php
{ "resource": "" }
q15614
LoggingClient.entries
train
public function entries(array $options = []) { $resultLimit = $this->pluck('resultLimit', $options, false); $resourceNames = ['projects/' . $this->projectId]; if (isset($options['projectIds'])) { foreach ($options['projectIds'] as $projectId) { $resourceNames[] = 'projects/' . $projectId; } unset($options['projectIds']); } if (isset($options['resourceNames'])) { $options['resourceNames'] = array_merge($resourceNames, $options['projectIds']); } else { $options['resourceNames'] = $resourceNames; } return new ItemIterator(
php
{ "resource": "" }
q15615
LoggingClient.psrLogger
train
public function psrLogger($name, array $options = []) { $messageKey = null; if (isset($options['messageKey'])) { $messageKey = $options['messageKey']; unset($options['messageKey']); } $psrLoggerOptions = $this->pluckArray([ 'metadataProvider', 'batchEnabled', 'debugOutput', 'batchOptions', 'clientConfig', 'batchRunner',
php
{ "resource": "" }
q15616
LoggingClient.logger
train
public function logger($name, array $options = []) { return new Logger( $this->connection, $name, $this->projectId,
php
{ "resource": "" }
q15617
ListSourcesResponse.setSources
train
public function setSources($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15618
ClusterSelector.setClusterLabels
train
public function setClusterLabels($var) { $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING,
php
{ "resource": "" }
q15619
Bucket.upload
train
public function upload($data, array $options = []) { if ($this->isObjectNameRequired($data) && !isset($options['name'])) { throw new \InvalidArgumentException('A name is required when data is of type string or null.'); } $encryptionKey = isset($options['encryptionKey']) ? $options['encryptionKey'] : null; $encryptionKeySHA256 = isset($options['encryptionKeySHA256']) ? $options['encryptionKeySHA256'] : null; $response = $this->connection->insertObject( $this->formatEncryptionHeaders($options) + $this->identity + [ 'data' => $data ]
php
{ "resource": "" }
q15620
Bucket.getResumableUploader
train
public function getResumableUploader($data, array $options = []) { if ($this->isObjectNameRequired($data) && !isset($options['name'])) { throw new \InvalidArgumentException('A name is required when data is of type string or null.'); } return $this->connection->insertObject(
php
{ "resource": "" }
q15621
Bucket.getStreamableUploader
train
public function getStreamableUploader($data, array $options = []) { if ($this->isObjectNameRequired($data) && !isset($options['name'])) { throw new \InvalidArgumentException('A name is required when data is of type string or null.'); } return $this->connection->insertObject(
php
{ "resource": "" }
q15622
Bucket.objects
train
public function objects(array $options = []) { $resultLimit = $this->pluck('resultLimit', $options, false); return new ObjectIterator( new ObjectPageIterator( function (array $object) { return new StorageObject( $this->connection, $object['name'], $this->identity['bucket'], isset($object['generation']) ? $object['generation'] : null,
php
{ "resource": "" }
q15623
Bucket.createNotification
train
public function createNotification($topic, array $options = []) { $res = $this->connection->insertNotification($options + $this->identity + [ 'topic' => $this->getFormattedTopic($topic),
php
{ "resource": "" }
q15624
Bucket.notifications
train
public function notifications(array $options = []) { $resultLimit = $this->pluck('resultLimit', $options, false); return new ItemIterator( new PageIterator( function (array $notification) { return new Notification( $this->connection, $notification['id'], $this->identity['bucket'],
php
{ "resource": "" }
q15625
Bucket.update
train
public function update(array $options = []) { if (isset($options['lifecycle']) && $options['lifecycle'] instanceof Lifecycle) { $options['lifecycle'] = $options['lifecycle']->toArray();
php
{ "resource": "" }
q15626
Bucket.compose
train
public function compose(array $sourceObjects, $name, array $options = []) { if (count($sourceObjects) < 2) { throw new \InvalidArgumentException('Must provide at least two objects to compose.'); } $options += [ 'destinationBucket' => $this->name(), 'destinationObject' => $name, 'destinationPredefinedAcl' => isset($options['predefinedAcl']) ? $options['predefinedAcl'] : null, 'destination' => isset($options['metadata']) ? $options['metadata'] : null, 'userProject' => $this->identity['userProject'], 'sourceObjects' => array_map(function ($sourceObject) { $name = null; $generation = null; if ($sourceObject instanceof StorageObject) { $name = $sourceObject->name(); $generation = isset($sourceObject->identity()['generation']) ? $sourceObject->identity()['generation'] : null; } return array_filter([ 'name' => $name ?: $sourceObject,
php
{ "resource": "" }
q15627
Bucket.reload
train
public function reload(array $options = []) { return $this->info =
php
{ "resource": "" }
q15628
Bucket.iam
train
public function iam() { if (!$this->iam) { $this->iam = new Iam( new IamBucket($this->connection),
php
{ "resource": "" }
q15629
Bucket.lockRetentionPolicy
train
public function lockRetentionPolicy(array $options = []) { if (!isset($options['ifMetagenerationMatch'])) { if (!isset($this->info['metageneration'])) { throw new \BadMethodCallException( 'No metageneration value was detected. Please either provide ' . 'a value explicitly or ensure metadata is loaded through a ' . 'call such as Bucket::reload().'
php
{ "resource": "" }
q15630
Bucket.signedUrl
train
public function signedUrl($expires, array $options = []) { // May be overridden for testing. $signingHelper = $this->pluck('helper', $options, false) ?: SigningHelper::getHelper(); $resource = sprintf( '/%s',
php
{ "resource": "" }
q15631
Bucket.getFormattedTopic
train
private function getFormattedTopic($topic) { if ($topic instanceof Topic) { return sprintf(self::NOTIFICATION_TEMPLATE, $topic->name()); } if (!is_string($topic)) { throw new \InvalidArgumentException( '$topic may only be a string or instance of Google\Cloud\PubSub\Topic' ); } if (preg_match('/projects\/[^\/]*\/topics\/(.*)/', $topic) === 1) { return sprintf(self::NOTIFICATION_TEMPLATE, $topic); } if (!$this->projectId) { throw
php
{ "resource": "" }
q15632
Trigger.setSchedule
train
public function setSchedule($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\Schedule::class);
php
{ "resource": "" }
q15633
DocumentTransform.setFieldTransforms
train
public function setFieldTransforms($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15634
PredictResponse.setPayload
train
public function setPayload($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15635
ListTimeSeriesRequest.setInterval
train
public function setInterval($var) { GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeInterval::class);
php
{ "resource": "" }
q15636
ListTimeSeriesRequest.setAggregation
train
public function setAggregation($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15637
ListTimeSeriesRequest.setView
train
public function setView($var) { GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\ListTimeSeriesRequ
php
{ "resource": "" }
q15638
FaceFrame.setNormalizedBoundingBoxes
train
public function setNormalizedBoundingBoxes($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15639
AuditLog.setAuthenticationInfo
train
public function setAuthenticationInfo($var) { GPBUtil::checkMessage($var, \Google\Cloud\Audit\AuthenticationInfo::class);
php
{ "resource": "" }
q15640
AuditLog.setRequestMetadata
train
public function setRequestMetadata($var) { GPBUtil::checkMessage($var, \Google\Cloud\Audit\RequestMetadata::class);
php
{ "resource": "" }
q15641
NodePool.setConfig
train
public function setConfig($var) { GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NodeConfig::class);
php
{ "resource": "" }
q15642
NodePool.setAutoscaling
train
public function setAutoscaling($var) { GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NodePoolAutoscaling::class);
php
{ "resource": "" }
q15643
NodePool.setManagement
train
public function setManagement($var) { GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NodeManagement::class);
php
{ "resource": "" }
q15644
ListUptimeCheckConfigsResponse.setUptimeCheckConfigs
train
public function setUptimeCheckConfigs($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15645
LocationMetadata.setAvailableZones
train
public function setAvailableZones($var) { $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING,
php
{ "resource": "" }
q15646
StructType.add
train
public function add($name, $type) { $invalidIntTypes = [ Database::TYPE_STRUCT, Database::TYPE_ARRAY ]; if (is_int($type) && in_array($type, $invalidIntTypes)) { throw new \InvalidArgumentException( '`Database::TYPE_ARRAY` and `Database::TYPE_STRUCT` are not valid as struct types. ' . 'Instead provide `Google\Cloud\Spanner\ArrayType` or `Google\Cloud\Spanner\StructType`.'
php
{ "resource": "" }
q15647
CreateAppProfileRequest.setAppProfile
train
public function setAppProfile($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15648
UpdateExclusionRequest.setExclusion
train
public function setExclusion($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15649
TraceServiceGapicClient.spanName
train
public static function spanName($project, $trace, $span) { return self::getSpanNameTemplate()->render([ 'project' => $project,
php
{ "resource": "" }
q15650
ConcurrencyControlTrait.applyEtagHeader
train
private function applyEtagHeader(array $options, $argName = 'etag') { if (isset($options[$argName])) { if (!isset($options['restOptions'])) { $options['restOptions'] = []; } if (!isset($options['restOptions']['headers'])) {
php
{ "resource": "" }
q15651
SetNetworkPolicyRequest.setNetworkPolicy
train
public function setNetworkPolicy($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15652
Finding.setLocation
train
public function setLocation($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\Location::class);
php
{ "resource": "" }
q15653
CreateSessionEntityTypeRequest.setSessionEntityType
train
public function setSessionEntityType($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SessionEntityType::class);
php
{ "resource": "" }
q15654
CreateSinkRequest.setSink
train
public function setSink($var) { GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogSink::class);
php
{ "resource": "" }
q15655
ExplicitContentAnnotation.setFrames
train
public function setFrames($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15656
Query.setProjection
train
public function setProjection($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15657
ServerConfig.setValidNodeVersions
train
public function setValidNodeVersions($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
php
{ "resource": "" }
q15658
ServerConfig.setValidImageTypes
train
public function setValidImageTypes($var) { $arr = GPBUtil::checkRepeatedField($var,
php
{ "resource": "" }
q15659
ServerConfig.setValidMasterVersions
train
public function setValidMasterVersions($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
php
{ "resource": "" }
q15660
StructuredQuery.setFrom
train
public function setFrom($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15661
StructuredQuery.setStartAt
train
public function setStartAt($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15662
Device.setConfig
train
public function setConfig($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15663
Device.setGatewayConfig
train
public function setGatewayConfig($var) { GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\GatewayConfig::class);
php
{ "resource": "" }
q15664
ListActiveBreakpointsResponse.setBreakpoints
train
public function setBreakpoints($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15665
Span.info
train
public function info() { $data = [ 'displayName' => [ 'value' => $this->name ], 'spanId' => $this->spanId, 'startTime' => $this->startTime, 'endTime' => $this->endTime ]; if ($this->parentSpanId) { $data['parentSpanId'] = $this->parentSpanId; } if ($this->attributes) { $data['attributes'] = $this->attributes->info(); } if ($this->timeEvents) { $data['timeEvents'] = [ 'timeEvent' => array_map(function ($timeEvent) { return $timeEvent->info(); }, $this->timeEvents) ]; } if ($this->links) { $data['links'] = [ 'link' => array_map(function ($link) {
php
{ "resource": "" }
q15666
Span.addTimeEvent
train
public function addTimeEvent(TimeEvent $event) { if (!$this->timeEvents) {
php
{ "resource": "" }
q15667
Span.addLink
train
public function addLink(Link $link) { if (!$this->links) { $this->links = [];
php
{ "resource": "" }
q15668
Operation.keys
train
public function keys($kind, array $options = []) { $options += [ 'number' => 1, 'ancestors' => [], 'id' => null, 'name' => null ]; if ($options['number'] < 1) { throw new \InvalidArgumentException('Number of keys cannot be less than 1.'); } $path = []; if (count($options['ancestors']) > 0) { $path = $options['ancestors']; } $path[] = array_filter([ 'kind' => $kind,
php
{ "resource": "" }
q15669
Operation.entity
train
public function entity($key = null, array $entity = [], array $options = []) { $options += [ 'className' => null ]; if ($key && !is_string($key) && !($key instanceof Key)) { throw new \InvalidArgumentException( '$key must be an instance of Key or a string' ); } if (is_string($key)) { $key = $this->key($key); } $className = $options['className']; if (!is_null($className) && !is_subclass_of($className, EntityInterface::class)) { throw new \InvalidArgumentException(sprintf(
php
{ "resource": "" }
q15670
Operation.beginTransaction
train
public function beginTransaction($transactionOptions, array $options = []) { $res = $this->connection->beginTransaction([ 'projectId' => $this->projectId,
php
{ "resource": "" }
q15671
Operation.allocateIds
train
public function allocateIds(array $keys, array $options = []) { // Validate the given keys. First check types, then state of each. // The API will throw a 400 if the key is named, but it's an easy // check we can handle before going to the API to save a request. // @todo replace with json schema $this->validateBatch($keys, Key::class, function ($key) { if ($key->state() !== Key::STATE_INCOMPLETE) { throw new \InvalidArgumentException(sprintf( 'Given $key is in an invalid state. Can only allocate IDs for incomplete keys. ' . 'Given path was %s', (string) $key )); } }); $serviceKeys = []; foreach ($keys as $key) { $serviceKeys[] = $key->keyObject(); }
php
{ "resource": "" }
q15672
Operation.lookup
train
public function lookup(array $keys, array $options = []) { $options += [ 'className' => Entity::class, 'sort' => false ]; $serviceKeys = []; $this->validateBatch($keys, Key::class, function ($key) use (&$serviceKeys) { if ($key->state() !== Key::STATE_NAMED) { throw new \InvalidArgumentException(sprintf( 'Given $key is in an invalid state. Can only lookup records when given a complete key. ' . 'Given path was %s', (string) $key )); } $serviceKeys[] = $key->keyObject(); }); $res = $this->connection->lookup($options + $this->readOptions($options) + [ 'projectId' => $this->projectId, 'keys' => $serviceKeys ]); $result = []; if (isset($res['found'])) { foreach ($res['found'] as $found) { $result['found'][] = $this->mapEntityResult($found, $options['className']); } if ($options['sort']) { $result['found'] = $this->sortEntities($result['found'], $keys);
php
{ "resource": "" }
q15673
Operation.runQuery
train
public function runQuery(QueryInterface $query, array $options = []) { $options += [ 'className' => Entity::class, 'namespaceId' => $this->namespaceId ]; $iteratorConfig = [ 'itemsKey' => 'batch.entityResults', 'resultTokenKey' => 'query.startCursor', 'nextResultTokenKey' => 'batch.endCursor', 'setNextResultTokenCondition' => function ($res) use ($query) { if (isset($res['batch']['moreResults'])) { $moreResultsType = $res['batch']['moreResults']; // Transform gRPC enum to string if (is_numeric($moreResultsType)) { $moreResultsType = MoreResultsType::name($moreResultsType); } return $query->canPaginate() && $moreResultsType === 'NOT_FINISHED'; } return false; } ]; $runQueryObj = clone $query; $runQueryFn = function (array $args = []) use (&$runQueryObj, $options) {
php
{ "resource": "" }
q15674
Operation.commit
train
public function commit(array $mutations, array $options = []) { $options += [ 'transaction' => null ]; $res = $this->connection->commit($options + [ 'mode' => ($options['transaction']) ?
php
{ "resource": "" }
q15675
Operation.allocateIdsToEntities
train
public function allocateIdsToEntities(array $entities) { $this->validateBatch($entities, EntityInterface::class); $incompleteKeys = []; foreach ($entities as $entity) { if ($entity->key()->state() === Key::STATE_INCOMPLETE) { $incompleteKeys[] =
php
{ "resource": "" }
q15676
Operation.mutation
train
public function mutation( $operation, $input, $type, $baseVersion = null ) { // If the given element is an EntityInterface, it will use that baseVersion. if ($input instanceof EntityInterface) { $baseVersion = $input->baseVersion(); $data = $this->entityMapper->objectToRequest($input); if (!$input->key()) { throw new \InvalidArgumentException('Base entities must provide a datastore key.'); } } elseif ($input instanceof Key) {
php
{ "resource": "" }
q15677
Operation.checkOverwrite
train
public function checkOverwrite(array $entities, $allowOverwrite = false) { $this->validateBatch($entities, EntityInterface::class); foreach ($entities as $entity) { if (!$entity->populatedByService() && !$allowOverwrite) { throw new \InvalidArgumentException(sprintf( 'Given entity cannot be saved because it may overwrite an '. 'existing record. When updating manually created entities, '.
php
{ "resource": "" }
q15678
Operation.mapEntityResult
train
private function mapEntityResult(array $result, $class) { $entity = $result['entity']; $namespaceId = (isset($entity['key']['partitionId']['namespaceId'])) ? $entity['key']['partitionId']['namespaceId'] : null; $key = new Key($this->projectId, [ 'path' => $entity['key']['path'], 'namespaceId' => $namespaceId ]); if (is_array($class)) { $lastPathElement = $key->pathEnd(); if (!array_key_exists($lastPathElement['kind'], $class)) { throw new \InvalidArgumentException(sprintf( 'No class found for kind %s', $lastPathElement['kind'] )); } $className = $class[$lastPathElement['kind']]; } else { $className = $class; } $properties = []; $excludes = []; $meanings = []; if (isset($entity['properties'])) {
php
{ "resource": "" }
q15679
Operation.readOptions
train
private function readOptions(array $options = []) { $options += [ 'readConsistency' => null, 'transaction' => null ];
php
{ "resource": "" }
q15680
CreateInstanceRequest.setInstance
train
public function setInstance($var) { GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Instance::class);
php
{ "resource": "" }
q15681
Task.setLastAttempt
train
public function setLastAttempt($var) { GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\Attempt::class);
php
{ "resource": "" }
q15682
RedactImageResponse.setInspectResult
train
public function setInspectResult($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\InspectResult::class);
php
{ "resource": "" }
q15683
Dataset.setTranslationDatasetMetadata
train
public function setTranslationDatasetMetadata($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15684
Dataset.setImageClassificationDatasetMetadata
train
public function setImageClassificationDatasetMetadata($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15685
Dataset.setTextClassificationDatasetMetadata
train
public function setTextClassificationDatasetMetadata($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15686
Job.setSparkSqlJob
train
public function setSparkSqlJob($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15687
Job.setStatusHistory
train
public function setStatusHistory($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15688
Bootstrap.init
train
public static function init(PsrLogger $psrLogger = null) { self::$psrLogger = $psrLogger ?: (new LoggingClient()) ->psrLogger(self::DEFAULT_LOGNAME, [ 'batchEnabled' => true, 'debugOutput' => true, 'batchOptions' => [ 'numWorkers' => 2 ]
php
{ "resource": "" }
q15689
Bootstrap.getErrorPrefix
train
public static function getErrorPrefix($level) { switch ($level) { case E_PARSE: $prefix = 'PHP Parse error'; break; case E_ERROR: case E_CORE_ERROR: case E_COMPILE_ERROR: $prefix = 'PHP Fatal error'; break; case E_USER_ERROR: case E_RECOVERABLE_ERROR:
php
{ "resource": "" }
q15690
Bootstrap.getErrorLevelString
train
public static function getErrorLevelString($level) { switch ($level) { case E_PARSE: return 'CRITICAL'; case E_ERROR: case E_CORE_ERROR: case E_COMPILE_ERROR: case E_USER_ERROR: case E_RECOVERABLE_ERROR: return 'ERROR'; case E_WARNING: case E_CORE_WARNING: case E_COMPILE_WARNING: case
php
{ "resource": "" }
q15691
Bootstrap.shutdownHandler
train
public static function shutdownHandler() { if ($err = error_get_last()) { switch ($err['type']) { case E_ERROR: case E_PARSE: case E_COMPILE_ERROR: case E_CORE_ERROR: $service = self::$psrLogger ->getMetadataProvider() ->serviceId(); $version = self::$psrLogger ->getMetadataProvider() ->versionId(); $message = sprintf( '%s: %s in %s on line %d', self::getErrorPrefix($err['type']), $err['message'], $err['file'], $err['line'] ); $context = [ 'context' => [ 'reportLocation' => [ 'filePath' => $err['file'], 'lineNumber' => $err['line'], 'functionName' =>
php
{ "resource": "" }
q15692
ClientEvent.setJobEvent
train
public function setJobEvent($var) { GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\JobEvent::class);
php
{ "resource": "" }
q15693
ClientEvent.setProfileEvent
train
public function setProfileEvent($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15694
OrderedJob.setPysparkJob
train
public function setPysparkJob($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15695
OrderedJob.setPrerequisiteStepIds
train
public function setPrerequisiteStepIds($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
php
{ "resource": "" }
q15696
MaintenanceWindow.setDailyMaintenanceWindow
train
public function setDailyMaintenanceWindow($var) { GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\DailyMaintenanceWindow::class);
php
{ "resource": "" }
q15697
GatewayConfig.setGatewayType
train
public function setGatewayType($var) { GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\GatewayType::class);
php
{ "resource": "" }
q15698
ListSinksResponse.setSinks
train
public function setSinks($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15699
ImportProductSetsInputConfig.setGcsSource
train
public function setGcsSource($var) { GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImportProductSetsGcsSource::class);
php
{ "resource": "" }