idx int64 0 241k | question stringlengths 64 6.21k | target stringlengths 5 803 |
|---|---|---|
1,800 | public function executeUpdate ( Session $ session , Transaction $ transaction , $ sql , array $ options = [ ] ) { $ res = $ this -> execute ( $ session , $ sql , [ 'transactionId' => $ transaction -> id ( ) ] + $ options ) ; iterator_to_array ( $ res -> rows ( ) ) ; $ stats = $ res -> stats ( ) ; if ( ! $ stats ) { thr... | Execute a DML statement and return an affected row count . |
1,801 | public function read ( Session $ session , $ table , KeySet $ keySet , array $ columns , array $ options = [ ] ) { $ options += [ 'index' => null , 'limit' => null , 'offset' => null , 'transactionContext' => null ] ; $ context = $ this -> pluck ( 'transactionContext' , $ options ) ; $ call = function ( $ resumeToken =... | Lookup rows in a database . |
1,802 | public function createTransaction ( Session $ session , array $ res = [ ] , array $ options = [ ] ) { $ res += [ 'id' => null ] ; $ options [ 'isRetry' ] = isset ( $ options [ 'isRetry' ] ) ? $ options [ 'isRetry' ] : false ; return new Transaction ( $ this , $ session , $ res [ 'id' ] , $ options [ 'isRetry' ] ) ; } | Create a Transaction instance from a response object . |
1,803 | public function snapshot ( Session $ session , array $ options = [ ] ) { $ options += [ 'singleUse' => false , 'className' => Snapshot :: class ] ; if ( ! $ options [ 'singleUse' ] ) { $ res = $ this -> beginTransaction ( $ session , $ options ) ; } else { $ res = [ ] ; } $ className = $ this -> pluck ( 'className' , $... | Create a read - only snapshot transaction . |
1,804 | public function createSnapshot ( Session $ session , array $ res = [ ] , $ className = Snapshot :: class ) { $ res += [ 'id' => null , 'readTimestamp' => null ] ; if ( $ res [ 'readTimestamp' ] ) { if ( ! ( $ res [ 'readTimestamp' ] instanceof Timestamp ) ) { $ time = $ this -> parseTimeString ( $ res [ 'readTimestamp'... | Create a Snapshot instance from a response object . |
1,805 | private function partitionOptions ( array $ options ) { $ options [ 'partitionOptions' ] = array_filter ( [ 'partitionSizeBytes' => $ this -> pluck ( 'partitionSizeBytes' , $ options , false ) , 'maxPartitions' => $ this -> pluck ( 'maxPartitions' , $ options , false ) ] ) ; return $ options ; } | Normalize options for partition configuration . |
1,806 | private function beginTransaction ( Session $ session , array $ options = [ ] ) { $ options += [ 'transactionOptions' => [ ] ] ; return $ this -> connection -> beginTransaction ( $ options + [ 'session' => $ session -> name ( ) , 'database' => $ session -> info ( ) [ 'database' ] ] ) ; } | Execute a service call to begin a transaction or snapshot . |
1,807 | private function flattenKeySet ( KeySet $ keySet ) { $ keys = $ keySet -> keySetObject ( ) ; if ( ! empty ( $ keys [ 'ranges' ] ) ) { foreach ( $ keys [ 'ranges' ] as $ index => $ range ) { foreach ( $ range as $ type => $ rangeKeys ) { $ range [ $ type ] = $ this -> mapper -> encodeValuesAsSimpleType ( $ rangeKeys ) ;... | Convert a KeySet object to an API - ready array . |
1,808 | public function setTeamMembers ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> team_members = $ arr ; return $ this ; } | Optional . A list of team members involved in this activity . Number of characters allowed is 100 . |
1,809 | public function setOutputVersionFormat ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Logging \ V2 \ LogSink_VersionFormat :: class ) ; $ this -> output_version_format = $ var ; return $ this ; } | Deprecated . The log entry format to use for this sink s exported log entries . The v2 format is used by default and cannot be changed . |
1,810 | public function setJobQuery ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ JobQuery :: class ) ; $ this -> job_query = $ var ; return $ this ; } | Optional . Query used to search against jobs such as keyword location filters etc . |
1,811 | public function setProperty ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Vision \ V1 \ TextAnnotation_TextProperty :: class ) ; $ this -> property = $ var ; return $ this ; } | Additional information detected for the paragraph . |
1,812 | public function setWords ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Vision \ V1 \ Word :: class ) ; $ this -> words = $ arr ; return $ this ; } | List of words in this paragraph . |
1,813 | public function setDeviceConfigs ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Iot \ V1 \ DeviceConfig :: class ) ; $ this -> device_configs = $ arr ; return $ this ; } | The device configuration for the last few versions . Versions are listed in decreasing order starting from the most recent one . |
1,814 | public function setText ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> text = $ arr ; return $ this ; } | Optional . The collection of the agent s responses . |
1,815 | public function GetJob ( \ Google \ Cloud \ Talent \ V4beta1 \ GetJobRequest $ argument , $ metadata = [ ] , $ options = [ ] ) { return $ this -> _simpleRequest ( '/google.cloud.talent.v4beta1.JobService/GetJob' , $ argument , [ '\Google\Cloud\Talent\V4beta1\Job' , 'decode' ] , $ metadata , $ options ) ; } | Retrieves the specified job whose status is OPEN or recently EXPIRED within the last 90 days . |
1,816 | public function UpdateJob ( \ Google \ Cloud \ Talent \ V4beta1 \ UpdateJobRequest $ argument , $ metadata = [ ] , $ options = [ ] ) { return $ this -> _simpleRequest ( '/google.cloud.talent.v4beta1.JobService/UpdateJob' , $ argument , [ '\Google\Cloud\Talent\V4beta1\Job' , 'decode' ] , $ metadata , $ options ) ; } | Updates specified job . |
1,817 | public function DeleteJob ( \ Google \ Cloud \ Talent \ V4beta1 \ DeleteJobRequest $ argument , $ metadata = [ ] , $ options = [ ] ) { return $ this -> _simpleRequest ( '/google.cloud.talent.v4beta1.JobService/DeleteJob' , $ argument , [ '\Google\Protobuf\GPBEmpty' , 'decode' ] , $ metadata , $ options ) ; } | Deletes the specified job . |
1,818 | public function ListJobs ( \ Google \ Cloud \ Talent \ V4beta1 \ ListJobsRequest $ argument , $ metadata = [ ] , $ options = [ ] ) { return $ this -> _simpleRequest ( '/google.cloud.talent.v4beta1.JobService/ListJobs' , $ argument , [ '\Google\Cloud\Talent\V4beta1\ListJobsResponse' , 'decode' ] , $ metadata , $ options... | Lists jobs by filter . |
1,819 | public function setSnapshots ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> snapshots = $ arr ; return $ this ; } | The names of the snapshots that match the request . |
1,820 | public function setJob ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ Job :: class ) ; $ this -> job = $ var ; return $ this ; } | Required . The Job to be created . |
1,821 | public function sample ( $ probability ) { if ( $ probability < 0 ) { throw new \ InvalidArgumentException ( 'Probability must be positive' ) ; } if ( $ probability >= 1.0 ) { throw new \ InvalidArgumentException ( 'Probability must be less than 1.0' ) ; } return new SimpleFilter ( ( new RowFilter ) -> setRowSampleFilt... | Matches all cells from a row with probability and matches no cells from the row with probability 1 - probability . |
1,822 | public function setCompanies ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Talent \ V4beta1 \ Company :: class ) ; $ this -> companies = $ arr ; return $ this ; } | Companies for the current client . |
1,823 | public function setResults ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Speech \ V1 \ SpeechRecognitionResult :: class ) ; $ this -> results = $ arr ; return $ this ; } | Output only . Sequential list of transcription results corresponding to sequential portions of audio . |
1,824 | public function readAll ( ) { foreach ( $ this -> stream as $ readRowsResponse ) { foreach ( $ readRowsResponse -> getChunks ( ) as $ chunk ) { switch ( $ this -> state ) { case self :: $ rowStateEnum [ 'NEW_ROW' ] : $ this -> newRow ( $ chunk ) ; break ; case self :: $ rowStateEnum [ 'ROW_IN_PROGRESS' ] : $ this -> ro... | Formats the row s chunks into a friendly format . |
1,825 | private function validateNewRow ( CellChunk $ chunk ) { $ this -> isError ( $ this -> row , 'A new row cannot have existing state.' ) ; $ this -> isError ( ! $ chunk -> getRowKey ( ) , 'A row key must be set.' ) ; $ this -> isError ( $ chunk -> getResetRow ( ) , 'A new row cannot be reset.' ) ; $ this -> isError ( $ th... | Validates state for a new row . |
1,826 | private function reset ( ) { $ this -> prevRowKey = null ; $ this -> rowKey = null ; $ this -> state = self :: $ rowStateEnum [ 'NEW_ROW' ] ; $ this -> row = [ ] ; } | Resets the state of formatter . |
1,827 | private function moveToNextState ( CellChunk $ chunk ) { $ this -> state = $ chunk -> getValueSize ( ) > 0 ? self :: $ rowStateEnum [ 'CELL_IN_PROGRESS' ] : self :: $ rowStateEnum [ 'ROW_IN_PROGRESS' ] ; } | Moves to the next state in processing . |
1,828 | private function newRow ( CellChunk $ chunk ) { $ this -> validateNewRow ( $ chunk ) ; $ this -> rowKey = $ chunk -> getRowKey ( ) ; $ familyName = $ chunk -> getFamilyName ( ) -> getValue ( ) ; $ qualifierName = $ chunk -> getQualifier ( ) -> getValue ( ) ; $ labels = ( $ chunk -> getLabels ( ) -> getIterator ( ) -> v... | Processes a chunk when in the NEW_ROW state . |
1,829 | private function validateResetRow ( CellChunk $ chunk ) { $ this -> isError ( $ chunk -> getResetRow ( ) && ( $ chunk -> getRowKey ( ) || $ chunk -> getQualifier ( ) || $ chunk -> getValue ( ) || $ chunk -> getTimestampMicros ( ) > 0 ) , 'A reset should have no data.' ) ; } | Validates the reset row condition for a chunk . |
1,830 | private function validateRowInProgress ( CellChunk $ chunk ) { $ this -> validateResetRow ( $ chunk ) ; $ newRowKey = $ chunk -> getRowKey ( ) ; $ this -> isError ( $ chunk -> getRowKey ( ) && $ newRowKey !== $ this -> rowKey , 'A commit is required between row keys.' ) ; $ this -> isError ( $ chunk -> getFamilyName ( ... | Validates state for a row in progress . |
1,831 | private function rowInProgress ( CellChunk $ chunk ) { $ this -> validateRowInProgress ( $ chunk ) ; if ( $ chunk -> getResetRow ( ) ) { $ this -> reset ( ) ; return ; } if ( $ chunk -> getFamilyName ( ) ) { $ familyName = $ chunk -> getFamilyName ( ) -> getValue ( ) ; if ( ! isset ( $ this -> row [ $ familyName ] ) ) ... | Process a chunk when in ROW_IN_PROGRESS state . |
1,832 | private function cellInProgress ( CellChunk $ chunk ) { $ this -> validateCellInProgress ( $ chunk ) ; if ( $ chunk -> getResetRow ( ) ) { $ this -> reset ( ) ; return ; } $ this -> qualifierValue = $ this -> qualifierValue . $ chunk -> getValue ( ) ; $ this -> moveToNextState ( $ chunk ) ; } | Process chunk when in CELL_IN_PROGRESS state . |
1,833 | public function setWebEntities ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Vision \ V1 \ WebDetection \ WebEntity :: class ) ; $ this -> web_entities = $ arr ; return $ this ; } | Deduced entities from similar images on the Internet . |
1,834 | public function setFullMatchingImages ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Vision \ V1 \ WebDetection \ WebImage :: class ) ; $ this -> full_matching_images = $ arr ; return $ this ; } | Fully matching images from the Internet . Can include resized copies of the query image . |
1,835 | public function setPartialMatchingImages ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Vision \ V1 \ WebDetection \ WebImage :: class ) ; $ this -> partial_matching_images = $ arr ; return $ this ; } | Partial matching images from the Internet . Those images are similar enough to share some key - point features . For example an original image will likely have partial matching for its crops . |
1,836 | public function setPagesWithMatchingImages ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Vision \ V1 \ WebDetection \ WebPage :: class ) ; $ this -> pages_with_matching_images = $ arr ; return $ this ; } | Web pages containing the matching images from the Internet . |
1,837 | public function setVisuallySimilarImages ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Vision \ V1 \ WebDetection \ WebImage :: class ) ; $ this -> visually_similar_images = $ arr ; return $ this ; } | The visually similar image results . |
1,838 | public function setDegreeType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ DegreeType :: class ) ; $ this -> degree_type = $ var ; return $ this ; } | Optional . ISCED degree type . |
1,839 | public function setFieldsOfStudy ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> fields_of_study = $ arr ; return $ this ; } | Optional . Fields of study for the degree . For example Computer science engineering . Number of characters allowed is 100 . |
1,840 | public function pathElement ( $ kind , $ identifier = null , array $ options = [ ] ) { $ options += [ 'identifierType' => null ] ; if ( ! empty ( $ this -> path ) && $ this -> state ( ) !== Key :: STATE_NAMED ) { throw new InvalidArgumentException ( 'Cannot add pathElement because the previous element is missing an id ... | Add a path element to the end of the Key path |
1,841 | public function ancestor ( $ kind , $ identifier , array $ options = [ ] ) { $ options += [ 'identifierType' => null ] ; $ pathElement = $ this -> normalizeElement ( $ kind , $ identifier , $ options [ 'identifierType' ] ) ; array_unshift ( $ this -> path , $ pathElement ) ; return $ this ; } | Add a path element to the beginning of the Key path . |
1,842 | public function ancestorKey ( Key $ key ) { if ( $ key -> state ( ) !== self :: STATE_NAMED ) { throw new InvalidArgumentException ( 'Cannot use an incomplete key as an ancestor' ) ; } $ path = $ key -> path ( ) ; $ this -> path = array_merge ( $ path , $ this -> path ) ; return $ this ; } | Use another Key s path as the current Key s ancestor |
1,843 | public function state ( ) { $ end = $ this -> pathEnd ( ) ; return ( isset ( $ end [ 'id' ] ) || isset ( $ end [ 'name' ] ) ) ? self :: STATE_NAMED : self :: STATE_INCOMPLETE ; } | Check if the Key is considered Named or Incomplete . |
1,844 | public function setLastElementIdentifier ( $ value , $ type = Key :: TYPE_ID ) { $ end = $ this -> pathEnd ( ) ; $ end [ $ type ] = ( string ) $ value ; $ elements = array_keys ( $ this -> path ) ; $ lastElement = end ( $ elements ) ; $ this -> path [ $ lastElement ] = $ end ; } | Set the value of the last path element in a Key |
1,845 | public function pathEndIdentifier ( ) { $ end = $ this -> pathEnd ( ) ; if ( isset ( $ end [ 'id' ] ) ) { return $ end [ 'id' ] ; } if ( isset ( $ end [ 'name' ] ) ) { return $ end [ 'name' ] ; } return null ; } | Get the last pathElement identifier . |
1,846 | public function pathEndIdentifierType ( ) { $ end = $ this -> pathEnd ( ) ; if ( isset ( $ end [ 'id' ] ) ) { return self :: TYPE_ID ; } if ( isset ( $ end [ 'name' ] ) ) { return self :: TYPE_NAME ; } return null ; } | Get the last pathElement identifier type . |
1,847 | private function normalizeElement ( $ kind , $ identifier , $ identifierType ) { $ identifierType = $ this -> determineIdentifierType ( $ identifier , $ identifierType ) ; $ element = [ ] ; $ element [ 'kind' ] = $ kind ; if ( ! is_null ( $ identifier ) ) { $ element [ $ identifierType ] = $ identifier ; } return $ ele... | Determine the identifier type and return the valid pathElement |
1,848 | private function determineIdentifierType ( $ identifier , $ identifierType ) { $ allowedTypes = [ self :: TYPE_ID , self :: TYPE_NAME ] ; if ( ! is_null ( $ identifierType ) && in_array ( $ identifierType , $ allowedTypes ) ) { return $ identifierType ; } elseif ( ! is_null ( $ identifierType ) ) { throw new InvalidArg... | Determine whether the given identifier is an ID or a Name |
1,849 | private function normalizePath ( array $ path ) { if ( $ this -> isAssoc ( $ path ) ) { $ path = [ $ path ] ; } $ res = [ ] ; foreach ( $ path as $ index => $ pathElement ) { if ( ! isset ( $ pathElement [ 'kind' ] ) ) { throw new InvalidArgumentException ( 'Each path element must contain a kind.' ) ; } $ incomplete = ... | Normalize the internal representation of a path |
1,850 | public function setUsage ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ ContactInfoUsage :: class ) ; $ this -> usage = $ var ; return $ this ; } | Optional . The usage of the address . For example SCHOOL WORK PERSONAL . |
1,851 | public function run ( ) { $ this -> setupSignalHandlers ( ) ; $ procs = [ ] ; while ( true ) { $ jobs = $ this -> runner -> getJobs ( ) ; foreach ( $ jobs as $ job ) { if ( ! array_key_exists ( $ job -> identifier ( ) , $ procs ) ) { $ procs [ $ job -> identifier ( ) ] = [ ] ; } while ( count ( $ procs [ $ job -> ident... | A loop for the parent . |
1,852 | public function v2Sign ( ConnectionInterface $ connection , $ expires , $ resource , $ generation , array $ options ) { list ( $ credentials , $ options ) = $ this -> getSigningCredentials ( $ connection , $ options ) ; $ expires = $ this -> normalizeExpiration ( $ expires ) ; $ resource = $ this -> normalizeResource (... | Sign a URL using Google Signed URLs v2 . |
1,853 | private function normalizeExpiration ( $ expires ) { if ( $ expires instanceof Timestamp ) { $ seconds = $ expires -> get ( ) -> format ( 'U' ) ; } elseif ( $ expires instanceof \ DateTimeInterface ) { $ seconds = $ expires -> format ( 'U' ) ; } elseif ( is_numeric ( $ expires ) ) { $ seconds = ( int ) $ expires ; } el... | Normalizes and validates an expiration . |
1,854 | private function normalizeResource ( $ resource ) { $ pieces = explode ( '/' , trim ( $ resource , '/' ) ) ; array_walk ( $ pieces , function ( & $ piece ) { $ piece = rawurlencode ( $ piece ) ; } ) ; return '/' . implode ( '/' , $ pieces ) ; } | Normalizes and encodes the resource identifier . |
1,855 | private function normalizeOptions ( array $ options ) { $ options += [ 'method' => 'GET' , 'cname' => self :: DEFAULT_DOWNLOAD_HOST , 'contentMd5' => null , 'contentType' => null , 'headers' => [ ] , 'saveAsName' => null , 'responseDisposition' => null , 'responseType' => null , 'keyFile' => null , 'keyFilePath' => nul... | Fixes the user input options filters and validates data . |
1,856 | private function normalizeHeaders ( array $ headers ) { $ out = [ ] ; foreach ( $ headers as $ name => $ value ) { $ name = strtolower ( trim ( $ name ) ) ; if ( ! is_array ( $ value ) ) { $ value = [ $ value ] ; } foreach ( $ value as & $ headerValue ) { $ headerValue = trim ( $ headerValue ) ; $ headerValue = str_rep... | Cleans and normalizes header values . |
1,857 | private function normalizeUriPath ( $ cname , $ resource ) { if ( $ cname !== self :: DEFAULT_DOWNLOAD_HOST ) { $ resourceParts = explode ( '/' , trim ( $ resource , '/' ) ) ; array_shift ( $ resourceParts ) ; if ( empty ( $ resourceParts ) ) { $ resource = '/' ; } else { $ resource = '/' . implode ( '/' , $ resourcePa... | Returns a resource formatted for use in a URI . |
1,858 | private function getSigningCredentials ( ConnectionInterface $ connection , array $ options ) { $ keyFilePath = isset ( $ options [ 'keyFilePath' ] ) ? $ options [ 'keyFilePath' ] : null ; if ( $ keyFilePath ) { if ( ! file_exists ( $ keyFilePath ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Keyfile path %s d... | Get the credentials for use with signing . |
1,859 | private function addCommonParams ( $ generation , array $ params , array $ options ) { if ( $ options [ 'responseType' ] ) { $ params [ 'response-content-type' ] = $ options [ 'responseType' ] ; } if ( $ options [ 'responseDisposition' ] ) { $ params [ 'response-content-disposition' ] = $ options [ 'responseDisposition... | Add parameters common to all signed URL versions . |
1,860 | public function serialize ( ) { $ vars = get_object_vars ( $ this ) ; $ vars [ 'keySet' ] = $ vars [ 'keySet' ] -> keySetObject ( ) ; return base64_encode ( json_encode ( $ vars + [ BatchClient :: PARTITION_TYPE_KEY => static :: class ] ) ) ; } | Return a stringified representation of the ReadPartition object . |
1,861 | public static function hydrate ( array $ data ) { return new self ( $ data [ 'token' ] , $ data [ 'table' ] , KeySet :: fromArray ( $ data [ 'keySet' ] ) , $ data [ 'columns' ] , $ data [ 'options' ] ) ; } | Create a ReadPartition object from a deserialized array of partition data . |
1,862 | public function setMode ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Datastore \ V1 \ CommitRequest_Mode :: class ) ; $ this -> mode = $ var ; return $ this ; } | The type of commit to perform . Defaults to TRANSACTIONAL . |
1,863 | public function setStates ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: ENUM , \ Google \ Cloud \ BigQuery \ DataTransfer \ V1 \ TransferState :: class ) ; $ this -> states = $ arr ; return $ this ; } | When specified only transfer runs with requested states are returned . |
1,864 | public function setRunAttempt ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ BigQuery \ DataTransfer \ V1 \ ListTransferRunsRequest_RunAttempt :: class ) ; $ this -> run_attempt = $ var ; return $ this ; } | Indicates how run attempts are to be pulled . |
1,865 | public function createCluster ( $ projectId , $ region , $ cluster , array $ optionalArgs = [ ] ) { $ request = new CreateClusterRequest ( ) ; $ request -> setProjectId ( $ projectId ) ; $ request -> setRegion ( $ region ) ; $ request -> setCluster ( $ cluster ) ; if ( isset ( $ optionalArgs [ 'requestId' ] ) ) { $ req... | Creates a cluster in a project . |
1,866 | public function updateCluster ( $ projectId , $ region , $ clusterName , $ cluster , $ updateMask , array $ optionalArgs = [ ] ) { $ request = new UpdateClusterRequest ( ) ; $ request -> setProjectId ( $ projectId ) ; $ request -> setRegion ( $ region ) ; $ request -> setClusterName ( $ clusterName ) ; $ request -> set... | Updates a cluster in a project . |
1,867 | public function deleteCluster ( $ projectId , $ region , $ clusterName , array $ optionalArgs = [ ] ) { $ request = new DeleteClusterRequest ( ) ; $ request -> setProjectId ( $ projectId ) ; $ request -> setRegion ( $ region ) ; $ request -> setClusterName ( $ clusterName ) ; if ( isset ( $ optionalArgs [ 'clusterUuid'... | Deletes a cluster in a project . |
1,868 | private function buildNestedParams ( $ nestedParams , $ origParam , $ isProto = false ) { $ paramsArray = [ ] ; foreach ( $ nestedParams as $ param ) { $ nestedParam = explode ( ' ' , trim ( $ param ) , 3 ) ; if ( count ( $ nestedParam ) < 3 && ! $ isProto ) { throw new \ Exception ( 'nested param is in an invalid form... | PHPDoc has no support for nested params currently . this is a workaround until it is implemented . |
1,869 | public function create ( array $ options = [ ] ) { if ( ! $ this -> topicName ) { throw new InvalidArgumentException ( 'A topic name is required to create a subscription.' ) ; } $ this -> info = $ this -> connection -> createSubscription ( $ options + [ 'name' => $ this -> name , 'topic' => $ this -> top... | Execute a service request creating the subscription . |
1,870 | public function update ( array $ subscription , array $ options = [ ] ) { return $ this -> info = $ this -> connection -> updateSubscription ( [ 'name' => $ this -> name ] + $ options + $ subscription ) ; } | Update the subscription . |
1,871 | public function reload ( array $ options = [ ] ) { return $ this -> info = $ this -> connection -> getSubscription ( $ options + [ 'subscription' => $ this -> name ] ) ; } | Retrieve info on a subscription from the API . |
1,872 | public function pull ( array $ options = [ ] ) { $ messages = [ ] ; $ options [ 'returnImmediately' ] = isset ( $ options [ 'returnImmediately' ] ) ? $ options [ 'returnImmediately' ] : false ; $ options [ 'maxMessages' ] = isset ( $ options [ 'maxMessages' ] ) ? $ options [ 'maxMessages' ] : self :: MAX_MESSAGES ; $ r... | Retrieve new messages from the topic . |
1,873 | public function acknowledgeBatch ( array $ messages , array $ options = [ ] ) { $ this -> validateBatch ( $ messages , Message :: class ) ; $ this -> connection -> acknowledge ( $ options + [ 'subscription' => $ this -> name , 'ackIds' => $ this -> getMessageAckIds ( $ messages ) ] ) ; } | Acknowledge receipt of multiple messages at once . |
1,874 | public function modifyAckDeadline ( Message $ message , $ seconds , array $ options = [ ] ) { $ this -> modifyAckDeadlineBatch ( [ $ message ] , $ seconds , $ options ) ; } | Set the acknowledge deadline for a single ackId . |
1,875 | public function modifyAckDeadlineBatch ( array $ messages , $ seconds , array $ options = [ ] ) { $ this -> validateBatch ( $ messages , Message :: class ) ; $ this -> connection -> modifyAckDeadline ( $ options + [ 'subscription' => $ this -> name , 'ackIds' => $ this -> getMessageAckIds ( $ messages ) , 'ackDeadlineS... | Set the acknowledge deadline for multiple ackIds . |
1,876 | public function modifyPushConfig ( array $ pushConfig , array $ options = [ ] ) { $ this -> connection -> modifyPushConfig ( $ options + [ 'subscription' => $ this -> name , 'pushConfig' => $ pushConfig ] ) ; } | Set the push config for the subscription |
1,877 | public function seekToTime ( Timestamp $ timestamp ) { return $ this -> connection -> seek ( [ 'subscription' => $ this -> name , 'time' => $ timestamp -> formatAsString ( ) ] ) ; } | Seek to a given timestamp . |
1,878 | public function seekToSnapshot ( Snapshot $ snapshot ) { return $ this -> connection -> seek ( [ 'subscription' => $ this -> name , 'snapshot' => $ snapshot -> name ( ) ] ) ; } | Seek to a given snapshot . |
1,879 | public function iam ( ) { if ( ! $ this -> iam ) { $ iamConnection = new IamSubscription ( $ this -> connection ) ; $ this -> iam = new Iam ( $ iamConnection , $ this -> name ) ; } return $ this -> iam ; } | Manage the IAM policy for the current Subscription . |
1,880 | private function getMessageAckIds ( array $ messages ) { $ ackIds = [ ] ; foreach ( $ messages as $ message ) { $ ackIds [ ] = $ message -> ackId ( ) ; } return $ ackIds ; } | Get a list of ackIds from a list of Message objects . |
1,881 | public function setInput ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ TextToSpeech \ V1 \ SynthesisInput :: class ) ; $ this -> input = $ var ; return $ this ; } | Required . The Synthesizer requires either plain text or SSML as input . |
1,882 | public function setVoice ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ TextToSpeech \ V1 \ VoiceSelectionParams :: class ) ; $ this -> voice = $ var ; return $ this ; } | Required . The desired voice of the synthesized audio . |
1,883 | public function setAudioConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ TextToSpeech \ V1 \ AudioConfig :: class ) ; $ this -> audio_config = $ var ; return $ this ; } | Required . The configuration of the synthesized audio . |
1,884 | public function setSecurityCenterProperties ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ SecurityCenter \ V1 \ Asset_SecurityCenterProperties :: class ) ; $ this -> security_center_properties = $ var ; return $ this ; } | Cloud SCC managed properties . These properties are managed by Cloud SCC and cannot be modified by the user . |
1,885 | public function setResourceProperties ( $ var ) { $ arr = GPBUtil :: checkMapField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Protobuf \ Value :: class ) ; $ this -> resource_properties = $ arr ; return $ this ; } | Resource managed properties . These properties are managed and defined by the GCP resource and cannot be modified by the user . |
1,886 | public function setIamPolicy ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ SecurityCenter \ V1 \ Asset_IamPolicy :: class ) ; $ this -> iam_policy = $ var ; return $ this ; } | IAM Policy information associated with the GCP resource described by the Cloud SCC asset . This information is managed and defined by the GCP resource and cannot be modified by the user . |
1,887 | public function setFilter ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Firestore \ V1beta1 \ ExistenceFilter :: class ) ; $ this -> writeOneof ( 5 , $ var ) ; return $ this ; } | A filter to apply to the set of documents previously returned for the given target . Returned when documents may have been removed from the given target but the exact documents are unknown . |
1,888 | public function setTransformationSummaries ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ TransformationSummary :: class ) ; $ this -> transformation_summaries = $ arr ; return $ this ; } | Transformations applied to the dataset . |
1,889 | public function setJobTriggers ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ JobTrigger :: class ) ; $ this -> job_triggers = $ arr ; return $ this ; } | List of triggeredJobs up to page_size in ListJobTriggersRequest . |
1,890 | public function setValidation ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dataproc \ V1beta2 \ ParameterValidation :: class ) ; $ this -> validation = $ var ; return $ this ; } | Optional . Validation rules to be applied to this parameter s value . |
1,891 | public function setTags ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> tags = $ arr ; return $ this ; } | The list of instance tags applied to all nodes . Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster or node pool creation . Each tag within the list must comply with RFC1035 . |
1,892 | public function encodeValues ( array $ fields ) { $ output = [ ] ; foreach ( $ fields as $ key => $ val ) { $ output [ $ key ] = $ this -> encodeValue ( $ val ) ; } return $ output ; } | Convert a PHP array containing google - cloud - php and simple types to an array ready to be sent to Firestore . |
1,893 | public function encodeValue ( $ value ) { $ type = gettype ( $ value ) ; switch ( $ type ) { case 'boolean' : return [ 'booleanValue' => $ value ] ; break ; case 'integer' : return [ 'integerValue' => $ value ] ; break ; case 'double' : return [ 'doubleValue' => $ value ] ; break ; case 'string' : return [ 'stringValue... | Encode a Google Cloud PHP value as a Firestore value . |
1,894 | private function encodeObjectValue ( $ value ) { if ( $ value instanceof \ stdClass ) { return $ this -> encodeAssociativeArrayValue ( ( array ) $ value ) ; } if ( $ value instanceof Blob ) { return [ 'bytesValue' => ( string ) $ value ] ; } if ( $ value instanceof \ DateTimeInterface ) { return [ 'timestampValue' => [... | Encode a value of type object as a Firestore value . |
1,895 | private function encodeAssociativeArrayValue ( array $ value ) { $ out = [ ] ; foreach ( $ value as $ key => $ item ) { $ out [ $ key ] = $ this -> encodeValue ( $ item ) ; } return [ 'mapValue' => [ 'fields' => $ out ] ] ; } | Encode an associative array as a Firestore Map value . |
1,896 | public function setDevice ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Iot \ V1 \ Device :: class ) ; $ this -> device = $ var ; return $ this ; } | The device registration details . The field name must be empty . The server generates name from the device registry id and the parent field . |
1,897 | public function setFollowupEventInput ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dialogflow \ V2 \ EventInput :: class ) ; $ this -> followup_event_input = $ var ; return $ this ; } | Optional . Makes the platform immediately invoke another DetectIntent call internally with the specified event as input . |
1,898 | public function setCluster ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Bigtable \ Admin \ V2 \ Cluster :: class ) ; $ this -> cluster = $ var ; return $ this ; } | The cluster to be created . Fields marked OutputOnly must be left blank . |
1,899 | public function keySetObject ( ) { $ ranges = [ ] ; foreach ( $ this -> ranges as $ range ) { $ ranges [ ] = $ range -> keyRangeObject ( ) ; } $ set = [ ] ; if ( $ this -> all ) { $ set [ 'all' ] = true ; } if ( $ this -> keys ) { $ set [ 'keys' ] = $ this -> keys ; } if ( $ ranges ) { $ set [ 'ranges' ] = $ ranges ; }... | Format a KeySet object for use in the Spanner API . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.