idx
int64 0
60.3k
| question
stringlengths 101
6.21k
| target
stringlengths 7
803
|
|---|---|---|
2,500
|
public function setApplications ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> applications = $ arr ; return $ this ; }
|
Output only . The resource names of the candidate s applications .
|
2,501
|
public function setAssignments ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> assignments = $ arr ; return $ this ; }
|
Output only . The resource names of the candidate s assignments .
|
2,502
|
private function createClient ( $ class , $ packageName , array $ config = [ ] ) { if ( class_exists ( $ class ) ) { return new $ class ( $ this -> resolveConfig ( $ config + $ this -> config ) ) ; } throw new \ Exception ( sprintf ( 'The google/cloud-%s package is missing and must be installed.' , $ packageName ) ) ; }
|
Create the client library or error if not installed .
|
2,503
|
private function resolveConfig ( array $ config ) { if ( ! isset ( $ config [ 'httpHandler' ] ) ) { $ config [ 'httpHandler' ] = HttpHandlerFactory :: build ( ) ; } if ( ! isset ( $ config [ 'asyncHttpHandler' ] ) ) { $ isGuzzleHandler = $ config [ 'httpHandler' ] instanceof Guzzle6HttpHandler || $ config [ 'httpHandler' ] instanceof Guzzle5HttpHandler ; $ config [ 'asyncHttpHandler' ] = $ isGuzzleHandler ? [ $ config [ 'httpHandler' ] , 'async' ] : [ HttpHandlerFactory :: build ( ) , 'async' ] ; } return array_merge ( $ this -> config , $ config ) ; }
|
Resolves configuration options .
|
2,504
|
public function setField ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ FieldId :: class ) ; $ this -> field = $ var ; return $ this ; }
|
Set if the transformation was limited to a specific FieldId .
|
2,505
|
public function setTransformation ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ PrimitiveTransformation :: class ) ; $ this -> transformation = $ var ; return $ this ; }
|
The specific transformation these stats apply to .
|
2,506
|
public function setFieldTransformations ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ FieldTransformation :: class ) ; $ this -> field_transformations = $ arr ; return $ this ; }
|
The field transformation that was applied . If multiple field transformations are requested for a single field this list will contain all of them ; otherwise only one is supplied .
|
2,507
|
public function setRecordSuppress ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ RecordSuppression :: class ) ; $ this -> record_suppress = $ var ; return $ this ; }
|
The specific suppression option these stats apply to .
|
2,508
|
public function setRotatedBoundingBox ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ VideoIntelligence \ V1 \ NormalizedBoundingPoly :: class ) ; $ this -> rotated_bounding_box = $ var ; return $ this ; }
|
Bounding polygon of the detected text for this frame .
|
2,509
|
public function save ( JobConfig $ config ) { $ shmid = shm_attach ( $ this -> sysvKey , $ this -> shmSize , $ this -> perm ) ; if ( $ shmid === false ) { throw new \ RuntimeException ( 'Failed to attach to the shared memory' ) ; } try { $ result = shm_put_var ( $ shmid , self :: VAR_KEY , $ config ) ; } catch ( \ Exception $ e ) { $ this -> clear ( ) ; throw new \ RuntimeException ( $ e -> getMessage ( ) ) ; } finally { shm_detach ( $ shmid ) ; } return $ result ; }
|
Save the given JobConfig .
|
2,510
|
public function load ( ) { $ shmid = shm_attach ( $ this -> sysvKey , $ this -> shmSize , $ this -> perm ) ; if ( $ shmid === false ) { throw new \ RuntimeException ( 'Failed to attach to the shared memory' ) ; } if ( ! shm_has_var ( $ shmid , self :: VAR_KEY ) ) { $ result = new JobConfig ( ) ; } else { $ result = shm_get_var ( $ shmid , self :: VAR_KEY ) ; } shm_detach ( $ shmid ) ; if ( $ result === false ) { throw new \ RuntimeException ( 'Failed to deserialize data from shared memory' ) ; } return $ result ; }
|
Load a JobConfig from the storage .
|
2,511
|
public function clear ( ) { $ shmid = shm_attach ( $ this -> sysvKey , $ this -> shmSize , $ this -> perm ) ; shm_remove_var ( $ shmid , self :: VAR_KEY ) ; }
|
Clear the JobConfig from storage .
|
2,512
|
public function setUnreachable ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> unreachable = $ arr ; return $ this ; }
|
Locations that could not be reached .
|
2,513
|
public function send ( callable $ request , array $ args , $ whitelisted = false ) { $ requestOptions = $ this -> pluckArray ( [ 'grpcOptions' , 'retries' , 'requestTimeout' ] , $ args [ count ( $ args ) - 1 ] ) ; try { return $ this -> requestWrapper -> send ( $ request , $ args , $ requestOptions ) ; } catch ( NotFoundException $ e ) { if ( $ whitelisted ) { throw $ this -> modifyWhitelistedError ( $ e ) ; } throw $ e ; } }
|
Delivers a request .
|
2,514
|
private function getGaxConfig ( $ version , callable $ authHttpHandler = null ) { $ config = [ 'libName' => 'gccl' , 'libVersion' => $ version , 'transport' => 'grpc' ] ; if ( class_exists ( CredentialsWrapper :: class ) ) { $ config [ 'credentials' ] = new CredentialsWrapper ( $ this -> requestWrapper -> getCredentialsFetcher ( ) , $ authHttpHandler ) ; } else { $ config += [ 'credentialsLoader' => $ this -> requestWrapper -> getCredentialsFetcher ( ) , 'authHttpHandler' => $ authHttpHandler , 'enableCaching' => false ] ; } return $ config ; }
|
Gets the default configuration for generated clients .
|
2,515
|
private function formatStructForApi ( array $ fields ) { $ fFields = [ ] ; foreach ( $ fields as $ key => $ value ) { $ fFields [ $ key ] = $ this -> formatValueForApi ( $ value ) ; } return [ 'fields' => $ fFields ] ; }
|
Format a struct for the API .
|
2,516
|
private function formatListForApi ( array $ list ) { $ values = [ ] ; foreach ( $ list as $ value ) { $ values [ ] = $ this -> formatValueForApi ( $ value ) ; } return [ 'values' => $ values ] ; }
|
Format a list for the API .
|
2,517
|
private function formatValueForApi ( $ value ) { $ type = gettype ( $ value ) ; switch ( $ type ) { case 'string' : return [ 'string_value' => $ value ] ; case 'double' : case 'integer' : return [ 'number_value' => $ value ] ; case 'boolean' : return [ 'bool_value' => $ value ] ; case 'NULL' : return [ 'null_value' => NullValue :: NULL_VALUE ] ; case 'array' : if ( ! empty ( $ value ) && $ this -> isAssoc ( $ value ) ) { return [ 'struct_value' => $ this -> formatStructForApi ( $ value ) ] ; } return [ 'list_value' => $ this -> formatListForApi ( $ value ) ] ; } }
|
Format a value for the API .
|
2,518
|
private function formatTimestampFromApi ( array $ timestamp ) { $ timestamp += [ 'seconds' => 0 , 'nanos' => 0 ] ; $ dt = $ this -> createDateTimeFromSeconds ( $ timestamp [ 'seconds' ] ) ; return $ this -> formatTimeAsString ( $ dt , $ timestamp [ 'nanos' ] ) ; }
|
Format a gRPC timestamp to match the format returned by the REST API .
|
2,519
|
public function setModel ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ AutoMl \ V1beta1 \ Model :: class ) ; $ this -> model = $ var ; return $ this ; }
|
The model to create .
|
2,520
|
private function fullName ( $ projectId , $ database , $ relativeName = null ) { return $ relativeName !== null ? FirestoreGapicClient :: documentPathName ( $ projectId , $ database , $ relativeName ) : FirestoreGapicClient :: documentRootName ( $ projectId , $ database ) ; }
|
Create a full name from a project database and relative path .
|
2,521
|
private function databaseIdFromName ( $ name ) { try { $ parsed = FirestoreGapicClient :: parseName ( $ name ) ; } catch ( ValidationException $ e ) { return null ; } return isset ( $ parsed [ 'database' ] ) ? $ parsed [ 'database' ] : null ; }
|
Return the database ID from a fully - qualified path name .
|
2,522
|
private function isDocument ( $ name ) { if ( ! $ this -> isRelative ( $ name ) ) { $ name = $ this -> relativeName ( $ name ) ; } $ parts = $ this -> splitName ( $ name ) ; return count ( $ parts ) > 0 && count ( $ parts ) % 2 === 0 ; }
|
Determine whether the given path is a document .
|
2,523
|
private function isCollection ( $ name ) { if ( ! $ this -> isRelative ( $ name ) ) { $ name = $ this -> relativeName ( $ name ) ; } $ parts = $ this -> splitName ( $ name ) ; return count ( $ parts ) % 2 === 1 ; }
|
Determine whether the given path is a collection .
|
2,524
|
private function pathId ( $ name ) { $ parts = $ this -> splitName ( $ name ) ; if ( $ parts [ 0 ] === '' ) { return null ; } return end ( $ parts ) ; }
|
Return the identifier from a path .
|
2,525
|
private function parentPath ( $ name ) { $ parts = $ this -> splitName ( $ name ) ; array_pop ( $ parts ) ; return implode ( '/' , $ parts ) ; }
|
Get the current path s parent .
|
2,526
|
private function randomName ( $ parent ) { $ rand = substr ( str_replace ( '-' , '' , Uuid :: uuid4 ( ) ) , 0 , 20 ) ; return $ this -> childPath ( $ parent , $ rand ) ; }
|
Create a random name .
|
2,527
|
public function setTimeRange ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Bigtable \ V2 \ TimestampRange :: class ) ; $ this -> time_range = $ var ; return $ this ; }
|
The range of timestamps within which cells should be deleted .
|
2,528
|
public function setStoredInfoTypes ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ StoredInfoType :: class ) ; $ this -> stored_info_types = $ arr ; return $ this ; }
|
List of storedInfoTypes up to page_size in ListStoredInfoTypesRequest .
|
2,529
|
public function setStackFrames ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Trace \ V2 \ StackTrace_StackFrames :: class ) ; $ this -> stack_frames = $ var ; return $ this ; }
|
Stack frames in this stack trace . A maximum of 128 frames are allowed .
|
2,530
|
public function setTransferType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ BigQuery \ DataTransfer \ V1 \ TransferType :: class ) ; $ this -> transfer_type = $ var ; return $ this ; }
|
Deprecated . This field has no effect .
|
2,531
|
public function setParameters ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ BigQuery \ DataTransfer \ V1 \ DataSourceParameter :: class ) ; $ this -> parameters = $ arr ; return $ this ; }
|
Data source parameters .
|
2,532
|
public function setAuthorizationType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ BigQuery \ DataTransfer \ V1 \ DataSource_AuthorizationType :: class ) ; $ this -> authorization_type = $ var ; return $ this ; }
|
Indicates the type of authorization .
|
2,533
|
public function setDataRefreshType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ BigQuery \ DataTransfer \ V1 \ DataSource_DataRefreshType :: class ) ; $ this -> data_refresh_type = $ var ; return $ this ; }
|
Specifies whether the data source supports automatic data refresh for the past few days and how it s supported . For some data sources data might not be complete until a few days later so it s useful to refresh data automatically .
|
2,534
|
public function add ( array $ fields = [ ] , array $ options = [ ] ) { $ name = $ this -> randomName ( $ this -> name ) ; $ document = $ this -> documentFactory ( $ name ) ; $ result = $ document -> create ( $ fields , $ options ) ; return $ document ; }
|
Generate a new document reference and insert it with the given field data .
|
2,535
|
public function listDocuments ( array $ options = [ ] ) { $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; $ options += [ 'parent' => $ this -> parentPath ( $ this -> name ) , 'collectionId' => $ this -> pathId ( $ this -> name ) , 'mask' => [ ] ] ; return new ItemIterator ( new PageIterator ( function ( $ document ) { return $ this -> documentFactory ( $ document [ 'name' ] ) ; } , [ $ this -> connection , 'listDocuments' ] , $ options , [ 'itemsKey' => 'documents' , 'resultLimit' => $ resultLimit ] ) ) ; }
|
List all documents in the collection .
|
2,536
|
public function setStringValue ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Trace \ V2 \ TruncatableString :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; }
|
A string up to 256 bytes long .
|
2,537
|
public function setCategories ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Language \ V1 \ ClassificationCategory :: class ) ; $ this -> categories = $ arr ; return $ this ; }
|
Categories identified in the input document .
|
2,538
|
public function flush ( ) { $ id = $ this -> batchRunner -> getJobFromId ( $ this -> identifier ) -> id ( ) ; return $ this -> batchRunner -> getProcessor ( ) -> flush ( $ id ) ; }
|
Flushes items in the batch queue that have yet to be delivered . Please note this will have no effect when using the batch daemon .
|
2,539
|
public function send ( array $ items ) { $ start = microtime ( true ) ; try { call_user_func_array ( $ this -> getCallback ( ) , [ $ items ] ) ; } catch ( \ Exception $ e ) { if ( $ this -> debugOutput ) { fwrite ( $ this -> debugOutputResource , $ e -> getMessage ( ) . PHP_EOL . PHP_EOL . $ e -> getTraceAsString ( ) . PHP_EOL ) ; } return false ; } $ end = microtime ( true ) ; if ( $ this -> debugOutput ) { fwrite ( $ this -> debugOutputResource , sprintf ( '%f seconds for %s: %d items' . PHP_EOL , $ end - $ start , $ this -> batchMethod , count ( $ items ) ) ) ; fwrite ( $ this -> debugOutputResource , sprintf ( 'memory used: %d' . PHP_EOL , memory_get_usage ( ) ) ) ; } return true ; }
|
Deliver a list of items in a batch call .
|
2,540
|
public function setSpeechEventType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Speech \ V1 \ StreamingRecognizeResponse_SpeechEventType :: class ) ; $ this -> speech_event_type = $ var ; return $ this ; }
|
Output only . Indicates the type of speech event .
|
2,541
|
public function batchGetAssetsHistory ( $ parent , $ contentType , $ readTimeWindow , array $ optionalArgs = [ ] ) { $ request = new BatchGetAssetsHistoryRequest ( ) ; $ request -> setParent ( $ parent ) ; $ request -> setContentType ( $ contentType ) ; $ request -> setReadTimeWindow ( $ readTimeWindow ) ; if ( isset ( $ optionalArgs [ 'assetNames' ] ) ) { $ request -> setAssetNames ( $ optionalArgs [ 'assetNames' ] ) ; } $ requestParams = new RequestParamsHeaderDescriptor ( [ 'parent' => $ request -> getParent ( ) , ] ) ; $ optionalArgs [ 'headers' ] = isset ( $ optionalArgs [ 'headers' ] ) ? array_merge ( $ requestParams -> getHeader ( ) , $ optionalArgs [ 'headers' ] ) : $ requestParams -> getHeader ( ) ; return $ this -> startCall ( 'BatchGetAssetsHistory' , BatchGetAssetsHistoryResponse :: class , $ optionalArgs , $ request ) -> wait ( ) ; }
|
Batch gets the update history of assets that overlap a time window . For RESOURCE content this API outputs history with asset in both non - delete or deleted status . For IAM_POLICY content this API outputs history when the asset and its attached IAM POLICY both exist . This can create gaps in the output history .
|
2,542
|
private function pluckName ( $ type , $ name ) { if ( ! isset ( $ this -> regexes [ $ type ] ) ) { throw new InvalidArgumentException ( sprintf ( 'Regex `%s` is not defined' , $ type ) ) ; } $ matches = [ ] ; $ res = preg_match ( $ this -> regexes [ $ type ] , $ name , $ matches ) ; return ( $ res === 1 ) ? $ matches [ 1 ] : null ; }
|
Convert a fully - qualified name into a simple name .
|
2,543
|
private function formatName ( $ type , $ name , $ projectId = null ) { if ( ! isset ( $ this -> templates [ $ type ] ) ) { throw new InvalidArgumentException ( sprintf ( 'Template `%s` is not defined' , $ type ) ) ; } return vsprintf ( $ this -> templates [ $ type ] , [ $ name , $ projectId ] ) ; }
|
Convert a simple name into the fully - qualified name required by the API .
|
2,544
|
private function isFullyQualifiedName ( $ type , $ name ) { if ( ! isset ( $ this -> regexes [ $ type ] ) ) { throw new InvalidArgumentException ( sprintf ( 'Regex `%s` is not defined' , $ type ) ) ; } return ( preg_match ( $ this -> regexes [ $ type ] , $ name ) === 1 ) ; }
|
Check if a name of a give type is a fully - qualified resource name .
|
2,545
|
public function setLink ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Trace \ V2 \ Span \ Link :: class ) ; $ this -> link = $ arr ; return $ this ; }
|
A collection of links .
|
2,546
|
public function setGroup ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Monitoring \ V3 \ Group :: class ) ; $ this -> group = $ arr ; return $ this ; }
|
The groups that match the specified filters .
|
2,547
|
private function validateValue ( $ value , $ type , $ allowNull = false ) { if ( ! is_numeric ( $ value ) && ( ! $ allowNull || ( $ allowNull && $ value !== null ) ) ) { throw new InvalidArgumentException ( sprintf ( 'Given %s must be a numeric value.' , $ type ) ) ; } return $ allowNull && $ value === null ? $ value : ( float ) $ value ; }
|
Check a given value s validity as a coordinate .
|
2,548
|
public function fromBigQuery ( array $ value , array $ schema ) { $ value = $ value [ 'v' ] ; if ( isset ( $ schema [ 'mode' ] ) ) { if ( $ schema [ 'mode' ] === 'REPEATED' ) { return $ this -> repeatedValueFromBigQuery ( $ value , $ schema ) ; } if ( $ schema [ 'mode' ] === 'NULLABLE' && $ value === null ) { return $ value ; } } switch ( $ schema [ 'type' ] ) { case self :: TYPE_BOOLEAN : return $ value === 'true' ; case self :: TYPE_INTEGER : return $ this -> returnInt64AsObject ? new Int64 ( $ value ) : ( int ) $ value ; case self :: TYPE_FLOAT : return ( float ) $ value ; case self :: TYPE_NUMERIC : return new Numeric ( $ value ) ; case self :: TYPE_STRING : return ( string ) $ value ; case self :: TYPE_BYTES : return new Bytes ( base64_decode ( $ value ) ) ; case self :: TYPE_DATE : return new Date ( new \ DateTime ( $ value ) ) ; case self :: TYPE_DATETIME : return new \ DateTime ( $ value ) ; case self :: TYPE_TIME : return new Time ( new \ DateTime ( $ value ) ) ; case self :: TYPE_TIMESTAMP : return $ this -> timestampFromBigQuery ( $ value ) ; case self :: TYPE_RECORD : return $ this -> recordFromBigQuery ( $ value , $ schema [ 'fields' ] ) ; default : throw new \ InvalidArgumentException ( sprintf ( 'Unrecognized value type %s. Please ensure you are using the latest version of google/cloud.' , $ schema [ 'type' ] ) ) ; break ; } }
|
Maps a value coming from BigQuery to the expected format for use in the library .
|
2,549
|
public function toBigQuery ( $ value ) { if ( $ value instanceof ValueInterface || $ value instanceof Int64 ) { return ( string ) $ value ; } if ( $ value instanceof \ DateTime ) { return $ value -> format ( self :: DATETIME_FORMAT_INSERT ) ; } if ( is_array ( $ value ) ) { foreach ( $ value as $ key => $ item ) { $ value [ $ key ] = $ this -> toBigQuery ( $ item ) ; } return $ value ; } return $ value ; }
|
Maps a user provided value to the expected BigQuery format .
|
2,550
|
public function toParameter ( $ value ) { $ pValue = [ 'value' => $ value ] ; $ type = gettype ( $ value ) ; switch ( $ type ) { case 'boolean' : $ pType [ 'type' ] = self :: TYPE_BOOL ; break ; case 'integer' : $ pType [ 'type' ] = self :: TYPE_INT64 ; break ; case 'double' : $ pType [ 'type' ] = self :: TYPE_FLOAT64 ; break ; case 'string' : $ pType [ 'type' ] = self :: TYPE_STRING ; break ; case 'resource' : $ pType [ 'type' ] = self :: TYPE_BYTES ; $ pValue [ 'value' ] = base64_encode ( stream_get_contents ( $ value ) ) ; break ; case 'object' : list ( $ pType , $ pValue ) = $ this -> objectToParameter ( $ value ) ; break ; case 'array' : list ( $ pType , $ pValue ) = $ this -> isAssoc ( $ value ) ? $ this -> assocArrayToParameter ( $ value ) : $ this -> arrayToParameter ( $ value ) ; break ; default : throw new \ InvalidArgumentException ( sprintf ( 'Unrecognized value type %s. Please ensure you are using the latest version of google/cloud.' , $ type ) ) ; break ; } return [ 'parameterType' => $ pType , 'parameterValue' => $ pValue ] ; }
|
Maps a value to the expected parameter format .
|
2,551
|
public function setAspect ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Language \ V1 \ PartOfSpeech_Aspect :: class ) ; $ this -> aspect = $ var ; return $ this ; }
|
The grammatical aspect .
|
2,552
|
public function setMood ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Language \ V1 \ PartOfSpeech_Mood :: class ) ; $ this -> mood = $ var ; return $ this ; }
|
The grammatical mood .
|
2,553
|
public function setPerson ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Language \ V1 \ PartOfSpeech_Person :: class ) ; $ this -> person = $ var ; return $ this ; }
|
The grammatical person .
|
2,554
|
public function setReciprocity ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Language \ V1 \ PartOfSpeech_Reciprocity :: class ) ; $ this -> reciprocity = $ var ; return $ this ; }
|
The grammatical reciprocity .
|
2,555
|
public function setTense ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Language \ V1 \ PartOfSpeech_Tense :: class ) ; $ this -> tense = $ var ; return $ this ; }
|
The grammatical tense .
|
2,556
|
public function setVoice ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Language \ V1 \ PartOfSpeech_Voice :: class ) ; $ this -> voice = $ var ; return $ this ; }
|
The grammatical voice .
|
2,557
|
public function setSsmlGender ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ TextToSpeech \ V1 \ SsmlVoiceGender :: class ) ; $ this -> ssml_gender = $ var ; return $ this ; }
|
The gender of this voice .
|
2,558
|
public function retryAll ( ) { foreach ( $ this -> getFailedFiles ( ) as $ file ) { $ tmpFile = dirname ( $ file ) . '/retrying-' . basename ( $ file ) ; rename ( $ file , $ tmpFile ) ; $ fp = @ fopen ( $ tmpFile , 'r' ) ; if ( $ fp === false ) { fwrite ( STDERR , sprintf ( 'Could not open the file: %s' . PHP_EOL , $ tmpFile ) ) ; continue ; } while ( $ line = fgets ( $ fp ) ) { $ a = unserialize ( $ line ) ; $ idNum = key ( $ a ) ; $ job = $ this -> runner -> getJobFromIdNum ( $ idNum ) ; if ( ! $ job -> callFunc ( $ a [ $ idNum ] ) ) { $ this -> handleFailure ( $ idNum , $ a [ $ idNum ] ) ; } } @ fclose ( $ fp ) ; @ unlink ( $ tmpFile ) ; } }
|
Retry all the failed items .
|
2,559
|
public function setReadOnly ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Firestore \ V1beta1 \ TransactionOptions_ReadOnly :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
|
The transaction can only be used for read operations .
|
2,560
|
public function setReadWrite ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Firestore \ V1beta1 \ TransactionOptions_ReadWrite :: class ) ; $ this -> writeOneof ( 3 , $ var ) ; return $ this ; }
|
The transaction can be used for both read and write operations .
|
2,561
|
public static function alertPolicyConditionName ( $ project , $ alertPolicy , $ condition ) { return self :: getAlertPolicyConditionNameTemplate ( ) -> render ( [ 'project' => $ project , 'alert_policy' => $ alertPolicy , 'condition' => $ condition , ] ) ; }
|
Formats a string containing the fully - qualified path to represent a alert_policy_condition resource .
|
2,562
|
public function setThreatTypes ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: ENUM , \ Google \ Cloud \ WebRisk \ V1beta1 \ ThreatType :: class ) ; $ this -> threat_types = $ arr ; return $ this ; }
|
Required . The ThreatLists to search in .
|
2,563
|
public function setReadConsistency ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Datastore \ V1 \ ReadOptions_ReadConsistency :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; }
|
The non - transactional read consistency to use . Cannot be set to STRONG for global queries .
|
2,564
|
public function setItems ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dialogflow \ V2 \ Intent \ Message \ CarouselSelect \ Item :: class ) ; $ this -> items = $ arr ; return $ this ; }
|
Required . Carousel items .
|
2,565
|
public function submit ( $ item , $ idNum ) { if ( ! $ this -> hasShutdownHookRegistered ) { register_shutdown_function ( [ $ this , 'shutdown' ] ) ; $ this -> hasShutdownHookRegistered = true ; } if ( ! array_key_exists ( $ idNum , $ this -> items ) ) { $ this -> items [ $ idNum ] = [ ] ; $ this -> lastInvoked [ $ idNum ] = $ this -> created ; } $ this -> items [ $ idNum ] [ ] = $ item ; $ job = $ this -> config -> getJobFromIdNum ( $ idNum ) ; $ batchSize = $ job -> getBatchSize ( ) ; $ period = $ job -> getCallPeriod ( ) ; if ( ( count ( $ this -> items [ $ idNum ] ) >= $ batchSize ) || ( count ( $ this -> items [ $ idNum ] ) !== 0 && microtime ( true ) > $ this -> lastInvoked [ $ idNum ] + $ period ) ) { $ this -> flush ( $ idNum ) ; $ this -> items [ $ idNum ] = [ ] ; $ this -> lastInvoked [ $ idNum ] = microtime ( true ) ; } }
|
Hold the items in memory and run the job in the same process when it meets the condition .
|
2,566
|
public function flush ( $ idNum ) { if ( isset ( $ this -> items [ $ idNum ] ) ) { $ job = $ this -> config -> getJobFromIdNum ( $ idNum ) ; if ( ! $ job -> flush ( $ this -> items [ $ idNum ] ) ) { $ this -> handleFailure ( $ idNum , $ this -> items [ $ idNum ] ) ; } $ this -> items [ $ idNum ] = [ ] ; $ this -> lastInvoked [ $ idNum ] = microtime ( true ) ; } return true ; }
|
Run the job with the given id .
|
2,567
|
public function shutdown ( ) { foreach ( $ this -> items as $ idNum => $ items ) { if ( count ( $ items ) !== 0 ) { $ this -> flush ( $ idNum ) ; } } }
|
Run the job for remainder items .
|
2,568
|
public function setBoundingBoxes ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ BoundingBox :: class ) ; $ this -> bounding_boxes = $ arr ; return $ this ; }
|
Bounding boxes locating the pixels within the image containing the finding .
|
2,569
|
public function setAddonsConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Container \ V1 \ AddonsConfig :: class ) ; $ this -> addons_config = $ var ; return $ this ; }
|
The desired configurations for the various addons available to run in the cluster .
|
2,570
|
private function messageFactory ( array $ message , ConnectionInterface $ connection , $ projectId , $ encode ) { if ( ! isset ( $ message [ 'message' ] ) ) { throw new GoogleException ( 'Invalid message data.' ) ; } if ( isset ( $ message [ 'message' ] [ 'data' ] ) && $ encode ) { $ message [ 'message' ] [ 'data' ] = base64_decode ( $ message [ 'message' ] [ 'data' ] ) ; } $ subscription = null ; if ( isset ( $ message [ 'subscription' ] ) ) { $ subscription = new Subscription ( $ connection , $ projectId , $ message [ 'subscription' ] , null , $ encode ) ; } return new Message ( $ message [ 'message' ] , [ 'ackId' => ( isset ( $ message [ 'ackId' ] ) ) ? $ message [ 'ackId' ] : null , 'subscription' => $ subscription ] ) ; }
|
Create a Message instance from an incoming message .
|
2,571
|
public function GetInstance ( \ Google \ Cloud \ Redis \ V1 \ GetInstanceRequest $ argument , $ metadata = [ ] , $ options = [ ] ) { return $ this -> _simpleRequest ( '/google.cloud.redis.v1.CloudRedis/GetInstance' , $ argument , [ '\Google\Cloud\Redis\V1\Instance' , 'decode' ] , $ metadata , $ options ) ; }
|
Gets the details of a specific Redis instance .
|
2,572
|
public function UpdateInstance ( \ Google \ Cloud \ Redis \ V1 \ UpdateInstanceRequest $ argument , $ metadata = [ ] , $ options = [ ] ) { return $ this -> _simpleRequest ( '/google.cloud.redis.v1.CloudRedis/UpdateInstance' , $ argument , [ '\Google\LongRunning\Operation' , 'decode' ] , $ metadata , $ options ) ; }
|
Updates the metadata and configuration of a specific Redis instance .
|
2,573
|
public function setSnapshots ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ PubSub \ V1 \ Snapshot :: class ) ; $ this -> snapshots = $ arr ; return $ this ; }
|
The resulting snapshots .
|
2,574
|
public function setMessageIds ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> message_ids = $ arr ; return $ this ; }
|
The server - assigned ID of each published message in the same order as the messages in the request . IDs are guaranteed to be unique within the topic .
|
2,575
|
public function annotateImage ( $ image , $ features , $ optionalArgs = [ ] ) { $ image = $ this -> createImageObject ( $ image ) ; return $ this -> annotateImageHelper ( [ $ this , 'batchAnnotateImages' ] , AnnotateImageRequest :: class , $ image , $ features , $ optionalArgs ) ; }
|
Run image detection and annotation for an image .
|
2,576
|
public function productSearch ( $ image , ProductSearchParams $ productSearchParams , $ optionalArgs = [ ] ) { if ( isset ( $ optionalArgs [ 'imageContext' ] ) && $ optionalArgs [ 'imageContext' ] instanceof ImageContext ) { $ optionalArgs [ 'imageContext' ] -> setProductSearchParams ( $ productSearchParams ) ; } else { $ optionalArgs [ 'imageContext' ] = ( new ImageContext ) -> setProductSearchParams ( $ productSearchParams ) ; } return $ this -> annotateSingleFeature ( $ image , Type :: PRODUCT_SEARCH , $ optionalArgs ) ; }
|
Run product search for an image .
|
2,577
|
public function setAppEngineRouting ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Scheduler \ V1beta1 \ AppEngineRouting :: class ) ; $ this -> app_engine_routing = $ var ; return $ this ; }
|
App Engine Routing setting for the job .
|
2,578
|
public function setVertices ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ VideoIntelligence \ V1 \ NormalizedVertex :: class ) ; $ this -> vertices = $ arr ; return $ this ; }
|
Normalized vertices of the bounding polygon .
|
2,579
|
public function setPeriod ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ ErrorReporting \ V1beta1 \ QueryTimeRange_Period :: class ) ; $ this -> period = $ var ; return $ this ; }
|
Restricts the query to the specified time range .
|
2,580
|
public function setAppEngineHttpTarget ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Scheduler \ V1 \ AppEngineHttpTarget :: class ) ; $ this -> writeOneof ( 5 , $ var ) ; return $ this ; }
|
App Engine HTTP target .
|
2,581
|
public function setHttpTarget ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Scheduler \ V1 \ HttpTarget :: class ) ; $ this -> writeOneof ( 6 , $ var ) ; return $ this ; }
|
HTTP target .
|
2,582
|
public function setState ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Scheduler \ V1 \ Job_State :: class ) ; $ this -> state = $ var ; return $ this ; }
|
Output only . State of the job .
|
2,583
|
public function setNormalizedBoundingBox ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ VideoIntelligence \ V1 \ NormalizedBoundingBox :: class ) ; $ this -> normalized_bounding_box = $ var ; return $ this ; }
|
The normalized bounding box location of this object track for the frame .
|
2,584
|
public function setPosition ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Vision \ V1 \ Position :: class ) ; $ this -> position = $ var ; return $ this ; }
|
Face landmark position .
|
2,585
|
public function setRowKeys ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: BYTES ) ; $ this -> row_keys = $ arr ; return $ this ; }
|
Single rows included in the set .
|
2,586
|
public function setRowRanges ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Bigtable \ V2 \ RowRange :: class ) ; $ this -> row_ranges = $ arr ; return $ this ; }
|
Contiguous row ranges included in the set .
|
2,587
|
public function setSecondaryWorkerConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dataproc \ V1beta2 \ InstanceGroupConfig :: class ) ; $ this -> secondary_worker_config = $ var ; return $ this ; }
|
Optional . The Compute Engine config settings for additional worker instances in a cluster .
|
2,588
|
public function setSoftwareConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dataproc \ V1beta2 \ SoftwareConfig :: class ) ; $ this -> software_config = $ var ; return $ this ; }
|
Optional . The config settings for software inside the cluster .
|
2,589
|
public function setLifecycleConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dataproc \ V1beta2 \ LifecycleConfig :: class ) ; $ this -> lifecycle_config = $ var ; return $ this ; }
|
Optional . The config setting for auto delete cluster schedule .
|
2,590
|
public function setEncryptionConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dataproc \ V1beta2 \ EncryptionConfig :: class ) ; $ this -> encryption_config = $ var ; return $ this ; }
|
Optional . Encryption settings for the cluster .
|
2,591
|
public function setPartitionedDml ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Spanner \ V1 \ TransactionOptions_PartitionedDml :: class ) ; $ this -> writeOneof ( 3 , $ var ) ; return $ this ; }
|
Partitioned DML transaction . Authorization to begin a Partitioned DML transaction requires spanner . databases . beginPartitionedDmlTransaction permission on the session resource .
|
2,592
|
public function setType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Language \ V1beta2 \ Document_Type :: class ) ; $ this -> type = $ var ; return $ this ; }
|
Required . If the type is not set or is TYPE_UNSPECIFIED returns an INVALID_ARGUMENT error .
|
2,593
|
public function setGcsSource ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Vision \ V1 \ GcsSource :: class ) ; $ this -> gcs_source = $ var ; return $ this ; }
|
The Google Cloud Storage location to read the input from .
|
2,594
|
public function setCompany ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ Company :: class ) ; $ this -> company = $ var ; return $ this ; }
|
Required . The company resource to replace the current resource in the system .
|
2,595
|
public function setFormat ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Iot \ V1 \ PublicKeyFormat :: class ) ; $ this -> format = $ var ; return $ this ; }
|
The format of the key .
|
2,596
|
public function setListAssetsResults ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ SecurityCenter \ V1 \ ListAssetsResponse \ ListAssetsResult :: class ) ; $ this -> list_assets_results = $ arr ; return $ this ; }
|
Assets matching the list request .
|
2,597
|
public function setTransferMessages ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ BigQuery \ DataTransfer \ V1 \ TransferMessage :: class ) ; $ this -> transfer_messages = $ arr ; return $ this ; }
|
Output only . The stored pipeline transfer messages .
|
2,598
|
public function setSelect ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Firestore \ V1beta1 \ StructuredQuery_Projection :: class ) ; $ this -> select = $ var ; return $ this ; }
|
The projection to return .
|
2,599
|
public function setEndAt ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Firestore \ V1beta1 \ Cursor :: class ) ; $ this -> end_at = $ var ; return $ this ; }
|
A end point for the query results .
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.