idx
int64
0
60.3k
question
stringlengths
101
6.21k
target
stringlengths
7
803
1,500
public function setHotwordRule ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ CustomInfoType_DetectionRule_HotwordRule :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; }
Hotword - based detection rule .
1,501
public function setExclusionRule ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ ExclusionRule :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
Exclusion rule .
1,502
public function setAuthInfo ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Monitoring \ V3 \ UptimeCheckConfig_HttpCheck_BasicAuthentication :: class ) ; $ this -> auth_info = $ var ; return $ this ; }
The authentication information . Optional when creating an HTTP check ; defaults to empty .
1,503
public function setRetryConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Scheduler \ V1beta1 \ RetryConfig :: class ) ; $ this -> retry_config = $ var ; return $ this ; }
Settings that determine the retry behavior .
1,504
public function append ( $ familyName , $ qualifier , $ value ) { $ this -> rules [ ] = ( new ReadModifyWriteRule ) -> setFamilyName ( $ familyName ) -> setColumnQualifier ( $ qualifier ) -> setAppendValue ( $ value ) ; return $ this ; }
Appends the value to the existing value of the cell . If targeted cell is unset it will be treated as containing the empty string .
1,505
public function setCells ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Bigtable \ V2 \ Cell :: class ) ; $ this -> cells = $ arr ; return $ this ; }
Must not be empty . Sorted in order of decreasing timestamp_micros .
1,506
public function sendAsync ( RequestInterface $ request , array $ options = [ ] ) { $ retryAttempt = 0 ; $ fn = function ( $ retryAttempt ) use ( & $ fn , $ request , $ options ) { $ asyncHttpHandler = $ this -> asyncHttpHandler ; $ retryOptions = $ this -> getRetryOptions ( $ options ) ; if ( ! $ retryOptions [ 'calcDelayFunction' ] ) { $ retryOptions [ 'calcDelayFunction' ] = [ ExponentialBackoff :: class , 'calculateDelay' ] ; } return $ asyncHttpHandler ( $ this -> applyHeaders ( $ request ) , $ this -> getRequestOptions ( $ options ) ) -> then ( null , function ( \ Exception $ ex ) use ( $ fn , $ retryAttempt , $ retryOptions ) { $ shouldRetry = $ retryOptions [ 'retryFunction' ] ( $ ex ) ; if ( $ shouldRetry === false || $ retryAttempt >= $ retryOptions [ 'retries' ] ) { throw $ this -> convertToGoogleException ( $ ex ) ; } $ delay = $ retryOptions [ 'calcDelayFunction' ] ( $ retryAttempt ) ; $ retryOptions [ 'delayFunction' ] ( $ delay ) ; $ retryAttempt ++ ; return $ fn ( $ retryAttempt ) ; } ) ; } ; return $ fn ( $ retryAttempt ) ; }
Deliver the request asynchronously .
1,507
private function applyHeaders ( RequestInterface $ request ) { $ headers = [ 'User-Agent' => 'gcloud-php/' . $ this -> componentVersion , 'x-goog-api-client' => 'gl-php/' . PHP_VERSION . ' gccl/' . $ this -> componentVersion , ] ; if ( $ this -> shouldSignRequest ) { $ headers [ 'Authorization' ] = 'Bearer ' . $ this -> getToken ( ) ; } return Psr7 \ modify_request ( $ request , [ 'set_headers' => $ headers ] ) ; }
Applies headers to the request .
1,508
private function fetchCredentials ( ) { $ backoff = new ExponentialBackoff ( $ this -> retries , $ this -> getRetryFunction ( ) ) ; try { return $ backoff -> execute ( [ $ this -> getCredentialsFetcher ( ) , 'fetchAuthToken' ] , [ $ this -> authHttpHandler ] ) ; } catch ( \ Exception $ ex ) { throw $ this -> convertToGoogleException ( $ ex ) ; } }
Fetches credentials .
1,509
private function convertToGoogleException ( \ Exception $ ex ) { switch ( $ ex -> getCode ( ) ) { case 400 : $ exception = Exception \ BadRequestException :: class ; break ; case 404 : $ exception = Exception \ NotFoundException :: class ; break ; case 409 : $ exception = Exception \ ConflictException :: class ; break ; case 412 : $ exception = Exception \ FailedPreconditionException :: class ; break ; case 500 : $ exception = Exception \ ServerException :: class ; break ; case 504 : $ exception = Exception \ DeadlineExceededException :: class ; break ; default : $ exception = Exception \ ServiceException :: class ; break ; } return new $ exception ( $ this -> getExceptionMessage ( $ ex ) , $ ex -> getCode ( ) , $ ex ) ; }
Convert any exception to a Google Exception .
1,510
private function getExceptionMessage ( \ Exception $ ex ) { if ( $ ex instanceof RequestException && $ ex -> hasResponse ( ) ) { return ( string ) $ ex -> getResponse ( ) -> getBody ( ) ; try { $ this -> jsonDecode ( $ res ) ; return $ res ; } catch ( \ InvalidArgumentException $ e ) { } } return $ ex -> getMessage ( ) ; }
Gets the exception message .
1,511
private function getRequestOptions ( array $ options ) { $ restOptions = isset ( $ options [ 'restOptions' ] ) ? $ options [ 'restOptions' ] : $ this -> restOptions ; $ timeout = isset ( $ options [ 'requestTimeout' ] ) ? $ options [ 'requestTimeout' ] : $ this -> requestTimeout ; if ( $ timeout && ! array_key_exists ( 'timeout' , $ restOptions ) ) { $ restOptions [ 'timeout' ] = $ timeout ; } return $ restOptions ; }
Gets a set of request options .
1,512
private function getRetryOptions ( array $ options ) { return [ 'retries' => isset ( $ options [ 'retries' ] ) ? $ options [ 'retries' ] : $ this -> retries , 'retryFunction' => isset ( $ options [ 'restRetryFunction' ] ) ? $ options [ 'restRetryFunction' ] : $ this -> retryFunction , 'delayFunction' => isset ( $ options [ 'restDelayFunction' ] ) ? $ options [ 'restDelayFunction' ] : $ this -> delayFunction , 'calcDelayFunction' => isset ( $ options [ 'restCalcDelayFunction' ] ) ? $ options [ 'restCalcDelayFunction' ] : $ this -> calcDelayFunction ] ; }
Gets a set of retry options .
1,513
private function buildDefaultAsyncHandler ( ) { $ isGuzzleHandler = $ this -> httpHandler instanceof Guzzle6HttpHandler || $ this -> httpHandler instanceof Guzzle5HttpHandler ; return $ isGuzzleHandler ? [ $ this -> httpHandler , 'async' ] : [ HttpHandlerFactory :: build ( ) , 'async' ] ; }
Builds the default async HTTP handler .
1,514
public function setQueryParams ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dialogflow \ V2 \ QueryParameters :: class ) ; $ this -> query_params = $ var ; return $ this ; }
Optional . The parameters of this query .
1,515
public function setOutputAudioConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dialogflow \ V2 \ OutputAudioConfig :: class ) ; $ this -> output_audio_config = $ var ; return $ this ; }
Optional . Instructs the speech synthesizer how to generate the output audio . If this field is not set and agent - level speech synthesizer is not configured no output audio is generated .
1,516
public function setHttpEnabledState ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Iot \ V1 \ HttpState :: class ) ; $ this -> http_enabled_state = $ var ; return $ this ; }
If enabled allows devices to use DeviceService via the HTTP protocol . Otherwise any requests to DeviceService will fail for this registry .
1,517
public function queryObject ( ) { $ bindingType = $ this -> options [ 'bindingType' ] ; $ queryObj = [ ] ; $ queryObj [ 'queryString' ] = $ this -> query ; $ queryObj [ 'allowLiterals' ] = ( bool ) $ this -> options [ 'allowLiterals' ] ; $ bindings = $ this -> mapBindings ( $ bindingType , $ this -> options [ 'bindings' ] ) ; if ( ! empty ( $ bindings ) ) { $ queryObj [ $ this -> options [ 'bindingType' ] ] = $ bindings ; } return $ queryObj ; }
Format the query for use in the API
1,518
private function mapBindings ( $ bindingType , array $ bindings ) { $ res = [ ] ; foreach ( $ bindings as $ key => $ binding ) { if ( $ binding instanceof Cursor ) { $ value = [ 'cursor' => $ binding -> cursor ( ) ] ; } else { $ value = [ 'value' => $ this -> entityMapper -> valueObject ( $ binding ) ] ; } if ( $ bindingType === self :: BINDING_NAMED ) { $ res [ $ key ] = $ value ; } else { $ res [ ] = $ value ; } } return $ res ; }
Format bound values for the API
1,519
private function determineBindingType ( array $ options ) { if ( isset ( $ options [ 'bindings' ] ) && ! $ this -> isAssoc ( $ options [ 'bindings' ] ) ) { return self :: BINDING_POSITIONAL ; } return self :: BINDING_NAMED ; }
Determine whether the query should use named or positional bindings .
1,520
public function setOptions ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Firestore \ V1beta1 \ TransactionOptions :: class ) ; $ this -> options = $ var ; return $ this ; }
The options for the transaction . Defaults to a read - write transaction .
1,521
public function setContext ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ DevTools \ Source \ V1 \ SourceContext :: class ) ; $ this -> context = $ var ; return $ this ; }
Any source context .
1,522
public function parameters ( array $ parameters ) { $ queryParams = [ ] ; $ this -> config [ 'configuration' ] [ 'query' ] [ 'parameterMode' ] = $ this -> isAssoc ( $ parameters ) ? 'named' : 'positional' ; foreach ( $ parameters as $ name => $ value ) { $ param = $ this -> mapper -> toParameter ( $ value ) ; if ( $ this -> config [ 'configuration' ] [ 'query' ] [ 'parameterMode' ] === 'named' ) { $ param += [ 'name' => $ name ] ; } $ queryParams [ ] = $ param ; } $ this -> config [ 'configuration' ] [ 'query' ] [ 'queryParameters' ] = $ queryParams ; return $ this ; }
Sets parameters to be used on the query . Only available for standard SQL queries .
1,523
public function setHttpRequest ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ ErrorReporting \ V1beta1 \ HttpRequestContext :: class ) ; $ this -> http_request = $ var ; return $ this ; }
The HTTP request which was processed when the error was triggered .
1,524
public function setReportLocation ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ ErrorReporting \ V1beta1 \ SourceLocation :: class ) ; $ this -> report_location = $ var ; return $ this ; }
The location in the source code where the decision was made to report the error usually the place where it was logged . For a logged exception this would be the source line where the exception is logged usually close to the place where it was caught . This value is in contrast to Exception . cause_location which describes the source line where the exception was thrown .
1,525
public function setQueryScope ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Firestore \ Admin \ V1 \ Index_QueryScope :: class ) ; $ this -> query_scope = $ var ; return $ this ; }
Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document specified at query time and that has the same collection id . Indexes with a collection group query scope specified allow queries against all collections descended from a specific document specified at query time and that have the same collection id as this index .
1,526
public function setState ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Firestore \ Admin \ V1 \ Index_State :: class ) ; $ this -> state = $ var ; return $ this ; }
Output only . The serving state of the index .
1,527
public function setQuasiIdsValues ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ Value :: class ) ; $ this -> quasi_ids_values = $ arr ; return $ this ; }
Quasi - identifier values defining the k - anonymity equivalence class . The order is always the same as the original request .
1,528
public function setTopSensitiveValues ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ ValueFrequency :: class ) ; $ this -> top_sensitive_values = $ arr ; return $ this ; }
Estimated frequencies of top sensitive values .
1,529
public function setStructuredQuery ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Firestore \ V1beta1 \ StructuredQuery :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
A structured query .
1,530
public function send ( $ resource , $ method , array $ options = [ ] , $ whitelisted = false ) { $ requestOptions = $ this -> pluckArray ( [ 'restOptions' , 'retries' , 'requestTimeout' ] , $ options ) ; try { return json_decode ( $ this -> requestWrapper -> send ( $ this -> requestBuilder -> build ( $ resource , $ method , $ options ) , $ requestOptions ) -> getBody ( ) , true ) ; } catch ( NotFoundException $ e ) { if ( $ whitelisted ) { throw $ this -> modifyWhitelistedError ( $ e ) ; } throw $ e ; } }
Delivers a request built from the service definition .
1,531
private function buildSubscription ( array & $ args , $ required = false ) { $ pushConfig = $ this -> pluck ( 'pushConfig' , $ args , $ required ) ; $ pushConfig = $ pushConfig ? $ this -> buildPushConfig ( $ pushConfig ) : null ; return $ this -> serializer -> decodeMessage ( new Subscription ( ) , array_filter ( [ 'name' => $ this -> pluck ( 'name' , $ args , $ required ) , 'topic' => $ this -> pluck ( 'topic' , $ args , $ required ) , 'pushConfig' => $ pushConfig , 'ackDeadlineSeconds' => $ this -> pluck ( 'ackDeadlineSeconds' , $ args , $ required ) , 'retainAckedMessages' => $ this -> pluck ( 'retainAckedMessages' , $ args , $ required ) , 'messageRetentionDuration' => $ this -> pluck ( 'messageRetentionDuration' , $ args , $ required ) , ] ) ) ; }
Create a Subscription proto message from an array of arguments .
1,532
public function getJobFromId ( $ identifier ) { return array_key_exists ( $ identifier , $ this -> identifierToId ) ? $ this -> jobs [ $ identifier ] : null ; }
Get the job with the given identifier .
1,533
public function getJobFromIdNum ( $ idNum ) { return array_key_exists ( $ idNum , $ this -> idToIdentifier ) ? $ this -> jobs [ $ this -> idToIdentifier [ $ idNum ] ] : null ; }
Get the job with the given numeric id .
1,534
public function registerJob ( $ identifier , $ callback ) { if ( array_key_exists ( $ identifier , $ this -> identifierToId ) ) { $ idNum = $ this -> identifierToId [ $ identifier ] ; } else { $ idNum = count ( $ this -> identifierToId ) + 1 ; $ this -> idToIdentifier [ $ idNum ] = $ identifier ; } $ this -> jobs [ $ identifier ] = call_user_func ( $ callback , $ idNum ) ; $ this -> identifierToId [ $ identifier ] = $ idNum ; }
Register a job for executing in batch .
1,535
public function setLikelihood ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Dlp \ V2 \ Likelihood :: class ) ; $ this -> likelihood = $ var ; return $ this ; }
Likelihood to return for this CustomInfoType . This base value can be altered by a detection rule if the finding meets the criteria specified by the rule . Defaults to VERY_LIKELY if not specified .
1,536
public function setDictionary ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ CustomInfoType_Dictionary :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
A list of phrases to detect as a CustomInfoType .
1,537
public function setSurrogateType ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ CustomInfoType_SurrogateType :: class ) ; $ this -> writeOneof ( 4 , $ var ) ; return $ this ; }
Message for detecting output from deidentification transformations that support reversing .
1,538
public function setStoredType ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ StoredType :: class ) ; $ this -> writeOneof ( 5 , $ var ) ; return $ this ; }
Load an existing StoredInfoType resource for use in InspectDataSource . Not currently supported in InspectContent .
1,539
public function setDetectionRules ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ CustomInfoType \ DetectionRule :: class ) ; $ this -> detection_rules = $ arr ; return $ this ; }
Set of detection rules to apply to all findings of this CustomInfoType . Rules are applied in order that they are specified . Not supported for the surrogate_type CustomInfoType .
1,540
public function setExclusionType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Dlp \ V2 \ CustomInfoType_ExclusionType :: class ) ; $ this -> exclusion_type = $ var ; return $ this ; }
If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding to be returned . It still can be used for rules matching .
1,541
private function prepareQueryBinding ( array $ binding ) { $ value = $ binding [ 'value' ] ; list ( $ type , $ val ) = $ this -> toGrpcValue ( $ value ) ; $ binding [ 'value' ] [ $ type ] = $ val ; return $ binding ; }
Convert a query binding to an API - compatible value .
1,542
private function readOptions ( array $ readOptions ) { if ( isset ( $ readOptions [ 'readConsistency' ] ) ) { switch ( $ readOptions [ 'readConsistency' ] ) { case 'STRONG' : $ readOptions [ 'readConsistency' ] = ReadConsistency :: STRONG ; break ; case 'EVENTUAL' : $ readOptions [ 'readConsistency' ] = ReadConsistency :: EVENTUAL ; break ; default : throw new \ InvalidArgumentException ( 'Invalid value for Read Consistency.' ) ; break ; } } return $ this -> serializer -> decodeMessage ( new ReadOptions , $ readOptions ) ; }
Convert read options into an API - compatible value .
1,543
private function convertFilterProps ( array $ filter ) { if ( isset ( $ filter [ 'propertyFilter' ] ) ) { $ operator = $ filter [ 'propertyFilter' ] [ 'op' ] ; $ constName = PropertyFilterOperator :: class . '::' . $ operator ; if ( ! defined ( $ constName ) ) { throw new \ InvalidArgumentException ( 'Invalid operator.' ) ; } $ filter [ 'propertyFilter' ] [ 'op' ] = constant ( $ constName ) ; } if ( isset ( $ filter [ 'compositeFilter' ] ) ) { $ filter [ 'compositeFilter' ] [ 'op' ] = CompositeFilterOperator :: PBAND ; foreach ( $ filter [ 'compositeFilter' ] [ 'filters' ] as & $ nested ) { $ nested = $ this -> convertFilterProps ( $ nested ) ; } } return $ filter ; }
Convert Query filters to an API - compatible value .
1,544
private function toGrpcValue ( array $ property ) { $ type = array_keys ( $ property ) [ 0 ] ; $ val = $ property [ $ type ] ; if ( $ val === null ) { $ val = NullValue :: NULL_VALUE ; } if ( $ type === 'timestampValue' ) { $ val = $ this -> formatTimestampForApi ( $ val ) ; } if ( $ type === 'geoPointValue' ) { $ val = $ this -> arrayFilterRemoveNull ( $ val ) ; } return [ $ type , $ val ] ; }
Convert a property value to a gRPC value .
1,545
public function setRegex ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ CustomInfoType_Regex :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
Regular expression which defines the rule .
1,546
public function setExcludeInfoTypes ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ ExcludeInfoTypes :: class ) ; $ this -> writeOneof ( 3 , $ var ) ; return $ this ; }
Set of infoTypes for which findings would affect this rule .
1,547
public function setMatchingType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Dlp \ V2 \ MatchingType :: class ) ; $ this -> matching_type = $ var ; return $ this ; }
How the rule is applied see MatchingType documentation for details .
1,548
public function setVoices ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ TextToSpeech \ V1 \ Voice :: class ) ; $ this -> voices = $ arr ; return $ this ; }
The list of voices .
1,549
public function setCurrentVersion ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ StoredInfoTypeVersion :: class ) ; $ this -> current_version = $ var ; return $ this ; }
Current version of the stored info type .
1,550
public function setPendingVersions ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ StoredInfoTypeVersion :: class ) ; $ this -> pending_versions = $ arr ; return $ this ; }
Pending versions of the stored info type . Empty if no versions are pending .
1,551
public function setSessions ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Spanner \ V1 \ Session :: class ) ; $ this -> sessions = $ arr ; return $ this ; }
The list of requested sessions .
1,552
public function setResourceOwners ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> resource_owners = $ arr ; return $ this ; }
Owners of the Google Cloud resource .
1,553
public function setDatabases ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Spanner \ Admin \ Database \ V1 \ Database :: class ) ; $ this -> databases = $ arr ; return $ this ; }
Databases that matched the request .
1,554
public function listUptimeCheckIps ( array $ optionalArgs = [ ] ) { $ request = new ListUptimeCheckIpsRequest ( ) ; if ( isset ( $ optionalArgs [ 'pageSize' ] ) ) { $ request -> setPageSize ( $ optionalArgs [ 'pageSize' ] ) ; } if ( isset ( $ optionalArgs [ 'pageToken' ] ) ) { $ request -> setPageToken ( $ optionalArgs [ 'pageToken' ] ) ; } return $ this -> getPagedListResponse ( 'ListUptimeCheckIps' , $ optionalArgs , ListUptimeCheckIpsResponse :: class , $ request ) ; }
Returns the list of IPs that checkers run from .
1,555
public static function profileName ( $ project , $ tenant , $ profile ) { return self :: getProfileNameTemplate ( ) -> render ( [ 'project' => $ project , 'tenant' => $ tenant , 'profile' => $ profile , ] ) ; }
Formats a string containing the fully - qualified path to represent a profile resource .
1,556
public static function applicationName ( $ project , $ tenant , $ profile , $ application ) { return self :: getApplicationNameTemplate ( ) -> render ( [ 'project' => $ project , 'tenant' => $ tenant , 'profile' => $ profile , 'application' => $ application , ] ) ; }
Formats a string containing the fully - qualified path to represent a application resource .
1,557
public function reload ( array $ options = [ ] ) { $ this -> info = $ this -> connection -> getInstance ( $ options + [ 'name' => $ this -> name , 'projectId' => $ this -> projectId ] ) ; return $ this -> info ; }
Fetch a fresh representation of the instance from the service .
1,558
public function state ( array $ options = [ ] ) { $ info = $ this -> info ( $ options ) ; return ( isset ( $ info [ 'state' ] ) ) ? $ info [ 'state' ] : null ; }
Return the instance state .
1,559
public function update ( array $ options = [ ] ) { $ operation = $ this -> connection -> updateInstance ( [ 'name' => $ this -> name , ] + $ options ) ; return $ this -> resumeOperation ( $ operation [ 'name' ] , $ operation ) ; }
Update the instance
1,560
public function createDatabase ( $ name , array $ options = [ ] ) { $ instantiation = $ this -> pluckArray ( [ 'sessionPool' ] , $ options ) ; $ database = $ this -> database ( $ name , $ instantiation ) ; return $ database -> create ( $ options ) ; }
Create a Database
1,561
public function database ( $ name , array $ options = [ ] ) { return new Database ( $ this -> connection , $ this , $ this -> lroConnection , $ this -> lroCallables , $ this -> projectId , $ name , isset ( $ options [ 'sessionPool' ] ) ? $ options [ 'sessionPool' ] : null , $ this -> returnInt64AsObject ) ; }
Lazily instantiate a database object
1,562
public function databases ( array $ options = [ ] ) { $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; return new ItemIterator ( new PageIterator ( function ( array $ database ) { return $ this -> database ( $ database [ 'name' ] ) ; } , [ $ this -> connection , 'listDatabases' ] , $ options + [ 'instance' => $ this -> name ] , [ 'itemsKey' => 'databases' , 'resultLimit' => $ resultLimit ] ) ) ; }
List databases in an instance
1,563
public function iam ( ) { if ( ! $ this -> iam ) { $ this -> iam = new Iam ( new IamInstance ( $ this -> connection ) , $ this -> name ) ; } return $ this -> iam ; }
Manage the instance IAM policy
1,564
public function setResponseType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ WebRisk \ V1beta1 \ ComputeThreatListDiffResponse_ResponseType :: class ) ; $ this -> response_type = $ var ; return $ this ; }
The type of response . This may indicate that an action is required by the client when the response is received .
1,565
public function setAdditions ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ WebRisk \ V1beta1 \ ThreatEntryAdditions :: class ) ; $ this -> additions = $ var ; return $ this ; }
A set of entries to add to a local threat type s list .
1,566
public function setRemovals ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ WebRisk \ V1beta1 \ ThreatEntryRemovals :: class ) ; $ this -> removals = $ var ; return $ this ; }
A set of entries to remove from a local threat type s list . This field may be empty .
1,567
public function setChecksum ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ WebRisk \ V1beta1 \ ComputeThreatListDiffResponse_Checksum :: class ) ; $ this -> checksum = $ var ; return $ this ; }
The expected SHA256 hash of the client state ; that is of the sorted list of all hashes present in the database after applying the provided diff . If the client state doesn t match the expected state the client must disregard this diff and retry later .
1,568
public function setFieldFilter ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Firestore \ V1 \ StructuredQuery_FieldFilter :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
A filter on a document field .
1,569
public function setUnaryFilter ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Firestore \ V1 \ StructuredQuery_UnaryFilter :: class ) ; $ this -> writeOneof ( 3 , $ var ) ; return $ this ; }
A filter that takes exactly one argument .
1,570
public function setDebuggee ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Debugger \ V2 \ Debuggee :: class ) ; $ this -> debuggee = $ var ; return $ this ; }
Debuggee information to register . The fields project uniquifier description and agent_version of the debuggee must be set .
1,571
public function setOptions ( array $ options = [ ] ) { $ options += [ 'maxMemberDepth' => self :: DEFAULT_MAX_MEMBER_DEPTH , 'maxPayloadSize' => self :: DEFAULT_MAX_PAYLOAD_SIZE , 'maxMembers' => self :: DEFAULT_MAX_MEMBERS , 'maxValueLength' => self :: DEFAULT_MAX_STRING_LENGTH ] ; $ this -> maxMemberDepth = $ options [ 'maxMemberDepth' ] ; $ this -> maxPayloadSize = $ options [ 'maxPayloadSize' ] ; $ this -> maxValueLength = $ options [ 'maxValueLength' ] ; $ this -> maxMembers = $ options [ 'maxMembers' ] ; }
Update evaluation options .
1,572
public function register ( $ name , $ value , $ hash = null ) { return $ this -> doRegister ( $ name , $ value , 0 , $ hash ) ; }
Register a variable in the VariableTable and return a Variable reference . The reference should be stored in the correct Breakpoint location .
1,573
public function bufferFullVariable ( ) { if ( ! $ this -> bufferFullVariableIndex ) { $ this -> bufferFullVariableIndex = $ this -> nextIndex ++ ; $ this -> variables [ ] = new Variable ( '' , '' , [ 'status' => new StatusMessage ( true , StatusMessage :: REFERENCE_VARIABLE_VALUE , new FormatMessage ( self :: BUFFER_FULL_MESSAGE ) ) ] ) ; } return new Variable ( '' , '' , [ 'varTableIndex' => $ this -> bufferFullVariableIndex ] ) ; }
Returns the reference for the buffer full variable .
1,574
public function results ( array $ options = [ ] ) { $ info = $ this -> info ( $ options ) ; $ results = [ ] ; if ( ! isset ( $ info [ 'response' ] [ 'results' ] ) ) { return $ results ; } foreach ( $ info [ 'response' ] [ 'results' ] as $ result ) { $ results [ ] = new Result ( $ result ) ; } return $ results ; }
Retrieves the results of the operation . A network request will be triggered if no cached data exists .
1,575
public function reload ( array $ options = [ ] ) { return $ this -> info = $ this -> connection -> getOperation ( $ options + [ 'name' => $ this -> name ] ) ; }
Triggers a network request to reload the operation s details .
1,576
public function setAudioConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dialogflow \ V2 \ InputAudioConfig :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; }
Instructs the speech recognizer how to process the speech audio .
1,577
public function setText ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dialogflow \ V2 \ TextInput :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
The natural language text to be processed .
1,578
public function setEvent ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dialogflow \ V2 \ EventInput :: class ) ; $ this -> writeOneof ( 3 , $ var ) ; return $ this ; }
The event to be processed .
1,579
public function setPages ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Vision \ V1 \ Page :: class ) ; $ this -> pages = $ arr ; return $ this ; }
List of pages detected by OCR .
1,580
public function setOperations ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Container \ V1 \ Operation :: class ) ; $ this -> operations = $ arr ; return $ this ; }
A list of operations in the project in the specified zone .
1,581
public function setMissingZones ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> missing_zones = $ arr ; return $ this ; }
If any zones are listed here the list of operations returned may be missing the operations from those zones .
1,582
public function setManagedCluster ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dataproc \ V1 \ ManagedCluster :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; }
Optional . A cluster that is managed by the workflow .
1,583
public function setClusterSelector ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dataproc \ V1 \ ClusterSelector :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
Optional . A selector that chooses target cluster for jobs based on metadata . The selector is evaluated at the time each job is submitted .
1,584
public function setChangeType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Firestore \ Admin \ V1 \ FieldOperationMetadata_IndexConfigDelta_ChangeType :: class ) ; $ this -> change_type = $ var ; return $ this ; }
Specifies how the index is changing .
1,585
public function setPushConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ PubSub \ V1 \ PushConfig :: class ) ; $ this -> push_config = $ var ; return $ this ; }
If push delivery is used with this subscription this field is used to configure it . An empty pushConfig signifies that the subscriber will pull and ack messages using API methods .
1,586
public function setNodePools ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Container \ V1 \ NodePool :: class ) ; $ this -> node_pools = $ arr ; return $ this ; }
A list of node pools for a cluster .
1,587
public function getProjectId ( ) { if ( ! isset ( $ this -> projectId ) ) { $ this -> projectId = $ this -> get ( 'project/project-id' ) ; } return $ this -> projectId ; }
Detect and return the project ID
1,588
public function getNumericProjectId ( ) { if ( ! isset ( $ this -> numericProjectId ) ) { $ this -> numericProjectId = $ this -> get ( 'project/numeric-project-id' ) ; } return $ this -> numericProjectId ; }
Detect and return the numeric project ID
1,589
public function setArrayConfig ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Firestore \ Admin \ V1 \ Index_IndexField_ArrayConfig :: class ) ; $ this -> writeOneof ( 3 , $ var ) ; return $ this ; }
Indicates that this field supports operations on array_value s .
1,590
public function setState ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ BigQuery \ DataTransfer \ V1 \ TransferState :: class ) ; $ this -> state = $ var ; return $ this ; }
Data transfer run state . Ignored for input requests .
1,591
private function addToComponentManifest ( $ version , array $ component ) { $ manifest = $ this -> getManifest ( $ this -> manifest ( ) ) ; $ index = $ this -> getManifestComponentModuleIndex ( $ manifest , $ component [ 'id' ] ) ; array_unshift ( $ manifest [ 'modules' ] [ $ index ] [ 'versions' ] , 'v' . $ version ) ; $ content = json_encode ( $ manifest , JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ) . "\n" ; $ result = file_put_contents ( $ this -> manifest ( ) , $ content ) ; $ this -> setManifest ( $ manifest ) ; if ( ! $ result ) { throw new \ RuntimeException ( 'File write failed' ) ; } }
Add a new component version to the manifest .
1,592
private function updateComponentVersionConstant ( $ version , $ componentPath , $ componentEntry ) { if ( is_null ( $ componentEntry ) ) { return false ; } $ path = $ this -> rootPath ( ) . '/' . $ componentPath . '/' . $ componentEntry ; if ( ! file_exists ( $ path ) ) { throw new \ RuntimeException ( sprintf ( 'Component entry file %s does not exist' , $ path ) ) ; } $ entry = file_get_contents ( $ path ) ; $ replacement = sprintf ( "const VERSION = '%s';" , $ version ) ; $ entry = preg_replace ( "/const VERSION = [\'\\\"]([0-9.]{0,}|master)[\'\\\"]\;/" , $ replacement , $ entry ) ; $ result = file_put_contents ( $ path , $ entry ) ; if ( ! $ result ) { throw new \ RuntimeException ( 'File write failed' ) ; } return true ; }
Update the VERSION constant in a veneer entry file .
1,593
private function updateComponentVersionFile ( $ version , array $ component ) { $ path = $ this -> rootPath ( ) . '/' . $ component [ 'path' ] . '/VERSION' ; $ result = file_put_contents ( $ path , $ version ) ; if ( ! $ result ) { throw new \ RuntimeException ( 'File write failed' ) ; } return true ; }
Update the VERSION file in a component directory .
1,594
private function updateComposerReplacesVersion ( $ version , array $ component ) { $ composer = $ this -> rootPath ( ) . '/composer.json' ; if ( ! file_exists ( $ composer ) ) { throw new \ Exception ( 'Invalid composer.json path' ) ; } $ data = json_decode ( file_get_contents ( $ composer ) , true ) ; $ data [ 'replace' ] [ $ component [ 'name' ] ] = $ version ; file_put_contents ( $ composer , json_encode ( $ data , JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ) ) ; }
Update the replaces version in the main composer . json file .
1,595
public function setStart ( $ type , array $ start ) { $ rangeKey = $ this -> fromDefinition ( $ type , 'start' ) ; $ this -> startType = $ rangeKey ; $ this -> start = $ start ; }
Set the range start .
1,596
public function setEnd ( $ type , array $ end ) { if ( ! in_array ( $ type , array_keys ( $ this -> definition ) ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Invalid KeyRange type. Allowed values are %s' , implode ( ', ' , array_keys ( $ this -> definition ) ) ) ) ; } $ rangeKey = $ this -> fromDefinition ( $ type , 'end' ) ; $ this -> endType = $ rangeKey ; $ this -> end = $ end ; }
Set the range end .
1,597
public function keyRangeObject ( ) { if ( ! $ this -> start || ! $ this -> end ) { throw new \ BadMethodCallException ( 'Key Range must supply a start and an end' ) ; } return [ $ this -> startType => $ this -> start , $ this -> endType => $ this -> end ] ; }
Returns an API - compliant representation of a KeyRange .
1,598
private function fromDefinition ( $ type , $ startOrEnd ) { if ( ! array_key_exists ( $ type , $ this -> definition ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Invalid KeyRange %s type. Allowed values are %s.' , $ startOrEnd , implode ( ', ' , array_keys ( $ this -> definition ) ) ) ) ; } return $ this -> definition [ $ type ] [ $ startOrEnd ] ; }
Normalizes key range values .
1,599
public function analyzeSentiment ( $ content , array $ options = [ ] ) { return new Annotation ( $ this -> connection -> analyzeSentiment ( $ this -> formatRequest ( $ content , $ options ) ) ) ; }
Analyzes the sentiment of the provided document .