repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
googleapis/google-cloud-php | Monitoring/src/V3/ListMetricDescriptorsResponse.php | ListMetricDescriptorsResponse.setMetricDescriptors | public function setMetricDescriptors($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MetricDescriptor::class);
$this->metric_descriptors = $arr;
return $this;
} | php | public function setMetricDescriptors($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MetricDescriptor::class);
$this->metric_descriptors = $arr;
return $this;
} | [
"public",
"function",
"setMetricDescriptors",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google"... | The metric descriptors that are available to the project
and that match the value of `filter`, if present.
Generated from protobuf field <code>repeated .google.api.MetricDescriptor metric_descriptors = 1;</code>
@param \Google\Api\MetricDescriptor[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"The",
"metric",
"descriptors",
"that",
"are",
"available",
"to",
"the",
"project",
"and",
"that",
"match",
"the",
"value",
"of",
"filter",
"if",
"present",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Monitoring/src/V3/ListMetricDescriptorsResponse.php#L74-L80 | train |
googleapis/google-cloud-php | Vision/src/V1/ListProductSetsResponse.php | ListProductSetsResponse.setProductSets | public function setProductSets($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSet::class);
$this->product_sets = $arr;
return $this;
} | php | public function setProductSets($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSet::class);
$this->product_sets = $arr;
return $this;
} | [
"public",
"function",
"setProductSets",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\... | List of ProductSets.
Generated from protobuf field <code>repeated .google.cloud.vision.v1.ProductSet product_sets = 1;</code>
@param \Google\Cloud\Vision\V1\ProductSet[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"List",
"of",
"ProductSets",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Vision/src/V1/ListProductSetsResponse.php#L68-L74 | train |
googleapis/google-cloud-php | Scheduler/src/V1beta1/HttpTarget.php | HttpTarget.setHttpMethod | public function setHttpMethod($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Scheduler\V1beta1\HttpMethod::class);
$this->http_method = $var;
return $this;
} | php | public function setHttpMethod($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Scheduler\V1beta1\HttpMethod::class);
$this->http_method = $var;
return $this;
} | [
"public",
"function",
"setHttpMethod",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Scheduler",
"\\",
"V1beta1",
"\\",
"HttpMethod",
"::",
"class",
")",
";",
"$",
"this",
"->",
"ht... | Which HTTP method to use for the request.
Generated from protobuf field <code>.google.cloud.scheduler.v1beta1.HttpMethod http_method = 2;</code>
@param int $var
@return $this | [
"Which",
"HTTP",
"method",
"to",
"use",
"for",
"the",
"request",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Scheduler/src/V1beta1/HttpTarget.php#L182-L188 | train |
googleapis/google-cloud-php | Datastore/src/V1/Value.php | Value.setKeyValue | public function setKeyValue($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Datastore\V1\Key::class);
$this->writeOneof(5, $var);
return $this;
} | php | public function setKeyValue($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Datastore\V1\Key::class);
$this->writeOneof(5, $var);
return $this;
} | [
"public",
"function",
"setKeyValue",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Datastore",
"\\",
"V1",
"\\",
"Key",
"::",
"class",
")",
";",
"$",
"this",
"->",
"writeOneof",
... | A key value.
Generated from protobuf field <code>.google.datastore.v1.Key key_value = 5;</code>
@param \Google\Cloud\Datastore\V1\Key $var
@return $this | [
"A",
"key",
"value",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Datastore/src/V1/Value.php#L239-L245 | train |
googleapis/google-cloud-php | Monitoring/src/V3/UpdateAlertPolicyRequest.php | UpdateAlertPolicyRequest.setAlertPolicy | public function setAlertPolicy($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy::class);
$this->alert_policy = $var;
return $this;
} | php | public function setAlertPolicy($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy::class);
$this->alert_policy = $var;
return $this;
} | [
"public",
"function",
"setAlertPolicy",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Monitoring",
"\\",
"V3",
"\\",
"AlertPolicy",
"::",
"class",
")",
";",
"$",
"this",
"->",
"a... | Required. The updated alerting policy or the updated values for the
fields listed in `update_mask`.
If `update_mask` is not empty, any fields in this policy that are
not in `update_mask` are ignored.
Generated from protobuf field <code>.google.monitoring.v3.AlertPolicy alert_policy = 3;</code>
@param \Google\Cloud\Mon... | [
"Required",
".",
"The",
"updated",
"alerting",
"policy",
"or",
"the",
"updated",
"values",
"for",
"the",
"fields",
"listed",
"in",
"update_mask",
".",
"If",
"update_mask",
"is",
"not",
"empty",
"any",
"fields",
"in",
"this",
"policy",
"that",
"are",
"not",
... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Monitoring/src/V3/UpdateAlertPolicyRequest.php#L172-L178 | train |
googleapis/google-cloud-php | Firestore/src/FirestoreClient.php | FirestoreClient.batch | public function batch()
{
return new WriteBatch(
$this->connection,
$this->valueMapper,
$this->databaseName(
$this->projectId,
$this->database
)
);
} | php | public function batch()
{
return new WriteBatch(
$this->connection,
$this->valueMapper,
$this->databaseName(
$this->projectId,
$this->database
)
);
} | [
"public",
"function",
"batch",
"(",
")",
"{",
"return",
"new",
"WriteBatch",
"(",
"$",
"this",
"->",
"connection",
",",
"$",
"this",
"->",
"valueMapper",
",",
"$",
"this",
"->",
"databaseName",
"(",
"$",
"this",
"->",
"projectId",
",",
"$",
"this",
"->... | Get a Batch Writer
The {@see Google\Cloud\Firestore\WriteBatch} allows more performant
multi-document, atomic updates.
Example:
```
$batch = $firestore->batch();
```
@return WriteBatch | [
"Get",
"a",
"Batch",
"Writer"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/FirestoreClient.php#L171-L181 | train |
googleapis/google-cloud-php | Firestore/src/FirestoreClient.php | FirestoreClient.collection | public function collection($name)
{
return $this->getCollectionReference(
$this->connection,
$this->valueMapper,
$this->projectId,
$this->database,
$name
);
} | php | public function collection($name)
{
return $this->getCollectionReference(
$this->connection,
$this->valueMapper,
$this->projectId,
$this->database,
$name
);
} | [
"public",
"function",
"collection",
"(",
"$",
"name",
")",
"{",
"return",
"$",
"this",
"->",
"getCollectionReference",
"(",
"$",
"this",
"->",
"connection",
",",
"$",
"this",
"->",
"valueMapper",
",",
"$",
"this",
"->",
"projectId",
",",
"$",
"this",
"->... | Lazily instantiate a Collection reference.
Collections hold Firestore documents. Collections cannot be created or
deleted directly - they exist only as implicit namespaces. Once no child
documents remain in a collection, it ceases to exist.
Example:
```
$collection = $firestore->collection('users');
```
@param strin... | [
"Lazily",
"instantiate",
"a",
"Collection",
"reference",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/FirestoreClient.php#L198-L207 | train |
googleapis/google-cloud-php | Firestore/src/FirestoreClient.php | FirestoreClient.collections | public function collections(array $options = [])
{
$resultLimit = $this->pluck('resultLimit', $options, false);
return new ItemIterator(
new PageIterator(
function ($collectionId) {
return $this->collection($collectionId);
},
... | php | public function collections(array $options = [])
{
$resultLimit = $this->pluck('resultLimit', $options, false);
return new ItemIterator(
new PageIterator(
function ($collectionId) {
return $this->collection($collectionId);
},
... | [
"public",
"function",
"collections",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"resultLimit",
"=",
"$",
"this",
"->",
"pluck",
"(",
"'resultLimit'",
",",
"$",
"options",
",",
"false",
")",
";",
"return",
"new",
"ItemIterator",
"(",
"n... | List root-level collections in the database.
Example:
```
$collections = $firestore->collections();
```
@codingStandardsIgnoreStart
@see https://firebase.google.com/docs/firestore/reference/rpc/google.firestore.v1beta1#google.firestore.v1beta1.Firestore.ListCollectionIds ListCollectionIds
@codingStandardsIgnoreEnd
@... | [
"List",
"root",
"-",
"level",
"collections",
"in",
"the",
"database",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/FirestoreClient.php#L233-L251 | train |
googleapis/google-cloud-php | Firestore/src/FirestoreClient.php | FirestoreClient.document | public function document($name)
{
return $this->getDocumentReference(
$this->connection,
$this->valueMapper,
$this->projectId,
$this->database,
$name
);
} | php | public function document($name)
{
return $this->getDocumentReference(
$this->connection,
$this->valueMapper,
$this->projectId,
$this->database,
$name
);
} | [
"public",
"function",
"document",
"(",
"$",
"name",
")",
"{",
"return",
"$",
"this",
"->",
"getDocumentReference",
"(",
"$",
"this",
"->",
"connection",
",",
"$",
"this",
"->",
"valueMapper",
",",
"$",
"this",
"->",
"projectId",
",",
"$",
"this",
"->",
... | Get a reference to a Firestore document.
Example:
```
$document = $firestore->document('users/john');
```
@param string $name The document name or a path, relative to the database.
@return DocumentReference
@throws \InvalidArgumentException If the given path is not a valid document path. | [
"Get",
"a",
"reference",
"to",
"a",
"Firestore",
"document",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/FirestoreClient.php#L265-L274 | train |
googleapis/google-cloud-php | Firestore/src/FirestoreClient.php | FirestoreClient.runTransaction | public function runTransaction(callable $callable, array $options = [])
{
$options += [
'maxRetries' => self::MAX_RETRIES,
'begin' => [],
'commit' => [],
'rollback' => []
];
$retryableErrors = [
AbortedException::class
];
... | php | public function runTransaction(callable $callable, array $options = [])
{
$options += [
'maxRetries' => self::MAX_RETRIES,
'begin' => [],
'commit' => [],
'rollback' => []
];
$retryableErrors = [
AbortedException::class
];
... | [
"public",
"function",
"runTransaction",
"(",
"callable",
"$",
"callable",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"+=",
"[",
"'maxRetries'",
"=>",
"self",
"::",
"MAX_RETRIES",
",",
"'begin'",
"=>",
"[",
"]",
",",
"'commit'"... | Executes a function in a Firestore transaction.
Transactions offer atomic operations, guaranteeing that either all
writes will be applied, or none will be applied. The Google Cloud PHP
Firestore client also handles automatic retry in cases where transactions
fail due to a retryable error.
Transactions will be committ... | [
"Executes",
"a",
"function",
"in",
"a",
"Firestore",
"transaction",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/FirestoreClient.php#L394-L469 | train |
googleapis/google-cloud-php | Firestore/src/Admin/V1/UpdateFieldRequest.php | UpdateFieldRequest.setField | public function setField($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field::class);
$this->field = $var;
return $this;
} | php | public function setField($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field::class);
$this->field = $var;
return $this;
} | [
"public",
"function",
"setField",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"Admin",
"\\",
"V1",
"\\",
"Field",
"::",
"class",
")",
";",
"$",
"this",
"->"... | The field to be updated.
Generated from protobuf field <code>.google.firestore.admin.v1.Field field = 1;</code>
@param \Google\Cloud\Firestore\Admin\V1\Field $var
@return $this | [
"The",
"field",
"to",
"be",
"updated",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Admin/V1/UpdateFieldRequest.php#L68-L74 | train |
googleapis/google-cloud-php | Spanner/src/V1/Mutation.php | Mutation.setDelete | public function setDelete($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Spanner\V1\Mutation_Delete::class);
$this->writeOneof(5, $var);
return $this;
} | php | public function setDelete($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Spanner\V1\Mutation_Delete::class);
$this->writeOneof(5, $var);
return $this;
} | [
"public",
"function",
"setDelete",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Spanner",
"\\",
"V1",
"\\",
"Mutation_Delete",
"::",
"class",
")",
";",
"$",
"this",
"->",
"write... | Delete rows from a table. Succeeds whether or not the named
rows were present.
Generated from protobuf field <code>.google.spanner.v1.Mutation.Delete delete = 5;</code>
@param \Google\Cloud\Spanner\V1\Mutation\Delete $var
@return $this | [
"Delete",
"rows",
"from",
"a",
"table",
".",
"Succeeds",
"whether",
"or",
"not",
"the",
"named",
"rows",
"were",
"present",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/V1/Mutation.php#L194-L200 | train |
googleapis/google-cloud-php | WebRisk/src/V1beta1/SearchUrisResponse.php | SearchUrisResponse.setThreat | public function setThreat($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse_ThreatUri::class);
$this->threat = $var;
return $this;
} | php | public function setThreat($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse_ThreatUri::class);
$this->threat = $var;
return $this;
} | [
"public",
"function",
"setThreat",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"WebRisk",
"\\",
"V1beta1",
"\\",
"SearchUrisResponse_ThreatUri",
"::",
"class",
")",
";",
"$",
"this"... | The threat list matches. This may be empty if the URI is on no list.
Generated from protobuf field <code>.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;</code>
@param \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse\ThreatUri $var
@return $this | [
"The",
"threat",
"list",
"matches",
".",
"This",
"may",
"be",
"empty",
"if",
"the",
"URI",
"is",
"on",
"no",
"list",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/WebRisk/src/V1beta1/SearchUrisResponse.php#L56-L62 | train |
googleapis/google-cloud-php | BigQueryDataTransfer/src/V1/ListTransferConfigsRequest.php | ListTransferConfigsRequest.setDataSourceIds | public function setDataSourceIds($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->data_source_ids = $arr;
return $this;
} | php | public function setDataSourceIds($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->data_source_ids = $arr;
return $this;
} | [
"public",
"function",
"setDataSourceIds",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"STRING",
")",
";",
"$",
"this",... | When specified, only configurations of requested data sources are returned.
Generated from protobuf field <code>repeated string data_source_ids = 2;</code>
@param string[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"When",
"specified",
"only",
"configurations",
"of",
"requested",
"data",
"sources",
"are",
"returned",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/BigQueryDataTransfer/src/V1/ListTransferConfigsRequest.php#L120-L126 | train |
googleapis/google-cloud-php | Core/src/ClientTrait.php | ClientTrait.getConnectionType | private function getConnectionType(array $config)
{
$isGrpcExtensionLoaded = $this->isGrpcLoaded();
$defaultTransport = $isGrpcExtensionLoaded ? 'grpc' : 'rest';
$transport = isset($config['transport'])
? strtolower($config['transport'])
: $defaultTransport;
... | php | private function getConnectionType(array $config)
{
$isGrpcExtensionLoaded = $this->isGrpcLoaded();
$defaultTransport = $isGrpcExtensionLoaded ? 'grpc' : 'rest';
$transport = isset($config['transport'])
? strtolower($config['transport'])
: $defaultTransport;
... | [
"private",
"function",
"getConnectionType",
"(",
"array",
"$",
"config",
")",
"{",
"$",
"isGrpcExtensionLoaded",
"=",
"$",
"this",
"->",
"isGrpcLoaded",
"(",
")",
";",
"$",
"defaultTransport",
"=",
"$",
"isGrpcExtensionLoaded",
"?",
"'grpc'",
":",
"'rest'",
";... | Get either a gRPC or REST connection based on the provided config
and the system dependencies available.
@param array $config
@return string
@throws GoogleException | [
"Get",
"either",
"a",
"gRPC",
"or",
"REST",
"connection",
"based",
"on",
"the",
"provided",
"config",
"and",
"the",
"system",
"dependencies",
"available",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/ClientTrait.php#L47-L65 | train |
googleapis/google-cloud-php | Core/src/ClientTrait.php | ClientTrait.configureAuthentication | private function configureAuthentication(array $config)
{
$config['keyFile'] = $this->getKeyFile($config);
$this->projectId = $this->detectProjectId($config);
return $config;
} | php | private function configureAuthentication(array $config)
{
$config['keyFile'] = $this->getKeyFile($config);
$this->projectId = $this->detectProjectId($config);
return $config;
} | [
"private",
"function",
"configureAuthentication",
"(",
"array",
"$",
"config",
")",
"{",
"$",
"config",
"[",
"'keyFile'",
"]",
"=",
"$",
"this",
"->",
"getKeyFile",
"(",
"$",
"config",
")",
";",
"$",
"this",
"->",
"projectId",
"=",
"$",
"this",
"->",
"... | Fetch and validate the keyfile and set the project ID.
@param array $config
@return array | [
"Fetch",
"and",
"validate",
"the",
"keyfile",
"and",
"set",
"the",
"project",
"ID",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/ClientTrait.php#L97-L103 | train |
googleapis/google-cloud-php | Core/src/ClientTrait.php | ClientTrait.getKeyFile | private function getKeyFile(array $config = [])
{
$config += [
'keyFile' => null,
'keyFilePath' => null,
];
if ($config['keyFile']) {
return $config['keyFile'];
}
if ($config['keyFilePath']) {
if (!file_exists($config['keyFile... | php | private function getKeyFile(array $config = [])
{
$config += [
'keyFile' => null,
'keyFilePath' => null,
];
if ($config['keyFile']) {
return $config['keyFile'];
}
if ($config['keyFilePath']) {
if (!file_exists($config['keyFile... | [
"private",
"function",
"getKeyFile",
"(",
"array",
"$",
"config",
"=",
"[",
"]",
")",
"{",
"$",
"config",
"+=",
"[",
"'keyFile'",
"=>",
"null",
",",
"'keyFilePath'",
"=>",
"null",
",",
"]",
";",
"if",
"(",
"$",
"config",
"[",
"'keyFile'",
"]",
")",
... | Get a keyfile if it exists.
Process:
1. If $config['keyFile'] is set, use that.
2. If $config['keyFilePath'] is set, load the file and use that.
3. If GOOGLE_APPLICATION_CREDENTIALS environment variable is set, load
from that location and use that.
4. If OS-specific well-known-file is set, load from that location and ... | [
"Get",
"a",
"keyfile",
"if",
"it",
"exists",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/ClientTrait.php#L120-L153 | train |
googleapis/google-cloud-php | Core/src/ClientTrait.php | ClientTrait.detectProjectId | private function detectProjectId(array $config)
{
$config += [
'httpHandler' => null,
'projectId' => null,
'projectIdRequired' => false,
'hasEmulator' => false,
'preferNumericProjectId' => false,
'suppressKeyFileNotice' => false
... | php | private function detectProjectId(array $config)
{
$config += [
'httpHandler' => null,
'projectId' => null,
'projectIdRequired' => false,
'hasEmulator' => false,
'preferNumericProjectId' => false,
'suppressKeyFileNotice' => false
... | [
"private",
"function",
"detectProjectId",
"(",
"array",
"$",
"config",
")",
"{",
"$",
"config",
"+=",
"[",
"'httpHandler'",
"=>",
"null",
",",
"'projectId'",
"=>",
"null",
",",
"'projectIdRequired'",
"=>",
"false",
",",
"'hasEmulator'",
"=>",
"false",
",",
"... | Detect and return a project ID.
Process:
1. If $config['projectId'] is set, use that.
2. If an emulator is enabled, return a dummy value.
3. If $config['keyFile'] is set, attempt to retrieve a project ID from
that.
4. Check `GOOGLE_CLOUD_PROJECT` environment variable.
5. Check `GCLOUD_PROJECT` environment variable.
6.... | [
"Detect",
"and",
"return",
"a",
"project",
"ID",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/ClientTrait.php#L173-L239 | train |
googleapis/google-cloud-php | Container/src/V1/AddonsConfig.php | AddonsConfig.setHorizontalPodAutoscaling | public function setHorizontalPodAutoscaling($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\HorizontalPodAutoscaling::class);
$this->horizontal_pod_autoscaling = $var;
return $this;
} | php | public function setHorizontalPodAutoscaling($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\HorizontalPodAutoscaling::class);
$this->horizontal_pod_autoscaling = $var;
return $this;
} | [
"public",
"function",
"setHorizontalPodAutoscaling",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"HorizontalPodAutoscaling",
"::",
"class",
")",
";",
"$... | Configuration for the horizontal pod autoscaling feature, which
increases or decreases the number of replica pods a replication controller
has based on the resource usage of the existing pods.
Generated from protobuf field <code>.google.container.v1.HorizontalPodAutoscaling horizontal_pod_autoscaling = 2;</code>
@para... | [
"Configuration",
"for",
"the",
"horizontal",
"pod",
"autoscaling",
"feature",
"which",
"increases",
"or",
"decreases",
"the",
"number",
"of",
"replica",
"pods",
"a",
"replication",
"controller",
"has",
"based",
"on",
"the",
"resource",
"usage",
"of",
"the",
"exi... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/AddonsConfig.php#L125-L131 | train |
googleapis/google-cloud-php | Container/src/V1/AddonsConfig.php | AddonsConfig.setKubernetesDashboard | public function setKubernetesDashboard($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\KubernetesDashboard::class);
$this->kubernetes_dashboard = $var;
return $this;
} | php | public function setKubernetesDashboard($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\KubernetesDashboard::class);
$this->kubernetes_dashboard = $var;
return $this;
} | [
"public",
"function",
"setKubernetesDashboard",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"KubernetesDashboard",
"::",
"class",
")",
";",
"$",
"this... | Configuration for the Kubernetes Dashboard.
Generated from protobuf field <code>.google.container.v1.KubernetesDashboard kubernetes_dashboard = 3;</code>
@param \Google\Cloud\Container\V1\KubernetesDashboard $var
@return $this | [
"Configuration",
"for",
"the",
"Kubernetes",
"Dashboard",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/AddonsConfig.php#L151-L157 | train |
googleapis/google-cloud-php | Container/src/V1/AddonsConfig.php | AddonsConfig.setNetworkPolicyConfig | public function setNetworkPolicyConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NetworkPolicyConfig::class);
$this->network_policy_config = $var;
return $this;
} | php | public function setNetworkPolicyConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NetworkPolicyConfig::class);
$this->network_policy_config = $var;
return $this;
} | [
"public",
"function",
"setNetworkPolicyConfig",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"NetworkPolicyConfig",
"::",
"class",
")",
";",
"$",
"this... | Configuration for NetworkPolicy. This only tracks whether the addon
is enabled or not on the Master, it does not track whether network policy
is enabled for the nodes.
Generated from protobuf field <code>.google.container.v1.NetworkPolicyConfig network_policy_config = 4;</code>
@param \Google\Cloud\Container\V1\Networ... | [
"Configuration",
"for",
"NetworkPolicy",
".",
"This",
"only",
"tracks",
"whether",
"the",
"addon",
"is",
"enabled",
"or",
"not",
"on",
"the",
"Master",
"it",
"does",
"not",
"track",
"whether",
"network",
"policy",
"is",
"enabled",
"for",
"the",
"nodes",
"."
... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/AddonsConfig.php#L181-L187 | train |
googleapis/google-cloud-php | Talent/src/V4beta1/ListTenantsResponse.php | ListTenantsResponse.setTenants | public function setTenants($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4beta1\Tenant::class);
$this->tenants = $arr;
return $this;
} | php | public function setTenants($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4beta1\Tenant::class);
$this->tenants = $arr;
return $this;
} | [
"public",
"function",
"setTenants",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\",
... | Tenants for the current client.
Generated from protobuf field <code>repeated .google.cloud.talent.v4beta1.Tenant tenants = 1;</code>
@param \Google\Cloud\Talent\V4beta1\Tenant[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Tenants",
"for",
"the",
"current",
"client",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/ListTenantsResponse.php#L77-L83 | train |
googleapis/google-cloud-php | Firestore/src/V1/Target.php | Target.setQuery | public function setQuery($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target_QueryTarget::class);
$this->writeOneof(2, $var);
return $this;
} | php | public function setQuery($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target_QueryTarget::class);
$this->writeOneof(2, $var);
return $this;
} | [
"public",
"function",
"setQuery",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"V1",
"\\",
"Target_QueryTarget",
"::",
"class",
")",
";",
"$",
"this",
"->",
"w... | A target specified by a query.
Generated from protobuf field <code>.google.firestore.v1.Target.QueryTarget query = 2;</code>
@param \Google\Cloud\Firestore\V1\Target\QueryTarget $var
@return $this | [
"A",
"target",
"specified",
"by",
"a",
"query",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1/Target.php#L88-L94 | train |
googleapis/google-cloud-php | Firestore/src/V1/Target.php | Target.setDocuments | public function setDocuments($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target_DocumentsTarget::class);
$this->writeOneof(3, $var);
return $this;
} | php | public function setDocuments($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target_DocumentsTarget::class);
$this->writeOneof(3, $var);
return $this;
} | [
"public",
"function",
"setDocuments",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"V1",
"\\",
"Target_DocumentsTarget",
"::",
"class",
")",
";",
"$",
"this",
"-... | A target specified by a set of document names.
Generated from protobuf field <code>.google.firestore.v1.Target.DocumentsTarget documents = 3;</code>
@param \Google\Cloud\Firestore\V1\Target\DocumentsTarget $var
@return $this | [
"A",
"target",
"specified",
"by",
"a",
"set",
"of",
"document",
"names",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1/Target.php#L114-L120 | train |
googleapis/google-cloud-php | Firestore/src/SnapshotTrait.php | SnapshotTrait.createSnapshot | private function createSnapshot(
ConnectionInterface $connection,
ValueMapper $valueMapper,
DocumentReference $reference,
array $options = []
) {
$document = [];
$fields = [];
$exists = true;
try {
$document = $this->getSnapshot($connectio... | php | private function createSnapshot(
ConnectionInterface $connection,
ValueMapper $valueMapper,
DocumentReference $reference,
array $options = []
) {
$document = [];
$fields = [];
$exists = true;
try {
$document = $this->getSnapshot($connectio... | [
"private",
"function",
"createSnapshot",
"(",
"ConnectionInterface",
"$",
"connection",
",",
"ValueMapper",
"$",
"valueMapper",
",",
"DocumentReference",
"$",
"reference",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"document",
"=",
"[",
"]",
... | Execute a service request to retrieve a document snapshot.
@param ConnectionInterface $connection A Connection to Cloud Firestore.
@param ValueMapper $valueMapper A Firestore Value Mapper.
@param DocumentReference $reference The parent document.
@param array $options {
Configuration Options
@type string $transaction ... | [
"Execute",
"a",
"service",
"request",
"to",
"retrieve",
"a",
"document",
"snapshot",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/SnapshotTrait.php#L50-L67 | train |
googleapis/google-cloud-php | Firestore/src/SnapshotTrait.php | SnapshotTrait.createSnapshotWithData | private function createSnapshotWithData(
ValueMapper $valueMapper,
DocumentReference $reference,
array $document,
$exists = true
) {
$fields = $exists
? $valueMapper->decodeValues($this->pluck('fields', $document))
: [];
$document = $this->tra... | php | private function createSnapshotWithData(
ValueMapper $valueMapper,
DocumentReference $reference,
array $document,
$exists = true
) {
$fields = $exists
? $valueMapper->decodeValues($this->pluck('fields', $document))
: [];
$document = $this->tra... | [
"private",
"function",
"createSnapshotWithData",
"(",
"ValueMapper",
"$",
"valueMapper",
",",
"DocumentReference",
"$",
"reference",
",",
"array",
"$",
"document",
",",
"$",
"exists",
"=",
"true",
")",
"{",
"$",
"fields",
"=",
"$",
"exists",
"?",
"$",
"value... | Create a document snapshot by providing a dataset.
This method will not perform a service request.
@codingStandardsIgnoreStart
@param ValueMapper $valueMapper A Firestore Value Mapper.
@param DocumentReference $reference The parent document.
@param array $document [Document](https://cloud.google.com/firestore/docs/re... | [
"Create",
"a",
"document",
"snapshot",
"by",
"providing",
"a",
"dataset",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/SnapshotTrait.php#L81-L94 | train |
googleapis/google-cloud-php | Firestore/src/SnapshotTrait.php | SnapshotTrait.getSnapshot | private function getSnapshot(ConnectionInterface $connection, $name, array $options = [])
{
if (isset($options['readTime'])) {
if (!($options['readTime'] instanceof Timestamp)) {
throw new \InvalidArgumentException(sprintf(
'`$options.readTime` must be an inst... | php | private function getSnapshot(ConnectionInterface $connection, $name, array $options = [])
{
if (isset($options['readTime'])) {
if (!($options['readTime'] instanceof Timestamp)) {
throw new \InvalidArgumentException(sprintf(
'`$options.readTime` must be an inst... | [
"private",
"function",
"getSnapshot",
"(",
"ConnectionInterface",
"$",
"connection",
",",
"$",
"name",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"options",
"[",
"'readTime'",
"]",
")",
")",
"{",
"if",
"(",
"... | Send a service request for a snapshot, and return the raw data
@param ConnectionInterface $connection A Connection to Cloud Firestore
@param string $name The document name.
@param array $options Configuration options.
@return array
@throws \InvalidArgumentException if an invalid `$options.readTime` is specified.
@thro... | [
"Send",
"a",
"service",
"request",
"for",
"a",
"snapshot",
"and",
"return",
"the",
"raw",
"data"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/SnapshotTrait.php#L106-L132 | train |
googleapis/google-cloud-php | Firestore/src/SnapshotTrait.php | SnapshotTrait.getDocumentReference | private function getDocumentReference(
ConnectionInterface $connection,
ValueMapper $mapper,
$projectId,
$database,
$name
) {
if ($this->isRelative($name)) {
try {
$name = $this->fullName($projectId, $database, $name);
} catch (... | php | private function getDocumentReference(
ConnectionInterface $connection,
ValueMapper $mapper,
$projectId,
$database,
$name
) {
if ($this->isRelative($name)) {
try {
$name = $this->fullName($projectId, $database, $name);
} catch (... | [
"private",
"function",
"getDocumentReference",
"(",
"ConnectionInterface",
"$",
"connection",
",",
"ValueMapper",
"$",
"mapper",
",",
"$",
"projectId",
",",
"$",
"database",
",",
"$",
"name",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isRelative",
"(",
"$",
... | Creates a DocumentReference object.
@param ConnectionInterface $connection A connection to Cloud Firestore.
@param ValueMapper $mapper A Firestore value mapper.
@param string $projectId The current project id.
@param string $database The database id.
@param string $name The document name, in absolute form, or relative... | [
"Creates",
"a",
"DocumentReference",
"object",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/SnapshotTrait.php#L225-L269 | train |
googleapis/google-cloud-php | Firestore/src/SnapshotTrait.php | SnapshotTrait.getCollectionReference | private function getCollectionReference(
ConnectionInterface $connection,
ValueMapper $mapper,
$projectId,
$database,
$name
) {
if ($this->isRelative($name)) {
$name = $this->fullName($projectId, $database, $name);
}
if (!$this->isCollecti... | php | private function getCollectionReference(
ConnectionInterface $connection,
ValueMapper $mapper,
$projectId,
$database,
$name
) {
if ($this->isRelative($name)) {
$name = $this->fullName($projectId, $database, $name);
}
if (!$this->isCollecti... | [
"private",
"function",
"getCollectionReference",
"(",
"ConnectionInterface",
"$",
"connection",
",",
"ValueMapper",
"$",
"mapper",
",",
"$",
"projectId",
",",
"$",
"database",
",",
"$",
"name",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isRelative",
"(",
"$",
... | Creates a CollectionReference object.
@param ConnectionInterface $connection A connection to Cloud Firestore.
@param ValueMapper $mapper A Firestore value mapper.
@param string $projectId The current project id.
@param string $database The database id.
@param string $name The collection name, in absolute form, or rela... | [
"Creates",
"a",
"CollectionReference",
"object",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/SnapshotTrait.php#L282-L301 | train |
googleapis/google-cloud-php | Firestore/src/SnapshotTrait.php | SnapshotTrait.transformSnapshotTimestamps | private function transformSnapshotTimestamps(array $data)
{
foreach (['createTime', 'updateTime', 'readTime'] as $timestampField) {
if (!isset($data[$timestampField])) {
continue;
}
list ($dt, $nanos) = $this->parseTimeString($data[$timestampField]);
... | php | private function transformSnapshotTimestamps(array $data)
{
foreach (['createTime', 'updateTime', 'readTime'] as $timestampField) {
if (!isset($data[$timestampField])) {
continue;
}
list ($dt, $nanos) = $this->parseTimeString($data[$timestampField]);
... | [
"private",
"function",
"transformSnapshotTimestamps",
"(",
"array",
"$",
"data",
")",
"{",
"foreach",
"(",
"[",
"'createTime'",
",",
"'updateTime'",
",",
"'readTime'",
"]",
"as",
"$",
"timestampField",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"data",
"... | Convert snapshot timestamps to Google Cloud PHP types.
@param array $data The snapshot data.
@return array | [
"Convert",
"snapshot",
"timestamps",
"to",
"Google",
"Cloud",
"PHP",
"types",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/SnapshotTrait.php#L309-L322 | train |
googleapis/google-cloud-php | Spanner/src/V1/ResultSet.php | ResultSet.setMetadata | public function setMetadata($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Spanner\V1\ResultSetMetadata::class);
$this->metadata = $var;
return $this;
} | php | public function setMetadata($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Spanner\V1\ResultSetMetadata::class);
$this->metadata = $var;
return $this;
} | [
"public",
"function",
"setMetadata",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Spanner",
"\\",
"V1",
"\\",
"ResultSetMetadata",
"::",
"class",
")",
";",
"$",
"this",
"->",
"m... | Metadata about the result set, such as row type information.
Generated from protobuf field <code>.google.spanner.v1.ResultSetMetadata metadata = 1;</code>
@param \Google\Cloud\Spanner\V1\ResultSetMetadata $var
@return $this | [
"Metadata",
"about",
"the",
"result",
"set",
"such",
"as",
"row",
"type",
"information",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/V1/ResultSet.php#L99-L105 | train |
googleapis/google-cloud-php | Spanner/src/Admin/Instance/V1/UpdateInstanceMetadata.php | UpdateInstanceMetadata.setInstance | public function setInstance($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Spanner\Admin\Instance\V1\Instance::class);
$this->instance = $var;
return $this;
} | php | public function setInstance($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Spanner\Admin\Instance\V1\Instance::class);
$this->instance = $var;
return $this;
} | [
"public",
"function",
"setInstance",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Spanner",
"\\",
"Admin",
"\\",
"Instance",
"\\",
"V1",
"\\",
"Instance",
"::",
"class",
")",
";... | The desired end state of the update.
Generated from protobuf field <code>.google.spanner.admin.instance.v1.Instance instance = 1;</code>
@param \Google\Cloud\Spanner\Admin\Instance\V1\Instance $var
@return $this | [
"The",
"desired",
"end",
"state",
"of",
"the",
"update",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Admin/Instance/V1/UpdateInstanceMetadata.php#L91-L97 | train |
googleapis/google-cloud-php | Logging/src/V2/UpdateLogMetricRequest.php | UpdateLogMetricRequest.setMetric | public function setMetric($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogMetric::class);
$this->metric = $var;
return $this;
} | php | public function setMetric($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogMetric::class);
$this->metric = $var;
return $this;
} | [
"public",
"function",
"setMetric",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Logging",
"\\",
"V2",
"\\",
"LogMetric",
"::",
"class",
")",
";",
"$",
"this",
"->",
"metric",
... | The updated metric.
Generated from protobuf field <code>.google.logging.v2.LogMetric metric = 2;</code>
@param \Google\Cloud\Logging\V2\LogMetric $var
@return $this | [
"The",
"updated",
"metric",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Logging/src/V2/UpdateLogMetricRequest.php#L108-L114 | train |
googleapis/google-cloud-php | Talent/src/V4beta1/ListApplicationsResponse.php | ListApplicationsResponse.setApplications | public function setApplications($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4beta1\Application::class);
$this->applications = $arr;
return $this;
} | php | public function setApplications($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4beta1\Application::class);
$this->applications = $arr;
return $this;
} | [
"public",
"function",
"setApplications",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"... | Applications for the current client.
Generated from protobuf field <code>repeated .google.cloud.talent.v4beta1.Application applications = 1;</code>
@param \Google\Cloud\Talent\V4beta1\Application[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Applications",
"for",
"the",
"current",
"client",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/ListApplicationsResponse.php#L77-L83 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/Intent/Message.php | Message.setQuickReplies | public function setQuickReplies($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_QuickReplies::class);
$this->writeOneof(3, $var);
return $this;
} | php | public function setQuickReplies($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_QuickReplies::class);
$this->writeOneof(3, $var);
return $this;
} | [
"public",
"function",
"setQuickReplies",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"Intent_Message_QuickReplies",
"::",
"class",
")",
";",
"$",
"th... | The quick replies response.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;</code>
@param \Google\Cloud\Dialogflow\V2\Intent\Message\QuickReplies $var
@return $this | [
"The",
"quick",
"replies",
"response",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Intent/Message.php#L135-L141 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/Intent/Message.php | Message.setCard | public function setCard($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_Card::class);
$this->writeOneof(4, $var);
return $this;
} | php | public function setCard($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_Card::class);
$this->writeOneof(4, $var);
return $this;
} | [
"public",
"function",
"setCard",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"Intent_Message_Card",
"::",
"class",
")",
";",
"$",
"this",
"->",
"... | The card response.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.Card card = 4;</code>
@param \Google\Cloud\Dialogflow\V2\Intent\Message\Card $var
@return $this | [
"The",
"card",
"response",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Intent/Message.php#L161-L167 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/Intent/Message.php | Message.setSimpleResponses | public function setSimpleResponses($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_SimpleResponses::class);
$this->writeOneof(7, $var);
return $this;
} | php | public function setSimpleResponses($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_SimpleResponses::class);
$this->writeOneof(7, $var);
return $this;
} | [
"public",
"function",
"setSimpleResponses",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"Intent_Message_SimpleResponses",
"::",
"class",
")",
";",
"$",... | The voice and text-only responses for Actions on Google.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;</code>
@param \Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponses $var
@return $this | [
"The",
"voice",
"and",
"text",
"-",
"only",
"responses",
"for",
"Actions",
"on",
"Google",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Intent/Message.php#L217-L223 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/Intent/Message.php | Message.setBasicCard | public function setBasicCard($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_BasicCard::class);
$this->writeOneof(8, $var);
return $this;
} | php | public function setBasicCard($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_BasicCard::class);
$this->writeOneof(8, $var);
return $this;
} | [
"public",
"function",
"setBasicCard",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"Intent_Message_BasicCard",
"::",
"class",
")",
";",
"$",
"this",
... | The basic card response for Actions on Google.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;</code>
@param \Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard $var
@return $this | [
"The",
"basic",
"card",
"response",
"for",
"Actions",
"on",
"Google",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Intent/Message.php#L243-L249 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/Intent/Message.php | Message.setSuggestions | public function setSuggestions($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_Suggestions::class);
$this->writeOneof(9, $var);
return $this;
} | php | public function setSuggestions($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_Suggestions::class);
$this->writeOneof(9, $var);
return $this;
} | [
"public",
"function",
"setSuggestions",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"Intent_Message_Suggestions",
"::",
"class",
")",
";",
"$",
"this... | The suggestion chips for Actions on Google.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;</code>
@param \Google\Cloud\Dialogflow\V2\Intent\Message\Suggestions $var
@return $this | [
"The",
"suggestion",
"chips",
"for",
"Actions",
"on",
"Google",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Intent/Message.php#L269-L275 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/Intent/Message.php | Message.setLinkOutSuggestion | public function setLinkOutSuggestion($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_LinkOutSuggestion::class);
$this->writeOneof(10, $var);
return $this;
} | php | public function setLinkOutSuggestion($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_LinkOutSuggestion::class);
$this->writeOneof(10, $var);
return $this;
} | [
"public",
"function",
"setLinkOutSuggestion",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"Intent_Message_LinkOutSuggestion",
"::",
"class",
")",
";",
... | The link out suggestion chip for Actions on Google.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;</code>
@param \Google\Cloud\Dialogflow\V2\Intent\Message\LinkOutSuggestion $var
@return $this | [
"The",
"link",
"out",
"suggestion",
"chip",
"for",
"Actions",
"on",
"Google",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Intent/Message.php#L295-L301 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/Intent/Message.php | Message.setListSelect | public function setListSelect($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_ListSelect::class);
$this->writeOneof(11, $var);
return $this;
} | php | public function setListSelect($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_ListSelect::class);
$this->writeOneof(11, $var);
return $this;
} | [
"public",
"function",
"setListSelect",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"Intent_Message_ListSelect",
"::",
"class",
")",
";",
"$",
"this",... | The list card response for Actions on Google.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;</code>
@param \Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect $var
@return $this | [
"The",
"list",
"card",
"response",
"for",
"Actions",
"on",
"Google",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Intent/Message.php#L321-L327 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/Intent/Message.php | Message.setCarouselSelect | public function setCarouselSelect($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_CarouselSelect::class);
$this->writeOneof(12, $var);
return $this;
} | php | public function setCarouselSelect($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent_Message_CarouselSelect::class);
$this->writeOneof(12, $var);
return $this;
} | [
"public",
"function",
"setCarouselSelect",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"Intent_Message_CarouselSelect",
"::",
"class",
")",
";",
"$",
... | The carousel card response for Actions on Google.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;</code>
@param \Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect $var
@return $this | [
"The",
"carousel",
"card",
"response",
"for",
"Actions",
"on",
"Google",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Intent/Message.php#L347-L353 | train |
googleapis/google-cloud-php | Dialogflow/src/V2/Intent/Message.php | Message.setPlatform | public function setPlatform($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent_Message_Platform::class);
$this->platform = $var;
return $this;
} | php | public function setPlatform($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Intent_Message_Platform::class);
$this->platform = $var;
return $this;
} | [
"public",
"function",
"setPlatform",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dialogflow",
"\\",
"V2",
"\\",
"Intent_Message_Platform",
"::",
"class",
")",
";",
"$",
"this",
"->"... | Optional. The platform that this message is intended for.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6;</code>
@param int $var
@return $this | [
"Optional",
".",
"The",
"platform",
"that",
"this",
"message",
"is",
"intended",
"for",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dialogflow/src/V2/Intent/Message.php#L373-L379 | train |
googleapis/google-cloud-php | Firestore/src/Admin/V1/ExportDocumentsMetadata.php | ExportDocumentsMetadata.setOperationState | public function setOperationState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class);
$this->operation_state = $var;
return $this;
} | php | public function setOperationState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class);
$this->operation_state = $var;
return $this;
} | [
"public",
"function",
"setOperationState",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"Admin",
"\\",
"V1",
"\\",
"OperationState",
"::",
"class",
")",
";",
"$",
... | The state of the export operation.
Generated from protobuf field <code>.google.firestore.admin.v1.OperationState operation_state = 3;</code>
@param int $var
@return $this | [
"The",
"state",
"of",
"the",
"export",
"operation",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Admin/V1/ExportDocumentsMetadata.php#L163-L169 | train |
googleapis/google-cloud-php | Firestore/src/Admin/V1/ExportDocumentsMetadata.php | ExportDocumentsMetadata.setProgressDocuments | public function setProgressDocuments($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class);
$this->progress_documents = $var;
return $this;
} | php | public function setProgressDocuments($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class);
$this->progress_documents = $var;
return $this;
} | [
"public",
"function",
"setProgressDocuments",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"Admin",
"\\",
"V1",
"\\",
"Progress",
"::",
"class",
")",
";",
"$",
... | The progress, in documents, of this operation.
Generated from protobuf field <code>.google.firestore.admin.v1.Progress progress_documents = 4;</code>
@param \Google\Cloud\Firestore\Admin\V1\Progress $var
@return $this | [
"The",
"progress",
"in",
"documents",
"of",
"this",
"operation",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Admin/V1/ExportDocumentsMetadata.php#L189-L195 | train |
googleapis/google-cloud-php | Firestore/src/Admin/V1/ExportDocumentsMetadata.php | ExportDocumentsMetadata.setProgressBytes | public function setProgressBytes($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class);
$this->progress_bytes = $var;
return $this;
} | php | public function setProgressBytes($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class);
$this->progress_bytes = $var;
return $this;
} | [
"public",
"function",
"setProgressBytes",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Firestore",
"\\",
"Admin",
"\\",
"V1",
"\\",
"Progress",
"::",
"class",
")",
";",
"$",
"th... | The progress, in bytes, of this operation.
Generated from protobuf field <code>.google.firestore.admin.v1.Progress progress_bytes = 5;</code>
@param \Google\Cloud\Firestore\Admin\V1\Progress $var
@return $this | [
"The",
"progress",
"in",
"bytes",
"of",
"this",
"operation",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Admin/V1/ExportDocumentsMetadata.php#L215-L221 | train |
googleapis/google-cloud-php | Firestore/src/Admin/V1/ExportDocumentsMetadata.php | ExportDocumentsMetadata.setCollectionIds | public function setCollectionIds($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->collection_ids = $arr;
return $this;
} | php | public function setCollectionIds($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->collection_ids = $arr;
return $this;
} | [
"public",
"function",
"setCollectionIds",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"STRING",
")",
";",
"$",
"this",... | Which collection ids are being exported.
Generated from protobuf field <code>repeated string collection_ids = 6;</code>
@param string[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Which",
"collection",
"ids",
"are",
"being",
"exported",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/Admin/V1/ExportDocumentsMetadata.php#L241-L247 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.reload | public function reload(array $options = [])
{
return $this->info = $this->connection->getDatabase([
'name' => $this->name
] + $options);
} | php | public function reload(array $options = [])
{
return $this->info = $this->connection->getDatabase([
'name' => $this->name
] + $options);
} | [
"public",
"function",
"reload",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"info",
"=",
"$",
"this",
"->",
"connection",
"->",
"getDatabase",
"(",
"[",
"'name'",
"=>",
"$",
"this",
"->",
"name",
"]",
"+",
"$... | Reload the database info from the Cloud Spanner API.
Example:
```
$info = $database->reload();
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.database.v1#google.spanner.admin.database.v1.Database Database
@codingStandardsIgnoreEnd
@param array $options [... | [
"Reload",
"the",
"database",
"info",
"from",
"the",
"Cloud",
"Spanner",
"API",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L252-L257 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.create | public function create(array $options = [])
{
$options += [
'statements' => [],
];
$databaseId = DatabaseAdminClient::parseName($this->name())['database'];
$statement = sprintf('CREATE DATABASE `%s`', $databaseId);
$operation = $this->connection->createDatabase(... | php | public function create(array $options = [])
{
$options += [
'statements' => [],
];
$databaseId = DatabaseAdminClient::parseName($this->name())['database'];
$statement = sprintf('CREATE DATABASE `%s`', $databaseId);
$operation = $this->connection->createDatabase(... | [
"public",
"function",
"create",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"+=",
"[",
"'statements'",
"=>",
"[",
"]",
",",
"]",
";",
"$",
"databaseId",
"=",
"DatabaseAdminClient",
"::",
"parseName",
"(",
"$",
"this",
"->",
... | Create a new Cloud Spanner database.
Example:
```
$operation = $database->create();
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/spanner/reference/rpc/google.spanner.admin.database.v1#createdatabaserequest CreateDatabaseRequest
@codingStandardsIgnoreEnd
@param array $options [optional] {
Configurati... | [
"Create",
"a",
"new",
"Cloud",
"Spanner",
"database",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L306-L322 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.updateDdlBatch | public function updateDdlBatch(array $statements, array $options = [])
{
$operation = $this->connection->updateDatabaseDdl($options + [
'name' => $this->name,
'statements' => $statements,
]);
return $this->resumeOperation($operation['name'], $operation);
} | php | public function updateDdlBatch(array $statements, array $options = [])
{
$operation = $this->connection->updateDatabaseDdl($options + [
'name' => $this->name,
'statements' => $statements,
]);
return $this->resumeOperation($operation['name'], $operation);
} | [
"public",
"function",
"updateDdlBatch",
"(",
"array",
"$",
"statements",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"operation",
"=",
"$",
"this",
"->",
"connection",
"->",
"updateDatabaseDdl",
"(",
"$",
"options",
"+",
"[",
"'name'",
"=... | Update the Database schema by running a set of SQL statements.
**NOTE**: Requires `https://www.googleapis.com/auth/spanner.admin` scope.
Example:
```
$database->updateDdlBatch([
'CREATE TABLE Users (
id INT64 NOT NULL,
name STRING(100) NOT NULL,
password STRING(100) NOT NULL
) PRIMARY KEY (id)',
'CREATE TABLE Posts (... | [
"Update",
"the",
"Database",
"schema",
"by",
"running",
"a",
"set",
"of",
"SQL",
"statements",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L384-L392 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.drop | public function drop(array $options = [])
{
$this->connection->dropDatabase($options + [
'name' => $this->name
]);
if ($this->sessionPool) {
$this->sessionPool->clear();
}
if ($this->session) {
$this->session->delete($options);
... | php | public function drop(array $options = [])
{
$this->connection->dropDatabase($options + [
'name' => $this->name
]);
if ($this->sessionPool) {
$this->sessionPool->clear();
}
if ($this->session) {
$this->session->delete($options);
... | [
"public",
"function",
"drop",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"connection",
"->",
"dropDatabase",
"(",
"$",
"options",
"+",
"[",
"'name'",
"=>",
"$",
"this",
"->",
"name",
"]",
")",
";",
"if",
"(",
"$",
"... | Drop the database.
Please note that after a database is dropped, all sessions attached to it
will be invalid and unusable. Calls to this method will clear any session
pool attached to this database class instance and delete any sessions
attached to the database class instance.
**NOTE**: Requires `https://www.googleap... | [
"Drop",
"the",
"database",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L416-L430 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.ddl | public function ddl(array $options = [])
{
$ddl = $this->connection->getDatabaseDDL($options + [
'name' => $this->name
]);
if (isset($ddl['statements'])) {
return $ddl['statements'];
}
return [];
} | php | public function ddl(array $options = [])
{
$ddl = $this->connection->getDatabaseDDL($options + [
'name' => $this->name
]);
if (isset($ddl['statements'])) {
return $ddl['statements'];
}
return [];
} | [
"public",
"function",
"ddl",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"ddl",
"=",
"$",
"this",
"->",
"connection",
"->",
"getDatabaseDDL",
"(",
"$",
"options",
"+",
"[",
"'name'",
"=>",
"$",
"this",
"->",
"name",
"]",
")",
";",
... | Get a list of all database DDL statements.
**NOTE**: Requires `https://www.googleapis.com/auth/spanner.admin` scope.
Example:
```
$statements = $database->ddl();
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/spanner/reference/rpc/google.spanner.admin.database.v1#getdatabaseddlrequest GetDatabaseDdlRe... | [
"Get",
"a",
"list",
"of",
"all",
"database",
"DDL",
"statements",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L449-L460 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.iam | public function iam()
{
if (!$this->iam) {
$this->iam = new Iam(
new IamDatabase($this->connection),
$this->name
);
}
return $this->iam;
} | php | public function iam()
{
if (!$this->iam) {
$this->iam = new Iam(
new IamDatabase($this->connection),
$this->name
);
}
return $this->iam;
} | [
"public",
"function",
"iam",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"iam",
")",
"{",
"$",
"this",
"->",
"iam",
"=",
"new",
"Iam",
"(",
"new",
"IamDatabase",
"(",
"$",
"this",
"->",
"connection",
")",
",",
"$",
"this",
"->",
"name",
"... | Manage the database IAM policy
Example:
```
$iam = $database->iam();
```
@return Iam | [
"Manage",
"the",
"database",
"IAM",
"policy"
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L472-L482 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.snapshot | public function snapshot(array $options = [])
{
if ($this->isRunningTransaction) {
throw new \BadMethodCallException('Nested transactions are not supported by this client.');
}
$options += [
'singleUse' => false
];
$options['transactionOptions'] = $t... | php | public function snapshot(array $options = [])
{
if ($this->isRunningTransaction) {
throw new \BadMethodCallException('Nested transactions are not supported by this client.');
}
$options += [
'singleUse' => false
];
$options['transactionOptions'] = $t... | [
"public",
"function",
"snapshot",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isRunningTransaction",
")",
"{",
"throw",
"new",
"\\",
"BadMethodCallException",
"(",
"'Nested transactions are not supported by this client.'",
... | Create a snapshot to read from a database at a point in time.
If no configuration options are provided, transaction will be opened with
strong consistency.
Snapshots are executed behind the scenes using a Read-Only Transaction.
Example:
```
$snapshot = $database->snapshot();
```
```
// Take a shapshot with a return... | [
"Create",
"a",
"snapshot",
"to",
"read",
"from",
"a",
"database",
"at",
"a",
"point",
"in",
"time",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L547-L569 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.insertBatch | public function insertBatch($table, array $dataSet, array $options = [])
{
$mutations = [];
foreach ($dataSet as $data) {
$mutations[] = $this->operation->mutation(Operation::OP_INSERT, $table, $data);
}
return $this->commitInSingleUseTransaction($mutations, $options);
... | php | public function insertBatch($table, array $dataSet, array $options = [])
{
$mutations = [];
foreach ($dataSet as $data) {
$mutations[] = $this->operation->mutation(Operation::OP_INSERT, $table, $data);
}
return $this->commitInSingleUseTransaction($mutations, $options);
... | [
"public",
"function",
"insertBatch",
"(",
"$",
"table",
",",
"array",
"$",
"dataSet",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"mutations",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"dataSet",
"as",
"$",
"data",
")",
"{",
"$",
"... | Insert multiple rows.
Mutations are committed in a single-use transaction.
Since this method does not feature replay protection, it may attempt to
apply mutations more than once; if the mutations are not idempotent, this
may lead to a failure being reported when the mutation was previously
applied.
Example:
```
$dat... | [
"Insert",
"multiple",
"rows",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L850-L858 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.updateBatch | public function updateBatch($table, array $dataSet, array $options = [])
{
$mutations = [];
foreach ($dataSet as $data) {
$mutations[] = $this->operation->mutation(Operation::OP_UPDATE, $table, $data);
}
return $this->commitInSingleUseTransaction($mutations, $options);
... | php | public function updateBatch($table, array $dataSet, array $options = [])
{
$mutations = [];
foreach ($dataSet as $data) {
$mutations[] = $this->operation->mutation(Operation::OP_UPDATE, $table, $data);
}
return $this->commitInSingleUseTransaction($mutations, $options);
... | [
"public",
"function",
"updateBatch",
"(",
"$",
"table",
",",
"array",
"$",
"dataSet",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"mutations",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"dataSet",
"as",
"$",
"data",
")",
"{",
"$",
"... | Update multiple rows.
Only data which you wish to update need be included. The list of columns
must contain enough columns to allow Cloud Spanner to derive values for
all primary key columns in the row(s) to be modified.
Mutations are committed in a single-use transaction.
Example:
```
$database->updateBatch('Posts'... | [
"Update",
"multiple",
"rows",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L922-L930 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.insertOrUpdateBatch | public function insertOrUpdateBatch($table, array $dataSet, array $options = [])
{
$mutations = [];
foreach ($dataSet as $data) {
$mutations[] = $this->operation->mutation(Operation::OP_INSERT_OR_UPDATE, $table, $data);
}
return $this->commitInSingleUseTransaction($mutat... | php | public function insertOrUpdateBatch($table, array $dataSet, array $options = [])
{
$mutations = [];
foreach ($dataSet as $data) {
$mutations[] = $this->operation->mutation(Operation::OP_INSERT_OR_UPDATE, $table, $data);
}
return $this->commitInSingleUseTransaction($mutat... | [
"public",
"function",
"insertOrUpdateBatch",
"(",
"$",
"table",
",",
"array",
"$",
"dataSet",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"mutations",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"dataSet",
"as",
"$",
"data",
")",
"{",
... | Insert or update multiple rows.
If a row already exists (determined by comparing the Primary Key to
existing table data), the row will be updated. If not, it will be
created.
Mutations are committed in a single-use transaction.
Example:
```
$database->insertOrUpdateBatch('Posts', [
[
'ID' => 1337,
'postTitle' => 'He... | [
"Insert",
"or",
"update",
"multiple",
"rows",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L997-L1005 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.replaceBatch | public function replaceBatch($table, array $dataSet, array $options = [])
{
$mutations = [];
foreach ($dataSet as $data) {
$mutations[] = $this->operation->mutation(Operation::OP_REPLACE, $table, $data);
}
return $this->commitInSingleUseTransaction($mutations, $options);... | php | public function replaceBatch($table, array $dataSet, array $options = [])
{
$mutations = [];
foreach ($dataSet as $data) {
$mutations[] = $this->operation->mutation(Operation::OP_REPLACE, $table, $data);
}
return $this->commitInSingleUseTransaction($mutations, $options);... | [
"public",
"function",
"replaceBatch",
"(",
"$",
"table",
",",
"array",
"$",
"dataSet",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"mutations",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"dataSet",
"as",
"$",
"data",
")",
"{",
"$",
... | Replace multiple rows.
Provide data for the entire row. Cloud Spanner will attempt to find a
record matching the Primary Key, and will replace the entire row. If a
matching row is not found, it will be inserted.
Mutations are committed in a single-use transaction.
Example:
```
$database->replaceBatch('Posts', [
[
'I... | [
"Replace",
"multiple",
"rows",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L1072-L1080 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.delete | public function delete($table, KeySet $keySet, array $options = [])
{
$mutations = [$this->operation->deleteMutation($table, $keySet)];
return $this->commitInSingleUseTransaction($mutations, $options);
} | php | public function delete($table, KeySet $keySet, array $options = [])
{
$mutations = [$this->operation->deleteMutation($table, $keySet)];
return $this->commitInSingleUseTransaction($mutations, $options);
} | [
"public",
"function",
"delete",
"(",
"$",
"table",
",",
"KeySet",
"$",
"keySet",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"mutations",
"=",
"[",
"$",
"this",
"->",
"operation",
"->",
"deleteMutation",
"(",
"$",
"table",
",",
"$",
... | Delete one or more rows.
Mutations are committed in a single-use transaction.
Since this method does not feature replay protection, it may attempt to
apply mutations more than once; if the mutations are not idempotent, this
may lead to a failure being reported when the mutation was previously
applied.
Example:
```
$... | [
"Delete",
"one",
"or",
"more",
"rows",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L1112-L1117 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.executePartitionedUpdate | public function executePartitionedUpdate($statement, array $options = [])
{
$session = $this->selectSession(SessionPoolInterface::CONTEXT_READWRITE);
$transaction = $this->operation->transaction($session, [
'transactionOptions' => [
'partitionedDml' => []
]
... | php | public function executePartitionedUpdate($statement, array $options = [])
{
$session = $this->selectSession(SessionPoolInterface::CONTEXT_READWRITE);
$transaction = $this->operation->transaction($session, [
'transactionOptions' => [
'partitionedDml' => []
]
... | [
"public",
"function",
"executePartitionedUpdate",
"(",
"$",
"statement",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"session",
"=",
"$",
"this",
"->",
"selectSession",
"(",
"SessionPoolInterface",
"::",
"CONTEXT_READWRITE",
")",
";",
"$",
"t... | Execute a partitioned DML update.
Returns the lower bound of rows modified by the DML statement.
**PLEASE NOTE** Most use cases for DML are better served by using
{@see Google\Cloud\Spanner\Transaction::executeUpdate()}. Please read and
understand the documentation for partitioned DML before implementing it
in your a... | [
"Execute",
"a",
"partitioned",
"DML",
"update",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L1479-L1496 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.close | public function close()
{
if ($this->session) {
if ($this->sessionPool) {
$this->sessionPool->release($this->session);
} else {
$this->session->delete();
}
$this->session = null;
}
} | php | public function close()
{
if ($this->session) {
if ($this->sessionPool) {
$this->sessionPool->release($this->session);
} else {
$this->session->delete();
}
$this->session = null;
}
} | [
"public",
"function",
"close",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"session",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"sessionPool",
")",
"{",
"$",
"this",
"->",
"sessionPool",
"->",
"release",
"(",
"$",
"this",
"->",
"session",
")",
";",
... | Closes the database connection by returning the active session back to
the session pool queue or by deleting the session if there is no pool
associated.
It is highly important to ensure this is called as it is not always safe
to rely soley on {@see Google\Cloud\Spanner\Database::__destruct()}.
Example:
```
$database-... | [
"Closes",
"the",
"database",
"connection",
"by",
"returning",
"the",
"active",
"session",
"back",
"to",
"the",
"session",
"pool",
"queue",
"or",
"by",
"deleting",
"the",
"session",
"if",
"there",
"is",
"no",
"pool",
"associated",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L1651-L1662 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.identity | public function identity()
{
$databaseParts = explode('/', $this->name);
$instanceParts = explode('/', $this->instance->name());
return [
'projectId' => $this->projectId,
'database' => end($databaseParts),
'instance' => end($instanceParts),
];
... | php | public function identity()
{
$databaseParts = explode('/', $this->name);
$instanceParts = explode('/', $this->instance->name());
return [
'projectId' => $this->projectId,
'database' => end($databaseParts),
'instance' => end($instanceParts),
];
... | [
"public",
"function",
"identity",
"(",
")",
"{",
"$",
"databaseParts",
"=",
"explode",
"(",
"'/'",
",",
"$",
"this",
"->",
"name",
")",
";",
"$",
"instanceParts",
"=",
"explode",
"(",
"'/'",
",",
"$",
"this",
"->",
"instance",
"->",
"name",
"(",
")",... | Retrieves the database's identity.
@access private
@return array | [
"Retrieves",
"the",
"database",
"s",
"identity",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L1716-L1726 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.selectSession | private function selectSession($context = SessionPoolInterface::CONTEXT_READ, array $options = [])
{
if ($this->session) {
return $this->session;
}
if ($this->sessionPool) {
return $this->session = $this->sessionPool->acquire($context);
}
return $thi... | php | private function selectSession($context = SessionPoolInterface::CONTEXT_READ, array $options = [])
{
if ($this->session) {
return $this->session;
}
if ($this->sessionPool) {
return $this->session = $this->sessionPool->acquire($context);
}
return $thi... | [
"private",
"function",
"selectSession",
"(",
"$",
"context",
"=",
"SessionPoolInterface",
"::",
"CONTEXT_READ",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"session",
")",
"{",
"return",
"$",
"this",
"->",
"sessio... | If no session is already associated with the database use the session
pool implementation to retrieve a session one - otherwise create on
demand.
@param string $context [optional] The session context. **Defaults to**
`r` (READ).
@param array $options [optional] Configuration options.
@return Session | [
"If",
"no",
"session",
"is",
"already",
"associated",
"with",
"the",
"database",
"use",
"the",
"session",
"pool",
"implementation",
"to",
"retrieve",
"a",
"session",
"one",
"-",
"otherwise",
"create",
"on",
"demand",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L1768-L1779 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.commitInSingleUseTransaction | private function commitInSingleUseTransaction(array $mutations, array $options = [])
{
$options['mutations'] = $mutations;
return $this->runTransaction(function (Transaction $t) use ($options) {
return $t->commit($options);
}, [
'singleUse' => true
]);
} | php | private function commitInSingleUseTransaction(array $mutations, array $options = [])
{
$options['mutations'] = $mutations;
return $this->runTransaction(function (Transaction $t) use ($options) {
return $t->commit($options);
}, [
'singleUse' => true
]);
} | [
"private",
"function",
"commitInSingleUseTransaction",
"(",
"array",
"$",
"mutations",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"[",
"'mutations'",
"]",
"=",
"$",
"mutations",
";",
"return",
"$",
"this",
"->",
"runTransaction",
... | Common method to run mutations within a single-use transaction.
@param array $mutations A list of mutations to execute.
@param array $options [optional] Configuration options.
@return Timestamp The commit timestamp. | [
"Common",
"method",
"to",
"run",
"mutations",
"within",
"a",
"single",
"-",
"use",
"transaction",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L1788-L1797 | train |
googleapis/google-cloud-php | Spanner/src/Database.php | Database.fullyQualifiedDatabaseName | private function fullyQualifiedDatabaseName($name)
{
$instance = InstanceAdminClient::parseName($this->instance->name())['instance'];
try {
return GapicSpannerClient::databaseName(
$this->projectId,
$instance,
$name
);
... | php | private function fullyQualifiedDatabaseName($name)
{
$instance = InstanceAdminClient::parseName($this->instance->name())['instance'];
try {
return GapicSpannerClient::databaseName(
$this->projectId,
$instance,
$name
);
... | [
"private",
"function",
"fullyQualifiedDatabaseName",
"(",
"$",
"name",
")",
"{",
"$",
"instance",
"=",
"InstanceAdminClient",
"::",
"parseName",
"(",
"$",
"this",
"->",
"instance",
"->",
"name",
"(",
")",
")",
"[",
"'instance'",
"]",
";",
"try",
"{",
"retu... | Convert the simple database name to a fully qualified name.
@return string | [
"Convert",
"the",
"simple",
"database",
"name",
"to",
"a",
"fully",
"qualified",
"name",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Spanner/src/Database.php#L1804-L1819 | train |
googleapis/google-cloud-php | Core/src/Compute/Metadata/Readers/StreamReader.php | StreamReader.read | public function read($path)
{
$url = self::BASE_URL.$path;
return file_get_contents($url, false, $this->context);
} | php | public function read($path)
{
$url = self::BASE_URL.$path;
return file_get_contents($url, false, $this->context);
} | [
"public",
"function",
"read",
"(",
"$",
"path",
")",
"{",
"$",
"url",
"=",
"self",
"::",
"BASE_URL",
".",
"$",
"path",
";",
"return",
"file_get_contents",
"(",
"$",
"url",
",",
"false",
",",
"$",
"this",
"->",
"context",
")",
";",
"}"
] | A method to read the metadata value for a given path. | [
"A",
"method",
"to",
"read",
"the",
"metadata",
"value",
"for",
"a",
"given",
"path",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/Compute/Metadata/Readers/StreamReader.php#L59-L63 | train |
googleapis/google-cloud-php | Core/src/Report/MetadataProviderUtils.php | MetadataProviderUtils.autoSelect | public static function autoSelect($server)
{
if (isset($server['GAE_SERVICE'])) {
if (isset($server['GAE_ENV']) && $server['GAE_ENV'] === 'standard') {
return new GAEStandardMetadataProvider($server);
}
return new GAEFlexMetadataProvider($server);
... | php | public static function autoSelect($server)
{
if (isset($server['GAE_SERVICE'])) {
if (isset($server['GAE_ENV']) && $server['GAE_ENV'] === 'standard') {
return new GAEStandardMetadataProvider($server);
}
return new GAEFlexMetadataProvider($server);
... | [
"public",
"static",
"function",
"autoSelect",
"(",
"$",
"server",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"server",
"[",
"'GAE_SERVICE'",
"]",
")",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"server",
"[",
"'GAE_ENV'",
"]",
")",
"&&",
"$",
"server",
"... | Automatically choose the most appropriate MetadataProvider and return it.
@param array $server Normally pass the $_SERVER.
@return MetadataProviderInterface | [
"Automatically",
"choose",
"the",
"most",
"appropriate",
"MetadataProvider",
"and",
"return",
"it",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/Report/MetadataProviderUtils.php#L31-L40 | train |
googleapis/google-cloud-php | BigQueryDataTransfer/src/V1/TransferMessage.php | TransferMessage.setSeverity | public function setSeverity($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage_MessageSeverity::class);
$this->severity = $var;
return $this;
} | php | public function setSeverity($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\DataTransfer\V1\TransferMessage_MessageSeverity::class);
$this->severity = $var;
return $this;
} | [
"public",
"function",
"setSeverity",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkEnum",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"BigQuery",
"\\",
"DataTransfer",
"\\",
"V1",
"\\",
"TransferMessage_MessageSeverity",
"::",
"class",
")"... | Message severity.
Generated from protobuf field <code>.google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity severity = 2;</code>
@param int $var
@return $this | [
"Message",
"severity",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/BigQueryDataTransfer/src/V1/TransferMessage.php#L100-L106 | train |
googleapis/google-cloud-php | Dlp/src/V2/PrivacyMetric/KMapEstimationConfig.php | KMapEstimationConfig.setAuxiliaryTables | public function setAuxiliaryTables($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\PrivacyMetric\KMapEstimationConfig\AuxiliaryTable::class);
$this->auxiliary_tables = $arr;
return $this;
} | php | public function setAuxiliaryTables($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\PrivacyMetric\KMapEstimationConfig\AuxiliaryTable::class);
$this->auxiliary_tables = $arr;
return $this;
} | [
"public",
"function",
"setAuxiliaryTables",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
... | Several auxiliary tables can be used in the analysis. Each custom_tag
used to tag a quasi-identifiers column must appear in exactly one column
of one auxiliary table.
Generated from protobuf field <code>repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3;</code>
@para... | [
"Several",
"auxiliary",
"tables",
"can",
"be",
"used",
"in",
"the",
"analysis",
".",
"Each",
"custom_tag",
"used",
"to",
"tag",
"a",
"quasi",
"-",
"identifiers",
"column",
"must",
"appear",
"in",
"exactly",
"one",
"column",
"of",
"one",
"auxiliary",
"table",... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/PrivacyMetric/KMapEstimationConfig.php#L152-L158 | train |
googleapis/google-cloud-php | Container/src/V1/NodeManagement.php | NodeManagement.setUpgradeOptions | public function setUpgradeOptions($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\AutoUpgradeOptions::class);
$this->upgrade_options = $var;
return $this;
} | php | public function setUpgradeOptions($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\AutoUpgradeOptions::class);
$this->upgrade_options = $var;
return $this;
} | [
"public",
"function",
"setUpgradeOptions",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Container",
"\\",
"V1",
"\\",
"AutoUpgradeOptions",
"::",
"class",
")",
";",
"$",
"this",
"... | Specifies the Auto Upgrade knobs for the node pool.
Generated from protobuf field <code>.google.container.v1.AutoUpgradeOptions upgrade_options = 10;</code>
@param \Google\Cloud\Container\V1\AutoUpgradeOptions $var
@return $this | [
"Specifies",
"the",
"Auto",
"Upgrade",
"knobs",
"for",
"the",
"node",
"pool",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Container/src/V1/NodeManagement.php#L147-L153 | train |
googleapis/google-cloud-php | Storage/src/ObjectPageIterator.php | ObjectPageIterator.updatePrefixes | private function updatePrefixes()
{
foreach ($this->page['prefixes'] as $prefix) {
if (!in_array($prefix, $this->prefixes)) {
$this->prefixes[] = $prefix;
}
}
} | php | private function updatePrefixes()
{
foreach ($this->page['prefixes'] as $prefix) {
if (!in_array($prefix, $this->prefixes)) {
$this->prefixes[] = $prefix;
}
}
} | [
"private",
"function",
"updatePrefixes",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"page",
"[",
"'prefixes'",
"]",
"as",
"$",
"prefix",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"prefix",
",",
"$",
"this",
"->",
"prefixes",
")",
")",
... | Add new prefixes to the list.
@return array | [
"Add",
"new",
"prefixes",
"to",
"the",
"list",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Storage/src/ObjectPageIterator.php#L69-L76 | train |
googleapis/google-cloud-php | Dataproc/src/V1/Job.php | Job.setPlacement | public function setPlacement($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JobPlacement::class);
$this->placement = $var;
return $this;
} | php | public function setPlacement($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JobPlacement::class);
$this->placement = $var;
return $this;
} | [
"public",
"function",
"setPlacement",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dataproc",
"\\",
"V1",
"\\",
"JobPlacement",
"::",
"class",
")",
";",
"$",
"this",
"->",
"plac... | Required. Job information, including how, when, and where to
run the job.
Generated from protobuf field <code>.google.cloud.dataproc.v1.JobPlacement placement = 2;</code>
@param \Google\Cloud\Dataproc\V1\JobPlacement $var
@return $this | [
"Required",
".",
"Job",
"information",
"including",
"how",
"when",
"and",
"where",
"to",
"run",
"the",
"job",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1/Job.php#L215-L221 | train |
googleapis/google-cloud-php | Dataproc/src/V1/Job.php | Job.setHiveJob | public function setHiveJob($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\HiveJob::class);
$this->writeOneof(6, $var);
return $this;
} | php | public function setHiveJob($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\HiveJob::class);
$this->writeOneof(6, $var);
return $this;
} | [
"public",
"function",
"setHiveJob",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dataproc",
"\\",
"V1",
"\\",
"HiveJob",
"::",
"class",
")",
";",
"$",
"this",
"->",
"writeOneof"... | Job is a Hive job.
Generated from protobuf field <code>.google.cloud.dataproc.v1.HiveJob hive_job = 6;</code>
@param \Google\Cloud\Dataproc\V1\HiveJob $var
@return $this | [
"Job",
"is",
"a",
"Hive",
"job",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1/Job.php#L319-L325 | train |
googleapis/google-cloud-php | Dataproc/src/V1/Job.php | Job.setPigJob | public function setPigJob($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\PigJob::class);
$this->writeOneof(7, $var);
return $this;
} | php | public function setPigJob($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\PigJob::class);
$this->writeOneof(7, $var);
return $this;
} | [
"public",
"function",
"setPigJob",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dataproc",
"\\",
"V1",
"\\",
"PigJob",
"::",
"class",
")",
";",
"$",
"this",
"->",
"writeOneof",
... | Job is a Pig job.
Generated from protobuf field <code>.google.cloud.dataproc.v1.PigJob pig_job = 7;</code>
@param \Google\Cloud\Dataproc\V1\PigJob $var
@return $this | [
"Job",
"is",
"a",
"Pig",
"job",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1/Job.php#L345-L351 | train |
googleapis/google-cloud-php | Dataproc/src/V1/Job.php | Job.setScheduling | public function setScheduling($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JobScheduling::class);
$this->scheduling = $var;
return $this;
} | php | public function setScheduling($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JobScheduling::class);
$this->scheduling = $var;
return $this;
} | [
"public",
"function",
"setScheduling",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Dataproc",
"\\",
"V1",
"\\",
"JobScheduling",
"::",
"class",
")",
";",
"$",
"this",
"->",
"sc... | Optional. Job scheduling configuration.
Generated from protobuf field <code>.google.cloud.dataproc.v1.JobScheduling scheduling = 20;</code>
@param \Google\Cloud\Dataproc\V1\JobScheduling $var
@return $this | [
"Optional",
".",
"Job",
"scheduling",
"configuration",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dataproc/src/V1/Job.php#L579-L585 | train |
googleapis/google-cloud-php | VideoIntelligence/src/V1beta2/VideoAnnotationResults.php | VideoAnnotationResults.setSegmentLabelAnnotations | public function setSegmentLabelAnnotations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation::class);
$this->segment_label_annotations = $arr;
return $this;
} | php | public function setSegmentLabelAnnotations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation::class);
$this->segment_label_annotations = $arr;
return $this;
} | [
"public",
"function",
"setSegmentLabelAnnotations",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"G... | Label annotations on video level or user specified segment level.
There is exactly one element for each unique label.
Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.LabelAnnotation segment_label_annotations = 2;</code>
@param \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation... | [
"Label",
"annotations",
"on",
"video",
"level",
"or",
"user",
"specified",
"segment",
"level",
".",
"There",
"is",
"exactly",
"one",
"element",
"for",
"each",
"unique",
"label",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/VideoIntelligence/src/V1beta2/VideoAnnotationResults.php#L154-L160 | train |
googleapis/google-cloud-php | VideoIntelligence/src/V1beta2/VideoAnnotationResults.php | VideoAnnotationResults.setShotLabelAnnotations | public function setShotLabelAnnotations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation::class);
$this->shot_label_annotations = $arr;
return $this;
} | php | public function setShotLabelAnnotations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation::class);
$this->shot_label_annotations = $arr;
return $this;
} | [
"public",
"function",
"setShotLabelAnnotations",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Goog... | Label annotations on shot level.
There is exactly one element for each unique label.
Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.LabelAnnotation shot_label_annotations = 3;</code>
@param \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation[]|\Google\Protobuf\Internal\Repeate... | [
"Label",
"annotations",
"on",
"shot",
"level",
".",
"There",
"is",
"exactly",
"one",
"element",
"for",
"each",
"unique",
"label",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/VideoIntelligence/src/V1beta2/VideoAnnotationResults.php#L182-L188 | train |
googleapis/google-cloud-php | Bigtable/src/ResumableStream.php | ResumableStream.readAll | public function readAll()
{
$tries = 0;
$argumentFunction = $this->argumentFunction;
$retryFunction = $this->retryFunction;
do {
$ex = null;
$stream = $this->createExponentialBackoff()->execute($this->apiFunction, $argumentFunction());
try {
... | php | public function readAll()
{
$tries = 0;
$argumentFunction = $this->argumentFunction;
$retryFunction = $this->retryFunction;
do {
$ex = null;
$stream = $this->createExponentialBackoff()->execute($this->apiFunction, $argumentFunction());
try {
... | [
"public",
"function",
"readAll",
"(",
")",
"{",
"$",
"tries",
"=",
"0",
";",
"$",
"argumentFunction",
"=",
"$",
"this",
"->",
"argumentFunction",
";",
"$",
"retryFunction",
"=",
"$",
"this",
"->",
"retryFunction",
";",
"do",
"{",
"$",
"ex",
"=",
"null"... | Starts executing the call and reading elements from server stream.
@return \Generator
@throws ApiException | [
"Starts",
"executing",
"the",
"call",
"and",
"reading",
"elements",
"from",
"server",
"stream",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Bigtable/src/ResumableStream.php#L89-L108 | train |
googleapis/google-cloud-php | VideoIntelligence/src/V1beta2/VideoContext.php | VideoContext.setSegments | public function setSegments($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1beta2\VideoSegment::class);
$this->segments = $arr;
return $this;
} | php | public function setSegments($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1beta2\VideoSegment::class);
$this->segments = $arr;
return $this;
} | [
"public",
"function",
"setSegments",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\",... | Video segments to annotate. The segments may overlap and are not required
to be contiguous or span the whole video. If unspecified, each video
is treated as a single segment.
Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.VideoSegment segments = 1;</code>
@param \Google\Cloud\Vide... | [
"Video",
"segments",
"to",
"annotate",
".",
"The",
"segments",
"may",
"overlap",
"and",
"are",
"not",
"required",
"to",
"be",
"contiguous",
"or",
"span",
"the",
"whole",
"video",
".",
"If",
"unspecified",
"each",
"video",
"is",
"treated",
"as",
"a",
"singl... | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/VideoIntelligence/src/V1beta2/VideoContext.php#L98-L104 | train |
googleapis/google-cloud-php | VideoIntelligence/src/V1beta2/VideoContext.php | VideoContext.setLabelDetectionConfig | public function setLabelDetectionConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1beta2\LabelDetectionConfig::class);
$this->label_detection_config = $var;
return $this;
} | php | public function setLabelDetectionConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1beta2\LabelDetectionConfig::class);
$this->label_detection_config = $var;
return $this;
} | [
"public",
"function",
"setLabelDetectionConfig",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"VideoIntelligence",
"\\",
"V1beta2",
"\\",
"LabelDetectionConfig",
"::",
"class",
")",
";",... | Config for LABEL_DETECTION.
Generated from protobuf field <code>.google.cloud.videointelligence.v1beta2.LabelDetectionConfig label_detection_config = 2;</code>
@param \Google\Cloud\VideoIntelligence\V1beta2\LabelDetectionConfig $var
@return $this | [
"Config",
"for",
"LABEL_DETECTION",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/VideoIntelligence/src/V1beta2/VideoContext.php#L124-L130 | train |
googleapis/google-cloud-php | VideoIntelligence/src/V1beta2/VideoContext.php | VideoContext.setFaceDetectionConfig | public function setFaceDetectionConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1beta2\FaceDetectionConfig::class);
$this->face_detection_config = $var;
return $this;
} | php | public function setFaceDetectionConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1beta2\FaceDetectionConfig::class);
$this->face_detection_config = $var;
return $this;
} | [
"public",
"function",
"setFaceDetectionConfig",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"VideoIntelligence",
"\\",
"V1beta2",
"\\",
"FaceDetectionConfig",
"::",
"class",
")",
";",
... | Config for FACE_DETECTION.
Generated from protobuf field <code>.google.cloud.videointelligence.v1beta2.FaceDetectionConfig face_detection_config = 5;</code>
@param \Google\Cloud\VideoIntelligence\V1beta2\FaceDetectionConfig $var
@return $this | [
"Config",
"for",
"FACE_DETECTION",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/VideoIntelligence/src/V1beta2/VideoContext.php#L202-L208 | train |
googleapis/google-cloud-php | Debugger/src/Connection/Grpc.php | Grpc.listDebuggees | public function listDebuggees(array $args = [])
{
return $this->send([$this->debuggerClient, 'listDebuggees'], [
$this->pluck('project', $args),
DebuggerClient::getDefaultAgentVersion(),
$args
]);
} | php | public function listDebuggees(array $args = [])
{
return $this->send([$this->debuggerClient, 'listDebuggees'], [
$this->pluck('project', $args),
DebuggerClient::getDefaultAgentVersion(),
$args
]);
} | [
"public",
"function",
"listDebuggees",
"(",
"array",
"$",
"args",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"send",
"(",
"[",
"$",
"this",
"->",
"debuggerClient",
",",
"'listDebuggees'",
"]",
",",
"[",
"$",
"this",
"->",
"pluck",
"(",
"'p... | List all registered debuggees.
@param array $args {
@type string $project The project ID
} | [
"List",
"all",
"registered",
"debuggees",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/Connection/Grpc.php#L95-L102 | train |
googleapis/google-cloud-php | Debugger/src/Connection/Grpc.php | Grpc.registerDebuggee | public function registerDebuggee(array $args = [])
{
return $this->send([$this->controllerClient, 'registerDebuggee'], [
$this->serializer->decodeMessage(
new Debuggee(),
$this->pluck('debuggee', $args)
),
$args
]);
} | php | public function registerDebuggee(array $args = [])
{
return $this->send([$this->controllerClient, 'registerDebuggee'], [
$this->serializer->decodeMessage(
new Debuggee(),
$this->pluck('debuggee', $args)
),
$args
]);
} | [
"public",
"function",
"registerDebuggee",
"(",
"array",
"$",
"args",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"send",
"(",
"[",
"$",
"this",
"->",
"controllerClient",
",",
"'registerDebuggee'",
"]",
",",
"[",
"$",
"this",
"->",
"serializer",... | Register this process as a debuggee.
@param array $args | [
"Register",
"this",
"process",
"as",
"a",
"debuggee",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/Connection/Grpc.php#L109-L118 | train |
googleapis/google-cloud-php | Debugger/src/Connection/Grpc.php | Grpc.listBreakpoints | public function listBreakpoints(array $args = [])
{
return $this->send([$this->controllerClient, 'listActiveBreakpoints'], [
$this->pluck('debuggeeId', $args),
$args
]);
} | php | public function listBreakpoints(array $args = [])
{
return $this->send([$this->controllerClient, 'listActiveBreakpoints'], [
$this->pluck('debuggeeId', $args),
$args
]);
} | [
"public",
"function",
"listBreakpoints",
"(",
"array",
"$",
"args",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"send",
"(",
"[",
"$",
"this",
"->",
"controllerClient",
",",
"'listActiveBreakpoints'",
"]",
",",
"[",
"$",
"this",
"->",
"pluck",
... | List the breakpoints set for the specified debuggee.
@param array $args | [
"List",
"the",
"breakpoints",
"set",
"for",
"the",
"specified",
"debuggee",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/Connection/Grpc.php#L125-L131 | train |
googleapis/google-cloud-php | Debugger/src/Connection/Grpc.php | Grpc.updateBreakpoint | public function updateBreakpoint(array $args)
{
return $this->send([$this->controllerClient, 'updateActiveBreakpoint'], [
$this->pluck('debuggeeId', $args),
$this->serializer->decodeMessage(
new Breakpoint(),
$this->pluck('breakpoint', $args)
... | php | public function updateBreakpoint(array $args)
{
return $this->send([$this->controllerClient, 'updateActiveBreakpoint'], [
$this->pluck('debuggeeId', $args),
$this->serializer->decodeMessage(
new Breakpoint(),
$this->pluck('breakpoint', $args)
... | [
"public",
"function",
"updateBreakpoint",
"(",
"array",
"$",
"args",
")",
"{",
"return",
"$",
"this",
"->",
"send",
"(",
"[",
"$",
"this",
"->",
"controllerClient",
",",
"'updateActiveBreakpoint'",
"]",
",",
"[",
"$",
"this",
"->",
"pluck",
"(",
"'debuggee... | Update the provided breakpoint.
@param array $args | [
"Update",
"the",
"provided",
"breakpoint",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/Connection/Grpc.php#L138-L148 | train |
googleapis/google-cloud-php | Debugger/src/Connection/Grpc.php | Grpc.setBreakpoint | public function setBreakpoint(array $args)
{
$breakpointArgs = $this->pluckArray([
'action',
'condition',
'expressions',
'logMessageFormat',
'logLevel',
'location'
], $args);
return $this->send([$this->debuggerClient, 's... | php | public function setBreakpoint(array $args)
{
$breakpointArgs = $this->pluckArray([
'action',
'condition',
'expressions',
'logMessageFormat',
'logLevel',
'location'
], $args);
return $this->send([$this->debuggerClient, 's... | [
"public",
"function",
"setBreakpoint",
"(",
"array",
"$",
"args",
")",
"{",
"$",
"breakpointArgs",
"=",
"$",
"this",
"->",
"pluckArray",
"(",
"[",
"'action'",
",",
"'condition'",
",",
"'expressions'",
",",
"'logMessageFormat'",
",",
"'logLevel'",
",",
"'locati... | Sets a breakpoint.
@param array $args {
@type string $debuggeeId The Debuggee ID
@type array $location The source location
}
@return array | [
"Sets",
"a",
"breakpoint",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Debugger/src/Connection/Grpc.php#L159-L175 | train |
googleapis/google-cloud-php | ErrorReporting/src/V1beta1/ListEventsResponse.php | ListEventsResponse.setErrorEvents | public function setErrorEvents($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class);
$this->error_events = $arr;
return $this;
} | php | public function setErrorEvents($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class);
$this->error_events = $arr;
return $this;
} | [
"public",
"function",
"setErrorEvents",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\... | The error events which match the given request.
Generated from protobuf field <code>repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1;</code>
@param \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"The",
"error",
"events",
"which",
"match",
"the",
"given",
"request",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/ErrorReporting/src/V1beta1/ListEventsResponse.php#L78-L84 | train |
googleapis/google-cloud-php | Dlp/src/V2/InspectionRuleSet.php | InspectionRuleSet.setRules | public function setRules($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\InspectionRule::class);
$this->rules = $arr;
return $this;
} | php | public function setRules($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\InspectionRule::class);
$this->rules = $arr;
return $this;
} | [
"public",
"function",
"setRules",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"MESSAGE",
",",
"\\",
"Google",
"\\",
... | Set of rules to be applied to infoTypes. The rules are applied in order.
Generated from protobuf field <code>repeated .google.privacy.dlp.v2.InspectionRule rules = 2;</code>
@param \Google\Cloud\Dlp\V2\InspectionRule[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Set",
"of",
"rules",
"to",
"be",
"applied",
"to",
"infoTypes",
".",
"The",
"rules",
"are",
"applied",
"in",
"order",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Dlp/src/V2/InspectionRuleSet.php#L93-L99 | train |
googleapis/google-cloud-php | Talent/src/V4beta1/PersonName/PersonStructuredName.php | PersonStructuredName.setSuffixes | public function setSuffixes($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->suffixes = $arr;
return $this;
} | php | public function setSuffixes($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->suffixes = $arr;
return $this;
} | [
"public",
"function",
"setSuffixes",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"STRING",
")",
";",
"$",
"this",
"-... | Optional.
Suffixes.
Number of characters allowed is 20.
Generated from protobuf field <code>repeated string suffixes = 4;</code>
@param string[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Optional",
".",
"Suffixes",
".",
"Number",
"of",
"characters",
"allowed",
"is",
"20",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/PersonName/PersonStructuredName.php#L240-L246 | train |
googleapis/google-cloud-php | Talent/src/V4beta1/PersonName/PersonStructuredName.php | PersonStructuredName.setPrefixes | public function setPrefixes($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->prefixes = $arr;
return $this;
} | php | public function setPrefixes($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->prefixes = $arr;
return $this;
} | [
"public",
"function",
"setPrefixes",
"(",
"$",
"var",
")",
"{",
"$",
"arr",
"=",
"GPBUtil",
"::",
"checkRepeatedField",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"Internal",
"\\",
"GPBType",
"::",
"STRING",
")",
";",
"$",
"this",
"-... | Optional.
Prefixes.
Number of characters allowed is 20.
Generated from protobuf field <code>repeated string prefixes = 5;</code>
@param string[]|\Google\Protobuf\Internal\RepeatedField $var
@return $this | [
"Optional",
".",
"Prefixes",
".",
"Number",
"of",
"characters",
"allowed",
"is",
"20",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Talent/src/V4beta1/PersonName/PersonStructuredName.php#L270-L276 | train |
googleapis/google-cloud-php | Redis/src/V1/UpdateInstanceRequest.php | UpdateInstanceRequest.setInstance | public function setInstance($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Redis\V1\Instance::class);
$this->instance = $var;
return $this;
} | php | public function setInstance($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Redis\V1\Instance::class);
$this->instance = $var;
return $this;
} | [
"public",
"function",
"setInstance",
"(",
"$",
"var",
")",
"{",
"GPBUtil",
"::",
"checkMessage",
"(",
"$",
"var",
",",
"\\",
"Google",
"\\",
"Cloud",
"\\",
"Redis",
"\\",
"V1",
"\\",
"Instance",
"::",
"class",
")",
";",
"$",
"this",
"->",
"instance",
... | Required. Update description.
Only fields specified in update_mask are updated.
Generated from protobuf field <code>.google.cloud.redis.v1.Instance instance = 2;</code>
@param \Google\Cloud\Redis\V1\Instance $var
@return $this | [
"Required",
".",
"Update",
"description",
".",
"Only",
"fields",
"specified",
"in",
"update_mask",
"are",
"updated",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Redis/src/V1/UpdateInstanceRequest.php#L120-L126 | train |
googleapis/google-cloud-php | Firestore/src/V1beta1/Gapic/FirestoreGapicClient.php | FirestoreGapicClient.anyPathName | public static function anyPathName($project, $database, $document, $anyPath)
{
return self::getAnyPathNameTemplate()->render([
'project' => $project,
'database' => $database,
'document' => $document,
'any_path' => $anyPath,
]);
} | php | public static function anyPathName($project, $database, $document, $anyPath)
{
return self::getAnyPathNameTemplate()->render([
'project' => $project,
'database' => $database,
'document' => $document,
'any_path' => $anyPath,
]);
} | [
"public",
"static",
"function",
"anyPathName",
"(",
"$",
"project",
",",
"$",
"database",
",",
"$",
"document",
",",
"$",
"anyPath",
")",
"{",
"return",
"self",
"::",
"getAnyPathNameTemplate",
"(",
")",
"->",
"render",
"(",
"[",
"'project'",
"=>",
"$",
"... | Formats a string containing the fully-qualified path to represent
a any_path resource.
@param string $project
@param string $database
@param string $document
@param string $anyPath
@return string The formatted any_path resource.
@experimental | [
"Formats",
"a",
"string",
"containing",
"the",
"fully",
"-",
"qualified",
"path",
"to",
"represent",
"a",
"any_path",
"resource",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1beta1/Gapic/FirestoreGapicClient.php#L226-L234 | train |
googleapis/google-cloud-php | Firestore/src/V1beta1/Gapic/FirestoreGapicClient.php | FirestoreGapicClient.documentPathName | public static function documentPathName($project, $database, $documentPath)
{
return self::getDocumentPathNameTemplate()->render([
'project' => $project,
'database' => $database,
'document_path' => $documentPath,
]);
} | php | public static function documentPathName($project, $database, $documentPath)
{
return self::getDocumentPathNameTemplate()->render([
'project' => $project,
'database' => $database,
'document_path' => $documentPath,
]);
} | [
"public",
"static",
"function",
"documentPathName",
"(",
"$",
"project",
",",
"$",
"database",
",",
"$",
"documentPath",
")",
"{",
"return",
"self",
"::",
"getDocumentPathNameTemplate",
"(",
")",
"->",
"render",
"(",
"[",
"'project'",
"=>",
"$",
"project",
"... | Formats a string containing the fully-qualified path to represent
a document_path resource.
@param string $project
@param string $database
@param string $documentPath
@return string The formatted document_path resource.
@experimental | [
"Formats",
"a",
"string",
"containing",
"the",
"fully",
"-",
"qualified",
"path",
"to",
"represent",
"a",
"document_path",
"resource",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1beta1/Gapic/FirestoreGapicClient.php#L265-L272 | train |
googleapis/google-cloud-php | Firestore/src/V1beta1/Gapic/FirestoreGapicClient.php | FirestoreGapicClient.commit | public function commit($database, $writes, array $optionalArgs = [])
{
$request = new CommitRequest();
$request->setDatabase($database);
$request->setWrites($writes);
if (isset($optionalArgs['transaction'])) {
$request->setTransaction($optionalArgs['transaction']);
... | php | public function commit($database, $writes, array $optionalArgs = [])
{
$request = new CommitRequest();
$request->setDatabase($database);
$request->setWrites($writes);
if (isset($optionalArgs['transaction'])) {
$request->setTransaction($optionalArgs['transaction']);
... | [
"public",
"function",
"commit",
"(",
"$",
"database",
",",
"$",
"writes",
",",
"array",
"$",
"optionalArgs",
"=",
"[",
"]",
")",
"{",
"$",
"request",
"=",
"new",
"CommitRequest",
"(",
")",
";",
"$",
"request",
"->",
"setDatabase",
"(",
"$",
"database",... | Commits a transaction, while optionally updating documents.
Sample code:
```
$firestoreClient = new FirestoreClient();
try {
$formattedDatabase = $firestoreClient->databaseRootName('[PROJECT]', '[DATABASE]');
$writes = [];
$response = $firestoreClient->commit($formattedDatabase, $writes);
} finally {
$firestoreClient-... | [
"Commits",
"a",
"transaction",
"while",
"optionally",
"updating",
"documents",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Firestore/src/V1beta1/Gapic/FirestoreGapicClient.php#L957-L979 | train |
googleapis/google-cloud-php | Core/src/Batch/SimpleJobTrait.php | SimpleJobTrait.setSimpleJobProperties | private function setSimpleJobProperties(array $options = [])
{
if (!isset($options['identifier'])) {
throw new \InvalidArgumentException(
'A valid identifier is required in order to register a job.'
);
}
$options += [
'configStorage' => nu... | php | private function setSimpleJobProperties(array $options = [])
{
if (!isset($options['identifier'])) {
throw new \InvalidArgumentException(
'A valid identifier is required in order to register a job.'
);
}
$options += [
'configStorage' => nu... | [
"private",
"function",
"setSimpleJobProperties",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"options",
"[",
"'identifier'",
"]",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'A valid ... | Registers this object as a SimpleJob.
@param array $options [optional] {
Configuration options.
@type string $identifier An identifier for the simple job. This
value must be unique across all job configs.
@type ConfigStorageInterface $configStorage The configuration storage
used to save configuration.
@type int $numW... | [
"Registers",
"this",
"object",
"as",
"a",
"SimpleJob",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Core/src/Batch/SimpleJobTrait.php#L62-L95 | train |
googleapis/google-cloud-php | Logging/src/LoggingClient.php | LoggingClient.psrBatchLogger | public static function psrBatchLogger($name, array $options = [])
{
$client = array_key_exists('clientConfig', $options)
? new self($options['clientConfig'])
: new self();
// Force enabling batch.
$options['batchEnabled'] = true;
return $client->psrLogger($nam... | php | public static function psrBatchLogger($name, array $options = [])
{
$client = array_key_exists('clientConfig', $options)
? new self($options['clientConfig'])
: new self();
// Force enabling batch.
$options['batchEnabled'] = true;
return $client->psrLogger($nam... | [
"public",
"static",
"function",
"psrBatchLogger",
"(",
"$",
"name",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"client",
"=",
"array_key_exists",
"(",
"'clientConfig'",
",",
"$",
"options",
")",
"?",
"new",
"self",
"(",
"$",
"options",
... | Create a PsrLogger with batching enabled.
@param string $name The name of the log to write entries to.
@param array $options [optional] {
Configuration options.
@type string $messageKey The key in the `jsonPayload` used to contain
the logged message. **Defaults to** `message`.
@type array $resource The
[monitored res... | [
"Create",
"a",
"PsrLogger",
"with",
"batching",
"enabled",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Logging/src/LoggingClient.php#L140-L148 | train |
googleapis/google-cloud-php | Logging/src/LoggingClient.php | LoggingClient.createSink | public function createSink($name, $destination, array $options = [])
{
$response = $this->connection->createSink($options + [
'parent' => $this->formattedProjectName,
'name' => $name,
'destination' => $destination,
'outputVersionFormat' => 'VERSION_FORMAT_UNS... | php | public function createSink($name, $destination, array $options = [])
{
$response = $this->connection->createSink($options + [
'parent' => $this->formattedProjectName,
'name' => $name,
'destination' => $destination,
'outputVersionFormat' => 'VERSION_FORMAT_UNS... | [
"public",
"function",
"createSink",
"(",
"$",
"name",
",",
"$",
"destination",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"connection",
"->",
"createSink",
"(",
"$",
"options",
"+",
"[",
"'parent'",
... | Create a sink.
Example:
```
$sink = $logging->createSink('my-sink', 'storage.googleapis.com/my-bucket');
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create projects.sinks create API documentation.
@codingStandardsIgnoreEnd
@param string $name The na... | [
"Create",
"a",
"sink",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Logging/src/LoggingClient.php#L227-L237 | train |
googleapis/google-cloud-php | Logging/src/LoggingClient.php | LoggingClient.sinks | public function sinks(array $options = [])
{
$resultLimit = $this->pluck('resultLimit', $options, false);
return new ItemIterator(
new PageIterator(
function (array $sink) {
return new Sink($this->connection, $sink['name'], $this->projectId, $sink);
... | php | public function sinks(array $options = [])
{
$resultLimit = $this->pluck('resultLimit', $options, false);
return new ItemIterator(
new PageIterator(
function (array $sink) {
return new Sink($this->connection, $sink['name'], $this->projectId, $sink);
... | [
"public",
"function",
"sinks",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"resultLimit",
"=",
"$",
"this",
"->",
"pluck",
"(",
"'resultLimit'",
",",
"$",
"options",
",",
"false",
")",
";",
"return",
"new",
"ItemIterator",
"(",
"new",
... | Fetches sinks associated with your project.
Example:
```
$sinks = $logging->sinks();
foreach ($sinks as $sink) {
echo $sink->name() . PHP_EOL;
}
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/list projects.sinks list API documentation.
@codingStandards... | [
"Fetches",
"sinks",
"associated",
"with",
"your",
"project",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Logging/src/LoggingClient.php#L286-L303 | train |
googleapis/google-cloud-php | Logging/src/LoggingClient.php | LoggingClient.createMetric | public function createMetric($name, $filter, array $options = [])
{
$response = $this->connection->createMetric($options + [
'parent' => $this->formattedProjectName,
'name' => $name,
'filter' => $filter
]);
return new Metric($this->connection, $name, $th... | php | public function createMetric($name, $filter, array $options = [])
{
$response = $this->connection->createMetric($options + [
'parent' => $this->formattedProjectName,
'name' => $name,
'filter' => $filter
]);
return new Metric($this->connection, $name, $th... | [
"public",
"function",
"createMetric",
"(",
"$",
"name",
",",
"$",
"filter",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"connection",
"->",
"createMetric",
"(",
"$",
"options",
"+",
"[",
"'parent'",
... | Create a metric.
Example:
```
$metric = $logging->createMetric(
'my-metric',
'logName = projects/my-project/logs/my-log'
);
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/create projects.metrics create API documentation.
@codingStandardsIgnoreEnd
@pa... | [
"Create",
"a",
"metric",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Logging/src/LoggingClient.php#L329-L338 | train |
googleapis/google-cloud-php | Logging/src/LoggingClient.php | LoggingClient.metrics | public function metrics(array $options = [])
{
$resultLimit = $this->pluck('resultLimit', $options, false);
return new ItemIterator(
new PageIterator(
function (array $metric) {
return new Metric($this->connection, $metric['name'], $this->projectId, $... | php | public function metrics(array $options = [])
{
$resultLimit = $this->pluck('resultLimit', $options, false);
return new ItemIterator(
new PageIterator(
function (array $metric) {
return new Metric($this->connection, $metric['name'], $this->projectId, $... | [
"public",
"function",
"metrics",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"resultLimit",
"=",
"$",
"this",
"->",
"pluck",
"(",
"'resultLimit'",
",",
"$",
"options",
",",
"false",
")",
";",
"return",
"new",
"ItemIterator",
"(",
"new",... | Fetches metrics associated with your project.
Example:
```
$metrics = $logging->metrics();
foreach ($metrics as $metric) {
echo $metric->name() . PHP_EOL;
}
```
@codingStandardsIgnoreStart
@see https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/list projects.metrics list API documentation.
... | [
"Fetches",
"metrics",
"associated",
"with",
"your",
"project",
"."
] | ff5030ffa1f12904565509a7bc24ecc0bd794a3e | https://github.com/googleapis/google-cloud-php/blob/ff5030ffa1f12904565509a7bc24ecc0bd794a3e/Logging/src/LoggingClient.php#L387-L404 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.