idx
int64
0
241k
question
stringlengths
64
6.21k
target
stringlengths
5
803
1,600
public function analyzeEntitySentiment ( $ content , array $ options = [ ] ) { return new Annotation ( $ this -> connection -> analyzeEntitySentiment ( $ this -> formatRequest ( $ content , $ options ) ) ) ; }
Finds entities in the text and analyzes sentiment associated with each entity and its mentions .
1,601
public function analyzeSyntax ( $ content , array $ options = [ ] ) { $ syntaxResponse = $ this -> connection -> analyzeSyntax ( $ this -> formatRequest ( $ content , $ options ) ) ; return new Annotation ( $ syntaxResponse + [ 'entities' => [ ] ] ) ; }
Analyzes the document and provides a full set of text annotations .
1,602
private function normalizeFeatures ( array $ features ) { $ results = [ ] ; foreach ( $ features as $ feature ) { $ featureName = array_key_exists ( $ feature , $ this -> featureShortNames ) ? $ this -> featureShortNames [ $ feature ] : $ feature ; $ results [ $ featureName ] = true ; } return $ results ; }
Configures features in a way the API expects .
1,603
public function SendNotificationChannelVerificationCode ( \ Google \ Cloud \ Monitoring \ V3 \ SendNotificationChannelVerificationCodeRequest $ argument , $ metadata = [ ] , $ options = [ ] ) { return $ this -> _simpleRequest ( '/google.monitoring.v3.NotificationChannelService/SendNotificationChannelVerificationCode' ,...
Causes a verification code to be delivered to the channel . The code can then be supplied in VerifyNotificationChannel to verify the channel .
1,604
public function VerifyNotificationChannel ( \ Google \ Cloud \ Monitoring \ V3 \ VerifyNotificationChannelRequest $ argument , $ metadata = [ ] , $ options = [ ] ) { return $ this -> _simpleRequest ( '/google.monitoring.v3.NotificationChannelService/VerifyNotificationChannel' , $ argument , [ '\Google\Cloud\Monitoring\...
Verifies a NotificationChannel by proving receipt of the code delivered to the channel as a result of calling SendNotificationChannelVerificationCode .
1,605
public function setIndices ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: INT32 ) ; $ this -> indices = $ arr ; return $ this ; }
The indices to remove from a lexicographically - sorted local list .
1,606
public static function workflowTemplateName ( $ project , $ region , $ workflowTemplate ) { return self :: getWorkflowTemplateNameTemplate ( ) -> render ( [ 'project' => $ project , 'region' => $ region , 'workflow_template' => $ workflowTemplate , ] ) ; }
Formats a string containing the fully - qualified path to represent a workflow_template resource .
1,607
public function setAlertPolicies ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Monitoring \ V3 \ AlertPolicy :: class ) ; $ this -> alert_policies = $ arr ; return $ this ; }
The returned alert policies .
1,608
public function setInventors ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> inventors = $ arr ; return $ this ; }
Optional . A list of inventors names . Number of characters allowed for each is 100 .
1,609
public function setSkillsUsed ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Talent \ V4beta1 \ Skill :: class ) ; $ this -> skills_used = $ arr ; return $ this ; }
Optional . The skills used in this patent .
1,610
public function setProducts ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Vision \ V1 \ Product :: class ) ; $ this -> products = $ arr ; return $ this ; }
List of products .
1,611
public function setResults ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Vision \ V1 \ ProductSearchResults \ Result :: class ) ; $ this -> results = $ arr ; return $ this ; }
List of results one for each product match .
1,612
public function setProductGroupedResults ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Vision \ V1 \ ProductSearchResults \ GroupedResult :: class ) ; $ this -> product_grouped_results = $ arr ; return $ this ; }
List of results grouped by products detected in the query image . Each entry corresponds to one bounding polygon in the query image and contains the matching products specific to that region . There may be duplicate product matches in the union of all the per - product results .
1,613
public function current ( ) { $ page = $ this -> pageIterator -> current ( ) ; return isset ( $ page [ $ this -> pageIndex ] ) ? $ page [ $ this -> pageIndex ] : null ; }
Get the current item .
1,614
public function next ( ) { $ this -> pageIndex ++ ; $ this -> position ++ ; if ( count ( $ this -> pageIterator -> current ( ) ) <= $ this -> pageIndex && $ this -> nextResultToken ( ) ) { $ this -> pageIterator -> next ( ) ; $ this -> pageIndex = 0 ; } }
Advances to the next item .
1,615
public function valid ( ) { $ page = $ this -> pageIterator -> current ( ) ; if ( isset ( $ page [ $ this -> pageIndex ] ) ) { return true ; } while ( $ this -> nextResultToken ( ) ) { $ this -> pageIterator -> next ( ) ; $ page = $ this -> pageIterator -> current ( ) ; if ( isset ( $ page [ $ this -> pageIndex ] ) ) {...
Determines if the current position is valid .
1,616
public function setQueryList ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dataproc \ V1beta2 \ QueryList :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
A list of queries .
1,617
public function setProperties ( $ var ) { $ arr = GPBUtil :: checkMapField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> properties = $ arr ; return $ this ; }
Optional . A mapping of property names to values used to configure Spark SQL s SparkConf . Properties that conflict with values set by the Cloud Dataproc API may be overwritten .
1,618
public function setJarFileUris ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> jar_file_uris = $ arr ; return $ this ; }
Optional . HCFS URIs of jar files to be added to the Spark CLASSPATH .
1,619
public function setLoggingConfig ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dataproc \ V1beta2 \ LoggingConfig :: class ) ; $ this -> logging_config = $ var ; return $ this ; }
Optional . The runtime log config for job execution .
1,620
public function setEntityTypeNames ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> entity_type_names = $ arr ; return $ this ; }
Required . The names entity types to delete . All names must point to the same agent as parent .
1,621
public function setClassificationEvaluationMetrics ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ AutoMl \ V1beta1 \ ClassificationEvaluationMetrics :: class ) ; $ this -> writeOneof ( 8 , $ var ) ; return $ this ; }
Evaluation metrics for models on classification problems models .
1,622
public function setTranslationEvaluationMetrics ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ AutoMl \ V1beta1 \ TranslationEvaluationMetrics :: class ) ; $ this -> writeOneof ( 9 , $ var ) ; return $ this ; }
Evaluation metrics for models on translation models .
1,623
private function updateComponentVersions ( array $ release ) { foreach ( $ release as $ key => $ releaseComponent ) { $ component = $ this -> getComponentComposer ( $ this -> rootPath ( ) , $ key ) ; $ this -> addToComponentManifest ( $ releaseComponent [ 'version' ] , $ component ) ; foreach ( ( array ) $ component [ ...
Iterate through a release and do the work of preparing a release .
1,624
private function determineUmbrellaLevel ( array $ release ) { $ levels = [ ] ; array_walk ( $ release , function ( $ component ) use ( & $ levels ) { $ levels [ ] = $ component [ 'level' ] ; } ) ; $ levels = array_unique ( $ levels ) ; rsort ( $ levels ) ; if ( $ levels [ 0 ] === self :: LEVEL_MAJOR ) { $ levels [ 0 ] ...
Determine the release level of the umbrella package by examining the levels of all affected components and incrementing the umbrella by the highest level of a component release .
1,625
private function createReleaseNotes ( array $ release ) { $ buildDir = $ this -> rootPath . '/build' ; $ locationTemplate = $ buildDir . '/release-%s.md' ; if ( ! is_dir ( $ buildDir ) ) { mkdir ( $ buildDir ) ; } $ umbrella = $ release [ self :: DEFAULT_COMPONENT ] ; $ location = sprintf ( $ locationTemplate , $ umbre...
Build a release notes markdown file .
1,626
private function mergeCommitIntoRelease ( array $ release , array $ commitRelease ) { foreach ( $ commitRelease as $ key => $ commit ) { if ( ! isset ( $ release [ $ key ] ) ) { $ release [ $ key ] = [ 'level' => $ commit [ 'level' ] , 'messages' => [ $ commit [ 'message' ] ] ] ; } else { $ release [ $ key ] [ 'message...
Interlace new commit release data into an existing release structure .
1,627
private function interactiveCommitRelease ( OutputInterface $ output , array $ commit , array $ components ) { $ commitRelease = $ this -> processCommit ( $ output , $ commit , $ components ) ; $ proceed = false ; do { $ this -> displayCommitSummary ( $ output , $ commitRelease ) ; $ output -> writeln ( '' ) ; $ choice...
Determine defaults for components affected by the commit display an overview and provide an interface for modifications .
1,628
public function handleChange ( OutputInterface $ output , array $ commitRelease , $ level = null ) { $ choices = array_keys ( $ commitRelease ) ; if ( count ( $ choices ) > 1 ) { $ options = array_merge ( [ 'All Components' ] , $ choices , [ 'Go Back' ] ) ; $ q = $ this -> choice ( 'Choose a component to modify.' , $ o...
An interactive flow for modifying release data .
1,629
private function processCommit ( OutputInterface $ output , array $ commit , array $ components ) { $ output -> writeln ( sprintf ( 'Processing Commit: <info>%s</info>' , $ commit [ 'message' ] ) ) ; $ output -> writeln ( sprintf ( 'View on GitHub: %s' , $ commit [ 'htmlUrl' ] ) ) ; $ output -> writeln ( '----------' )...
Top - level CLI to process a single commit and display information to the user .
1,630
private function displayCommitSummary ( OutputInterface $ output , array $ commitRelease ) { $ output -> writeln ( 'Commit Summary' ) ; $ output -> writeln ( '-----' ) ; foreach ( $ commitRelease as $ key => $ releaseInfo ) { $ output -> writeln ( sprintf ( '<info>google/%s</info> [<info>%s</info>]' , $ key , $ this ->...
Formatted summary of the release state of components in the commit .
1,631
private function determineSuggestedLevel ( array $ levelChoices , $ suggestedLevel , array $ files ) { $ reasons = [ ] ; if ( $ levelChoices !== $ this -> levels ) { $ suggestedLevel = array_keys ( $ levelChoices ) [ 0 ] ; $ reasons [ ] = 'Another change specified a higher minimum release level.' ; } if ( isset ( $ lev...
Logic to determine the best release level for a component .
1,632
private function getOrgAndRepo ( array $ composer ) { $ target = $ composer [ 'target' ] ; $ matches = [ ] ; preg_match ( self :: TARGET_REGEX , $ target , $ matches ) ; $ org = $ matches [ 1 ] ; $ repo = $ matches [ 2 ] ; return [ $ org , $ repo ] ; }
Parse the organization and repo from a composer file .
1,633
private function hasExpectedBase ( $ org , $ repo , $ version ) { $ url = sprintf ( self :: GITHUB_RELEASES_ENDPOINT , $ org , $ repo , $ version ) ; try { $ res = $ this -> http -> get ( $ url , [ 'auth' => [ null , $ this -> token ] ] ) ; return true ; } catch ( RequestException $ e ) { return false ; } }
Check that a Github Repository has the expected release .
1,634
private function getCommits ( $ org , $ repo , $ version ) { $ url = sprintf ( self :: GITHUB_COMPARE_ENDPOINT , $ org , $ repo , $ version ) ; $ res = json_decode ( $ this -> http -> get ( $ url , [ 'auth' => [ null , $ this -> token ] ] ) -> getBody ( ) , true ) ; $ commits = [ ] ; foreach ( $ res [ 'commits' ] as $ ...
Get a list of commits between a version and the current repository state .
1,635
private function getCommitComponentModifiedList ( $ url ) { $ commit = json_decode ( $ this -> http -> get ( $ url , [ 'auth' => [ null , $ this -> token ] ] ) -> getBody ( ) , true ) ; $ changedComponents = [ ] ; $ fileDirectoryComponent = [ ] ; foreach ( $ commit [ 'files' ] as $ file ) { $ filename = $ file [ 'filen...
Query the github API for a list of files modified by a commit .
1,636
public function batch ( $ instanceId , $ databaseId ) { $ operation = new Operation ( $ this -> connection , $ this -> returnInt64AsObject ) ; return new BatchClient ( $ operation , GapicSpannerClient :: databaseName ( $ this -> projectId , $ instanceId , $ databaseId ) ) ; }
Get a Batch Client .
1,637
public function instanceConfigurations ( array $ options = [ ] ) { $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ? : 0 ; return new ItemIterator ( new PageIterator ( function ( array $ config ) { return $ this -> instanceConfiguration ( $ config [ 'name' ] , $ config ) ; } , [ $ this -> connecti...
List all available instance configurations .
1,638
public function instanceConfiguration ( $ name , array $ config = [ ] ) { return new InstanceConfiguration ( $ this -> connection , $ this -> projectId , $ name , $ config ) ; }
Get an instance configuration by its name .
1,639
public function instance ( $ name , array $ instance = [ ] ) { return new Instance ( $ this -> connection , $ this -> lroConnection , $ this -> lroCallables , $ this -> projectId , $ name , $ this -> returnInt64AsObject , $ instance ) ; }
Lazily instantiate an instance .
1,640
public function instances ( array $ options = [ ] ) { $ options += [ 'filter' => null ] ; $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; return new ItemIterator ( new PageIterator ( function ( array $ instance ) { $ name = InstanceAdminClient :: parseName ( $ instance [ 'name' ] ) [ 'instance' ...
List instances in the project
1,641
public function connect ( $ instance , $ name , array $ options = [ ] ) { if ( is_string ( $ instance ) ) { $ instance = $ this -> instance ( $ instance ) ; } $ database = $ instance -> database ( $ name , $ options ) ; return $ database ; }
Connect to a database to run queries or mutations .
1,642
public function setPerSeriesAligner ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Monitoring \ V3 \ Aggregation_Aligner :: class ) ; $ this -> per_series_aligner = $ var ; return $ this ; }
The approach to be used to align individual time series . Not all alignment functions may be applied to all time series depending on the metric type and value type of the original time series . Alignment may change the metric type or the value type of the time series . Time series data must be aligned in order to perfo...
1,643
public function setCrossSeriesReducer ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Monitoring \ V3 \ Aggregation_Reducer :: class ) ; $ this -> cross_series_reducer = $ var ; return $ this ; }
The approach to be used to combine time series . Not all reducer functions may be applied to all time series depending on the metric type and the value type of the original time series . Reduction may change the metric type of value type of the time series . Time series data must be aligned in order to perform cross - ...
1,644
public function setGroupByFields ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> group_by_fields = $ arr ; return $ this ; }
The set of fields to preserve when crossSeriesReducer is specified . The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function . Each subset contains time series that have the same value for each of the grouping fields . Each individual time series is a memb...
1,645
public function resume ( $ resumeUri ) { if ( ! $ this -> data -> isSeekable ( ) ) { throw new GoogleException ( 'Cannot resume upload on a stream which cannot be seeked.' ) ; } $ this -> resumeUri = $ resumeUri ; $ response = $ this -> getStatusResponse ( ) ; if ( $ response -> getBody ( ) -> getSize ( ) > 0 ) { retur...
Resumes a download using the provided URI .
1,646
protected function getStatusResponse ( ) { $ request = new Request ( 'PUT' , $ this -> resumeUri , [ 'Content-Range' => 'bytes */*' ] ) ; return $ this -> requestWrapper -> send ( $ request , $ this -> requestOptions ) ; }
Gets the status of the upload .
1,647
public function setWindow ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Container \ V1 \ MaintenanceWindow :: class ) ; $ this -> window = $ var ; return $ this ; }
Specifies the maintenance window in which maintenance may be performed .
1,648
public function setPayload ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ AutoMl \ V1beta1 \ ExamplePayload :: class ) ; $ this -> payload = $ var ; return $ this ; }
Required . Payload to perform a prediction on . The payload must match the problem type that the model was trained to solve .
1,649
public function setDocuments ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Firestore \ V1 \ Document :: class ) ; $ this -> documents = $ arr ; return $ this ; }
The Documents found .
1,650
private function getInstanceAdminClient ( ) { if ( $ this -> instanceAdminClient ) { return $ this -> instanceAdminClient ; } $ this -> instanceAdminClient = new InstanceAdminClient ( $ this -> grpcConfig ) ; return $ this -> instanceAdminClient ; }
Allow lazy instantiation of the instance admin client .
1,651
private function getDatabaseAdminClient ( ) { if ( $ this -> databaseAdminClient ) { return $ this -> databaseAdminClient ; } $ this -> databaseAdminClient = new DatabaseAdminClient ( $ this -> grpcConfig ) ; return $ this -> databaseAdminClient ; }
Allow lazy instantiation of the database admin client .
1,652
public function format ( array $ record ) { $ message = parent :: format ( $ record ) ; list ( $ usec , $ sec ) = explode ( " " , microtime ( ) ) ; $ usec = ( int ) ( ( ( float ) $ usec ) * 1000000000 ) ; $ sec = ( int ) $ sec ; $ payload = [ 'message' => $ message , 'timestamp' => [ 'seconds' => $ sec , 'nanos' => $ u...
Get the plain text message with LineFormatter s format method and add metadata including the trace id then return the json string .
1,653
public function setArgs ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: STRING ) ; $ this -> args = $ arr ; return $ this ; }
Optional . The arguments to pass to the driver . Do not include arguments such as - libjars or - Dfoo = bar that can be set as job properties since a collision may occur that causes an incorrect job submission .
1,654
public function setConditionThreshold ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Monitoring \ V3 \ AlertPolicy_Condition_MetricThreshold :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; }
A condition that compares a time series against a threshold .
1,655
public function setConditionAbsent ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Monitoring \ V3 \ AlertPolicy_Condition_MetricAbsence :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
A condition that checks that a time series continues to receive new data points .
1,656
public function setPolicy ( $ policy , array $ options = [ ] ) { if ( $ policy instanceof PolicyBuilder ) { $ policy = $ policy -> result ( ) ; } if ( ! is_array ( $ policy ) ) { throw new \ InvalidArgumentException ( 'Given policy data must be an array or an instance of PolicyBuilder.' ) ; } $ request = [ ] ; if ( $ t...
Set the IAM policy for this resource .
1,657
public function reload ( array $ options = [ ] ) { return $ this -> policy = $ this -> connection -> getPolicy ( [ 'resource' => $ this -> resource ] + $ options + $ this -> options [ 'args' ] ) ; }
Refresh the IAM policy for this resource .
1,658
public function setJobs ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dataproc \ V1 \ OrderedJob :: class ) ; $ this -> jobs = $ arr ; return $ this ; }
Required . The Directed Acyclic Graph of Jobs to submit .
1,659
public function setParameters ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dataproc \ V1 \ TemplateParameter :: class ) ; $ this -> parameters = $ arr ; return $ this ; }
Optional . Template parameters whose values are substituted into the template . Values for parameters must be provided when the template is instantiated .
1,660
public function setPartitionId ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Datastore \ V1 \ PartitionId :: class ) ; $ this -> partition_id = $ var ; return $ this ; }
Entities are partitioned into subsets identified by a partition ID . Queries are scoped to a single partition . This partition ID is normalized with the standard default context partition ID .
1,661
public function setReadOptions ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Datastore \ V1 \ ReadOptions :: class ) ; $ this -> read_options = $ var ; return $ this ; }
The options for this query .
1,662
public function setQuery ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Datastore \ V1 \ Query :: class ) ; $ this -> writeOneof ( 3 , $ var ) ; return $ this ; }
The query to run .
1,663
public function setGqlQuery ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Datastore \ V1 \ GqlQuery :: class ) ; $ this -> writeOneof ( 7 , $ var ) ; return $ this ; }
The GQL query to run .
1,664
public function setMessages ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ PubSub \ V1 \ PubsubMessage :: class ) ; $ this -> messages = $ arr ; return $ this ; }
The messages to publish .
1,665
private function getComponentManifest ( $ manifestPath , $ componentId ) { $ manifest = $ this -> getManifest ( $ manifestPath ) ; $ index = $ this -> getManifestComponentModuleIndex ( $ manifest , $ componentId ) ; return $ manifest [ 'modules' ] [ $ index ] ; }
Return manifest data for the given component .
1,666
private function getManifestComponentModuleIndex ( $ manifest , $ componentId ) { $ manifest = is_array ( $ manifest ) ? $ manifest : $ this -> getManifest ( $ manifest ) ; $ modules = array_filter ( $ manifest [ 'modules' ] , function ( $ module ) use ( $ componentId ) { return ( $ module [ 'id' ] === $ componentId ) ...
Get the manifest component index .
1,667
private function getManifest ( $ manifestPath ) { if ( self :: $ __manifest ) { $ manifest = self :: $ __manifest ; } else { $ manifest = json_decode ( file_get_contents ( $ manifestPath ) , true ) ; if ( json_last_error ( ) !== JSON_ERROR_NONE ) { throw new \ RuntimeException ( 'Could not decode manifest json' ) ; } s...
Read the given file as a package manifest .
1,668
private function getComponentComposer ( $ libraryRootPath , $ componentId , $ defaultComposerPath = null ) { if ( ! $ defaultComposerPath ) { $ defaultComposerPath = isset ( $ this -> defaultComponentComposer ) ? $ this -> defaultComponentComposer : null ; } $ componentsDir = isset ( $ this -> components ) ? $ this -> ...
Get the composer . json data for a given component .
1,669
public function setDominantColors ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Vision \ V1 \ DominantColorsAnnotation :: class ) ; $ this -> dominant_colors = $ var ; return $ this ; }
If present dominant colors completed successfully .
1,670
public function componentsExtra ( $ componentId = null ) { $ components = $ this -> components ? : $ this -> loadComponents ( ) ; array_walk ( $ components , function ( & $ component ) { $ name = $ component [ 'composer' ] [ 'name' ] ; $ component = $ component [ 'composer' ] [ 'extra' ] [ 'component' ] ; $ component [...
Get all component s composer . json extra data .
1,671
public function componentsManifest ( $ componentId = null ) { $ manifest = $ this -> manifest ? : $ this -> loadManifest ; $ modules = $ manifest [ 'modules' ] ; if ( $ componentId ) { $ modules = array_filter ( $ modules , function ( $ module ) use ( $ componentId ) { return $ module [ 'id' ] === $ componentId ; } ) ;...
Get all component s manifest . json data .
1,672
public function componentsVersion ( $ componentId = null ) { $ components = $ this -> components ? : $ this -> loadComponents ( ) ; array_walk ( $ components , function ( & $ component ) { $ component = $ component [ 'version' ] ; } ) ; return $ componentId ? [ $ componentId => $ components [ $ componentId ] ] : $ comp...
Get the latest version of each component .
1,673
public function deleteFromFamily ( $ family ) { $ this -> mutations [ ] = ( new Mutation ) -> setDeleteFromFamily ( ( new DeleteFromFamily ) -> setFamilyName ( $ family ) ) ; return $ this ; }
Creates delete from family mutation for a row .
1,674
public function deleteFromColumn ( $ family , $ qualifier , array $ timeRange = [ ] ) { $ deleteFromColumn = ( new DeleteFromColumn ) -> setFamilyName ( $ family ) -> setColumnQualifier ( $ qualifier ) ; if ( ! empty ( $ timeRange ) ) { $ timestampRange = new TimestampRange ; if ( isset ( $ timeRange [ 'start' ] ) ) { ...
Creates delete from column mutation for a row .
1,675
public function setPartitionId ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ PartitionId :: class ) ; $ this -> partition_id = $ var ; return $ this ; }
A partition ID identifies a grouping of entities . The grouping is always by project and namespace however the namespace ID may be empty .
1,676
public function setKind ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ KindExpression :: class ) ; $ this -> kind = $ var ; return $ this ; }
The kind to process .
1,677
public function exists ( array $ options = [ ] ) { try { $ this -> connection -> getObject ( $ this -> identity + $ options + [ 'fields' => 'name' ] ) ; } catch ( NotFoundException $ ex ) { return false ; } return true ; }
Check whether or not the object exists .
1,678
public function update ( array $ metadata , array $ options = [ ] ) { $ options += $ metadata ; if ( isset ( $ options [ 'predefinedAcl' ] ) ) { $ options [ 'acl' ] = null ; } return $ this -> info = $ this -> connection -> patchObject ( $ options + array_filter ( $ this -> identity ) ) ; }
Update the object . Upon receiving a result the local object s data will be updated .
1,679
public function copy ( $ destination , array $ options = [ ] ) { $ key = isset ( $ options [ 'encryptionKey' ] ) ? $ options [ 'encryptionKey' ] : null ; $ keySHA256 = isset ( $ options [ 'encryptionKeySHA256' ] ) ? $ options [ 'encryptionKeySHA256' ] : null ; $ response = $ this -> connection -> copyObject ( $ this ->...
Copy the object to a destination bucket .
1,680
public function rewrite ( $ destination , array $ options = [ ] ) { $ options [ 'useCopySourceHeaders' ] = true ; $ destinationKey = isset ( $ options [ 'destinationEncryptionKey' ] ) ? $ options [ 'destinationEncryptionKey' ] : null ; $ destinationKeySHA256 = isset ( $ options [ 'destinationEncryptionKeySHA256' ] ) ? ...
Rewrite the object to a destination bucket .
1,681
public function rename ( $ name , array $ options = [ ] ) { $ destinationBucket = isset ( $ options [ 'destinationBucket' ] ) ? $ options [ 'destinationBucket' ] : $ this -> identity [ 'bucket' ] ; unset ( $ options [ 'destinationBucket' ] ) ; $ copiedObject = $ this -> copy ( $ destinationBucket , [ 'name' => $ name ]...
Renames the object .
1,682
public function downloadToFile ( $ path , array $ options = [ ] ) { $ destination = Psr7 \ stream_for ( fopen ( $ path , 'w' ) ) ; Psr7 \ copy_to_stream ( $ this -> downloadAsStream ( $ options ) , $ destination ) ; $ destination -> seek ( 0 ) ; return $ destination ; }
Download an object to a specified location .
1,683
public function downloadAsStream ( array $ options = [ ] ) { return $ this -> connection -> downloadObject ( $ this -> formatEncryptionHeaders ( $ options + $ this -> encryptionData + array_filter ( $ this -> identity ) ) ) ; }
Download an object as a stream .
1,684
public function downloadAsStreamAsync ( array $ options = [ ] ) { return $ this -> connection -> downloadObjectAsync ( $ this -> formatEncryptionHeaders ( $ options + $ this -> encryptionData + array_filter ( $ this -> identity ) ) ) ; }
Asynchronously download an object as a stream .
1,685
public function signedUploadUrl ( $ expires , array $ options = [ ] ) { $ options += [ 'headers' => [ ] ] ; $ options [ 'headers' ] [ 'x-goog-resumable' ] = 'start' ; unset ( $ options [ 'cname' ] , $ options [ 'saveAsName' ] , $ options [ 'responseDisposition' ] , $ options [ 'responseType' ] ) ; return $ this -> sign...
Create a Signed Upload URL for this object .
1,686
public function beginSignedUploadSession ( array $ options = [ ] ) { $ expires = new \ DateTimeImmutable ( '+1 minute' ) ; $ startUri = $ this -> signedUploadUrl ( $ expires , $ options ) ; $ uploaderOptions = $ this -> pluckArray ( [ 'contentType' , 'origin' ] , $ options ) ; if ( ! isset ( $ uploaderOptions [ 'origin...
Create a signed URL upload session .
1,687
public function reload ( array $ options = [ ] ) { return $ this -> info = $ this -> connection -> getObject ( $ this -> formatEncryptionHeaders ( $ options + $ this -> encryptionData + array_filter ( $ this -> identity ) ) ) ; }
Triggers a network request to reload the object s details .
1,688
private function formatDestinationRequest ( $ destination , array $ options ) { if ( ! is_string ( $ destination ) && ! ( $ destination instanceof Bucket ) ) { throw new \ InvalidArgumentException ( '$destination must be either a string or an instance of Bucket.' ) ; } $ destAcl = isset ( $ options [ 'predefinedAcl' ] ...
Formats a destination based request such as copy or rewrite .
1,689
public function setTriggers ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ JobTrigger \ Trigger :: class ) ; $ this -> triggers = $ arr ; return $ this ; }
A list of triggers which will be OR ed together . Only one in the list needs to trigger for a job to be started . The list may contain only a single Schedule trigger and must have at least one object .
1,690
public function setErrors ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ Error :: class ) ; $ this -> errors = $ arr ; return $ this ; }
A stream of errors encountered when the trigger was activated . Repeated errors may result in the JobTrigger automatically being paused . Will return the last 100 errors . Whenever the JobTrigger is modified this list will be cleared . Output only field .
1,691
public function BatchGetAssetsHistory ( \ Google \ Cloud \ Asset \ V1 \ BatchGetAssetsHistoryRequest $ argument , $ metadata = [ ] , $ options = [ ] ) { return $ this -> _simpleRequest ( '/google.cloud.asset.v1.AssetService/BatchGetAssetsHistory' , $ argument , [ '\Google\Cloud\Asset\V1\BatchGetAssetsHistoryResponse' ,...
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 . If a...
1,692
public function setLargeCustomDictionary ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ LargeCustomDictionaryConfig :: class ) ; $ this -> writeOneof ( 3 , $ var ) ; return $ this ; }
StoredInfoType where findings are defined by a dictionary of phrases .
1,693
public function setGcsSource ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ AutoMl \ V1beta1 \ GcsSource :: class ) ; $ this -> writeOneof ( 1 , $ var ) ; return $ this ; }
The GCS location for the input content .
1,694
public function setSubstate ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Cloud \ Dataproc \ V1 \ JobStatus_Substate :: class ) ; $ this -> substate = $ var ; return $ this ; }
Output only . Additional state information which includes status reported by the agent .
1,695
public function setEntityType ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dialogflow \ V2 \ EntityType :: class ) ; $ this -> entity_type = $ var ; return $ this ; }
Required . The entity type to create .
1,696
public function setValue ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ Value :: class ) ; $ this -> value = $ var ; return $ this ; }
A value contained in the field in question .
1,697
public function setByteRange ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ Range :: class ) ; $ this -> byte_range = $ var ; return $ this ; }
Zero - based byte offsets delimiting the finding . These are relative to the finding s containing element . Note that when the content is not textual this references the UTF - 8 encoded textual representation of the content . Omitted if content is an image .
1,698
public function setCodepointRange ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ Range :: class ) ; $ this -> codepoint_range = $ var ; return $ this ; }
Unicode character offsets delimiting the finding . These are relative to the finding s containing element . Provided when the content is text .
1,699
public function setContentLocations ( $ var ) { $ arr = GPBUtil :: checkRepeatedField ( $ var , \ Google \ Protobuf \ Internal \ GPBType :: MESSAGE , \ Google \ Cloud \ Dlp \ V2 \ ContentLocation :: class ) ; $ this -> content_locations = $ arr ; return $ this ; }
List of nested objects pointing to the precise location of the finding within the file or record .