idx
int64
0
60.3k
question
stringlengths
101
6.21k
target
stringlengths
7
803
2,400
public function setPrompts ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> prompts = $ arr ; return $ this ; }
Optional . The collection of prompts that the agent can present to the user in order to collect value for the parameter .
2,401
public function setCryptoKey ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ CryptoKey :: class ) ; $ this -> writeOneof ( 4 , $ var ) ; return $ this ; }
Causes the shift to be computed based on this key and the context . This results in the same shift for the same context and crypto_key .
2,402
public function topics ( array $ options = [ ] ) { $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; return new ItemIterator ( new PageIterator ( function ( array $ topic ) { return $ this -> topicFactory ( $ topic [ 'name' ] , $ topic ) ; } , [ $ this -> connection , 'listTopics' ] , $ options + [ 'project' => $ this -> formatName ( 'project' , $ this -> projectId ) ] , [ 'itemsKey' => 'topics' , 'resultLimit' => $ resultLimit ] ) ) ; }
Get a list of the topics registered to your project .
2,403
public function subscriptions ( array $ options = [ ] ) { $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; return new ItemIterator ( new PageIterator ( function ( array $ subscription ) { return $ this -> subscriptionFactory ( $ subscription [ 'name' ] , $ subscription [ 'topic' ] , $ subscription ) ; } , [ $ this -> connection , 'listSubscriptions' ] , $ options + [ 'project' => $ this -> formatName ( 'project' , $ this -> projectId ) ] , [ 'itemsKey' => 'subscriptions' , 'resultLimit' => $ resultLimit ] ) ) ; }
Get a list of the subscriptions registered to all of your project s topics .
2,404
public function snapshot ( $ name , array $ info = [ ] ) { return new Snapshot ( $ this -> connection , $ this -> projectId , $ name , $ this -> encode , $ info ) ; }
Lazily create a snapshot instance .
2,405
public function snapshots ( array $ options = [ ] ) { $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; return new ItemIterator ( new PageIterator ( function ( array $ snapshot ) { return new Snapshot ( $ this -> connection , $ this -> projectId , $ this -> pluckName ( 'snapshot' , $ snapshot [ 'name' ] ) , $ this -> encode , $ snapshot ) ; } , [ $ this -> connection , 'listSnapshots' ] , [ 'project' => $ this -> formatName ( 'project' , $ this -> projectId ) ] + $ options , [ 'itemsKey' => 'snapshots' , 'resultLimit' => $ resultLimit ] ) ) ; }
Get a list of the snapshots in the project .
2,406
public function consume ( array $ requestData ) { return $ this -> messageFactory ( $ requestData , $ this -> connection , $ this -> projectId , $ this -> encode ) ; }
Consume an incoming message and return a PubSub Message .
2,407
private function topicFactory ( $ name , array $ info = [ ] ) { return new Topic ( $ this -> connection , $ this -> projectId , $ name , $ this -> encode , $ info , $ this -> clientConfig ) ; }
Create an instance of a topic
2,408
public function setAddress ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ Address :: class ) ; $ this -> address = $ var ; return $ this ; }
Optional . The physical address of the employer .
2,409
public static function datasetName ( $ project , $ location , $ dataset ) { return self :: getDatasetNameTemplate ( ) -> render ( [ 'project' => $ project , 'location' => $ location , 'dataset' => $ dataset , ] ) ; }
Formats a string containing the fully - qualified path to represent a dataset resource .
2,410
public static function modelEvaluationName ( $ project , $ location , $ model , $ modelEvaluation ) { return self :: getModelEvaluationNameTemplate ( ) -> render ( [ 'project' => $ project , 'location' => $ location , 'model' => $ model , 'model_evaluation' => $ modelEvaluation , ] ) ; }
Formats a string containing the fully - qualified path to represent a model_evaluation resource .
2,411
public function documents ( array $ options = [ ] ) { $ maxRetries = $ this -> pluck ( 'maxRetries' , $ options , false ) ; $ maxRetries = $ maxRetries === null ? FirestoreClient :: MAX_RETRIES : $ maxRetries ; $ rows = ( new ExponentialBackoff ( $ maxRetries ) ) -> execute ( function ( ) use ( $ options ) { $ query = $ this -> finalQueryPrepare ( $ this -> query ) ; $ generator = $ this -> connection -> runQuery ( $ this -> arrayFilterRemoveNull ( [ 'parent' => $ this -> parent , 'structuredQuery' => $ query , 'retries' => 0 ] ) + $ options ) ; $ collections = [ ] ; $ out = [ ] ; while ( $ generator -> valid ( ) ) { $ result = $ generator -> current ( ) ; if ( isset ( $ result [ 'document' ] ) && $ result [ 'document' ] ) { $ collectionName = $ this -> parentPath ( $ result [ 'document' ] [ 'name' ] ) ; if ( ! isset ( $ collections [ $ collectionName ] ) ) { $ collections [ $ collectionName ] = new CollectionReference ( $ this -> connection , $ this -> valueMapper , $ collectionName ) ; } $ ref = new DocumentReference ( $ this -> connection , $ this -> valueMapper , $ collections [ $ collectionName ] , $ result [ 'document' ] [ 'name' ] ) ; $ document = $ result [ 'document' ] ; $ document [ 'readTime' ] = $ result [ 'readTime' ] ; $ out [ ] = $ this -> createSnapshotWithData ( $ this -> valueMapper , $ ref , $ document ) ; } $ generator -> next ( ) ; } return $ out ; } ) ; return new QuerySnapshot ( $ this , $ rows ) ; }
Get all documents matching the provided query filters .
2,412
public function select ( array $ fieldPaths ) { $ fields = [ ] ; foreach ( $ fieldPaths as $ field ) { if ( ! ( $ field instanceof FieldPath ) ) { $ field = FieldPath :: fromString ( $ field ) ; } $ fields [ ] = [ 'fieldPath' => $ field -> pathString ( ) ] ; } if ( ! $ fields ) { $ fields [ ] = [ 'fieldPath' => self :: DOCUMENT_ID ] ; } return $ this -> newQuery ( [ 'select' => [ 'fields' => $ fields ] ] , true ) ; }
Add a SELECT to the Query .
2,413
public function where ( $ fieldPath , $ operator , $ value ) { if ( $ value instanceof FieldValueInterface ) { throw new \ InvalidArgumentException ( sprintf ( 'Value cannot be a `%s` value.' , FieldValue :: class ) ) ; } if ( ! ( $ fieldPath instanceof FieldPath ) ) { $ fieldPath = FieldPath :: fromString ( $ fieldPath ) ; } $ escapedPathString = $ fieldPath -> pathString ( ) ; $ operator = array_key_exists ( $ operator , $ this -> shortOperators ) ? $ this -> shortOperators [ $ operator ] : $ operator ; if ( ! in_array ( $ operator , $ this -> allowedOperators ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Operator %s is not a valid operator' , $ operator ) ) ; } if ( ( is_float ( $ value ) && is_nan ( $ value ) ) || is_null ( $ value ) ) { if ( $ operator !== self :: OP_EQUAL ) { throw new \ InvalidArgumentException ( 'Null and NaN are allowed only with operator EQUALS.' ) ; } $ unaryOperator = is_nan ( $ value ) ? self :: OP_NAN : self :: OP_NULL ; $ filter = [ 'unaryFilter' => [ 'field' => [ 'fieldPath' => $ escapedPathString ] , 'op' => $ unaryOperator ] ] ; } else { $ filter = [ 'fieldFilter' => [ 'field' => [ 'fieldPath' => $ escapedPathString , ] , 'op' => $ operator , 'value' => $ this -> valueMapper -> encodeValue ( $ value ) ] ] ; } $ query = [ 'where' => [ 'compositeFilter' => [ 'op' => Operator :: PBAND , 'filters' => [ $ filter ] ] ] ] ; return $ this -> newQuery ( $ query ) ; }
Add a WHERE clause to the Query .
2,414
public function orderBy ( $ fieldPath , $ direction = self :: DIR_ASCENDING ) { $ direction = array_key_exists ( strtoupper ( $ direction ) , $ this -> shortDirections ) ? $ this -> shortDirections [ strtoupper ( $ direction ) ] : $ direction ; if ( ! in_array ( $ direction , $ this -> allowedDirections ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Direction %s is not a valid direction' , $ direction ) ) ; } if ( $ this -> queryHas ( 'startAt' ) || $ this -> queryHas ( 'endAt' ) ) { throw new \ InvalidArgumentException ( 'Cannot specify an orderBy constraint after calling any of ' . '`startAt()`, `startAfter()`, `endBefore()` or `endAt`().' ) ; } if ( ! ( $ fieldPath instanceof FieldPath ) ) { $ fieldPath = FieldPath :: fromString ( $ fieldPath ) ; } return $ this -> newQuery ( [ 'orderBy' => [ [ 'field' => [ 'fieldPath' => $ fieldPath -> pathString ( ) ] , 'direction' => $ direction ] ] ] ) ; }
Add an ORDER BY clause to the Query .
2,415
private function snapshotPosition ( DocumentSnapshot $ snapshot , array $ orderBy ) { $ appendName = true ; foreach ( $ orderBy as $ order ) { if ( $ order [ 'field' ] [ 'fieldPath' ] === self :: DOCUMENT_ID ) { $ appendName = false ; break ; } } if ( $ appendName ) { if ( ! $ orderBy && $ this -> queryHas ( 'where' ) ) { $ filters = $ this -> query [ 'where' ] [ 'compositeFilter' ] [ 'filters' ] ; $ inequality = array_filter ( $ filters , function ( $ filter ) { $ type = array_keys ( $ filter ) [ 0 ] ; return ! in_array ( $ filter [ $ type ] [ 'op' ] , [ self :: OP_EQUAL , self :: OP_ARRAY_CONTAINS ] ) ; } ) ; if ( $ inequality ) { $ filter = end ( $ inequality ) ; $ type = array_keys ( $ filter ) [ 0 ] ; $ orderBy [ ] = [ 'field' => [ 'fieldPath' => $ filter [ $ type ] [ 'field' ] [ 'fieldPath' ] , ] , 'direction' => self :: DIR_ASCENDING ] ; } } if ( $ orderBy ) { $ lastOrderDirection = end ( $ orderBy ) [ 'direction' ] ; $ orderBy [ ] = [ 'field' => [ 'fieldPath' => self :: DOCUMENT_ID ] , 'direction' => $ lastOrderDirection ] ; } else { $ orderBy [ ] = [ 'field' => [ 'fieldPath' => self :: DOCUMENT_ID ] , 'direction' => self :: DIR_ASCENDING ] ; } } $ fieldValues = $ this -> snapshotCursorValues ( $ snapshot , $ orderBy ) ; return [ $ fieldValues , $ orderBy ] ; }
Build cursors for document snapshots .
2,416
private function snapshotCursorValues ( DocumentSnapshot $ snapshot , array $ orderBy ) { $ fieldValues = [ ] ; foreach ( $ orderBy as $ order ) { $ path = $ order [ 'field' ] [ 'fieldPath' ] ; if ( $ path === self :: DOCUMENT_ID ) { continue ; } $ fieldValues [ ] = $ snapshot -> get ( $ path ) ; } $ fieldValues [ ] = $ snapshot -> reference ( ) ; return $ fieldValues ; }
Determine field values for Document Snapshot cursors .
2,417
private function newQuery ( array $ additionalConfig , $ overrideTopLevelKeys = false ) { $ query = $ this -> query ; if ( $ overrideTopLevelKeys ) { $ keys = array_keys ( $ additionalConfig ) ; foreach ( $ keys as $ key ) { unset ( $ query [ $ key ] ) ; } } $ query = $ this -> arrayMergeRecursive ( $ query , $ additionalConfig ) ; return new self ( $ this -> connection , $ this -> valueMapper , $ this -> parent , $ query ) ; }
Create a new Query instance
2,418
private function finalQueryPrepare ( array $ query ) { if ( isset ( $ query [ 'where' ] [ 'compositeFilter' ] ) && count ( $ query [ 'where' ] [ 'compositeFilter' ] [ 'filters' ] ) === 1 ) { $ filter = $ query [ 'where' ] [ 'compositeFilter' ] [ 'filters' ] [ 0 ] ; $ query [ 'where' ] = $ filter ; } return $ query ; }
Clean up the query array before sending .
2,419
public function setMutationResults ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Datastore \ V1 \ MutationResult :: class ) ; $ this -> mutation_results = $ arr ; return $ this ; }
The result of performing the mutations . The i - th mutation result corresponds to the i - th mutation in the request .
2,420
public static function instanceName ( $ project , $ location , $ instance ) { return self :: getInstanceNameTemplate ( ) -> render ( [ 'project' => $ project , 'location' => $ location , 'instance' => $ instance , ] ) ; }
Formats a string containing the fully - qualified path to represent a instance resource .
2,421
public function CreateInstance ( \ Google \ Cloud \ Bigtable \ Admin \ V2 \ CreateInstanceRequest $ argument , $ metadata = [ ] , $ options = [ ] ) { return $ this -> _simpleRequest ( '/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateInstance' , $ argument , [ '\Google\LongRunning\Operation' , 'decode' ] , $ metadata , $ options ) ; }
Create an instance within a project .
2,422
public function setStreamingConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Speech \ V1 \ StreamingRecognitionConfig :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; }
Provides information to the recognizer that specifies how to process the request . The first StreamingRecognizeRequest message must contain a streaming_config message .
2,423
public function setSource ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Vision \ V1 \ ImageSource :: class ) ; $ this -> source = $ var ; return $ this ; }
Google Cloud Storage image location or publicly - accessible image URL . If both content and source are provided for an image content takes precedence and is used to perform the image annotation request .
2,424
public function rowCounts ( ) { if ( ! $ this -> rowCounts ) { foreach ( $ this -> data [ 'resultSets' ] as $ resultSet ) { $ this -> rowCounts [ ] = $ resultSet [ 'stats' ] [ 'rowCountExact' ] ; } } return $ this -> rowCounts ; }
Get a list of integers indicating the number of modified rows for each successful statement .
2,425
public function get ( $ fieldPath ) { $ res = null ; if ( is_string ( $ fieldPath ) ) { $ parts = explode ( '.' , $ fieldPath ) ; } elseif ( $ fieldPath instanceof FieldPath ) { $ parts = $ fieldPath -> path ( ) ; } else { throw new \ InvalidArgumentException ( 'Given path was not a string or instance of FieldPath.' ) ; } $ len = count ( $ parts ) ; $ fields = $ this -> data ; foreach ( $ parts as $ idx => $ part ) { if ( $ idx === $ len - 1 && isset ( $ fields [ $ part ] ) ) { $ res = $ fields [ $ part ] ; break ; } else { if ( ! isset ( $ fields [ $ part ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Field path `%s` does not exist.' , $ fieldPath ) ) ; } $ fields = $ fields [ $ part ] ; } } return $ res ; }
Get a field by field path .
2,426
public function setEntityTypes ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dialogflow \ V2 \ EntityType :: class ) ; $ this -> entity_types = $ arr ; return $ this ; }
The list of agent entity types . There will be a maximum number of items returned based on the page_size field in the request .
2,427
public function setRuns ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ BigQuery \ DataTransfer \ V1 \ TransferRun :: class ) ; $ this -> runs = $ arr ; return $ this ; }
The transfer runs that were scheduled .
2,428
public function setType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ ProfileEvent_ProfileEventType :: class ) ; $ this -> type = $ var ; return $ this ; }
Required . Type of event .
2,429
public function setContext ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dialogflow \ V2 \ Context :: class ) ; $ this -> context = $ var ; return $ this ; }
Required . The context to create .
2,430
public function setFindings ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ Finding :: class ) ; $ this -> findings = $ arr ; return $ this ; }
List of findings for an item .
2,431
public function setDebuggees ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Debugger \ V2 \ Debuggee :: class ) ; $ this -> debuggees = $ arr ; return $ this ; }
List of debuggees accessible to the calling user . The fields debuggee . id and description are guaranteed to be set . The description field is a human readable field provided by agents and can be displayed to users .
2,432
public function setAssetDiscoveryConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ SecurityCenter \ V1 \ OrganizationSettings_AssetDiscoveryConfig :: class ) ; $ this -> asset_discovery_config = $ var ; return $ this ; }
The configuration used for Asset Discovery runs .
2,433
public function setJobBenefits ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: ENUM , \ Google \ Cloud \ Talent \ V4beta1 \ JobBenefit :: class ) ; $ this -> job_benefits = $ arr ; return $ this ; }
Optional . The benefits included with the job .
2,434
public function setDegreeTypes ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: ENUM , \ Google \ Cloud \ Talent \ V4beta1 \ DegreeType :: class ) ; $ this -> degree_types = $ arr ; return $ this ; }
Optional . The desired education degrees for the job such as Bachelors Masters .
2,435
public function setJobLevel ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ JobLevel :: class ) ; $ this -> job_level = $ var ; return $ this ; }
Optional . The experience level associated with the job such as Entry Level .
2,436
public function setDerivedInfo ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ Job_DerivedInfo :: class ) ; $ this -> derived_info = $ var ; return $ this ; }
Output only . Derived details about the job posting .
2,437
public function setProcessingOptions ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ Job_ProcessingOptions :: class ) ; $ this -> processing_options = $ var ; return $ this ; }
Optional . Options for job processing .
2,438
public function setUpdate ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Firestore \ V1beta1 \ Document :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; }
A document to write .
2,439
public function setTransform ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Firestore \ V1beta1 \ DocumentTransform :: class ) ; $ this -> writeOneof ( 6 , $ var ) ; return $ this ; }
Applies a transformation to a document . At most one transform per document is allowed in a given request . An update cannot follow a transform on the same document in a given request .
2,440
public function setUpdateMask ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Firestore \ V1beta1 \ DocumentMask :: class ) ; $ this -> update_mask = $ var ; return $ this ; }
The fields to update in this write . This field can be set only when the operation is update . If the mask is not set for an update and the document exists any existing data will be overwritten . If the mask is set and the document on the server has fields not covered by the mask they are left unchanged . Fields referenced in the mask but not present in the input document are deleted from the document on the server . The field paths in this mask must not contain a reserved field name .
2,441
public function setNewValue ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ Value :: class ) ; $ this -> new_value = $ var ; return $ this ; }
Value to replace it with .
2,442
protected function execute ( InputInterface $ input , OutputInterface $ output ) { if ( PHP_VERSION_ID < 50600 ) { throw new \ RuntimeException ( 'This command is only available in PHP 5.6 and later.' ) ; } $ execDir = $ this -> rootPath . '/' . self :: EXEC_DIR ; $ token = $ this -> githubToken ( $ input -> getOption ( 'token' ) ) ; $ shell = new RunShell ; $ guzzle = $ this -> guzzleClient ( ) ; $ github = $ this -> githubClient ( $ output , $ shell , $ guzzle , $ token ) ; $ split = $ this -> splitWrapper ( $ output , $ shell ) ; @ mkdir ( $ execDir ) ; $ splitBinaryPath = $ this -> splitshInstall ( $ output , $ shell , $ execDir , $ input -> getOption ( 'splitsh' ) ) ; $ componentId = $ input -> getOption ( 'component' ) ; $ components = $ this -> componentManager -> componentsExtra ( $ componentId ) ; $ components = array_filter ( $ components , function ( $ component , $ key ) { return $ key !== 'google-cloud' ; } , ARRAY_FILTER_USE_BOTH ) ; $ manifestPath = $ this -> rootPath . '/docs/manifest.json' ; $ parentTagSource = sprintf ( self :: PARENT_TAG_NAME , $ input -> getArgument ( 'parent' ) ) ; $ errors = [ ] ; foreach ( $ components as $ component ) { $ res = $ this -> processComponent ( $ output , $ github , $ split , $ component , $ splitBinaryPath , $ parentTagSource ) ; if ( ! $ res ) { $ errors [ ] = $ component [ 'id' ] ; } $ output -> writeln ( '' ) ; $ output -> writeln ( '' ) ; } if ( $ errors ) { $ output -> writeln ( '<error>[ERROR]</error>: One or more components reported an error.' ) ; $ output -> writeln ( 'Please correct errors and try again.' ) ; $ output -> writeln ( 'Error component(s): ' . implode ( ', ' , $ errors ) ) ; return 1 ; } return 0 ; }
Execute Split and Release process .
2,443
private function processComponent ( OutputInterface $ output , GitHub $ github , Split $ split , array $ component , $ splitBinaryPath , $ parentTagSource ) { $ output -> writeln ( '' ) ; $ localVersion = current ( $ this -> componentManager -> componentsVersion ( $ component [ 'id' ] ) ) ; $ isAlreadyTagged = $ github -> doesTagExist ( $ component [ 'target' ] , $ localVersion ) ; $ output -> writeln ( sprintf ( '<comment>%s</comment>: Starting on component. Target version <info>%s</info>' , $ component [ 'id' ] , $ localVersion ) ) ; $ this -> writeDiv ( $ output ) ; if ( $ isAlreadyTagged ) { $ output -> writeln ( sprintf ( 'Version <info>%s</info> already exists on target <info>%s</info>' , $ localVersion , $ component [ 'target' ] ) ) ; $ output -> writeln ( '<comment>[info]</comment> Skipping.' ) ; return true ; } $ output -> writeln ( sprintf ( '<comment>%s</comment>: Running splitsh' , $ component [ 'id' ] ) ) ; $ splitBranch = $ split -> execute ( $ splitBinaryPath , $ this -> rootPath , $ component [ 'path' ] ) ; if ( $ splitBranch ) { $ output -> writeln ( sprintf ( 'Split succeeded, branch <info>%s</info> created.' , $ splitBranch ) ) ; } else { $ output -> writeln ( '<error>Split failed!</error>' ) ; return false ; } $ output -> writeln ( '' ) ; $ output -> writeln ( sprintf ( '<comment>%s</comment>: Push to github target %s' , $ component [ 'id' ] , $ component [ 'target' ] ) ) ; $ res = $ github -> push ( $ component [ 'target' ] , $ splitBranch ) ; if ( $ res [ 0 ] ) { $ output -> writeln ( sprintf ( '<comment>%s</comment>: Push succeeded.' , $ component [ 'id' ] ) ) ; } else { $ output -> writeln ( sprintf ( '<error>%s</error>: Push failed.' , $ component [ 'id' ] ) ) ; return false ; } $ output -> writeln ( '' ) ; $ output -> writeln ( '<comment>[info]</comment> Creating GitHub tag.' ) ; $ notes = sprintf ( 'For release notes, please see the [associated Google Cloud PHP release](%s).' , $ parentTagSource ) ; $ res = $ github -> createRelease ( $ component [ 'target' ] , $ localVersion , $ component [ 'displayName' ] . ' ' . $ localVersion , $ notes ) ; if ( $ res ) { $ output -> writeln ( sprintf ( '<comment>%s</comment>: Tag succeeded.' , $ component [ 'id' ] ) ) ; } else { $ output -> writeln ( sprintf ( '<error>%s</error>: Tag failed.' , $ component [ 'id' ] ) ) ; return false ; } return true ; }
Process release for a given component .
2,444
protected function githubToken ( $ userToken ) { $ token = $ userToken ? : getenv ( self :: TOKEN_ENV ) ; if ( ! $ token ) { throw new \ RuntimeException ( sprintf ( 'Could not find GitHub auth token. Please set the environment ' . 'variable `%s` or pass token as console argument.' , self :: TOKEN_ENV ) ) ; } return $ token ; }
Fetch the GitHub auth token from the user or environment .
2,445
protected function githubClient ( OutputInterface $ output , RunShell $ shell , Client $ guzzle , $ token ) { $ output -> writeln ( '<comment>[info]</comment> Instantiating GitHub API Wrapper.' ) ; return new GitHub ( $ shell , $ guzzle , $ token ) ; }
Initialize the Github client .
2,446
protected function splitshInstall ( OutputInterface $ output , RunShell $ shell , $ execDir , $ binaryPath ) { if ( $ binaryPath ) { $ output -> writeln ( '<comment>[info]</comment> Using User-Provided Splitsh binary.' ) ; return $ binaryPath ; } $ output -> writeln ( '<comment>[info]</comment> Compiling Splitsh' ) ; $ this -> writeDiv ( $ output ) ; $ install = new SplitInstall ( $ shell , $ execDir ) ; $ res = $ install -> installFromSource ( $ this -> rootPath ) ; $ output -> writeln ( sprintf ( '<comment>[info]</comment> Splitsh Installer says <info>%s</info>' , $ res [ 0 ] ) ) ; return $ res [ 1 ] ; }
Install the Splitsh program .
2,447
public function mutateRows ( array $ rowMutations , array $ options = [ ] ) { if ( ! $ this -> isAssoc ( $ rowMutations ) ) { throw new \ InvalidArgumentException ( 'Expected rowMutations to be of type associative array, instead got list.' ) ; } $ entries = [ ] ; foreach ( $ rowMutations as $ rowKey => $ mutations ) { $ entries [ ] = $ this -> toEntry ( $ rowKey , $ mutations ) ; } $ this -> mutateRowsWithEntries ( $ entries , $ options ) ; }
Mutates rows in a table .
2,448
public function mutateRow ( $ rowKey , Mutations $ mutations , array $ options = [ ] ) { $ this -> gapicClient -> mutateRow ( $ this -> tableName , $ rowKey , $ mutations -> toProto ( ) , $ options + $ this -> options ) ; }
Mutates a row atomically . Cells already present in the row are left unchanged unless explicitly changed by mutations .
2,449
public function readRows ( array $ options = [ ] ) { $ rowKeys = $ this -> pluck ( 'rowKeys' , $ options , false ) ? : [ ] ; $ ranges = $ this -> pluck ( 'rowRanges' , $ options , false ) ? : [ ] ; $ filter = $ this -> pluck ( 'filter' , $ options , false ) ? : null ; array_walk ( $ ranges , function ( & $ range ) { $ range = $ this -> serializer -> decodeMessage ( new RowRange ( ) , $ range ) ; } ) ; if ( ! is_array ( $ rowKeys ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Expected rowKeys to be of type array, instead got \'%s\'.' , gettype ( $ rowKeys ) ) ) ; } if ( $ ranges || $ rowKeys ) { $ options [ 'rows' ] = $ this -> serializer -> decodeMessage ( new RowSet , [ 'rowKeys' => $ rowKeys , 'rowRanges' => $ ranges ] ) ; } if ( $ filter !== null ) { if ( ! $ filter instanceof FilterInterface ) { throw new \ InvalidArgumentException ( sprintf ( 'Expected filter to be of type \'%s\', instead got \'%s\'.' , FilterInterface :: class , gettype ( $ filter ) ) ) ; } $ options [ 'filter' ] = $ filter -> toProto ( ) ; } return new ChunkFormatter ( [ $ this -> gapicClient , 'readRows' ] , $ this -> tableName , $ options + $ this -> options ) ; }
Read rows from the table .
2,450
public function readRow ( $ rowKey , array $ options = [ ] ) { return $ this -> readRows ( [ 'rowKeys' => [ $ rowKey ] ] + $ options + $ this -> options ) -> readAll ( ) -> current ( ) ; }
Read a single row from the table .
2,451
public function checkAndMutateRow ( $ rowKey , array $ options = [ ] ) { $ hasSetMutations = false ; if ( isset ( $ options [ 'predicateFilter' ] ) ) { $ this -> convertToProto ( $ options , 'predicateFilter' , FilterInterface :: class ) ; } if ( isset ( $ options [ 'trueMutations' ] ) ) { $ this -> convertToProto ( $ options , 'trueMutations' , Mutations :: class ) ; $ hasSetMutations = true ; } if ( isset ( $ options [ 'falseMutations' ] ) ) { $ this -> convertToProto ( $ options , 'falseMutations' , Mutations :: class ) ; $ hasSetMutations = true ; } if ( ! $ hasSetMutations ) { throw new \ InvalidArgumentException ( 'checkAndMutateRow must have either trueMutations or falseMutations.' ) ; } return $ this -> gapicClient -> checkAndMutateRow ( $ this -> tableName , $ rowKey , $ options + $ this -> options ) -> getPredicateMatched ( ) ; }
Mutates the specified row atomically based on output of the filter .
2,452
public function setLabelExtractors ( $ var ) { $ arr = GPBUtil :: checkMapField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> label_extractors = $ arr ; return $ this ; }
Optional . A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value . Each label key specified in the LabelDescriptor must have an associated extractor expression in this map . The syntax of the extractor expression is the same as for the value_extractor field . The extracted value is converted to the type defined in the label descriptor . If the either the extraction or the type conversion fails the label will have a default value . The default value for a string label is an empty string for an integer label its 0 and for a boolean label its false . Note that there are upper bounds on the maximum number of labels and the number of active time series that are allowed in a project .
2,453
public function setVersion ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Logging \ V2 \ LogMetric_ApiVersion :: class ) ; $ this -> version = $ var ; return $ this ; }
Deprecated . The API version that created or updated this metric . The v2 format is used by default and cannot be changed .
2,454
public function setSpans ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Trace \ V2 \ Span :: class ) ; $ this -> spans = $ arr ; return $ this ; }
A list of new spans . The span names must not match existing spans or the results are undefined .
2,455
public function setInfoTypeTransformations ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ InfoTypeTransformations :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; }
Treat the dataset as free - form text and apply the same free text transformation everywhere .
2,456
public function setRecordTransformations ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ RecordTransformations :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
Treat the dataset as structured . Transformations can be applied to specific locations within structured datasets such as transforming a column within a table .
2,457
public function setStatus ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Tasks \ V2beta2 \ TaskStatus :: class ) ; $ this -> status = $ var ; return $ this ; }
Output only . The task status .
2,458
public function setType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Dlp \ V2 \ ByteContentItem_BytesType :: class ) ; $ this -> type = $ var ; return $ this ; }
The type of data stored in the bytes string . Default will be TEXT_UTF8 .
2,459
public static function jobName ( $ project , $ location , $ job ) { return self :: getJobNameTemplate ( ) -> render ( [ 'project' => $ project , 'location' => $ location , 'job' => $ job , ] ) ; }
Formats a string containing the fully - qualified path to represent a job resource .
2,460
public function deleteJob ( $ name , array $ optionalArgs = [ ] ) { $ request = new DeleteJobRequest ( ) ; $ request -> setName ( $ name ) ; $ requestParams = new RequestParamsHeaderDescriptor ( [ 'name' => $ request -> getName ( ) , ] ) ; $ optionalArgs [ 'headers' ] = isset ( $ optionalArgs [ 'headers' ] ) ? array_merge ( $ requestParams -> getHeader ( ) , $ optionalArgs [ 'headers' ] ) : $ requestParams -> getHeader ( ) ; return $ this -> startCall ( 'DeleteJob' , GPBEmpty :: class , $ optionalArgs , $ request ) -> wait ( ) ; }
Deletes a job .
2,461
public function setProjectRepoId ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ DevTools \ Source \ V1 \ ProjectRepoId :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; }
A combination of a project ID and a repo name .
2,462
public function setOperationType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Container \ V1 \ Operation_Type :: class ) ; $ this -> operation_type = $ var ; return $ this ; }
The operation type .
2,463
public function setSeverity ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Logging \ Type \ LogSeverity :: class ) ; $ this -> severity = $ var ; return $ this ; }
Optional . The severity of the log entry . The default value is LogSeverity . DEFAULT .
2,464
public function setHttpRequest ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Logging \ Type \ HttpRequest :: class ) ; $ this -> http_request = $ var ; return $ this ; }
Optional . Information about the HTTP request associated with this log entry if applicable .
2,465
public function setOperation ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Logging \ V2 \ LogEntryOperation :: class ) ; $ this -> operation = $ var ; return $ this ; }
Optional . Information about an operation associated with the log entry if applicable .
2,466
public function setSourceLocation ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Logging \ V2 \ LogEntrySourceLocation :: class ) ; $ this -> source_location = $ var ; return $ this ; }
Optional . Source code location information associated with the log entry if any .
2,467
public function setGatewayListOptions ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Iot \ V1 \ GatewayListOptions :: class ) ; $ this -> gateway_list_options = $ var ; return $ this ; }
Options related to gateways .
2,468
public function setTransferConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ BigQuery \ DataTransfer \ V1 \ TransferConfig :: class ) ; $ this -> transfer_config = $ var ; return $ this ; }
Data transfer configuration to create .
2,469
public function setIndexes ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Firestore \ Admin \ V1 \ Index :: class ) ; $ this -> indexes = $ arr ; return $ this ; }
The requested indexes .
2,470
public function synchronize ( callable $ func , array $ options = [ ] ) { $ result = null ; $ exception = null ; if ( $ this -> acquire ( $ options ) ) { try { $ result = $ func ( ) ; } catch ( \ Exception $ ex ) { $ exception = $ ex ; } $ this -> release ( ) ; } if ( $ exception ) { throw $ exception ; } return $ result ; }
Execute a callable within a lock . If an exception is caught during execution of the callable the lock will first be released before throwing it .
2,471
public function setCreate ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Bigtable \ Admin \ V2 \ ColumnFamily :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
Create a new column family with the specified schema or fail if one already exists with the given ID .
2,472
public function setLabels ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Api \ LabelDescriptor :: class ) ; $ this -> labels = $ arr ; return $ this ; }
The set of labels that must be defined to identify a particular channel of the corresponding type . Each label includes a description for how that field should be populated .
2,473
public function setSupportedTiers ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: ENUM , \ Google \ Cloud \ Monitoring \ V3 \ ServiceTier :: class ) ; $ this -> supported_tiers = $ arr ; return $ this ; }
The tiers that support this notification channel ; the project service tier must be one of the supported_tiers .
2,474
public function listClusters ( $ projectId , $ zone , array $ optionalArgs = [ ] ) { $ request = new ListClustersRequest ( ) ; $ request -> setProjectId ( $ projectId ) ; $ request -> setZone ( $ zone ) ; if ( isset ( $ optionalArgs [ 'parent' ] ) ) { $ request -> setParent ( $ optionalArgs [ 'parent' ] ) ; } $ requestParams = new RequestParamsHeaderDescriptor ( [ 'parent' => $ request -> getParent ( ) , ] ) ; $ optionalArgs [ 'headers' ] = isset ( $ optionalArgs [ 'headers' ] ) ? array_merge ( $ requestParams -> getHeader ( ) , $ optionalArgs [ 'headers' ] ) : $ requestParams -> getHeader ( ) ; return $ this -> startCall ( 'ListClusters' , ListClustersResponse :: class , $ optionalArgs , $ request ) -> wait ( ) ; }
Lists all clusters owned by a project in either the specified zone or all zones .
2,475
public function getCluster ( $ projectId , $ zone , $ clusterId , array $ optionalArgs = [ ] ) { $ request = new GetClusterRequest ( ) ; $ request -> setProjectId ( $ projectId ) ; $ request -> setZone ( $ zone ) ; $ request -> setClusterId ( $ clusterId ) ; if ( isset ( $ optionalArgs [ 'name' ] ) ) { $ request -> setName ( $ optionalArgs [ 'name' ] ) ; } $ requestParams = new RequestParamsHeaderDescriptor ( [ 'name' => $ request -> getName ( ) , ] ) ; $ optionalArgs [ 'headers' ] = isset ( $ optionalArgs [ 'headers' ] ) ? array_merge ( $ requestParams -> getHeader ( ) , $ optionalArgs [ 'headers' ] ) : $ requestParams -> getHeader ( ) ; return $ this -> startCall ( 'GetCluster' , Cluster :: class , $ optionalArgs , $ request ) -> wait ( ) ; }
Gets the details of a specific cluster .
2,476
public function setAction ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Debugger \ V2 \ ListBreakpointsRequest_BreakpointActionValue :: class ) ; $ this -> action = $ var ; return $ this ; }
When set the response includes only breakpoints with the specified action .
2,477
public function setResponses ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Vision \ V1 \ AsyncAnnotateFileResponse :: class ) ; $ this -> responses = $ arr ; return $ this ; }
The list of file annotation responses one for each request in AsyncBatchAnnotateFilesRequest .
2,478
public function setFeatures ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: ENUM , \ Google \ Cloud \ VideoIntelligence \ V1 \ Feature :: class ) ; $ this -> features = $ arr ; return $ this ; }
Requested video annotation features .
2,479
public function setCommonDefaults ( array $ config ) { $ config += [ 'authCache' => new MemoryCacheItemPool ( ) , 'authCacheOptions' => [ ] , 'credentialsFetcher' => null , 'keyFile' => null , 'requestTimeout' => null , 'retries' => 3 , 'scopes' => null ] ; if ( $ config [ 'credentialsFetcher' ] && ! $ config [ 'credentialsFetcher' ] instanceof FetchAuthTokenInterface ) { throw new \ InvalidArgumentException ( 'credentialsFetcher must implement FetchAuthTokenInterface.' ) ; } if ( ! $ config [ 'authCache' ] instanceof CacheItemPoolInterface ) { throw new \ InvalidArgumentException ( 'authCache must implement CacheItemPoolInterface.' ) ; } $ this -> authCache = $ config [ 'authCache' ] ; $ this -> authCacheOptions = $ config [ 'authCacheOptions' ] ; $ this -> credentialsFetcher = $ config [ 'credentialsFetcher' ] ; $ this -> retries = $ config [ 'retries' ] ; $ this -> scopes = $ config [ 'scopes' ] ; $ this -> keyFile = $ config [ 'keyFile' ] ; $ this -> requestTimeout = $ config [ 'requestTimeout' ] ; }
Sets common defaults between request wrappers .
2,480
public function setCropHints ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Vision \ V1 \ CropHint :: class ) ; $ this -> crop_hints = $ arr ; return $ this ; }
Crop hint results .
2,481
public function beginTransaction ( $ projectId , array $ optionalArgs = [ ] ) { $ request = new BeginTransactionRequest ( ) ; $ request -> setProjectId ( $ projectId ) ; if ( isset ( $ optionalArgs [ 'transactionOptions' ] ) ) { $ request -> setTransactionOptions ( $ optionalArgs [ 'transactionOptions' ] ) ; } $ requestParams = new RequestParamsHeaderDescriptor ( [ 'project_id' => $ request -> getProjectId ( ) , ] ) ; $ optionalArgs [ 'headers' ] = isset ( $ optionalArgs [ 'headers' ] ) ? array_merge ( $ requestParams -> getHeader ( ) , $ optionalArgs [ 'headers' ] ) : $ requestParams -> getHeader ( ) ; return $ this -> startCall ( 'BeginTransaction' , BeginTransactionResponse :: class , $ optionalArgs , $ request ) -> wait ( ) ; }
Begins a new transaction .
2,482
public function commit ( $ projectId , $ mode , $ mutations , array $ optionalArgs = [ ] ) { $ request = new CommitRequest ( ) ; $ request -> setProjectId ( $ projectId ) ; $ request -> setMode ( $ mode ) ; $ request -> setMutations ( $ mutations ) ; if ( isset ( $ optionalArgs [ 'transaction' ] ) ) { $ request -> setTransaction ( $ optionalArgs [ 'transaction' ] ) ; } $ requestParams = new RequestParamsHeaderDescriptor ( [ 'project_id' => $ request -> getProjectId ( ) , ] ) ; $ optionalArgs [ 'headers' ] = isset ( $ optionalArgs [ 'headers' ] ) ? array_merge ( $ requestParams -> getHeader ( ) , $ optionalArgs [ 'headers' ] ) : $ requestParams -> getHeader ( ) ; return $ this -> startCall ( 'Commit' , CommitResponse :: class , $ optionalArgs , $ request ) -> wait ( ) ; }
Commits a transaction optionally creating deleting or modifying some entities .
2,483
public function log ( $ level , $ message , array $ context = [ ] ) { $ this -> validateLogLevel ( $ level ) ; $ options = [ ] ; if ( isset ( $ context [ 'exception' ] ) && ( $ context [ 'exception' ] instanceof \ Exception || $ context [ 'exception' ] instanceof \ Throwable ) ) { $ context [ 'exception' ] = ( string ) $ context [ 'exception' ] ; } if ( isset ( $ context [ 'stackdriverOptions' ] ) ) { $ options = $ context [ 'stackdriverOptions' ] ; unset ( $ context [ 'stackdriverOptions' ] ) ; } $ formatter = new NormalizerFormatter ( ) ; $ processor = new PsrLogMessageProcessor ( ) ; $ processedData = $ processor ( [ 'message' => ( string ) $ message , 'context' => $ formatter -> format ( $ context ) ] ) ; $ jsonPayload = [ $ this -> messageKey => $ processedData [ 'message' ] ] ; $ labels = $ this -> getLabels ( ) ; if ( ! empty ( $ labels ) ) { $ options [ 'labels' ] = ( isset ( $ options [ 'labels' ] ) ? $ options [ 'labels' ] : [ ] ) + $ labels ; if ( isset ( $ labels [ 'appengine.googleapis.com/trace_id' ] ) ) { $ options [ 'trace' ] = $ labels [ 'appengine.googleapis.com/trace_id' ] ; } } $ resource = $ this -> metadataProvider -> monitoredResource ( ) ; if ( ! empty ( $ resource ) ) { $ options [ 'resource' ] = ( isset ( $ options [ 'resource' ] ) ? $ options [ 'resource' ] : [ ] ) + $ resource ; } $ entry = $ this -> logger -> entry ( $ jsonPayload + $ processedData [ 'context' ] , $ options + [ 'severity' => $ level ] ) ; $ this -> sendEntry ( $ entry ) ; }
Write a log entry .
2,484
public function serialize ( ) { $ debugOutputResource = null ; if ( is_resource ( $ this -> debugOutputResource ) ) { $ metadata = stream_get_meta_data ( $ this -> debugOutputResource ) ; $ debugOutputResource = [ 'uri' => $ metadata [ 'uri' ] , 'mode' => $ metadata [ 'mode' ] ] ; } return serialize ( [ $ this -> messageKey , $ this -> batchEnabled , $ this -> metadataProvider , $ this -> debugOutput , $ this -> clientConfig , $ this -> batchMethod , $ this -> logName , $ debugOutputResource ] ) ; }
Serializes data .
2,485
public function unserialize ( $ data ) { list ( $ this -> messageKey , $ this -> batchEnabled , $ this -> metadataProvider , $ this -> debugOutput , $ this -> clientConfig , $ this -> batchMethod , $ this -> logName , $ debugOutputResource ) = unserialize ( $ data ) ; if ( is_array ( $ debugOutputResource ) ) { $ this -> debugOutputResource = fopen ( $ debugOutputResource [ 'uri' ] , $ debugOutputResource [ 'mode' ] ) ; } }
Unserializes data .
2,486
private function validateLogLevel ( $ level ) { $ map = Logger :: getLogLevelMap ( ) ; $ level = ( string ) $ level ; if ( isset ( $ map [ $ level ] ) || isset ( array_flip ( $ map ) [ strtoupper ( $ level ) ] ) ) { return true ; } throw new InvalidArgumentException ( "Severity level '$level' is not defined." ) ; }
Validates whether or not the provided log level exists .
2,487
private function sendEntry ( Entry $ entry ) { if ( $ this -> batchEnabled ) { $ this -> batchRunner -> submitItem ( $ this -> identifier , $ entry ) ; return ; } $ this -> logger -> write ( $ entry ) ; }
Send the given entry .
2,488
public function create ( array $ options = [ ] ) { if ( ! $ this -> info [ 'subscription' ] ) { throw new \ BadMethodCallException ( 'A subscription is required to create a snapshot.' ) ; } return $ this -> info = $ this -> connection -> createSnapshot ( [ 'project' => $ this -> formatName ( 'project' , $ this -> projectId ) , 'name' => $ this -> name , 'subscription' => $ this -> info [ 'subscription' ] ] ) ; }
Create a new Snapshot .
2,489
public function topic ( ) { if ( $ this -> info [ 'topic' ] ) { return new Topic ( $ this -> connection , $ this -> projectId , $ this -> info [ 'topic' ] , $ this -> encode , [ ] , $ this -> clientConfig ) ; } return null ; }
Get the Topic attached to the snapshot if one exists .
2,490
public function subscription ( ) { return $ this -> info [ 'subscription' ] ? new Subscription ( $ this -> connection , $ this -> projectId , $ this -> info [ 'subscription' ] , null , $ this -> encode ) : null ; }
Get the Subscription attached to the snapshot if one exists .
2,491
public function info ( ) { $ data = [ 'id' => $ this -> id , 'type' => $ this -> type ] ; if ( $ this -> uncompressedSizeBytes ) { $ data [ 'uncompressedSizeBytes' ] = $ this -> uncompressedSizeBytes ; } if ( $ this -> compressedSizeBytes ) { $ data [ 'compressedSizeBytes' ] = $ this -> compressedSizeBytes ; } return [ 'time' => $ this -> time , 'messageEvent' => $ data ] ; }
Returns a serializable array representing this MessageEvent .
2,492
public function setPersonNames ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Talent \ V4beta1 \ PersonName :: class ) ; $ this -> person_names = $ arr ; return $ this ; }
Optional . The names of the candidate this profile references . Currently only one person name is supported .
2,493
public function setAddresses ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Talent \ V4beta1 \ Address :: class ) ; $ this -> addresses = $ arr ; return $ this ; }
Optional . The candidate s postal addresses .
2,494
public function setEmailAddresses ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Talent \ V4beta1 \ Email :: class ) ; $ this -> email_addresses = $ arr ; return $ this ; }
Optional . The candidate s email addresses .
2,495
public function setPersonalUris ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Talent \ V4beta1 \ PersonalUri :: class ) ; $ this -> personal_uris = $ arr ; return $ this ; }
Optional . The candidate s personal URIs .
2,496
public function setSkills ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Talent \ V4beta1 \ Skill :: class ) ; $ this -> skills = $ arr ; return $ this ; }
Optional . The skill set of the candidate . It s highly recommended to provide as much information as possible to help improve the search quality .
2,497
public function setPublications ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Talent \ V4beta1 \ Publication :: class ) ; $ this -> publications = $ arr ; return $ this ; }
Optional . The publications published by the candidate .
2,498
public function setPatents ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Talent \ V4beta1 \ Patent :: class ) ; $ this -> patents = $ arr ; return $ this ; }
Optional . The patents acquired by the candidate .
2,499
public function setCertifications ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Talent \ V4beta1 \ Certification :: class ) ; $ this -> certifications = $ arr ; return $ this ; }
Optional . The certifications acquired by the candidate .