idx
int64 0
60.3k
| question
stringlengths 101
6.21k
| target
stringlengths 7
803
|
|---|---|---|
1,700
|
public function setModelEvaluation ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ AutoMl \ V1beta1 \ ModelEvaluation :: class ) ; $ this -> model_evaluation = $ arr ; return $ this ; }
|
List of model evaluations in the requested page .
|
1,701
|
public function setTable ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Bigtable \ Admin \ V2 \ Table :: class ) ; $ this -> table = $ var ; return $ this ; }
|
The Table to create .
|
1,702
|
public function setSynonyms ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> synonyms = $ arr ; return $ this ; }
|
Optional . A list of synonyms that can also be used to trigger this item in dialog .
|
1,703
|
public function setAdult ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Vision \ V1 \ Likelihood :: class ) ; $ this -> adult = $ var ; return $ this ; }
|
Represents the adult content likelihood for the image . Adult content may contain elements such as nudity pornographic images or cartoons or sexual activities .
|
1,704
|
public function setSpoof ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Vision \ V1 \ Likelihood :: class ) ; $ this -> spoof = $ var ; return $ this ; }
|
Spoof likelihood . The likelihood that an modification was made to the image s canonical version to make it appear funny or offensive .
|
1,705
|
public function setMedical ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Vision \ V1 \ Likelihood :: class ) ; $ this -> medical = $ var ; return $ this ; }
|
Likelihood that this is a medical image .
|
1,706
|
public function setViolence ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Vision \ V1 \ Likelihood :: class ) ; $ this -> violence = $ var ; return $ this ; }
|
Likelihood that this image contains violent content .
|
1,707
|
public static function sessionEntityTypeName ( $ project , $ session , $ entityType ) { return self :: getSessionEntityTypeNameTemplate ( ) -> render ( [ 'project' => $ project , 'session' => $ session , 'entity_type' => $ entityType , ] ) ; }
|
Formats a string containing the fully - qualified path to represent a session_entity_type resource .
|
1,708
|
public function setRequestMetadata ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ RequestMetadata :: class ) ; $ this -> request_metadata = $ var ; return $ this ; }
|
Required . The meta information collected about the profile search user . This is used to improve the search quality of the service . These values are provided by users and must be precise and consistent .
|
1,709
|
public function setVersionView ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Kms \ V1 \ CryptoKeyVersion_CryptoKeyVersionView :: class ) ; $ this -> version_view = $ var ; return $ this ; }
|
The fields of the primary version to include in the response .
|
1,710
|
public function setDeleteCluster ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dataproc \ V1 \ ClusterOperation :: class ) ; $ this -> delete_cluster = $ var ; return $ this ; }
|
Output only . The delete cluster operation metadata .
|
1,711
|
public function setState ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Dataproc \ V1 \ WorkflowMetadata_State :: class ) ; $ this -> state = $ var ; return $ this ; }
|
Output only . The workflow state .
|
1,712
|
public function setJobLocation ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ Location :: class ) ; $ this -> job_location = $ var ; return $ this ; }
|
Location used as the destination in the commute calculation .
|
1,713
|
public function setTasks ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Tasks \ V2beta2 \ Task :: class ) ; $ this -> tasks = $ arr ; return $ this ; }
|
The leased tasks .
|
1,714
|
public function setClientCertificateConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Container \ V1 \ ClientCertificateConfig :: class ) ; $ this -> client_certificate_config = $ var ; return $ this ; }
|
Configuration for client certificate authentication on the cluster . For clusters before v1 . 12 if no configuration is specified a client certificate is issued .
|
1,715
|
public function rows ( array $ options = [ ] ) { $ options += $ this -> queryResultsOptions ; $ this -> waitUntilComplete ( $ options ) ; $ schema = $ this -> info [ 'schema' ] [ 'fields' ] ; return new ItemIterator ( new PageIterator ( function ( array $ row ) use ( $ schema ) { $ mergedRow = [ ] ; if ( $ row === null ) { return $ mergedRow ; } if ( ! array_key_exists ( 'f' , $ row ) ) { throw new GoogleException ( 'Bad response - missing key "f" for a row.' ) ; } foreach ( $ row [ 'f' ] as $ key => $ value ) { $ fieldSchema = $ schema [ $ key ] ; $ mergedRow [ $ fieldSchema [ 'name' ] ] = $ this -> mapper -> fromBigQuery ( $ value , $ fieldSchema ) ; } return $ mergedRow ; } , [ $ this -> connection , 'getQueryResults' ] , $ options + $ this -> identity , [ 'itemsKey' => 'rows' , 'firstPage' => $ this -> info , 'nextResultTokenKey' => 'pageToken' ] ) ) ; }
|
Retrieves the rows associated with the query and merges them together with the table s schema .
|
1,716
|
public function waitUntilComplete ( array $ options = [ ] ) { $ options += $ this -> queryResultsOptions ; $ maxRetries = $ this -> pluck ( 'maxRetries' , $ options , false ) ; $ this -> wait ( function ( ) { return $ this -> isComplete ( ) ; } , function ( ) use ( $ options ) { return $ this -> reload ( $ options ) ; } , $ this -> job , $ maxRetries ) ; }
|
Blocks until the query is complete .
|
1,717
|
public function reload ( array $ options = [ ] ) { return $ this -> info = $ this -> connection -> getQueryResults ( $ options + $ this -> identity ) ; }
|
Triggers a network request to reload the query s details .
|
1,718
|
public function setTables ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Bigtable \ Admin \ V2 \ Table :: class ) ; $ this -> tables = $ arr ; return $ this ; }
|
The tables present in the requested instance .
|
1,719
|
public function setProjectIds ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> project_ids = $ arr ; return $ this ; }
|
The project ids to use for filtering asset discovery .
|
1,720
|
public function setInclusionMode ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ SecurityCenter \ V1 \ OrganizationSettings_AssetDiscoveryConfig_InclusionMode :: class ) ; $ this -> inclusion_mode = $ var ; return $ this ; }
|
The mode to use for filtering asset discovery .
|
1,721
|
public function setInspectTemplate ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ InspectTemplate :: class ) ; $ this -> inspect_template = $ var ; return $ this ; }
|
The InspectTemplate to create .
|
1,722
|
public function setDatastoreOptions ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ DatastoreOptions :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
|
Google Cloud Datastore options specification .
|
1,723
|
public function setCloudStorageOptions ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ CloudStorageOptions :: class ) ; $ this -> writeOneof ( 3 , $ var ) ; return $ this ; }
|
Google Cloud Storage options specification .
|
1,724
|
public function setBigQueryOptions ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ BigQueryOptions :: class ) ; $ this -> writeOneof ( 4 , $ var ) ; return $ this ; }
|
BigQuery options specification .
|
1,725
|
public function setModel ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ AutoMl \ V1beta1 \ Model :: class ) ; $ this -> model = $ arr ; return $ this ; }
|
List of models in the requested page .
|
1,726
|
public function setLoadModule ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Trace \ V2 \ Module :: class ) ; $ this -> load_module = $ var ; return $ this ; }
|
The binary module from where the code was loaded .
|
1,727
|
public function setVoice ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dialogflow \ V2 \ VoiceSelectionParams :: class ) ; $ this -> voice = $ var ; return $ this ; }
|
Optional . The desired voice of the synthesized audio .
|
1,728
|
public function setInputConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ AutoMl \ V1beta1 \ InputConfig :: class ) ; $ this -> writeOneof ( 6 , $ var ) ; return $ this ; }
|
An input config specifying the content of the image .
|
1,729
|
public function setTransactionOptions ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Datastore \ V1 \ TransactionOptions :: class ) ; $ this -> transaction_options = $ var ; return $ this ; }
|
Options for a new transaction .
|
1,730
|
public function setProduct ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Vision \ V1 \ Product :: class ) ; $ this -> product = $ var ; return $ this ; }
|
The Product resource which replaces the one on the server . product . name is immutable .
|
1,731
|
public function setTableReference ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ BigQueryTable :: class ) ; $ this -> table_reference = $ var ; return $ this ; }
|
Complete BigQuery table reference .
|
1,732
|
public function setDataProtectionMode ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Redis \ V1beta1 \ FailoverInstanceRequest_DataProtectionMode :: class ) ; $ this -> data_protection_mode = $ var ; return $ this ; }
|
Optional . Available data protection modes that the user can choose . If it s unspecified data protection mode will be LIMITED_DATA_LOSS by default .
|
1,733
|
public static function contextName ( $ project , $ session , $ context ) { return self :: getContextNameTemplate ( ) -> render ( [ 'project' => $ project , 'session' => $ session , 'context' => $ context , ] ) ; }
|
Formats a string containing the fully - qualified path to represent a context resource .
|
1,734
|
public function setResourceDescriptors ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Api \ MonitoredResourceDescriptor :: class ) ; $ this -> resource_descriptors = $ arr ; return $ this ; }
|
A list of resource descriptors .
|
1,735
|
public static function appProfileName ( $ project , $ instance , $ appProfile ) { return self :: getAppProfileNameTemplate ( ) -> render ( [ 'project' => $ project , 'instance' => $ instance , 'app_profile' => $ appProfile , ] ) ; }
|
Formats a string containing the fully - qualified path to represent a app_profile resource .
|
1,736
|
public static function clusterName ( $ project , $ instance , $ cluster ) { return self :: getClusterNameTemplate ( ) -> render ( [ 'project' => $ project , 'instance' => $ instance , 'cluster' => $ cluster , ] ) ; }
|
Formats a string containing the fully - qualified path to represent a cluster resource .
|
1,737
|
public function setPartitions ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Spanner \ V1 \ Partition :: class ) ; $ this -> partitions = $ arr ; return $ this ; }
|
Partitions created by this request .
|
1,738
|
public function setTransaction ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Spanner \ V1 \ Transaction :: class ) ; $ this -> transaction = $ var ; return $ this ; }
|
Transaction created by this request .
|
1,739
|
public function setApplication ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ Application :: class ) ; $ this -> application = $ var ; return $ this ; }
|
Required . The application to be created .
|
1,740
|
private function formatDate ( $ when = null ) { if ( is_string ( $ when ) ) { return $ when ; } elseif ( ! $ when ) { list ( $ usec , $ sec ) = explode ( ' ' , microtime ( ) ) ; $ micro = sprintf ( "%06d" , $ usec * 1000000 ) ; $ when = new \ DateTime ( date ( 'Y-m-d H:i:s.' . $ micro ) ) ; } elseif ( is_numeric ( $ when ) ) { $ micro = sprintf ( "%06d" , ( $ when - floor ( $ when ) ) * 1000000 ) ; $ when = new \ DateTime ( date ( 'Y-m-d H:i:s.' . $ micro , ( int ) $ when ) ) ; } $ when -> setTimezone ( new \ DateTimeZone ( 'UTC' ) ) ; return $ when -> format ( 'Y-m-d\TH:i:s.u000\Z' ) ; }
|
Returns a Zulu formatted string representing the provided \ DateTime .
|
1,741
|
public function setDataset ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ AutoMl \ V1beta1 \ Dataset :: class ) ; $ this -> dataset = $ var ; return $ this ; }
|
The dataset to create .
|
1,742
|
public function setState ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Redis \ V1beta1 \ Instance_State :: class ) ; $ this -> state = $ var ; return $ this ; }
|
Output only . The current state of this instance .
|
1,743
|
public function setTier ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Redis \ V1beta1 \ Instance_Tier :: class ) ; $ this -> tier = $ var ; return $ this ; }
|
Required . The service tier of the instance .
|
1,744
|
public function setInfo ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dialogflow \ V2 \ Intent_Message_SelectItemInfo :: class ) ; $ this -> info = $ var ; return $ this ; }
|
Required . Additional information about this option .
|
1,745
|
public function setImage ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dialogflow \ V2 \ Intent_Message_Image :: class ) ; $ this -> image = $ var ; return $ this ; }
|
Optional . The image to display .
|
1,746
|
public function setPublishTimeRange ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ TimestampRange :: class ) ; $ this -> publish_time_range = $ var ; return $ this ; }
|
Optional . Jobs published within a range specified by this filter are searched against .
|
1,747
|
public function setExcludedJobs ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> excluded_jobs = $ arr ; return $ this ; }
|
Optional . This filter specifies a list of job names to be excluded during search . At most 200 excluded job names are allowed .
|
1,748
|
public function setJobs ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Talent \ V4beta1 \ Job :: class ) ; $ this -> jobs = $ arr ; return $ this ; }
|
The Jobs for a given company . The maximum number of items returned is based on the limit field provided in the request .
|
1,749
|
public function setMetadata ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Talent \ V4beta1 \ ResponseMetadata :: class ) ; $ this -> metadata = $ var ; return $ this ; }
|
Additional information for the API invocation such as the request tracking id .
|
1,750
|
public function setSaveFindings ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ Action_SaveFindings :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; }
|
Save resulting findings in a provided location .
|
1,751
|
public function setPubSub ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ Action_PublishToPubSub :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
|
Publish a notification to a pubsub topic .
|
1,752
|
public function setWindow ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Asset \ V1 \ TimeWindow :: class ) ; $ this -> window = $ var ; return $ this ; }
|
The time window when the asset data and state was observed .
|
1,753
|
public function doesTagExist ( $ target , $ tagName ) { $ res = $ this -> client -> get ( sprintf ( self :: GITHUB_RELEASES_ENDPOINT , $ this -> cleanTarget ( $ target ) , $ tagName ) , [ 'http_errors' => false , 'auth' => [ null , $ this -> token ] ] ) ; return ( $ res -> getStatusCode ( ) === 200 ) ; }
|
Check if a given tag exists on a given GitHub repository .
|
1,754
|
public function createRelease ( $ target , $ tagName , $ display , $ notes ) { $ requestBody = [ 'tag_name' => $ tagName , 'name' => $ display , 'body' => $ notes ] ; $ res = $ this -> client -> post ( sprintf ( self :: GITHUB_RELEASE_CREATE_ENDPOINT , $ this -> cleanTarget ( $ target ) ) , [ 'http_errors' => false , 'json' => $ requestBody , 'auth' => [ null , $ this -> token ] ] ) ; return $ this -> doesTagExist ( $ target , $ tagName ) ; }
|
Create a tag on the given GitHub repository and sends a request to verify .
|
1,755
|
public function push ( $ target , $ ref , $ targetBranch = 'master' , $ force = true ) { $ cmd = [ 'git push -q' , sprintf ( 'https://%s@github.com/%s' , $ this -> token , $ target ) , sprintf ( '%s:%s' , $ ref , $ targetBranch ) ] ; if ( $ force ) { $ cmd [ ] = '--force' ; } return $ this -> shell -> execute ( implode ( ' ' , $ cmd ) ) ; }
|
Push a given commit ref to GitHub .
|
1,756
|
public function setDocumentation ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Monitoring \ V3 \ AlertPolicy_Documentation :: class ) ; $ this -> documentation = $ var ; return $ this ; }
|
Documentation that is included with notifications and incidents related to this policy . Best practice is for the documentation to include information to help responders understand mitigate escalate and correct the underlying problems detected by the alerting policy . Notification channels that have limited capacity might not show this documentation .
|
1,757
|
public function setConditions ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Monitoring \ V3 \ AlertPolicy \ Condition :: class ) ; $ this -> conditions = $ arr ; return $ this ; }
|
A list of conditions for the policy . The conditions are combined by AND or OR according to the combiner field . If the combined conditions evaluate to true then an incident is created . A policy can have from one to six conditions .
|
1,758
|
public function setCombiner ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Monitoring \ V3 \ AlertPolicy_ConditionCombinerType :: class ) ; $ this -> combiner = $ var ; return $ this ; }
|
How to combine the results of multiple conditions to determine if an incident should be opened .
|
1,759
|
public function setCreationRecord ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Monitoring \ V3 \ MutationRecord :: class ) ; $ this -> creation_record = $ var ; return $ this ; }
|
A read - only record of the creation of the alerting policy . If provided in a call to create or update this field will be ignored .
|
1,760
|
public function setMutationRecord ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Monitoring \ V3 \ MutationRecord :: class ) ; $ this -> mutation_record = $ var ; return $ this ; }
|
A read - only record of the most recent change to the alerting policy . If provided in a call to create or update this field will be ignored .
|
1,761
|
public function setDocument ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Language \ V1 \ Document :: class ) ; $ this -> document = $ var ; return $ this ; }
|
Input document .
|
1,762
|
public function setFeatures ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Language \ V1 \ AnnotateTextRequest_Features :: class ) ; $ this -> features = $ var ; return $ this ; }
|
The enabled features .
|
1,763
|
public function setEncodingType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Language \ V1 \ EncodingType :: class ) ; $ this -> encoding_type = $ var ; return $ this ; }
|
The encoding type used by the API to calculate offsets .
|
1,764
|
private function transactionSelector ( array & $ options , array $ previous = [ ] ) { $ options += [ 'begin' => false , 'transactionType' => SessionPoolInterface :: CONTEXT_READ , ] ; $ res = $ this -> transactionOptions ( $ options , $ previous ) ; $ type = $ res [ 1 ] ; if ( $ type === 'singleUseTransaction' ) { $ type = 'singleUse' ; } elseif ( $ type === 'transactionId' ) { $ type = 'id' ; } return [ [ $ type => $ res [ 0 ] ] , $ res [ 2 ] ] ; }
|
Format a transaction from read or execute .
|
1,765
|
private function transactionOptions ( array & $ options , array $ previous = [ ] ) { $ options += [ 'begin' => false , 'transactionType' => SessionPoolInterface :: CONTEXT_READWRITE , 'transactionId' => null , ] ; $ type = null ; $ context = $ this -> pluck ( 'transactionType' , $ options ) ; $ id = $ this -> pluck ( 'transactionId' , $ options ) ; $ begin = $ this -> pluck ( 'begin' , $ options ) ; if ( $ id === null ) { if ( $ begin ) { $ type = 'begin' ; } else { $ type = 'singleUseTransaction' ; $ options [ 'singleUse' ] = true ; } } if ( $ id !== null ) { $ type = 'transactionId' ; $ transactionOptions = $ id ; } elseif ( $ context === SessionPoolInterface :: CONTEXT_READ ) { $ transactionOptions = $ this -> configureSnapshotOptions ( $ options , $ previous ) ; } elseif ( $ context === SessionPoolInterface :: CONTEXT_READWRITE ) { $ transactionOptions = $ this -> configureTransactionOptions ( ) ; } else { throw new \ BadMethodCallException ( sprintf ( 'Invalid transaction context %s' , $ context ) ) ; } return [ $ transactionOptions , $ type , $ context ] ; }
|
Return transaction options based on given configuration options .
|
1,766
|
private function configureSnapshotOptions ( array & $ options , array $ previous = [ ] ) { $ options += [ 'singleUse' => false , 'returnReadTimestamp' => null , 'strong' => null , 'readTimestamp' => null , 'exactStaleness' => null , 'minReadTimestamp' => null , 'maxStaleness' => null , ] ; $ previousOptions = isset ( $ previous [ 'transactionOptions' ] [ 'readOnly' ] ) ? $ previous [ 'transactionOptions' ] [ 'readOnly' ] : [ ] ; if ( ! $ options [ 'singleUse' ] && ( $ options [ 'maxStaleness' ] || $ options [ 'minReadTimestamp' ] ) ) { throw new \ BadMethodCallException ( 'maxStaleness and minReadTimestamp are only available in single-use transactions.' ) ; } $ transactionOptions = [ 'readOnly' => $ this -> arrayFilterRemoveNull ( [ 'returnReadTimestamp' => $ this -> pluck ( 'returnReadTimestamp' , $ options ) , 'strong' => $ this -> pluck ( 'strong' , $ options ) , 'minReadTimestamp' => $ this -> pluck ( 'minReadTimestamp' , $ options ) , 'maxStaleness' => $ this -> pluck ( 'maxStaleness' , $ options ) , 'readTimestamp' => $ this -> pluck ( 'readTimestamp' , $ options ) , 'exactStaleness' => $ this -> pluck ( 'exactStaleness' , $ options ) , ] ) + $ previousOptions ] ; if ( empty ( $ transactionOptions [ 'readOnly' ] ) ) { $ transactionOptions [ 'readOnly' ] [ 'strong' ] = true ; } $ timestampFields = [ 'minReadTimestamp' , 'readTimestamp' ] ; $ durationFields = [ 'exactStaleness' , 'maxStaleness' ] ; foreach ( $ timestampFields as $ tsf ) { if ( isset ( $ transactionOptions [ 'readOnly' ] [ $ tsf ] ) && ! isset ( $ previousOptions [ $ tsf ] ) ) { $ field = $ transactionOptions [ 'readOnly' ] [ $ tsf ] ; if ( ! ( $ field instanceof Timestamp ) ) { throw new \ BadMethodCallException ( sprintf ( 'Read Only Transaction Configuration Field %s must be an instance of `%s`.' , $ tsf , Timestamp :: class ) ) ; } $ transactionOptions [ 'readOnly' ] [ $ tsf ] = $ field -> formatAsString ( ) ; } } foreach ( $ durationFields as $ df ) { if ( isset ( $ transactionOptions [ 'readOnly' ] [ $ df ] ) && ! isset ( $ previousOptions [ $ df ] ) ) { $ field = $ transactionOptions [ 'readOnly' ] [ $ df ] ; if ( ! ( $ field instanceof Duration ) ) { throw new \ BadMethodCallException ( sprintf ( 'Read Only Transaction Configuration Field %s must be an instance of `%s`.' , $ df , Duration :: class ) ) ; } $ transactionOptions [ 'readOnly' ] [ $ df ] = $ field -> get ( ) ; } } return $ transactionOptions ; }
|
Configure a Read - Only transaction .
|
1,767
|
public function setPublicKeyCertificate ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Iot \ V1 \ PublicKeyCertificate :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; }
|
A public key certificate used to verify the device credentials .
|
1,768
|
public function setArguments ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Debugger \ V2 \ Variable :: class ) ; $ this -> arguments = $ arr ; return $ this ; }
|
Set of arguments passed to this function . Note that this might not be populated for all stack frames .
|
1,769
|
public function setLocals ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Debugger \ V2 \ Variable :: class ) ; $ this -> locals = $ arr ; return $ this ; }
|
Set of local variables at the stack frame location . Note that this might not be populated for all stack frames .
|
1,770
|
public function setResourceType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Monitoring \ V3 \ GroupResourceType :: class ) ; $ this -> resource_type = $ var ; return $ this ; }
|
The resource type of the group members .
|
1,771
|
public static function register ( StorageClient $ client , $ protocol = null ) { $ protocol = $ protocol ? : self :: DEFAULT_PROTOCOL ; if ( ! in_array ( $ protocol , stream_get_wrappers ( ) ) ) { if ( ! stream_wrapper_register ( $ protocol , StreamWrapper :: class , STREAM_IS_URL ) ) { throw new \ RuntimeException ( "Failed to register '$protocol://' protocol" ) ; } self :: $ clients [ $ protocol ] = $ client ; return true ; } return false ; }
|
Register a StreamWrapper for reading and writing to Google Storage
|
1,772
|
public static function unregister ( $ protocol = null ) { $ protocol = $ protocol ? : self :: DEFAULT_PROTOCOL ; stream_wrapper_unregister ( $ protocol ) ; unset ( self :: $ clients [ $ protocol ] ) ; }
|
Unregisters the SteamWrapper
|
1,773
|
public static function getClient ( $ protocol = null ) { $ protocol = $ protocol ? : self :: DEFAULT_PROTOCOL ; return self :: $ clients [ $ protocol ] ; }
|
Get the default client to use for streams .
|
1,774
|
public function stream_open ( $ path , $ mode , $ flags , & $ openedPath ) { $ client = $ this -> openPath ( $ path ) ; $ mode = rtrim ( $ mode , 'bt' ) ; $ options = [ ] ; if ( $ this -> context ) { $ contextOptions = stream_context_get_options ( $ this -> context ) ; if ( array_key_exists ( $ this -> protocol , $ contextOptions ) ) { $ options = $ contextOptions [ $ this -> protocol ] ? : [ ] ; } } if ( $ mode == 'w' ) { $ this -> stream = new WriteStream ( null , $ options ) ; $ this -> stream -> setUploader ( $ this -> bucket -> getStreamableUploader ( $ this -> stream , $ options + [ 'name' => $ this -> file ] ) ) ; } elseif ( $ mode == 'r' ) { try { $ options [ 'restOptions' ] [ 'stream' ] = true ; $ this -> stream = new ReadStream ( $ this -> bucket -> object ( $ this -> file ) -> downloadAsStream ( $ options ) ) ; if ( ! $ this -> stream -> isSeekable ( ) && ( $ flags & STREAM_MUST_SEEK ) ) { $ this -> stream = new CachingStream ( $ this -> stream ) ; } } catch ( ServiceException $ ex ) { return $ this -> returnError ( $ ex -> getMessage ( ) , $ flags ) ; } } else { return $ this -> returnError ( 'Unknown stream_open mode.' , $ flags ) ; } if ( $ flags & STREAM_USE_PATH ) { $ openedPath = $ path ; } return true ; }
|
Callback handler for when a stream is opened . For reads we need to download the file to see if it can be opened .
|
1,775
|
public function stream_stat ( ) { $ mode = $ this -> stream -> isWritable ( ) ? self :: FILE_WRITABLE_MODE : self :: FILE_READABLE_MODE ; return $ this -> makeStatArray ( [ 'mode' => $ mode , 'size' => $ this -> stream -> getSize ( ) ] ) ; }
|
Callback handler for getting data about the stream .
|
1,776
|
public function stream_seek ( $ offset , $ whence = SEEK_SET ) { if ( $ this -> stream -> isSeekable ( ) ) { $ this -> stream -> seek ( $ offset , $ whence ) ; return true ; } return false ; }
|
Callback handler for trying to seek to a certain location in the stream .
|
1,777
|
public function dir_readdir ( ) { $ object = $ this -> directoryIterator -> current ( ) ; if ( $ object ) { $ this -> directoryIterator -> next ( ) ; return $ object -> name ( ) ; } return false ; }
|
Callback handler for reading an entry from a directory handle .
|
1,778
|
public function dir_rewinddir ( ) { try { $ this -> directoryIterator = $ this -> bucket -> objects ( [ 'prefix' => $ this -> file , 'fields' => 'items/name,nextPageToken' ] ) ; } catch ( ServiceException $ e ) { return false ; } return true ; }
|
Callback handler for rewind the directory handle .
|
1,779
|
public function mkdir ( $ path , $ mode , $ options ) { $ path = $ this -> makeDirectory ( $ path ) ; $ client = $ this -> openPath ( $ path ) ; $ predefinedAcl = $ this -> determineAclFromMode ( $ mode ) ; try { if ( $ options & STREAM_MKDIR_RECURSIVE || $ this -> file == '' ) { if ( ! $ this -> bucket -> exists ( ) ) { $ client -> createBucket ( $ this -> bucket -> name ( ) , [ 'predefinedAcl' => $ predefinedAcl , 'predefinedDefaultObjectAcl' => $ predefinedAcl ] ) ; } } if ( $ this -> file != '' ) { $ this -> bucket -> upload ( '' , [ 'name' => $ this -> file , 'predefinedAcl' => $ predefinedAcl ] ) ; } } catch ( ServiceException $ e ) { return false ; } return true ; }
|
Callback handler for trying to create a directory . If no file path is specified or STREAM_MKDIR_RECURSIVE option is set then create the bucket if it does not exist .
|
1,780
|
public function rename ( $ from , $ to ) { $ url = ( array ) parse_url ( $ to ) + [ 'path' => '' , 'host' => '' ] ; $ destinationBucket = $ url [ 'host' ] ; $ destinationPath = substr ( $ url [ 'path' ] , 1 ) ; $ this -> dir_opendir ( $ from , [ ] ) ; foreach ( $ this -> directoryIterator as $ file ) { $ name = $ file -> name ( ) ; $ newPath = str_replace ( $ this -> file , $ destinationPath , $ name ) ; $ obj = $ this -> bucket -> object ( $ name ) ; try { $ obj -> rename ( $ newPath , [ 'destinationBucket' => $ destinationBucket ] ) ; } catch ( ServiceException $ e ) { return false ; } } return true ; }
|
Callback handler for trying to move a file or directory .
|
1,781
|
public function unlink ( $ path ) { $ client = $ this -> openPath ( $ path ) ; $ object = $ this -> bucket -> object ( $ this -> file ) ; try { $ object -> delete ( ) ; return true ; } catch ( ServiceException $ e ) { return false ; } }
|
Callback handler for deleting a file
|
1,782
|
public function url_stat ( $ path , $ flags ) { $ client = $ this -> openPath ( $ path ) ; if ( $ this -> isDirectory ( $ this -> file ) ) { return $ this -> urlStatDirectory ( ) ; } return $ this -> urlStatFile ( ) ; }
|
Callback handler for retrieving information about a file
|
1,783
|
private function openPath ( $ path ) { $ url = ( array ) parse_url ( $ path ) + [ 'scheme' => '' , 'path' => '' , 'host' => '' ] ; $ this -> protocol = $ url [ 'scheme' ] ; $ this -> file = ltrim ( $ url [ 'path' ] , '/' ) ; $ client = self :: getClient ( $ this -> protocol ) ; $ this -> bucket = $ client -> bucket ( $ url [ 'host' ] ) ; return $ client ; }
|
Parse the URL and set protocol filename and bucket .
|
1,784
|
private function urlStatDirectory ( ) { $ stats = [ ] ; try { $ this -> object = $ this -> bucket -> object ( $ this -> file ) ; $ info = $ this -> object -> info ( ) ; $ stats [ 'mode' ] = $ this -> bucket -> isWritable ( ) ? self :: DIRECTORY_WRITABLE_MODE : self :: DIRECTORY_READABLE_MODE ; $ this -> statsFromFileInfo ( $ info , $ stats ) ; return $ this -> makeStatArray ( $ stats ) ; } catch ( NotFoundException $ e ) { } catch ( ServiceException $ e ) { return false ; } try { $ objects = $ this -> bucket -> objects ( [ 'prefix' => $ this -> file , ] ) ; if ( ! $ objects -> current ( ) ) { return false ; } } catch ( ServiceException $ e ) { return false ; } $ mode = $ this -> bucket -> isWritable ( ) ? self :: DIRECTORY_WRITABLE_MODE : self :: DIRECTORY_READABLE_MODE ; return $ this -> makeStatArray ( [ 'mode' => $ mode ] ) ; }
|
Calculate the url_stat response for a directory
|
1,785
|
private function urlStatFile ( ) { try { $ this -> object = $ this -> bucket -> object ( $ this -> file ) ; $ info = $ this -> object -> info ( ) ; } catch ( ServiceException $ e ) { return false ; } $ stats = array ( 'mode' => $ this -> bucket -> isWritable ( ) ? self :: FILE_WRITABLE_MODE : self :: FILE_READABLE_MODE ) ; $ this -> statsFromFileInfo ( $ info , $ stats ) ; return $ this -> makeStatArray ( $ stats ) ; }
|
Calculate the url_stat response for a file
|
1,786
|
public function setGroupIndexes ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: INT32 ) ; $ this -> group_indexes = $ arr ; return $ this ; }
|
The index of the submatch to extract as findings . When not specified the entire match is returned . No more than 3 may be included .
|
1,787
|
public function ListUptimeCheckIps ( \ Google \ Cloud \ Monitoring \ V3 \ ListUptimeCheckIpsRequest $ argument , $ metadata = [ ] , $ options = [ ] ) { return $ this -> _simpleRequest ( '/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps' , $ argument , [ '\Google\Cloud\Monitoring\V3\ListUptimeCheckIpsResponse' , 'decode' ] , $ metadata , $ options ) ; }
|
Returns the list of IPs that checkers run from
|
1,788
|
private function getSysvKey ( $ idNum ) { $ key = getenv ( 'GOOGLE_CLOUD_SYSV_ID' ) ? : self :: $ productionKey ; $ base = ftok ( __FILE__ , $ key ) ; if ( $ base == PHP_INT_MAX ) { $ base = 1 ; } return $ base + $ idNum ; }
|
Create a SystemV IPC key for the given id number .
|
1,789
|
public function setContentOptions ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: ENUM , \ Google \ Cloud \ Dlp \ V2 \ ContentOption :: class ) ; $ this -> content_options = $ arr ; return $ this ; }
|
List of options defining data content to scan . If empty text images and other content will be included .
|
1,790
|
public function setRuleSet ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ InspectionRuleSet :: class ) ; $ this -> rule_set = $ arr ; return $ this ; }
|
Set of rules to apply to the findings for this InspectConfig . Exclusion rules contained in the set are executed in the end other rules are executed in the order they are specified for each info type .
|
1,791
|
public function setTimeSeries ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Monitoring \ V3 \ TimeSeries :: class ) ; $ this -> time_series = $ arr ; return $ this ; }
|
One or more time series that match the filter included in the request .
|
1,792
|
public function setExecutionErrors ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Rpc \ Status :: class ) ; $ this -> execution_errors = $ arr ; return $ this ; }
|
Query execution errors that may have caused the time series data returned to be incomplete .
|
1,793
|
public function setThreatType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ WebRisk \ V1beta1 \ ThreatType :: class ) ; $ this -> threat_type = $ var ; return $ this ; }
|
Required . The ThreatList to update .
|
1,794
|
public function setConstraints ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ WebRisk \ V1beta1 \ ComputeThreatListDiffRequest_Constraints :: class ) ; $ this -> constraints = $ var ; return $ this ; }
|
The constraints associated with this request .
|
1,795
|
public function setAppProfiles ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Bigtable \ Admin \ V2 \ AppProfile :: class ) ; $ this -> app_profiles = $ arr ; return $ this ; }
|
The list of requested app profiles .
|
1,796
|
public function mutation ( $ operation , $ table , $ mutation ) { return [ $ operation => [ 'table' => $ table , 'columns' => array_keys ( $ mutation ) , 'values' => $ this -> mapper -> encodeValuesAsSimpleType ( array_values ( $ mutation ) ) ] ] ; }
|
Create a formatted mutation .
|
1,797
|
public function deleteMutation ( $ table , KeySet $ keySet ) { return [ self :: OP_DELETE => [ 'table' => $ table , 'keySet' => $ this -> flattenKeySet ( $ keySet ) , ] ] ; }
|
Create a formatted delete mutation .
|
1,798
|
public function commit ( Session $ session , array $ mutations , array $ options = [ ] ) { $ options += [ 'transactionId' => null ] ; $ res = $ this -> connection -> commit ( $ this -> arrayFilterRemoveNull ( [ 'mutations' => $ mutations , 'session' => $ session -> name ( ) , 'database' => $ session -> info ( ) [ 'database' ] ] ) + $ options ) ; $ time = $ this -> parseTimeString ( $ res [ 'commitTimestamp' ] ) ; return new Timestamp ( $ time [ 0 ] , $ time [ 1 ] ) ; }
|
Commit all enqueued mutations .
|
1,799
|
public function rollback ( Session $ session , $ transactionId , array $ options = [ ] ) { return $ this -> connection -> rollback ( [ 'transactionId' => $ transactionId , 'session' => $ session -> name ( ) , 'database' => $ session -> info ( ) [ 'database' ] ] + $ options ) ; }
|
Rollback a Transaction .
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.