idx int64 0 241k | question stringlengths 64 6.21k | target stringlengths 5 803 |
|---|---|---|
2,200 | 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/' . ... | Fetches log entries . |
2,201 | public function psrLogger ( $ name , array $ options = [ ] ) { $ messageKey = null ; if ( isset ( $ options [ 'messageKey' ] ) ) { $ messageKey = $ options [ 'messageKey' ] ; unset ( $ options [ 'messageKey' ] ) ; } $ psrLoggerOptions = $ this -> pluckArray ( [ 'metadataProvider' , 'batchEnabled' , 'debugOutput' , 'bat... | Fetches a logger which will write log entries to Stackdriver Logging and implements the PSR - 3 specification . |
2,202 | public function logger ( $ name , array $ options = [ ] ) { return new Logger ( $ this -> connection , $ name , $ this -> projectId , isset ( $ options [ 'resource' ] ) ? $ options [ 'resource' ] : null , isset ( $ options [ 'labels' ] ) ? $ options [ 'labels' ] : null ) ; } | Fetches a logger which will write log entries to Stackdriver Logging . |
2,203 | public function setSources ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ SecurityCenter \ V1 \ Source :: class ) ; $ this -> sources = $ arr ; return $ this ; } | Sources belonging to the requested parent . |
2,204 | public function setClusterLabels ( $ var ) { $ arr = GPBUtil :: checkMapField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> cluster_labels = $ arr ; return $ this ; } | Required . The cluster labels . Cluster must have all labels to match . |
2,205 | 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 ... | Upload your data in a simple fashion . Uploads will default to being resumable if the file size is greater than 5mb . |
2,206 | 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 ( $ this -> ... | Get a resumable uploader which can provide greater control over the upload process . This is recommended when dealing with large files where reliability is key . |
2,207 | 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 ( $ this ->... | Get a streamable uploader which can provide greater control over the upload process . This is useful for generating large files and uploading the contents in chunks . |
2,208 | 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 (... | Fetches all objects in the bucket . |
2,209 | public function createNotification ( $ topic , array $ options = [ ] ) { $ res = $ this -> connection -> insertNotification ( $ options + $ this -> identity + [ 'topic' => $ this -> getFormattedTopic ( $ topic ) , 'payload_format' => 'JSON_API_V1' ] ) ; return new Notification ( $ this -> connection , $ res [ 'id' ] , ... | Create a Cloud PubSub notification . |
2,210 | 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' ] , ... | Fetches all notifications associated with this bucket . |
2,211 | public function update ( array $ options = [ ] ) { if ( isset ( $ options [ 'lifecycle' ] ) && $ options [ 'lifecycle' ] instanceof Lifecycle ) { $ options [ 'lifecycle' ] = $ options [ 'lifecycle' ] -> toArray ( ) ; } return $ this -> info = $ this -> connection -> patchBucket ( $ options + $ this -> identity ) ; } | Update the bucket . Upon receiving a result the local bucket s data will be updated . |
2,212 | 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 , 'destination... | Composes a set of objects into a single object . |
2,213 | public function reload ( array $ options = [ ] ) { return $ this -> info = $ this -> connection -> getBucket ( $ options + $ this -> identity ) ; } | Triggers a network request to reload the bucket s details . |
2,214 | public function iam ( ) { if ( ! $ this -> iam ) { $ this -> iam = new Iam ( new IamBucket ( $ this -> connection ) , $ this -> identity [ 'bucket' ] , [ 'parent' => null , 'args' => $ this -> identity ] ) ; } return $ this -> iam ; } | Manage the IAM policy for the current Bucket . |
2,215 | 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... | Locks a provided retention policy on this bucket . Upon receiving a result the local bucket s data will be updated . |
2,216 | public function signedUrl ( $ expires , array $ options = [ ] ) { $ signingHelper = $ this -> pluck ( 'helper' , $ options , false ) ? : SigningHelper :: getHelper ( ) ; $ resource = sprintf ( '/%s' , $ this -> identity [ 'bucket' ] ) ; return $ signingHelper -> sign ( $ this -> connection , $ expires , $ resource , nu... | Create a Signed URL listing objects in this bucket . |
2,217 | 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_mat... | Return a topic name in its fully qualified format . |
2,218 | public function setSchedule ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ Schedule :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; } | Create a job on a repeating basis based on the elapse of time . |
2,219 | public function setFieldTransforms ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Firestore \ V1beta1 \ DocumentTransform \ FieldTransform :: class ) ; $ this -> field_transforms = $ arr ; return $ this ; } | The list of transformations to apply to the fields of the document in order . This must not be empty . |
2,220 | public function setPayload ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ AutoMl \ V1beta1 \ AnnotationPayload :: class ) ; $ this -> payload = $ arr ; return $ this ; } | Prediction result . |
2,221 | public function setInterval ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Monitoring \ V3 \ TimeInterval :: class ) ; $ this -> interval = $ var ; return $ this ; } | The time interval for which results should be returned . Only time series that contain data points in the specified interval are included in the response . |
2,222 | public function setAggregation ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Monitoring \ V3 \ Aggregation :: class ) ; $ this -> aggregation = $ var ; return $ this ; } | By default the raw time series data is returned . Use this field to combine multiple time series for different views of the data . |
2,223 | public function setView ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Monitoring \ V3 \ ListTimeSeriesRequest_TimeSeriesView :: class ) ; $ this -> view = $ var ; return $ this ; } | Specifies which information is returned about the time series . |
2,224 | public function setNormalizedBoundingBoxes ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ VideoIntelligence \ V1 \ NormalizedBoundingBox :: class ) ; $ this -> normalized_bounding_boxes = $ arr ; return $ this ; } | Normalized Bounding boxes in a frame . There can be more than one boxes if the same face is detected in multiple locations within the current frame . |
2,225 | public function setAuthenticationInfo ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Audit \ AuthenticationInfo :: class ) ; $ this -> authentication_info = $ var ; return $ this ; } | Authentication information . |
2,226 | public function setRequestMetadata ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Audit \ RequestMetadata :: class ) ; $ this -> request_metadata = $ var ; return $ this ; } | Metadata about the operation . |
2,227 | public function setConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Container \ V1 \ NodeConfig :: class ) ; $ this -> config = $ var ; return $ this ; } | The node configuration of the pool . |
2,228 | public function setAutoscaling ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Container \ V1 \ NodePoolAutoscaling :: class ) ; $ this -> autoscaling = $ var ; return $ this ; } | Autoscaler configuration for this NodePool . Autoscaler is enabled only if a valid configuration is present . |
2,229 | public function setManagement ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Container \ V1 \ NodeManagement :: class ) ; $ this -> management = $ var ; return $ this ; } | NodeManagement configuration for this NodePool . |
2,230 | public function setUptimeCheckConfigs ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Monitoring \ V3 \ UptimeCheckConfig :: class ) ; $ this -> uptime_check_configs = $ arr ; return $ this ; } | The returned uptime check configurations . |
2,231 | public function setAvailableZones ( $ var ) { $ arr = GPBUtil :: checkMapField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Redis \ V1 \ ZoneMetadata :: class ) ; $ this -> available_zones = $ arr ; return $ this ; } | Output only . The set of available zones in the location . The map is keyed by the lowercase ID of each zone as defined by GCE . These keys can be specified in location_id or alternative_location_id fields when creating a Redis instance . |
2,232 | 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. ' . 'Instea... | Add a struct field definition . |
2,233 | public function setAppProfile ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Bigtable \ Admin \ V2 \ AppProfile :: class ) ; $ this -> app_profile = $ var ; return $ this ; } | The app profile to be created . Fields marked OutputOnly will be ignored . |
2,234 | public function setExclusion ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Logging \ V2 \ LogExclusion :: class ) ; $ this -> exclusion = $ var ; return $ this ; } | Required . New values for the existing exclusion . Only the fields specified in update_mask are relevant . |
2,235 | public static function spanName ( $ project , $ trace , $ span ) { return self :: getSpanNameTemplate ( ) -> render ( [ 'project' => $ project , 'trace' => $ trace , 'span' => $ span , ] ) ; } | Formats a string containing the fully - qualified path to represent a span resource . |
2,236 | private function applyEtagHeader ( array $ options , $ argName = 'etag' ) { if ( isset ( $ options [ $ argName ] ) ) { if ( ! isset ( $ options [ 'restOptions' ] ) ) { $ options [ 'restOptions' ] = [ ] ; } if ( ! isset ( $ options [ 'restOptions' ] [ 'headers' ] ) ) { $ options [ 'restOptions' ] [ 'headers' ] = [ ] ; }... | Apply the If - Match header to requests requiring concurrency control . |
2,237 | public function setNetworkPolicy ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Container \ V1 \ NetworkPolicy :: class ) ; $ this -> network_policy = $ var ; return $ this ; } | Configuration options for the NetworkPolicy feature . |
2,238 | public function setLocation ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ Location :: class ) ; $ this -> location = $ var ; return $ this ; } | Where the content was found . |
2,239 | public function setSessionEntityType ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dialogflow \ V2 \ SessionEntityType :: class ) ; $ this -> session_entity_type = $ var ; return $ this ; } | Required . The session entity type to create . |
2,240 | public function setSink ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Logging \ V2 \ LogSink :: class ) ; $ this -> sink = $ var ; return $ this ; } | Required . The new sink whose name parameter is a sink identifier that is not already in use . |
2,241 | public function setFrames ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ VideoIntelligence \ V1beta2 \ ExplicitContentFrame :: class ) ; $ this -> frames = $ arr ; return $ this ; } | All video frames where explicit content was detected . |
2,242 | public function setProjection ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Datastore \ V1 \ Projection :: class ) ; $ this -> projection = $ arr ; return $ this ; } | The projection to return . Defaults to returning all properties . |
2,243 | public function setValidNodeVersions ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> valid_node_versions = $ arr ; return $ this ; } | List of valid node upgrade target versions . |
2,244 | public function setValidImageTypes ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> valid_image_types = $ arr ; return $ this ; } | List of valid image types . |
2,245 | public function setValidMasterVersions ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> valid_master_versions = $ arr ; return $ this ; } | List of valid master versions . |
2,246 | public function setFrom ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Firestore \ V1 \ StructuredQuery \ CollectionSelector :: class ) ; $ this -> from = $ arr ; return $ this ; } | The collections to query . |
2,247 | public function setStartAt ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Firestore \ V1 \ Cursor :: class ) ; $ this -> start_at = $ var ; return $ this ; } | A starting point for the query results . |
2,248 | public function setConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Iot \ V1 \ DeviceConfig :: class ) ; $ this -> config = $ var ; return $ this ; } | The most recent device configuration which is eventually sent from Cloud IoT Core to the device . If not present on creation the configuration will be initialized with an empty payload and version value of 1 . To update this field after creation use the DeviceManager . ModifyCloudToDeviceConfig method . |
2,249 | public function setGatewayConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Iot \ V1 \ GatewayConfig :: class ) ; $ this -> gateway_config = $ var ; return $ this ; } | Gateway - related configuration and state . |
2,250 | public function setBreakpoints ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Debugger \ V2 \ Breakpoint :: class ) ; $ this -> breakpoints = $ arr ; return $ this ; } | List of all active breakpoints . The fields id and location are guaranteed to be set on each breakpoint . |
2,251 | 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 [ 'att... | Returns the info array for serialization . |
2,252 | public function addTimeEvent ( TimeEvent $ event ) { if ( ! $ this -> timeEvents ) { $ this -> timeEvents = [ ] ; } $ this -> timeEvents [ ] = $ event ; } | Add a single TimeEvent to this span . |
2,253 | public function addLink ( Link $ link ) { if ( ! $ this -> links ) { $ this -> links = [ ] ; } $ this -> links [ ] = $ link ; } | Add a single Link to this span . |
2,254 | 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' ] )... | Create multiple keys with the same configuration . |
2,255 | 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 ) ) { $ ... | Create an entity |
2,256 | public function beginTransaction ( $ transactionOptions , array $ options = [ ] ) { $ res = $ this -> connection -> beginTransaction ( [ 'projectId' => $ this -> projectId , 'transactionOptions' => $ transactionOptions ] + $ options ) ; return $ res [ 'transaction' ] ; } | Begin a Datastore Transaction . |
2,257 | public function allocateIds ( array $ keys , array $ options = [ ] ) { $ 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 ... | Allocate available IDs to a set of keys |
2,258 | 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 \ Invali... | Lookup records by key |
2,259 | public function runQuery ( QueryInterface $ query , array $ options = [ ] ) { $ options += [ 'className' => Entity :: class , 'namespaceId' => $ this -> namespaceId ] ; $ iteratorConfig = [ 'itemsKey' => 'batch.entityResults' , 'resultTokenKey' => 'query.startCursor' , 'nextResultTokenKey' => 'batch.endCursor' , 'setNe... | Run a query and return entities |
2,260 | public function commit ( array $ mutations , array $ options = [ ] ) { $ options += [ 'transaction' => null ] ; $ res = $ this -> connection -> commit ( $ options + [ 'mode' => ( $ options [ 'transaction' ] ) ? 'TRANSACTIONAL' : 'NON_TRANSACTIONAL' , 'mutations' => $ mutations , 'projectId' => $ this -> projectId ] ) ;... | Commit all mutations |
2,261 | public function allocateIdsToEntities ( array $ entities ) { $ this -> validateBatch ( $ entities , EntityInterface :: class ) ; $ incompleteKeys = [ ] ; foreach ( $ entities as $ entity ) { if ( $ entity -> key ( ) -> state ( ) === Key :: STATE_INCOMPLETE ) { $ incompleteKeys [ ] = $ entity -> key ( ) ; } } if ( ! emp... | Patch any incomplete keys in the given array of entities |
2,262 | public function mutation ( $ operation , $ input , $ type , $ baseVersion = null ) { if ( $ input instanceof EntityInterface ) { $ baseVersion = $ input -> baseVersion ( ) ; $ data = $ this -> entityMapper -> objectToRequest ( $ input ) ; if ( ! $ input -> key ( ) ) { throw new \ InvalidArgumentException ( 'Base entiti... | Enqueue a mutation |
2,263 | 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 can... | Check whether an update or upsert operation may proceed safely |
2,264 | 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' ]... | Convert an EntityResult into an array of entities |
2,265 | private function readOptions ( array $ options = [ ] ) { $ options += [ 'readConsistency' => null , 'transaction' => null ] ; $ readOptions = array_filter ( [ 'readConsistency' => $ options [ 'readConsistency' ] , 'transaction' => $ options [ 'transaction' ] ] ) ; return array_filter ( [ 'readOptions' => $ readOptions ... | Format the readOptions |
2,266 | public function setInstance ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Bigtable \ Admin \ V2 \ Instance :: class ) ; $ this -> instance = $ var ; return $ this ; } | The instance to create . Fields marked OutputOnly must be left blank . |
2,267 | public function setLastAttempt ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Tasks \ V2 \ Attempt :: class ) ; $ this -> last_attempt = $ var ; return $ this ; } | Output only . The status of the task s last attempt . |
2,268 | public function setInspectResult ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ InspectResult :: class ) ; $ this -> inspect_result = $ var ; return $ this ; } | The findings . Populated when include_findings in the request is true . |
2,269 | public function setTranslationDatasetMetadata ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ AutoMl \ V1beta1 \ TranslationDatasetMetadata :: class ) ; $ this -> writeOneof ( 23 , $ var ) ; return $ this ; } | Metadata for a dataset used for translation . |
2,270 | public function setImageClassificationDatasetMetadata ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ AutoMl \ V1beta1 \ ImageClassificationDatasetMetadata :: class ) ; $ this -> writeOneof ( 24 , $ var ) ; return $ this ; } | Metadata for a dataset used for image classification . |
2,271 | public function setTextClassificationDatasetMetadata ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ AutoMl \ V1beta1 \ TextClassificationDatasetMetadata :: class ) ; $ this -> writeOneof ( 25 , $ var ) ; return $ this ; } | Metadata for a dataset used for text classification . |
2,272 | public function setSparkSqlJob ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dataproc \ V1beta2 \ SparkSqlJob :: class ) ; $ this -> writeOneof ( 12 , $ var ) ; return $ this ; } | Job is a SparkSql job . |
2,273 | public function setStatusHistory ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dataproc \ V1beta2 \ JobStatus :: class ) ; $ this -> status_history = $ arr ; return $ this ; } | Output only . The previous job status . |
2,274 | public static function init ( PsrLogger $ psrLogger = null ) { self :: $ psrLogger = $ psrLogger ? : ( new LoggingClient ( ) ) -> psrLogger ( self :: DEFAULT_LOGNAME , [ 'batchEnabled' => true , 'debugOutput' => true , 'batchOptions' => [ 'numWorkers' => 2 ] ] ) ; register_shutdown_function ( [ self :: class , 'shutdow... | Register hooks for error reporting . |
2,275 | 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 : $ prefix = 'PHP error' ; break ; case E_WARNING :... | Return a string prefix for the given error level . |
2,276 | 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 E_USER_WARNING :... | Return an error level string for the given PHP error level . |
2,277 | 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 ( )... | Called at exit to check there s a fatal error and report the error if any . |
2,278 | public function setJobEvent ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ JobEvent :: class ) ; $ this -> writeOneof ( 5 , $ var ) ; return $ this ; } | An event issued when a job seeker interacts with the application that implements Cloud Talent Solution . |
2,279 | public function setProfileEvent ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ ProfileEvent :: class ) ; $ this -> writeOneof ( 6 , $ var ) ; return $ this ; } | An event issued when a profile searcher interacts with the application that implements Cloud Talent Solution . |
2,280 | public function setPysparkJob ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dataproc \ V1beta2 \ PySparkJob :: class ) ; $ this -> writeOneof ( 4 , $ var ) ; return $ this ; } | Job is a Pyspark job . |
2,281 | public function setPrerequisiteStepIds ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> prerequisite_step_ids = $ arr ; return $ this ; } | Optional . The optional list of prerequisite job step_ids . If not specified the job will start at the beginning of workflow . |
2,282 | public function setDailyMaintenanceWindow ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Container \ V1 \ DailyMaintenanceWindow :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; } | DailyMaintenanceWindow specifies a daily maintenance operation window . |
2,283 | public function setGatewayType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Iot \ V1 \ GatewayType :: class ) ; $ this -> gateway_type = $ var ; return $ this ; } | Indicates whether the device is a gateway . |
2,284 | public function setSinks ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Logging \ V2 \ LogSink :: class ) ; $ this -> sinks = $ arr ; return $ this ; } | A list of sinks . |
2,285 | public function setGcsSource ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Vision \ V1 \ ImportProductSetsGcsSource :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; } | The Google Cloud Storage location for a csv file which preserves a list of ImportProductSetRequests in each line . |
2,286 | public function jobConfigurationProperties ( $ projectId , array $ config , $ location ) { $ this -> config = array_replace_recursive ( [ 'projectId' => $ projectId , 'jobReference' => [ 'projectId' => $ projectId ] ] , $ config ) ; if ( $ location && ! isset ( $ this -> config [ 'jobReference' ] [ 'location' ] ) ) { $... | Sets shared job configuration properties . |
2,287 | public function toArray ( ) { if ( $ this -> jobIdPrefix ) { $ this -> config [ 'jobReference' ] [ 'jobId' ] = sprintf ( '%s-%s' , $ this -> jobIdPrefix , $ this -> config [ 'jobReference' ] [ 'jobId' ] ) ; } return $ this -> config ; } | Returns the job config as an array . |
2,288 | private function singleUseState ( ) { if ( $ this -> type === self :: TYPE_SINGLE_USE ) { if ( $ this -> state === self :: STATE_SINGLE_USE_USED ) { throw new \ BadMethodCallException ( 'This single-use transaction has already been used.' ) ; } $ this -> state = self :: STATE_SINGLE_USE_USED ; return true ; } return fa... | Check the transaction state and update as necessary for single - use transactions . |
2,289 | private function checkReadContext ( ) { if ( $ this -> type === self :: TYPE_SINGLE_USE && $ this -> context === SessionPoolInterface :: CONTEXT_READWRITE ) { throw new \ BadMethodCallException ( 'Cannot use a single-use read-write transaction for read or execute.' ) ; } } | Check whether the context is valid for a read operation . Reads are not allowed in single - use read - write transactions . |
2,290 | public function setWorkspaceId ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ DevTools \ Source \ V1 \ CloudWorkspaceId :: class ) ; $ this -> workspace_id = $ var ; return $ this ; } | The ID of the workspace . |
2,291 | public function setEntityOverrideMode ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Dialogflow \ V2 \ SessionEntityType_EntityOverrideMode :: class ) ; $ this -> entity_override_mode = $ var ; return $ this ; } | Required . Indicates whether the additional data should override or supplement the developer entity type definition . |
2,292 | public function requestObject ( $ encode = true ) { return array_filter ( [ 'image' => $ this -> imageObject ( $ encode ) , 'features' => $ this -> features , 'imageContext' => $ this -> options [ 'imageContext' ] ] ) ; } | Return a formatted annotate image request . |
2,293 | private function imageObject ( $ encode ) { if ( $ this -> type === self :: TYPE_BYTES ) { $ bytes = ( string ) $ this -> image ; return [ 'content' => ( $ encode ) ? base64_encode ( $ bytes ) : $ bytes ] ; } if ( $ this -> type === self :: TYPE_STRING ) { $ string = $ this -> image ; return [ 'content' => ( $ encode )... | Create an image object . |
2,294 | private function normalizeFeatures ( array $ features ) { $ result = [ ] ; foreach ( $ features as $ key => $ feature ) { $ maxResults = $ this -> maxResult ( $ feature ) ; if ( array_key_exists ( $ feature , $ this -> featureShortNames ) ) { $ feature = $ this -> featureShortNames [ $ feature ] ; } $ result [ ] = arra... | Normalizes short feature names to identifiers compatible with the vision API and adds maxResults if specified . |
2,295 | private function maxResult ( $ feature ) { return ( isset ( $ this -> options [ 'maxResults' ] [ $ feature ] ) ) ? $ this -> options [ 'maxResults' ] [ $ feature ] : null ; } | Identify and return a maxResults value for a given feature if maxResults is specified . |
2,296 | public function setProductCategories ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> product_categories = $ arr ; return $ this ; } | The list of product categories to search in . Currently we only consider the first category and either homegoods apparel or toys should be specified . |
2,297 | public function reload ( array $ options = [ ] ) { $ this -> info = $ this -> connection -> getInstanceConfig ( $ options + [ 'name' => $ this -> name , 'projectId' => $ this -> projectId ] ) ; return $ this -> info ; } | Fetch a fresh representation of the configuration from the service . |
2,298 | private function fullyQualifiedConfigName ( $ name , $ projectId ) { try { return InstanceAdminClient :: instanceConfigName ( $ projectId , $ name ) ; } catch ( ValidationException $ e ) { return $ name ; } } | Get the fully qualified instance config name . |
2,299 | public function setRequests ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Vision \ V1 \ AsyncAnnotateFileRequest :: class ) ; $ this -> requests = $ arr ; return $ this ; } | Individual async file annotation requests for this batch . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.