code
stringlengths 17
247k
| docstring
stringlengths 30
30.3k
| func_name
stringlengths 1
89
| language
stringclasses 1
value | repo
stringlengths 7
63
| path
stringlengths 7
153
| url
stringlengths 51
209
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
public function getTelephonyConnectionInfo()
{
return $this->telephony_connection_info;
} | Output only. The telephony connection information.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo telephony_connection_info = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@return \Google\Cloud\Dialogflow\V2\Conversation\TelephonyConnectionInfo|null | getTelephonyConnectionInfo | php | googleapis/google-cloud-php | Dialogflow/src/V2/Conversation.php | https://github.com/googleapis/google-cloud-php/blob/master/Dialogflow/src/V2/Conversation.php | Apache-2.0 |
public function setTelephonyConnectionInfo($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Conversation\TelephonyConnectionInfo::class);
$this->telephony_connection_info = $var;
return $this;
} | Output only. The telephony connection information.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo telephony_connection_info = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@param \Google\Cloud\Dialogflow\V2\Conversation\TelephonyConnectionInfo $var
@return $this | setTelephonyConnectionInfo | php | googleapis/google-cloud-php | Dialogflow/src/V2/Conversation.php | https://github.com/googleapis/google-cloud-php/blob/master/Dialogflow/src/V2/Conversation.php | Apache-2.0 |
public function getIngestedContextReferences()
{
return $this->ingested_context_references;
} | Output only. The context reference updates provided by external systems.
Generated from protobuf field <code>map<string, .google.cloud.dialogflow.v2.Conversation.ContextReference> ingested_context_references = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@return \Google\Protobuf\Internal\MapField | getIngestedContextReferences | php | googleapis/google-cloud-php | Dialogflow/src/V2/Conversation.php | https://github.com/googleapis/google-cloud-php/blob/master/Dialogflow/src/V2/Conversation.php | Apache-2.0 |
public function setIngestedContextReferences($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Conversation\ContextReference::class);
$this->ingested_context_references = $arr;
return $this;
} | Output only. The context reference updates provided by external systems.
Generated from protobuf field <code>map<string, .google.cloud.dialogflow.v2.Conversation.ContextReference> ingested_context_references = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@param array|\Google\Protobuf\Internal\MapField $var
@return $this | setIngestedContextReferences | php | googleapis/google-cloud-php | Dialogflow/src/V2/Conversation.php | https://github.com/googleapis/google-cloud-php/blob/master/Dialogflow/src/V2/Conversation.php | Apache-2.0 |
public function getTerraformVersions()
{
return $this->terraform_versions;
} | List of [TerraformVersion][google.cloud.config.v1.TerraformVersion]s.
Generated from protobuf field <code>repeated .google.cloud.config.v1.TerraformVersion terraform_versions = 1;</code>
@return \Google\Protobuf\Internal\RepeatedField | getTerraformVersions | php | googleapis/google-cloud-php | Config/src/V1/ListTerraformVersionsResponse.php | https://github.com/googleapis/google-cloud-php/blob/master/Config/src/V1/ListTerraformVersionsResponse.php | Apache-2.0 |
public function setTerraformVersions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Config\V1\TerraformVersion::class);
$this->terraform_versions = $arr;
return $this;
} | List of [TerraformVersion][google.cloud.config.v1.TerraformVersion]s.
Generated from protobuf field <code>repeated .google.cloud.config.v1.TerraformVersion terraform_versions = 1;</code>
@param array<\Google\Cloud\Config\V1\TerraformVersion>|\Google\Protobuf\Internal\RepeatedField $var
@return $this | setTerraformVersions | php | googleapis/google-cloud-php | Config/src/V1/ListTerraformVersionsResponse.php | https://github.com/googleapis/google-cloud-php/blob/master/Config/src/V1/ListTerraformVersionsResponse.php | Apache-2.0 |
public function setValues($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Retail\V2\SearchResponse\Facet\FacetValue::class);
$this->values = $arr;
return $this;
} | The facet values for this field.
Generated from protobuf field <code>repeated .google.cloud.retail.v2.SearchResponse.Facet.FacetValue values = 2;</code>
@param array<\Google\Cloud\Retail\V2\SearchResponse\Facet\FacetValue>|\Google\Protobuf\Internal\RepeatedField $var
@return $this | setValues | php | googleapis/google-cloud-php | Retail/src/V2/SearchResponse/Facet.php | https://github.com/googleapis/google-cloud-php/blob/master/Retail/src/V2/SearchResponse/Facet.php | Apache-2.0 |
public function getDynamicFacet()
{
return $this->dynamic_facet;
} | Whether the facet is dynamically generated.
Generated from protobuf field <code>bool dynamic_facet = 3;</code>
@return bool | getDynamicFacet | php | googleapis/google-cloud-php | Retail/src/V2/SearchResponse/Facet.php | https://github.com/googleapis/google-cloud-php/blob/master/Retail/src/V2/SearchResponse/Facet.php | Apache-2.0 |
public function setDynamicFacet($var)
{
GPBUtil::checkBool($var);
$this->dynamic_facet = $var;
return $this;
} | Whether the facet is dynamically generated.
Generated from protobuf field <code>bool dynamic_facet = 3;</code>
@param bool $var
@return $this | setDynamicFacet | php | googleapis/google-cloud-php | Retail/src/V2/SearchResponse/Facet.php | https://github.com/googleapis/google-cloud-php/blob/master/Retail/src/V2/SearchResponse/Facet.php | Apache-2.0 |
public function getActiveDaysLowerBound()
{
return $this->active_days_lower_bound;
} | Output only. This user (based on email, phone, and other identifiers) has
been seen on the internet for at least this number of days.
Generated from protobuf field <code>int32 active_days_lower_bound = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@return int | getActiveDaysLowerBound | php | googleapis/google-cloud-php | RecaptchaEnterprise/src/V1/FraudSignals/UserSignals.php | https://github.com/googleapis/google-cloud-php/blob/master/RecaptchaEnterprise/src/V1/FraudSignals/UserSignals.php | Apache-2.0 |
public function setActiveDaysLowerBound($var)
{
GPBUtil::checkInt32($var);
$this->active_days_lower_bound = $var;
return $this;
} | Output only. This user (based on email, phone, and other identifiers) has
been seen on the internet for at least this number of days.
Generated from protobuf field <code>int32 active_days_lower_bound = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@param int $var
@return $this | setActiveDaysLowerBound | php | googleapis/google-cloud-php | RecaptchaEnterprise/src/V1/FraudSignals/UserSignals.php | https://github.com/googleapis/google-cloud-php/blob/master/RecaptchaEnterprise/src/V1/FraudSignals/UserSignals.php | Apache-2.0 |
public function getSyntheticRisk()
{
return $this->synthetic_risk;
} | Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic
components in their identity, such as a randomly generated email address,
temporary phone number, or fake shipping address.
Generated from protobuf field <code>float synthetic_risk = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@return float | getSyntheticRisk | php | googleapis/google-cloud-php | RecaptchaEnterprise/src/V1/FraudSignals/UserSignals.php | https://github.com/googleapis/google-cloud-php/blob/master/RecaptchaEnterprise/src/V1/FraudSignals/UserSignals.php | Apache-2.0 |
public function setSyntheticRisk($var)
{
GPBUtil::checkFloat($var);
$this->synthetic_risk = $var;
return $this;
} | Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic
components in their identity, such as a randomly generated email address,
temporary phone number, or fake shipping address.
Generated from protobuf field <code>float synthetic_risk = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@param float $var
@return $this | setSyntheticRisk | php | googleapis/google-cloud-php | RecaptchaEnterprise/src/V1/FraudSignals/UserSignals.php | https://github.com/googleapis/google-cloud-php/blob/master/RecaptchaEnterprise/src/V1/FraudSignals/UserSignals.php | Apache-2.0 |
public function getEnableEachUniqueValue()
{
return isset($this->enable_each_unique_value) ? $this->enable_each_unique_value : false;
} | If enabled, traffic matching each unique value for the specified type constitutes a separate traffic unit. It can only be set to true if `value` is empty.
Generated from protobuf field <code>optional bool enable_each_unique_value = 469206341;</code>
@return bool | getEnableEachUniqueValue | php | googleapis/google-cloud-php | Compute/src/V1/SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig.php | Apache-2.0 |
public function setEnableEachUniqueValue($var)
{
GPBUtil::checkBool($var);
$this->enable_each_unique_value = $var;
return $this;
} | If enabled, traffic matching each unique value for the specified type constitutes a separate traffic unit. It can only be set to true if `value` is empty.
Generated from protobuf field <code>optional bool enable_each_unique_value = 469206341;</code>
@param bool $var
@return $this | setEnableEachUniqueValue | php | googleapis/google-cloud-php | Compute/src/V1/SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig.php | Apache-2.0 |
public function getLoggingServer()
{
return $this->logging_server;
} | Required. The initial description of a new logging server.
Generated from protobuf field <code>.google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED];</code>
@return \Google\Cloud\VmwareEngine\V1\LoggingServer|null | getLoggingServer | php | googleapis/google-cloud-php | VmwareEngine/src/V1/CreateLoggingServerRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/VmwareEngine/src/V1/CreateLoggingServerRequest.php | Apache-2.0 |
public function setLoggingServer($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\LoggingServer::class);
$this->logging_server = $var;
return $this;
} | Required. The initial description of a new logging server.
Generated from protobuf field <code>.google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED];</code>
@param \Google\Cloud\VmwareEngine\V1\LoggingServer $var
@return $this | setLoggingServer | php | googleapis/google-cloud-php | VmwareEngine/src/V1/CreateLoggingServerRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/VmwareEngine/src/V1/CreateLoggingServerRequest.php | Apache-2.0 |
public function getLoggingServerId()
{
return $this->logging_server_id;
} | Required. The user-provided identifier of the `LoggingServer` to be
created. This identifier must be unique among `LoggingServer` resources
within the parent and becomes the final token in the name URI.
The identifier must meet the following requirements:
* Only contains 1-63 alphanumeric characters and hyphens
* Begins with an alphabetical character
* Ends with a non-hyphen character
* Not formatted as a UUID
* Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
(section 3.5)
Generated from protobuf field <code>string logging_server_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
@return string | getLoggingServerId | php | googleapis/google-cloud-php | VmwareEngine/src/V1/CreateLoggingServerRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/VmwareEngine/src/V1/CreateLoggingServerRequest.php | Apache-2.0 |
public function setLoggingServerId($var)
{
GPBUtil::checkString($var, True);
$this->logging_server_id = $var;
return $this;
} | Required. The user-provided identifier of the `LoggingServer` to be
created. This identifier must be unique among `LoggingServer` resources
within the parent and becomes the final token in the name URI.
The identifier must meet the following requirements:
* Only contains 1-63 alphanumeric characters and hyphens
* Begins with an alphabetical character
* Ends with a non-hyphen character
* Not formatted as a UUID
* Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
(section 3.5)
Generated from protobuf field <code>string logging_server_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
@param string $var
@return $this | setLoggingServerId | php | googleapis/google-cloud-php | VmwareEngine/src/V1/CreateLoggingServerRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/VmwareEngine/src/V1/CreateLoggingServerRequest.php | Apache-2.0 |
public function setBoostControlSpec($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SearchKnowledgeRequest\SearchConfig\BoostSpecs\BoostSpec\ConditionBoostSpec\BoostControlSpec::class);
$this->boost_control_spec = $var;
return $this;
} | Optional. Complex specification for custom ranking based on
customer defined attribute value.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
@param \Google\Cloud\Dialogflow\V2\SearchKnowledgeRequest\SearchConfig\BoostSpecs\BoostSpec\ConditionBoostSpec\BoostControlSpec $var
@return $this | setBoostControlSpec | php | googleapis/google-cloud-php | Dialogflow/src/V2/SearchKnowledgeRequest/SearchConfig/BoostSpecs/BoostSpec/ConditionBoostSpec.php | https://github.com/googleapis/google-cloud-php/blob/master/Dialogflow/src/V2/SearchKnowledgeRequest/SearchConfig/BoostSpecs/BoostSpec/ConditionBoostSpec.php | Apache-2.0 |
public function getProcessorTypes()
{
return $this->processor_types;
} | The processor types.
Generated from protobuf field <code>repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1;</code>
@return \Google\Protobuf\Internal\RepeatedField | getProcessorTypes | php | googleapis/google-cloud-php | DocumentAi/src/V1/ListProcessorTypesResponse.php | https://github.com/googleapis/google-cloud-php/blob/master/DocumentAi/src/V1/ListProcessorTypesResponse.php | Apache-2.0 |
public function setProcessorTypes($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\ProcessorType::class);
$this->processor_types = $arr;
return $this;
} | The processor types.
Generated from protobuf field <code>repeated .google.cloud.documentai.v1.ProcessorType processor_types = 1;</code>
@param array<\Google\Cloud\DocumentAI\V1\ProcessorType>|\Google\Protobuf\Internal\RepeatedField $var
@return $this | setProcessorTypes | php | googleapis/google-cloud-php | DocumentAi/src/V1/ListProcessorTypesResponse.php | https://github.com/googleapis/google-cloud-php/blob/master/DocumentAi/src/V1/ListProcessorTypesResponse.php | Apache-2.0 |
public function getSpeechModelVariant()
{
return $this->speech_model_variant;
} | The speech model used in speech to text.
`SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as
`USE_ENHANCED`. It can be overridden in
[AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest]
and
[StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest]
request. If enhanced model variant is specified and an enhanced version of
the specified model for the language does not exist, then it would emit an
error.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.SpeechModelVariant speech_model_variant = 1;</code>
@return int | getSpeechModelVariant | php | googleapis/google-cloud-php | Dialogflow/src/V2/SpeechToTextConfig.php | https://github.com/googleapis/google-cloud-php/blob/master/Dialogflow/src/V2/SpeechToTextConfig.php | Apache-2.0 |
public function setSpeechModelVariant($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SpeechModelVariant::class);
$this->speech_model_variant = $var;
return $this;
} | The speech model used in speech to text.
`SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as
`USE_ENHANCED`. It can be overridden in
[AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest]
and
[StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest]
request. If enhanced model variant is specified and an enhanced version of
the specified model for the language does not exist, then it would emit an
error.
Generated from protobuf field <code>.google.cloud.dialogflow.v2.SpeechModelVariant speech_model_variant = 1;</code>
@param int $var
@return $this | setSpeechModelVariant | php | googleapis/google-cloud-php | Dialogflow/src/V2/SpeechToTextConfig.php | https://github.com/googleapis/google-cloud-php/blob/master/Dialogflow/src/V2/SpeechToTextConfig.php | Apache-2.0 |
public function getUseTimeoutBasedEndpointing()
{
return $this->use_timeout_based_endpointing;
} | Use timeout based endpointing, interpreting endpointer sensitivity as
seconds of timeout value.
Generated from protobuf field <code>bool use_timeout_based_endpointing = 11;</code>
@return bool | getUseTimeoutBasedEndpointing | php | googleapis/google-cloud-php | Dialogflow/src/V2/SpeechToTextConfig.php | https://github.com/googleapis/google-cloud-php/blob/master/Dialogflow/src/V2/SpeechToTextConfig.php | Apache-2.0 |
public function setUseTimeoutBasedEndpointing($var)
{
GPBUtil::checkBool($var);
$this->use_timeout_based_endpointing = $var;
return $this;
} | Use timeout based endpointing, interpreting endpointer sensitivity as
seconds of timeout value.
Generated from protobuf field <code>bool use_timeout_based_endpointing = 11;</code>
@param bool $var
@return $this | setUseTimeoutBasedEndpointing | php | googleapis/google-cloud-php | Dialogflow/src/V2/SpeechToTextConfig.php | https://github.com/googleapis/google-cloud-php/blob/master/Dialogflow/src/V2/SpeechToTextConfig.php | Apache-2.0 |
public function getServiceName()
{
return $this->service_name;
} | The URL of a BackendService to route traffic to.
Generated from protobuf field <code>string service_name = 1 [(.google.api.resource_reference) = {</code>
@return string | getServiceName | php | googleapis/google-cloud-php | NetworkServices/src/V1/HttpRoute/Destination.php | https://github.com/googleapis/google-cloud-php/blob/master/NetworkServices/src/V1/HttpRoute/Destination.php | Apache-2.0 |
public function getWeight()
{
return $this->weight;
} | Specifies the proportion of requests forwarded to the backend referenced
by the serviceName field. This is computed as:
- weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon from the exact proportion
defined here depending on the precision an implementation supports.
If only one serviceName is specified and it has a weight greater than 0,
100% of the traffic is forwarded to that backend.
If weights are specified for any one service name, they need to be
specified for all of them.
If weights are unspecified for all services, then, traffic is distributed
in equal proportions to all of them.
Generated from protobuf field <code>int32 weight = 2;</code>
@return int | getWeight | php | googleapis/google-cloud-php | NetworkServices/src/V1/HttpRoute/Destination.php | https://github.com/googleapis/google-cloud-php/blob/master/NetworkServices/src/V1/HttpRoute/Destination.php | Apache-2.0 |
public function setWeight($var)
{
GPBUtil::checkInt32($var);
$this->weight = $var;
return $this;
} | Specifies the proportion of requests forwarded to the backend referenced
by the serviceName field. This is computed as:
- weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon from the exact proportion
defined here depending on the precision an implementation supports.
If only one serviceName is specified and it has a weight greater than 0,
100% of the traffic is forwarded to that backend.
If weights are specified for any one service name, they need to be
specified for all of them.
If weights are unspecified for all services, then, traffic is distributed
in equal proportions to all of them.
Generated from protobuf field <code>int32 weight = 2;</code>
@param int $var
@return $this | setWeight | php | googleapis/google-cloud-php | NetworkServices/src/V1/HttpRoute/Destination.php | https://github.com/googleapis/google-cloud-php/blob/master/NetworkServices/src/V1/HttpRoute/Destination.php | Apache-2.0 |
public function getEnableSpeechAdaptation()
{
return $this->enable_speech_adaptation;
} | Whether to use speech adaptation for speech recognition.
Generated from protobuf field <code>bool enable_speech_adaptation = 1;</code>
@return bool | getEnableSpeechAdaptation | php | googleapis/google-cloud-php | DialogflowCx/src/V3/SpeechToTextSettings.php | https://github.com/googleapis/google-cloud-php/blob/master/DialogflowCx/src/V3/SpeechToTextSettings.php | Apache-2.0 |
public function setEnableSpeechAdaptation($var)
{
GPBUtil::checkBool($var);
$this->enable_speech_adaptation = $var;
return $this;
} | Whether to use speech adaptation for speech recognition.
Generated from protobuf field <code>bool enable_speech_adaptation = 1;</code>
@param bool $var
@return $this | setEnableSpeechAdaptation | php | googleapis/google-cloud-php | DialogflowCx/src/V3/SpeechToTextSettings.php | https://github.com/googleapis/google-cloud-php/blob/master/DialogflowCx/src/V3/SpeechToTextSettings.php | Apache-2.0 |
public function getSuggestion()
{
return $this->suggestion;
} | The suggestion for the query.
Generated from protobuf field <code>string suggestion = 1;</code>
@return string | getSuggestion | php | googleapis/google-cloud-php | Talent/src/V4/CompleteQueryResponse/CompletionResult.php | https://github.com/googleapis/google-cloud-php/blob/master/Talent/src/V4/CompleteQueryResponse/CompletionResult.php | Apache-2.0 |
public function setSuggestion($var)
{
GPBUtil::checkString($var, True);
$this->suggestion = $var;
return $this;
} | The suggestion for the query.
Generated from protobuf field <code>string suggestion = 1;</code>
@param string $var
@return $this | setSuggestion | php | googleapis/google-cloud-php | Talent/src/V4/CompleteQueryResponse/CompletionResult.php | https://github.com/googleapis/google-cloud-php/blob/master/Talent/src/V4/CompleteQueryResponse/CompletionResult.php | Apache-2.0 |
public function setType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompleteQueryRequest\CompletionType::class);
$this->type = $var;
return $this;
} | The completion topic.
Generated from protobuf field <code>.google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2;</code>
@param int $var
@return $this | setType | php | googleapis/google-cloud-php | Talent/src/V4/CompleteQueryResponse/CompletionResult.php | https://github.com/googleapis/google-cloud-php/blob/master/Talent/src/V4/CompleteQueryResponse/CompletionResult.php | Apache-2.0 |
public function getAttributesConfig()
{
return $this->attributes_config;
} | Required. Full AttributesConfig resource name. Format:
`projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
Generated from protobuf field <code>string attributes_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
@return string | getAttributesConfig | php | googleapis/google-cloud-php | Retail/src/V2/ReplaceCatalogAttributeRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/Retail/src/V2/ReplaceCatalogAttributeRequest.php | Apache-2.0 |
public function setAttributesConfig($var)
{
GPBUtil::checkString($var, True);
$this->attributes_config = $var;
return $this;
} | Required. Full AttributesConfig resource name. Format:
`projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
Generated from protobuf field <code>string attributes_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
@param string $var
@return $this | setAttributesConfig | php | googleapis/google-cloud-php | Retail/src/V2/ReplaceCatalogAttributeRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/Retail/src/V2/ReplaceCatalogAttributeRequest.php | Apache-2.0 |
public function getCatalogAttribute()
{
return $this->catalog_attribute;
} | Required. The updated
[CatalogAttribute][google.cloud.retail.v2.CatalogAttribute].
Generated from protobuf field <code>.google.cloud.retail.v2.CatalogAttribute catalog_attribute = 2 [(.google.api.field_behavior) = REQUIRED];</code>
@return \Google\Cloud\Retail\V2\CatalogAttribute|null | getCatalogAttribute | php | googleapis/google-cloud-php | Retail/src/V2/ReplaceCatalogAttributeRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/Retail/src/V2/ReplaceCatalogAttributeRequest.php | Apache-2.0 |
public function setCatalogAttribute($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Retail\V2\CatalogAttribute::class);
$this->catalog_attribute = $var;
return $this;
} | Required. The updated
[CatalogAttribute][google.cloud.retail.v2.CatalogAttribute].
Generated from protobuf field <code>.google.cloud.retail.v2.CatalogAttribute catalog_attribute = 2 [(.google.api.field_behavior) = REQUIRED];</code>
@param \Google\Cloud\Retail\V2\CatalogAttribute $var
@return $this | setCatalogAttribute | php | googleapis/google-cloud-php | Retail/src/V2/ReplaceCatalogAttributeRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/Retail/src/V2/ReplaceCatalogAttributeRequest.php | Apache-2.0 |
public function getBucketName()
{
return isset($this->bucket_name) ? $this->bucket_name : '';
} | Cloud Storage bucket name.
Generated from protobuf field <code>optional string bucket_name = 283610048;</code>
@return string | getBucketName | php | googleapis/google-cloud-php | Compute/src/V1/BackendBucket.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/BackendBucket.php | Apache-2.0 |
public function setCdnPolicy($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\BackendBucketCdnPolicy::class);
$this->cdn_policy = $var;
return $this;
} | Cloud CDN configuration for this BackendBucket.
Generated from protobuf field <code>optional .google.cloud.compute.v1.BackendBucketCdnPolicy cdn_policy = 213976452;</code>
@param \Google\Cloud\Compute\V1\BackendBucketCdnPolicy $var
@return $this | setCdnPolicy | php | googleapis/google-cloud-php | Compute/src/V1/BackendBucket.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/BackendBucket.php | Apache-2.0 |
public function getEnableCdn()
{
return isset($this->enable_cdn) ? $this->enable_cdn : false;
} | If true, enable Cloud CDN for this BackendBucket.
Generated from protobuf field <code>optional bool enable_cdn = 282942321;</code>
@return bool | getEnableCdn | php | googleapis/google-cloud-php | Compute/src/V1/BackendBucket.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/BackendBucket.php | Apache-2.0 |
public function setEnableCdn($var)
{
GPBUtil::checkBool($var);
$this->enable_cdn = $var;
return $this;
} | If true, enable Cloud CDN for this BackendBucket.
Generated from protobuf field <code>optional bool enable_cdn = 282942321;</code>
@param bool $var
@return $this | setEnableCdn | php | googleapis/google-cloud-php | Compute/src/V1/BackendBucket.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/BackendBucket.php | Apache-2.0 |
public function setUsedBy($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\BackendBucketUsedBy::class);
$this->used_by = $arr;
return $this;
} | [Output Only] List of resources referencing that backend bucket.
Generated from protobuf field <code>repeated .google.cloud.compute.v1.BackendBucketUsedBy used_by = 389320729;</code>
@param array<\Google\Cloud\Compute\V1\BackendBucketUsedBy>|\Google\Protobuf\Internal\RepeatedField $var
@return $this | setUsedBy | php | googleapis/google-cloud-php | Compute/src/V1/BackendBucket.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/BackendBucket.php | Apache-2.0 |
public function setType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\Type::class);
$this->type = $var;
return $this;
} | Required. The type of field.
Generated from protobuf field <code>.google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
@param int $var
@return $this | setType | php | googleapis/google-cloud-php | Dataplex/src/V1/Schema/SchemaField.php | https://github.com/googleapis/google-cloud-php/blob/master/Dataplex/src/V1/Schema/SchemaField.php | Apache-2.0 |
public function setMode($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\Mode::class);
$this->mode = $var;
return $this;
} | Required. Additional field semantics.
Generated from protobuf field <code>.google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED];</code>
@param int $var
@return $this | setMode | php | googleapis/google-cloud-php | Dataplex/src/V1/Schema/SchemaField.php | https://github.com/googleapis/google-cloud-php/blob/master/Dataplex/src/V1/Schema/SchemaField.php | Apache-2.0 |
public function setFields($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Schema\SchemaField::class);
$this->fields = $arr;
return $this;
} | Optional. Any nested field for complex types.
Generated from protobuf field <code>repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
@param array<\Google\Cloud\Dataplex\V1\Schema\SchemaField>|\Google\Protobuf\Internal\RepeatedField $var
@return $this | setFields | php | googleapis/google-cloud-php | Dataplex/src/V1/Schema/SchemaField.php | https://github.com/googleapis/google-cloud-php/blob/master/Dataplex/src/V1/Schema/SchemaField.php | Apache-2.0 |
public function getCallerIp()
{
return $this->caller_ip;
} | The IP address of the caller.
For a caller from the internet, this will be the public IPv4 or IPv6
address. For calls made from inside Google's internal production network
from one GCP service to another, `caller_ip` will be redacted to "private".
For a caller from a Compute Engine VM with a external IP address,
`caller_ip` will be the VM's external IP address. For a caller from a
Compute Engine VM without a external IP address, if the VM is in the same
organization (or project) as the accessed resource, `caller_ip` will be the
VM's internal IPv4 address, otherwise `caller_ip` will be redacted to
"gce-internal-ip". See https://cloud.google.com/compute/docs/vpc/ for more
information.
Generated from protobuf field <code>string caller_ip = 1;</code>
@return string | getCallerIp | php | googleapis/google-cloud-php | CloudCommonProtos/src/Audit/RequestMetadata.php | https://github.com/googleapis/google-cloud-php/blob/master/CloudCommonProtos/src/Audit/RequestMetadata.php | Apache-2.0 |
public function setCallerIp($var)
{
GPBUtil::checkString($var, True);
$this->caller_ip = $var;
return $this;
} | The IP address of the caller.
For a caller from the internet, this will be the public IPv4 or IPv6
address. For calls made from inside Google's internal production network
from one GCP service to another, `caller_ip` will be redacted to "private".
For a caller from a Compute Engine VM with a external IP address,
`caller_ip` will be the VM's external IP address. For a caller from a
Compute Engine VM without a external IP address, if the VM is in the same
organization (or project) as the accessed resource, `caller_ip` will be the
VM's internal IPv4 address, otherwise `caller_ip` will be redacted to
"gce-internal-ip". See https://cloud.google.com/compute/docs/vpc/ for more
information.
Generated from protobuf field <code>string caller_ip = 1;</code>
@param string $var
@return $this | setCallerIp | php | googleapis/google-cloud-php | CloudCommonProtos/src/Audit/RequestMetadata.php | https://github.com/googleapis/google-cloud-php/blob/master/CloudCommonProtos/src/Audit/RequestMetadata.php | Apache-2.0 |
public function getCallerSuppliedUserAgent()
{
return $this->caller_supplied_user_agent;
} | The user agent of the caller.
This information is not authenticated and should be treated accordingly.
For example:
+ `google-api-python-client/1.4.0`:
The request was made by the Google API client for Python.
+ `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
The request was made by the Google Cloud SDK CLI (gcloud).
+ `AppEngine-Google; (+http://code.google.com/appengine; appid:
s~my-project`:
The request was made from the `my-project` App Engine app.
Generated from protobuf field <code>string caller_supplied_user_agent = 2;</code>
@return string | getCallerSuppliedUserAgent | php | googleapis/google-cloud-php | CloudCommonProtos/src/Audit/RequestMetadata.php | https://github.com/googleapis/google-cloud-php/blob/master/CloudCommonProtos/src/Audit/RequestMetadata.php | Apache-2.0 |
public function setCallerSuppliedUserAgent($var)
{
GPBUtil::checkString($var, True);
$this->caller_supplied_user_agent = $var;
return $this;
} | The user agent of the caller.
This information is not authenticated and should be treated accordingly.
For example:
+ `google-api-python-client/1.4.0`:
The request was made by the Google API client for Python.
+ `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
The request was made by the Google Cloud SDK CLI (gcloud).
+ `AppEngine-Google; (+http://code.google.com/appengine; appid:
s~my-project`:
The request was made from the `my-project` App Engine app.
Generated from protobuf field <code>string caller_supplied_user_agent = 2;</code>
@param string $var
@return $this | setCallerSuppliedUserAgent | php | googleapis/google-cloud-php | CloudCommonProtos/src/Audit/RequestMetadata.php | https://github.com/googleapis/google-cloud-php/blob/master/CloudCommonProtos/src/Audit/RequestMetadata.php | Apache-2.0 |
public function getCallerNetwork()
{
return $this->caller_network;
} | The network of the caller.
Set only if the network host project is part of the same GCP organization
(or project) as the accessed resource.
See https://cloud.google.com/compute/docs/vpc/ for more information.
This is a scheme-less URI full resource name. For example:
"//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
Generated from protobuf field <code>string caller_network = 3;</code>
@return string | getCallerNetwork | php | googleapis/google-cloud-php | CloudCommonProtos/src/Audit/RequestMetadata.php | https://github.com/googleapis/google-cloud-php/blob/master/CloudCommonProtos/src/Audit/RequestMetadata.php | Apache-2.0 |
public function setCallerNetwork($var)
{
GPBUtil::checkString($var, True);
$this->caller_network = $var;
return $this;
} | The network of the caller.
Set only if the network host project is part of the same GCP organization
(or project) as the accessed resource.
See https://cloud.google.com/compute/docs/vpc/ for more information.
This is a scheme-less URI full resource name. For example:
"//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
Generated from protobuf field <code>string caller_network = 3;</code>
@param string $var
@return $this | setCallerNetwork | php | googleapis/google-cloud-php | CloudCommonProtos/src/Audit/RequestMetadata.php | https://github.com/googleapis/google-cloud-php/blob/master/CloudCommonProtos/src/Audit/RequestMetadata.php | Apache-2.0 |
public function getRequestAttributes()
{
return $this->request_attributes;
} | Request attributes used in IAM condition evaluation. This field contains
request attributes like request time and access levels associated with
the request.
To get the whole view of the attributes used in IAM
condition evaluation, the user must also look into
`AuditLog.authentication_info.resource_attributes`.
Generated from protobuf field <code>.google.rpc.context.AttributeContext.Request request_attributes = 7;</code>
@return \Google\Rpc\Context\AttributeContext\Request|null | getRequestAttributes | php | googleapis/google-cloud-php | CloudCommonProtos/src/Audit/RequestMetadata.php | https://github.com/googleapis/google-cloud-php/blob/master/CloudCommonProtos/src/Audit/RequestMetadata.php | Apache-2.0 |
public function setRequestAttributes($var)
{
GPBUtil::checkMessage($var, \Google\Rpc\Context\AttributeContext\Request::class);
$this->request_attributes = $var;
return $this;
} | Request attributes used in IAM condition evaluation. This field contains
request attributes like request time and access levels associated with
the request.
To get the whole view of the attributes used in IAM
condition evaluation, the user must also look into
`AuditLog.authentication_info.resource_attributes`.
Generated from protobuf field <code>.google.rpc.context.AttributeContext.Request request_attributes = 7;</code>
@param \Google\Rpc\Context\AttributeContext\Request $var
@return $this | setRequestAttributes | php | googleapis/google-cloud-php | CloudCommonProtos/src/Audit/RequestMetadata.php | https://github.com/googleapis/google-cloud-php/blob/master/CloudCommonProtos/src/Audit/RequestMetadata.php | Apache-2.0 |
public function getDestinationAttributes()
{
return $this->destination_attributes;
} | The destination of a network activity, such as accepting a TCP connection.
In a multi hop network activity, the destination represents the receiver of
the last hop. Only two fields are used in this message, Peer.port and
Peer.ip. These fields are optionally populated by those services utilizing
the IAM condition feature.
Generated from protobuf field <code>.google.rpc.context.AttributeContext.Peer destination_attributes = 8;</code>
@return \Google\Rpc\Context\AttributeContext\Peer|null | getDestinationAttributes | php | googleapis/google-cloud-php | CloudCommonProtos/src/Audit/RequestMetadata.php | https://github.com/googleapis/google-cloud-php/blob/master/CloudCommonProtos/src/Audit/RequestMetadata.php | Apache-2.0 |
public function setDestinationAttributes($var)
{
GPBUtil::checkMessage($var, \Google\Rpc\Context\AttributeContext\Peer::class);
$this->destination_attributes = $var;
return $this;
} | The destination of a network activity, such as accepting a TCP connection.
In a multi hop network activity, the destination represents the receiver of
the last hop. Only two fields are used in this message, Peer.port and
Peer.ip. These fields are optionally populated by those services utilizing
the IAM condition feature.
Generated from protobuf field <code>.google.rpc.context.AttributeContext.Peer destination_attributes = 8;</code>
@param \Google\Rpc\Context\AttributeContext\Peer $var
@return $this | setDestinationAttributes | php | googleapis/google-cloud-php | CloudCommonProtos/src/Audit/RequestMetadata.php | https://github.com/googleapis/google-cloud-php/blob/master/CloudCommonProtos/src/Audit/RequestMetadata.php | Apache-2.0 |
public function getStoragePoolResource()
{
return $this->storage_pool_resource;
} | The body resource for this request
Generated from protobuf field <code>.google.cloud.compute.v1.StoragePool storage_pool_resource = 157179405 [(.google.api.field_behavior) = REQUIRED];</code>
@return \Google\Cloud\Compute\V1\StoragePool|null | getStoragePoolResource | php | googleapis/google-cloud-php | Compute/src/V1/InsertStoragePoolRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/InsertStoragePoolRequest.php | Apache-2.0 |
public function setStoragePoolResource($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\StoragePool::class);
$this->storage_pool_resource = $var;
return $this;
} | The body resource for this request
Generated from protobuf field <code>.google.cloud.compute.v1.StoragePool storage_pool_resource = 157179405 [(.google.api.field_behavior) = REQUIRED];</code>
@param \Google\Cloud\Compute\V1\StoragePool $var
@return $this | setStoragePoolResource | php | googleapis/google-cloud-php | Compute/src/V1/InsertStoragePoolRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/InsertStoragePoolRequest.php | Apache-2.0 |
public function getPendingDeletion()
{
return $this->pending_deletion;
} | Output only. If true, the Site Deletion is in progress.
Generated from protobuf field <code>bool pending_deletion = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@return bool | getPendingDeletion | php | googleapis/google-cloud-php | TelcoAutomation/src/V1/NFDeploySiteStatus.php | https://github.com/googleapis/google-cloud-php/blob/master/TelcoAutomation/src/V1/NFDeploySiteStatus.php | Apache-2.0 |
public function setPendingDeletion($var)
{
GPBUtil::checkBool($var);
$this->pending_deletion = $var;
return $this;
} | Output only. If true, the Site Deletion is in progress.
Generated from protobuf field <code>bool pending_deletion = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@param bool $var
@return $this | setPendingDeletion | php | googleapis/google-cloud-php | TelcoAutomation/src/V1/NFDeploySiteStatus.php | https://github.com/googleapis/google-cloud-php/blob/master/TelcoAutomation/src/V1/NFDeploySiteStatus.php | Apache-2.0 |
public function getHydration()
{
return $this->hydration;
} | Output only. Hydration status.
Generated from protobuf field <code>.google.cloud.telcoautomation.v1.HydrationStatus hydration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@return \Google\Cloud\TelcoAutomation\V1\HydrationStatus|null | getHydration | php | googleapis/google-cloud-php | TelcoAutomation/src/V1/NFDeploySiteStatus.php | https://github.com/googleapis/google-cloud-php/blob/master/TelcoAutomation/src/V1/NFDeploySiteStatus.php | Apache-2.0 |
public function setHydration($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\HydrationStatus::class);
$this->hydration = $var;
return $this;
} | Output only. Hydration status.
Generated from protobuf field <code>.google.cloud.telcoautomation.v1.HydrationStatus hydration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@param \Google\Cloud\TelcoAutomation\V1\HydrationStatus $var
@return $this | setHydration | php | googleapis/google-cloud-php | TelcoAutomation/src/V1/NFDeploySiteStatus.php | https://github.com/googleapis/google-cloud-php/blob/master/TelcoAutomation/src/V1/NFDeploySiteStatus.php | Apache-2.0 |
public function getWorkload()
{
return $this->workload;
} | Output only. Workload status.
Generated from protobuf field <code>.google.cloud.telcoautomation.v1.WorkloadStatus workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@return \Google\Cloud\TelcoAutomation\V1\WorkloadStatus|null | getWorkload | php | googleapis/google-cloud-php | TelcoAutomation/src/V1/NFDeploySiteStatus.php | https://github.com/googleapis/google-cloud-php/blob/master/TelcoAutomation/src/V1/NFDeploySiteStatus.php | Apache-2.0 |
public function setWorkload($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\WorkloadStatus::class);
$this->workload = $var;
return $this;
} | Output only. Workload status.
Generated from protobuf field <code>.google.cloud.telcoautomation.v1.WorkloadStatus workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
@param \Google\Cloud\TelcoAutomation\V1\WorkloadStatus $var
@return $this | setWorkload | php | googleapis/google-cloud-php | TelcoAutomation/src/V1/NFDeploySiteStatus.php | https://github.com/googleapis/google-cloud-php/blob/master/TelcoAutomation/src/V1/NFDeploySiteStatus.php | Apache-2.0 |
public function setItems($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\HealthChecksScopedList::class);
$this->items = $arr;
return $this;
} | A list of HealthChecksScopedList resources.
Generated from protobuf field <code>map<string, .google.cloud.compute.v1.HealthChecksScopedList> items = 100526016;</code>
@param array|\Google\Protobuf\Internal\MapField $var
@return $this | setItems | php | googleapis/google-cloud-php | Compute/src/V1/HealthChecksAggregatedList.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/HealthChecksAggregatedList.php | Apache-2.0 |
public function getExpectedStructure()
{
return $this->expected_structure;
} | The issue type of InvalidDataPartition.
Generated from protobuf field <code>.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure expected_structure = 1;</code>
@return int | getExpectedStructure | php | googleapis/google-cloud-php | Dataplex/src/V1/Action/InvalidDataPartition.php | https://github.com/googleapis/google-cloud-php/blob/master/Dataplex/src/V1/Action/InvalidDataPartition.php | Apache-2.0 |
public function setExpectedStructure($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition\PartitionStructure::class);
$this->expected_structure = $var;
return $this;
} | The issue type of InvalidDataPartition.
Generated from protobuf field <code>.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure expected_structure = 1;</code>
@param int $var
@return $this | setExpectedStructure | php | googleapis/google-cloud-php | Dataplex/src/V1/Action/InvalidDataPartition.php | https://github.com/googleapis/google-cloud-php/blob/master/Dataplex/src/V1/Action/InvalidDataPartition.php | Apache-2.0 |
public function __construct(
RequestHandler $requestHandler,
Serializer $serializer,
$projectId,
$name,
$topicName,
$encode,
array $info = []
) {
$this->requestHandler = $requestHandler;
$this->serializer = $serializer;
$this->projectId = $projectId;
$this->encode = (bool) $encode;
$this->info = $info;
// Accept either a simple name or a fully-qualified name.
if ($this->isFullyQualifiedName('subscription', $name)) {
$this->name = $name;
} else {
$this->name = $this->formatName('subscription', $name, $projectId);
}
// Accept either a simple name or a fully-qualified name.
if ($this->isFullyQualifiedName('topic', $topicName)) {
$this->topicName = $topicName;
} else {
$this->topicName = !is_null($topicName)
? $this->formatName('topic', $topicName, $projectId)
: null;
}
} | Create a Subscription.
The idiomatic way to use this class is through the PubSubClient or Topic,
but you can instantiate it directly as well.
@param RequestHandler The request handler that is responsible for sending a request
and serializing responses into relevant classes.
@param Serializer $serializer The serializer instance to encode/decode messages.
@param string $projectId The current project
@param string $name The subscription name
@param string $topicName The topic name the subscription is attached to
@param bool $encode Whether messages are encrypted or not.
@param array $info [optional] Subscription info. Used to pre-populate the object. | __construct | php | googleapis/google-cloud-php | PubSub/src/Subscription.php | https://github.com/googleapis/google-cloud-php/blob/master/PubSub/src/Subscription.php | Apache-2.0 |
private function acknowledgeBatchWithRetries(array $messages, array $options = [])
{
$actionFunc = function (&$messages, $options) {
$this->sendAckRequest($messages, $options);
};
return $this->retryEodAction($actionFunc, $messages, $options);
} | Helper that sends an acknowledge request but with retries.
@param Message[] $messages An array of messages
@param array $options Configuration Options
@return array|void Array of messages which failed permanently | acknowledgeBatchWithRetries | php | googleapis/google-cloud-php | PubSub/src/Subscription.php | https://github.com/googleapis/google-cloud-php/blob/master/PubSub/src/Subscription.php | Apache-2.0 |
private function formatSubscriptionDurations(array $data)
{
if (isset($data['messageRetentionDuration'])) {
if ($data['messageRetentionDuration'] instanceof Duration) {
$duration = $data['messageRetentionDuration']->get();
$data['messageRetentionDuration'] = sprintf(
'%s.%ss',
$duration['seconds'],
$this->convertNanoSecondsToFraction($duration['nanos'], false)
);
}
$data['messageRetentionDuration'] = new ProtobufDuration(
$this->formatDurationForApi($data['messageRetentionDuration'])
);
}
if (isset($data['retryPolicy'])) {
if (isset($data['expirationPolicy']['ttl']) && $data['expirationPolicy']['ttl'] instanceof Duration) {
$duration = $data['expirationPolicy']['ttl']->get();
$data['expirationPolicy']['ttl'] = sprintf(
'%s.%ss',
$duration['seconds'],
$this->convertNanoSecondsToFraction($duration['nanos'], false)
);
}
if (isset($data['retryPolicy']['minimumBackoff']) &&
$data['retryPolicy']['minimumBackoff'] instanceof Duration
) {
$duration = $data['retryPolicy']['minimumBackoff']->get();
$data['retryPolicy']['minimumBackoff'] = sprintf(
'%s.%ss',
$duration['seconds'],
$this->convertNanoSecondsToFraction($duration['nanos'], false)
);
}
if (isset($data['retryPolicy']['maximumBackoff']) &&
$data['retryPolicy']['maximumBackoff'] instanceof Duration
) {
$duration = $data['retryPolicy']['maximumBackoff']->get();
$data['retryPolicy']['maximumBackoff'] = sprintf(
'%s.%ss',
$duration['seconds'],
$this->convertNanoSecondsToFraction($duration['nanos'], false)
);
}
}
if (isset($data['cloudStorageConfig']['maxDuration']) &&
$data['cloudStorageConfig']['maxDuration'] instanceof Duration
) {
$duration = $data['cloudStorageConfig']['maxDuration']->get();
$data['cloudStorageConfig']['maxDuration'] = sprintf(
'%s.%ss',
$duration['seconds'],
$this->convertNanoSecondsToFraction($duration['nanos'], false)
);
}
return $data;
} | Format Duration objects for the API.
@param array $data
@return array | formatSubscriptionDurations | php | googleapis/google-cloud-php | PubSub/src/Subscription.php | https://github.com/googleapis/google-cloud-php/blob/master/PubSub/src/Subscription.php | Apache-2.0 |
private function formatDeadLetterPolicyForApi(array $data)
{
if (isset($data['deadLetterPolicy'])) {
if ($data['deadLetterPolicy']['deadLetterTopic'] instanceof Topic) {
$topic = $data['deadLetterPolicy']['deadLetterTopic'];
$data['deadLetterPolicy']['deadLetterTopic'] = $topic->name();
}
}
return $data;
} | Format dead letter topic subscription data for API.
@param array $data
@return array | formatDeadLetterPolicyForApi | php | googleapis/google-cloud-php | PubSub/src/Subscription.php | https://github.com/googleapis/google-cloud-php/blob/master/PubSub/src/Subscription.php | Apache-2.0 |
private function isExceptionExactlyOnce(\Exception $e)
{
if (!$e instanceof ApiException && !$e instanceof BadRequestException) {
return false;
}
$reason = $e->getReason();
return $reason === self::$exactlyOnceDeliveryFailureReason;
} | Checks if a given exception failure is because of
an EOD failure.
@param \Exception $e
@return boolean | isExceptionExactlyOnce | php | googleapis/google-cloud-php | PubSub/src/Subscription.php | https://github.com/googleapis/google-cloud-php/blob/master/PubSub/src/Subscription.php | Apache-2.0 |
public function __debugInfo()
{
return [
'name' => $this->name,
'topicName' => $this->topicName,
'projectId' => $this->projectId,
'info' => $this->info,
'requestHandler' => $this->requestHandler
];
} | Present a nicer debug result to people using php 5.6 or greater.
@return array
@codeCoverageIgnore
@access private | __debugInfo | php | googleapis/google-cloud-php | PubSub/src/Subscription.php | https://github.com/googleapis/google-cloud-php/blob/master/PubSub/src/Subscription.php | Apache-2.0 |
private function getRetryableAckIds(\Exception $e)
{
$ackIds = [];
// EOD enabled subscription
if ($this->isExceptionExactlyOnce($e)) {
$metadata = $e->getErrorInfoMetadata();
foreach ($metadata as $ackId => $failureReason) {
// check if the prefix of the failure reason is same as
// the transient failure for EOD enabled subscriptions
if (strpos($failureReason, self::$exactlyOnceDeliveryTransientFailurePrefix) === 0) {
$ackIds[] = $ackId;
}
}
}
return $ackIds;
} | Returns the temporarily failed ackIds from the exception object
@param \Exception
@return array | getRetryableAckIds | php | googleapis/google-cloud-php | PubSub/src/Subscription.php | https://github.com/googleapis/google-cloud-php/blob/master/PubSub/src/Subscription.php | Apache-2.0 |
public static function setMaxEodRetryTime($maxTime)
{
self::$exactlyOnceDeliveryMaxRetryTime = $maxTime;
} | Func to change the maximum delay time for an `Exactly Once Delivery` enabled subscription's
retry attempt.
@internal | setMaxEodRetryTime | php | googleapis/google-cloud-php | PubSub/src/Subscription.php | https://github.com/googleapis/google-cloud-php/blob/master/PubSub/src/Subscription.php | Apache-2.0 |
public static function getMaxRetries()
{
return self::$exactlyOnceDeliveryMaxRetries;
} | Getter for the private static variable
@return int | getMaxRetries | php | googleapis/google-cloud-php | PubSub/src/Subscription.php | https://github.com/googleapis/google-cloud-php/blob/master/PubSub/src/Subscription.php | Apache-2.0 |
public function getDatabaseService()
{
return $this->database_service;
} | Required. Database for the Oracle connection.
Generated from protobuf field <code>string database_service = 5 [(.google.api.field_behavior) = REQUIRED];</code>
@return string | getDatabaseService | php | googleapis/google-cloud-php | Datastream/src/V1/OracleProfile.php | https://github.com/googleapis/google-cloud-php/blob/master/Datastream/src/V1/OracleProfile.php | Apache-2.0 |
public function setDatabaseService($var)
{
GPBUtil::checkString($var, True);
$this->database_service = $var;
return $this;
} | Required. Database for the Oracle connection.
Generated from protobuf field <code>string database_service = 5 [(.google.api.field_behavior) = REQUIRED];</code>
@param string $var
@return $this | setDatabaseService | php | googleapis/google-cloud-php | Datastream/src/V1/OracleProfile.php | https://github.com/googleapis/google-cloud-php/blob/master/Datastream/src/V1/OracleProfile.php | Apache-2.0 |
public function getConnectionAttributes()
{
return $this->connection_attributes;
} | Connection string attributes
Generated from protobuf field <code>map<string, string> connection_attributes = 6;</code>
@return \Google\Protobuf\Internal\MapField | getConnectionAttributes | php | googleapis/google-cloud-php | Datastream/src/V1/OracleProfile.php | https://github.com/googleapis/google-cloud-php/blob/master/Datastream/src/V1/OracleProfile.php | Apache-2.0 |
public function setConnectionAttributes($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
$this->connection_attributes = $arr;
return $this;
} | Connection string attributes
Generated from protobuf field <code>map<string, string> connection_attributes = 6;</code>
@param array|\Google\Protobuf\Internal\MapField $var
@return $this | setConnectionAttributes | php | googleapis/google-cloud-php | Datastream/src/V1/OracleProfile.php | https://github.com/googleapis/google-cloud-php/blob/master/Datastream/src/V1/OracleProfile.php | Apache-2.0 |
public function getOracleSslConfig()
{
return $this->oracle_ssl_config;
} | Optional. SSL configuration for the Oracle connection.
Generated from protobuf field <code>.google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
@return \Google\Cloud\Datastream\V1\OracleSslConfig|null | getOracleSslConfig | php | googleapis/google-cloud-php | Datastream/src/V1/OracleProfile.php | https://github.com/googleapis/google-cloud-php/blob/master/Datastream/src/V1/OracleProfile.php | Apache-2.0 |
public function setOracleSslConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSslConfig::class);
$this->oracle_ssl_config = $var;
return $this;
} | Optional. SSL configuration for the Oracle connection.
Generated from protobuf field <code>.google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
@param \Google\Cloud\Datastream\V1\OracleSslConfig $var
@return $this | setOracleSslConfig | php | googleapis/google-cloud-php | Datastream/src/V1/OracleProfile.php | https://github.com/googleapis/google-cloud-php/blob/master/Datastream/src/V1/OracleProfile.php | Apache-2.0 |
public function getOracleAsmConfig()
{
return $this->oracle_asm_config;
} | Optional. Configuration for Oracle ASM connection.
Generated from protobuf field <code>.google.cloud.datastream.v1.OracleAsmConfig oracle_asm_config = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
@return \Google\Cloud\Datastream\V1\OracleAsmConfig|null | getOracleAsmConfig | php | googleapis/google-cloud-php | Datastream/src/V1/OracleProfile.php | https://github.com/googleapis/google-cloud-php/blob/master/Datastream/src/V1/OracleProfile.php | Apache-2.0 |
public function setOracleAsmConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleAsmConfig::class);
$this->oracle_asm_config = $var;
return $this;
} | Optional. Configuration for Oracle ASM connection.
Generated from protobuf field <code>.google.cloud.datastream.v1.OracleAsmConfig oracle_asm_config = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
@param \Google\Cloud\Datastream\V1\OracleAsmConfig $var
@return $this | setOracleAsmConfig | php | googleapis/google-cloud-php | Datastream/src/V1/OracleProfile.php | https://github.com/googleapis/google-cloud-php/blob/master/Datastream/src/V1/OracleProfile.php | Apache-2.0 |
public function getSecretManagerStoredPassword()
{
return $this->secret_manager_stored_password;
} | Optional. A reference to a Secret Manager resource name storing the Oracle
connection password. Mutually exclusive with the `password` field.
Generated from protobuf field <code>string secret_manager_stored_password = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
@return string | getSecretManagerStoredPassword | php | googleapis/google-cloud-php | Datastream/src/V1/OracleProfile.php | https://github.com/googleapis/google-cloud-php/blob/master/Datastream/src/V1/OracleProfile.php | Apache-2.0 |
public function setSecretManagerStoredPassword($var)
{
GPBUtil::checkString($var, True);
$this->secret_manager_stored_password = $var;
return $this;
} | Optional. A reference to a Secret Manager resource name storing the Oracle
connection password. Mutually exclusive with the `password` field.
Generated from protobuf field <code>string secret_manager_stored_password = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
@param string $var
@return $this | setSecretManagerStoredPassword | php | googleapis/google-cloud-php | Datastream/src/V1/OracleProfile.php | https://github.com/googleapis/google-cloud-php/blob/master/Datastream/src/V1/OracleProfile.php | Apache-2.0 |
public function getUrlMap()
{
return $this->url_map;
} | Name of the UrlMap resource to delete.
Generated from protobuf field <code>string url_map = 367020684 [(.google.api.field_behavior) = REQUIRED];</code>
@return string | getUrlMap | php | googleapis/google-cloud-php | Compute/src/V1/DeleteRegionUrlMapRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/DeleteRegionUrlMapRequest.php | Apache-2.0 |
public function setUrlMap($var)
{
GPBUtil::checkString($var, True);
$this->url_map = $var;
return $this;
} | Name of the UrlMap resource to delete.
Generated from protobuf field <code>string url_map = 367020684 [(.google.api.field_behavior) = REQUIRED];</code>
@param string $var
@return $this | setUrlMap | php | googleapis/google-cloud-php | Compute/src/V1/DeleteRegionUrlMapRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/DeleteRegionUrlMapRequest.php | Apache-2.0 |
public function setItems($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\PublicDelegatedPrefixesScopedList::class);
$this->items = $arr;
return $this;
} | A list of PublicDelegatedPrefixesScopedList resources.
Generated from protobuf field <code>map<string, .google.cloud.compute.v1.PublicDelegatedPrefixesScopedList> items = 100526016;</code>
@param array|\Google\Protobuf\Internal\MapField $var
@return $this | setItems | php | googleapis/google-cloud-php | Compute/src/V1/PublicDelegatedPrefixAggregatedList.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/PublicDelegatedPrefixAggregatedList.php | Apache-2.0 |
public function setFile($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\ArtifactRegistry\V1\File::class);
$this->file = $var;
return $this;
} | Required. The File that replaces the resource on the server.
Generated from protobuf field <code>.google.devtools.artifactregistry.v1.File file = 1 [(.google.api.field_behavior) = REQUIRED];</code>
@param \Google\Cloud\ArtifactRegistry\V1\File $var
@return $this | setFile | php | googleapis/google-cloud-php | ArtifactRegistry/src/V1/UpdateFileRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/ArtifactRegistry/src/V1/UpdateFileRequest.php | Apache-2.0 |
public function setObject($var)
{
GPBUtil::checkString($var, True);
$this->object = $var;
return $this;
} | Required. Name of the Cloud Storage object.
Generated from protobuf field <code>string object = 2 [(.google.api.field_behavior) = REQUIRED];</code>
@param string $var
@return $this | setObject | php | googleapis/google-cloud-php | OsConfig/src/V1/GcsObject.php | https://github.com/googleapis/google-cloud-php/blob/master/OsConfig/src/V1/GcsObject.php | Apache-2.0 |
public function getGenerationNumber()
{
return $this->generation_number;
} | Required. Generation number of the Cloud Storage object. This is used to
ensure that the ExecStep specified by this PatchJob does not change.
Generated from protobuf field <code>int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED];</code>
@return int|string | getGenerationNumber | php | googleapis/google-cloud-php | OsConfig/src/V1/GcsObject.php | https://github.com/googleapis/google-cloud-php/blob/master/OsConfig/src/V1/GcsObject.php | Apache-2.0 |
public function setGenerationNumber($var)
{
GPBUtil::checkInt64($var);
$this->generation_number = $var;
return $this;
} | Required. Generation number of the Cloud Storage object. This is used to
ensure that the ExecStep specified by this PatchJob does not change.
Generated from protobuf field <code>int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED];</code>
@param int|string $var
@return $this | setGenerationNumber | php | googleapis/google-cloud-php | OsConfig/src/V1/GcsObject.php | https://github.com/googleapis/google-cloud-php/blob/master/OsConfig/src/V1/GcsObject.php | Apache-2.0 |
public function setGcsSource($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Redis\V1\GcsSource::class);
$this->writeOneof(1, $var);
return $this;
} | Google Cloud Storage location where input content is located.
Generated from protobuf field <code>.google.cloud.redis.v1.GcsSource gcs_source = 1;</code>
@param \Google\Cloud\Redis\V1\GcsSource $var
@return $this | setGcsSource | php | googleapis/google-cloud-php | Redis/src/V1/InputConfig.php | https://github.com/googleapis/google-cloud-php/blob/master/Redis/src/V1/InputConfig.php | Apache-2.0 |
public function setTtl($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
$this->ttl = $var;
return $this;
} | TTL for the snapshot.
Generated from protobuf field <code>.google.protobuf.Duration ttl = 3;</code>
@param \Google\Protobuf\Duration $var
@return $this | setTtl | php | googleapis/google-cloud-php | Dataflow/src/V1beta3/SnapshotJobRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/Dataflow/src/V1beta3/SnapshotJobRequest.php | Apache-2.0 |
public function getSnapshotSources()
{
return $this->snapshot_sources;
} | If true, perform snapshots for sources which support this.
Generated from protobuf field <code>bool snapshot_sources = 5;</code>
@return bool | getSnapshotSources | php | googleapis/google-cloud-php | Dataflow/src/V1beta3/SnapshotJobRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/Dataflow/src/V1beta3/SnapshotJobRequest.php | Apache-2.0 |
public function setSnapshotSources($var)
{
GPBUtil::checkBool($var);
$this->snapshot_sources = $var;
return $this;
} | If true, perform snapshots for sources which support this.
Generated from protobuf field <code>bool snapshot_sources = 5;</code>
@param bool $var
@return $this | setSnapshotSources | php | googleapis/google-cloud-php | Dataflow/src/V1beta3/SnapshotJobRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/Dataflow/src/V1beta3/SnapshotJobRequest.php | Apache-2.0 |
public function setItems($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\InterconnectRemoteLocation::class);
$this->items = $arr;
return $this;
} | A list of InterconnectRemoteLocation resources.
Generated from protobuf field <code>repeated .google.cloud.compute.v1.InterconnectRemoteLocation items = 100526016;</code>
@param array<\Google\Cloud\Compute\V1\InterconnectRemoteLocation>|\Google\Protobuf\Internal\RepeatedField $var
@return $this | setItems | php | googleapis/google-cloud-php | Compute/src/V1/InterconnectRemoteLocationList.php | https://github.com/googleapis/google-cloud-php/blob/master/Compute/src/V1/InterconnectRemoteLocationList.php | Apache-2.0 |
public function getConnectionId()
{
return $this->connection_id;
} | Required. Id of the requesting object
If auto-generating Id server-side, remove this field and
connection_id from the method_signature of Create RPC
Generated from protobuf field <code>string connection_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
@return string | getConnectionId | php | googleapis/google-cloud-php | DeveloperConnect/src/V1/CreateConnectionRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/DeveloperConnect/src/V1/CreateConnectionRequest.php | Apache-2.0 |
public function setConnectionId($var)
{
GPBUtil::checkString($var, True);
$this->connection_id = $var;
return $this;
} | Required. Id of the requesting object
If auto-generating Id server-side, remove this field and
connection_id from the method_signature of Create RPC
Generated from protobuf field <code>string connection_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
@param string $var
@return $this | setConnectionId | php | googleapis/google-cloud-php | DeveloperConnect/src/V1/CreateConnectionRequest.php | https://github.com/googleapis/google-cloud-php/blob/master/DeveloperConnect/src/V1/CreateConnectionRequest.php | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.